Changeset 3110769
- Timestamp:
- 07/01/2024 10:24:39 PM (21 months ago)
- Location:
- rsvpmaker/tags/11.1.5
- Files:
-
- 6 edited
- 22 copied
-
. (copied) (copied from rsvpmaker/trunk)
-
README.txt (copied) (copied from rsvpmaker/trunk/README.txt) (2 diffs)
-
admin/build/adminui.asset.php (copied) (copied from rsvpmaker/trunk/admin/build/adminui.asset.php) (1 diff)
-
admin/build/adminui.js (copied) (copied from rsvpmaker/trunk/admin/build/adminui.js) (1 diff)
-
admin/build/editor-sidebar/sidebars.asset.php (copied) (copied from rsvpmaker/trunk/admin/build/editor-sidebar/sidebars.asset.php) (1 diff)
-
admin/build/editor-sidebar/sidebars.js (copied) (copied from rsvpmaker/trunk/admin/build/editor-sidebar/sidebars.js) (1 diff)
-
admin/build/event-options.asset.php (copied) (copied from rsvpmaker/trunk/admin/build/event-options.asset.php) (1 diff)
-
admin/build/event-options.js (copied) (copied from rsvpmaker/trunk/admin/build/event-options.js) (1 diff)
-
admin/build/oldblocks/block.asset.php (copied) (copied from rsvpmaker/trunk/admin/build/oldblocks/block.asset.php)
-
admin/build/oldblocks/block.js (copied) (copied from rsvpmaker/trunk/admin/build/oldblocks/block.js)
-
admin/build/single-form.asset.php (copied) (copied from rsvpmaker/trunk/admin/build/single-form.asset.php) (1 diff)
-
admin/build/single-form.js (copied) (copied from rsvpmaker/trunk/admin/build/single-form.js) (1 diff)
-
admin/src/Forms.js (copied) (copied from rsvpmaker/trunk/admin/src/Forms.js) (2 diffs)
-
admin/src/editor-sidebar/Pricing.js (modified) (3 diffs)
-
admin/src/oldblocks/form.js (copied) (copied from rsvpmaker/trunk/admin/src/oldblocks/form.js)
-
rsvpmaker-api-endpoints.php (copied) (copied from rsvpmaker/trunk/rsvpmaker-api-endpoints.php) (2 diffs)
-
rsvpmaker-display.php (copied) (copied from rsvpmaker/trunk/rsvpmaker-display.php) (4 diffs)
-
rsvpmaker-email.php (copied) (copied from rsvpmaker/trunk/rsvpmaker-email.php) (7 diffs)
-
rsvpmaker-form.php (copied) (copied from rsvpmaker/trunk/rsvpmaker-form.php) (2 diffs)
-
rsvpmaker-group-email.php (modified) (1 diff)
-
rsvpmaker-plugabble.php (copied) (copied from rsvpmaker/trunk/rsvpmaker-plugabble.php) (8 diffs)
-
rsvpmaker-postmark.php (modified) (2 diffs)
-
rsvpmaker-stripe.php (modified) (2 diffs)
-
rsvpmaker-util.php (copied) (copied from rsvpmaker/trunk/rsvpmaker-util.php) (1 diff)
-
rsvpmaker-widgets.php (copied) (copied from rsvpmaker/trunk/rsvpmaker-widgets.php)
-
rsvpmaker.js (modified) (3 diffs)
-
rsvpmaker.min.js (modified) (1 diff)
-
rsvpmaker.php (copied) (copied from rsvpmaker/trunk/rsvpmaker.php) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
rsvpmaker/tags/11.1.5/README.txt
r3106066 r3110769 9 9 Requires at least: 5.0 10 10 Tested up to: 6.5.4 11 Stable tag: 11.1. 311 Stable tag: 11.1.5 12 12 13 13 RSVPMaker is an event and email marketing and management platform. Schedule events, send invitations, track RSVPs, and collect payment via PayPal or Stripe. Send newsletters, including event and blog post roundups. … … 131 131 == Changelog == 132 132 133 = 11.1.5 = 134 135 * Option to add a charge based on an RSVP form selection such as meal choice (+$15 for Steak), either in addition to the base charge or as the primary way of charging attendees. Designed to work with radio button options. 136 * Radio button form widgets can now be set to default to the first item. 137 133 138 = 11.1.2 = 134 139 -
rsvpmaker/tags/11.1.5/admin/build/adminui.asset.php
r3104244 r3110769 1 <?php return array('dependencies' => array('react', 'react-dom', 'wp-components'), 'version' => ' c387564e1faf85090e10');1 <?php return array('dependencies' => array('react', 'react-dom', 'wp-components'), 'version' => 'af86a92c8f02535a0cfb'); -
rsvpmaker/tags/11.1.5/admin/build/adminui.js
r3104244 r3110769 1 (()=>{var e={838:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:o}=Object;let{freeze:a,seal:i,create:s}=Object,{apply:l,construct:u}="undefined"!=typeof Reflect&&Reflect;a||(a=function(e){return e}),i||(i=function(e){return e}),l||(l=function(e,t,n){return e.apply(t,n)}),u||(u=function(e,t){return new e(...t)});const c=S(Array.prototype.forEach),d=S(Array.prototype.pop),f=S(Array.prototype.push),h=S(String.prototype.toLowerCase),p=S(String.prototype.toString),m=S(String.prototype.match),v=S(String.prototype.replace),g=S(String.prototype.indexOf),y=S(String.prototype.trim),b=S(Object.prototype.hasOwnProperty),E=S(RegExp.prototype.test),C=(_=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u(_,t)});var _;function S(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return l(e,t,r)}}function w(e,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;t&&t(e,null);let a=r.length;for(;a--;){let t=r[a];if("string"==typeof t){const e=o(t);e!==t&&(n(r)||(r[a]=e),t=e)}e[t]=!0}return e}function T(e){for(let t=0;t<e.length;t++)b(e,t)||(e[t]=null);return e}function k(t){const n=s(null);for(const[r,o]of e(t))b(t,r)&&(Array.isArray(o)?n[r]=T(o):o&&"object"==typeof o&&o.constructor===Object?n[r]=k(o):n[r]=o);return n}function O(e,t){for(;null!==e;){const n=o(e,t);if(n){if(n.get)return S(n.get);if("function"==typeof n.value)return S(n.value)}e=r(e)}return function(){return null}}const A=a(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),R=a(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),x=a(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),N=a(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),P=a(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),F=a(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),D=a(["#text"]),M=a(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),L=a(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),I=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),U=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),j=i(/\{\{[\w\W]*|[\w\W]*\}\}/gm),q=i(/<%[\w\W]*|[\w\W]*%>/gm),Q=i(/\${[\w\W]*}/gm),B=i(/^data-[\-\w.\u00B7-\uFFFF]/),H=i(/^aria-[\-\w]+$/),z=i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),K=i(/^(?:\w+script|data):/i),G=i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),W=i(/^html$/i),V=i(/^[a-z][.\w]*(-[.\w]+)+$/i);var Y=Object.freeze({__proto__:null,MUSTACHE_EXPR:j,ERB_EXPR:q,TMPLIT_EXPR:Q,DATA_ATTR:B,ARIA_ATTR:H,IS_ALLOWED_URI:z,IS_SCRIPT_OR_DATA:K,ATTR_WHITESPACE:G,DOCTYPE_NAME:W,CUSTOM_ELEMENT:V});const J=function(){return"undefined"==typeof window?null:window};return function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:J();const r=e=>t(e);if(r.version="3.0.11",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;let{document:o}=n;const i=o,l=i.currentScript,{DocumentFragment:u,HTMLTemplateElement:_,Node:S,Element:T,NodeFilter:j,NamedNodeMap:q=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:Q,DOMParser:B,trustedTypes:H}=n,K=T.prototype,G=O(K,"cloneNode"),V=O(K,"nextSibling"),$=O(K,"childNodes"),X=O(K,"parentNode");if("function"==typeof _){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let Z,ee="";const{implementation:te,createNodeIterator:ne,createDocumentFragment:re,getElementsByTagName:oe}=o,{importNode:ae}=i;let ie={};r.isSupported="function"==typeof e&&"function"==typeof X&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:se,ERB_EXPR:le,TMPLIT_EXPR:ue,DATA_ATTR:ce,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:fe,ATTR_WHITESPACE:he,CUSTOM_ELEMENT:pe}=Y;let{IS_ALLOWED_URI:me}=Y,ve=null;const ge=w({},[...A,...R,...x,...P,...D]);let ye=null;const be=w({},[...M,...L,...I,...U]);let Ee=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ce=null,_e=null,Se=!0,we=!0,Te=!1,ke=!0,Oe=!1,Ae=!1,Re=!1,xe=!1,Ne=!1,Pe=!1,Fe=!1,De=!0,Me=!1,Le=!0,Ie=!1,Ue={},je=null;const qe=w({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Qe=null;const Be=w({},["audio","video","img","source","image","track"]);let He=null;const ze=w({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ke="http://www.w3.org/1998/Math/MathML",Ge="http://www.w3.org/2000/svg",We="http://www.w3.org/1999/xhtml";let Ve=We,Ye=!1,Je=null;const $e=w({},[Ke,Ge,We],p);let Xe=null;const Ze=["application/xhtml+xml","text/html"];let et=null,tt=null;const nt=o.createElement("form"),rt=function(e){return e instanceof RegExp||e instanceof Function},ot=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!tt||tt!==e){if(e&&"object"==typeof e||(e={}),e=k(e),Xe=-1===Ze.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,et="application/xhtml+xml"===Xe?p:h,ve=b(e,"ALLOWED_TAGS")?w({},e.ALLOWED_TAGS,et):ge,ye=b(e,"ALLOWED_ATTR")?w({},e.ALLOWED_ATTR,et):be,Je=b(e,"ALLOWED_NAMESPACES")?w({},e.ALLOWED_NAMESPACES,p):$e,He=b(e,"ADD_URI_SAFE_ATTR")?w(k(ze),e.ADD_URI_SAFE_ATTR,et):ze,Qe=b(e,"ADD_DATA_URI_TAGS")?w(k(Be),e.ADD_DATA_URI_TAGS,et):Be,je=b(e,"FORBID_CONTENTS")?w({},e.FORBID_CONTENTS,et):qe,Ce=b(e,"FORBID_TAGS")?w({},e.FORBID_TAGS,et):{},_e=b(e,"FORBID_ATTR")?w({},e.FORBID_ATTR,et):{},Ue=!!b(e,"USE_PROFILES")&&e.USE_PROFILES,Se=!1!==e.ALLOW_ARIA_ATTR,we=!1!==e.ALLOW_DATA_ATTR,Te=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ke=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Oe=e.SAFE_FOR_TEMPLATES||!1,Ae=e.WHOLE_DOCUMENT||!1,Ne=e.RETURN_DOM||!1,Pe=e.RETURN_DOM_FRAGMENT||!1,Fe=e.RETURN_TRUSTED_TYPE||!1,xe=e.FORCE_BODY||!1,De=!1!==e.SANITIZE_DOM,Me=e.SANITIZE_NAMED_PROPS||!1,Le=!1!==e.KEEP_CONTENT,Ie=e.IN_PLACE||!1,me=e.ALLOWED_URI_REGEXP||z,Ve=e.NAMESPACE||We,Ee=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ee.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ee.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ee.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Oe&&(we=!1),Pe&&(Ne=!0),Ue&&(ve=w({},D),ye=[],!0===Ue.html&&(w(ve,A),w(ye,M)),!0===Ue.svg&&(w(ve,R),w(ye,L),w(ye,U)),!0===Ue.svgFilters&&(w(ve,x),w(ye,L),w(ye,U)),!0===Ue.mathMl&&(w(ve,P),w(ye,I),w(ye,U))),e.ADD_TAGS&&(ve===ge&&(ve=k(ve)),w(ve,e.ADD_TAGS,et)),e.ADD_ATTR&&(ye===be&&(ye=k(ye)),w(ye,e.ADD_ATTR,et)),e.ADD_URI_SAFE_ATTR&&w(He,e.ADD_URI_SAFE_ATTR,et),e.FORBID_CONTENTS&&(je===qe&&(je=k(je)),w(je,e.FORBID_CONTENTS,et)),Le&&(ve["#text"]=!0),Ae&&w(ve,["html","head","body"]),ve.table&&(w(ve,["tbody"]),delete Ce.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw C('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw C('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Z=e.TRUSTED_TYPES_POLICY,ee=Z.createHTML("")}else void 0===Z&&(Z=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(H,l)),null!==Z&&"string"==typeof ee&&(ee=Z.createHTML(""));a&&a(e),tt=e}},at=w({},["mi","mo","mn","ms","mtext"]),it=w({},["foreignobject","desc","title","annotation-xml"]),st=w({},["title","style","font","a","script"]),lt=w({},[...R,...x,...N]),ut=w({},[...P,...F]),ct=function(e){f(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},dt=function(e,t){try{f(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ye[e])if(Ne||Pe)try{ct(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ft=function(e){let t=null,n=null;if(xe)e="<remove></remove>"+e;else{const t=m(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Xe&&Ve===We&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=Z?Z.createHTML(e):e;if(Ve===We)try{t=(new B).parseFromString(r,Xe)}catch(e){}if(!t||!t.documentElement){t=te.createDocument(Ve,"template",null);try{t.documentElement.innerHTML=Ye?ee:r}catch(e){}}const a=t.body||t.documentElement;return e&&n&&a.insertBefore(o.createTextNode(n),a.childNodes[0]||null),Ve===We?oe.call(t,Ae?"html":"body")[0]:Ae?t.documentElement:a},ht=function(e){return ne.call(e.ownerDocument||e,e,j.SHOW_ELEMENT|j.SHOW_COMMENT|j.SHOW_TEXT|j.SHOW_PROCESSING_INSTRUCTION|j.SHOW_CDATA_SECTION,null)},pt=function(e){return"function"==typeof S&&e instanceof S},mt=function(e,t,n){ie[e]&&c(ie[e],(e=>{e.call(r,t,n,tt)}))},vt=function(e){let t=null;if(mt("beforeSanitizeElements",e,null),(n=e)instanceof Q&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof q)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return ct(e),!0;var n;const o=et(e.nodeName);if(mt("uponSanitizeElement",e,{tagName:o,allowedTags:ve}),e.hasChildNodes()&&!pt(e.firstElementChild)&&E(/<[/\w]/g,e.innerHTML)&&E(/<[/\w]/g,e.textContent))return ct(e),!0;if(7===e.nodeType)return ct(e),!0;if(!ve[o]||Ce[o]){if(!Ce[o]&&yt(o)){if(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,o))return!1;if(Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(o))return!1}if(Le&&!je[o]){const t=X(e)||e.parentNode,n=$(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(G(n[r],!0),V(e))}return ct(e),!0}return e instanceof T&&!function(e){let t=X(e);t&&t.tagName||(t={namespaceURI:Ve,tagName:"template"});const n=h(e.tagName),r=h(t.tagName);return!!Je[e.namespaceURI]&&(e.namespaceURI===Ge?t.namespaceURI===We?"svg"===n:t.namespaceURI===Ke?"svg"===n&&("annotation-xml"===r||at[r]):Boolean(lt[n]):e.namespaceURI===Ke?t.namespaceURI===We?"math"===n:t.namespaceURI===Ge?"math"===n&&it[r]:Boolean(ut[n]):e.namespaceURI===We?!(t.namespaceURI===Ge&&!it[r])&&!(t.namespaceURI===Ke&&!at[r])&&!ut[n]&&(st[n]||!lt[n]):!("application/xhtml+xml"!==Xe||!Je[e.namespaceURI]))}(e)?(ct(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!E(/<\/no(script|embed|frames)/i,e.innerHTML)?(Oe&&3===e.nodeType&&(t=e.textContent,c([se,le,ue],(e=>{t=v(t,e," ")})),e.textContent!==t&&(f(r.removed,{element:e.cloneNode()}),e.textContent=t)),mt("afterSanitizeElements",e,null),!1):(ct(e),!0)},gt=function(e,t,n){if(De&&("id"===t||"name"===t)&&(n in o||n in nt))return!1;if(we&&!_e[t]&&E(ce,t));else if(Se&&E(de,t));else if(!ye[t]||_e[t]){if(!(yt(e)&&(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,e)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(e))&&(Ee.attributeNameCheck instanceof RegExp&&E(Ee.attributeNameCheck,t)||Ee.attributeNameCheck instanceof Function&&Ee.attributeNameCheck(t))||"is"===t&&Ee.allowCustomizedBuiltInElements&&(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,n)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(n))))return!1}else if(He[t]);else if(E(me,v(n,he,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==g(n,"data:")||!Qe[e])if(Te&&!E(fe,v(n,he,"")));else if(n)return!1;return!0},yt=function(e){return"annotation-xml"!==e&&m(e,pe)},bt=function(e){mt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ye};let o=t.length;for(;o--;){const a=t[o],{name:i,namespaceURI:s,value:l}=a,u=et(i);let f="value"===i?l:y(l);if(n.attrName=u,n.attrValue=f,n.keepAttr=!0,n.forceKeepAttr=void 0,mt("uponSanitizeAttribute",e,n),f=n.attrValue,n.forceKeepAttr)continue;if(dt(i,e),!n.keepAttr)continue;if(!ke&&E(/\/>/i,f)){dt(i,e);continue}Oe&&c([se,le,ue],(e=>{f=v(f,e," ")}));const h=et(e.nodeName);if(gt(h,u,f)){if(!Me||"id"!==u&&"name"!==u||(dt(i,e),f="user-content-"+f),Z&&"object"==typeof H&&"function"==typeof H.getAttributeType)if(s);else switch(H.getAttributeType(h,u)){case"TrustedHTML":f=Z.createHTML(f);break;case"TrustedScriptURL":f=Z.createScriptURL(f)}try{s?e.setAttributeNS(s,i,f):e.setAttribute(i,f),d(r.removed)}catch(e){}}}mt("afterSanitizeAttributes",e,null)},Et=function e(t){let n=null;const r=ht(t);for(mt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)mt("uponSanitizeShadowNode",n,null),vt(n)||(n.content instanceof u&&e(n.content),bt(n));mt("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,a=null,s=null;if(Ye=!e,Ye&&(e="\x3c!--\x3e"),"string"!=typeof e&&!pt(e)){if("function"!=typeof e.toString)throw C("toString is not a function");if("string"!=typeof(e=e.toString()))throw C("dirty is not a string, aborting")}if(!r.isSupported)return e;if(Re||ot(t),r.removed=[],"string"==typeof e&&(Ie=!1),Ie){if(e.nodeName){const t=et(e.nodeName);if(!ve[t]||Ce[t])throw C("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof S)n=ft("\x3c!----\x3e"),o=n.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?n=o:n.appendChild(o);else{if(!Ne&&!Oe&&!Ae&&-1===e.indexOf("<"))return Z&&Fe?Z.createHTML(e):e;if(n=ft(e),!n)return Ne?null:Fe?ee:""}n&&xe&&ct(n.firstChild);const l=ht(Ie?e:n);for(;a=l.nextNode();)vt(a)||(a.content instanceof u&&Et(a.content),bt(a));if(Ie)return e;if(Ne){if(Pe)for(s=re.call(n.ownerDocument);n.firstChild;)s.appendChild(n.firstChild);else s=n;return(ye.shadowroot||ye.shadowrootmode)&&(s=ae.call(i,s,!0)),s}let d=Ae?n.outerHTML:n.innerHTML;return Ae&&ve["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&E(W,n.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+d),Oe&&c([se,le,ue],(e=>{d=v(d,e," ")})),Z&&Fe?Z.createHTML(d):d},r.setConfig=function(){ot(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Re=!0},r.clearConfig=function(){tt=null,Re=!1},r.isValidAttribute=function(e,t,n){tt||ot({});const r=et(e),o=et(t);return gt(r,o,n)},r.addHook=function(e,t){"function"==typeof t&&(ie[e]=ie[e]||[],f(ie[e],t))},r.removeHook=function(e){if(ie[e])return d(ie[e])},r.removeHooks=function(e){ie[e]&&(ie[e]=[])},r.removeAllHooks=function(){ie={}},r}()}()},289:(e,t,n)=>{"use strict";n.d(t,{m:()=>i});var r=n(540),o=n(287),a=n(941),i=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!a.S$&&(null==(t=window)?void 0:t.addEventListener)){var n=function(){return e()};return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),function(){window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}},t}(0,r.A)(t,e);var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)},n.setEventListener=function(e){var t,n=this;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((function(e){"boolean"==typeof e?n.setFocused(e):n.onFocus()}))},n.setFocused=function(e){this.focused=e,e&&this.onFocus()},n.onFocus=function(){this.listeners.forEach((function(e){e()}))},n.isFocused=function(){return"boolean"==typeof this.focused?this.focused:"undefined"==typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)},t}(o.Q))},468:(e,t,n)=>{"use strict";n.d(t,{QueryClient:()=>r.E});var r=n(98),o=n(449);n.o(o,"QueryClientProvider")&&n.d(t,{QueryClientProvider:function(){return o.QueryClientProvider}}),n.o(o,"useMutation")&&n.d(t,{useMutation:function(){return o.useMutation}}),n.o(o,"useQuery")&&n.d(t,{useQuery:function(){return o.useQuery}}),n.o(o,"useQueryClient")&&n.d(t,{useQueryClient:function(){return o.useQueryClient}})},690:(e,t,n)=>{"use strict";n.d(t,{B:()=>a,t:()=>o});var r=console;function o(){return r}function a(e){r=e}},465:(e,t,n)=>{"use strict";n.d(t,{$:()=>u,s:()=>l});var r=n(168),o=n(690),a=n(428),i=n(281),s=n(941),l=function(){function e(e){this.options=(0,r.A)({},e.defaultOptions,e.options),this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.observers=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0},this.meta=e.meta}var t=e.prototype;return t.setState=function(e){this.dispatch({type:"setState",state:e})},t.addObserver=function(e){-1===this.observers.indexOf(e)&&this.observers.push(e)},t.removeObserver=function(e){this.observers=this.observers.filter((function(t){return t!==e}))},t.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(s.lQ).catch(s.lQ)):Promise.resolve()},t.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},t.execute=function(){var e,t=this,n="loading"===this.state.status,r=Promise.resolve();return n||(this.dispatch({type:"loading",variables:this.options.variables}),r=r.then((function(){null==t.mutationCache.config.onMutate||t.mutationCache.config.onMutate(t.state.variables,t)})).then((function(){return null==t.options.onMutate?void 0:t.options.onMutate(t.state.variables)})).then((function(e){e!==t.state.context&&t.dispatch({type:"loading",context:e,variables:t.state.variables})}))),r.then((function(){return t.executeMutation()})).then((function(n){e=n,null==t.mutationCache.config.onSuccess||t.mutationCache.config.onSuccess(e,t.state.variables,t.state.context,t)})).then((function(){return null==t.options.onSuccess?void 0:t.options.onSuccess(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(e,null,t.state.variables,t.state.context)})).then((function(){return t.dispatch({type:"success",data:e}),e})).catch((function(e){return null==t.mutationCache.config.onError||t.mutationCache.config.onError(e,t.state.variables,t.state.context,t),(0,o.t)().error(e),Promise.resolve().then((function(){return null==t.options.onError?void 0:t.options.onError(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(void 0,e,t.state.variables,t.state.context)})).then((function(){throw t.dispatch({type:"error",error:e}),e}))}))},t.executeMutation=function(){var e,t=this;return this.retryer=new i.eJ({fn:function(){return t.options.mutationFn?t.options.mutationFn(t.state.variables):Promise.reject("No mutationFn found")},onFail:function(){t.dispatch({type:"failed"})},onPause:function(){t.dispatch({type:"pause"})},onContinue:function(){t.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay}),this.retryer.promise},t.dispatch=function(e){var t=this;this.state=function(e,t){switch(t.type){case"failed":return(0,r.A)({},e,{failureCount:e.failureCount+1});case"pause":return(0,r.A)({},e,{isPaused:!0});case"continue":return(0,r.A)({},e,{isPaused:!1});case"loading":return(0,r.A)({},e,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return(0,r.A)({},e,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return(0,r.A)({},e,{data:void 0,error:t.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return(0,r.A)({},e,t.state);default:return e}}(this.state,e),a.j.batch((function(){t.observers.forEach((function(t){t.onMutationUpdate(e)})),t.mutationCache.notify(t)}))},e}();function u(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}},428:(e,t,n)=>{"use strict";n.d(t,{j:()=>o});var r=n(941),o=new(function(){function e(){this.queue=[],this.transactions=0,this.notifyFn=function(e){e()},this.batchNotifyFn=function(e){e()}}var t=e.prototype;return t.batch=function(e){var t;this.transactions++;try{t=e()}finally{this.transactions--,this.transactions||this.flush()}return t},t.schedule=function(e){var t=this;this.transactions?this.queue.push(e):(0,r.G6)((function(){t.notifyFn(e)}))},t.batchCalls=function(e){var t=this;return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];t.schedule((function(){e.apply(void 0,r)}))}},t.flush=function(){var e=this,t=this.queue;this.queue=[],t.length&&(0,r.G6)((function(){e.batchNotifyFn((function(){t.forEach((function(t){e.notifyFn(t)}))}))}))},t.setNotifyFunction=function(e){this.notifyFn=e},t.setBatchNotifyFunction=function(e){this.batchNotifyFn=e},e}())},622:(e,t,n)=>{"use strict";n.d(t,{t:()=>i});var r=n(540),o=n(287),a=n(941),i=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!a.S$&&(null==(t=window)?void 0:t.addEventListener)){var n=function(){return e()};return window.addEventListener("online",n,!1),window.addEventListener("offline",n,!1),function(){window.removeEventListener("online",n),window.removeEventListener("offline",n)}}},t}(0,r.A)(t,e);var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)},n.setEventListener=function(e){var t,n=this;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((function(e){"boolean"==typeof e?n.setOnline(e):n.onOnline()}))},n.setOnline=function(e){this.online=e,e&&this.onOnline()},n.onOnline=function(){this.listeners.forEach((function(e){e()}))},n.isOnline=function(){return"boolean"==typeof this.online?this.online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine},t}(o.Q))},98:(e,t,n)=>{"use strict";n.d(t,{E:()=>g});var r=n(168),o=n(941),a=n(540),i=n(428),s=n(690),l=n(281),u=function(){function e(e){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=e.meta,this.scheduleGc()}var t=e.prototype;return t.setOptions=function(e){var t;this.options=(0,r.A)({},this.defaultOptions,e),this.meta=null==e?void 0:e.meta,this.cacheTime=Math.max(this.cacheTime||0,null!=(t=this.options.cacheTime)?t:3e5)},t.setDefaultOptions=function(e){this.defaultOptions=e},t.scheduleGc=function(){var e=this;this.clearGcTimeout(),(0,o.gn)(this.cacheTime)&&(this.gcTimeout=setTimeout((function(){e.optionalRemove()}),this.cacheTime))},t.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},t.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},t.setData=function(e,t){var n,r,a=this.state.data,i=(0,o.Zw)(e,a);return(null==(n=(r=this.options).isDataEqual)?void 0:n.call(r,a,i))?i=a:!1!==this.options.structuralSharing&&(i=(0,o.BH)(a,i)),this.dispatch({data:i,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt}),i},t.setState=function(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})},t.cancel=function(e){var t,n=this.promise;return null==(t=this.retryer)||t.cancel(e),n?n.then(o.lQ).catch(o.lQ):Promise.resolve()},t.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},t.reset=function(){this.destroy(),this.setState(this.initialState)},t.isActive=function(){return this.observers.some((function(e){return!1!==e.options.enabled}))},t.isFetching=function(){return this.state.isFetching},t.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some((function(e){return e.getCurrentResult().isStale}))},t.isStaleByTime=function(e){return void 0===e&&(e=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!(0,o.j3)(this.state.dataUpdatedAt,e)},t.onFocus=function(){var e,t=this.observers.find((function(e){return e.shouldFetchOnWindowFocus()}));t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.onOnline=function(){var e,t=this.observers.find((function(e){return e.shouldFetchOnReconnect()}));t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.addObserver=function(e){-1===this.observers.indexOf(e)&&(this.observers.push(e),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))},t.removeObserver=function(e){-1!==this.observers.indexOf(e)&&(this.observers=this.observers.filter((function(t){return t!==e})),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:e}))},t.getObserversCount=function(){return this.observers.length},t.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},t.fetch=function(e,t){var n,r,a,i=this;if(this.state.isFetching)if(this.state.dataUpdatedAt&&(null==t?void 0:t.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var u;return null==(u=this.retryer)||u.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){var c=this.observers.find((function(e){return e.options.queryFn}));c&&this.setOptions(c.options)}var d=(0,o.HN)(this.queryKey),f=(0,o.jY)(),h={queryKey:d,pageParam:void 0,meta:this.meta};Object.defineProperty(h,"signal",{enumerable:!0,get:function(){if(f)return i.abortSignalConsumed=!0,f.signal}});var p,m,v={fetchOptions:t,options:this.options,queryKey:d,state:this.state,fetchFn:function(){return i.options.queryFn?(i.abortSignalConsumed=!1,i.options.queryFn(h)):Promise.reject("Missing queryFn")},meta:this.meta};return(null==(n=this.options.behavior)?void 0:n.onFetch)&&(null==(p=this.options.behavior)||p.onFetch(v)),this.revertState=this.state,this.state.isFetching&&this.state.fetchMeta===(null==(r=v.fetchOptions)?void 0:r.meta)||this.dispatch({type:"fetch",meta:null==(m=v.fetchOptions)?void 0:m.meta}),this.retryer=new l.eJ({fn:v.fetchFn,abort:null==f||null==(a=f.abort)?void 0:a.bind(f),onSuccess:function(e){i.setData(e),null==i.cache.config.onSuccess||i.cache.config.onSuccess(e,i),0===i.cacheTime&&i.optionalRemove()},onError:function(e){(0,l.wm)(e)&&e.silent||i.dispatch({type:"error",error:e}),(0,l.wm)(e)||(null==i.cache.config.onError||i.cache.config.onError(e,i),(0,s.t)().error(e)),0===i.cacheTime&&i.optionalRemove()},onFail:function(){i.dispatch({type:"failed"})},onPause:function(){i.dispatch({type:"pause"})},onContinue:function(){i.dispatch({type:"continue"})},retry:v.options.retry,retryDelay:v.options.retryDelay}),this.promise=this.retryer.promise,this.promise},t.dispatch=function(e){var t=this;this.state=this.reducer(this.state,e),i.j.batch((function(){t.observers.forEach((function(t){t.onQueryUpdate(e)})),t.cache.notify({query:t,type:"queryUpdated",action:e})}))},t.getDefaultState=function(e){var t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==e.initialData?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0,r=void 0!==t;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?null!=n?n:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:r?"success":"idle"}},t.reducer=function(e,t){var n,o;switch(t.type){case"failed":return(0,r.A)({},e,{fetchFailureCount:e.fetchFailureCount+1});case"pause":return(0,r.A)({},e,{isPaused:!0});case"continue":return(0,r.A)({},e,{isPaused:!1});case"fetch":return(0,r.A)({},e,{fetchFailureCount:0,fetchMeta:null!=(n=t.meta)?n:null,isFetching:!0,isPaused:!1},!e.dataUpdatedAt&&{error:null,status:"loading"});case"success":return(0,r.A)({},e,{data:t.data,dataUpdateCount:e.dataUpdateCount+1,dataUpdatedAt:null!=(o=t.dataUpdatedAt)?o:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var a=t.error;return(0,l.wm)(a)&&a.revert&&this.revertState?(0,r.A)({},this.revertState):(0,r.A)({},e,{error:a,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return(0,r.A)({},e,{isInvalidated:!0});case"setState":return(0,r.A)({},e,t.state);default:return e}},e}(),c=n(287),d=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.queries=[],n.queriesMap={},n}(0,a.A)(t,e);var n=t.prototype;return n.build=function(e,t,n){var r,a=t.queryKey,i=null!=(r=t.queryHash)?r:(0,o.F$)(a,t),s=this.get(i);return s||(s=new u({cache:this,queryKey:a,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(a),meta:t.meta}),this.add(s)),s},n.add=function(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"queryAdded",query:e}))},n.remove=function(e){var t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter((function(t){return t!==e})),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"queryRemoved",query:e}))},n.clear=function(){var e=this;i.j.batch((function(){e.queries.forEach((function(t){e.remove(t)}))}))},n.get=function(e){return this.queriesMap[e]},n.getAll=function(){return this.queries},n.find=function(e,t){var n=(0,o.b_)(e,t)[0];return void 0===n.exact&&(n.exact=!0),this.queries.find((function(e){return(0,o.MK)(n,e)}))},n.findAll=function(e,t){var n=(0,o.b_)(e,t)[0];return Object.keys(n).length>0?this.queries.filter((function(e){return(0,o.MK)(n,e)})):this.queries},n.notify=function(e){var t=this;i.j.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},n.onFocus=function(){var e=this;i.j.batch((function(){e.queries.forEach((function(e){e.onFocus()}))}))},n.onOnline=function(){var e=this;i.j.batch((function(){e.queries.forEach((function(e){e.onOnline()}))}))},t}(c.Q),f=n(465),h=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.mutations=[],n.mutationId=0,n}(0,a.A)(t,e);var n=t.prototype;return n.build=function(e,t,n){var r=new f.s({mutationCache:this,mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:n,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0,meta:t.meta});return this.add(r),r},n.add=function(e){this.mutations.push(e),this.notify(e)},n.remove=function(e){this.mutations=this.mutations.filter((function(t){return t!==e})),e.cancel(),this.notify(e)},n.clear=function(){var e=this;i.j.batch((function(){e.mutations.forEach((function(t){e.remove(t)}))}))},n.getAll=function(){return this.mutations},n.find=function(e){return void 0===e.exact&&(e.exact=!0),this.mutations.find((function(t){return(0,o.nJ)(e,t)}))},n.findAll=function(e){return this.mutations.filter((function(t){return(0,o.nJ)(e,t)}))},n.notify=function(e){var t=this;i.j.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},n.onFocus=function(){this.resumePausedMutations()},n.onOnline=function(){this.resumePausedMutations()},n.resumePausedMutations=function(){var e=this.mutations.filter((function(e){return e.state.isPaused}));return i.j.batch((function(){return e.reduce((function(e,t){return e.then((function(){return t.continue().catch(o.lQ)}))}),Promise.resolve())}))},t}(c.Q),p=n(289),m=n(622);function v(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}var g=function(){function e(e){void 0===e&&(e={}),this.queryCache=e.queryCache||new d,this.mutationCache=e.mutationCache||new h,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var t=e.prototype;return t.mount=function(){var e=this;this.unsubscribeFocus=p.m.subscribe((function(){p.m.isFocused()&&m.t.isOnline()&&(e.mutationCache.onFocus(),e.queryCache.onFocus())})),this.unsubscribeOnline=m.t.subscribe((function(){p.m.isFocused()&&m.t.isOnline()&&(e.mutationCache.onOnline(),e.queryCache.onOnline())}))},t.unmount=function(){var e,t;null==(e=this.unsubscribeFocus)||e.call(this),null==(t=this.unsubscribeOnline)||t.call(this)},t.isFetching=function(e,t){var n=(0,o.b_)(e,t)[0];return n.fetching=!0,this.queryCache.findAll(n).length},t.isMutating=function(e){return this.mutationCache.findAll((0,r.A)({},e,{fetching:!0})).length},t.getQueryData=function(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state.data},t.getQueriesData=function(e){return this.getQueryCache().findAll(e).map((function(e){return[e.queryKey,e.state.data]}))},t.setQueryData=function(e,t,n){var r=(0,o.vh)(e),a=this.defaultQueryOptions(r);return this.queryCache.build(this,a).setData(t,n)},t.setQueriesData=function(e,t,n){var r=this;return i.j.batch((function(){return r.getQueryCache().findAll(e).map((function(e){var o=e.queryKey;return[o,r.setQueryData(o,t,n)]}))}))},t.getQueryState=function(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state},t.removeQueries=function(e,t){var n=(0,o.b_)(e,t)[0],r=this.queryCache;i.j.batch((function(){r.findAll(n).forEach((function(e){r.remove(e)}))}))},t.resetQueries=function(e,t,n){var a=this,s=(0,o.b_)(e,t,n),l=s[0],u=s[1],c=this.queryCache,d=(0,r.A)({},l,{active:!0});return i.j.batch((function(){return c.findAll(l).forEach((function(e){e.reset()})),a.refetchQueries(d,u)}))},t.cancelQueries=function(e,t,n){var r=this,a=(0,o.b_)(e,t,n),s=a[0],l=a[1],u=void 0===l?{}:l;void 0===u.revert&&(u.revert=!0);var c=i.j.batch((function(){return r.queryCache.findAll(s).map((function(e){return e.cancel(u)}))}));return Promise.all(c).then(o.lQ).catch(o.lQ)},t.invalidateQueries=function(e,t,n){var a,s,l,u=this,c=(0,o.b_)(e,t,n),d=c[0],f=c[1],h=(0,r.A)({},d,{active:null==(a=null!=(s=d.refetchActive)?s:d.active)||a,inactive:null!=(l=d.refetchInactive)&&l});return i.j.batch((function(){return u.queryCache.findAll(d).forEach((function(e){e.invalidate()})),u.refetchQueries(h,f)}))},t.refetchQueries=function(e,t,n){var a=this,s=(0,o.b_)(e,t,n),l=s[0],u=s[1],c=i.j.batch((function(){return a.queryCache.findAll(l).map((function(e){return e.fetch(void 0,(0,r.A)({},u,{meta:{refetchPage:null==l?void 0:l.refetchPage}}))}))})),d=Promise.all(c).then(o.lQ);return(null==u?void 0:u.throwOnError)||(d=d.catch(o.lQ)),d},t.fetchQuery=function(e,t,n){var r=(0,o.vh)(e,t,n),a=this.defaultQueryOptions(r);void 0===a.retry&&(a.retry=!1);var i=this.queryCache.build(this,a);return i.isStaleByTime(a.staleTime)?i.fetch(a):Promise.resolve(i.state.data)},t.prefetchQuery=function(e,t,n){return this.fetchQuery(e,t,n).then(o.lQ).catch(o.lQ)},t.fetchInfiniteQuery=function(e,t,n){var r=(0,o.vh)(e,t,n);return r.behavior={onFetch:function(e){e.fetchFn=function(){var t,n,r,a,i,s,u,c,d,f=null==(t=e.fetchOptions)||null==(n=t.meta)?void 0:n.refetchPage,h=null==(r=e.fetchOptions)||null==(a=r.meta)?void 0:a.fetchMore,p=null==h?void 0:h.pageParam,m="forward"===(null==h?void 0:h.direction),g="backward"===(null==h?void 0:h.direction),y=(null==(i=e.state.data)?void 0:i.pages)||[],b=(null==(s=e.state.data)?void 0:s.pageParams)||[],E=(0,o.jY)(),C=null==E?void 0:E.signal,_=b,S=!1,w=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},T=function(e,t,n,r){return _=r?[t].concat(_):[].concat(_,[t]),r?[n].concat(e):[].concat(e,[n])},k=function(t,n,r,o){if(S)return Promise.reject("Cancelled");if(void 0===r&&!n&&t.length)return Promise.resolve(t);var a={queryKey:e.queryKey,signal:C,pageParam:r,meta:e.meta},i=w(a),s=Promise.resolve(i).then((function(e){return T(t,r,e,o)}));return(0,l.dd)(i)&&(s.cancel=i.cancel),s};if(y.length)if(m){var O=void 0!==p,A=O?p:v(e.options,y);u=k(y,O,A)}else if(g){var R=void 0!==p,x=R?p:(c=e.options,d=y,null==c.getPreviousPageParam?void 0:c.getPreviousPageParam(d[0],d));u=k(y,R,x,!0)}else!function(){_=[];var t=void 0===e.options.getNextPageParam,n=!f||!y[0]||f(y[0],0,y);u=n?k([],t,b[0]):Promise.resolve(T([],b[0],y[0]));for(var r=function(n){u=u.then((function(r){if(!f||!y[n]||f(y[n],n,y)){var o=t?b[n]:v(e.options,r);return k(r,t,o)}return Promise.resolve(T(r,b[n],y[n]))}))},o=1;o<y.length;o++)r(o)}();else u=k([]);var N=u.then((function(e){return{pages:e,pageParams:_}}));return N.cancel=function(){S=!0,null==E||E.abort(),(0,l.dd)(u)&&u.cancel()},N}}},this.fetchQuery(r)},t.prefetchInfiniteQuery=function(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(o.lQ).catch(o.lQ)},t.cancelMutations=function(){var e=this,t=i.j.batch((function(){return e.mutationCache.getAll().map((function(e){return e.cancel()}))}));return Promise.all(t).then(o.lQ).catch(o.lQ)},t.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},t.executeMutation=function(e){return this.mutationCache.build(this,e).execute()},t.getQueryCache=function(){return this.queryCache},t.getMutationCache=function(){return this.mutationCache},t.getDefaultOptions=function(){return this.defaultOptions},t.setDefaultOptions=function(e){this.defaultOptions=e},t.setQueryDefaults=function(e,t){var n=this.queryDefaults.find((function(t){return(0,o.Od)(e)===(0,o.Od)(t.queryKey)}));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})},t.getQueryDefaults=function(e){var t;return e?null==(t=this.queryDefaults.find((function(t){return(0,o.Cp)(e,t.queryKey)})))?void 0:t.defaultOptions:void 0},t.setMutationDefaults=function(e,t){var n=this.mutationDefaults.find((function(t){return(0,o.Od)(e)===(0,o.Od)(t.mutationKey)}));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})},t.getMutationDefaults=function(e){var t;return e?null==(t=this.mutationDefaults.find((function(t){return(0,o.Cp)(e,t.mutationKey)})))?void 0:t.defaultOptions:void 0},t.defaultQueryOptions=function(e){if(null==e?void 0:e._defaulted)return e;var t=(0,r.A)({},this.defaultOptions.queries,this.getQueryDefaults(null==e?void 0:e.queryKey),e,{_defaulted:!0});return!t.queryHash&&t.queryKey&&(t.queryHash=(0,o.F$)(t.queryKey,t)),t},t.defaultQueryObserverOptions=function(e){return this.defaultQueryOptions(e)},t.defaultMutationOptions=function(e){return(null==e?void 0:e._defaulted)?e:(0,r.A)({},this.defaultOptions.mutations,this.getMutationDefaults(null==e?void 0:e.mutationKey),e,{_defaulted:!0})},t.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},e}()},281:(e,t,n)=>{"use strict";n.d(t,{dd:()=>s,eJ:()=>c,wm:()=>u});var r=n(289),o=n(622),a=n(941);function i(e){return Math.min(1e3*Math.pow(2,e),3e4)}function s(e){return"function"==typeof(null==e?void 0:e.cancel)}var l=function(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent};function u(e){return e instanceof l}var c=function(e){var t,n,u,c,d=this,f=!1;this.abort=e.abort,this.cancel=function(e){return null==t?void 0:t(e)},this.cancelRetry=function(){f=!0},this.continueRetry=function(){f=!1},this.continue=function(){return null==n?void 0:n()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise((function(e,t){u=e,c=t}));var h=function(t){d.isResolved||(d.isResolved=!0,null==e.onSuccess||e.onSuccess(t),null==n||n(),u(t))},p=function(t){d.isResolved||(d.isResolved=!0,null==e.onError||e.onError(t),null==n||n(),c(t))};!function u(){if(!d.isResolved){var c;try{c=e.fn()}catch(e){c=Promise.reject(e)}t=function(e){if(!d.isResolved&&(p(new l(e)),null==d.abort||d.abort(),s(c)))try{c.cancel()}catch(e){}},d.isTransportCancelable=s(c),Promise.resolve(c).then(h).catch((function(t){var s,l;if(!d.isResolved){var c=null!=(s=e.retry)?s:3,h=null!=(l=e.retryDelay)?l:i,m="function"==typeof h?h(d.failureCount,t):h,v=!0===c||"number"==typeof c&&d.failureCount<c||"function"==typeof c&&c(d.failureCount,t);!f&&v?(d.failureCount++,null==e.onFail||e.onFail(d.failureCount,t),(0,a.yy)(m).then((function(){if(!r.m.isFocused()||!o.t.isOnline())return new Promise((function(t){n=t,d.isPaused=!0,null==e.onPause||e.onPause()})).then((function(){n=void 0,d.isPaused=!1,null==e.onContinue||e.onContinue()}))})).then((function(){f?p(t):u()}))):p(t)}}))}}()}},287:(e,t,n)=>{"use strict";n.d(t,{Q:()=>r});var r=function(){function e(){this.listeners=[]}var t=e.prototype;return t.subscribe=function(e){var t=this,n=e||function(){};return this.listeners.push(n),this.onSubscribe(),function(){t.listeners=t.listeners.filter((function(e){return e!==n})),t.onUnsubscribe()}},t.hasListeners=function(){return this.listeners.length>0},t.onSubscribe=function(){},t.onUnsubscribe=function(){},e}()},449:()=>{},941:(e,t,n)=>{"use strict";n.d(t,{BH:()=>b,Cp:()=>g,F$:()=>m,G6:()=>T,GR:()=>d,HN:()=>l,MK:()=>h,Od:()=>v,S$:()=>o,Zw:()=>i,b_:()=>f,f8:()=>E,gn:()=>s,j3:()=>u,jY:()=>k,lQ:()=>a,nJ:()=>p,vh:()=>c,yy:()=>w});var r=n(168),o="undefined"==typeof window;function a(){}function i(e,t){return"function"==typeof e?e(t):e}function s(e){return"number"==typeof e&&e>=0&&e!==1/0}function l(e){return Array.isArray(e)?e:[e]}function u(e,t){return Math.max(e+(t||0)-Date.now(),0)}function c(e,t,n){return S(e)?"function"==typeof t?(0,r.A)({},n,{queryKey:e,queryFn:t}):(0,r.A)({},t,{queryKey:e}):e}function d(e,t,n){return S(e)?"function"==typeof t?(0,r.A)({},n,{mutationKey:e,mutationFn:t}):(0,r.A)({},t,{mutationKey:e}):"function"==typeof e?(0,r.A)({},t,{mutationFn:e}):(0,r.A)({},e)}function f(e,t,n){return S(e)?[(0,r.A)({},t,{queryKey:e}),n]:[e||{},t]}function h(e,t){var n=e.active,r=e.exact,o=e.fetching,a=e.inactive,i=e.predicate,s=e.queryKey,l=e.stale;if(S(s))if(r){if(t.queryHash!==m(s,t.options))return!1}else if(!g(t.queryKey,s))return!1;var u=function(e,t){return!0===e&&!0===t||null==e&&null==t?"all":!1===e&&!1===t?"none":(null!=e?e:!t)?"active":"inactive"}(n,a);if("none"===u)return!1;if("all"!==u){var c=t.isActive();if("active"===u&&!c)return!1;if("inactive"===u&&c)return!1}return!("boolean"==typeof l&&t.isStale()!==l||"boolean"==typeof o&&t.isFetching()!==o||i&&!i(t))}function p(e,t){var n=e.exact,r=e.fetching,o=e.predicate,a=e.mutationKey;if(S(a)){if(!t.options.mutationKey)return!1;if(n){if(v(t.options.mutationKey)!==v(a))return!1}else if(!g(t.options.mutationKey,a))return!1}return!("boolean"==typeof r&&"loading"===t.state.status!==r||o&&!o(t))}function m(e,t){return((null==t?void 0:t.queryKeyHashFn)||v)(e)}function v(e){return function(e){return JSON.stringify(e,(function(e,t){return C(t)?Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{}):t}))}(l(e))}function g(e,t){return y(l(e),l(t))}function y(e,t){return e===t||typeof e==typeof t&&!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((function(n){return!y(e[n],t[n])}))}function b(e,t){if(e===t)return e;var n=Array.isArray(e)&&Array.isArray(t);if(n||C(e)&&C(t)){for(var r=n?e.length:Object.keys(e).length,o=n?t:Object.keys(t),a=o.length,i=n?[]:{},s=0,l=0;l<a;l++){var u=n?l:o[l];i[u]=b(e[u],t[u]),i[u]===e[u]&&s++}return r===a&&s===r?e:i}return t}function E(e,t){if(e&&!t||t&&!e)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}function C(e){if(!_(e))return!1;var t=e.constructor;if(void 0===t)return!0;var n=t.prototype;return!!_(n)&&!!n.hasOwnProperty("isPrototypeOf")}function _(e){return"[object Object]"===Object.prototype.toString.call(e)}function S(e){return"string"==typeof e||Array.isArray(e)}function w(e){return new Promise((function(t){setTimeout(t,e)}))}function T(e){Promise.resolve().then(e).catch((function(e){return setTimeout((function(){throw e}))}))}function k(){if("function"==typeof AbortController)return new AbortController}},942:(e,t,n)=>{"use strict";n.d(t,{QueryClient:()=>r.QueryClient,QueryClientProvider:()=>o.QueryClientProvider,useMutation:()=>o.useMutation,useQuery:()=>o.useQuery,useQueryClient:()=>o.useQueryClient});var r=n(468);n.o(r,"QueryClientProvider")&&n.d(t,{QueryClientProvider:function(){return r.QueryClientProvider}}),n.o(r,"useMutation")&&n.d(t,{useMutation:function(){return r.useMutation}}),n.o(r,"useQuery")&&n.d(t,{useQuery:function(){return r.useQuery}}),n.o(r,"useQueryClient")&&n.d(t,{useQueryClient:function(){return r.useQueryClient}});var o=n(960)},360:(e,t,n)=>{"use strict";n.d(t,{H:()=>u,j:()=>l});var r=n(609),o=n.n(r),a=o().createContext(void 0),i=o().createContext(!1);function s(e){return e&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=a),window.ReactQueryClientContext):a}var l=function(){var e=o().useContext(s(o().useContext(i)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},u=function(e){var t=e.client,n=e.contextSharing,r=void 0!==n&&n,a=e.children;o().useEffect((function(){return t.mount(),function(){t.unmount()}}),[t]);var l=s(r);return o().createElement(i.Provider,{value:r},o().createElement(l.Provider,{value:t},a))}},960:(e,t,n)=>{"use strict";n.d(t,{QueryClientProvider:()=>l.H,useMutation:()=>u.n,useQuery:()=>c.I,useQueryClient:()=>l.j});var r=n(428),o=n(795),a=n.n(o)().unstable_batchedUpdates;r.j.setBatchNotifyFunction(a);var i=n(690),s=console;(0,i.B)(s);var l=n(360),u=n(990),c=n(584)},990:(e,t,n)=>{"use strict";n.d(t,{n:()=>h});var r=n(168),o=n(609),a=n.n(o),i=n(428),s=n(941),l=n(540),u=n(465),c=function(e){function t(t,n){var r;return(r=e.call(this)||this).client=t,r.setOptions(n),r.bindMethods(),r.updateResult(),r}(0,l.A)(t,e);var n=t.prototype;return n.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},n.setOptions=function(e){this.options=this.client.defaultMutationOptions(e)},n.onUnsubscribe=function(){var e;this.listeners.length||null==(e=this.currentMutation)||e.removeObserver(this)},n.onMutationUpdate=function(e){this.updateResult();var t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)},n.getCurrentResult=function(){return this.currentResult},n.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},n.mutate=function(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,(0,r.A)({},this.options,{variables:void 0!==e?e:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},n.updateResult=function(){var e=this.currentMutation?this.currentMutation.state:(0,u.$)(),t=(0,r.A)({},e,{isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset});this.currentResult=t},n.notify=function(e){var t=this;i.j.batch((function(){t.mutateOptions&&(e.onSuccess?(null==t.mutateOptions.onSuccess||t.mutateOptions.onSuccess(t.currentResult.data,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(t.currentResult.data,null,t.currentResult.variables,t.currentResult.context)):e.onError&&(null==t.mutateOptions.onError||t.mutateOptions.onError(t.currentResult.error,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(void 0,t.currentResult.error,t.currentResult.variables,t.currentResult.context))),e.listeners&&t.listeners.forEach((function(e){e(t.currentResult)}))}))},t}(n(287).Q),d=n(360),f=n(439);function h(e,t,n){var o=a().useRef(!1),l=a().useState(0)[1],u=(0,s.GR)(e,t,n),h=(0,d.j)(),p=a().useRef();p.current?p.current.setOptions(u):p.current=new c(h,u);var m=p.current.getCurrentResult();a().useEffect((function(){o.current=!0;var e=p.current.subscribe(i.j.batchCalls((function(){o.current&&l((function(e){return e+1}))})));return function(){o.current=!1,e()}}),[]);var v=a().useCallback((function(e,t){p.current.mutate(e,t).catch(s.lQ)}),[]);if(m.error&&(0,f.G)(void 0,p.current.options.useErrorBoundary,[m.error]))throw m.error;return(0,r.A)({},m,{mutate:v,mutateAsync:m.mutate})}},584:(e,t,n)=>{"use strict";n.d(t,{I:()=>S});var r=n(168),o=n(540),a=n(941),i=n(428),s=n(289),l=n(287),u=n(690),c=n(281),d=function(e){function t(t,n){var r;return(r=e.call(this)||this).client=t,r.options=n,r.trackedProps=[],r.selectError=null,r.bindMethods(),r.setOptions(n),r}(0,o.A)(t,e);var n=t.prototype;return n.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},n.onSubscribe=function(){1===this.listeners.length&&(this.currentQuery.addObserver(this),f(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},n.onUnsubscribe=function(){this.listeners.length||this.destroy()},n.shouldFetchOnReconnect=function(){return h(this.currentQuery,this.options,this.options.refetchOnReconnect)},n.shouldFetchOnWindowFocus=function(){return h(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},n.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},n.setOptions=function(e,t){var n=this.options,r=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled)throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();var o=this.hasListeners();o&&p(this.currentQuery,r,this.options,n)&&this.executeFetch(),this.updateResult(t),!o||this.currentQuery===r&&this.options.enabled===n.enabled&&this.options.staleTime===n.staleTime||this.updateStaleTimeout();var a=this.computeRefetchInterval();!o||this.currentQuery===r&&this.options.enabled===n.enabled&&a===this.currentRefetchInterval||this.updateRefetchInterval(a)},n.getOptimisticResult=function(e){var t=this.client.defaultQueryObserverOptions(e),n=this.client.getQueryCache().build(this.client,t);return this.createResult(n,t)},n.getCurrentResult=function(){return this.currentResult},n.trackResult=function(e,t){var n=this,r={},o=function(e){n.trackedProps.includes(e)||n.trackedProps.push(e)};return Object.keys(e).forEach((function(t){Object.defineProperty(r,t,{configurable:!1,enumerable:!0,get:function(){return o(t),e[t]}})})),(t.useErrorBoundary||t.suspense)&&o("error"),r},n.getNextResult=function(e){var t=this;return new Promise((function(n,r){var o=t.subscribe((function(t){t.isFetching||(o(),t.isError&&(null==e?void 0:e.throwOnError)?r(t.error):n(t))}))}))},n.getCurrentQuery=function(){return this.currentQuery},n.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},n.refetch=function(e){return this.fetch((0,r.A)({},e,{meta:{refetchPage:null==e?void 0:e.refetchPage}}))},n.fetchOptimistic=function(e){var t=this,n=this.client.defaultQueryObserverOptions(e),r=this.client.getQueryCache().build(this.client,n);return r.fetch().then((function(){return t.createResult(r,n)}))},n.fetch=function(e){var t=this;return this.executeFetch(e).then((function(){return t.updateResult(),t.currentResult}))},n.executeFetch=function(e){this.updateQuery();var t=this.currentQuery.fetch(this.options,e);return(null==e?void 0:e.throwOnError)||(t=t.catch(a.lQ)),t},n.updateStaleTimeout=function(){var e=this;if(this.clearStaleTimeout(),!a.S$&&!this.currentResult.isStale&&(0,a.gn)(this.options.staleTime)){var t=(0,a.j3)(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout((function(){e.currentResult.isStale||e.updateResult()}),t)}},n.computeRefetchInterval=function(){var e;return"function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(e=this.options.refetchInterval)&&e},n.updateRefetchInterval=function(e){var t=this;this.clearRefetchInterval(),this.currentRefetchInterval=e,!a.S$&&!1!==this.options.enabled&&(0,a.gn)(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval((function(){(t.options.refetchIntervalInBackground||s.m.isFocused())&&t.executeFetch()}),this.currentRefetchInterval))},n.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},n.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},n.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},n.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},n.createResult=function(e,t){var n,r=this.currentQuery,o=this.options,i=this.currentResult,s=this.currentResultState,l=this.currentResultOptions,c=e!==r,d=c?e.state:this.currentQueryInitialState,h=c?this.currentResult:this.previousQueryResult,v=e.state,g=v.dataUpdatedAt,y=v.error,b=v.errorUpdatedAt,E=v.isFetching,C=v.status,_=!1,S=!1;if(t.optimisticResults){var w=this.hasListeners(),T=!w&&f(e,t),k=w&&p(e,r,t,o);(T||k)&&(E=!0,g||(C="loading"))}if(t.keepPreviousData&&!v.dataUpdateCount&&(null==h?void 0:h.isSuccess)&&"error"!==C)n=h.data,g=h.dataUpdatedAt,C=h.status,_=!0;else if(t.select&&void 0!==v.data)if(i&&v.data===(null==s?void 0:s.data)&&t.select===this.selectFn)n=this.selectResult;else try{this.selectFn=t.select,n=t.select(v.data),!1!==t.structuralSharing&&(n=(0,a.BH)(null==i?void 0:i.data,n)),this.selectResult=n,this.selectError=null}catch(e){(0,u.t)().error(e),this.selectError=e}else n=v.data;if(void 0!==t.placeholderData&&void 0===n&&("loading"===C||"idle"===C)){var O;if((null==i?void 0:i.isPlaceholderData)&&t.placeholderData===(null==l?void 0:l.placeholderData))O=i.data;else if(O="function"==typeof t.placeholderData?t.placeholderData():t.placeholderData,t.select&&void 0!==O)try{O=t.select(O),!1!==t.structuralSharing&&(O=(0,a.BH)(null==i?void 0:i.data,O)),this.selectError=null}catch(e){(0,u.t)().error(e),this.selectError=e}void 0!==O&&(C="success",n=O,S=!0)}return this.selectError&&(y=this.selectError,n=this.selectResult,b=Date.now(),C="error"),{status:C,isLoading:"loading"===C,isSuccess:"success"===C,isError:"error"===C,isIdle:"idle"===C,data:n,dataUpdatedAt:g,error:y,errorUpdatedAt:b,failureCount:v.fetchFailureCount,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>d.dataUpdateCount||v.errorUpdateCount>d.errorUpdateCount,isFetching:E,isRefetching:E&&"loading"!==C,isLoadingError:"error"===C&&0===v.dataUpdatedAt,isPlaceholderData:S,isPreviousData:_,isRefetchError:"error"===C&&0!==v.dataUpdatedAt,isStale:m(e,t),refetch:this.refetch,remove:this.remove}},n.shouldNotifyListeners=function(e,t){if(!t)return!0;var n=this.options,r=n.notifyOnChangeProps,o=n.notifyOnChangePropsExclusions;if(!r&&!o)return!0;if("tracked"===r&&!this.trackedProps.length)return!0;var a="tracked"===r?this.trackedProps:r;return Object.keys(e).some((function(n){var r=n,i=e[r]!==t[r],s=null==a?void 0:a.some((function(e){return e===n})),l=null==o?void 0:o.some((function(e){return e===n}));return i&&!l&&(!a||s)}))},n.updateResult=function(e){var t=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!(0,a.f8)(this.currentResult,t)){var n={cache:!0};!1!==(null==e?void 0:e.listeners)&&this.shouldNotifyListeners(this.currentResult,t)&&(n.listeners=!0),this.notify((0,r.A)({},n,e))}},n.updateQuery=function(){var e=this.client.getQueryCache().build(this.client,this.options);if(e!==this.currentQuery){var t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}},n.onQueryUpdate=function(e){var t={};"success"===e.type?t.onSuccess=!0:"error"!==e.type||(0,c.wm)(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()},n.notify=function(e){var t=this;i.j.batch((function(){e.onSuccess?(null==t.options.onSuccess||t.options.onSuccess(t.currentResult.data),null==t.options.onSettled||t.options.onSettled(t.currentResult.data,null)):e.onError&&(null==t.options.onError||t.options.onError(t.currentResult.error),null==t.options.onSettled||t.options.onSettled(void 0,t.currentResult.error)),e.listeners&&t.listeners.forEach((function(e){e(t.currentResult)})),e.cache&&t.client.getQueryCache().notify({query:t.currentQuery,type:"observerResultsUpdated"})}))},t}(l.Q);function f(e,t){return function(e,t){return!(!1===t.enabled||e.state.dataUpdatedAt||"error"===e.state.status&&!1===t.retryOnMount)}(e,t)||e.state.dataUpdatedAt>0&&h(e,t,t.refetchOnMount)}function h(e,t,n){if(!1!==t.enabled){var r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&m(e,t)}return!1}function p(e,t,n,r){return!1!==n.enabled&&(e!==t||!1===r.enabled)&&(!n.suspense||"error"!==e.state.status)&&m(e,n)}function m(e,t){return e.isStaleByTime(t.staleTime)}var v=n(609),g=n.n(v);var y,b=g().createContext((y=!1,{clearReset:function(){y=!1},reset:function(){y=!0},isReset:function(){return y}})),E=function(){return g().useContext(b)},C=n(360),_=n(439);function S(e,t,n){return function(e,t){var n=g().useRef(!1),r=g().useState(0)[1],o=(0,C.j)(),a=E(),s=o.defaultQueryObserverOptions(e);s.optimisticResults=!0,s.onError&&(s.onError=i.j.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=i.j.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=i.j.batchCalls(s.onSettled)),s.suspense&&("number"!=typeof s.staleTime&&(s.staleTime=1e3),0===s.cacheTime&&(s.cacheTime=1)),(s.suspense||s.useErrorBoundary)&&(a.isReset()||(s.retryOnMount=!1));var l=g().useState((function(){return new t(o,s)}))[0],u=l.getOptimisticResult(s);if(g().useEffect((function(){n.current=!0,a.clearReset();var e=l.subscribe(i.j.batchCalls((function(){n.current&&r((function(e){return e+1}))})));return l.updateResult(),function(){n.current=!1,e()}}),[a,l]),g().useEffect((function(){l.setOptions(s,{listeners:!1})}),[s,l]),s.suspense&&u.isLoading)throw l.fetchOptimistic(s).then((function(e){var t=e.data;null==s.onSuccess||s.onSuccess(t),null==s.onSettled||s.onSettled(t,null)})).catch((function(e){a.clearReset(),null==s.onError||s.onError(e),null==s.onSettled||s.onSettled(void 0,e)}));if(u.isError&&!a.isReset()&&!u.isFetching&&(0,_.G)(s.suspense,s.useErrorBoundary,[u.error,l.getCurrentQuery()]))throw u.error;return"tracked"===s.notifyOnChangeProps&&(u=l.trackResult(u,s)),u}((0,a.vh)(e,t,n),d)}},439:(e,t,n)=>{"use strict";function r(e,t,n){return"function"==typeof t?t.apply(void 0,n):"boolean"==typeof t?t:!!e}n.d(t,{G:()=>r})},609:e=>{"use strict";e.exports=window.React},795:e=>{"use strict";e.exports=window.ReactDOM},168:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{A:()=>r})},540:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,{A:()=>o})}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.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.r(e),n.d(e,{hasBrowserEnv:()=>se,hasStandardBrowserEnv:()=>le,hasStandardBrowserWebWorkerEnv:()=>ce});var t=n(609),r=n.n(t),o=n(795),a=n.n(o),i=n(942);const s=window.wp.components;function l(e,t){return function(){return e.apply(t,arguments)}}const{toString:u}=Object.prototype,{getPrototypeOf:c}=Object,d=(f=Object.create(null),e=>{const t=u.call(e);return f[t]||(f[t]=t.slice(8,-1).toLowerCase())});var f;const h=e=>(e=e.toLowerCase(),t=>d(t)===e),p=e=>t=>typeof t===e,{isArray:m}=Array,v=p("undefined"),g=h("ArrayBuffer"),y=p("string"),b=p("function"),E=p("number"),C=e=>null!==e&&"object"==typeof e,_=e=>{if("object"!==d(e))return!1;const t=c(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},S=h("Date"),w=h("File"),T=h("Blob"),k=h("FileList"),O=h("URLSearchParams");function A(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),m(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let i;for(r=0;r<a;r++)i=o[r],t.call(null,e[i],i,e)}}function R(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const x="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,N=e=>!v(e)&&e!==x,P=(F="undefined"!=typeof Uint8Array&&c(Uint8Array),e=>F&&e instanceof F);var F;const D=h("HTMLFormElement"),M=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),L=h("RegExp"),I=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};A(n,((n,o)=>{let a;!1!==(a=t(n,o,e))&&(r[o]=a||n)})),Object.defineProperties(e,r)},U="abcdefghijklmnopqrstuvwxyz",j="0123456789",q={DIGIT:j,ALPHA:U,ALPHA_DIGIT:U+U.toUpperCase()+j},Q=h("AsyncFunction"),B={isArray:m,isArrayBuffer:g,isBuffer:function(e){return null!==e&&!v(e)&&null!==e.constructor&&!v(e.constructor)&&b(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||b(e.append)&&("formdata"===(t=d(e))||"object"===t&&b(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&g(e.buffer),t},isString:y,isNumber:E,isBoolean:e=>!0===e||!1===e,isObject:C,isPlainObject:_,isUndefined:v,isDate:S,isFile:w,isBlob:T,isRegExp:L,isFunction:b,isStream:e=>C(e)&&b(e.pipe),isURLSearchParams:O,isTypedArray:P,isFileList:k,forEach:A,merge:function e(){const{caseless:t}=N(this)&&this||{},n={},r=(r,o)=>{const a=t&&R(n,o)||o;_(n[a])&&_(r)?n[a]=e(n[a],r):_(r)?n[a]=e({},r):m(r)?n[a]=r.slice():n[a]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&A(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(A(t,((t,r)=>{n&&b(t)?e[r]=l(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,a,i;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)i=o[a],r&&!r(i,e,t)||s[i]||(t[i]=e[i],s[i]=!0);e=!1!==n&&c(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:d,kindOfTest:h,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(m(e))return e;let t=e.length;if(!E(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:D,hasOwnProperty:M,hasOwnProp:M,reduceDescriptors:I,freezeMethods:e=>{I(e,((t,n)=>{if(b(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];b(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return m(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:R,global:x,isContextDefined:N,ALPHABET:q,generateString:(e=16,t=q.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&b(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(C(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=m(e)?[]:{};return A(e,((e,t)=>{const a=n(e,r+1);!v(a)&&(o[t]=a)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:Q,isThenable:e=>e&&(C(e)||b(e))&&b(e.then)&&b(e.catch)};function H(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}B.inherits(H,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:B.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const z=H.prototype,K={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{K[e]={value:e}})),Object.defineProperties(H,K),Object.defineProperty(z,"isAxiosError",{value:!0}),H.from=(e,t,n,r,o,a)=>{const i=Object.create(z);return B.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),H.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,a&&Object.assign(i,a),i};const G=H;function W(e){return B.isPlainObject(e)||B.isArray(e)}function V(e){return B.endsWith(e,"[]")?e.slice(0,-2):e}function Y(e,t,n){return e?e.concat(t).map((function(e,t){return e=V(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const J=B.toFlatObject(B,{},null,(function(e){return/^is[A-Z]/.test(e)})),$=function(e,t,n){if(!B.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=B.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!B.isUndefined(t[e])}))).metaTokens,o=n.visitor||u,a=n.dots,i=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&B.isSpecCompliantForm(t);if(!B.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(B.isDate(e))return e.toISOString();if(!s&&B.isBlob(e))throw new G("Blob is not supported. Use a Buffer instead.");return B.isArrayBuffer(e)||B.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let s=e;if(e&&!o&&"object"==typeof e)if(B.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(B.isArray(e)&&function(e){return B.isArray(e)&&!e.some(W)}(e)||(B.isFileList(e)||B.endsWith(n,"[]"))&&(s=B.toArray(e)))return n=V(n),s.forEach((function(e,r){!B.isUndefined(e)&&null!==e&&t.append(!0===i?Y([n],r,a):null===i?n:n+"[]",l(e))})),!1;return!!W(e)||(t.append(Y(o,n,a),l(e)),!1)}const c=[],d=Object.assign(J,{defaultVisitor:u,convertValue:l,isVisitable:W});if(!B.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!B.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+r.join("."));c.push(n),B.forEach(n,(function(n,a){!0===(!(B.isUndefined(n)||null===n)&&o.call(t,n,B.isString(a)?a.trim():a,r,d))&&e(n,r?r.concat(a):[a])})),c.pop()}}(e),t};function X(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Z(e,t){this._pairs=[],e&&$(e,this,t)}const ee=Z.prototype;ee.append=function(e,t){this._pairs.push([e,t])},ee.toString=function(e){const t=e?function(t){return e.call(this,t,X)}:X;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const te=Z;function ne(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function re(e,t,n){if(!t)return e;const r=n&&n.encode||ne,o=n&&n.serialize;let a;if(a=o?o(t,n):B.isURLSearchParams(t)?t.toString():new te(t,n).toString(r),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}const oe=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){B.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ae={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ie={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:te,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},se="undefined"!=typeof window&&"undefined"!=typeof document,le=(ue="undefined"!=typeof navigator&&navigator.product,se&&["ReactNative","NativeScript","NS"].indexOf(ue)<0);var ue;const ce="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,de={...e,...ie},fe=function(e){function t(e,n,r,o){let a=e[o++];if("__proto__"===a)return!0;const i=Number.isFinite(+a),s=o>=e.length;return a=!a&&B.isArray(r)?r.length:a,s?(B.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!i):(r[a]&&B.isObject(r[a])||(r[a]=[]),t(e,n,r[a],o)&&B.isArray(r[a])&&(r[a]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}(r[a])),!i)}if(B.isFormData(e)&&B.isFunction(e.entries)){const n={};return B.forEachEntry(e,((e,r)=>{t(function(e){return B.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null},he={transitional:ae,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=B.isObject(e);if(o&&B.isHTMLForm(e)&&(e=new FormData(e)),B.isFormData(e))return r?JSON.stringify(fe(e)):e;if(B.isArrayBuffer(e)||B.isBuffer(e)||B.isStream(e)||B.isFile(e)||B.isBlob(e))return e;if(B.isArrayBufferView(e))return e.buffer;if(B.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return $(e,new de.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return de.isNode&&B.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((a=B.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return $(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(B.isString(e))try{return(0,JSON.parse)(e),B.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||he.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&B.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw G.from(e,G.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:de.classes.FormData,Blob:de.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};B.forEach(["delete","get","head","post","put","patch"],(e=>{he.headers[e]={}}));const pe=he,me=B.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ve=Symbol("internals");function ge(e){return e&&String(e).trim().toLowerCase()}function ye(e){return!1===e||null==e?e:B.isArray(e)?e.map(ye):String(e)}function be(e,t,n,r,o){return B.isFunction(r)?r.call(this,t,n):(o&&(t=n),B.isString(t)?B.isString(r)?-1!==t.indexOf(r):B.isRegExp(r)?r.test(t):void 0:void 0)}class Ee{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=ge(t);if(!o)throw new Error("header name must be a non-empty string");const a=B.findKey(r,o);(!a||void 0===r[a]||!0===n||void 0===n&&!1!==r[a])&&(r[a||t]=ye(e))}const a=(e,t)=>B.forEach(e,((e,n)=>o(e,n,t)));return B.isPlainObject(e)||e instanceof this.constructor?a(e,t):B.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?a((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&me[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=ge(e)){const n=B.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(B.isFunction(t))return t.call(this,e,n);if(B.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ge(e)){const n=B.findKey(this,e);return!(!n||void 0===this[n]||t&&!be(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=ge(e)){const o=B.findKey(n,e);!o||t&&!be(0,n[o],o,t)||(delete n[o],r=!0)}}return B.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!be(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return B.forEach(this,((r,o)=>{const a=B.findKey(n,o);if(a)return t[a]=ye(r),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();i!==o&&delete t[o],t[i]=ye(r),n[i]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return B.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&B.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[ve]=this[ve]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=ge(e);t[r]||(function(e,t){const n=B.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return B.isArray(e)?e.forEach(r):r(e),this}}Ee.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),B.reduceDescriptors(Ee.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),B.freezeMethods(Ee);const Ce=Ee;function _e(e,t){const n=this||pe,r=t||n,o=Ce.from(r.headers);let a=r.data;return B.forEach(e,(function(e){a=e.call(n,a,o.normalize(),t?t.status:void 0)})),o.normalize(),a}function Se(e){return!(!e||!e.__CANCEL__)}function we(e,t,n){G.call(this,null==e?"canceled":e,G.ERR_CANCELED,t,n),this.name="CanceledError"}B.inherits(we,G,{__CANCEL__:!0});const Te=we,ke=de.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const i=[e+"="+encodeURIComponent(t)];B.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),B.isString(r)&&i.push("path="+r),B.isString(o)&&i.push("domain="+o),!0===a&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Oe(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Ae=de.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=B.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function Re(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,a=0,i=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),u=r[i];o||(o=l),n[a]=s,r[a]=l;let c=i,d=0;for(;c!==a;)d+=n[c++],c%=e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),l-o<t)return;const f=u&&l-u;return f?Math.round(1e3*d/f):void 0}}(50,250);return o=>{const a=o.loaded,i=o.lengthComputable?o.total:void 0,s=a-n,l=r(s);n=a;const u={loaded:a,total:i,progress:i?a/i:void 0,bytes:s,rate:l||void 0,estimated:l&&i&&a<=i?(i-a)/l:void 0,event:o};u[t?"download":"upload"]=!0,e(u)}}const xe={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=Ce.from(e.headers).normalize();let a,i,{responseType:s,withXSRFToken:l}=e;function u(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}if(B.isFormData(r))if(de.hasStandardBrowserEnv||de.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(i=o.getContentType())){const[e,...t]=i?i.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let c=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const d=Oe(e.baseURL,e.url);function f(){if(!c)return;const r=Ce.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new G("Request failed with status code "+n.status,[G.ERR_BAD_REQUEST,G.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),u()}),(function(e){n(e),u()}),{data:s&&"text"!==s&&"json"!==s?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:e,request:c}),c=null}if(c.open(e.method.toUpperCase(),re(d,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=f:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(f)},c.onabort=function(){c&&(n(new G("Request aborted",G.ECONNABORTED,e,c)),c=null)},c.onerror=function(){n(new G("Network Error",G.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||ae;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new G(t,r.clarifyTimeoutError?G.ETIMEDOUT:G.ECONNABORTED,e,c)),c=null},de.hasStandardBrowserEnv&&(l&&B.isFunction(l)&&(l=l(e)),l||!1!==l&&Ae(d))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&ke.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),"setRequestHeader"in c&&B.forEach(o.toJSON(),(function(e,t){c.setRequestHeader(t,e)})),B.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),s&&"json"!==s&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",Re(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",Re(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=t=>{c&&(n(!t||t.type?new Te(null,e,c):t),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const h=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(d);h&&-1===de.protocols.indexOf(h)?n(new G("Unsupported protocol "+h+":",G.ERR_BAD_REQUEST,e)):c.send(r||null)}))}};B.forEach(xe,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Ne=e=>`- ${e}`,Pe=e=>B.isFunction(e)||null===e||!1===e,Fe=e=>{e=B.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let a=0;a<t;a++){let t;if(n=e[a],r=n,!Pe(n)&&(r=xe[(t=String(n)).toLowerCase()],void 0===r))throw new G(`Unknown adapter '${t}'`);if(r)break;o[t||"#"+a]=r}if(!r){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(Ne).join("\n"):" "+Ne(e[0]):"as no adapter specified";throw new G("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function De(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Te(null,e)}function Me(e){return De(e),e.headers=Ce.from(e.headers),e.data=_e.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Fe(e.adapter||pe.adapter)(e).then((function(t){return De(e),t.data=_e.call(e,e.transformResponse,t),t.headers=Ce.from(t.headers),t}),(function(t){return Se(t)||(De(e),t&&t.response&&(t.response.data=_e.call(e,e.transformResponse,t.response),t.response.headers=Ce.from(t.response.headers))),Promise.reject(t)}))}const Le=e=>e instanceof Ce?{...e}:e;function Ie(e,t){t=t||{};const n={};function r(e,t,n){return B.isPlainObject(e)&&B.isPlainObject(t)?B.merge.call({caseless:n},e,t):B.isPlainObject(t)?B.merge({},t):B.isArray(t)?t.slice():t}function o(e,t,n){return B.isUndefined(t)?B.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function a(e,t){if(!B.isUndefined(t))return r(void 0,t)}function i(e,t){return B.isUndefined(t)?B.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,a){return a in t?r(n,o):a in e?r(void 0,n):void 0}const l={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:(e,t)=>o(Le(e),Le(t),!0)};return B.forEach(Object.keys(Object.assign({},e,t)),(function(r){const a=l[r]||o,i=a(e[r],t[r],r);B.isUndefined(i)&&a!==s||(n[r]=i)})),n}const Ue={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Ue[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const je={};Ue.transitional=function(e,t,n){function r(e,t){return"[Axios v1.6.8] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,a)=>{if(!1===e)throw new G(r(o," has been removed"+(t?" in "+t:"")),G.ERR_DEPRECATED);return t&&!je[o]&&(je[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,a)}};const qe={assertOptions:function(e,t,n){if("object"!=typeof e)throw new G("options must be an object",G.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],i=t[a];if(i){const t=e[a],n=void 0===t||i(t,a,e);if(!0!==n)throw new G("option "+a+" must be "+n,G.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new G("Unknown option "+a,G.ERR_BAD_OPTION)}},validators:Ue},Qe=qe.validators;class Be{constructor(e){this.defaults=e,this.interceptors={request:new oe,response:new oe}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ie(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&qe.assertOptions(n,{silentJSONParsing:Qe.transitional(Qe.boolean),forcedJSONParsing:Qe.transitional(Qe.boolean),clarifyTimeoutError:Qe.transitional(Qe.boolean)},!1),null!=r&&(B.isFunction(r)?t.paramsSerializer={serialize:r}:qe.assertOptions(r,{encode:Qe.function,serialize:Qe.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=o&&B.merge(o.common,o[t.method]);o&&B.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Ce.concat(a,o);const i=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));const l=[];let u;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let c,d=0;if(!s){const e=[Me.bind(this),void 0];for(e.unshift.apply(e,i),e.push.apply(e,l),c=e.length,u=Promise.resolve(t);d<c;)u=u.then(e[d++],e[d++]);return u}c=i.length;let f=t;for(d=0;d<c;){const e=i[d++],t=i[d++];try{f=e(f)}catch(e){t.call(this,e);break}}try{u=Me.call(this,f)}catch(e){return Promise.reject(e)}for(d=0,c=l.length;d<c;)u=u.then(l[d++],l[d++]);return u}getUri(e){return re(Oe((e=Ie(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}B.forEach(["delete","get","head","options"],(function(e){Be.prototype[e]=function(t,n){return this.request(Ie(n||{},{method:e,url:t,data:(n||{}).data}))}})),B.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(Ie(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Be.prototype[e]=t(),Be.prototype[e+"Form"]=t(!0)}));const He=Be;class ze{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new Te(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new ze((function(t){e=t})),cancel:e}}}const Ke=ze,Ge={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ge).forEach((([e,t])=>{Ge[t]=e}));const We=Ge,Ve=function e(t){const n=new He(t),r=l(He.prototype.request,n);return B.extend(r,He.prototype,n,{allOwnKeys:!0}),B.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Ie(t,n))},r}(pe);Ve.Axios=He,Ve.CanceledError=Te,Ve.CancelToken=Ke,Ve.isCancel=Se,Ve.VERSION="1.6.8",Ve.toFormData=$,Ve.AxiosError=G,Ve.Cancel=Ve.CanceledError,Ve.all=function(e){return Promise.all(e)},Ve.spread=function(e){return function(t){return e.apply(null,t)}},Ve.isAxiosError=function(e){return B.isObject(e)&&!0===e.isAxiosError},Ve.mergeConfig=Ie,Ve.AxiosHeaders=Ce,Ve.formToJSON=e=>fe(B.isHTMLForm(e)?new FormData(e):e),Ve.getAdapter=Fe,Ve.HttpStatusCode=We,Ve.default=Ve;const Ye=Ve.create({baseURL:"/wp-json/rsvpmaker/v1/",headers:{"Content-type":"application/json","X-WP-Nonce":rsvpmaker_rest.nonce},validateStatus:function(e){return e<400}});function Je(e=""){return(0,i.useQuery)(["rsvp_options"],(function(t){return Ye.get("rsvp_options?tab="+e)}),{enabled:!0,retry:2,onSuccess:(e,t,n,r)=>{console.log("rsvp options query",e)},onError:(e,t,n)=>{console.log("error retrieving rsvp options",e)},refetchInterval:!1})}function $e(e,t){const n=(0,i.useQueryClient)();return(0,i.useMutation)((async function(e){return await Ye.post("rsvp_options",e)}),{onMutate:async e=>{console.log("optimistic update option",e),await n.cancelQueries(["rsvp_options"]);const t=n.getQueryData(["rsvp_options"]);return n.setQueryData(["rsvp_options"],(t=>{const{data:n}=t;e.forEach((e=>{"rsvp_options"==e.type&&(n.rsvp_options[e.key]=e.value)}));const r={...t,data:n};return console.log("newdata optimistic update",r),r})),console.log("updating options"),{previousValue:t}},onSettled:(e,t,r,o)=>{n.invalidateQueries(["rsvp_options"])},onSuccess:(t,n,r,o)=>{console.log("updated"),e([])},onError:(e,t,r)=>{console.log("update options error",e),n.setQueryData("rsvp_options",r.previousValue)}})}var Xe=n(838),Ze=n.n(Xe);function et(e){const{innerHTML:n}=e,r=Ze().sanitize(n).replace("class=","className=");return(0,t.createElement)("div",{dangerouslySetInnerHTML:{__html:r}})}function tt(){const[e,n]=(0,t.useState)(!1),[r,o]=(0,t.useState)(null),[a,i]=(0,t.useState)(null);function s(){n(!0),setTimeout((()=>{n(!1)}),500)}return{SaveControls:function(e){const{changes:n,setChanges:r}=e;console.log("changes SaveControls",n);const{mutate:o}=$e(r);return(0,t.createElement)("div",{id:"savecontrols"},a&&(0,t.createElement)("div",{className:"rsvp-notification rsvp-notification-success"},a.message),(0,t.createElement)("div",{id:"savebuttonwrapper"},(0,t.createElement)("button",{onClick:()=>{console.log("save changeset",n),s(),o(n)}},"Save")))},notification:a,setNotification:i,isSaving:e,saveEffect:s,makeNotification:function(e=""){if(""==e)return a;r&&clearTimeout(r),i({message:e});let t=setTimeout((()=>{i(null)}),5e3);o(t)}}}function nt(e){const{rsvp_options:n,addChange:r}=e,[o,a]=(0,t.useState)(1==n[e.slug]);return(0,t.createElement)(s.ToggleControl,{label:e.label,checked:o,onChange:()=>{let t=!o;a(t),r(e.slug,t?1:0)}})}function rt(e){console.log("optselect props",e);const{rsvp_options:n,addChange:r}=e,[o,a]=(0,t.useState)(n[e.slug]);return console.log("optselect slug",e.slug),console.log("optselect choice",o),console.log("optselect rsvp_options",n),(0,t.createElement)(s.SelectControl,{label:e.label,value:o,options:e.options,onChange:t=>{a(t),r(e.slug,t)}})}function ot(e){const{rsvp_options:n,addChange:r}=e,[o,a]=(0,t.useState)(n[e.slug]);return console.log("choice",o),(0,t.createElement)(s.RadioControl,{label:e.label,selected:o,options:e.options,onChange:t=>{a(t),r(e.slug,t)}})}function at(e){const{rsvp_options:n,addChange:r}=e,[o,a]=(0,t.useState)(n[e.slug]);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("input",{type:"text",value:o,onChange:e=>{a(e.target.value),console.log(e.target.value)},onBlur:()=>{r(e.slug,o)}}))}function it(e){const{rsvp_options:n,addChange:r}=e,[o,a]=(0,t.useState)(n[e.slug]);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("textarea",{type:"text",value:o,onChange:e=>{a(e.target.value),console.log(e.target.value)},onBlur:()=>{r(e.slug,o)}}))}function st(e){const{changes:n,addChange:r,setChanges:o}=e,{data:a,isLoading:i,isError:s}=Je("general");if(s)return(0,t.createElement)("p",null,"Error loading general options");const{isSaving:l,saveEffect:u,SaveControls:c,makeNotification:d}=tt();if(i)return(0,t.createElement)("p",null,"Loading ...");const f=a.data.rsvp_options,h=(a.data.current_user_id,a.data.current_user_email,a.data.edit_url),p=a.data.confirmation_message,m=a.data.stylesheet_url;return console.log("rsvp options",f),Object.entries(f),f.defaultmin.toString().length<2&&(f.defaultmin=f.defaultmin+"0"),(0,t.createElement)("div",{className:"rsvptab"},l&&(0,t.createElement)("h1",null,"Saving ..."),(0,t.createElement)("div",{className:l?"rsvptab-saving":""},(0,t.createElement)("h3",null,"Defaults for New Events"),(0,t.createElement)("p",null,"Start Time: ",(0,t.createElement)((function(e){const{addChange:n}=e,[r,o]=(0,t.useState)(e.time);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("input",{type:"time",value:r,onChange:e=>{o(e.target.value)},onBlur:()=>{let e=r.split(":");u(),n("defaulthour",e[0]),n("defaultmin",e[1])}}))}),{addChange:r,time:f.defaulthour+":"+f.defaultmin})," "),(0,t.createElement)(nt,{addChange:r,rsvp_options:f,label:"Collect RSVPs",slug:"rsvp_on"}),(0,t.createElement)(nt,{addChange:r,rsvp_options:f,label:"Display Add to Calendar Icons",slug:"calendar_icons"}),(0,t.createElement)(nt,{addChange:r,rsvp_options:f,label:"Add Timezone",slug:"add_timezone"}),(0,t.createElement)(nt,{addChange:r,rsvp_options:f,label:"Show Timezone Conversions",slug:"convert_timezone"}),(0,t.createElement)(nt,{addChange:r,rsvp_options:f,label:"Include Time in Title for Facebook and Twitter",slug:"social_title_date"}),(0,t.createElement)(nt,{addChange:r,rsvp_options:f,label:"Show Yes/No Radio Buttons on Form",slug:"rsvp_yesno"}),(0,t.createElement)(nt,{addChange:r,rsvp_options:f,label:"Show Members Not Registered (for membership sites where members have an account)",slug:"missing_members"}),(0,t.createElement)(nt,{addChange:r,rsvp_options:f,label:"Show Attendee Names Publicly",slug:"show_attendees"}),(0,t.createElement)(nt,{addChange:r,rsvp_options:f,label:"Show RSVP Count Publicly",slug:"rsvp_count"}),(0,t.createElement)(nt,{addChange:r,rsvp_options:f,label:"Login Required to Register",slug:"login_required"}),(0,t.createElement)("p",null,"Default Email for RSVP Notifications ",(0,t.createElement)(at,{addChange:r,rsvp_options:f,slug:"rsvp_to",value:f.rsvp_to})),(0,t.createElement)(nt,{addChange:r,rsvp_options:f,label:"Email RSVPs To Event Author Instead",slug:"rsvp_to_current"}),(0,t.createElement)("p",null,(0,t.createElement)("strong",null,"Form spam protection: Google ReCaptcha (v2) ")," ",(0,t.createElement)("a",{href:"https://www.google.com/recaptcha/admin",target:"_blank"},"register")," for API key and secret",(0,t.createElement)("br",null),"Key ",(0,t.createElement)(at,{addChange:r,rsvp_options:f,slug:"rsvp_recaptcha_site_key"})," Secret ",(0,t.createElement)(at,{addChange:r,rsvp_options:f,slug:"rsvp_recaptcha_secret"})),(0,t.createElement)(nt,{addChange:r,rsvp_options:f,label:"Simple Captcha on RSVP Form (legacy version, not recommended)",slug:"rsvp_captcha"}),(0,t.createElement)("h3",null,"Instructions for RSVP Form"),(0,t.createElement)("p",null,(0,t.createElement)(it,{addChange:r,rsvp_options:f,slug:"rsvp_instructions"})),(0,t.createElement)("h3",null,"Confirmation Message"),(0,t.createElement)(et,{innerHTML:p}),(0,t.createElement)("p",null,(0,t.createElement)("a",{target:"_blank",href:h+f.rsvp_confirm},"Edit Message")),(0,t.createElement)("h3",null,"RSVP Button"),(0,t.createElement)("p",null,(0,t.createElement)("a",{target:"_blank",href:f.rsvplink_edit},"Edit Button Text and Colors")),(0,t.createElement)("p",null,(0,t.createElement)("label",{className:"textlabel"},"Update Button Title"),(0,t.createElement)(at,{addChange:r,rsvp_options:f,slug:"update_rsvp"})),(0,t.createElement)("p",null,(0,t.createElement)("label",{className:"textlabel"},"RSVP Form Title"),(0,t.createElement)(at,{addChange:r,rsvp_options:f,slug:"rsvp_form_title"})),(0,t.createElement)("h3",null,"Date and Time Formats"),(0,t.createElement)("p",null,(0,t.createElement)("a",{target:"_blank",href:"https://www.php.net/manual/en/datetime.format.php"},"find codes here")," ",(0,t.createElement)("br",null),"Examples:",(0,t.createElement)("br",null),"l F j, Y = Thursday March 9, 2023",(0,t.createElement)("br",null),"j F Y = 9 March 2023",(0,t.createElement)("br",null),"m-d-Y = 03-09-2023"),(0,t.createElement)("p",null,(0,t.createElement)("label",{className:"textlabel"},"Date (long)"),(0,t.createElement)(at,{addChange:r,rsvp_options:f,slug:"long_date"})),(0,t.createElement)("p",null,(0,t.createElement)("label",{className:"textlabel"},"Date (short)"),(0,t.createElement)(at,{addChange:r,rsvp_options:f,slug:"short_date"})),(0,t.createElement)(ot,{addChange:r,rsvp_options:f,label:"Time Format",slug:"time_format",options:[{label:"12 hour AM/PM",value:"g:i A"},{label:"24 hour",value:"H:i"},{label:"12 hour AM/PM with timezone",value:"g:i A T"},{label:"24 hour with timezone",value:"H:i T"}]}),(0,t.createElement)("p",null,(0,t.createElement)("label",{className:"textlabel"},"Custom CSS")," ",(0,t.createElement)(at,{addChange:r,rsvp_options:f,slug:"custom_css"}),(0,t.createElement)("br",null),(0,t.createElement)("em",null,"Option to provide the url to a stylesheet that will override the standard styles from ",(0,t.createElement)("br",null),(0,t.createElement)("a",{href:m,target:"_blank"},m))),(0,t.createElement)(ot,{addChange:r,rsvp_options:f,slug:"dashboard",label:"Dashboard Widget",options:[{label:"None",value:""},{label:"Show on Dashboard",value:"show"},{label:"Show on Top",value:"top"}]}),(0,t.createElement)("p",null,(0,t.createElement)("label",null,"Message for Dashboard"),(0,t.createElement)("br",null),(0,t.createElement)(it,{addChange:r,rsvp_options:f,slug:"dashboard_message"})),(0,t.createElement)(nt,{addChange:r,rsvp_options:f,label:"Troubleshooting and Logging",slug:"debug"}),(0,t.createElement)("p",null,"Turning this on may be helpful to identify bugs in the software."),(0,t.createElement)("h3",null,"Template Behavior"),(0,t.createElement)(nt,{addChange:r,rsvp_options:f,label:"Auto-Renew Events",slug:"autorenew"}),(0,t.createElement)("p",null,(0,t.createElement)("em",null,"If this is active, events based on a template will automatically be added according to the defined schedule."))),(0,t.createElement)(c,{changes:n,setChanges:o}))}function lt(e){const{data:n,isLoading:r,isError:o}=Je("security");if(o)return(0,t.createElement)("p",null,"Error loading security options");const{isSaving:a,saveEffect:i,SaveControls:s,makeNotification:l}=tt(),{changes:u,addChange:c,setChanges:d}=e,{mutate:f}=$e(d),h=[{value:"manage_options",label:"Administrator (manage_options)"},{value:"edit_others_rsvpmakers",label:"Editor (edit_others_rsvpmakers)"},{value:"publish_rsvpmakers",label:"Author (publish_rsvpmakers)"},{value:"edit_rsvpmakers",label:"Contributor (edit_rsvpmakers)"}];if(r)return(0,t.createElement)("p",null,"Loading ...");const p=n.data.rsvp_options;return n.data.current_user_id,n.data.current_user_email,(0,t.createElement)("div",{className:"rsvptab"},a&&(0,t.createElement)("h1",null,"Saving ..."),(0,t.createElement)("div",{className:a?"rsvptab-saving":""},(0,t.createElement)("div",{className:"security-select"},(0,t.createElement)(rt,{addChange:c,rsvp_options:p,label:"RSVP Report",slug:"menu_security",options:h}),(0,t.createElement)(rt,{addChange:c,rsvp_options:p,label:"Event Templates",slug:"rsvpmaker_template",options:h}),(0,t.createElement)(rt,{addChange:c,rsvp_options:p,label:"Recurring Event",slug:"recurring_event",options:h}),(0,t.createElement)(rt,{addChange:c,rsvp_options:p,label:"Documentation",slug:"documentation",options:h})),(0,t.createElement)("div",null,(0,t.createElement)(nt,{addChange:c,rsvp_options:p,label:"Additional Editors",slug:"additional_editors"}),(0,t.createElement)("p",null,"Enabling Additional Editors/Co-Authors allows users to share editing rights for event templates and related events."),(0,t.createElement)("p",null,(0,t.createElement)("strong",null,"How this works: ")," When this function is enabled, event authors have the option of allowing other users to be additional editors or co-authors for an event or a series of events based on a template. This is useful for community websites where multiple organizations post their events. The organization can appoint multiple officers or representatives to have equal rights to update the events template for their meetings and all the individual events based on that template."),(0,t.createElement)("p",null,"Note that to unlock events for editing, RSVPMaker changes the author ID for a post to the ID of the authorized user editing the post."))),(0,t.createElement)(s,{changes:u,setChanges:d}))}function ut(e){const{data:n,isLoading:r,isError:o}=Je("payment");if(o)return(0,t.createElement)("p",null,"Error loading payment options");const{changes:a,addChange:i,setChanges:l}=e,{isSaving:u,saveEffect:c,SaveControls:d,makeNotification:f}=tt();if(r||!n.data.stripe)return(0,t.createElement)("p",null,"Loading ...");console.log(n.data.stripe);const[h,p]=(0,t.useState)(n.data.stripe),[m,v]=(0,t.useState)(n.data.paypal),[g,y]=(0,t.useState)(n.data.chosen_gateway),[b,E]=(0,t.useState)(n.data.rsvp_options.paypal_currency),[C,_]=(0,t.useState)(n.data.rsvp_options.minimum_payment?n.data.rsvp_options.minimum_payment:"5.00"),[S,w]=(0,t.useState)(n.data.rsvp_options.currency_decimal+"|"+n.data.rsvp_options.currency_thousands),T=[{label:"Production",value:"production"},{label:"Sandbox",value:"sandbox"}];return(0,t.createElement)("div",{className:"rsvptab payment"},(0,t.createElement)("div",{className:u?"rsvptab-saving":""},(0,t.createElement)(s.TextControl,{label:"Currency",className:"payment",value:b,onChange:e=>{E(e),i("paypal_currency",e)}})," ",(0,t.createElement)("p",null,(0,t.createElement)("a",{href:"https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_currency_codes"},"(list of currency codes)")),(0,t.createElement)(s.SelectControl,{className:"payment",label:"Currency Format",value:S,options:[{label:"1,000.00",value:".|,"},{label:"1.000,00",value:",|."},{label:"1 000,00",value:",| "}],onChange:e=>{w(e);const t=e.split("|");i("currency_decimal",t[0]),i("currency_thousands",t[1])}}),(0,t.createElement)(s.TextControl,{label:"Minimum Transaction",className:"payment",value:C,onChange:e=>{_(e),i("minimum_payment",e)}}),(0,t.createElement)("h3",null,"Stripe"),(0,t.createElement)("div",{className:"key-inputs"},(0,t.createElement)("div",{className:"production"},"set"!=h.pk&&(0,t.createElement)(s.TextControl,{label:"Stripe Public Key",value:h.pk,onChange:e=>{let t={...h};t.pk=e,p(t),i("rsvpmaker_stripe_keys",t,"mergearray")}}),"set"!=h.pk&&(0,t.createElement)(s.TextControl,{label:"Stripe Secret Key",value:h.sk,onChange:e=>{let t={...h};t.sk=e,p(t),i("rsvpmaker_stripe_keys",t,"mergearray")}}),"set"!=h.pk&&(0,t.createElement)(s.TextControl,{label:"Stripe Webhook Key",value:h.webook,onChange:e=>{let t={...h};t.webhook=e,p(t),i("rsvpmaker_stripe_keys",t,"mergearray")}}),"set"==h.pk&&(0,t.createElement)("p",null,"Stripe Production Keys Set ",(0,t.createElement)("button",{onClick:()=>{let e={...h};e.pk="",e.sk="",p(e),i("rsvpmaker_stripe_keys",e,"mergearray")}},"Reset"))),(0,t.createElement)("div",{className:"sandbox"},"set"!=h.sandbox_pk&&(0,t.createElement)(s.TextControl,{label:"Stripe Sandbox Public Key",value:h.sandbox_pk,onChange:e=>{let t={...h};t.sandbox_pk=e,p(t),i("rsvpmaker_stripe_keys",t,"mergearray")}}),"set"!=h.sandbox_pk&&(0,t.createElement)(s.TextControl,{label:"Stripe Sandbox Secret Key",value:h.sandbox_sk,onChange:e=>{let t={...h};t.sandbox_sk=e,p(t),i("rsvpmaker_stripe_keys",t,"mergearray")}}),"set"!=h.sandbox_pk&&(0,t.createElement)(s.TextControl,{label:"Stripe Sandbox Webhook Key",value:h.sandbox_webhook,onChange:e=>{let t={...h};t.sandbox_webhook=e,p(t),i("rsvpmaker_stripe_keys",t,"mergearray")}}),"set"==h.sandbox_pk&&(0,t.createElement)("p",null,"Stripe Sandbox Keys Set ",(0,t.createElement)("button",{onClick:()=>{let e={...h};e.sandbox_pk="",e.sandbox_sk="",p(e),i("rsvpmaker_stripe_keys",e,"mergearray")}},"Reset")))),(0,t.createElement)(s.RadioControl,{label:"Stripe Mode",selected:h.mode,options:T,onChange:e=>{let t={...h};t.mode=e,p(t),i("rsvpmaker_stripe_keys",t,"mergearray")}}),(0,t.createElement)(s.TextControl,{label:"Notification Email for Stripe (optional)",value:h.notify,onChange:e=>{let t={...h};t.notify=e,p(t),i("rsvpmaker_stripe_keys",t,"mergearray")}}),(0,t.createElement)("h3",null,"PayPal"),(0,t.createElement)("div",{className:"key-inputs"},(0,t.createElement)("div",{className:"production"},"set"!=m.client_id&&(0,t.createElement)(s.TextControl,{label:"PayPal Client ID",className:"payment",value:m.client_id,onChange:e=>{let t={...m};t.client_id=e,v(t),i("rsvpmaker_paypal_rest_keys",t,"mergearray")}}),"set"!=m.client_id&&(0,t.createElement)(s.TextControl,{label:"PayPal Client Secret",className:"payment",value:m.client_secret,onChange:e=>{let t={...m};t.client_secret=e,v(t),i("rsvpmaker_paypal_rest_keys",t,"mergearray")}}),"set"==m.client_id&&(0,t.createElement)("p",null,"PayPal Production Keys Set ",(0,t.createElement)("button",{onClick:()=>{let e={...m};e.client_id="",e.client_secret="",v(e),i("rsvpmaker_paypal_rest_keys",e,"mergearray")}},"Reset"))),(0,t.createElement)("div",{className:"sandbox"},"set"!=m.sandbox_client_id&&(0,t.createElement)(s.TextControl,{className:"payment",label:"PayPal Sandbox Client ID",value:m.sandbox_client_id,onChange:e=>{let t={...m};t.sandbox_client_id=e,v(t),i("rsvpmaker_paypal_rest_keys",t,"mergearray")}}),"set"!=m.sandbox_client_id&&(0,t.createElement)(s.TextControl,{className:"payment",label:"PayPal Sandbox Client Secret",value:m.sandbox_client_secret,onChange:e=>{let t={...m};t.sandbox_client_secret=e,v(t),i("rsvpmaker_paypal_rest_keys",t,"mergearray")}}),"set"==m.sandbox_client_id&&(0,t.createElement)("p",null,"PayPal Sandbox Keys Set ",(0,t.createElement)("button",{onClick:()=>{let e={...m};e.sandbox_client_id="",e.sandbox_client_secret="",v(e),i("rsvpmaker_paypal_rest_keys",e,"mergearray")}},"Reset")))),(0,t.createElement)(s.RadioControl,{label:"PayPal Mode",selected:m.mode,options:T,onChange:e=>{let t={...m};t.mode=e,v(t),i("rsvpmaker_paypal_rest_keys",t,"mergearray")}}),(0,t.createElement)(s.SelectControl,{label:"Chosen Gateway",value:g,options:n.data.gateways,onChange:e=>{y(e),i("payment_gateway",e)}})),(0,t.createElement)(d,{changes:a,setChanges:l}))}function ct(e){const{changes:n,addChange:r,setChanges:o}=e,{data:a,isLoading:i,isError:l}=Je("general");if(l)return(0,t.createElement)("p",null,"Error loading options");if(i)return(0,t.createElement)("p",null,"Loading ...");const{isSaving:u,saveEffect:c,SaveControls:d,makeNotification:f}=tt(),[h,p]=(0,t.useState)(a.data.chimp),[m,v]=(0,t.useState)(a.data.rsvp_options),[g,y]=(0,t.useState)(""!=a.data.chimp["chimp-key"]),[b,E]=(0,t.useState)(""!=a.data.rsvp_options.smtp),[C,_]=(0,t.useState)(a.data.chimp.chimp_add_new_users),[S,w]=(0,t.useState)(a.data.chimp["chimp-list"]),T=a.data.chimp_lists;return(0,t.createElement)("div",{className:"rsvptab"},(0,t.createElement)("p",null,"See ",(0,t.createElement)("a",{href:a.data.mailing_list_settings,target:"_blank"},"Mailing List Settings")," for activation of the Postmark integration recommended for sending newsletters, promotional emails, and event invitations. Alternatively, you can use RSVPMaker's integration with Mailchimp. You can improve delivery of email messages using RSVPMaker's own SMTP servers support or an external SMTP plugin (not needed if Postmark is active)."),(0,t.createElement)("h3",null,"Email Footer"),(0,t.createElement)(s.TextControl,{label:"Company/Organization",value:h.company,onChange:e=>{let t={...h};t.company=e,p(t),r("chimp",t,"mergearray")}}),(0,t.createElement)(s.TextControl,{label:"Mailing Address",value:h.mailing_address,onChange:e=>{let t={...h};t.mailing_address=e,p(t),r("chimp",t,"mergearray")}}),(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Including a physical mailing address helps distinguish your email from spam.")),g&&(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h3",null,"Mailchimp Configuration"),(0,t.createElement)(s.TextControl,{label:"Mailchimp API Key",value:h["chimp-key"],onChange:e=>{let t={...h};t["chimp-key"]=e,p(t),r("chimp",t,"mergearray")}}),(0,t.createElement)(s.TextControl,{label:"Email From Text",value:h["email-name"],onChange:e=>{let t={...h};t["email-name"]=e,p(t),r("chimp",t,"mergearray")}}),(0,t.createElement)(s.TextControl,{label:"Email From Address",value:h["email-from"],onChange:e=>{let t={...h};t["email-from"]=e,p(t),r("chimp",t,"mergearray")}}),(0,t.createElement)(s.SelectControl,{className:"chimplist",label:"Default Maling List",value:S,options:T,onChange:e=>{w(e);let t={...h};t["chimp-list"]=e,p(t),r("chimp",t,"mergearray")}}),(0,t.createElement)(s.ToggleControl,{label:"Add new WordPress user emails to mailing list",checked:C,onChange:()=>{_(!g);let e={...h};e.chimp_add_new_users=value,p(e),r("chimp",e,"mergearray")}})),!g&&(0,t.createElement)(s.ToggleControl,{label:"Show Mailchimp Integration Settings",checked:g,onChange:()=>{y(!g)}}),b&&(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h3",null,"SMTP Configuration"),(0,t.createElement)(rt,{addChange:r,rsvp_options:m,label:"SMTP Choice",slug:"smtp",options:[{label:"None - use wp_mail()",value:""},{label:"Custom",value:"other"},{label:"Gmail",value:"gmail"},{label:"Sendgrid",value:"sendgrid"}]}),(0,t.createElement)("p",null,"Email",(0,t.createElement)("br",null),(0,t.createElement)(at,{addChange:r,rsvp_options:m,label:"Email",slug:"smtp_useremail"})),(0,t.createElement)("p",null,"Username",(0,t.createElement)("br",null),(0,t.createElement)(at,{addChange:r,rsvp_options:m,label:"Username",slug:"smtp_username"})),(0,t.createElement)("p",null,"Password",(0,t.createElement)("br",null),(0,t.createElement)(at,{addChange:r,rsvp_options:m,label:"Password",slug:"smtp_password"})),(0,t.createElement)("p",null,"Server",(0,t.createElement)("br",null),(0,t.createElement)(at,{addChange:r,rsvp_options:m,label:"Server",slug:"smtp_server"})),(0,t.createElement)("p",null,"Prefix (ssl,tls)",(0,t.createElement)("br",null),(0,t.createElement)(at,{addChange:r,rsvp_options:m,label:"Prefix (ssl, tls)",slug:"smtp_prefix"})),(0,t.createElement)("p",null,"Port",(0,t.createElement)("br",null),(0,t.createElement)(at,{addChange:r,rsvp_options:m,label:"Port",slug:"smtp_port"})),(0,t.createElement)("p",null,(0,t.createElement)("a",{href:a.data.smtp_test,target:"_blank"},"Test SMTP Connection")),(0,t.createElement)("p",null,"See ",(0,t.createElement)("a",{href:"http://www.wpsitecare.com/gmail-smtp-settings/"},"this article")," for additional guidance on sending using Gmail (requires a tweak to security settings in your Google account).")),!b&&(0,t.createElement)(s.ToggleControl,{label:"Show SMTP Settings",checked:b,onChange:()=>{E(!b)}}),(0,t.createElement)(d,{changes:n,setChanges:o}))}function dt(e){const n={display:e.display?e.display:"block",maxWidth:e.width?e.width:"350px"};return(0,t.createElement)("div",{style:n},(0,t.createElement)("label",{style:{display:"block",fontSize:"11px",textTransform:"uppercase"}},e.label),(0,t.createElement)("select",{value:e.value,onChange:t=>e.onChange(t.target.value)},e.options.map((e=>(0,t.createElement)("option",{value:e.value},e.label)))))}function ft(e){const{type:n}=e;return(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-arrow-up-circle",viewBox:"0 0 16 16"},(0,t.createElement)("title",null,"Move Up ",n),(0,t.createElement)("path",{"fill-rule":"evenodd",d:"M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-7.5 3.5a.5.5 0 0 1-1 0V5.707L5.354 7.854a.5.5 0 1 1-.708-.708l3-3a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1-.708.708L8.5 5.707V11.5z"}))}function ht(e){const{type:n}=e;return(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-arrow-down-circle",viewBox:"0 0 16 16"},(0,t.createElement)("title",null,"Move Down ",n),(0,t.createElement)("path",{"fill-rule":"evenodd",d:"M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v5.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V4.5z"}))}function pt(e){const{type:n}=e;return(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-trash",viewBox:"0 0 16 16"},(0,t.createElement)("title",null,"Delete ",n),(0,t.createElement)("path",{d:"M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z"}),(0,t.createElement)("path",{"fill-rule":"evenodd",d:"M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z"}))}function mt(e){const[n,r]=(0,t.useState)(e.form_id),[o,a]=(0,t.useState)("rsvpmaker/formfield"),[l,u]=(0,t.useState)(""),[c,d]=(0,t.useState)(""),[f,h]=(0,t.useState)(!1),[p,m]=(0,t.useState)(""),{isSaving:v,saveEffect:g,SaveControls:y,makeNotification:b}=tt(),{changes:E,addChange:C,setChanges:_}=e;wp?.data?.select("core/editor")?.getCurrentPostId(),console.log("Forms props",e),console.log("Forms formId",n);const{data:S,isLoading:w,isError:T}=(0,i.useQuery)(["rsvp_form",n],(function(){return Ye.get("rsvp_form?form_id="+n+"&post_id="+wp?.data?.select("core/editor")?.getCurrentPostId())}),{enabled:!0,retry:2,onSuccess:(e,t,o,a)=>{n||r(e.data.form_id),console.log("rsvp forms query",e)},onError:(e,t,n)=>{console.log("error retrieving rsvp forms",e)},refetchInterval:!1});if(T)return(0,t.createElement)("p",null,"Error loading form options");const k=(0,i.useQueryClient)(),{mutate:O}=(0,i.useMutation)((async function(t){return await Ye.post("rsvp_form?form_id="+n+"&post_id="+wp?.data?.select("core/editor")?.getCurrentPostId(),{form:t,newForm:p,event_id:e.event_id?e.event_id:0})}),{onMutate:async e=>{const t=k.getQueryData(["rsvp_form",n]);return console.log("optimistic update form",e),await k.cancelQueries(["rsvp_form",n]),k.setQueryData(["rsvp_form",n],(t=>{const{data:n}=t;n.form=e;const r={...t,data:n};return console.log("newdata optimistic form update",r),r})),console.log("updating options"),{previousValue:t}},onSettled:(e,t,r,o)=>{k.invalidateQueries(["rsvp_form",n])},onSuccess:(e,t,n,o)=>{console.log("updated"),r(e.data.form_id)},onError:(e,t,r)=>{console.log("update options error",e),k.setQueryData(["rsvp_form",n],r.previousValue)}});if(w)return(0,t.createElement)("p",null,"Loading ...");const A=S.data.form.filter((e=>e.blockName)),R=S.data.form_options,x=S.data.form_id;let N=A.length-1;const P=[];for(let e=0;e<N;e++){let t=A[e];if(t?.attrs.guestform?P.push(e):console.log("guestfields attr not found",e),["rsvpmaker/formnote","rsvpmaker/guests"].includes(t.blockName)){N=e-1;break}}const F=[{label:"Choose Field Type",value:""},{label:"Text Field",value:"rsvpmaker/formfield"},{label:"Text Area",value:"rsvpmaker/formtextarea"},{label:"Select",value:"rsvpmaker/formselect"},{label:"Radio Buttons",value:"rsvpmaker/formradio"},{label:"Add to Email List Checkbox",value:"rsvpmaker/formchimp"}];let D=!1,M=!1;for(let e=0;e<A.length;e++){let t=A[e];console.log("check for end fields",t),"rsvpmaker/guests"==t.blockName&&(D=!0,console.log("check for end fields found guests")),"rsvpmaker/formnote"==t.blockName&&(M=!0,console.log("check for end fields found note"))}function L(e){const[n,r]=(0,t.useState)(!1),{blockindex:o}=e;return(0,t.createElement)(t.Fragment,null,!n&&(0,t.createElement)("button",{className:"blockmove deletebutton",onClick:()=>{r(!0)}},(0,t.createElement)(pt,null)," Delete")," ",n&&(0,t.createElement)("button",{className:"blockmove",onClick:()=>{I(o,"delete")}},(0,t.createElement)(pt,null)," Confirm Delete")," ")}function I(e,t){const n=[],r=A[e];let o="delete"==t;A.forEach(((a,i)=>{null==a.blockName||i==e||("up"==t&&i==e-1&&(n.push(r),o=!0),"down"==t&&i==e+2&&(n.push(r),o=!0),n.push(a))})),o||n.push(r),console.log("newform",n),O(n)}function U(e,t,n){const r=[...A];r[e].attrs[t]=n,O(r)}function j(e){const{blockindex:n,setFormItemAttr:r}=e,[o,a]=(0,t.useState)(e.attrs.choicearray),[i,l]=(0,t.useState)(e.attrs.required),[u,c]=(0,t.useState)(e.attrs.label),[d,f]=(0,t.useState)(e.attrs.guestform) ;return(0,t.createElement)("div",{className:"formAtts"},["rsvpmaker/formfield","rsvpmaker/formselect","rsvpmaker/formradio","rsvpmaker/formtextarea"].includes(e.blockName)&&(0,t.createElement)("p",null,(0,t.createElement)("label",null,"Field Label")," ",(0,t.createElement)("input",{type:"text",value:u,onChange:e=>{c(e.target.value)},onBlur:()=>{r(n,"label",u)}})),o&&(0,t.createElement)("p",null,"Choices",(0,t.createElement)("br",null),(0,t.createElement)("textarea",{value:o.join("\n"),onChange:e=>{let t=e.target.value.split("\n");a(t),r(n,"choicearray",t)},onBlur:()=>{r(n,"choicearray",o)}}),(0,t.createElement)("br",null),(0,t.createElement)("em",null,"Enter one choice per line")),["rsvpmaker/formfield","rsvpmaker/formselect","rsvpmaker/formradio","rsvpmaker/formtextarea"].includes(e.blockName)&&"email"!=e.attrs.slug&&(0,t.createElement)(s.ToggleControl,{label:"Required",checked:"required"==i,onChange:()=>{let e="required"==i?"":"required";l(e),r(n,"required",e)}}),"email"==e.attrs.slug&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Email is always required")),["rsvpmaker/formfield","rsvpmaker/formselect","rsvpmaker/formradio","rsvpmaker/formtextarea"].includes(e.blockName)&&(0,t.createElement)(s.ToggleControl,{label:"Include on Guest Form",checked:d,onChange:()=>{let e=!d;f(e),r(n,"guestform",e)}}))}function q(){console.log("guestfields",P);const[e,n]=(0,t.useState)(!1);return e?(0,t.createElement)("div",null,(0,t.createElement)("p",null,"Guest 1"),P.map((e=>{const n=A[e];console.log("guestfields forEach",n);let r=[];return n?.attrs.choicearray&&(r=n.attrs.choicearray.map((e=>({label:e,value:e})))),(0,t.createElement)("div",{className:"formAtts"},"rsvpmaker/formfield"==n.blockName&&(0,t.createElement)(s.TextControl,{label:n.attrs.label}),"rsvpmaker/formtextarea"==n.blockName&&(0,t.createElement)(s.TextareaControl,{label:n.attrs.label}),"rsvpmaker/formselect"==n.blockName&&(0,t.createElement)(dt,{label:n.attrs.label,options:r}),"rsvpmaker/formradio"==n.blockName&&(0,t.createElement)(s.RadioControl,{label:n.attrs.label,options:r}))}))):(0,t.createElement)("p",null,(0,t.createElement)("a",{onClick:()=>{n(!0)}},"+ Add Guests"))}D||F.push({label:"Guest Fields",value:"rsvpmaker/guests"}),M||F.push({label:"Note Field",value:"rsvpmaker/formnote"});let Q="",B=!0;return(0,t.createElement)("div",{className:"rsvptab"},S.data.is_default&&(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"Default Form Selected"),(0,t.createElement)("p",null,"Changes you make below will apply to all events that use the default form. Switch to a custom form to make customizations for this event only. Forms can also be customized from an event template.")),S.data.is_inherited&&(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"Form Is Inherited"),(0,t.createElement)("p",null,"This form is inherited from a template or another document. Changes you make below will apply to all events that use the same form. Switch to a custom form to make customizations for this event only. Forms can also be customized from an event template.")),(0,t.createElement)(s.ToggleControl,{label:"Show Form Preview",checked:f,onChange:()=>{h(!f)}}),f&&A.map(((e,n)=>{B=e.blockName.indexOf("rsvpmaker")>-1;let r=[];if(e?.attrs.choicearray&&(r=e.attrs.choicearray.map((e=>({label:e,value:e})))),null!=e.blockName)return(0,t.createElement)("div",null,"rsvpmaker/formfield"==e.blockName&&(0,t.createElement)(s.TextControl,{label:e.attrs.label}),"rsvpmaker/formtextarea"==e.blockName&&(0,t.createElement)(s.TextareaControl,{label:e.attrs.label}),"rsvpmaker/formselect"==e.blockName&&(0,t.createElement)(dt,{label:e.attrs.label,options:r}),"rsvpmaker/formradio"==e.blockName&&(0,t.createElement)(s.RadioControl,{label:e.attrs.label,options:r}),"rsvpmaker/guests"==e.blockName&&(0,t.createElement)(q,null),"rsvpmaker/formchimp"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("input",{type:"checkbox"})," Add me to your email list"),!B&&e.innerHTML&&(0,t.createElement)(et,{innerHTML:e.innerHTML}))})),(0,t.createElement)("h4",null,"Form Editing Controls"),A.map(((e,r)=>{if(Q=e.blockName.replace(/^[^/]+\//,""),B=e.blockName.indexOf("rsvpmaker")>-1,"formchimp"==Q?Q="Add to Email List Checkbox":"formnote"==Q&&(Q="Note"),null!=e.blockName)return(0,t.createElement)("div",{className:"formblock"},(0,t.createElement)("div",{class:"blockheader"},(0,t.createElement)("div",{className:"reorganize-drag"},(0,t.createElement)("div",{className:"titleline"},(0,t.createElement)("h2",null,Q," ",e.attrs.label&&(0,t.createElement)("span",{className:"fieldlabel"},e.attrs.label))," ",!["rsvpmaker/formnote","rsvpmaker/guests"].includes(e.blockName)&&r>0&&(0,t.createElement)("button",{className:"blockmove",onClick:()=>{I(r,"up")}},(0,t.createElement)(ft,null))," ",!["rsvpmaker/formnote","rsvpmaker/guests"].includes(e.blockName)&&r!=N&&(0,t.createElement)("button",{className:"blockmove",onClick:()=>{I(r,"down")}},(0,t.createElement)(ht,null))," ",(0,t.createElement)(L,{blockindex:r})," "),"rsvpmaker/guests"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Gathers information about guests.")),"rsvpmaker/formnote"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"A free text entry note at the bottom of the form.")),"rsvpmaker/formchimp"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Displays an Add to Email List checkbox on the form")),!B&&e.innerHTML&&(0,t.createElement)("div",null,(0,t.createElement)(et,{innerHTML:e.innerHTML})," ",(0,t.createElement)("br",null),(0,t.createElement)("em",null,(0,t.createElement)("a",{href:"/wp-admin/post.php?action=edit&post="+n},"Open in the WordPress editor"))),(0,t.createElement)(j,{attrs:e.attrs,blockName:e.blockName,blockindex:r,setFormItemAttr:U}))))})),(0,t.createElement)("p",null,"Add a form field ",(0,t.createElement)(dt,{label:"Type",options:F,value:o,onChange:e=>{a(e)}})," ",!["rsvpmaker/formnote","rsvpmaker/guests","rsvpmaker/formchimp"].includes(o)&&(0,t.createElement)(s.TextControl,{label:"Field Label",value:l,onChange:e=>{u(e)}})," "),["rsvpmaker/formselect","rsvpmaker/formradio"].includes(o)&&(0,t.createElement)("p",null,(0,t.createElement)("label",null,"Choices"),(0,t.createElement)("br",null),(0,t.createElement)("textarea",{value:c,onChange:e=>{d(e.target.value)}}),(0,t.createElement)("br",null),(0,t.createElement)("em",null,"Enter one choice per line")),(0,t.createElement)("p",null,(0,t.createElement)("button",{onClick:function(){if(!o)return;let e;if(console.log(o),console.log(l),"rsvpmaker/formnote"==o)e={blockName:"rsvpmaker/formnote",attrs:[],innerBlocks:[],innerHTML:"",innerContent:[]};else if("rsvpmaker/guests"==o)e={blockName:"rsvpmaker/guests",attrs:[],innerBlocks:[{blockName:"core/paragraph",attrs:[],innerBlocks:[],innerHTML:"\n<p></p>\n",innerContent:["\n<p></p>\n"]}],innerHTML:'\n<div class="wp-block-rsvpmaker-guests"></div>\n',innerContent:['\n<div class="wp-block-rsvpmaker-guests">',null,"</div>\n"]};else{if(!l)return void alert("a field label is required");let t=l.toLowerCase().replace(/[^a-z0-9]/,"_");"first_name"==t&&(t="first"),"last_name"==t&&(t="last"),e={blockName:o,innerHTML:"",innerBlocks:[],innerContent:[],attrs:{label:l,slug:t}}}c&&(e.attrs.choicearray=c.split("\n")),console.log("newfield",e);const t=[];A.forEach(((n,r)=>{t.push(n),r==N&&t.push(e)})),O(t),a("rsvpmaker/formfield"),u(""),d("")}},"Add")),(0,t.createElement)("p",null,"You can also open this form ",(0,t.createElement)("a",{href:"/wp-admin/post.php?action=edit&post="+n},"in the WordPress editor"),"."),!e.single_form&&(0,t.createElement)(dt,{label:"Switch Form",value:x,options:R,onChange:r}),S.data.copied&&(0,t.createElement)("p",null,"Copied ",(0,t.createElement)("strong",null,S.data.copied)),!e.single_form&&(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"Save as Reusable Form"),(0,t.createElement)(s.TextControl,{label:"Form Title",value:p,onChange:m}),(0,t.createElement)("p",null,"You can save the form so it can also be used with other events."),(0,t.createElement)("p",null,(0,t.createElement)("button",{onClick:e=>{e.preventDefault(),O(A),m("")}},"Create Form"))))}function vt(e){const n=e=>{console.log("Selecting tab",e)},r=window.location.href.match(/tab=([^&]+)/),o=r?r[1]:"general",[a,i]=(0,t.useState)([]);function l(e,t,n="rsvp_options"){console.log("addchange key",e),console.log("addchange value",t),console.log("addchange type",n),function(e=null,t=null,n="rsvp_options"){if(!e)return a;"reset"==e&&i([]),i((r=>{if(!r||!Array.isArray(r))return[].push(t);console.log("changeset start",r),console.log("changeset new value",t);const o=r.findIndex((t=>t.key==e&&t.type==n));return console.log("changeset exists test",o),o>-1?r[o].value=t:r.push({key:e,value:t,type:n}),console.log("changeset",r),r}))}(e,t,n)}return(0,t.createElement)((()=>(0,t.createElement)(s.TabPanel,{className:"rsvpmaker-tab-panel",activeClass:"nav-tab-active",onSelect:n,initialTabName:o,tabs:[{name:"general",title:"General Settings",className:"nav-tab"},{name:"security",title:"Security",className:"nav-tab"},{name:"payment",title:"Payment",className:"nav-tab"},{name:"forms",title:"Forms",className:"nav-tab"},{name:"email",title:"Email",className:"nav-tab"}]},(n=>"general"==n.name?(0,t.createElement)(st,{addChange:l,setChanges:i,changes:a}):"security"==n.name?(0,t.createElement)(lt,{addChange:l,setChanges:i,changes:a}):"payment"==n.name?(0,t.createElement)(ut,{addChange:l,setChanges:i,changes:a}):"forms"==n.name?(0,t.createElement)(mt,{form_id:e.form_id,addChange:l,setChanges:i,changes:a}):"email"==n.name?(0,t.createElement)(ct,{addChange:l,setChanges:i,changes:a}):(0,t.createElement)("section",null,(0,t.createElement)("p",null,n.title))))),null)}const gt=new i.QueryClient;window.addEventListener("load",(function(e){const n=document.getElementById("rsvpmaker-admin"),o=n.getAttribute("form_id");a().render((0,t.createElement)(r().StrictMode,null,(0,t.createElement)(i.QueryClientProvider,{client:gt},(0,t.createElement)(vt,{form_id:o}))),n)}))})()})();1 (()=>{var e={838:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:o}=Object;let{freeze:a,seal:i,create:s}=Object,{apply:l,construct:u}="undefined"!=typeof Reflect&&Reflect;a||(a=function(e){return e}),i||(i=function(e){return e}),l||(l=function(e,t,n){return e.apply(t,n)}),u||(u=function(e,t){return new e(...t)});const c=S(Array.prototype.forEach),d=S(Array.prototype.pop),f=S(Array.prototype.push),h=S(String.prototype.toLowerCase),p=S(String.prototype.toString),m=S(String.prototype.match),v=S(String.prototype.replace),g=S(String.prototype.indexOf),y=S(String.prototype.trim),b=S(Object.prototype.hasOwnProperty),E=S(RegExp.prototype.test),C=(_=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u(_,t)});var _;function S(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return l(e,t,r)}}function w(e,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;t&&t(e,null);let a=r.length;for(;a--;){let t=r[a];if("string"==typeof t){const e=o(t);e!==t&&(n(r)||(r[a]=e),t=e)}e[t]=!0}return e}function T(e){for(let t=0;t<e.length;t++)b(e,t)||(e[t]=null);return e}function k(t){const n=s(null);for(const[r,o]of e(t))b(t,r)&&(Array.isArray(o)?n[r]=T(o):o&&"object"==typeof o&&o.constructor===Object?n[r]=k(o):n[r]=o);return n}function O(e,t){for(;null!==e;){const n=o(e,t);if(n){if(n.get)return S(n.get);if("function"==typeof n.value)return S(n.value)}e=r(e)}return function(){return null}}const A=a(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),R=a(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),x=a(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),N=a(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),P=a(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),F=a(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),D=a(["#text"]),M=a(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),L=a(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),I=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),U=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),j=i(/\{\{[\w\W]*|[\w\W]*\}\}/gm),q=i(/<%[\w\W]*|[\w\W]*%>/gm),Q=i(/\${[\w\W]*}/gm),B=i(/^data-[\-\w.\u00B7-\uFFFF]/),H=i(/^aria-[\-\w]+$/),z=i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),K=i(/^(?:\w+script|data):/i),G=i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),W=i(/^html$/i),V=i(/^[a-z][.\w]*(-[.\w]+)+$/i);var Y=Object.freeze({__proto__:null,MUSTACHE_EXPR:j,ERB_EXPR:q,TMPLIT_EXPR:Q,DATA_ATTR:B,ARIA_ATTR:H,IS_ALLOWED_URI:z,IS_SCRIPT_OR_DATA:K,ATTR_WHITESPACE:G,DOCTYPE_NAME:W,CUSTOM_ELEMENT:V});const J=function(){return"undefined"==typeof window?null:window};return function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:J();const r=e=>t(e);if(r.version="3.0.11",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;let{document:o}=n;const i=o,l=i.currentScript,{DocumentFragment:u,HTMLTemplateElement:_,Node:S,Element:T,NodeFilter:j,NamedNodeMap:q=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:Q,DOMParser:B,trustedTypes:H}=n,K=T.prototype,G=O(K,"cloneNode"),V=O(K,"nextSibling"),$=O(K,"childNodes"),X=O(K,"parentNode");if("function"==typeof _){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let Z,ee="";const{implementation:te,createNodeIterator:ne,createDocumentFragment:re,getElementsByTagName:oe}=o,{importNode:ae}=i;let ie={};r.isSupported="function"==typeof e&&"function"==typeof X&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:se,ERB_EXPR:le,TMPLIT_EXPR:ue,DATA_ATTR:ce,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:fe,ATTR_WHITESPACE:he,CUSTOM_ELEMENT:pe}=Y;let{IS_ALLOWED_URI:me}=Y,ve=null;const ge=w({},[...A,...R,...x,...P,...D]);let ye=null;const be=w({},[...M,...L,...I,...U]);let Ee=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ce=null,_e=null,Se=!0,we=!0,Te=!1,ke=!0,Oe=!1,Ae=!1,Re=!1,xe=!1,Ne=!1,Pe=!1,Fe=!1,De=!0,Me=!1,Le=!0,Ie=!1,Ue={},je=null;const qe=w({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Qe=null;const Be=w({},["audio","video","img","source","image","track"]);let He=null;const ze=w({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ke="http://www.w3.org/1998/Math/MathML",Ge="http://www.w3.org/2000/svg",We="http://www.w3.org/1999/xhtml";let Ve=We,Ye=!1,Je=null;const $e=w({},[Ke,Ge,We],p);let Xe=null;const Ze=["application/xhtml+xml","text/html"];let et=null,tt=null;const nt=o.createElement("form"),rt=function(e){return e instanceof RegExp||e instanceof Function},ot=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!tt||tt!==e){if(e&&"object"==typeof e||(e={}),e=k(e),Xe=-1===Ze.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,et="application/xhtml+xml"===Xe?p:h,ve=b(e,"ALLOWED_TAGS")?w({},e.ALLOWED_TAGS,et):ge,ye=b(e,"ALLOWED_ATTR")?w({},e.ALLOWED_ATTR,et):be,Je=b(e,"ALLOWED_NAMESPACES")?w({},e.ALLOWED_NAMESPACES,p):$e,He=b(e,"ADD_URI_SAFE_ATTR")?w(k(ze),e.ADD_URI_SAFE_ATTR,et):ze,Qe=b(e,"ADD_DATA_URI_TAGS")?w(k(Be),e.ADD_DATA_URI_TAGS,et):Be,je=b(e,"FORBID_CONTENTS")?w({},e.FORBID_CONTENTS,et):qe,Ce=b(e,"FORBID_TAGS")?w({},e.FORBID_TAGS,et):{},_e=b(e,"FORBID_ATTR")?w({},e.FORBID_ATTR,et):{},Ue=!!b(e,"USE_PROFILES")&&e.USE_PROFILES,Se=!1!==e.ALLOW_ARIA_ATTR,we=!1!==e.ALLOW_DATA_ATTR,Te=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ke=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Oe=e.SAFE_FOR_TEMPLATES||!1,Ae=e.WHOLE_DOCUMENT||!1,Ne=e.RETURN_DOM||!1,Pe=e.RETURN_DOM_FRAGMENT||!1,Fe=e.RETURN_TRUSTED_TYPE||!1,xe=e.FORCE_BODY||!1,De=!1!==e.SANITIZE_DOM,Me=e.SANITIZE_NAMED_PROPS||!1,Le=!1!==e.KEEP_CONTENT,Ie=e.IN_PLACE||!1,me=e.ALLOWED_URI_REGEXP||z,Ve=e.NAMESPACE||We,Ee=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ee.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ee.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ee.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Oe&&(we=!1),Pe&&(Ne=!0),Ue&&(ve=w({},D),ye=[],!0===Ue.html&&(w(ve,A),w(ye,M)),!0===Ue.svg&&(w(ve,R),w(ye,L),w(ye,U)),!0===Ue.svgFilters&&(w(ve,x),w(ye,L),w(ye,U)),!0===Ue.mathMl&&(w(ve,P),w(ye,I),w(ye,U))),e.ADD_TAGS&&(ve===ge&&(ve=k(ve)),w(ve,e.ADD_TAGS,et)),e.ADD_ATTR&&(ye===be&&(ye=k(ye)),w(ye,e.ADD_ATTR,et)),e.ADD_URI_SAFE_ATTR&&w(He,e.ADD_URI_SAFE_ATTR,et),e.FORBID_CONTENTS&&(je===qe&&(je=k(je)),w(je,e.FORBID_CONTENTS,et)),Le&&(ve["#text"]=!0),Ae&&w(ve,["html","head","body"]),ve.table&&(w(ve,["tbody"]),delete Ce.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw C('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw C('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Z=e.TRUSTED_TYPES_POLICY,ee=Z.createHTML("")}else void 0===Z&&(Z=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(H,l)),null!==Z&&"string"==typeof ee&&(ee=Z.createHTML(""));a&&a(e),tt=e}},at=w({},["mi","mo","mn","ms","mtext"]),it=w({},["foreignobject","desc","title","annotation-xml"]),st=w({},["title","style","font","a","script"]),lt=w({},[...R,...x,...N]),ut=w({},[...P,...F]),ct=function(e){f(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},dt=function(e,t){try{f(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ye[e])if(Ne||Pe)try{ct(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ft=function(e){let t=null,n=null;if(xe)e="<remove></remove>"+e;else{const t=m(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Xe&&Ve===We&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=Z?Z.createHTML(e):e;if(Ve===We)try{t=(new B).parseFromString(r,Xe)}catch(e){}if(!t||!t.documentElement){t=te.createDocument(Ve,"template",null);try{t.documentElement.innerHTML=Ye?ee:r}catch(e){}}const a=t.body||t.documentElement;return e&&n&&a.insertBefore(o.createTextNode(n),a.childNodes[0]||null),Ve===We?oe.call(t,Ae?"html":"body")[0]:Ae?t.documentElement:a},ht=function(e){return ne.call(e.ownerDocument||e,e,j.SHOW_ELEMENT|j.SHOW_COMMENT|j.SHOW_TEXT|j.SHOW_PROCESSING_INSTRUCTION|j.SHOW_CDATA_SECTION,null)},pt=function(e){return"function"==typeof S&&e instanceof S},mt=function(e,t,n){ie[e]&&c(ie[e],(e=>{e.call(r,t,n,tt)}))},vt=function(e){let t=null;if(mt("beforeSanitizeElements",e,null),(n=e)instanceof Q&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof q)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return ct(e),!0;var n;const o=et(e.nodeName);if(mt("uponSanitizeElement",e,{tagName:o,allowedTags:ve}),e.hasChildNodes()&&!pt(e.firstElementChild)&&E(/<[/\w]/g,e.innerHTML)&&E(/<[/\w]/g,e.textContent))return ct(e),!0;if(7===e.nodeType)return ct(e),!0;if(!ve[o]||Ce[o]){if(!Ce[o]&&yt(o)){if(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,o))return!1;if(Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(o))return!1}if(Le&&!je[o]){const t=X(e)||e.parentNode,n=$(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(G(n[r],!0),V(e))}return ct(e),!0}return e instanceof T&&!function(e){let t=X(e);t&&t.tagName||(t={namespaceURI:Ve,tagName:"template"});const n=h(e.tagName),r=h(t.tagName);return!!Je[e.namespaceURI]&&(e.namespaceURI===Ge?t.namespaceURI===We?"svg"===n:t.namespaceURI===Ke?"svg"===n&&("annotation-xml"===r||at[r]):Boolean(lt[n]):e.namespaceURI===Ke?t.namespaceURI===We?"math"===n:t.namespaceURI===Ge?"math"===n&&it[r]:Boolean(ut[n]):e.namespaceURI===We?!(t.namespaceURI===Ge&&!it[r])&&!(t.namespaceURI===Ke&&!at[r])&&!ut[n]&&(st[n]||!lt[n]):!("application/xhtml+xml"!==Xe||!Je[e.namespaceURI]))}(e)?(ct(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!E(/<\/no(script|embed|frames)/i,e.innerHTML)?(Oe&&3===e.nodeType&&(t=e.textContent,c([se,le,ue],(e=>{t=v(t,e," ")})),e.textContent!==t&&(f(r.removed,{element:e.cloneNode()}),e.textContent=t)),mt("afterSanitizeElements",e,null),!1):(ct(e),!0)},gt=function(e,t,n){if(De&&("id"===t||"name"===t)&&(n in o||n in nt))return!1;if(we&&!_e[t]&&E(ce,t));else if(Se&&E(de,t));else if(!ye[t]||_e[t]){if(!(yt(e)&&(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,e)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(e))&&(Ee.attributeNameCheck instanceof RegExp&&E(Ee.attributeNameCheck,t)||Ee.attributeNameCheck instanceof Function&&Ee.attributeNameCheck(t))||"is"===t&&Ee.allowCustomizedBuiltInElements&&(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,n)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(n))))return!1}else if(He[t]);else if(E(me,v(n,he,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==g(n,"data:")||!Qe[e])if(Te&&!E(fe,v(n,he,"")));else if(n)return!1;return!0},yt=function(e){return"annotation-xml"!==e&&m(e,pe)},bt=function(e){mt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ye};let o=t.length;for(;o--;){const a=t[o],{name:i,namespaceURI:s,value:l}=a,u=et(i);let f="value"===i?l:y(l);if(n.attrName=u,n.attrValue=f,n.keepAttr=!0,n.forceKeepAttr=void 0,mt("uponSanitizeAttribute",e,n),f=n.attrValue,n.forceKeepAttr)continue;if(dt(i,e),!n.keepAttr)continue;if(!ke&&E(/\/>/i,f)){dt(i,e);continue}Oe&&c([se,le,ue],(e=>{f=v(f,e," ")}));const h=et(e.nodeName);if(gt(h,u,f)){if(!Me||"id"!==u&&"name"!==u||(dt(i,e),f="user-content-"+f),Z&&"object"==typeof H&&"function"==typeof H.getAttributeType)if(s);else switch(H.getAttributeType(h,u)){case"TrustedHTML":f=Z.createHTML(f);break;case"TrustedScriptURL":f=Z.createScriptURL(f)}try{s?e.setAttributeNS(s,i,f):e.setAttribute(i,f),d(r.removed)}catch(e){}}}mt("afterSanitizeAttributes",e,null)},Et=function e(t){let n=null;const r=ht(t);for(mt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)mt("uponSanitizeShadowNode",n,null),vt(n)||(n.content instanceof u&&e(n.content),bt(n));mt("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,a=null,s=null;if(Ye=!e,Ye&&(e="\x3c!--\x3e"),"string"!=typeof e&&!pt(e)){if("function"!=typeof e.toString)throw C("toString is not a function");if("string"!=typeof(e=e.toString()))throw C("dirty is not a string, aborting")}if(!r.isSupported)return e;if(Re||ot(t),r.removed=[],"string"==typeof e&&(Ie=!1),Ie){if(e.nodeName){const t=et(e.nodeName);if(!ve[t]||Ce[t])throw C("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof S)n=ft("\x3c!----\x3e"),o=n.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?n=o:n.appendChild(o);else{if(!Ne&&!Oe&&!Ae&&-1===e.indexOf("<"))return Z&&Fe?Z.createHTML(e):e;if(n=ft(e),!n)return Ne?null:Fe?ee:""}n&&xe&&ct(n.firstChild);const l=ht(Ie?e:n);for(;a=l.nextNode();)vt(a)||(a.content instanceof u&&Et(a.content),bt(a));if(Ie)return e;if(Ne){if(Pe)for(s=re.call(n.ownerDocument);n.firstChild;)s.appendChild(n.firstChild);else s=n;return(ye.shadowroot||ye.shadowrootmode)&&(s=ae.call(i,s,!0)),s}let d=Ae?n.outerHTML:n.innerHTML;return Ae&&ve["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&E(W,n.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+d),Oe&&c([se,le,ue],(e=>{d=v(d,e," ")})),Z&&Fe?Z.createHTML(d):d},r.setConfig=function(){ot(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Re=!0},r.clearConfig=function(){tt=null,Re=!1},r.isValidAttribute=function(e,t,n){tt||ot({});const r=et(e),o=et(t);return gt(r,o,n)},r.addHook=function(e,t){"function"==typeof t&&(ie[e]=ie[e]||[],f(ie[e],t))},r.removeHook=function(e){if(ie[e])return d(ie[e])},r.removeHooks=function(e){ie[e]&&(ie[e]=[])},r.removeAllHooks=function(){ie={}},r}()}()},289:(e,t,n)=>{"use strict";n.d(t,{m:()=>i});var r=n(540),o=n(287),a=n(941),i=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!a.S$&&(null==(t=window)?void 0:t.addEventListener)){var n=function(){return e()};return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),function(){window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}},t}(0,r.A)(t,e);var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)},n.setEventListener=function(e){var t,n=this;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((function(e){"boolean"==typeof e?n.setFocused(e):n.onFocus()}))},n.setFocused=function(e){this.focused=e,e&&this.onFocus()},n.onFocus=function(){this.listeners.forEach((function(e){e()}))},n.isFocused=function(){return"boolean"==typeof this.focused?this.focused:"undefined"==typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)},t}(o.Q))},468:(e,t,n)=>{"use strict";n.d(t,{QueryClient:()=>r.E});var r=n(98),o=n(449);n.o(o,"QueryClientProvider")&&n.d(t,{QueryClientProvider:function(){return o.QueryClientProvider}}),n.o(o,"useMutation")&&n.d(t,{useMutation:function(){return o.useMutation}}),n.o(o,"useQuery")&&n.d(t,{useQuery:function(){return o.useQuery}}),n.o(o,"useQueryClient")&&n.d(t,{useQueryClient:function(){return o.useQueryClient}})},690:(e,t,n)=>{"use strict";n.d(t,{B:()=>a,t:()=>o});var r=console;function o(){return r}function a(e){r=e}},465:(e,t,n)=>{"use strict";n.d(t,{$:()=>u,s:()=>l});var r=n(168),o=n(690),a=n(428),i=n(281),s=n(941),l=function(){function e(e){this.options=(0,r.A)({},e.defaultOptions,e.options),this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.observers=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0},this.meta=e.meta}var t=e.prototype;return t.setState=function(e){this.dispatch({type:"setState",state:e})},t.addObserver=function(e){-1===this.observers.indexOf(e)&&this.observers.push(e)},t.removeObserver=function(e){this.observers=this.observers.filter((function(t){return t!==e}))},t.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(s.lQ).catch(s.lQ)):Promise.resolve()},t.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},t.execute=function(){var e,t=this,n="loading"===this.state.status,r=Promise.resolve();return n||(this.dispatch({type:"loading",variables:this.options.variables}),r=r.then((function(){null==t.mutationCache.config.onMutate||t.mutationCache.config.onMutate(t.state.variables,t)})).then((function(){return null==t.options.onMutate?void 0:t.options.onMutate(t.state.variables)})).then((function(e){e!==t.state.context&&t.dispatch({type:"loading",context:e,variables:t.state.variables})}))),r.then((function(){return t.executeMutation()})).then((function(n){e=n,null==t.mutationCache.config.onSuccess||t.mutationCache.config.onSuccess(e,t.state.variables,t.state.context,t)})).then((function(){return null==t.options.onSuccess?void 0:t.options.onSuccess(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(e,null,t.state.variables,t.state.context)})).then((function(){return t.dispatch({type:"success",data:e}),e})).catch((function(e){return null==t.mutationCache.config.onError||t.mutationCache.config.onError(e,t.state.variables,t.state.context,t),(0,o.t)().error(e),Promise.resolve().then((function(){return null==t.options.onError?void 0:t.options.onError(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(void 0,e,t.state.variables,t.state.context)})).then((function(){throw t.dispatch({type:"error",error:e}),e}))}))},t.executeMutation=function(){var e,t=this;return this.retryer=new i.eJ({fn:function(){return t.options.mutationFn?t.options.mutationFn(t.state.variables):Promise.reject("No mutationFn found")},onFail:function(){t.dispatch({type:"failed"})},onPause:function(){t.dispatch({type:"pause"})},onContinue:function(){t.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay}),this.retryer.promise},t.dispatch=function(e){var t=this;this.state=function(e,t){switch(t.type){case"failed":return(0,r.A)({},e,{failureCount:e.failureCount+1});case"pause":return(0,r.A)({},e,{isPaused:!0});case"continue":return(0,r.A)({},e,{isPaused:!1});case"loading":return(0,r.A)({},e,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return(0,r.A)({},e,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return(0,r.A)({},e,{data:void 0,error:t.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return(0,r.A)({},e,t.state);default:return e}}(this.state,e),a.j.batch((function(){t.observers.forEach((function(t){t.onMutationUpdate(e)})),t.mutationCache.notify(t)}))},e}();function u(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}},428:(e,t,n)=>{"use strict";n.d(t,{j:()=>o});var r=n(941),o=new(function(){function e(){this.queue=[],this.transactions=0,this.notifyFn=function(e){e()},this.batchNotifyFn=function(e){e()}}var t=e.prototype;return t.batch=function(e){var t;this.transactions++;try{t=e()}finally{this.transactions--,this.transactions||this.flush()}return t},t.schedule=function(e){var t=this;this.transactions?this.queue.push(e):(0,r.G6)((function(){t.notifyFn(e)}))},t.batchCalls=function(e){var t=this;return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];t.schedule((function(){e.apply(void 0,r)}))}},t.flush=function(){var e=this,t=this.queue;this.queue=[],t.length&&(0,r.G6)((function(){e.batchNotifyFn((function(){t.forEach((function(t){e.notifyFn(t)}))}))}))},t.setNotifyFunction=function(e){this.notifyFn=e},t.setBatchNotifyFunction=function(e){this.batchNotifyFn=e},e}())},622:(e,t,n)=>{"use strict";n.d(t,{t:()=>i});var r=n(540),o=n(287),a=n(941),i=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!a.S$&&(null==(t=window)?void 0:t.addEventListener)){var n=function(){return e()};return window.addEventListener("online",n,!1),window.addEventListener("offline",n,!1),function(){window.removeEventListener("online",n),window.removeEventListener("offline",n)}}},t}(0,r.A)(t,e);var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)},n.setEventListener=function(e){var t,n=this;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((function(e){"boolean"==typeof e?n.setOnline(e):n.onOnline()}))},n.setOnline=function(e){this.online=e,e&&this.onOnline()},n.onOnline=function(){this.listeners.forEach((function(e){e()}))},n.isOnline=function(){return"boolean"==typeof this.online?this.online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine},t}(o.Q))},98:(e,t,n)=>{"use strict";n.d(t,{E:()=>g});var r=n(168),o=n(941),a=n(540),i=n(428),s=n(690),l=n(281),u=function(){function e(e){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=e.meta,this.scheduleGc()}var t=e.prototype;return t.setOptions=function(e){var t;this.options=(0,r.A)({},this.defaultOptions,e),this.meta=null==e?void 0:e.meta,this.cacheTime=Math.max(this.cacheTime||0,null!=(t=this.options.cacheTime)?t:3e5)},t.setDefaultOptions=function(e){this.defaultOptions=e},t.scheduleGc=function(){var e=this;this.clearGcTimeout(),(0,o.gn)(this.cacheTime)&&(this.gcTimeout=setTimeout((function(){e.optionalRemove()}),this.cacheTime))},t.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},t.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},t.setData=function(e,t){var n,r,a=this.state.data,i=(0,o.Zw)(e,a);return(null==(n=(r=this.options).isDataEqual)?void 0:n.call(r,a,i))?i=a:!1!==this.options.structuralSharing&&(i=(0,o.BH)(a,i)),this.dispatch({data:i,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt}),i},t.setState=function(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})},t.cancel=function(e){var t,n=this.promise;return null==(t=this.retryer)||t.cancel(e),n?n.then(o.lQ).catch(o.lQ):Promise.resolve()},t.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},t.reset=function(){this.destroy(),this.setState(this.initialState)},t.isActive=function(){return this.observers.some((function(e){return!1!==e.options.enabled}))},t.isFetching=function(){return this.state.isFetching},t.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some((function(e){return e.getCurrentResult().isStale}))},t.isStaleByTime=function(e){return void 0===e&&(e=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!(0,o.j3)(this.state.dataUpdatedAt,e)},t.onFocus=function(){var e,t=this.observers.find((function(e){return e.shouldFetchOnWindowFocus()}));t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.onOnline=function(){var e,t=this.observers.find((function(e){return e.shouldFetchOnReconnect()}));t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.addObserver=function(e){-1===this.observers.indexOf(e)&&(this.observers.push(e),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))},t.removeObserver=function(e){-1!==this.observers.indexOf(e)&&(this.observers=this.observers.filter((function(t){return t!==e})),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:e}))},t.getObserversCount=function(){return this.observers.length},t.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},t.fetch=function(e,t){var n,r,a,i=this;if(this.state.isFetching)if(this.state.dataUpdatedAt&&(null==t?void 0:t.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var u;return null==(u=this.retryer)||u.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){var c=this.observers.find((function(e){return e.options.queryFn}));c&&this.setOptions(c.options)}var d=(0,o.HN)(this.queryKey),f=(0,o.jY)(),h={queryKey:d,pageParam:void 0,meta:this.meta};Object.defineProperty(h,"signal",{enumerable:!0,get:function(){if(f)return i.abortSignalConsumed=!0,f.signal}});var p,m,v={fetchOptions:t,options:this.options,queryKey:d,state:this.state,fetchFn:function(){return i.options.queryFn?(i.abortSignalConsumed=!1,i.options.queryFn(h)):Promise.reject("Missing queryFn")},meta:this.meta};return(null==(n=this.options.behavior)?void 0:n.onFetch)&&(null==(p=this.options.behavior)||p.onFetch(v)),this.revertState=this.state,this.state.isFetching&&this.state.fetchMeta===(null==(r=v.fetchOptions)?void 0:r.meta)||this.dispatch({type:"fetch",meta:null==(m=v.fetchOptions)?void 0:m.meta}),this.retryer=new l.eJ({fn:v.fetchFn,abort:null==f||null==(a=f.abort)?void 0:a.bind(f),onSuccess:function(e){i.setData(e),null==i.cache.config.onSuccess||i.cache.config.onSuccess(e,i),0===i.cacheTime&&i.optionalRemove()},onError:function(e){(0,l.wm)(e)&&e.silent||i.dispatch({type:"error",error:e}),(0,l.wm)(e)||(null==i.cache.config.onError||i.cache.config.onError(e,i),(0,s.t)().error(e)),0===i.cacheTime&&i.optionalRemove()},onFail:function(){i.dispatch({type:"failed"})},onPause:function(){i.dispatch({type:"pause"})},onContinue:function(){i.dispatch({type:"continue"})},retry:v.options.retry,retryDelay:v.options.retryDelay}),this.promise=this.retryer.promise,this.promise},t.dispatch=function(e){var t=this;this.state=this.reducer(this.state,e),i.j.batch((function(){t.observers.forEach((function(t){t.onQueryUpdate(e)})),t.cache.notify({query:t,type:"queryUpdated",action:e})}))},t.getDefaultState=function(e){var t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==e.initialData?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0,r=void 0!==t;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?null!=n?n:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:r?"success":"idle"}},t.reducer=function(e,t){var n,o;switch(t.type){case"failed":return(0,r.A)({},e,{fetchFailureCount:e.fetchFailureCount+1});case"pause":return(0,r.A)({},e,{isPaused:!0});case"continue":return(0,r.A)({},e,{isPaused:!1});case"fetch":return(0,r.A)({},e,{fetchFailureCount:0,fetchMeta:null!=(n=t.meta)?n:null,isFetching:!0,isPaused:!1},!e.dataUpdatedAt&&{error:null,status:"loading"});case"success":return(0,r.A)({},e,{data:t.data,dataUpdateCount:e.dataUpdateCount+1,dataUpdatedAt:null!=(o=t.dataUpdatedAt)?o:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var a=t.error;return(0,l.wm)(a)&&a.revert&&this.revertState?(0,r.A)({},this.revertState):(0,r.A)({},e,{error:a,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return(0,r.A)({},e,{isInvalidated:!0});case"setState":return(0,r.A)({},e,t.state);default:return e}},e}(),c=n(287),d=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.queries=[],n.queriesMap={},n}(0,a.A)(t,e);var n=t.prototype;return n.build=function(e,t,n){var r,a=t.queryKey,i=null!=(r=t.queryHash)?r:(0,o.F$)(a,t),s=this.get(i);return s||(s=new u({cache:this,queryKey:a,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(a),meta:t.meta}),this.add(s)),s},n.add=function(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"queryAdded",query:e}))},n.remove=function(e){var t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter((function(t){return t!==e})),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"queryRemoved",query:e}))},n.clear=function(){var e=this;i.j.batch((function(){e.queries.forEach((function(t){e.remove(t)}))}))},n.get=function(e){return this.queriesMap[e]},n.getAll=function(){return this.queries},n.find=function(e,t){var n=(0,o.b_)(e,t)[0];return void 0===n.exact&&(n.exact=!0),this.queries.find((function(e){return(0,o.MK)(n,e)}))},n.findAll=function(e,t){var n=(0,o.b_)(e,t)[0];return Object.keys(n).length>0?this.queries.filter((function(e){return(0,o.MK)(n,e)})):this.queries},n.notify=function(e){var t=this;i.j.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},n.onFocus=function(){var e=this;i.j.batch((function(){e.queries.forEach((function(e){e.onFocus()}))}))},n.onOnline=function(){var e=this;i.j.batch((function(){e.queries.forEach((function(e){e.onOnline()}))}))},t}(c.Q),f=n(465),h=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.mutations=[],n.mutationId=0,n}(0,a.A)(t,e);var n=t.prototype;return n.build=function(e,t,n){var r=new f.s({mutationCache:this,mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:n,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0,meta:t.meta});return this.add(r),r},n.add=function(e){this.mutations.push(e),this.notify(e)},n.remove=function(e){this.mutations=this.mutations.filter((function(t){return t!==e})),e.cancel(),this.notify(e)},n.clear=function(){var e=this;i.j.batch((function(){e.mutations.forEach((function(t){e.remove(t)}))}))},n.getAll=function(){return this.mutations},n.find=function(e){return void 0===e.exact&&(e.exact=!0),this.mutations.find((function(t){return(0,o.nJ)(e,t)}))},n.findAll=function(e){return this.mutations.filter((function(t){return(0,o.nJ)(e,t)}))},n.notify=function(e){var t=this;i.j.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},n.onFocus=function(){this.resumePausedMutations()},n.onOnline=function(){this.resumePausedMutations()},n.resumePausedMutations=function(){var e=this.mutations.filter((function(e){return e.state.isPaused}));return i.j.batch((function(){return e.reduce((function(e,t){return e.then((function(){return t.continue().catch(o.lQ)}))}),Promise.resolve())}))},t}(c.Q),p=n(289),m=n(622);function v(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}var g=function(){function e(e){void 0===e&&(e={}),this.queryCache=e.queryCache||new d,this.mutationCache=e.mutationCache||new h,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var t=e.prototype;return t.mount=function(){var e=this;this.unsubscribeFocus=p.m.subscribe((function(){p.m.isFocused()&&m.t.isOnline()&&(e.mutationCache.onFocus(),e.queryCache.onFocus())})),this.unsubscribeOnline=m.t.subscribe((function(){p.m.isFocused()&&m.t.isOnline()&&(e.mutationCache.onOnline(),e.queryCache.onOnline())}))},t.unmount=function(){var e,t;null==(e=this.unsubscribeFocus)||e.call(this),null==(t=this.unsubscribeOnline)||t.call(this)},t.isFetching=function(e,t){var n=(0,o.b_)(e,t)[0];return n.fetching=!0,this.queryCache.findAll(n).length},t.isMutating=function(e){return this.mutationCache.findAll((0,r.A)({},e,{fetching:!0})).length},t.getQueryData=function(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state.data},t.getQueriesData=function(e){return this.getQueryCache().findAll(e).map((function(e){return[e.queryKey,e.state.data]}))},t.setQueryData=function(e,t,n){var r=(0,o.vh)(e),a=this.defaultQueryOptions(r);return this.queryCache.build(this,a).setData(t,n)},t.setQueriesData=function(e,t,n){var r=this;return i.j.batch((function(){return r.getQueryCache().findAll(e).map((function(e){var o=e.queryKey;return[o,r.setQueryData(o,t,n)]}))}))},t.getQueryState=function(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state},t.removeQueries=function(e,t){var n=(0,o.b_)(e,t)[0],r=this.queryCache;i.j.batch((function(){r.findAll(n).forEach((function(e){r.remove(e)}))}))},t.resetQueries=function(e,t,n){var a=this,s=(0,o.b_)(e,t,n),l=s[0],u=s[1],c=this.queryCache,d=(0,r.A)({},l,{active:!0});return i.j.batch((function(){return c.findAll(l).forEach((function(e){e.reset()})),a.refetchQueries(d,u)}))},t.cancelQueries=function(e,t,n){var r=this,a=(0,o.b_)(e,t,n),s=a[0],l=a[1],u=void 0===l?{}:l;void 0===u.revert&&(u.revert=!0);var c=i.j.batch((function(){return r.queryCache.findAll(s).map((function(e){return e.cancel(u)}))}));return Promise.all(c).then(o.lQ).catch(o.lQ)},t.invalidateQueries=function(e,t,n){var a,s,l,u=this,c=(0,o.b_)(e,t,n),d=c[0],f=c[1],h=(0,r.A)({},d,{active:null==(a=null!=(s=d.refetchActive)?s:d.active)||a,inactive:null!=(l=d.refetchInactive)&&l});return i.j.batch((function(){return u.queryCache.findAll(d).forEach((function(e){e.invalidate()})),u.refetchQueries(h,f)}))},t.refetchQueries=function(e,t,n){var a=this,s=(0,o.b_)(e,t,n),l=s[0],u=s[1],c=i.j.batch((function(){return a.queryCache.findAll(l).map((function(e){return e.fetch(void 0,(0,r.A)({},u,{meta:{refetchPage:null==l?void 0:l.refetchPage}}))}))})),d=Promise.all(c).then(o.lQ);return(null==u?void 0:u.throwOnError)||(d=d.catch(o.lQ)),d},t.fetchQuery=function(e,t,n){var r=(0,o.vh)(e,t,n),a=this.defaultQueryOptions(r);void 0===a.retry&&(a.retry=!1);var i=this.queryCache.build(this,a);return i.isStaleByTime(a.staleTime)?i.fetch(a):Promise.resolve(i.state.data)},t.prefetchQuery=function(e,t,n){return this.fetchQuery(e,t,n).then(o.lQ).catch(o.lQ)},t.fetchInfiniteQuery=function(e,t,n){var r=(0,o.vh)(e,t,n);return r.behavior={onFetch:function(e){e.fetchFn=function(){var t,n,r,a,i,s,u,c,d,f=null==(t=e.fetchOptions)||null==(n=t.meta)?void 0:n.refetchPage,h=null==(r=e.fetchOptions)||null==(a=r.meta)?void 0:a.fetchMore,p=null==h?void 0:h.pageParam,m="forward"===(null==h?void 0:h.direction),g="backward"===(null==h?void 0:h.direction),y=(null==(i=e.state.data)?void 0:i.pages)||[],b=(null==(s=e.state.data)?void 0:s.pageParams)||[],E=(0,o.jY)(),C=null==E?void 0:E.signal,_=b,S=!1,w=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},T=function(e,t,n,r){return _=r?[t].concat(_):[].concat(_,[t]),r?[n].concat(e):[].concat(e,[n])},k=function(t,n,r,o){if(S)return Promise.reject("Cancelled");if(void 0===r&&!n&&t.length)return Promise.resolve(t);var a={queryKey:e.queryKey,signal:C,pageParam:r,meta:e.meta},i=w(a),s=Promise.resolve(i).then((function(e){return T(t,r,e,o)}));return(0,l.dd)(i)&&(s.cancel=i.cancel),s};if(y.length)if(m){var O=void 0!==p,A=O?p:v(e.options,y);u=k(y,O,A)}else if(g){var R=void 0!==p,x=R?p:(c=e.options,d=y,null==c.getPreviousPageParam?void 0:c.getPreviousPageParam(d[0],d));u=k(y,R,x,!0)}else!function(){_=[];var t=void 0===e.options.getNextPageParam,n=!f||!y[0]||f(y[0],0,y);u=n?k([],t,b[0]):Promise.resolve(T([],b[0],y[0]));for(var r=function(n){u=u.then((function(r){if(!f||!y[n]||f(y[n],n,y)){var o=t?b[n]:v(e.options,r);return k(r,t,o)}return Promise.resolve(T(r,b[n],y[n]))}))},o=1;o<y.length;o++)r(o)}();else u=k([]);var N=u.then((function(e){return{pages:e,pageParams:_}}));return N.cancel=function(){S=!0,null==E||E.abort(),(0,l.dd)(u)&&u.cancel()},N}}},this.fetchQuery(r)},t.prefetchInfiniteQuery=function(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(o.lQ).catch(o.lQ)},t.cancelMutations=function(){var e=this,t=i.j.batch((function(){return e.mutationCache.getAll().map((function(e){return e.cancel()}))}));return Promise.all(t).then(o.lQ).catch(o.lQ)},t.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},t.executeMutation=function(e){return this.mutationCache.build(this,e).execute()},t.getQueryCache=function(){return this.queryCache},t.getMutationCache=function(){return this.mutationCache},t.getDefaultOptions=function(){return this.defaultOptions},t.setDefaultOptions=function(e){this.defaultOptions=e},t.setQueryDefaults=function(e,t){var n=this.queryDefaults.find((function(t){return(0,o.Od)(e)===(0,o.Od)(t.queryKey)}));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})},t.getQueryDefaults=function(e){var t;return e?null==(t=this.queryDefaults.find((function(t){return(0,o.Cp)(e,t.queryKey)})))?void 0:t.defaultOptions:void 0},t.setMutationDefaults=function(e,t){var n=this.mutationDefaults.find((function(t){return(0,o.Od)(e)===(0,o.Od)(t.mutationKey)}));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})},t.getMutationDefaults=function(e){var t;return e?null==(t=this.mutationDefaults.find((function(t){return(0,o.Cp)(e,t.mutationKey)})))?void 0:t.defaultOptions:void 0},t.defaultQueryOptions=function(e){if(null==e?void 0:e._defaulted)return e;var t=(0,r.A)({},this.defaultOptions.queries,this.getQueryDefaults(null==e?void 0:e.queryKey),e,{_defaulted:!0});return!t.queryHash&&t.queryKey&&(t.queryHash=(0,o.F$)(t.queryKey,t)),t},t.defaultQueryObserverOptions=function(e){return this.defaultQueryOptions(e)},t.defaultMutationOptions=function(e){return(null==e?void 0:e._defaulted)?e:(0,r.A)({},this.defaultOptions.mutations,this.getMutationDefaults(null==e?void 0:e.mutationKey),e,{_defaulted:!0})},t.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},e}()},281:(e,t,n)=>{"use strict";n.d(t,{dd:()=>s,eJ:()=>c,wm:()=>u});var r=n(289),o=n(622),a=n(941);function i(e){return Math.min(1e3*Math.pow(2,e),3e4)}function s(e){return"function"==typeof(null==e?void 0:e.cancel)}var l=function(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent};function u(e){return e instanceof l}var c=function(e){var t,n,u,c,d=this,f=!1;this.abort=e.abort,this.cancel=function(e){return null==t?void 0:t(e)},this.cancelRetry=function(){f=!0},this.continueRetry=function(){f=!1},this.continue=function(){return null==n?void 0:n()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise((function(e,t){u=e,c=t}));var h=function(t){d.isResolved||(d.isResolved=!0,null==e.onSuccess||e.onSuccess(t),null==n||n(),u(t))},p=function(t){d.isResolved||(d.isResolved=!0,null==e.onError||e.onError(t),null==n||n(),c(t))};!function u(){if(!d.isResolved){var c;try{c=e.fn()}catch(e){c=Promise.reject(e)}t=function(e){if(!d.isResolved&&(p(new l(e)),null==d.abort||d.abort(),s(c)))try{c.cancel()}catch(e){}},d.isTransportCancelable=s(c),Promise.resolve(c).then(h).catch((function(t){var s,l;if(!d.isResolved){var c=null!=(s=e.retry)?s:3,h=null!=(l=e.retryDelay)?l:i,m="function"==typeof h?h(d.failureCount,t):h,v=!0===c||"number"==typeof c&&d.failureCount<c||"function"==typeof c&&c(d.failureCount,t);!f&&v?(d.failureCount++,null==e.onFail||e.onFail(d.failureCount,t),(0,a.yy)(m).then((function(){if(!r.m.isFocused()||!o.t.isOnline())return new Promise((function(t){n=t,d.isPaused=!0,null==e.onPause||e.onPause()})).then((function(){n=void 0,d.isPaused=!1,null==e.onContinue||e.onContinue()}))})).then((function(){f?p(t):u()}))):p(t)}}))}}()}},287:(e,t,n)=>{"use strict";n.d(t,{Q:()=>r});var r=function(){function e(){this.listeners=[]}var t=e.prototype;return t.subscribe=function(e){var t=this,n=e||function(){};return this.listeners.push(n),this.onSubscribe(),function(){t.listeners=t.listeners.filter((function(e){return e!==n})),t.onUnsubscribe()}},t.hasListeners=function(){return this.listeners.length>0},t.onSubscribe=function(){},t.onUnsubscribe=function(){},e}()},449:()=>{},941:(e,t,n)=>{"use strict";n.d(t,{BH:()=>b,Cp:()=>g,F$:()=>m,G6:()=>T,GR:()=>d,HN:()=>l,MK:()=>h,Od:()=>v,S$:()=>o,Zw:()=>i,b_:()=>f,f8:()=>E,gn:()=>s,j3:()=>u,jY:()=>k,lQ:()=>a,nJ:()=>p,vh:()=>c,yy:()=>w});var r=n(168),o="undefined"==typeof window;function a(){}function i(e,t){return"function"==typeof e?e(t):e}function s(e){return"number"==typeof e&&e>=0&&e!==1/0}function l(e){return Array.isArray(e)?e:[e]}function u(e,t){return Math.max(e+(t||0)-Date.now(),0)}function c(e,t,n){return S(e)?"function"==typeof t?(0,r.A)({},n,{queryKey:e,queryFn:t}):(0,r.A)({},t,{queryKey:e}):e}function d(e,t,n){return S(e)?"function"==typeof t?(0,r.A)({},n,{mutationKey:e,mutationFn:t}):(0,r.A)({},t,{mutationKey:e}):"function"==typeof e?(0,r.A)({},t,{mutationFn:e}):(0,r.A)({},e)}function f(e,t,n){return S(e)?[(0,r.A)({},t,{queryKey:e}),n]:[e||{},t]}function h(e,t){var n=e.active,r=e.exact,o=e.fetching,a=e.inactive,i=e.predicate,s=e.queryKey,l=e.stale;if(S(s))if(r){if(t.queryHash!==m(s,t.options))return!1}else if(!g(t.queryKey,s))return!1;var u=function(e,t){return!0===e&&!0===t||null==e&&null==t?"all":!1===e&&!1===t?"none":(null!=e?e:!t)?"active":"inactive"}(n,a);if("none"===u)return!1;if("all"!==u){var c=t.isActive();if("active"===u&&!c)return!1;if("inactive"===u&&c)return!1}return!("boolean"==typeof l&&t.isStale()!==l||"boolean"==typeof o&&t.isFetching()!==o||i&&!i(t))}function p(e,t){var n=e.exact,r=e.fetching,o=e.predicate,a=e.mutationKey;if(S(a)){if(!t.options.mutationKey)return!1;if(n){if(v(t.options.mutationKey)!==v(a))return!1}else if(!g(t.options.mutationKey,a))return!1}return!("boolean"==typeof r&&"loading"===t.state.status!==r||o&&!o(t))}function m(e,t){return((null==t?void 0:t.queryKeyHashFn)||v)(e)}function v(e){return function(e){return JSON.stringify(e,(function(e,t){return C(t)?Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{}):t}))}(l(e))}function g(e,t){return y(l(e),l(t))}function y(e,t){return e===t||typeof e==typeof t&&!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((function(n){return!y(e[n],t[n])}))}function b(e,t){if(e===t)return e;var n=Array.isArray(e)&&Array.isArray(t);if(n||C(e)&&C(t)){for(var r=n?e.length:Object.keys(e).length,o=n?t:Object.keys(t),a=o.length,i=n?[]:{},s=0,l=0;l<a;l++){var u=n?l:o[l];i[u]=b(e[u],t[u]),i[u]===e[u]&&s++}return r===a&&s===r?e:i}return t}function E(e,t){if(e&&!t||t&&!e)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}function C(e){if(!_(e))return!1;var t=e.constructor;if(void 0===t)return!0;var n=t.prototype;return!!_(n)&&!!n.hasOwnProperty("isPrototypeOf")}function _(e){return"[object Object]"===Object.prototype.toString.call(e)}function S(e){return"string"==typeof e||Array.isArray(e)}function w(e){return new Promise((function(t){setTimeout(t,e)}))}function T(e){Promise.resolve().then(e).catch((function(e){return setTimeout((function(){throw e}))}))}function k(){if("function"==typeof AbortController)return new AbortController}},942:(e,t,n)=>{"use strict";n.d(t,{QueryClient:()=>r.QueryClient,QueryClientProvider:()=>o.QueryClientProvider,useMutation:()=>o.useMutation,useQuery:()=>o.useQuery,useQueryClient:()=>o.useQueryClient});var r=n(468);n.o(r,"QueryClientProvider")&&n.d(t,{QueryClientProvider:function(){return r.QueryClientProvider}}),n.o(r,"useMutation")&&n.d(t,{useMutation:function(){return r.useMutation}}),n.o(r,"useQuery")&&n.d(t,{useQuery:function(){return r.useQuery}}),n.o(r,"useQueryClient")&&n.d(t,{useQueryClient:function(){return r.useQueryClient}});var o=n(960)},360:(e,t,n)=>{"use strict";n.d(t,{H:()=>u,j:()=>l});var r=n(609),o=n.n(r),a=o().createContext(void 0),i=o().createContext(!1);function s(e){return e&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=a),window.ReactQueryClientContext):a}var l=function(){var e=o().useContext(s(o().useContext(i)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},u=function(e){var t=e.client,n=e.contextSharing,r=void 0!==n&&n,a=e.children;o().useEffect((function(){return t.mount(),function(){t.unmount()}}),[t]);var l=s(r);return o().createElement(i.Provider,{value:r},o().createElement(l.Provider,{value:t},a))}},960:(e,t,n)=>{"use strict";n.d(t,{QueryClientProvider:()=>l.H,useMutation:()=>u.n,useQuery:()=>c.I,useQueryClient:()=>l.j});var r=n(428),o=n(795),a=n.n(o)().unstable_batchedUpdates;r.j.setBatchNotifyFunction(a);var i=n(690),s=console;(0,i.B)(s);var l=n(360),u=n(990),c=n(584)},990:(e,t,n)=>{"use strict";n.d(t,{n:()=>h});var r=n(168),o=n(609),a=n.n(o),i=n(428),s=n(941),l=n(540),u=n(465),c=function(e){function t(t,n){var r;return(r=e.call(this)||this).client=t,r.setOptions(n),r.bindMethods(),r.updateResult(),r}(0,l.A)(t,e);var n=t.prototype;return n.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},n.setOptions=function(e){this.options=this.client.defaultMutationOptions(e)},n.onUnsubscribe=function(){var e;this.listeners.length||null==(e=this.currentMutation)||e.removeObserver(this)},n.onMutationUpdate=function(e){this.updateResult();var t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)},n.getCurrentResult=function(){return this.currentResult},n.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},n.mutate=function(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,(0,r.A)({},this.options,{variables:void 0!==e?e:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},n.updateResult=function(){var e=this.currentMutation?this.currentMutation.state:(0,u.$)(),t=(0,r.A)({},e,{isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset});this.currentResult=t},n.notify=function(e){var t=this;i.j.batch((function(){t.mutateOptions&&(e.onSuccess?(null==t.mutateOptions.onSuccess||t.mutateOptions.onSuccess(t.currentResult.data,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(t.currentResult.data,null,t.currentResult.variables,t.currentResult.context)):e.onError&&(null==t.mutateOptions.onError||t.mutateOptions.onError(t.currentResult.error,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(void 0,t.currentResult.error,t.currentResult.variables,t.currentResult.context))),e.listeners&&t.listeners.forEach((function(e){e(t.currentResult)}))}))},t}(n(287).Q),d=n(360),f=n(439);function h(e,t,n){var o=a().useRef(!1),l=a().useState(0)[1],u=(0,s.GR)(e,t,n),h=(0,d.j)(),p=a().useRef();p.current?p.current.setOptions(u):p.current=new c(h,u);var m=p.current.getCurrentResult();a().useEffect((function(){o.current=!0;var e=p.current.subscribe(i.j.batchCalls((function(){o.current&&l((function(e){return e+1}))})));return function(){o.current=!1,e()}}),[]);var v=a().useCallback((function(e,t){p.current.mutate(e,t).catch(s.lQ)}),[]);if(m.error&&(0,f.G)(void 0,p.current.options.useErrorBoundary,[m.error]))throw m.error;return(0,r.A)({},m,{mutate:v,mutateAsync:m.mutate})}},584:(e,t,n)=>{"use strict";n.d(t,{I:()=>S});var r=n(168),o=n(540),a=n(941),i=n(428),s=n(289),l=n(287),u=n(690),c=n(281),d=function(e){function t(t,n){var r;return(r=e.call(this)||this).client=t,r.options=n,r.trackedProps=[],r.selectError=null,r.bindMethods(),r.setOptions(n),r}(0,o.A)(t,e);var n=t.prototype;return n.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},n.onSubscribe=function(){1===this.listeners.length&&(this.currentQuery.addObserver(this),f(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},n.onUnsubscribe=function(){this.listeners.length||this.destroy()},n.shouldFetchOnReconnect=function(){return h(this.currentQuery,this.options,this.options.refetchOnReconnect)},n.shouldFetchOnWindowFocus=function(){return h(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},n.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},n.setOptions=function(e,t){var n=this.options,r=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled)throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();var o=this.hasListeners();o&&p(this.currentQuery,r,this.options,n)&&this.executeFetch(),this.updateResult(t),!o||this.currentQuery===r&&this.options.enabled===n.enabled&&this.options.staleTime===n.staleTime||this.updateStaleTimeout();var a=this.computeRefetchInterval();!o||this.currentQuery===r&&this.options.enabled===n.enabled&&a===this.currentRefetchInterval||this.updateRefetchInterval(a)},n.getOptimisticResult=function(e){var t=this.client.defaultQueryObserverOptions(e),n=this.client.getQueryCache().build(this.client,t);return this.createResult(n,t)},n.getCurrentResult=function(){return this.currentResult},n.trackResult=function(e,t){var n=this,r={},o=function(e){n.trackedProps.includes(e)||n.trackedProps.push(e)};return Object.keys(e).forEach((function(t){Object.defineProperty(r,t,{configurable:!1,enumerable:!0,get:function(){return o(t),e[t]}})})),(t.useErrorBoundary||t.suspense)&&o("error"),r},n.getNextResult=function(e){var t=this;return new Promise((function(n,r){var o=t.subscribe((function(t){t.isFetching||(o(),t.isError&&(null==e?void 0:e.throwOnError)?r(t.error):n(t))}))}))},n.getCurrentQuery=function(){return this.currentQuery},n.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},n.refetch=function(e){return this.fetch((0,r.A)({},e,{meta:{refetchPage:null==e?void 0:e.refetchPage}}))},n.fetchOptimistic=function(e){var t=this,n=this.client.defaultQueryObserverOptions(e),r=this.client.getQueryCache().build(this.client,n);return r.fetch().then((function(){return t.createResult(r,n)}))},n.fetch=function(e){var t=this;return this.executeFetch(e).then((function(){return t.updateResult(),t.currentResult}))},n.executeFetch=function(e){this.updateQuery();var t=this.currentQuery.fetch(this.options,e);return(null==e?void 0:e.throwOnError)||(t=t.catch(a.lQ)),t},n.updateStaleTimeout=function(){var e=this;if(this.clearStaleTimeout(),!a.S$&&!this.currentResult.isStale&&(0,a.gn)(this.options.staleTime)){var t=(0,a.j3)(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout((function(){e.currentResult.isStale||e.updateResult()}),t)}},n.computeRefetchInterval=function(){var e;return"function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(e=this.options.refetchInterval)&&e},n.updateRefetchInterval=function(e){var t=this;this.clearRefetchInterval(),this.currentRefetchInterval=e,!a.S$&&!1!==this.options.enabled&&(0,a.gn)(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval((function(){(t.options.refetchIntervalInBackground||s.m.isFocused())&&t.executeFetch()}),this.currentRefetchInterval))},n.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},n.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},n.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},n.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},n.createResult=function(e,t){var n,r=this.currentQuery,o=this.options,i=this.currentResult,s=this.currentResultState,l=this.currentResultOptions,c=e!==r,d=c?e.state:this.currentQueryInitialState,h=c?this.currentResult:this.previousQueryResult,v=e.state,g=v.dataUpdatedAt,y=v.error,b=v.errorUpdatedAt,E=v.isFetching,C=v.status,_=!1,S=!1;if(t.optimisticResults){var w=this.hasListeners(),T=!w&&f(e,t),k=w&&p(e,r,t,o);(T||k)&&(E=!0,g||(C="loading"))}if(t.keepPreviousData&&!v.dataUpdateCount&&(null==h?void 0:h.isSuccess)&&"error"!==C)n=h.data,g=h.dataUpdatedAt,C=h.status,_=!0;else if(t.select&&void 0!==v.data)if(i&&v.data===(null==s?void 0:s.data)&&t.select===this.selectFn)n=this.selectResult;else try{this.selectFn=t.select,n=t.select(v.data),!1!==t.structuralSharing&&(n=(0,a.BH)(null==i?void 0:i.data,n)),this.selectResult=n,this.selectError=null}catch(e){(0,u.t)().error(e),this.selectError=e}else n=v.data;if(void 0!==t.placeholderData&&void 0===n&&("loading"===C||"idle"===C)){var O;if((null==i?void 0:i.isPlaceholderData)&&t.placeholderData===(null==l?void 0:l.placeholderData))O=i.data;else if(O="function"==typeof t.placeholderData?t.placeholderData():t.placeholderData,t.select&&void 0!==O)try{O=t.select(O),!1!==t.structuralSharing&&(O=(0,a.BH)(null==i?void 0:i.data,O)),this.selectError=null}catch(e){(0,u.t)().error(e),this.selectError=e}void 0!==O&&(C="success",n=O,S=!0)}return this.selectError&&(y=this.selectError,n=this.selectResult,b=Date.now(),C="error"),{status:C,isLoading:"loading"===C,isSuccess:"success"===C,isError:"error"===C,isIdle:"idle"===C,data:n,dataUpdatedAt:g,error:y,errorUpdatedAt:b,failureCount:v.fetchFailureCount,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>d.dataUpdateCount||v.errorUpdateCount>d.errorUpdateCount,isFetching:E,isRefetching:E&&"loading"!==C,isLoadingError:"error"===C&&0===v.dataUpdatedAt,isPlaceholderData:S,isPreviousData:_,isRefetchError:"error"===C&&0!==v.dataUpdatedAt,isStale:m(e,t),refetch:this.refetch,remove:this.remove}},n.shouldNotifyListeners=function(e,t){if(!t)return!0;var n=this.options,r=n.notifyOnChangeProps,o=n.notifyOnChangePropsExclusions;if(!r&&!o)return!0;if("tracked"===r&&!this.trackedProps.length)return!0;var a="tracked"===r?this.trackedProps:r;return Object.keys(e).some((function(n){var r=n,i=e[r]!==t[r],s=null==a?void 0:a.some((function(e){return e===n})),l=null==o?void 0:o.some((function(e){return e===n}));return i&&!l&&(!a||s)}))},n.updateResult=function(e){var t=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!(0,a.f8)(this.currentResult,t)){var n={cache:!0};!1!==(null==e?void 0:e.listeners)&&this.shouldNotifyListeners(this.currentResult,t)&&(n.listeners=!0),this.notify((0,r.A)({},n,e))}},n.updateQuery=function(){var e=this.client.getQueryCache().build(this.client,this.options);if(e!==this.currentQuery){var t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}},n.onQueryUpdate=function(e){var t={};"success"===e.type?t.onSuccess=!0:"error"!==e.type||(0,c.wm)(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()},n.notify=function(e){var t=this;i.j.batch((function(){e.onSuccess?(null==t.options.onSuccess||t.options.onSuccess(t.currentResult.data),null==t.options.onSettled||t.options.onSettled(t.currentResult.data,null)):e.onError&&(null==t.options.onError||t.options.onError(t.currentResult.error),null==t.options.onSettled||t.options.onSettled(void 0,t.currentResult.error)),e.listeners&&t.listeners.forEach((function(e){e(t.currentResult)})),e.cache&&t.client.getQueryCache().notify({query:t.currentQuery,type:"observerResultsUpdated"})}))},t}(l.Q);function f(e,t){return function(e,t){return!(!1===t.enabled||e.state.dataUpdatedAt||"error"===e.state.status&&!1===t.retryOnMount)}(e,t)||e.state.dataUpdatedAt>0&&h(e,t,t.refetchOnMount)}function h(e,t,n){if(!1!==t.enabled){var r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&m(e,t)}return!1}function p(e,t,n,r){return!1!==n.enabled&&(e!==t||!1===r.enabled)&&(!n.suspense||"error"!==e.state.status)&&m(e,n)}function m(e,t){return e.isStaleByTime(t.staleTime)}var v=n(609),g=n.n(v);var y,b=g().createContext((y=!1,{clearReset:function(){y=!1},reset:function(){y=!0},isReset:function(){return y}})),E=function(){return g().useContext(b)},C=n(360),_=n(439);function S(e,t,n){return function(e,t){var n=g().useRef(!1),r=g().useState(0)[1],o=(0,C.j)(),a=E(),s=o.defaultQueryObserverOptions(e);s.optimisticResults=!0,s.onError&&(s.onError=i.j.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=i.j.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=i.j.batchCalls(s.onSettled)),s.suspense&&("number"!=typeof s.staleTime&&(s.staleTime=1e3),0===s.cacheTime&&(s.cacheTime=1)),(s.suspense||s.useErrorBoundary)&&(a.isReset()||(s.retryOnMount=!1));var l=g().useState((function(){return new t(o,s)}))[0],u=l.getOptimisticResult(s);if(g().useEffect((function(){n.current=!0,a.clearReset();var e=l.subscribe(i.j.batchCalls((function(){n.current&&r((function(e){return e+1}))})));return l.updateResult(),function(){n.current=!1,e()}}),[a,l]),g().useEffect((function(){l.setOptions(s,{listeners:!1})}),[s,l]),s.suspense&&u.isLoading)throw l.fetchOptimistic(s).then((function(e){var t=e.data;null==s.onSuccess||s.onSuccess(t),null==s.onSettled||s.onSettled(t,null)})).catch((function(e){a.clearReset(),null==s.onError||s.onError(e),null==s.onSettled||s.onSettled(void 0,e)}));if(u.isError&&!a.isReset()&&!u.isFetching&&(0,_.G)(s.suspense,s.useErrorBoundary,[u.error,l.getCurrentQuery()]))throw u.error;return"tracked"===s.notifyOnChangeProps&&(u=l.trackResult(u,s)),u}((0,a.vh)(e,t,n),d)}},439:(e,t,n)=>{"use strict";function r(e,t,n){return"function"==typeof t?t.apply(void 0,n):"boolean"==typeof t?t:!!e}n.d(t,{G:()=>r})},609:e=>{"use strict";e.exports=window.React},795:e=>{"use strict";e.exports=window.ReactDOM},168:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{A:()=>r})},540:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,{A:()=>o})}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.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.r(e),n.d(e,{hasBrowserEnv:()=>se,hasStandardBrowserEnv:()=>le,hasStandardBrowserWebWorkerEnv:()=>ce});var t=n(609),r=n.n(t),o=n(795),a=n.n(o),i=n(942);const s=window.wp.components;function l(e,t){return function(){return e.apply(t,arguments)}}const{toString:u}=Object.prototype,{getPrototypeOf:c}=Object,d=(f=Object.create(null),e=>{const t=u.call(e);return f[t]||(f[t]=t.slice(8,-1).toLowerCase())});var f;const h=e=>(e=e.toLowerCase(),t=>d(t)===e),p=e=>t=>typeof t===e,{isArray:m}=Array,v=p("undefined"),g=h("ArrayBuffer"),y=p("string"),b=p("function"),E=p("number"),C=e=>null!==e&&"object"==typeof e,_=e=>{if("object"!==d(e))return!1;const t=c(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},S=h("Date"),w=h("File"),T=h("Blob"),k=h("FileList"),O=h("URLSearchParams");function A(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),m(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let i;for(r=0;r<a;r++)i=o[r],t.call(null,e[i],i,e)}}function R(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const x="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,N=e=>!v(e)&&e!==x,P=(F="undefined"!=typeof Uint8Array&&c(Uint8Array),e=>F&&e instanceof F);var F;const D=h("HTMLFormElement"),M=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),L=h("RegExp"),I=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};A(n,((n,o)=>{let a;!1!==(a=t(n,o,e))&&(r[o]=a||n)})),Object.defineProperties(e,r)},U="abcdefghijklmnopqrstuvwxyz",j="0123456789",q={DIGIT:j,ALPHA:U,ALPHA_DIGIT:U+U.toUpperCase()+j},Q=h("AsyncFunction"),B={isArray:m,isArrayBuffer:g,isBuffer:function(e){return null!==e&&!v(e)&&null!==e.constructor&&!v(e.constructor)&&b(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||b(e.append)&&("formdata"===(t=d(e))||"object"===t&&b(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&g(e.buffer),t},isString:y,isNumber:E,isBoolean:e=>!0===e||!1===e,isObject:C,isPlainObject:_,isUndefined:v,isDate:S,isFile:w,isBlob:T,isRegExp:L,isFunction:b,isStream:e=>C(e)&&b(e.pipe),isURLSearchParams:O,isTypedArray:P,isFileList:k,forEach:A,merge:function e(){const{caseless:t}=N(this)&&this||{},n={},r=(r,o)=>{const a=t&&R(n,o)||o;_(n[a])&&_(r)?n[a]=e(n[a],r):_(r)?n[a]=e({},r):m(r)?n[a]=r.slice():n[a]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&A(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(A(t,((t,r)=>{n&&b(t)?e[r]=l(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,a,i;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)i=o[a],r&&!r(i,e,t)||s[i]||(t[i]=e[i],s[i]=!0);e=!1!==n&&c(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:d,kindOfTest:h,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(m(e))return e;let t=e.length;if(!E(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:D,hasOwnProperty:M,hasOwnProp:M,reduceDescriptors:I,freezeMethods:e=>{I(e,((t,n)=>{if(b(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];b(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return m(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:R,global:x,isContextDefined:N,ALPHABET:q,generateString:(e=16,t=q.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&b(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(C(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=m(e)?[]:{};return A(e,((e,t)=>{const a=n(e,r+1);!v(a)&&(o[t]=a)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:Q,isThenable:e=>e&&(C(e)||b(e))&&b(e.then)&&b(e.catch)};function H(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}B.inherits(H,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:B.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const z=H.prototype,K={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{K[e]={value:e}})),Object.defineProperties(H,K),Object.defineProperty(z,"isAxiosError",{value:!0}),H.from=(e,t,n,r,o,a)=>{const i=Object.create(z);return B.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),H.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,a&&Object.assign(i,a),i};const G=H;function W(e){return B.isPlainObject(e)||B.isArray(e)}function V(e){return B.endsWith(e,"[]")?e.slice(0,-2):e}function Y(e,t,n){return e?e.concat(t).map((function(e,t){return e=V(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const J=B.toFlatObject(B,{},null,(function(e){return/^is[A-Z]/.test(e)})),$=function(e,t,n){if(!B.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=B.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!B.isUndefined(t[e])}))).metaTokens,o=n.visitor||u,a=n.dots,i=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&B.isSpecCompliantForm(t);if(!B.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(B.isDate(e))return e.toISOString();if(!s&&B.isBlob(e))throw new G("Blob is not supported. Use a Buffer instead.");return B.isArrayBuffer(e)||B.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let s=e;if(e&&!o&&"object"==typeof e)if(B.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(B.isArray(e)&&function(e){return B.isArray(e)&&!e.some(W)}(e)||(B.isFileList(e)||B.endsWith(n,"[]"))&&(s=B.toArray(e)))return n=V(n),s.forEach((function(e,r){!B.isUndefined(e)&&null!==e&&t.append(!0===i?Y([n],r,a):null===i?n:n+"[]",l(e))})),!1;return!!W(e)||(t.append(Y(o,n,a),l(e)),!1)}const c=[],d=Object.assign(J,{defaultVisitor:u,convertValue:l,isVisitable:W});if(!B.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!B.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+r.join("."));c.push(n),B.forEach(n,(function(n,a){!0===(!(B.isUndefined(n)||null===n)&&o.call(t,n,B.isString(a)?a.trim():a,r,d))&&e(n,r?r.concat(a):[a])})),c.pop()}}(e),t};function X(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Z(e,t){this._pairs=[],e&&$(e,this,t)}const ee=Z.prototype;ee.append=function(e,t){this._pairs.push([e,t])},ee.toString=function(e){const t=e?function(t){return e.call(this,t,X)}:X;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const te=Z;function ne(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function re(e,t,n){if(!t)return e;const r=n&&n.encode||ne,o=n&&n.serialize;let a;if(a=o?o(t,n):B.isURLSearchParams(t)?t.toString():new te(t,n).toString(r),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}const oe=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){B.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ae={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ie={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:te,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},se="undefined"!=typeof window&&"undefined"!=typeof document,le=(ue="undefined"!=typeof navigator&&navigator.product,se&&["ReactNative","NativeScript","NS"].indexOf(ue)<0);var ue;const ce="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,de={...e,...ie},fe=function(e){function t(e,n,r,o){let a=e[o++];if("__proto__"===a)return!0;const i=Number.isFinite(+a),s=o>=e.length;return a=!a&&B.isArray(r)?r.length:a,s?(B.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!i):(r[a]&&B.isObject(r[a])||(r[a]=[]),t(e,n,r[a],o)&&B.isArray(r[a])&&(r[a]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}(r[a])),!i)}if(B.isFormData(e)&&B.isFunction(e.entries)){const n={};return B.forEachEntry(e,((e,r)=>{t(function(e){return B.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null},he={transitional:ae,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=B.isObject(e);if(o&&B.isHTMLForm(e)&&(e=new FormData(e)),B.isFormData(e))return r?JSON.stringify(fe(e)):e;if(B.isArrayBuffer(e)||B.isBuffer(e)||B.isStream(e)||B.isFile(e)||B.isBlob(e))return e;if(B.isArrayBufferView(e))return e.buffer;if(B.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return $(e,new de.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return de.isNode&&B.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((a=B.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return $(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(B.isString(e))try{return(0,JSON.parse)(e),B.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||he.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&B.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw G.from(e,G.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:de.classes.FormData,Blob:de.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};B.forEach(["delete","get","head","post","put","patch"],(e=>{he.headers[e]={}}));const pe=he,me=B.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ve=Symbol("internals");function ge(e){return e&&String(e).trim().toLowerCase()}function ye(e){return!1===e||null==e?e:B.isArray(e)?e.map(ye):String(e)}function be(e,t,n,r,o){return B.isFunction(r)?r.call(this,t,n):(o&&(t=n),B.isString(t)?B.isString(r)?-1!==t.indexOf(r):B.isRegExp(r)?r.test(t):void 0:void 0)}class Ee{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=ge(t);if(!o)throw new Error("header name must be a non-empty string");const a=B.findKey(r,o);(!a||void 0===r[a]||!0===n||void 0===n&&!1!==r[a])&&(r[a||t]=ye(e))}const a=(e,t)=>B.forEach(e,((e,n)=>o(e,n,t)));return B.isPlainObject(e)||e instanceof this.constructor?a(e,t):B.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?a((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&me[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=ge(e)){const n=B.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(B.isFunction(t))return t.call(this,e,n);if(B.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ge(e)){const n=B.findKey(this,e);return!(!n||void 0===this[n]||t&&!be(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=ge(e)){const o=B.findKey(n,e);!o||t&&!be(0,n[o],o,t)||(delete n[o],r=!0)}}return B.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!be(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return B.forEach(this,((r,o)=>{const a=B.findKey(n,o);if(a)return t[a]=ye(r),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();i!==o&&delete t[o],t[i]=ye(r),n[i]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return B.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&B.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[ve]=this[ve]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=ge(e);t[r]||(function(e,t){const n=B.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return B.isArray(e)?e.forEach(r):r(e),this}}Ee.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),B.reduceDescriptors(Ee.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),B.freezeMethods(Ee);const Ce=Ee;function _e(e,t){const n=this||pe,r=t||n,o=Ce.from(r.headers);let a=r.data;return B.forEach(e,(function(e){a=e.call(n,a,o.normalize(),t?t.status:void 0)})),o.normalize(),a}function Se(e){return!(!e||!e.__CANCEL__)}function we(e,t,n){G.call(this,null==e?"canceled":e,G.ERR_CANCELED,t,n),this.name="CanceledError"}B.inherits(we,G,{__CANCEL__:!0});const Te=we,ke=de.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const i=[e+"="+encodeURIComponent(t)];B.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),B.isString(r)&&i.push("path="+r),B.isString(o)&&i.push("domain="+o),!0===a&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Oe(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Ae=de.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=B.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function Re(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,a=0,i=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),u=r[i];o||(o=l),n[a]=s,r[a]=l;let c=i,d=0;for(;c!==a;)d+=n[c++],c%=e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),l-o<t)return;const f=u&&l-u;return f?Math.round(1e3*d/f):void 0}}(50,250);return o=>{const a=o.loaded,i=o.lengthComputable?o.total:void 0,s=a-n,l=r(s);n=a;const u={loaded:a,total:i,progress:i?a/i:void 0,bytes:s,rate:l||void 0,estimated:l&&i&&a<=i?(i-a)/l:void 0,event:o};u[t?"download":"upload"]=!0,e(u)}}const xe={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=Ce.from(e.headers).normalize();let a,i,{responseType:s,withXSRFToken:l}=e;function u(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}if(B.isFormData(r))if(de.hasStandardBrowserEnv||de.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(i=o.getContentType())){const[e,...t]=i?i.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let c=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const d=Oe(e.baseURL,e.url);function f(){if(!c)return;const r=Ce.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new G("Request failed with status code "+n.status,[G.ERR_BAD_REQUEST,G.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),u()}),(function(e){n(e),u()}),{data:s&&"text"!==s&&"json"!==s?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:e,request:c}),c=null}if(c.open(e.method.toUpperCase(),re(d,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=f:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(f)},c.onabort=function(){c&&(n(new G("Request aborted",G.ECONNABORTED,e,c)),c=null)},c.onerror=function(){n(new G("Network Error",G.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||ae;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new G(t,r.clarifyTimeoutError?G.ETIMEDOUT:G.ECONNABORTED,e,c)),c=null},de.hasStandardBrowserEnv&&(l&&B.isFunction(l)&&(l=l(e)),l||!1!==l&&Ae(d))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&ke.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),"setRequestHeader"in c&&B.forEach(o.toJSON(),(function(e,t){c.setRequestHeader(t,e)})),B.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),s&&"json"!==s&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",Re(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",Re(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=t=>{c&&(n(!t||t.type?new Te(null,e,c):t),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const h=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(d);h&&-1===de.protocols.indexOf(h)?n(new G("Unsupported protocol "+h+":",G.ERR_BAD_REQUEST,e)):c.send(r||null)}))}};B.forEach(xe,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Ne=e=>`- ${e}`,Pe=e=>B.isFunction(e)||null===e||!1===e,Fe=e=>{e=B.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let a=0;a<t;a++){let t;if(n=e[a],r=n,!Pe(n)&&(r=xe[(t=String(n)).toLowerCase()],void 0===r))throw new G(`Unknown adapter '${t}'`);if(r)break;o[t||"#"+a]=r}if(!r){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(Ne).join("\n"):" "+Ne(e[0]):"as no adapter specified";throw new G("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function De(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Te(null,e)}function Me(e){return De(e),e.headers=Ce.from(e.headers),e.data=_e.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Fe(e.adapter||pe.adapter)(e).then((function(t){return De(e),t.data=_e.call(e,e.transformResponse,t),t.headers=Ce.from(t.headers),t}),(function(t){return Se(t)||(De(e),t&&t.response&&(t.response.data=_e.call(e,e.transformResponse,t.response),t.response.headers=Ce.from(t.response.headers))),Promise.reject(t)}))}const Le=e=>e instanceof Ce?{...e}:e;function Ie(e,t){t=t||{};const n={};function r(e,t,n){return B.isPlainObject(e)&&B.isPlainObject(t)?B.merge.call({caseless:n},e,t):B.isPlainObject(t)?B.merge({},t):B.isArray(t)?t.slice():t}function o(e,t,n){return B.isUndefined(t)?B.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function a(e,t){if(!B.isUndefined(t))return r(void 0,t)}function i(e,t){return B.isUndefined(t)?B.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,a){return a in t?r(n,o):a in e?r(void 0,n):void 0}const l={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:(e,t)=>o(Le(e),Le(t),!0)};return B.forEach(Object.keys(Object.assign({},e,t)),(function(r){const a=l[r]||o,i=a(e[r],t[r],r);B.isUndefined(i)&&a!==s||(n[r]=i)})),n}const Ue={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Ue[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const je={};Ue.transitional=function(e,t,n){function r(e,t){return"[Axios v1.6.8] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,a)=>{if(!1===e)throw new G(r(o," has been removed"+(t?" in "+t:"")),G.ERR_DEPRECATED);return t&&!je[o]&&(je[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,a)}};const qe={assertOptions:function(e,t,n){if("object"!=typeof e)throw new G("options must be an object",G.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],i=t[a];if(i){const t=e[a],n=void 0===t||i(t,a,e);if(!0!==n)throw new G("option "+a+" must be "+n,G.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new G("Unknown option "+a,G.ERR_BAD_OPTION)}},validators:Ue},Qe=qe.validators;class Be{constructor(e){this.defaults=e,this.interceptors={request:new oe,response:new oe}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ie(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&qe.assertOptions(n,{silentJSONParsing:Qe.transitional(Qe.boolean),forcedJSONParsing:Qe.transitional(Qe.boolean),clarifyTimeoutError:Qe.transitional(Qe.boolean)},!1),null!=r&&(B.isFunction(r)?t.paramsSerializer={serialize:r}:qe.assertOptions(r,{encode:Qe.function,serialize:Qe.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=o&&B.merge(o.common,o[t.method]);o&&B.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Ce.concat(a,o);const i=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));const l=[];let u;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let c,d=0;if(!s){const e=[Me.bind(this),void 0];for(e.unshift.apply(e,i),e.push.apply(e,l),c=e.length,u=Promise.resolve(t);d<c;)u=u.then(e[d++],e[d++]);return u}c=i.length;let f=t;for(d=0;d<c;){const e=i[d++],t=i[d++];try{f=e(f)}catch(e){t.call(this,e);break}}try{u=Me.call(this,f)}catch(e){return Promise.reject(e)}for(d=0,c=l.length;d<c;)u=u.then(l[d++],l[d++]);return u}getUri(e){return re(Oe((e=Ie(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}B.forEach(["delete","get","head","options"],(function(e){Be.prototype[e]=function(t,n){return this.request(Ie(n||{},{method:e,url:t,data:(n||{}).data}))}})),B.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(Ie(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Be.prototype[e]=t(),Be.prototype[e+"Form"]=t(!0)}));const He=Be;class ze{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new Te(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new ze((function(t){e=t})),cancel:e}}}const Ke=ze,Ge={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ge).forEach((([e,t])=>{Ge[t]=e}));const We=Ge,Ve=function e(t){const n=new He(t),r=l(He.prototype.request,n);return B.extend(r,He.prototype,n,{allOwnKeys:!0}),B.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Ie(t,n))},r}(pe);Ve.Axios=He,Ve.CanceledError=Te,Ve.CancelToken=Ke,Ve.isCancel=Se,Ve.VERSION="1.6.8",Ve.toFormData=$,Ve.AxiosError=G,Ve.Cancel=Ve.CanceledError,Ve.all=function(e){return Promise.all(e)},Ve.spread=function(e){return function(t){return e.apply(null,t)}},Ve.isAxiosError=function(e){return B.isObject(e)&&!0===e.isAxiosError},Ve.mergeConfig=Ie,Ve.AxiosHeaders=Ce,Ve.formToJSON=e=>fe(B.isHTMLForm(e)?new FormData(e):e),Ve.getAdapter=Fe,Ve.HttpStatusCode=We,Ve.default=Ve;const Ye=Ve.create({baseURL:"/wp-json/rsvpmaker/v1/",headers:{"Content-type":"application/json","X-WP-Nonce":rsvpmaker_rest.nonce},validateStatus:function(e){return e<400}});function Je(e=""){return(0,i.useQuery)(["rsvp_options"],(function(t){return Ye.get("rsvp_options?tab="+e)}),{enabled:!0,retry:2,onSuccess:(e,t,n,r)=>{console.log("rsvp options query",e)},onError:(e,t,n)=>{console.log("error retrieving rsvp options",e)},refetchInterval:!1})}function $e(e,t){const n=(0,i.useQueryClient)();return(0,i.useMutation)((async function(e){return await Ye.post("rsvp_options",e)}),{onMutate:async e=>{console.log("optimistic update option",e),await n.cancelQueries(["rsvp_options"]);const t=n.getQueryData(["rsvp_options"]);return n.setQueryData(["rsvp_options"],(t=>{const{data:n}=t;e.forEach((e=>{"rsvp_options"==e.type&&(n.rsvp_options[e.key]=e.value)}));const r={...t,data:n};return console.log("newdata optimistic update",r),r})),console.log("updating options"),{previousValue:t}},onSettled:(e,t,r,o)=>{n.invalidateQueries(["rsvp_options"])},onSuccess:(t,n,r,o)=>{console.log("updated"),e([])},onError:(e,t,r)=>{console.log("update options error",e),n.setQueryData("rsvp_options",r.previousValue)}})}var Xe=n(838),Ze=n.n(Xe);function et(e){const{innerHTML:n}=e,r=Ze().sanitize(n).replace("class=","className=");return(0,t.createElement)("div",{dangerouslySetInnerHTML:{__html:r}})}function tt(){const[e,n]=(0,t.useState)(!1),[r,o]=(0,t.useState)(null),[a,i]=(0,t.useState)(null);function s(){n(!0),setTimeout((()=>{n(!1)}),500)}return{SaveControls:function(e){const{changes:n,setChanges:r}=e;console.log("changes SaveControls",n);const{mutate:o}=$e(r);return(0,t.createElement)("div",{id:"savecontrols"},a&&(0,t.createElement)("div",{className:"rsvp-notification rsvp-notification-success"},a.message),(0,t.createElement)("div",{id:"savebuttonwrapper"},(0,t.createElement)("button",{onClick:()=>{console.log("save changeset",n),s(),o(n)}},"Save")))},notification:a,setNotification:i,isSaving:e,saveEffect:s,makeNotification:function(e=""){if(""==e)return a;r&&clearTimeout(r),i({message:e});let t=setTimeout((()=>{i(null)}),5e3);o(t)}}}function nt(e){const{rsvp_options:n,addChange:r}=e,[o,a]=(0,t.useState)(1==n[e.slug]);return(0,t.createElement)(s.ToggleControl,{label:e.label,checked:o,onChange:()=>{let t=!o;a(t),r(e.slug,t?1:0)}})}function rt(e){console.log("optselect props",e);const{rsvp_options:n,addChange:r}=e,[o,a]=(0,t.useState)(n[e.slug]);return console.log("optselect slug",e.slug),console.log("optselect choice",o),console.log("optselect rsvp_options",n),(0,t.createElement)(s.SelectControl,{label:e.label,value:o,options:e.options,onChange:t=>{a(t),r(e.slug,t)}})}function ot(e){const{rsvp_options:n,addChange:r}=e,[o,a]=(0,t.useState)(n[e.slug]);return console.log("choice",o),(0,t.createElement)(s.RadioControl,{label:e.label,selected:o,options:e.options,onChange:t=>{a(t),r(e.slug,t)}})}function at(e){const{rsvp_options:n,addChange:r}=e,[o,a]=(0,t.useState)(n[e.slug]);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("input",{type:"text",value:o,onChange:e=>{a(e.target.value),console.log(e.target.value)},onBlur:()=>{r(e.slug,o)}}))}function it(e){const{rsvp_options:n,addChange:r}=e,[o,a]=(0,t.useState)(n[e.slug]);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("textarea",{type:"text",value:o,onChange:e=>{a(e.target.value),console.log(e.target.value)},onBlur:()=>{r(e.slug,o)}}))}function st(e){const{changes:n,addChange:r,setChanges:o}=e,{data:a,isLoading:i,isError:s}=Je("general");if(s)return(0,t.createElement)("p",null,"Error loading general options");const{isSaving:l,saveEffect:u,SaveControls:c,makeNotification:d}=tt();if(i)return(0,t.createElement)("p",null,"Loading ...");const f=a.data.rsvp_options,h=(a.data.current_user_id,a.data.current_user_email,a.data.edit_url),p=a.data.confirmation_message,m=a.data.stylesheet_url;return console.log("rsvp options",f),Object.entries(f),f.defaultmin.toString().length<2&&(f.defaultmin=f.defaultmin+"0"),(0,t.createElement)("div",{className:"rsvptab"},l&&(0,t.createElement)("h1",null,"Saving ..."),(0,t.createElement)("div",{className:l?"rsvptab-saving":""},(0,t.createElement)("h3",null,"Defaults for New Events"),(0,t.createElement)("p",null,"Start Time: ",(0,t.createElement)((function(e){const{addChange:n}=e,[r,o]=(0,t.useState)(e.time);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("input",{type:"time",value:r,onChange:e=>{o(e.target.value)},onBlur:()=>{let e=r.split(":");u(),n("defaulthour",e[0]),n("defaultmin",e[1])}}))}),{addChange:r,time:f.defaulthour+":"+f.defaultmin})," "),(0,t.createElement)(nt,{addChange:r,rsvp_options:f,label:"Collect RSVPs",slug:"rsvp_on"}),(0,t.createElement)(nt,{addChange:r,rsvp_options:f,label:"Display Add to Calendar Icons",slug:"calendar_icons"}),(0,t.createElement)(nt,{addChange:r,rsvp_options:f,label:"Add Timezone",slug:"add_timezone"}),(0,t.createElement)(nt,{addChange:r,rsvp_options:f,label:"Show Timezone Conversions",slug:"convert_timezone"}),(0,t.createElement)(nt,{addChange:r,rsvp_options:f,label:"Include Time in Title for Facebook and Twitter",slug:"social_title_date"}),(0,t.createElement)(nt,{addChange:r,rsvp_options:f,label:"Show Yes/No Radio Buttons on Form",slug:"rsvp_yesno"}),(0,t.createElement)(nt,{addChange:r,rsvp_options:f,label:"Show Members Not Registered (for membership sites where members have an account)",slug:"missing_members"}),(0,t.createElement)(nt,{addChange:r,rsvp_options:f,label:"Show Attendee Names Publicly",slug:"show_attendees"}),(0,t.createElement)(nt,{addChange:r,rsvp_options:f,label:"Show RSVP Count Publicly",slug:"rsvp_count"}),(0,t.createElement)(nt,{addChange:r,rsvp_options:f,label:"Login Required to Register",slug:"login_required"}),(0,t.createElement)("p",null,"Default Email for RSVP Notifications ",(0,t.createElement)(at,{addChange:r,rsvp_options:f,slug:"rsvp_to",value:f.rsvp_to})),(0,t.createElement)(nt,{addChange:r,rsvp_options:f,label:"Email RSVPs To Event Author Instead",slug:"rsvp_to_current"}),(0,t.createElement)("p",null,(0,t.createElement)("strong",null,"Form spam protection: Google ReCaptcha (v2) ")," ",(0,t.createElement)("a",{href:"https://www.google.com/recaptcha/admin",target:"_blank"},"register")," for API key and secret",(0,t.createElement)("br",null),"Key ",(0,t.createElement)(at,{addChange:r,rsvp_options:f,slug:"rsvp_recaptcha_site_key"})," Secret ",(0,t.createElement)(at,{addChange:r,rsvp_options:f,slug:"rsvp_recaptcha_secret"})),(0,t.createElement)(nt,{addChange:r,rsvp_options:f,label:"Simple Captcha on RSVP Form (legacy version, not recommended)",slug:"rsvp_captcha"}),(0,t.createElement)("h3",null,"Instructions for RSVP Form"),(0,t.createElement)("p",null,(0,t.createElement)(it,{addChange:r,rsvp_options:f,slug:"rsvp_instructions"})),(0,t.createElement)("h3",null,"Confirmation Message"),(0,t.createElement)(et,{innerHTML:p}),(0,t.createElement)("p",null,(0,t.createElement)("a",{target:"_blank",href:h+f.rsvp_confirm},"Edit Message")),(0,t.createElement)("h3",null,"RSVP Button"),(0,t.createElement)("p",null,(0,t.createElement)("a",{target:"_blank",href:f.rsvplink_edit},"Edit Button Text and Colors")),(0,t.createElement)("p",null,(0,t.createElement)("label",{className:"textlabel"},"Update Button Title"),(0,t.createElement)(at,{addChange:r,rsvp_options:f,slug:"update_rsvp"})),(0,t.createElement)("p",null,(0,t.createElement)("label",{className:"textlabel"},"RSVP Form Title"),(0,t.createElement)(at,{addChange:r,rsvp_options:f,slug:"rsvp_form_title"})),(0,t.createElement)("h3",null,"Date and Time Formats"),(0,t.createElement)("p",null,(0,t.createElement)("a",{target:"_blank",href:"https://www.php.net/manual/en/datetime.format.php"},"find codes here")," ",(0,t.createElement)("br",null),"Examples:",(0,t.createElement)("br",null),"l F j, Y = Thursday March 9, 2023",(0,t.createElement)("br",null),"j F Y = 9 March 2023",(0,t.createElement)("br",null),"m-d-Y = 03-09-2023"),(0,t.createElement)("p",null,(0,t.createElement)("label",{className:"textlabel"},"Date (long)"),(0,t.createElement)(at,{addChange:r,rsvp_options:f,slug:"long_date"})),(0,t.createElement)("p",null,(0,t.createElement)("label",{className:"textlabel"},"Date (short)"),(0,t.createElement)(at,{addChange:r,rsvp_options:f,slug:"short_date"})),(0,t.createElement)(ot,{addChange:r,rsvp_options:f,label:"Time Format",slug:"time_format",options:[{label:"12 hour AM/PM",value:"g:i A"},{label:"24 hour",value:"H:i"},{label:"12 hour AM/PM with timezone",value:"g:i A T"},{label:"24 hour with timezone",value:"H:i T"}]}),(0,t.createElement)("p",null,(0,t.createElement)("label",{className:"textlabel"},"Custom CSS")," ",(0,t.createElement)(at,{addChange:r,rsvp_options:f,slug:"custom_css"}),(0,t.createElement)("br",null),(0,t.createElement)("em",null,"Option to provide the url to a stylesheet that will override the standard styles from ",(0,t.createElement)("br",null),(0,t.createElement)("a",{href:m,target:"_blank"},m))),(0,t.createElement)(ot,{addChange:r,rsvp_options:f,slug:"dashboard",label:"Dashboard Widget",options:[{label:"None",value:""},{label:"Show on Dashboard",value:"show"},{label:"Show on Top",value:"top"}]}),(0,t.createElement)("p",null,(0,t.createElement)("label",null,"Message for Dashboard"),(0,t.createElement)("br",null),(0,t.createElement)(it,{addChange:r,rsvp_options:f,slug:"dashboard_message"})),(0,t.createElement)(nt,{addChange:r,rsvp_options:f,label:"Troubleshooting and Logging",slug:"debug"}),(0,t.createElement)("p",null,"Turning this on may be helpful to identify bugs in the software."),(0,t.createElement)("h3",null,"Template Behavior"),(0,t.createElement)(nt,{addChange:r,rsvp_options:f,label:"Auto-Renew Events",slug:"autorenew"}),(0,t.createElement)("p",null,(0,t.createElement)("em",null,"If this is active, events based on a template will automatically be added according to the defined schedule."))),(0,t.createElement)(c,{changes:n,setChanges:o}))}function lt(e){const{data:n,isLoading:r,isError:o}=Je("security");if(o)return(0,t.createElement)("p",null,"Error loading security options");const{isSaving:a,saveEffect:i,SaveControls:s,makeNotification:l}=tt(),{changes:u,addChange:c,setChanges:d}=e,{mutate:f}=$e(d),h=[{value:"manage_options",label:"Administrator (manage_options)"},{value:"edit_others_rsvpmakers",label:"Editor (edit_others_rsvpmakers)"},{value:"publish_rsvpmakers",label:"Author (publish_rsvpmakers)"},{value:"edit_rsvpmakers",label:"Contributor (edit_rsvpmakers)"}];if(r)return(0,t.createElement)("p",null,"Loading ...");const p=n.data.rsvp_options;return n.data.current_user_id,n.data.current_user_email,(0,t.createElement)("div",{className:"rsvptab"},a&&(0,t.createElement)("h1",null,"Saving ..."),(0,t.createElement)("div",{className:a?"rsvptab-saving":""},(0,t.createElement)("div",{className:"security-select"},(0,t.createElement)(rt,{addChange:c,rsvp_options:p,label:"RSVP Report",slug:"menu_security",options:h}),(0,t.createElement)(rt,{addChange:c,rsvp_options:p,label:"Event Templates",slug:"rsvpmaker_template",options:h}),(0,t.createElement)(rt,{addChange:c,rsvp_options:p,label:"Recurring Event",slug:"recurring_event",options:h}),(0,t.createElement)(rt,{addChange:c,rsvp_options:p,label:"Documentation",slug:"documentation",options:h})),(0,t.createElement)("div",null,(0,t.createElement)(nt,{addChange:c,rsvp_options:p,label:"Additional Editors",slug:"additional_editors"}),(0,t.createElement)("p",null,"Enabling Additional Editors/Co-Authors allows users to share editing rights for event templates and related events."),(0,t.createElement)("p",null,(0,t.createElement)("strong",null,"How this works: ")," When this function is enabled, event authors have the option of allowing other users to be additional editors or co-authors for an event or a series of events based on a template. This is useful for community websites where multiple organizations post their events. The organization can appoint multiple officers or representatives to have equal rights to update the events template for their meetings and all the individual events based on that template."),(0,t.createElement)("p",null,"Note that to unlock events for editing, RSVPMaker changes the author ID for a post to the ID of the authorized user editing the post."))),(0,t.createElement)(s,{changes:u,setChanges:d}))}function ut(e){const{data:n,isLoading:r,isError:o}=Je("payment");if(o)return(0,t.createElement)("p",null,"Error loading payment options");const{changes:a,addChange:i,setChanges:l}=e,{isSaving:u,saveEffect:c,SaveControls:d,makeNotification:f}=tt();if(r||!n.data.stripe)return(0,t.createElement)("p",null,"Loading ...");console.log(n.data.stripe);const[h,p]=(0,t.useState)(n.data.stripe),[m,v]=(0,t.useState)(n.data.paypal),[g,y]=(0,t.useState)(n.data.chosen_gateway),[b,E]=(0,t.useState)(n.data.rsvp_options.paypal_currency),[C,_]=(0,t.useState)(n.data.rsvp_options.minimum_payment?n.data.rsvp_options.minimum_payment:"5.00"),[S,w]=(0,t.useState)(n.data.rsvp_options.currency_decimal+"|"+n.data.rsvp_options.currency_thousands),T=[{label:"Production",value:"production"},{label:"Sandbox",value:"sandbox"}];return(0,t.createElement)("div",{className:"rsvptab payment"},(0,t.createElement)("div",{className:u?"rsvptab-saving":""},(0,t.createElement)(s.TextControl,{label:"Currency",className:"payment",value:b,onChange:e=>{E(e),i("paypal_currency",e)}})," ",(0,t.createElement)("p",null,(0,t.createElement)("a",{href:"https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_currency_codes"},"(list of currency codes)")),(0,t.createElement)(s.SelectControl,{className:"payment",label:"Currency Format",value:S,options:[{label:"1,000.00",value:".|,"},{label:"1.000,00",value:",|."},{label:"1 000,00",value:",| "}],onChange:e=>{w(e);const t=e.split("|");i("currency_decimal",t[0]),i("currency_thousands",t[1])}}),(0,t.createElement)(s.TextControl,{label:"Minimum Transaction",className:"payment",value:C,onChange:e=>{_(e),i("minimum_payment",e)}}),(0,t.createElement)("h3",null,"Stripe"),(0,t.createElement)("div",{className:"key-inputs"},(0,t.createElement)("div",{className:"production"},"set"!=h.pk&&(0,t.createElement)(s.TextControl,{label:"Stripe Public Key",value:h.pk,onChange:e=>{let t={...h};t.pk=e,p(t),i("rsvpmaker_stripe_keys",t,"mergearray")}}),"set"!=h.pk&&(0,t.createElement)(s.TextControl,{label:"Stripe Secret Key",value:h.sk,onChange:e=>{let t={...h};t.sk=e,p(t),i("rsvpmaker_stripe_keys",t,"mergearray")}}),"set"!=h.pk&&(0,t.createElement)(s.TextControl,{label:"Stripe Webhook Key",value:h.webook,onChange:e=>{let t={...h};t.webhook=e,p(t),i("rsvpmaker_stripe_keys",t,"mergearray")}}),"set"==h.pk&&(0,t.createElement)("p",null,"Stripe Production Keys Set ",(0,t.createElement)("button",{onClick:()=>{let e={...h};e.pk="",e.sk="",p(e),i("rsvpmaker_stripe_keys",e,"mergearray")}},"Reset"))),(0,t.createElement)("div",{className:"sandbox"},"set"!=h.sandbox_pk&&(0,t.createElement)(s.TextControl,{label:"Stripe Sandbox Public Key",value:h.sandbox_pk,onChange:e=>{let t={...h};t.sandbox_pk=e,p(t),i("rsvpmaker_stripe_keys",t,"mergearray")}}),"set"!=h.sandbox_pk&&(0,t.createElement)(s.TextControl,{label:"Stripe Sandbox Secret Key",value:h.sandbox_sk,onChange:e=>{let t={...h};t.sandbox_sk=e,p(t),i("rsvpmaker_stripe_keys",t,"mergearray")}}),"set"!=h.sandbox_pk&&(0,t.createElement)(s.TextControl,{label:"Stripe Sandbox Webhook Key",value:h.sandbox_webhook,onChange:e=>{let t={...h};t.sandbox_webhook=e,p(t),i("rsvpmaker_stripe_keys",t,"mergearray")}}),"set"==h.sandbox_pk&&(0,t.createElement)("p",null,"Stripe Sandbox Keys Set ",(0,t.createElement)("button",{onClick:()=>{let e={...h};e.sandbox_pk="",e.sandbox_sk="",p(e),i("rsvpmaker_stripe_keys",e,"mergearray")}},"Reset")))),(0,t.createElement)(s.RadioControl,{label:"Stripe Mode",selected:h.mode,options:T,onChange:e=>{let t={...h};t.mode=e,p(t),i("rsvpmaker_stripe_keys",t,"mergearray")}}),(0,t.createElement)(s.TextControl,{label:"Notification Email for Stripe (optional)",value:h.notify,onChange:e=>{let t={...h};t.notify=e,p(t),i("rsvpmaker_stripe_keys",t,"mergearray")}}),(0,t.createElement)("h3",null,"PayPal"),(0,t.createElement)("div",{className:"key-inputs"},(0,t.createElement)("div",{className:"production"},"set"!=m.client_id&&(0,t.createElement)(s.TextControl,{label:"PayPal Client ID",className:"payment",value:m.client_id,onChange:e=>{let t={...m};t.client_id=e,v(t),i("rsvpmaker_paypal_rest_keys",t,"mergearray")}}),"set"!=m.client_id&&(0,t.createElement)(s.TextControl,{label:"PayPal Client Secret",className:"payment",value:m.client_secret,onChange:e=>{let t={...m};t.client_secret=e,v(t),i("rsvpmaker_paypal_rest_keys",t,"mergearray")}}),"set"==m.client_id&&(0,t.createElement)("p",null,"PayPal Production Keys Set ",(0,t.createElement)("button",{onClick:()=>{let e={...m};e.client_id="",e.client_secret="",v(e),i("rsvpmaker_paypal_rest_keys",e,"mergearray")}},"Reset"))),(0,t.createElement)("div",{className:"sandbox"},"set"!=m.sandbox_client_id&&(0,t.createElement)(s.TextControl,{className:"payment",label:"PayPal Sandbox Client ID",value:m.sandbox_client_id,onChange:e=>{let t={...m};t.sandbox_client_id=e,v(t),i("rsvpmaker_paypal_rest_keys",t,"mergearray")}}),"set"!=m.sandbox_client_id&&(0,t.createElement)(s.TextControl,{className:"payment",label:"PayPal Sandbox Client Secret",value:m.sandbox_client_secret,onChange:e=>{let t={...m};t.sandbox_client_secret=e,v(t),i("rsvpmaker_paypal_rest_keys",t,"mergearray")}}),"set"==m.sandbox_client_id&&(0,t.createElement)("p",null,"PayPal Sandbox Keys Set ",(0,t.createElement)("button",{onClick:()=>{let e={...m};e.sandbox_client_id="",e.sandbox_client_secret="",v(e),i("rsvpmaker_paypal_rest_keys",e,"mergearray")}},"Reset")))),(0,t.createElement)(s.RadioControl,{label:"PayPal Mode",selected:m.mode,options:T,onChange:e=>{let t={...m};t.mode=e,v(t),i("rsvpmaker_paypal_rest_keys",t,"mergearray")}}),(0,t.createElement)(s.SelectControl,{label:"Chosen Gateway",value:g,options:n.data.gateways,onChange:e=>{y(e),i("payment_gateway",e)}})),(0,t.createElement)(d,{changes:a,setChanges:l}))}function ct(e){const{changes:n,addChange:r,setChanges:o}=e,{data:a,isLoading:i,isError:l}=Je("general");if(l)return(0,t.createElement)("p",null,"Error loading options");if(i)return(0,t.createElement)("p",null,"Loading ...");const{isSaving:u,saveEffect:c,SaveControls:d,makeNotification:f}=tt(),[h,p]=(0,t.useState)(a.data.chimp),[m,v]=(0,t.useState)(a.data.rsvp_options),[g,y]=(0,t.useState)(""!=a.data.chimp["chimp-key"]),[b,E]=(0,t.useState)(""!=a.data.rsvp_options.smtp),[C,_]=(0,t.useState)(a.data.chimp.chimp_add_new_users),[S,w]=(0,t.useState)(a.data.chimp["chimp-list"]),T=a.data.chimp_lists;return(0,t.createElement)("div",{className:"rsvptab"},(0,t.createElement)("p",null,"See ",(0,t.createElement)("a",{href:a.data.mailing_list_settings,target:"_blank"},"Mailing List Settings")," for activation of the Postmark integration recommended for sending newsletters, promotional emails, and event invitations. Alternatively, you can use RSVPMaker's integration with Mailchimp. You can improve delivery of email messages using RSVPMaker's own SMTP servers support or an external SMTP plugin (not needed if Postmark is active)."),(0,t.createElement)("h3",null,"Email Footer"),(0,t.createElement)(s.TextControl,{label:"Company/Organization",value:h.company,onChange:e=>{let t={...h};t.company=e,p(t),r("chimp",t,"mergearray")}}),(0,t.createElement)(s.TextControl,{label:"Mailing Address",value:h.mailing_address,onChange:e=>{let t={...h};t.mailing_address=e,p(t),r("chimp",t,"mergearray")}}),(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Including a physical mailing address helps distinguish your email from spam.")),g&&(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h3",null,"Mailchimp Configuration"),(0,t.createElement)(s.TextControl,{label:"Mailchimp API Key",value:h["chimp-key"],onChange:e=>{let t={...h};t["chimp-key"]=e,p(t),r("chimp",t,"mergearray")}}),(0,t.createElement)(s.TextControl,{label:"Email From Text",value:h["email-name"],onChange:e=>{let t={...h};t["email-name"]=e,p(t),r("chimp",t,"mergearray")}}),(0,t.createElement)(s.TextControl,{label:"Email From Address",value:h["email-from"],onChange:e=>{let t={...h};t["email-from"]=e,p(t),r("chimp",t,"mergearray")}}),(0,t.createElement)(s.SelectControl,{className:"chimplist",label:"Default Maling List",value:S,options:T,onChange:e=>{w(e);let t={...h};t["chimp-list"]=e,p(t),r("chimp",t,"mergearray")}}),(0,t.createElement)(s.ToggleControl,{label:"Add new WordPress user emails to mailing list",checked:C,onChange:()=>{_(!g);let e={...h};e.chimp_add_new_users=value,p(e),r("chimp",e,"mergearray")}})),!g&&(0,t.createElement)(s.ToggleControl,{label:"Show Mailchimp Integration Settings",checked:g,onChange:()=>{y(!g)}}),b&&(0,t.createElement)(t.Fragment,null,(0,t.createElement)("h3",null,"SMTP Configuration"),(0,t.createElement)(rt,{addChange:r,rsvp_options:m,label:"SMTP Choice",slug:"smtp",options:[{label:"None - use wp_mail()",value:""},{label:"Custom",value:"other"},{label:"Gmail",value:"gmail"},{label:"Sendgrid",value:"sendgrid"}]}),(0,t.createElement)("p",null,"Email",(0,t.createElement)("br",null),(0,t.createElement)(at,{addChange:r,rsvp_options:m,label:"Email",slug:"smtp_useremail"})),(0,t.createElement)("p",null,"Username",(0,t.createElement)("br",null),(0,t.createElement)(at,{addChange:r,rsvp_options:m,label:"Username",slug:"smtp_username"})),(0,t.createElement)("p",null,"Password",(0,t.createElement)("br",null),(0,t.createElement)(at,{addChange:r,rsvp_options:m,label:"Password",slug:"smtp_password"})),(0,t.createElement)("p",null,"Server",(0,t.createElement)("br",null),(0,t.createElement)(at,{addChange:r,rsvp_options:m,label:"Server",slug:"smtp_server"})),(0,t.createElement)("p",null,"Prefix (ssl,tls)",(0,t.createElement)("br",null),(0,t.createElement)(at,{addChange:r,rsvp_options:m,label:"Prefix (ssl, tls)",slug:"smtp_prefix"})),(0,t.createElement)("p",null,"Port",(0,t.createElement)("br",null),(0,t.createElement)(at,{addChange:r,rsvp_options:m,label:"Port",slug:"smtp_port"})),(0,t.createElement)("p",null,(0,t.createElement)("a",{href:a.data.smtp_test,target:"_blank"},"Test SMTP Connection")),(0,t.createElement)("p",null,"See ",(0,t.createElement)("a",{href:"http://www.wpsitecare.com/gmail-smtp-settings/"},"this article")," for additional guidance on sending using Gmail (requires a tweak to security settings in your Google account).")),!b&&(0,t.createElement)(s.ToggleControl,{label:"Show SMTP Settings",checked:b,onChange:()=>{E(!b)}}),(0,t.createElement)(d,{changes:n,setChanges:o}))}function dt(e){const n={display:e.display?e.display:"block",maxWidth:e.width?e.width:"350px"};return(0,t.createElement)("div",{style:n},(0,t.createElement)("label",{style:{display:"block",fontSize:"11px",textTransform:"uppercase"}},e.label),(0,t.createElement)("select",{value:e.value,onChange:t=>e.onChange(t.target.value)},e.options.map((e=>(0,t.createElement)("option",{value:e.value},e.label)))))}function ft(e){const{type:n}=e;return(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-arrow-up-circle",viewBox:"0 0 16 16"},(0,t.createElement)("title",null,"Move Up ",n),(0,t.createElement)("path",{"fill-rule":"evenodd",d:"M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-7.5 3.5a.5.5 0 0 1-1 0V5.707L5.354 7.854a.5.5 0 1 1-.708-.708l3-3a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1-.708.708L8.5 5.707V11.5z"}))}function ht(e){const{type:n}=e;return(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-arrow-down-circle",viewBox:"0 0 16 16"},(0,t.createElement)("title",null,"Move Down ",n),(0,t.createElement)("path",{"fill-rule":"evenodd",d:"M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v5.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V4.5z"}))}function pt(e){const{type:n}=e;return(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-trash",viewBox:"0 0 16 16"},(0,t.createElement)("title",null,"Delete ",n),(0,t.createElement)("path",{d:"M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z"}),(0,t.createElement)("path",{"fill-rule":"evenodd",d:"M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z"}))}function mt(e){const[n,r]=(0,t.useState)(e.form_id),[o,a]=(0,t.useState)("rsvpmaker/formfield"),[l,u]=(0,t.useState)(""),[c,d]=(0,t.useState)(""),[f,h]=(0,t.useState)(!1),[p,m]=(0,t.useState)(""),{isSaving:v,saveEffect:g,SaveControls:y,makeNotification:b}=tt(),{changes:E,addChange:C,setChanges:_}=e;wp?.data?.select("core/editor")?.getCurrentPostId(),console.log("Forms props",e),console.log("Forms formId",n);const{data:S,isLoading:w,isError:T}=(0,i.useQuery)(["rsvp_form",n],(function(){return Ye.get("rsvp_form?form_id="+n+"&post_id="+wp?.data?.select("core/editor")?.getCurrentPostId())}),{enabled:!0,retry:2,onSuccess:(e,t,o,a)=>{n||r(e.data.form_id),console.log("rsvp forms query",e)},onError:(e,t,n)=>{console.log("error retrieving rsvp forms",e)},refetchInterval:!1});if(T)return(0,t.createElement)("p",null,"Error loading form options");const k=(0,i.useQueryClient)(),{mutate:O}=(0,i.useMutation)((async function(t){return await Ye.post("rsvp_form?form_id="+n+"&post_id="+wp?.data?.select("core/editor")?.getCurrentPostId(),{form:t,newForm:p,event_id:e.event_id?e.event_id:0})}),{onMutate:async e=>{const t=k.getQueryData(["rsvp_form",n]);return console.log("optimistic update form",e),await k.cancelQueries(["rsvp_form",n]),k.setQueryData(["rsvp_form",n],(t=>{const{data:n}=t;n.form=e;const r={...t,data:n};return console.log("newdata optimistic form update",r),r})),console.log("updating options"),{previousValue:t}},onSettled:(e,t,r,o)=>{k.invalidateQueries(["rsvp_form",n])},onSuccess:(e,t,n,o)=>{console.log("updated"),r(e.data.form_id)},onError:(e,t,r)=>{console.log("update options error",e),k.setQueryData(["rsvp_form",n],r.previousValue)}});if(w)return(0,t.createElement)("p",null,"Loading ...");const A=S.data.form.filter((e=>e.blockName)),R=S.data.form_options,x=S.data.form_id;let N=A.length-1;const P=[];for(let e=0;e<N;e++){let t=A[e];if(t?.attrs.guestform?P.push(e):console.log("guestfields attr not found",e),["rsvpmaker/formnote","rsvpmaker/guests"].includes(t.blockName)){N=e-1;break}}const F=[{label:"Choose Field Type",value:""},{label:"Text Field",value:"rsvpmaker/formfield"},{label:"Text Area",value:"rsvpmaker/formtextarea"},{label:"Select",value:"rsvpmaker/formselect"},{label:"Radio Buttons",value:"rsvpmaker/formradio"},{label:"Add to Email List Checkbox",value:"rsvpmaker/formchimp"}];let D=!1,M=!1;for(let e=0;e<A.length;e++){let t=A[e];console.log("check for end fields",t),"rsvpmaker/guests"==t.blockName&&(D=!0,console.log("check for end fields found guests")),"rsvpmaker/formnote"==t.blockName&&(M=!0,console.log("check for end fields found note"))}function L(e){const[n,r]=(0,t.useState)(!1),{blockindex:o}=e;return(0,t.createElement)(t.Fragment,null,!n&&(0,t.createElement)("button",{className:"blockmove deletebutton",onClick:()=>{r(!0)}},(0,t.createElement)(pt,null)," Delete")," ",n&&(0,t.createElement)("button",{className:"blockmove",onClick:()=>{I(o,"delete")}},(0,t.createElement)(pt,null)," Confirm Delete")," ")}function I(e,t){const n=[],r=A[e];let o="delete"==t;A.forEach(((a,i)=>{null==a.blockName||i==e||("up"==t&&i==e-1&&(n.push(r),o=!0),"down"==t&&i==e+2&&(n.push(r),o=!0),n.push(a))})),o||n.push(r),console.log("newform",n),O(n)}function U(e,t,n){const r=[...A];r[e].attrs[t]=n,O(r)}function j(e){const{blockindex:n,setFormItemAttr:r}=e,[o,a]=(0,t.useState)(e.attrs.choicearray),[i,l]=(0,t.useState)(e.attrs.required),[u,c]=(0,t.useState)(e.attrs.label),[d,f]=(0,t.useState)(e.attrs.guestform),[h,p]=(0,t.useState)(e.attrs.defaultToFirst);return(0,t.createElement)("div",{className:"formAtts"},["rsvpmaker/formfield","rsvpmaker/formselect","rsvpmaker/formradio","rsvpmaker/formtextarea"].includes(e.blockName)&&(0,t.createElement)("p",null,(0,t.createElement)("label",null,"Field Label")," ",(0,t.createElement)("input",{type:"text",value:u,onChange:e=>{c(e.target.value)},onBlur:()=>{r(n,"label",u)}})),o&&(0,t.createElement)("p",null,"Choices",(0,t.createElement)("br",null),(0,t.createElement)("textarea",{value:o.join("\n"),onChange:e=>{let t=e.target.value.split("\n");a(t),r(n,"choicearray",t)},onBlur:()=>{r(n,"choicearray",o)}}),(0,t.createElement)("br",null),(0,t.createElement)("em",null,"Enter one choice per line")),["rsvpmaker/formfield","rsvpmaker/formselect","rsvpmaker/formradio","rsvpmaker/formtextarea"].includes(e.blockName)&&"email"!=e.attrs.slug&&(0,t.createElement)(s.ToggleControl,{label:"Required",checked:"required"==i,onChange:()=>{let e="required"==i?"":"required";l(e),r(n,"required",e)}}),"email"==e.attrs.slug&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Email is always required")),["rsvpmaker/formfield","rsvpmaker/formselect","rsvpmaker/formradio","rsvpmaker/formtextarea"].includes(e.blockName)&&(0,t.createElement)(s.ToggleControl,{label:"Include on Guest Form",checked:d,onChange:()=>{let e=!d;f(e),r(n,"guestform",e)}}),["rsvpmaker/formradio"].includes(e.blockName)&&(0,t.createElement)(s.ToggleControl,{label:"Default to First Item",checked:h,onChange:()=>{let e=!h;p(e),r(n,"defaultToFirst",e)}}))}function q(){console.log("guestfields",P);const[e,n]=(0,t.useState)(!1);return e?(0,t.createElement)("div",null,(0,t.createElement)("p",null,"Guest 1"),P.map((e=>{const n=A[e];console.log("guestfields forEach",n);let r=[];return n?.attrs.choicearray&&(r=n.attrs.choicearray.map((e=>({label:e,value:e})))),(0,t.createElement)("div",{className:"formAtts"},"rsvpmaker/formfield"==n.blockName&&(0,t.createElement)(s.TextControl,{label:n.attrs.label}),"rsvpmaker/formtextarea"==n.blockName&&(0,t.createElement)(s.TextareaControl,{label:n.attrs.label}),"rsvpmaker/formselect"==n.blockName&&(0,t.createElement)(dt,{label:n.attrs.label,options:r}),"rsvpmaker/formradio"==n.blockName&&(0,t.createElement)(s.RadioControl,{label:n.attrs.label,options:r}))}))):(0,t.createElement)("p",null,(0,t.createElement)("a",{onClick:()=>{n(!0)}},"+ Add Guests"))}D||F.push({label:"Guest Fields",value:"rsvpmaker/guests"}),M||F.push({label:"Note Field",value:"rsvpmaker/formnote"});let Q="",B=!0;return(0,t.createElement)("div",{className:"rsvptab"},S.data.is_default&&(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"Default Form Selected"),(0,t.createElement)("p",null,"Changes you make below will apply to all events that use the default form. Switch to a custom form to make customizations for this event only. Forms can also be customized from an event template.")),S.data.is_inherited&&(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"Form Is Inherited"),(0,t.createElement)("p",null,"This form is inherited from a template or another document. Changes you make below will apply to all events that use the same form. Switch to a custom form to make customizations for this event only. Forms can also be customized from an event template.")),(0,t.createElement)(s.ToggleControl,{label:"Show Form Preview",checked:f,onChange:()=>{h(!f)}}),f&&A.map(((e,n)=>{B=e.blockName.indexOf("rsvpmaker")>-1;let r=[];if(e?.attrs.choicearray&&(r=e.attrs.choicearray.map((e=>({label:e,value:e})))),null!=e.blockName)return(0,t.createElement)("div",null,"rsvpmaker/formfield"==e.blockName&&(0,t.createElement)(s.TextControl,{label:e.attrs.label}),"rsvpmaker/formtextarea"==e.blockName&&(0,t.createElement)(s.TextareaControl,{label:e.attrs.label}),"rsvpmaker/formselect"==e.blockName&&(0,t.createElement)(dt,{label:e.attrs.label,options:r}),"rsvpmaker/formradio"==e.blockName&&(0,t.createElement)(s.RadioControl,{label:e.attrs.label,options:r}),"rsvpmaker/guests"==e.blockName&&(0,t.createElement)(q,null),"rsvpmaker/formchimp"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("input",{type:"checkbox"})," Add me to your email list"),!B&&e.innerHTML&&(0,t.createElement)(et,{innerHTML:e.innerHTML}))})),(0,t.createElement)("h4",null,"Form Editing Controls"),A.map(((e,r)=>{if(Q=e.blockName.replace(/^[^/]+\//,""),B=e.blockName.indexOf("rsvpmaker")>-1,"formchimp"==Q?Q="Add to Email List Checkbox":"formnote"==Q&&(Q="Note"),null!=e.blockName)return(0,t.createElement)("div",{className:"formblock"},(0,t.createElement)("div",{class:"blockheader"},(0,t.createElement)("div",{className:"reorganize-drag"},(0,t.createElement)("div",{className:"titleline"},(0,t.createElement)("h2",null,Q," ",e.attrs.label&&(0,t.createElement)("span",{className:"fieldlabel"},e.attrs.label))," ",!["rsvpmaker/formnote","rsvpmaker/guests"].includes(e.blockName)&&r>0&&(0,t.createElement)("button",{className:"blockmove",onClick:()=>{I(r,"up")}},(0,t.createElement)(ft,null))," ",!["rsvpmaker/formnote","rsvpmaker/guests"].includes(e.blockName)&&r!=N&&(0,t.createElement)("button",{className:"blockmove",onClick:()=>{I(r,"down")}},(0,t.createElement)(ht,null))," ",(0,t.createElement)(L,{blockindex:r})," "),"rsvpmaker/guests"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Gathers information about guests.")),"rsvpmaker/formnote"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"A free text entry note at the bottom of the form.")),"rsvpmaker/formchimp"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Displays an Add to Email List checkbox on the form")),!B&&e.innerHTML&&(0,t.createElement)("div",null,(0,t.createElement)(et,{innerHTML:e.innerHTML})," ",(0,t.createElement)("br",null),(0,t.createElement)("em",null,(0,t.createElement)("a",{href:"/wp-admin/post.php?action=edit&post="+n},"Open in the WordPress editor"))),(0,t.createElement)(j,{attrs:e.attrs,blockName:e.blockName,blockindex:r,setFormItemAttr:U}))))})),(0,t.createElement)("p",null,"Add a form field ",(0,t.createElement)(dt,{label:"Type",options:F,value:o,onChange:e=>{a(e)}})," ",!["rsvpmaker/formnote","rsvpmaker/guests","rsvpmaker/formchimp"].includes(o)&&(0,t.createElement)(s.TextControl,{label:"Field Label",value:l,onChange:e=>{u(e)}})," "),["rsvpmaker/formselect","rsvpmaker/formradio"].includes(o)&&(0,t.createElement)("p",null,(0,t.createElement)("label",null,"Choices"),(0,t.createElement)("br",null),(0,t.createElement)("textarea",{value:c,onChange:e=>{d(e.target.value)}}),(0,t.createElement)("br",null),(0,t.createElement)("em",null,"Enter one choice per line")),(0,t.createElement)("p",null,(0,t.createElement)("button",{onClick:function(){if(!o)return;let e;if(console.log(o),console.log(l),"rsvpmaker/formnote"==o)e={blockName:"rsvpmaker/formnote",attrs:[],innerBlocks:[],innerHTML:"",innerContent:[]};else if("rsvpmaker/guests"==o)e={blockName:"rsvpmaker/guests",attrs:[],innerBlocks:[{blockName:"core/paragraph",attrs:[],innerBlocks:[],innerHTML:"\n<p></p>\n",innerContent:["\n<p></p>\n"]}],innerHTML:'\n<div class="wp-block-rsvpmaker-guests"></div>\n',innerContent:['\n<div class="wp-block-rsvpmaker-guests">',null,"</div>\n"]};else{if(!l)return void alert("a field label is required");let t=l.toLowerCase().replace(/[^a-z0-9]/,"_");"first_name"==t&&(t="first"),"last_name"==t&&(t="last"),e={blockName:o,innerHTML:"",innerBlocks:[],innerContent:[],attrs:{label:l,slug:t}}}c&&(e.attrs.choicearray=c.split("\n")),console.log("newfield",e);const t=[];A.forEach(((n,r)=>{t.push(n),r==N&&t.push(e)})),O(t),a("rsvpmaker/formfield"),u(""),d("")}},"Add")),(0,t.createElement)("p",null,"You can also open this form ",(0,t.createElement)("a",{href:"/wp-admin/post.php?action=edit&post="+n},"in the WordPress editor"),"."),!e.single_form&&(0,t.createElement)(dt,{label:"Switch Form",value:x,options:R,onChange:r}),S.data.copied&&(0,t.createElement)("p",null,"Copied ",(0,t.createElement)("strong",null,S.data.copied)),!e.single_form&&(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"Save as Reusable Form"),(0,t.createElement)(s.TextControl,{label:"Form Title",value:p,onChange:m}),(0,t.createElement)("p",null,"You can save the form so it can also be used with other events."),(0,t.createElement)("p",null,(0,t.createElement)("button",{onClick:e=>{e.preventDefault(),O(A),m("")}},"Create Form"))))}function vt(e){const n=e=>{console.log("Selecting tab",e)},r=window.location.href.match(/tab=([^&]+)/),o=r?r[1]:"general",[a,i]=(0,t.useState)([]);function l(e,t,n="rsvp_options"){console.log("addchange key",e),console.log("addchange value",t),console.log("addchange type",n),function(e=null,t=null,n="rsvp_options"){if(!e)return a;"reset"==e&&i([]),i((r=>{if(!r||!Array.isArray(r))return[].push(t);console.log("changeset start",r),console.log("changeset new value",t);const o=r.findIndex((t=>t.key==e&&t.type==n));return console.log("changeset exists test",o),o>-1?r[o].value=t:r.push({key:e,value:t,type:n}),console.log("changeset",r),r}))}(e,t,n)}return(0,t.createElement)((()=>(0,t.createElement)(s.TabPanel,{className:"rsvpmaker-tab-panel",activeClass:"nav-tab-active",onSelect:n,initialTabName:o,tabs:[{name:"general",title:"General Settings",className:"nav-tab"},{name:"security",title:"Security",className:"nav-tab"},{name:"payment",title:"Payment",className:"nav-tab"},{name:"forms",title:"Forms",className:"nav-tab"},{name:"email",title:"Email",className:"nav-tab"}]},(n=>"general"==n.name?(0,t.createElement)(st,{addChange:l,setChanges:i,changes:a}):"security"==n.name?(0,t.createElement)(lt,{addChange:l,setChanges:i,changes:a}):"payment"==n.name?(0,t.createElement)(ut,{addChange:l,setChanges:i,changes:a}):"forms"==n.name?(0,t.createElement)(mt,{form_id:e.form_id,addChange:l,setChanges:i,changes:a}):"email"==n.name?(0,t.createElement)(ct,{addChange:l,setChanges:i,changes:a}):(0,t.createElement)("section",null,(0,t.createElement)("p",null,n.title))))),null)}const gt=new i.QueryClient;window.addEventListener("load",(function(e){const n=document.getElementById("rsvpmaker-admin"),o=n.getAttribute("form_id");a().render((0,t.createElement)(r().StrictMode,null,(0,t.createElement)(i.QueryClientProvider,{client:gt},(0,t.createElement)(vt,{form_id:o}))),n)}))})()})(); -
rsvpmaker/tags/11.1.5/admin/build/editor-sidebar/sidebars.asset.php
r3104244 r3110769 1 <?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-date', 'wp-utils'), 'version' => ' 54fc4a945b1a565333cc');1 <?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-components', 'wp-date', 'wp-utils'), 'version' => '74dce8e5b8314b66b592'); -
rsvpmaker/tags/11.1.5/admin/build/editor-sidebar/sidebars.js
r3104244 r3110769 1 (()=>{var e={838:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:a}=Object;let{freeze:o,seal:i,create:s}=Object,{apply:l,construct:u}="undefined"!=typeof Reflect&&Reflect;o||(o=function(e){return e}),i||(i=function(e){return e}),l||(l=function(e,t,n){return e.apply(t,n)}),u||(u=function(e,t){return new e(...t)});const c=S(Array.prototype.forEach), d=S(Array.prototype.pop),m=S(Array.prototype.push),p=S(String.prototype.toLowerCase),f=S(String.prototype.toString),h=S(String.prototype.match),v=S(String.prototype.replace),y=S(String.prototype.indexOf),g=S(String.prototype.trim),E=S(Object.prototype.hasOwnProperty),b=S(RegExp.prototype.test),_=(w=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u(w,t)});var w;function S(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return l(e,t,r)}}function C(e,r){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p;t&&t(e,null);let o=r.length;for(;o--;){let t=r[o];if("string"==typeof t){const e=a(t);e!==t&&(n(r)||(r[o]=e),t=e)}e[t]=!0}return e}function k(e){for(let t=0;t<e.length;t++)E(e,t)||(e[t]=null);return e}function T(t){const n=s(null);for(const[r,a]of e(t))E(t,r)&&(Array.isArray(a)?n[r]=k(a):a&&"object"==typeof a&&a.constructor===Object?n[r]=T(a):n[r]=a);return n}function O(e,t){for(;null!==e;){const n=a(e,t);if(n){if(n.get)return S(n.get);if("function"==typeof n.value)return S(n.value)}e=r(e)}return function(){return null}}const A=o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),R=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),P=o(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),x=o(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),N=o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),D=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),M=o(["#text"]),F=o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),L=o(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),j=o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),I=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),U=i(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Q=i(/<%[\w\W]*|[\w\W]*%>/gm),q=i(/\${[\w\W]*}/gm),K=i(/^data-[\-\w.\u00B7-\uFFFF]/),B=i(/^aria-[\-\w]+$/),H=i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),V=i(/^(?:\w+script|data):/i),z=i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),G=i(/^html$/i),W=i(/^[a-z][.\w]*(-[.\w]+)+$/i);var $=Object.freeze({__proto__:null,MUSTACHE_EXPR:U,ERB_EXPR:Q,TMPLIT_EXPR:q,DATA_ATTR:K,ARIA_ATTR:B,IS_ALLOWED_URI:H,IS_SCRIPT_OR_DATA:V,ATTR_WHITESPACE:z,DOCTYPE_NAME:G,CUSTOM_ELEMENT:W});const Y=function(){return"undefined"==typeof window?null:window};return function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y();const r=e=>t(e);if(r.version="3.0.11",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;let{document:a}=n;const i=a,l=i.currentScript,{DocumentFragment:u,HTMLTemplateElement:w,Node:S,Element:k,NodeFilter:U,NamedNodeMap:Q=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:q,DOMParser:K,trustedTypes:B}=n,V=k.prototype,z=O(V,"cloneNode"),W=O(V,"nextSibling"),J=O(V,"childNodes"),X=O(V,"parentNode");if("function"==typeof w){const e=a.createElement("template");e.content&&e.content.ownerDocument&&(a=e.content.ownerDocument)}let Z,ee="";const{implementation:te,createNodeIterator:ne,createDocumentFragment:re,getElementsByTagName:ae}=a,{importNode:oe}=i;let ie={};r.isSupported="function"==typeof e&&"function"==typeof X&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:se,ERB_EXPR:le,TMPLIT_EXPR:ue,DATA_ATTR:ce,ARIA_ATTR:de,IS_SCRIPT_OR_DATA:me,ATTR_WHITESPACE:pe,CUSTOM_ELEMENT:fe}=$;let{IS_ALLOWED_URI:he}=$,ve=null;const ye=C({},[...A,...R,...P,...N,...M]);let ge=null;const Ee=C({},[...F,...L,...j,...I]);let be=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),_e=null,we=null,Se=!0,Ce=!0,ke=!1,Te=!0,Oe=!1,Ae=!1,Re=!1,Pe=!1,xe=!1,Ne=!1,De=!1,Me=!0,Fe=!1,Le=!0,je=!1,Ie={},Ue=null;const Qe=C({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let qe=null;const Ke=C({},["audio","video","img","source","image","track"]);let Be=null;const He=C({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ve="http://www.w3.org/1998/Math/MathML",ze="http://www.w3.org/2000/svg",Ge="http://www.w3.org/1999/xhtml";let We=Ge,$e=!1,Ye=null;const Je=C({},[Ve,ze,Ge],f);let Xe=null;const Ze=["application/xhtml+xml","text/html"];let et=null,tt=null;const nt=a.createElement("form"),rt=function(e){return e instanceof RegExp||e instanceof Function},at=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!tt||tt!==e){if(e&&"object"==typeof e||(e={}),e=T(e),Xe=-1===Ze.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,et="application/xhtml+xml"===Xe?f:p,ve=E(e,"ALLOWED_TAGS")?C({},e.ALLOWED_TAGS,et):ye,ge=E(e,"ALLOWED_ATTR")?C({},e.ALLOWED_ATTR,et):Ee,Ye=E(e,"ALLOWED_NAMESPACES")?C({},e.ALLOWED_NAMESPACES,f):Je,Be=E(e,"ADD_URI_SAFE_ATTR")?C(T(He),e.ADD_URI_SAFE_ATTR,et):He,qe=E(e,"ADD_DATA_URI_TAGS")?C(T(Ke),e.ADD_DATA_URI_TAGS,et):Ke,Ue=E(e,"FORBID_CONTENTS")?C({},e.FORBID_CONTENTS,et):Qe,_e=E(e,"FORBID_TAGS")?C({},e.FORBID_TAGS,et):{},we=E(e,"FORBID_ATTR")?C({},e.FORBID_ATTR,et):{},Ie=!!E(e,"USE_PROFILES")&&e.USE_PROFILES,Se=!1!==e.ALLOW_ARIA_ATTR,Ce=!1!==e.ALLOW_DATA_ATTR,ke=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Te=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Oe=e.SAFE_FOR_TEMPLATES||!1,Ae=e.WHOLE_DOCUMENT||!1,xe=e.RETURN_DOM||!1,Ne=e.RETURN_DOM_FRAGMENT||!1,De=e.RETURN_TRUSTED_TYPE||!1,Pe=e.FORCE_BODY||!1,Me=!1!==e.SANITIZE_DOM,Fe=e.SANITIZE_NAMED_PROPS||!1,Le=!1!==e.KEEP_CONTENT,je=e.IN_PLACE||!1,he=e.ALLOWED_URI_REGEXP||H,We=e.NAMESPACE||Ge,be=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(be.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(be.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(be.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Oe&&(Ce=!1),Ne&&(xe=!0),Ie&&(ve=C({},M),ge=[],!0===Ie.html&&(C(ve,A),C(ge,F)),!0===Ie.svg&&(C(ve,R),C(ge,L),C(ge,I)),!0===Ie.svgFilters&&(C(ve,P),C(ge,L),C(ge,I)),!0===Ie.mathMl&&(C(ve,N),C(ge,j),C(ge,I))),e.ADD_TAGS&&(ve===ye&&(ve=T(ve)),C(ve,e.ADD_TAGS,et)),e.ADD_ATTR&&(ge===Ee&&(ge=T(ge)),C(ge,e.ADD_ATTR,et)),e.ADD_URI_SAFE_ATTR&&C(Be,e.ADD_URI_SAFE_ATTR,et),e.FORBID_CONTENTS&&(Ue===Qe&&(Ue=T(Ue)),C(Ue,e.FORBID_CONTENTS,et)),Le&&(ve["#text"]=!0),Ae&&C(ve,["html","head","body"]),ve.table&&(C(ve,["tbody"]),delete _e.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Z=e.TRUSTED_TYPES_POLICY,ee=Z.createHTML("")}else void 0===Z&&(Z=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+a+" could not be created."),null}}(B,l)),null!==Z&&"string"==typeof ee&&(ee=Z.createHTML(""));o&&o(e),tt=e}},ot=C({},["mi","mo","mn","ms","mtext"]),it=C({},["foreignobject","desc","title","annotation-xml"]),st=C({},["title","style","font","a","script"]),lt=C({},[...R,...P,...x]),ut=C({},[...N,...D]),ct=function(e){m(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},dt=function(e,t){try{m(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){m(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ge[e])if(xe||Ne)try{ct(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},mt=function(e){let t=null,n=null;if(Pe)e="<remove></remove>"+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Xe&&We===Ge&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=Z?Z.createHTML(e):e;if(We===Ge)try{t=(new K).parseFromString(r,Xe)}catch(e){}if(!t||!t.documentElement){t=te.createDocument(We,"template",null);try{t.documentElement.innerHTML=$e?ee:r}catch(e){}}const o=t.body||t.documentElement;return e&&n&&o.insertBefore(a.createTextNode(n),o.childNodes[0]||null),We===Ge?ae.call(t,Ae?"html":"body")[0]:Ae?t.documentElement:o},pt=function(e){return ne.call(e.ownerDocument||e,e,U.SHOW_ELEMENT|U.SHOW_COMMENT|U.SHOW_TEXT|U.SHOW_PROCESSING_INSTRUCTION|U.SHOW_CDATA_SECTION,null)},ft=function(e){return"function"==typeof S&&e instanceof S},ht=function(e,t,n){ie[e]&&c(ie[e],(e=>{e.call(r,t,n,tt)}))},vt=function(e){let t=null;if(ht("beforeSanitizeElements",e,null),(n=e)instanceof q&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof Q)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return ct(e),!0;var n;const a=et(e.nodeName);if(ht("uponSanitizeElement",e,{tagName:a,allowedTags:ve}),e.hasChildNodes()&&!ft(e.firstElementChild)&&b(/<[/\w]/g,e.innerHTML)&&b(/<[/\w]/g,e.textContent))return ct(e),!0;if(7===e.nodeType)return ct(e),!0;if(!ve[a]||_e[a]){if(!_e[a]&>(a)){if(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,a))return!1;if(be.tagNameCheck instanceof Function&&be.tagNameCheck(a))return!1}if(Le&&!Ue[a]){const t=X(e)||e.parentNode,n=J(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(z(n[r],!0),W(e))}return ct(e),!0}return e instanceof k&&!function(e){let t=X(e);t&&t.tagName||(t={namespaceURI:We,tagName:"template"});const n=p(e.tagName),r=p(t.tagName);return!!Ye[e.namespaceURI]&&(e.namespaceURI===ze?t.namespaceURI===Ge?"svg"===n:t.namespaceURI===Ve?"svg"===n&&("annotation-xml"===r||ot[r]):Boolean(lt[n]):e.namespaceURI===Ve?t.namespaceURI===Ge?"math"===n:t.namespaceURI===ze?"math"===n&&it[r]:Boolean(ut[n]):e.namespaceURI===Ge?!(t.namespaceURI===ze&&!it[r])&&!(t.namespaceURI===Ve&&!ot[r])&&!ut[n]&&(st[n]||!lt[n]):!("application/xhtml+xml"!==Xe||!Ye[e.namespaceURI]))}(e)?(ct(e),!0):"noscript"!==a&&"noembed"!==a&&"noframes"!==a||!b(/<\/no(script|embed|frames)/i,e.innerHTML)?(Oe&&3===e.nodeType&&(t=e.textContent,c([se,le,ue],(e=>{t=v(t,e," ")})),e.textContent!==t&&(m(r.removed,{element:e.cloneNode()}),e.textContent=t)),ht("afterSanitizeElements",e,null),!1):(ct(e),!0)},yt=function(e,t,n){if(Me&&("id"===t||"name"===t)&&(n in a||n in nt))return!1;if(Ce&&!we[t]&&b(ce,t));else if(Se&&b(de,t));else if(!ge[t]||we[t]){if(!(gt(e)&&(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,e)||be.tagNameCheck instanceof Function&&be.tagNameCheck(e))&&(be.attributeNameCheck instanceof RegExp&&b(be.attributeNameCheck,t)||be.attributeNameCheck instanceof Function&&be.attributeNameCheck(t))||"is"===t&&be.allowCustomizedBuiltInElements&&(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,n)||be.tagNameCheck instanceof Function&&be.tagNameCheck(n))))return!1}else if(Be[t]);else if(b(he,v(n,pe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(n,"data:")||!qe[e])if(ke&&!b(me,v(n,pe,"")));else if(n)return!1;return!0},gt=function(e){return"annotation-xml"!==e&&h(e,fe)},Et=function(e){ht("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};let a=t.length;for(;a--;){const o=t[a],{name:i,namespaceURI:s,value:l}=o,u=et(i);let m="value"===i?l:g(l);if(n.attrName=u,n.attrValue=m,n.keepAttr=!0,n.forceKeepAttr=void 0,ht("uponSanitizeAttribute",e,n),m=n.attrValue,n.forceKeepAttr)continue;if(dt(i,e),!n.keepAttr)continue;if(!Te&&b(/\/>/i,m)){dt(i,e);continue}Oe&&c([se,le,ue],(e=>{m=v(m,e," ")}));const p=et(e.nodeName);if(yt(p,u,m)){if(!Fe||"id"!==u&&"name"!==u||(dt(i,e),m="user-content-"+m),Z&&"object"==typeof B&&"function"==typeof B.getAttributeType)if(s);else switch(B.getAttributeType(p,u)){case"TrustedHTML":m=Z.createHTML(m);break;case"TrustedScriptURL":m=Z.createScriptURL(m)}try{s?e.setAttributeNS(s,i,m):e.setAttribute(i,m),d(r.removed)}catch(e){}}}ht("afterSanitizeAttributes",e,null)},bt=function e(t){let n=null;const r=pt(t);for(ht("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)ht("uponSanitizeShadowNode",n,null),vt(n)||(n.content instanceof u&&e(n.content),Et(n));ht("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,a=null,o=null,s=null;if($e=!e,$e&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ft(e)){if("function"!=typeof e.toString)throw _("toString is not a function");if("string"!=typeof(e=e.toString()))throw _("dirty is not a string, aborting")}if(!r.isSupported)return e;if(Re||at(t),r.removed=[],"string"==typeof e&&(je=!1),je){if(e.nodeName){const t=et(e.nodeName);if(!ve[t]||_e[t])throw _("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof S)n=mt("\x3c!----\x3e"),a=n.ownerDocument.importNode(e,!0),1===a.nodeType&&"BODY"===a.nodeName||"HTML"===a.nodeName?n=a:n.appendChild(a);else{if(!xe&&!Oe&&!Ae&&-1===e.indexOf("<"))return Z&&De?Z.createHTML(e):e;if(n=mt(e),!n)return xe?null:De?ee:""}n&&Pe&&ct(n.firstChild);const l=pt(je?e:n);for(;o=l.nextNode();)vt(o)||(o.content instanceof u&&bt(o.content),Et(o));if(je)return e;if(xe){if(Ne)for(s=re.call(n.ownerDocument);n.firstChild;)s.appendChild(n.firstChild);else s=n;return(ge.shadowroot||ge.shadowrootmode)&&(s=oe.call(i,s,!0)),s}let d=Ae?n.outerHTML:n.innerHTML;return Ae&&ve["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&b(G,n.ownerDocument.doctype.name)&&(d="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+d),Oe&&c([se,le,ue],(e=>{d=v(d,e," ")})),Z&&De?Z.createHTML(d):d},r.setConfig=function(){at(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Re=!0},r.clearConfig=function(){tt=null,Re=!1},r.isValidAttribute=function(e,t,n){tt||at({});const r=et(e),a=et(t);return yt(r,a,n)},r.addHook=function(e,t){"function"==typeof t&&(ie[e]=ie[e]||[],m(ie[e],t))},r.removeHook=function(e){if(ie[e])return d(ie[e])},r.removeHooks=function(e){ie[e]&&(ie[e]=[])},r.removeAllHooks=function(){ie={}},r}()}()},289:(e,t,n)=>{"use strict";n.d(t,{m:()=>i});var r=n(540),a=n(287),o=n(941),i=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!o.S$&&(null==(t=window)?void 0:t.addEventListener)){var n=function(){return e()};return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),function(){window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}},t}(0,r.A)(t,e);var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)},n.setEventListener=function(e){var t,n=this;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((function(e){"boolean"==typeof e?n.setFocused(e):n.onFocus()}))},n.setFocused=function(e){this.focused=e,e&&this.onFocus()},n.onFocus=function(){this.listeners.forEach((function(e){e()}))},n.isFocused=function(){return"boolean"==typeof this.focused?this.focused:"undefined"==typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)},t}(a.Q))},468:(e,t,n)=>{"use strict";n.d(t,{QueryClient:()=>r.E});var r=n(98),a=n(449);n.o(a,"QueryClientProvider")&&n.d(t,{QueryClientProvider:function(){return a.QueryClientProvider}}),n.o(a,"useMutation")&&n.d(t,{useMutation:function(){return a.useMutation}}),n.o(a,"useQuery")&&n.d(t,{useQuery:function(){return a.useQuery}}),n.o(a,"useQueryClient")&&n.d(t,{useQueryClient:function(){return a.useQueryClient}})},690:(e,t,n)=>{"use strict";n.d(t,{B:()=>o,t:()=>a});var r=console;function a(){return r}function o(e){r=e}},465:(e,t,n)=>{"use strict";n.d(t,{$:()=>u,s:()=>l});var r=n(168),a=n(690),o=n(428),i=n(281),s=n(941),l=function(){function e(e){this.options=(0,r.A)({},e.defaultOptions,e.options),this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.observers=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0},this.meta=e.meta}var t=e.prototype;return t.setState=function(e){this.dispatch({type:"setState",state:e})},t.addObserver=function(e){-1===this.observers.indexOf(e)&&this.observers.push(e)},t.removeObserver=function(e){this.observers=this.observers.filter((function(t){return t!==e}))},t.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(s.lQ).catch(s.lQ)):Promise.resolve()},t.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},t.execute=function(){var e,t=this,n="loading"===this.state.status,r=Promise.resolve();return n||(this.dispatch({type:"loading",variables:this.options.variables}),r=r.then((function(){null==t.mutationCache.config.onMutate||t.mutationCache.config.onMutate(t.state.variables,t)})).then((function(){return null==t.options.onMutate?void 0:t.options.onMutate(t.state.variables)})).then((function(e){e!==t.state.context&&t.dispatch({type:"loading",context:e,variables:t.state.variables})}))),r.then((function(){return t.executeMutation()})).then((function(n){e=n,null==t.mutationCache.config.onSuccess||t.mutationCache.config.onSuccess(e,t.state.variables,t.state.context,t)})).then((function(){return null==t.options.onSuccess?void 0:t.options.onSuccess(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(e,null,t.state.variables,t.state.context)})).then((function(){return t.dispatch({type:"success",data:e}),e})).catch((function(e){return null==t.mutationCache.config.onError||t.mutationCache.config.onError(e,t.state.variables,t.state.context,t),(0,a.t)().error(e),Promise.resolve().then((function(){return null==t.options.onError?void 0:t.options.onError(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(void 0,e,t.state.variables,t.state.context)})).then((function(){throw t.dispatch({type:"error",error:e}),e}))}))},t.executeMutation=function(){var e,t=this;return this.retryer=new i.eJ({fn:function(){return t.options.mutationFn?t.options.mutationFn(t.state.variables):Promise.reject("No mutationFn found")},onFail:function(){t.dispatch({type:"failed"})},onPause:function(){t.dispatch({type:"pause"})},onContinue:function(){t.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay}),this.retryer.promise},t.dispatch=function(e){var t=this;this.state=function(e,t){switch(t.type){case"failed":return(0,r.A)({},e,{failureCount:e.failureCount+1});case"pause":return(0,r.A)({},e,{isPaused:!0});case"continue":return(0,r.A)({},e,{isPaused:!1});case"loading":return(0,r.A)({},e,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return(0,r.A)({},e,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return(0,r.A)({},e,{data:void 0,error:t.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return(0,r.A)({},e,t.state);default:return e}}(this.state,e),o.j.batch((function(){t.observers.forEach((function(t){t.onMutationUpdate(e)})),t.mutationCache.notify(t)}))},e}();function u(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}},428:(e,t,n)=>{"use strict";n.d(t,{j:()=>a});var r=n(941),a=new(function(){function e(){this.queue=[],this.transactions=0,this.notifyFn=function(e){e()},this.batchNotifyFn=function(e){e()}}var t=e.prototype;return t.batch=function(e){var t;this.transactions++;try{t=e()}finally{this.transactions--,this.transactions||this.flush()}return t},t.schedule=function(e){var t=this;this.transactions?this.queue.push(e):(0,r.G6)((function(){t.notifyFn(e)}))},t.batchCalls=function(e){var t=this;return function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];t.schedule((function(){e.apply(void 0,r)}))}},t.flush=function(){var e=this,t=this.queue;this.queue=[],t.length&&(0,r.G6)((function(){e.batchNotifyFn((function(){t.forEach((function(t){e.notifyFn(t)}))}))}))},t.setNotifyFunction=function(e){this.notifyFn=e},t.setBatchNotifyFunction=function(e){this.batchNotifyFn=e},e}())},622:(e,t,n)=>{"use strict";n.d(t,{t:()=>i});var r=n(540),a=n(287),o=n(941),i=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!o.S$&&(null==(t=window)?void 0:t.addEventListener)){var n=function(){return e()};return window.addEventListener("online",n,!1),window.addEventListener("offline",n,!1),function(){window.removeEventListener("online",n),window.removeEventListener("offline",n)}}},t}(0,r.A)(t,e);var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)},n.setEventListener=function(e){var t,n=this;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((function(e){"boolean"==typeof e?n.setOnline(e):n.onOnline()}))},n.setOnline=function(e){this.online=e,e&&this.onOnline()},n.onOnline=function(){this.listeners.forEach((function(e){e()}))},n.isOnline=function(){return"boolean"==typeof this.online?this.online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine},t}(a.Q))},98:(e,t,n)=>{"use strict";n.d(t,{E:()=>y});var r=n(168),a=n(941),o=n(540),i=n(428),s=n(690),l=n(281),u=function(){function e(e){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=e.meta,this.scheduleGc()}var t=e.prototype;return t.setOptions=function(e){var t;this.options=(0,r.A)({},this.defaultOptions,e),this.meta=null==e?void 0:e.meta,this.cacheTime=Math.max(this.cacheTime||0,null!=(t=this.options.cacheTime)?t:3e5)},t.setDefaultOptions=function(e){this.defaultOptions=e},t.scheduleGc=function(){var e=this;this.clearGcTimeout(),(0,a.gn)(this.cacheTime)&&(this.gcTimeout=setTimeout((function(){e.optionalRemove()}),this.cacheTime))},t.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},t.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},t.setData=function(e,t){var n,r,o=this.state.data,i=(0,a.Zw)(e,o);return(null==(n=(r=this.options).isDataEqual)?void 0:n.call(r,o,i))?i=o:!1!==this.options.structuralSharing&&(i=(0,a.BH)(o,i)),this.dispatch({data:i,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt}),i},t.setState=function(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})},t.cancel=function(e){var t,n=this.promise;return null==(t=this.retryer)||t.cancel(e),n?n.then(a.lQ).catch(a.lQ):Promise.resolve()},t.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},t.reset=function(){this.destroy(),this.setState(this.initialState)},t.isActive=function(){return this.observers.some((function(e){return!1!==e.options.enabled}))},t.isFetching=function(){return this.state.isFetching},t.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some((function(e){return e.getCurrentResult().isStale}))},t.isStaleByTime=function(e){return void 0===e&&(e=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!(0,a.j3)(this.state.dataUpdatedAt,e)},t.onFocus=function(){var e,t=this.observers.find((function(e){return e.shouldFetchOnWindowFocus()}));t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.onOnline=function(){var e,t=this.observers.find((function(e){return e.shouldFetchOnReconnect()}));t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.addObserver=function(e){-1===this.observers.indexOf(e)&&(this.observers.push(e),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))},t.removeObserver=function(e){-1!==this.observers.indexOf(e)&&(this.observers=this.observers.filter((function(t){return t!==e})),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:e}))},t.getObserversCount=function(){return this.observers.length},t.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},t.fetch=function(e,t){var n,r,o,i=this;if(this.state.isFetching)if(this.state.dataUpdatedAt&&(null==t?void 0:t.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var u;return null==(u=this.retryer)||u.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){var c=this.observers.find((function(e){return e.options.queryFn}));c&&this.setOptions(c.options)}var d=(0,a.HN)(this.queryKey),m=(0,a.jY)(),p={queryKey:d,pageParam:void 0,meta:this.meta};Object.defineProperty(p,"signal",{enumerable:!0,get:function(){if(m)return i.abortSignalConsumed=!0,m.signal}});var f,h,v={fetchOptions:t,options:this.options,queryKey:d,state:this.state,fetchFn:function(){return i.options.queryFn?(i.abortSignalConsumed=!1,i.options.queryFn(p)):Promise.reject("Missing queryFn")},meta:this.meta};return(null==(n=this.options.behavior)?void 0:n.onFetch)&&(null==(f=this.options.behavior)||f.onFetch(v)),this.revertState=this.state,this.state.isFetching&&this.state.fetchMeta===(null==(r=v.fetchOptions)?void 0:r.meta)||this.dispatch({type:"fetch",meta:null==(h=v.fetchOptions)?void 0:h.meta}),this.retryer=new l.eJ({fn:v.fetchFn,abort:null==m||null==(o=m.abort)?void 0:o.bind(m),onSuccess:function(e){i.setData(e),null==i.cache.config.onSuccess||i.cache.config.onSuccess(e,i),0===i.cacheTime&&i.optionalRemove()},onError:function(e){(0,l.wm)(e)&&e.silent||i.dispatch({type:"error",error:e}),(0,l.wm)(e)||(null==i.cache.config.onError||i.cache.config.onError(e,i),(0,s.t)().error(e)),0===i.cacheTime&&i.optionalRemove()},onFail:function(){i.dispatch({type:"failed"})},onPause:function(){i.dispatch({type:"pause"})},onContinue:function(){i.dispatch({type:"continue"})},retry:v.options.retry,retryDelay:v.options.retryDelay}),this.promise=this.retryer.promise,this.promise},t.dispatch=function(e){var t=this;this.state=this.reducer(this.state,e),i.j.batch((function(){t.observers.forEach((function(t){t.onQueryUpdate(e)})),t.cache.notify({query:t,type:"queryUpdated",action:e})}))},t.getDefaultState=function(e){var t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==e.initialData?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0,r=void 0!==t;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?null!=n?n:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:r?"success":"idle"}},t.reducer=function(e,t){var n,a;switch(t.type){case"failed":return(0,r.A)({},e,{fetchFailureCount:e.fetchFailureCount+1});case"pause":return(0,r.A)({},e,{isPaused:!0});case"continue":return(0,r.A)({},e,{isPaused:!1});case"fetch":return(0,r.A)({},e,{fetchFailureCount:0,fetchMeta:null!=(n=t.meta)?n:null,isFetching:!0,isPaused:!1},!e.dataUpdatedAt&&{error:null,status:"loading"});case"success":return(0,r.A)({},e,{data:t.data,dataUpdateCount:e.dataUpdateCount+1,dataUpdatedAt:null!=(a=t.dataUpdatedAt)?a:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var o=t.error;return(0,l.wm)(o)&&o.revert&&this.revertState?(0,r.A)({},this.revertState):(0,r.A)({},e,{error:o,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return(0,r.A)({},e,{isInvalidated:!0});case"setState":return(0,r.A)({},e,t.state);default:return e}},e}(),c=n(287),d=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.queries=[],n.queriesMap={},n}(0,o.A)(t,e);var n=t.prototype;return n.build=function(e,t,n){var r,o=t.queryKey,i=null!=(r=t.queryHash)?r:(0,a.F$)(o,t),s=this.get(i);return s||(s=new u({cache:this,queryKey:o,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(o),meta:t.meta}),this.add(s)),s},n.add=function(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"queryAdded",query:e}))},n.remove=function(e){var t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter((function(t){return t!==e})),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"queryRemoved",query:e}))},n.clear=function(){var e=this;i.j.batch((function(){e.queries.forEach((function(t){e.remove(t)}))}))},n.get=function(e){return this.queriesMap[e]},n.getAll=function(){return this.queries},n.find=function(e,t){var n=(0,a.b_)(e,t)[0];return void 0===n.exact&&(n.exact=!0),this.queries.find((function(e){return(0,a.MK)(n,e)}))},n.findAll=function(e,t){var n=(0,a.b_)(e,t)[0];return Object.keys(n).length>0?this.queries.filter((function(e){return(0,a.MK)(n,e)})):this.queries},n.notify=function(e){var t=this;i.j.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},n.onFocus=function(){var e=this;i.j.batch((function(){e.queries.forEach((function(e){e.onFocus()}))}))},n.onOnline=function(){var e=this;i.j.batch((function(){e.queries.forEach((function(e){e.onOnline()}))}))},t}(c.Q),m=n(465),p=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.mutations=[],n.mutationId=0,n}(0,o.A)(t,e);var n=t.prototype;return n.build=function(e,t,n){var r=new m.s({mutationCache:this,mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:n,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0,meta:t.meta});return this.add(r),r},n.add=function(e){this.mutations.push(e),this.notify(e)},n.remove=function(e){this.mutations=this.mutations.filter((function(t){return t!==e})),e.cancel(),this.notify(e)},n.clear=function(){var e=this;i.j.batch((function(){e.mutations.forEach((function(t){e.remove(t)}))}))},n.getAll=function(){return this.mutations},n.find=function(e){return void 0===e.exact&&(e.exact=!0),this.mutations.find((function(t){return(0,a.nJ)(e,t)}))},n.findAll=function(e){return this.mutations.filter((function(t){return(0,a.nJ)(e,t)}))},n.notify=function(e){var t=this;i.j.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},n.onFocus=function(){this.resumePausedMutations()},n.onOnline=function(){this.resumePausedMutations()},n.resumePausedMutations=function(){var e=this.mutations.filter((function(e){return e.state.isPaused}));return i.j.batch((function(){return e.reduce((function(e,t){return e.then((function(){return t.continue().catch(a.lQ)}))}),Promise.resolve())}))},t}(c.Q),f=n(289),h=n(622);function v(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}var y=function(){function e(e){void 0===e&&(e={}),this.queryCache=e.queryCache||new d,this.mutationCache=e.mutationCache||new p,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var t=e.prototype;return t.mount=function(){var e=this;this.unsubscribeFocus=f.m.subscribe((function(){f.m.isFocused()&&h.t.isOnline()&&(e.mutationCache.onFocus(),e.queryCache.onFocus())})),this.unsubscribeOnline=h.t.subscribe((function(){f.m.isFocused()&&h.t.isOnline()&&(e.mutationCache.onOnline(),e.queryCache.onOnline())}))},t.unmount=function(){var e,t;null==(e=this.unsubscribeFocus)||e.call(this),null==(t=this.unsubscribeOnline)||t.call(this)},t.isFetching=function(e,t){var n=(0,a.b_)(e,t)[0];return n.fetching=!0,this.queryCache.findAll(n).length},t.isMutating=function(e){return this.mutationCache.findAll((0,r.A)({},e,{fetching:!0})).length},t.getQueryData=function(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state.data},t.getQueriesData=function(e){return this.getQueryCache().findAll(e).map((function(e){return[e.queryKey,e.state.data]}))},t.setQueryData=function(e,t,n){var r=(0,a.vh)(e),o=this.defaultQueryOptions(r);return this.queryCache.build(this,o).setData(t,n)},t.setQueriesData=function(e,t,n){var r=this;return i.j.batch((function(){return r.getQueryCache().findAll(e).map((function(e){var a=e.queryKey;return[a,r.setQueryData(a,t,n)]}))}))},t.getQueryState=function(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state},t.removeQueries=function(e,t){var n=(0,a.b_)(e,t)[0],r=this.queryCache;i.j.batch((function(){r.findAll(n).forEach((function(e){r.remove(e)}))}))},t.resetQueries=function(e,t,n){var o=this,s=(0,a.b_)(e,t,n),l=s[0],u=s[1],c=this.queryCache,d=(0,r.A)({},l,{active:!0});return i.j.batch((function(){return c.findAll(l).forEach((function(e){e.reset()})),o.refetchQueries(d,u)}))},t.cancelQueries=function(e,t,n){var r=this,o=(0,a.b_)(e,t,n),s=o[0],l=o[1],u=void 0===l?{}:l;void 0===u.revert&&(u.revert=!0);var c=i.j.batch((function(){return r.queryCache.findAll(s).map((function(e){return e.cancel(u)}))}));return Promise.all(c).then(a.lQ).catch(a.lQ)},t.invalidateQueries=function(e,t,n){var o,s,l,u=this,c=(0,a.b_)(e,t,n),d=c[0],m=c[1],p=(0,r.A)({},d,{active:null==(o=null!=(s=d.refetchActive)?s:d.active)||o,inactive:null!=(l=d.refetchInactive)&&l});return i.j.batch((function(){return u.queryCache.findAll(d).forEach((function(e){e.invalidate()})),u.refetchQueries(p,m)}))},t.refetchQueries=function(e,t,n){var o=this,s=(0,a.b_)(e,t,n),l=s[0],u=s[1],c=i.j.batch((function(){return o.queryCache.findAll(l).map((function(e){return e.fetch(void 0,(0,r.A)({},u,{meta:{refetchPage:null==l?void 0:l.refetchPage}}))}))})),d=Promise.all(c).then(a.lQ);return(null==u?void 0:u.throwOnError)||(d=d.catch(a.lQ)),d},t.fetchQuery=function(e,t,n){var r=(0,a.vh)(e,t,n),o=this.defaultQueryOptions(r);void 0===o.retry&&(o.retry=!1);var i=this.queryCache.build(this,o);return i.isStaleByTime(o.staleTime)?i.fetch(o):Promise.resolve(i.state.data)},t.prefetchQuery=function(e,t,n){return this.fetchQuery(e,t,n).then(a.lQ).catch(a.lQ)},t.fetchInfiniteQuery=function(e,t,n){var r=(0,a.vh)(e,t,n);return r.behavior={onFetch:function(e){e.fetchFn=function(){var t,n,r,o,i,s,u,c,d,m=null==(t=e.fetchOptions)||null==(n=t.meta)?void 0:n.refetchPage,p=null==(r=e.fetchOptions)||null==(o=r.meta)?void 0:o.fetchMore,f=null==p?void 0:p.pageParam,h="forward"===(null==p?void 0:p.direction),y="backward"===(null==p?void 0:p.direction),g=(null==(i=e.state.data)?void 0:i.pages)||[],E=(null==(s=e.state.data)?void 0:s.pageParams)||[],b=(0,a.jY)(),_=null==b?void 0:b.signal,w=E,S=!1,C=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},k=function(e,t,n,r){return w=r?[t].concat(w):[].concat(w,[t]),r?[n].concat(e):[].concat(e,[n])},T=function(t,n,r,a){if(S)return Promise.reject("Cancelled");if(void 0===r&&!n&&t.length)return Promise.resolve(t);var o={queryKey:e.queryKey,signal:_,pageParam:r,meta:e.meta},i=C(o),s=Promise.resolve(i).then((function(e){return k(t,r,e,a)}));return(0,l.dd)(i)&&(s.cancel=i.cancel),s};if(g.length)if(h){var O=void 0!==f,A=O?f:v(e.options,g);u=T(g,O,A)}else if(y){var R=void 0!==f,P=R?f:(c=e.options,d=g,null==c.getPreviousPageParam?void 0:c.getPreviousPageParam(d[0],d));u=T(g,R,P,!0)}else!function(){w=[];var t=void 0===e.options.getNextPageParam,n=!m||!g[0]||m(g[0],0,g);u=n?T([],t,E[0]):Promise.resolve(k([],E[0],g[0]));for(var r=function(n){u=u.then((function(r){if(!m||!g[n]||m(g[n],n,g)){var a=t?E[n]:v(e.options,r);return T(r,t,a)}return Promise.resolve(k(r,E[n],g[n]))}))},a=1;a<g.length;a++)r(a)}();else u=T([]);var x=u.then((function(e){return{pages:e,pageParams:w}}));return x.cancel=function(){S=!0,null==b||b.abort(),(0,l.dd)(u)&&u.cancel()},x}}},this.fetchQuery(r)},t.prefetchInfiniteQuery=function(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(a.lQ).catch(a.lQ)},t.cancelMutations=function(){var e=this,t=i.j.batch((function(){return e.mutationCache.getAll().map((function(e){return e.cancel()}))}));return Promise.all(t).then(a.lQ).catch(a.lQ)},t.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},t.executeMutation=function(e){return this.mutationCache.build(this,e).execute()},t.getQueryCache=function(){return this.queryCache},t.getMutationCache=function(){return this.mutationCache},t.getDefaultOptions=function(){return this.defaultOptions},t.setDefaultOptions=function(e){this.defaultOptions=e},t.setQueryDefaults=function(e,t){var n=this.queryDefaults.find((function(t){return(0,a.Od)(e)===(0,a.Od)(t.queryKey)}));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})},t.getQueryDefaults=function(e){var t;return e?null==(t=this.queryDefaults.find((function(t){return(0,a.Cp)(e,t.queryKey)})))?void 0:t.defaultOptions:void 0},t.setMutationDefaults=function(e,t){var n=this.mutationDefaults.find((function(t){return(0,a.Od)(e)===(0,a.Od)(t.mutationKey)}));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})},t.getMutationDefaults=function(e){var t;return e?null==(t=this.mutationDefaults.find((function(t){return(0,a.Cp)(e,t.mutationKey)})))?void 0:t.defaultOptions:void 0},t.defaultQueryOptions=function(e){if(null==e?void 0:e._defaulted)return e;var t=(0,r.A)({},this.defaultOptions.queries,this.getQueryDefaults(null==e?void 0:e.queryKey),e,{_defaulted:!0});return!t.queryHash&&t.queryKey&&(t.queryHash=(0,a.F$)(t.queryKey,t)),t},t.defaultQueryObserverOptions=function(e){return this.defaultQueryOptions(e)},t.defaultMutationOptions=function(e){return(null==e?void 0:e._defaulted)?e:(0,r.A)({},this.defaultOptions.mutations,this.getMutationDefaults(null==e?void 0:e.mutationKey),e,{_defaulted:!0})},t.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},e}()},281:(e,t,n)=>{"use strict";n.d(t,{dd:()=>s,eJ:()=>c,wm:()=>u});var r=n(289),a=n(622),o=n(941);function i(e){return Math.min(1e3*Math.pow(2,e),3e4)}function s(e){return"function"==typeof(null==e?void 0:e.cancel)}var l=function(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent};function u(e){return e instanceof l}var c=function(e){var t,n,u,c,d=this,m=!1;this.abort=e.abort,this.cancel=function(e){return null==t?void 0:t(e)},this.cancelRetry=function(){m=!0},this.continueRetry=function(){m=!1},this.continue=function(){return null==n?void 0:n()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise((function(e,t){u=e,c=t}));var p=function(t){d.isResolved||(d.isResolved=!0,null==e.onSuccess||e.onSuccess(t),null==n||n(),u(t))},f=function(t){d.isResolved||(d.isResolved=!0,null==e.onError||e.onError(t),null==n||n(),c(t))};!function u(){if(!d.isResolved){var c;try{c=e.fn()}catch(e){c=Promise.reject(e)}t=function(e){if(!d.isResolved&&(f(new l(e)),null==d.abort||d.abort(),s(c)))try{c.cancel()}catch(e){}},d.isTransportCancelable=s(c),Promise.resolve(c).then(p).catch((function(t){var s,l;if(!d.isResolved){var c=null!=(s=e.retry)?s:3,p=null!=(l=e.retryDelay)?l:i,h="function"==typeof p?p(d.failureCount,t):p,v=!0===c||"number"==typeof c&&d.failureCount<c||"function"==typeof c&&c(d.failureCount,t);!m&&v?(d.failureCount++,null==e.onFail||e.onFail(d.failureCount,t),(0,o.yy)(h).then((function(){if(!r.m.isFocused()||!a.t.isOnline())return new Promise((function(t){n=t,d.isPaused=!0,null==e.onPause||e.onPause()})).then((function(){n=void 0,d.isPaused=!1,null==e.onContinue||e.onContinue()}))})).then((function(){m?f(t):u()}))):f(t)}}))}}()}},287:(e,t,n)=>{"use strict";n.d(t,{Q:()=>r});var r=function(){function e(){this.listeners=[]}var t=e.prototype;return t.subscribe=function(e){var t=this,n=e||function(){};return this.listeners.push(n),this.onSubscribe(),function(){t.listeners=t.listeners.filter((function(e){return e!==n})),t.onUnsubscribe()}},t.hasListeners=function(){return this.listeners.length>0},t.onSubscribe=function(){},t.onUnsubscribe=function(){},e}()},449:()=>{},941:(e,t,n)=>{"use strict";n.d(t,{BH:()=>E,Cp:()=>y,F$:()=>h,G6:()=>k,GR:()=>d,HN:()=>l,MK:()=>p,Od:()=>v,S$:()=>a,Zw:()=>i,b_:()=>m,f8:()=>b,gn:()=>s,j3:()=>u,jY:()=>T,lQ:()=>o,nJ:()=>f,vh:()=>c,yy:()=>C});var r=n(168),a="undefined"==typeof window;function o(){}function i(e,t){return"function"==typeof e?e(t):e}function s(e){return"number"==typeof e&&e>=0&&e!==1/0}function l(e){return Array.isArray(e)?e:[e]}function u(e,t){return Math.max(e+(t||0)-Date.now(),0)}function c(e,t,n){return S(e)?"function"==typeof t?(0,r.A)({},n,{queryKey:e,queryFn:t}):(0,r.A)({},t,{queryKey:e}):e}function d(e,t,n){return S(e)?"function"==typeof t?(0,r.A)({},n,{mutationKey:e,mutationFn:t}):(0,r.A)({},t,{mutationKey:e}):"function"==typeof e?(0,r.A)({},t,{mutationFn:e}):(0,r.A)({},e)}function m(e,t,n){return S(e)?[(0,r.A)({},t,{queryKey:e}),n]:[e||{},t]}function p(e,t){var n=e.active,r=e.exact,a=e.fetching,o=e.inactive,i=e.predicate,s=e.queryKey,l=e.stale;if(S(s))if(r){if(t.queryHash!==h(s,t.options))return!1}else if(!y(t.queryKey,s))return!1;var u=function(e,t){return!0===e&&!0===t||null==e&&null==t?"all":!1===e&&!1===t?"none":(null!=e?e:!t)?"active":"inactive"}(n,o);if("none"===u)return!1;if("all"!==u){var c=t.isActive();if("active"===u&&!c)return!1;if("inactive"===u&&c)return!1}return!("boolean"==typeof l&&t.isStale()!==l||"boolean"==typeof a&&t.isFetching()!==a||i&&!i(t))}function f(e,t){var n=e.exact,r=e.fetching,a=e.predicate,o=e.mutationKey;if(S(o)){if(!t.options.mutationKey)return!1;if(n){if(v(t.options.mutationKey)!==v(o))return!1}else if(!y(t.options.mutationKey,o))return!1}return!("boolean"==typeof r&&"loading"===t.state.status!==r||a&&!a(t))}function h(e,t){return((null==t?void 0:t.queryKeyHashFn)||v)(e)}function v(e){var t;return t=l(e),JSON.stringify(t,(function(e,t){return _(t)?Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{}):t}))}function y(e,t){return g(l(e),l(t))}function g(e,t){return e===t||typeof e==typeof t&&!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((function(n){return!g(e[n],t[n])}))}function E(e,t){if(e===t)return e;var n=Array.isArray(e)&&Array.isArray(t);if(n||_(e)&&_(t)){for(var r=n?e.length:Object.keys(e).length,a=n?t:Object.keys(t),o=a.length,i=n?[]:{},s=0,l=0;l<o;l++){var u=n?l:a[l];i[u]=E(e[u],t[u]),i[u]===e[u]&&s++}return r===o&&s===r?e:i}return t}function b(e,t){if(e&&!t||t&&!e)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}function _(e){if(!w(e))return!1;var t=e.constructor;if(void 0===t)return!0;var n=t.prototype;return!!w(n)&&!!n.hasOwnProperty("isPrototypeOf")}function w(e){return"[object Object]"===Object.prototype.toString.call(e)}function S(e){return"string"==typeof e||Array.isArray(e)}function C(e){return new Promise((function(t){setTimeout(t,e)}))}function k(e){Promise.resolve().then(e).catch((function(e){return setTimeout((function(){throw e}))}))}function T(){if("function"==typeof AbortController)return new AbortController}},942:(e,t,n)=>{"use strict";n.d(t,{QueryClient:()=>r.QueryClient,QueryClientProvider:()=>a.QueryClientProvider,useMutation:()=>a.useMutation,useQuery:()=>a.useQuery,useQueryClient:()=>a.useQueryClient});var r=n(468);n.o(r,"QueryClientProvider")&&n.d(t,{QueryClientProvider:function(){return r.QueryClientProvider}}),n.o(r,"useMutation")&&n.d(t,{useMutation:function(){return r.useMutation}}),n.o(r,"useQuery")&&n.d(t,{useQuery:function(){return r.useQuery}}),n.o(r,"useQueryClient")&&n.d(t,{useQueryClient:function(){return r.useQueryClient}});var a=n(960)},360:(e,t,n)=>{"use strict";n.d(t,{H:()=>u,j:()=>l});var r=n(609),a=n.n(r),o=a().createContext(void 0),i=a().createContext(!1);function s(e){return e&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=o),window.ReactQueryClientContext):o}var l=function(){var e=a().useContext(s(a().useContext(i)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},u=function(e){var t=e.client,n=e.contextSharing,r=void 0!==n&&n,o=e.children;a().useEffect((function(){return t.mount(),function(){t.unmount()}}),[t]);var l=s(r);return a().createElement(i.Provider,{value:r},a().createElement(l.Provider,{value:t},o))}},960:(e,t,n)=>{"use strict";n.d(t,{QueryClientProvider:()=>l.H,useMutation:()=>u.n,useQuery:()=>c.I,useQueryClient:()=>l.j});var r=n(428),a=n(795),o=n.n(a)().unstable_batchedUpdates;r.j.setBatchNotifyFunction(o);var i=n(690),s=console;(0,i.B)(s);var l=n(360),u=n(990),c=n(584)},990:(e,t,n)=>{"use strict";n.d(t,{n:()=>p});var r=n(168),a=n(609),o=n.n(a),i=n(428),s=n(941),l=n(540),u=n(465),c=function(e){function t(t,n){var r;return(r=e.call(this)||this).client=t,r.setOptions(n),r.bindMethods(),r.updateResult(),r}(0,l.A)(t,e);var n=t.prototype;return n.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},n.setOptions=function(e){this.options=this.client.defaultMutationOptions(e)},n.onUnsubscribe=function(){var e;this.listeners.length||null==(e=this.currentMutation)||e.removeObserver(this)},n.onMutationUpdate=function(e){this.updateResult();var t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)},n.getCurrentResult=function(){return this.currentResult},n.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},n.mutate=function(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,(0,r.A)({},this.options,{variables:void 0!==e?e:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},n.updateResult=function(){var e=this.currentMutation?this.currentMutation.state:(0,u.$)(),t=(0,r.A)({},e,{isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset});this.currentResult=t},n.notify=function(e){var t=this;i.j.batch((function(){t.mutateOptions&&(e.onSuccess?(null==t.mutateOptions.onSuccess||t.mutateOptions.onSuccess(t.currentResult.data,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(t.currentResult.data,null,t.currentResult.variables,t.currentResult.context)):e.onError&&(null==t.mutateOptions.onError||t.mutateOptions.onError(t.currentResult.error,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(void 0,t.currentResult.error,t.currentResult.variables,t.currentResult.context))),e.listeners&&t.listeners.forEach((function(e){e(t.currentResult)}))}))},t}(n(287).Q),d=n(360),m=n(439);function p(e,t,n){var a=o().useRef(!1),l=o().useState(0)[1],u=(0,s.GR)(e,t,n),p=(0,d.j)(),f=o().useRef();f.current?f.current.setOptions(u):f.current=new c(p,u);var h=f.current.getCurrentResult();o().useEffect((function(){a.current=!0;var e=f.current.subscribe(i.j.batchCalls((function(){a.current&&l((function(e){return e+1}))})));return function(){a.current=!1,e()}}),[]);var v=o().useCallback((function(e,t){f.current.mutate(e,t).catch(s.lQ)}),[]);if(h.error&&(0,m.G)(void 0,f.current.options.useErrorBoundary,[h.error]))throw h.error;return(0,r.A)({},h,{mutate:v,mutateAsync:h.mutate})}},584:(e,t,n)=>{"use strict";n.d(t,{I:()=>S});var r=n(168),a=n(540),o=n(941),i=n(428),s=n(289),l=n(287),u=n(690),c=n(281),d=function(e){function t(t,n){var r;return(r=e.call(this)||this).client=t,r.options=n,r.trackedProps=[],r.selectError=null,r.bindMethods(),r.setOptions(n),r}(0,a.A)(t,e);var n=t.prototype;return n.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},n.onSubscribe=function(){1===this.listeners.length&&(this.currentQuery.addObserver(this),m(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},n.onUnsubscribe=function(){this.listeners.length||this.destroy()},n.shouldFetchOnReconnect=function(){return p(this.currentQuery,this.options,this.options.refetchOnReconnect)},n.shouldFetchOnWindowFocus=function(){return p(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},n.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},n.setOptions=function(e,t){var n=this.options,r=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled)throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();var a=this.hasListeners();a&&f(this.currentQuery,r,this.options,n)&&this.executeFetch(),this.updateResult(t),!a||this.currentQuery===r&&this.options.enabled===n.enabled&&this.options.staleTime===n.staleTime||this.updateStaleTimeout();var o=this.computeRefetchInterval();!a||this.currentQuery===r&&this.options.enabled===n.enabled&&o===this.currentRefetchInterval||this.updateRefetchInterval(o)},n.getOptimisticResult=function(e){var t=this.client.defaultQueryObserverOptions(e),n=this.client.getQueryCache().build(this.client,t);return this.createResult(n,t)},n.getCurrentResult=function(){return this.currentResult},n.trackResult=function(e,t){var n=this,r={},a=function(e){n.trackedProps.includes(e)||n.trackedProps.push(e)};return Object.keys(e).forEach((function(t){Object.defineProperty(r,t,{configurable:!1,enumerable:!0,get:function(){return a(t),e[t]}})})),(t.useErrorBoundary||t.suspense)&&a("error"),r},n.getNextResult=function(e){var t=this;return new Promise((function(n,r){var a=t.subscribe((function(t){t.isFetching||(a(),t.isError&&(null==e?void 0:e.throwOnError)?r(t.error):n(t))}))}))},n.getCurrentQuery=function(){return this.currentQuery},n.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},n.refetch=function(e){return this.fetch((0,r.A)({},e,{meta:{refetchPage:null==e?void 0:e.refetchPage}}))},n.fetchOptimistic=function(e){var t=this,n=this.client.defaultQueryObserverOptions(e),r=this.client.getQueryCache().build(this.client,n);return r.fetch().then((function(){return t.createResult(r,n)}))},n.fetch=function(e){var t=this;return this.executeFetch(e).then((function(){return t.updateResult(),t.currentResult}))},n.executeFetch=function(e){this.updateQuery();var t=this.currentQuery.fetch(this.options,e);return(null==e?void 0:e.throwOnError)||(t=t.catch(o.lQ)),t},n.updateStaleTimeout=function(){var e=this;if(this.clearStaleTimeout(),!o.S$&&!this.currentResult.isStale&&(0,o.gn)(this.options.staleTime)){var t=(0,o.j3)(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout((function(){e.currentResult.isStale||e.updateResult()}),t)}},n.computeRefetchInterval=function(){var e;return"function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(e=this.options.refetchInterval)&&e},n.updateRefetchInterval=function(e){var t=this;this.clearRefetchInterval(),this.currentRefetchInterval=e,!o.S$&&!1!==this.options.enabled&&(0,o.gn)(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval((function(){(t.options.refetchIntervalInBackground||s.m.isFocused())&&t.executeFetch()}),this.currentRefetchInterval))},n.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},n.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},n.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},n.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},n.createResult=function(e,t){var n,r=this.currentQuery,a=this.options,i=this.currentResult,s=this.currentResultState,l=this.currentResultOptions,c=e!==r,d=c?e.state:this.currentQueryInitialState,p=c?this.currentResult:this.previousQueryResult,v=e.state,y=v.dataUpdatedAt,g=v.error,E=v.errorUpdatedAt,b=v.isFetching,_=v.status,w=!1,S=!1;if(t.optimisticResults){var C=this.hasListeners(),k=!C&&m(e,t),T=C&&f(e,r,t,a);(k||T)&&(b=!0,y||(_="loading"))}if(t.keepPreviousData&&!v.dataUpdateCount&&(null==p?void 0:p.isSuccess)&&"error"!==_)n=p.data,y=p.dataUpdatedAt,_=p.status,w=!0;else if(t.select&&void 0!==v.data)if(i&&v.data===(null==s?void 0:s.data)&&t.select===this.selectFn)n=this.selectResult;else try{this.selectFn=t.select,n=t.select(v.data),!1!==t.structuralSharing&&(n=(0,o.BH)(null==i?void 0:i.data,n)),this.selectResult=n,this.selectError=null}catch(e){(0,u.t)().error(e),this.selectError=e}else n=v.data;if(void 0!==t.placeholderData&&void 0===n&&("loading"===_||"idle"===_)){var O;if((null==i?void 0:i.isPlaceholderData)&&t.placeholderData===(null==l?void 0:l.placeholderData))O=i.data;else if(O="function"==typeof t.placeholderData?t.placeholderData():t.placeholderData,t.select&&void 0!==O)try{O=t.select(O),!1!==t.structuralSharing&&(O=(0,o.BH)(null==i?void 0:i.data,O)),this.selectError=null}catch(e){(0,u.t)().error(e),this.selectError=e}void 0!==O&&(_="success",n=O,S=!0)}return this.selectError&&(g=this.selectError,n=this.selectResult,E=Date.now(),_="error"),{status:_,isLoading:"loading"===_,isSuccess:"success"===_,isError:"error"===_,isIdle:"idle"===_,data:n,dataUpdatedAt:y,error:g,errorUpdatedAt:E,failureCount:v.fetchFailureCount,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>d.dataUpdateCount||v.errorUpdateCount>d.errorUpdateCount,isFetching:b,isRefetching:b&&"loading"!==_,isLoadingError:"error"===_&&0===v.dataUpdatedAt,isPlaceholderData:S,isPreviousData:w,isRefetchError:"error"===_&&0!==v.dataUpdatedAt,isStale:h(e,t),refetch:this.refetch,remove:this.remove}},n.shouldNotifyListeners=function(e,t){if(!t)return!0;var n=this.options,r=n.notifyOnChangeProps,a=n.notifyOnChangePropsExclusions;if(!r&&!a)return!0;if("tracked"===r&&!this.trackedProps.length)return!0;var o="tracked"===r?this.trackedProps:r;return Object.keys(e).some((function(n){var r=n,i=e[r]!==t[r],s=null==o?void 0:o.some((function(e){return e===n})),l=null==a?void 0:a.some((function(e){return e===n}));return i&&!l&&(!o||s)}))},n.updateResult=function(e){var t=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!(0,o.f8)(this.currentResult,t)){var n={cache:!0};!1!==(null==e?void 0:e.listeners)&&this.shouldNotifyListeners(this.currentResult,t)&&(n.listeners=!0),this.notify((0,r.A)({},n,e))}},n.updateQuery=function(){var e=this.client.getQueryCache().build(this.client,this.options);if(e!==this.currentQuery){var t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}},n.onQueryUpdate=function(e){var t={};"success"===e.type?t.onSuccess=!0:"error"!==e.type||(0,c.wm)(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()},n.notify=function(e){var t=this;i.j.batch((function(){e.onSuccess?(null==t.options.onSuccess||t.options.onSuccess(t.currentResult.data),null==t.options.onSettled||t.options.onSettled(t.currentResult.data,null)):e.onError&&(null==t.options.onError||t.options.onError(t.currentResult.error),null==t.options.onSettled||t.options.onSettled(void 0,t.currentResult.error)),e.listeners&&t.listeners.forEach((function(e){e(t.currentResult)})),e.cache&&t.client.getQueryCache().notify({query:t.currentQuery,type:"observerResultsUpdated"})}))},t}(l.Q);function m(e,t){return function(e,t){return!(!1===t.enabled||e.state.dataUpdatedAt||"error"===e.state.status&&!1===t.retryOnMount)}(e,t)||e.state.dataUpdatedAt>0&&p(e,t,t.refetchOnMount)}function p(e,t,n){if(!1!==t.enabled){var r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&h(e,t)}return!1}function f(e,t,n,r){return!1!==n.enabled&&(e!==t||!1===r.enabled)&&(!n.suspense||"error"!==e.state.status)&&h(e,n)}function h(e,t){return e.isStaleByTime(t.staleTime)}var v=n(609),y=n.n(v);var g,E=y().createContext((g=!1,{clearReset:function(){g=!1},reset:function(){g=!0},isReset:function(){return g}})),b=function(){return y().useContext(E)},_=n(360),w=n(439);function S(e,t,n){return function(e,t){var n=y().useRef(!1),r=y().useState(0)[1],a=(0,_.j)(),o=b(),s=a.defaultQueryObserverOptions(e);s.optimisticResults=!0,s.onError&&(s.onError=i.j.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=i.j.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=i.j.batchCalls(s.onSettled)),s.suspense&&("number"!=typeof s.staleTime&&(s.staleTime=1e3),0===s.cacheTime&&(s.cacheTime=1)),(s.suspense||s.useErrorBoundary)&&(o.isReset()||(s.retryOnMount=!1));var l=y().useState((function(){return new t(a,s)}))[0],u=l.getOptimisticResult(s);if(y().useEffect((function(){n.current=!0,o.clearReset();var e=l.subscribe(i.j.batchCalls((function(){n.current&&r((function(e){return e+1}))})));return l.updateResult(),function(){n.current=!1,e()}}),[o,l]),y().useEffect((function(){l.setOptions(s,{listeners:!1})}),[s,l]),s.suspense&&u.isLoading)throw l.fetchOptimistic(s).then((function(e){var t=e.data;null==s.onSuccess||s.onSuccess(t),null==s.onSettled||s.onSettled(t,null)})).catch((function(e){o.clearReset(),null==s.onError||s.onError(e),null==s.onSettled||s.onSettled(void 0,e)}));if(u.isError&&!o.isReset()&&!u.isFetching&&(0,w.G)(s.suspense,s.useErrorBoundary,[u.error,l.getCurrentQuery()]))throw u.error;return"tracked"===s.notifyOnChangeProps&&(u=l.trackResult(u,s)),u}((0,o.vh)(e,t,n),d)}},439:(e,t,n)=>{"use strict";function r(e,t,n){return"function"==typeof t?t.apply(void 0,n):"boolean"==typeof t?t:!!e}n.d(t,{G:()=>r})},609:e=>{"use strict";e.exports=window.React},795:e=>{"use strict";e.exports=window.ReactDOM},168:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{A:()=>r})},540:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,{A:()=>a})}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.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.r(e),n.d(e,{hasBrowserEnv:()=>ae,hasStandardBrowserEnv:()=>oe,hasStandardBrowserWebWorkerEnv:()=>se});var t=n(609);const r=window.wp.components;function a(e){const n={display:e.display?e.display:"block",maxWidth:e.width?e.width:"350px"};return(0,t.createElement)("div",{style:n},(0,t.createElement)("label",{style:{display:"block",fontSize:"11px",textTransform:"uppercase"}},e.label),(0,t.createElement)("select",{value:e.value,onChange:t=>e.onChange(t.target.value)},e.options.map((e=>(0,t.createElement)("option",{value:e.value},e.label)))))}function o(e,t){return function(){return e.apply(t,arguments)}}const{toString:i}=Object.prototype,{getPrototypeOf:s}=Object,l=(u=Object.create(null),e=>{const t=i.call(e);return u[t]||(u[t]=t.slice(8,-1).toLowerCase())});var u;const c=e=>(e=e.toLowerCase(),t=>l(t)===e),d=e=>t=>typeof t===e,{isArray:m}=Array,p=d("undefined"),f=c("ArrayBuffer"),h=d("string"),v=d("function"),y=d("number"),g=e=>null!==e&&"object"==typeof e,E=e=>{if("object"!==l(e))return!1;const t=s(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},b=c("Date"),_=c("File"),w=c("Blob"),S=c("FileList"),C=c("URLSearchParams");function k(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,a;if("object"!=typeof e&&(e=[e]),m(e))for(r=0,a=e.length;r<a;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let i;for(r=0;r<o;r++)i=a[r],t.call(null,e[i],i,e)}}function T(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,a=n.length;for(;a-- >0;)if(r=n[a],t===r.toLowerCase())return r;return null}const O="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,A=e=>!p(e)&&e!==O,R=(P="undefined"!=typeof Uint8Array&&s(Uint8Array),e=>P&&e instanceof P);var P;const x=c("HTMLFormElement"),N=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),D=c("RegExp"),M=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};k(n,((n,a)=>{let o;!1!==(o=t(n,a,e))&&(r[a]=o||n)})),Object.defineProperties(e,r)},F="abcdefghijklmnopqrstuvwxyz",L="0123456789",j={DIGIT:L,ALPHA:F,ALPHA_DIGIT:F+F.toUpperCase()+L},I=c("AsyncFunction"),U={isArray:m,isArrayBuffer:f,isBuffer:function(e){return null!==e&&!p(e)&&null!==e.constructor&&!p(e.constructor)&&v(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||v(e.append)&&("formdata"===(t=l(e))||"object"===t&&v(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&f(e.buffer),t},isString:h,isNumber:y,isBoolean:e=>!0===e||!1===e,isObject:g,isPlainObject:E,isUndefined:p,isDate:b,isFile:_,isBlob:w,isRegExp:D,isFunction:v,isStream:e=>g(e)&&v(e.pipe),isURLSearchParams:C,isTypedArray:R,isFileList:S,forEach:k,merge:function e(){const{caseless:t}=A(this)&&this||{},n={},r=(r,a)=>{const o=t&&T(n,a)||a;E(n[o])&&E(r)?n[o]=e(n[o],r):E(r)?n[o]=e({},r):m(r)?n[o]=r.slice():n[o]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&k(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(k(t,((t,r)=>{n&&v(t)?e[r]=o(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let a,o,i;const l={};if(t=t||{},null==e)return t;do{for(a=Object.getOwnPropertyNames(e),o=a.length;o-- >0;)i=a[o],r&&!r(i,e,t)||l[i]||(t[i]=e[i],l[i]=!0);e=!1!==n&&s(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:l,kindOfTest:c,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(m(e))return e;let t=e.length;if(!y(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:x,hasOwnProperty:N,hasOwnProp:N,reduceDescriptors:M,freezeMethods:e=>{M(e,((t,n)=>{if(v(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];v(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return m(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:T,global:O,isContextDefined:A,ALPHABET:j,generateString:(e=16,t=j.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&v(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(g(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const a=m(e)?[]:{};return k(e,((e,t)=>{const o=n(e,r+1);!p(o)&&(a[t]=o)})),t[r]=void 0,a}}return e};return n(e,0)},isAsyncFn:I,isThenable:e=>e&&(g(e)||v(e))&&v(e.then)&&v(e.catch)};function Q(e,t,n,r,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),a&&(this.response=a)}U.inherits(Q,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:U.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const q=Q.prototype,K={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{K[e]={value:e}})),Object.defineProperties(Q,K),Object.defineProperty(q,"isAxiosError",{value:!0}),Q.from=(e,t,n,r,a,o)=>{const i=Object.create(q);return U.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Q.call(i,e.message,t,n,r,a),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};const B=Q;function H(e){return U.isPlainObject(e)||U.isArray(e)}function V(e){return U.endsWith(e,"[]")?e.slice(0,-2):e}function z(e,t,n){return e?e.concat(t).map((function(e,t){return e=V(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const G=U.toFlatObject(U,{},null,(function(e){return/^is[A-Z]/.test(e)})),W=function(e,t,n){if(!U.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=U.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!U.isUndefined(t[e])}))).metaTokens,a=n.visitor||u,o=n.dots,i=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&U.isSpecCompliantForm(t);if(!U.isFunction(a))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(U.isDate(e))return e.toISOString();if(!s&&U.isBlob(e))throw new B("Blob is not supported. Use a Buffer instead.");return U.isArrayBuffer(e)||U.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,a){let s=e;if(e&&!a&&"object"==typeof e)if(U.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(U.isArray(e)&&function(e){return U.isArray(e)&&!e.some(H)}(e)||(U.isFileList(e)||U.endsWith(n,"[]"))&&(s=U.toArray(e)))return n=V(n),s.forEach((function(e,r){!U.isUndefined(e)&&null!==e&&t.append(!0===i?z([n],r,o):null===i?n:n+"[]",l(e))})),!1;return!!H(e)||(t.append(z(a,n,o),l(e)),!1)}const c=[],d=Object.assign(G,{defaultVisitor:u,convertValue:l,isVisitable:H});if(!U.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!U.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+r.join("."));c.push(n),U.forEach(n,(function(n,o){!0===(!(U.isUndefined(n)||null===n)&&a.call(t,n,U.isString(o)?o.trim():o,r,d))&&e(n,r?r.concat(o):[o])})),c.pop()}}(e),t};function $(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Y(e,t){this._pairs=[],e&&W(e,this,t)}const J=Y.prototype;J.append=function(e,t){this._pairs.push([e,t])},J.toString=function(e){const t=e?function(t){return e.call(this,t,$)}:$;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const X=Y;function Z(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ee(e,t,n){if(!t)return e;const r=n&&n.encode||Z,a=n&&n.serialize;let o;if(o=a?a(t,n):U.isURLSearchParams(t)?t.toString():new X(t,n).toString(r),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}const te=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){U.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ne={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},re={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:X,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},ae="undefined"!=typeof window&&"undefined"!=typeof document,oe=(ie="undefined"!=typeof navigator&&navigator.product,ae&&["ReactNative","NativeScript","NS"].indexOf(ie)<0);var ie;const se="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,le={...e,...re},ue=function(e){function t(e,n,r,a){let o=e[a++];if("__proto__"===o)return!0;const i=Number.isFinite(+o),s=a>=e.length;return o=!o&&U.isArray(r)?r.length:o,s?(U.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!i):(r[o]&&U.isObject(r[o])||(r[o]=[]),t(e,n,r[o],a)&&U.isArray(r[o])&&(r[o]=function(e){const t={},n=Object.keys(e);let r;const a=n.length;let o;for(r=0;r<a;r++)o=n[r],t[o]=e[o];return t}(r[o])),!i)}if(U.isFormData(e)&&U.isFunction(e.entries)){const n={};return U.forEachEntry(e,((e,r)=>{t(function(e){return U.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null},ce={transitional:ne,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,a=U.isObject(e);if(a&&U.isHTMLForm(e)&&(e=new FormData(e)),U.isFormData(e))return r?JSON.stringify(ue(e)):e;if(U.isArrayBuffer(e)||U.isBuffer(e)||U.isStream(e)||U.isFile(e)||U.isBlob(e))return e;if(U.isArrayBufferView(e))return e.buffer;if(U.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return W(e,new le.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return le.isNode&&U.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=U.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return W(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return a||r?(t.setContentType("application/json",!1),function(e,t,n){if(U.isString(e))try{return(0,JSON.parse)(e),U.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ce.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&U.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw B.from(e,B.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:le.classes.FormData,Blob:le.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};U.forEach(["delete","get","head","post","put","patch"],(e=>{ce.headers[e]={}}));const de=ce,me=U.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),pe=Symbol("internals");function fe(e){return e&&String(e).trim().toLowerCase()}function he(e){return!1===e||null==e?e:U.isArray(e)?e.map(he):String(e)}function ve(e,t,n,r,a){return U.isFunction(r)?r.call(this,t,n):(a&&(t=n),U.isString(t)?U.isString(r)?-1!==t.indexOf(r):U.isRegExp(r)?r.test(t):void 0:void 0)}class ye{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function a(e,t,n){const a=fe(t);if(!a)throw new Error("header name must be a non-empty string");const o=U.findKey(r,a);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=he(e))}const o=(e,t)=>U.forEach(e,((e,n)=>a(e,n,t)));return U.isPlainObject(e)||e instanceof this.constructor?o(e,t):U.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?o((e=>{const t={};let n,r,a;return e&&e.split("\n").forEach((function(e){a=e.indexOf(":"),n=e.substring(0,a).trim().toLowerCase(),r=e.substring(a+1).trim(),!n||t[n]&&me[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&a(t,e,n),this}get(e,t){if(e=fe(e)){const n=U.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(U.isFunction(t))return t.call(this,e,n);if(U.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=fe(e)){const n=U.findKey(this,e);return!(!n||void 0===this[n]||t&&!ve(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function a(e){if(e=fe(e)){const a=U.findKey(n,e);!a||t&&!ve(0,n[a],a,t)||(delete n[a],r=!0)}}return U.isArray(e)?e.forEach(a):a(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const a=t[n];e&&!ve(0,this[a],a,e,!0)||(delete this[a],r=!0)}return r}normalize(e){const t=this,n={};return U.forEach(this,((r,a)=>{const o=U.findKey(n,a);if(o)return t[o]=he(r),void delete t[a];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(a):String(a).trim();i!==a&&delete t[a],t[i]=he(r),n[i]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return U.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&U.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[pe]=this[pe]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=fe(e);t[r]||(function(e,t){const n=U.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,a){return this[r].call(this,t,e,n,a)},configurable:!0})}))}(n,e),t[r]=!0)}return U.isArray(e)?e.forEach(r):r(e),this}}ye.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),U.reduceDescriptors(ye.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),U.freezeMethods(ye);const ge=ye;function Ee(e,t){const n=this||de,r=t||n,a=ge.from(r.headers);let o=r.data;return U.forEach(e,(function(e){o=e.call(n,o,a.normalize(),t?t.status:void 0)})),a.normalize(),o}function be(e){return!(!e||!e.__CANCEL__)}function _e(e,t,n){B.call(this,null==e?"canceled":e,B.ERR_CANCELED,t,n),this.name="CanceledError"}U.inherits(_e,B,{__CANCEL__:!0});const we=_e,Se=le.hasStandardBrowserEnv?{write(e,t,n,r,a,o){const i=[e+"="+encodeURIComponent(t)];U.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),U.isString(r)&&i.push("path="+r),U.isString(a)&&i.push("domain="+a),!0===o&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Ce(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const ke=le.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=U.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function Te(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a,o=0,i=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),u=r[i];a||(a=l),n[o]=s,r[o]=l;let c=i,d=0;for(;c!==o;)d+=n[c++],c%=e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),l-a<t)return;const m=u&&l-u;return m?Math.round(1e3*d/m):void 0}}(50,250);return a=>{const o=a.loaded,i=a.lengthComputable?a.total:void 0,s=o-n,l=r(s);n=o;const u={loaded:o,total:i,progress:i?o/i:void 0,bytes:s,rate:l||void 0,estimated:l&&i&&o<=i?(i-o)/l:void 0,event:a};u[t?"download":"upload"]=!0,e(u)}}const Oe={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const a=ge.from(e.headers).normalize();let o,i,{responseType:s,withXSRFToken:l}=e;function u(){e.cancelToken&&e.cancelToken.unsubscribe(o),e.signal&&e.signal.removeEventListener("abort",o)}if(U.isFormData(r))if(le.hasStandardBrowserEnv||le.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if(!1!==(i=a.getContentType())){const[e,...t]=i?i.split(";").map((e=>e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}let c=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(t+":"+n))}const d=Ce(e.baseURL,e.url);function m(){if(!c)return;const r=ge.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new B("Request failed with status code "+n.status,[B.ERR_BAD_REQUEST,B.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),u()}),(function(e){n(e),u()}),{data:s&&"text"!==s&&"json"!==s?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:e,request:c}),c=null}if(c.open(e.method.toUpperCase(),ee(d,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=m:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(m)},c.onabort=function(){c&&(n(new B("Request aborted",B.ECONNABORTED,e,c)),c=null)},c.onerror=function(){n(new B("Network Error",B.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||ne;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new B(t,r.clarifyTimeoutError?B.ETIMEDOUT:B.ECONNABORTED,e,c)),c=null},le.hasStandardBrowserEnv&&(l&&U.isFunction(l)&&(l=l(e)),l||!1!==l&&ke(d))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&Se.read(e.xsrfCookieName);t&&a.set(e.xsrfHeaderName,t)}void 0===r&&a.setContentType(null),"setRequestHeader"in c&&U.forEach(a.toJSON(),(function(e,t){c.setRequestHeader(t,e)})),U.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),s&&"json"!==s&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",Te(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",Te(e.onUploadProgress)),(e.cancelToken||e.signal)&&(o=t=>{c&&(n(!t||t.type?new we(null,e,c):t),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(o),e.signal&&(e.signal.aborted?o():e.signal.addEventListener("abort",o)));const p=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(d);p&&-1===le.protocols.indexOf(p)?n(new B("Unsupported protocol "+p+":",B.ERR_BAD_REQUEST,e)):c.send(r||null)}))}};U.forEach(Oe,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Ae=e=>`- ${e}`,Re=e=>U.isFunction(e)||null===e||!1===e,Pe=e=>{e=U.isArray(e)?e:[e];const{length:t}=e;let n,r;const a={};for(let o=0;o<t;o++){let t;if(n=e[o],r=n,!Re(n)&&(r=Oe[(t=String(n)).toLowerCase()],void 0===r))throw new B(`Unknown adapter '${t}'`);if(r)break;a[t||"#"+o]=r}if(!r){const e=Object.entries(a).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(Ae).join("\n"):" "+Ae(e[0]):"as no adapter specified";throw new B("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function xe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new we(null,e)}function Ne(e){return xe(e),e.headers=ge.from(e.headers),e.data=Ee.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Pe(e.adapter||de.adapter)(e).then((function(t){return xe(e),t.data=Ee.call(e,e.transformResponse,t),t.headers=ge.from(t.headers),t}),(function(t){return be(t)||(xe(e),t&&t.response&&(t.response.data=Ee.call(e,e.transformResponse,t.response),t.response.headers=ge.from(t.response.headers))),Promise.reject(t)}))}const De=e=>e instanceof ge?{...e}:e;function Me(e,t){t=t||{};const n={};function r(e,t,n){return U.isPlainObject(e)&&U.isPlainObject(t)?U.merge.call({caseless:n},e,t):U.isPlainObject(t)?U.merge({},t):U.isArray(t)?t.slice():t}function a(e,t,n){return U.isUndefined(t)?U.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function o(e,t){if(!U.isUndefined(t))return r(void 0,t)}function i(e,t){return U.isUndefined(t)?U.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,a,o){return o in t?r(n,a):o in e?r(void 0,n):void 0}const l={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:(e,t)=>a(De(e),De(t),!0)};return U.forEach(Object.keys(Object.assign({},e,t)),(function(r){const o=l[r]||a,i=o(e[r],t[r],r);U.isUndefined(i)&&o!==s||(n[r]=i)})),n}const Fe={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Fe[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Le={};Fe.transitional=function(e,t,n){function r(e,t){return"[Axios v1.6.8] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,a,o)=>{if(!1===e)throw new B(r(a," has been removed"+(t?" in "+t:"")),B.ERR_DEPRECATED);return t&&!Le[a]&&(Le[a]=!0,console.warn(r(a," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,a,o)}};const je={assertOptions:function(e,t,n){if("object"!=typeof e)throw new B("options must be an object",B.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const o=r[a],i=t[o];if(i){const t=e[o],n=void 0===t||i(t,o,e);if(!0!==n)throw new B("option "+o+" must be "+n,B.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new B("Unknown option "+o,B.ERR_BAD_OPTION)}},validators:Fe},Ie=je.validators;class Ue{constructor(e){this.defaults=e,this.interceptors={request:new te,response:new te}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Me(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:a}=t;void 0!==n&&je.assertOptions(n,{silentJSONParsing:Ie.transitional(Ie.boolean),forcedJSONParsing:Ie.transitional(Ie.boolean),clarifyTimeoutError:Ie.transitional(Ie.boolean)},!1),null!=r&&(U.isFunction(r)?t.paramsSerializer={serialize:r}:je.assertOptions(r,{encode:Ie.function,serialize:Ie.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=a&&U.merge(a.common,a[t.method]);a&&U.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete a[e]})),t.headers=ge.concat(o,a);const i=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));const l=[];let u;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let c,d=0;if(!s){const e=[Ne.bind(this),void 0];for(e.unshift.apply(e,i),e.push.apply(e,l),c=e.length,u=Promise.resolve(t);d<c;)u=u.then(e[d++],e[d++]);return u}c=i.length;let m=t;for(d=0;d<c;){const e=i[d++],t=i[d++];try{m=e(m)}catch(e){t.call(this,e);break}}try{u=Ne.call(this,m)}catch(e){return Promise.reject(e)}for(d=0,c=l.length;d<c;)u=u.then(l[d++],l[d++]);return u}getUri(e){return ee(Ce((e=Me(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}U.forEach(["delete","get","head","options"],(function(e){Ue.prototype[e]=function(t,n){return this.request(Me(n||{},{method:e,url:t,data:(n||{}).data}))}})),U.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,a){return this.request(Me(a||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Ue.prototype[e]=t(),Ue.prototype[e+"Form"]=t(!0)}));const Qe=Ue;class qe{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,a){n.reason||(n.reason=new we(e,r,a),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new qe((function(t){e=t})),cancel:e}}}const Ke=qe,Be={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Be).forEach((([e,t])=>{Be[t]=e}));const He=Be,Ve=function e(t){const n=new Qe(t),r=o(Qe.prototype.request,n);return U.extend(r,Qe.prototype,n,{allOwnKeys:!0}),U.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Me(t,n))},r}(de);Ve.Axios=Qe,Ve.CanceledError=we,Ve.CancelToken=Ke,Ve.isCancel=be,Ve.VERSION="1.6.8",Ve.toFormData=W,Ve.AxiosError=B,Ve.Cancel=Ve.CanceledError,Ve.all=function(e){return Promise.all(e)},Ve.spread=function(e){return function(t){return e.apply(null,t)}},Ve.isAxiosError=function(e){return U.isObject(e)&&!0===e.isAxiosError},Ve.mergeConfig=Me,Ve.AxiosHeaders=ge,Ve.formToJSON=e=>ue(U.isHTMLForm(e)?new FormData(e):e),Ve.getAdapter=Pe,Ve.HttpStatusCode=He,Ve.default=Ve;const ze=Ve.create({baseURL:"/wp-json/rsvpmaker/v1/",headers:{"Content-type":"application/json","X-WP-Nonce":rsvpmaker_rest.nonce},validateStatus:function(e){return e<400}});var Ge=n(942);function We(e){const t=(0,Ge.useQueryClient)();return console.log("useRSVPDateMutation called with"),console.log("useRSVPDateMutation queryClient",t),(0,Ge.useMutation)((async function(t){return await ze.post("rsvp_event_date?event_id="+e,t)}),{onMutate:async e=>{console.log("optimistic update event",e),await t.cancelQueries(["rsvp_event_date"]);const n=t.getQueryData(["rsvp_event_date"]);return console.log("previousValue",n),t.setQueryData(["rsvp_event_date"],(t=>{const{data:n}=t;e.date&&(n.date=e.date),e.enddate&&(n.enddate=e.enddate),e.display_type&&null!=e.display_type&&(n.display_type=e.display_type),e.timezone&&(n.timezone=e.timezone),e.metaKey&&(n.meta[e.metaKey]=e.metaValue);const r={data:n};return console.log("newdata optimistic update",r),r})),console.log("updating options"),{previousValue:n}},onSettled:(e,n,r,a)=>{t.invalidateQueries(["rsvp_event_date"])},onSuccess:(e,n,r,a)=>{console.log("updated",e),t.setQueryData(["rsvp_event_date"],e),t.invalidateQueries(["rsvp_event_date"])},onError:(e,t,n)=>{console.log("update dates error",e)}})}const $e=window.wp.apiFetch;var Ye=n.n($e);window.wp.utils;const Je=window.wp.date,{__}=wp.i18n,Xe=wp.element.createElement,{DateTimePicker:Ze,TimePicker:et,RadioControl:tt,SelectControl:nt,TextControl:rt,TextareaControl:at,FormToggle:ot}=wp.components,{withSelect:it,withDispatch:st}=wp.data,{Fragment:lt}=wp.element,ut=(0,Je.getSettings)(),ct=/a(?!\\)/i.test(ut.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));function dt(){for(var e=[],n=0;n<24;n++)e.push(n);return e.map((function(e){var n,r="",a="";return n=r=e<10?"0"+e.toString():e.toString(),ct&&(e>12?(r=(e-12).toString(),a="pm"):12==e?(r=e.toString(),a="pm"):0==e?r=__("midnight","rsvpmaker"):(r=e.toString(),a="am")),(0,t.createElement)("option",{value:n},r," ",a)}))}function mt(){return(0,t.createElement)(lt,null,(0,t.createElement)("option",{value:"00"},"00"),(0,t.createElement)("option",{value:"15"},"15"),(0,t.createElement)("option",{value:"30"},"30"),(0,t.createElement)("option",{value:"45"},"45"),(0,t.createElement)("option",{value:"01"},"01"),(0,t.createElement)("option",{value:"02"},"02"),(0,t.createElement)("option",{value:"03"},"03"),(0,t.createElement)("option",{value:"04"},"04"),(0,t.createElement)("option",{value:"05"},"05"),(0,t.createElement)("option",{value:"06"},"06"),(0,t.createElement)("option",{value:"07"},"07"),(0,t.createElement)("option",{value:"08"},"08"),(0,t.createElement)("option",{value:"09"},"09"),(0,t.createElement)("option",{value:"10"},"10"),(0,t.createElement)("option",{value:"11"},"11"),(0,t.createElement)("option",{value:"12"},"12"),(0,t.createElement)("option",{value:"13"},"13"),(0,t.createElement)("option",{value:"14"},"14"),(0,t.createElement)("option",{value:"15"},"15"),(0,t.createElement)("option",{value:"16"},"16"),(0,t.createElement)("option",{value:"17"},"17"),(0,t.createElement)("option",{value:"18"},"18"),(0,t.createElement)("option",{value:"19"},"19"),(0,t.createElement)("option",{value:"20"},"20"),(0,t.createElement)("option",{value:"21"},"21"),(0,t.createElement)("option",{value:"22"},"22"),(0,t.createElement)("option",{value:"23"},"23"),(0,t.createElement)("option",{value:"24"},"24"),(0,t.createElement)("option",{value:"25"},"25"),(0,t.createElement)("option",{value:"26"},"26"),(0,t.createElement)("option",{value:"27"},"27"),(0,t.createElement)("option",{value:"28"},"28"),(0,t.createElement)("option",{value:"29"},"29"),(0,t.createElement)("option",{value:"30"},"30"),(0,t.createElement)("option",{value:"31"},"31"),(0,t.createElement)("option",{value:"32"},"32"),(0,t.createElement)("option",{value:"33"},"33"),(0,t.createElement)("option",{value:"34"},"34"),(0,t.createElement)("option",{value:"35"},"35"),(0,t.createElement)("option",{value:"36"},"36"),(0,t.createElement)("option",{value:"37"},"37"),(0,t.createElement)("option",{value:"38"},"38"),(0,t.createElement)("option",{value:"39"},"39"),(0,t.createElement)("option",{value:"40"},"40"),(0,t.createElement)("option",{value:"41"},"41"),(0,t.createElement)("option",{value:"42"},"42"),(0,t.createElement)("option",{value:"43"},"43"),(0,t.createElement)("option",{value:"44"},"44"),(0,t.createElement)("option",{value:"45"},"45"),(0,t.createElement)("option",{value:"46"},"46"),(0,t.createElement)("option",{value:"47"},"47"),(0,t.createElement)("option",{value:"48"},"48"),(0,t.createElement)("option",{value:"49"},"49"),(0,t.createElement)("option",{value:"50"},"50"),(0,t.createElement)("option",{value:"51"},"51"),(0,t.createElement)("option",{value:"52"},"52"),(0,t.createElement)("option",{value:"53"},"53"),(0,t.createElement)("option",{value:"54"},"54"),(0,t.createElement)("option",{value:"55"},"55"),(0,t.createElement)("option",{value:"56"},"56"),(0,t.createElement)("option",{value:"57"},"57"),(0,t.createElement)("option",{value:"58"},"58"),(0,t.createElement)("option",{value:"59"},"59"))}var pt=wp.compose.compose(st((function(e,t){return{setMetaValue:function(n){e("core/editor").editPost({meta:{[t.metaKey]:n}})}}})),it((function(e,t){return{metaValue:e("core/editor").getEditedPostAttribute("meta")[t.metaKey]}})))((function(e){return Xe(rt,{label:e.label,value:e.metaValue,onChange:function(t){e.setMetaValue(t)}})})),ft=wp.compose.compose(st((function(e,t){return{setMetaValue:function(n){console.log("onchange setMetaValue",n),e("core/editor").editPost({meta:{[t.metaKey]:n}})}}})),it((function(e,t){return{metaValue:e("core/editor").getEditedPostAttribute("meta")[t.metaKey]}})))((function(e){return Xe(tt,{label:e.label,selected:e.metaValue,options:e.options,onChange:function(t){console.log("onchange to",t),e.setMetaValue(t)}})})),ht=wp.compose.compose(st((function(e,t){return{setMetaValue:function(n){e("core/editor").editPost({meta:{[t.metaKey]:n}})}}})),it((function(e,t){return{metaValue:e("core/editor").getEditedPostAttribute("meta")[t.metaKey]}})))((function(e){return Xe(nt,{label:e.label,value:e.metaValue,options:e.options,onChange:function(t){e.setMetaValue(t)}})})),vt=wp.compose.compose(st((function(e,t){return{setMetaValue:function(n){e("core/editor").editPost({meta:{[t.timeKey]:n}})},setDisplay:function(n){e("core/editor").editPost({meta:{[t.statusKey]:n}})}}})),it((function(e,t){let n=e("core/editor").getEditedPostAttribute("meta")[t.timeKey];var r,a="",o="";if("Array"==n&&(n="12:00"),"string"==typeof n&&n.indexOf(":")>0)r=n.split(":");else if(r=["12","00"],"date"==t.type){var i=e("core/editor").getEditedPostAttribute("meta")._rsvp_date.split("/ :/");(s=parseInt(i[1])+1)<10&&(a="0"+s.toString()),r=[a=s.toString(),i[2]]}else{var s;a=e("core/editor").getEditedPostAttribute("meta")._sked_hour,o=e("core/editor").getEditedPostAttribute("meta")._sked_minutes,(s=parseInt(a)+1)<10&&(a="0"+s.toString()),r=[a=s.toString(),o]}return{parts:r,display:e("core/editor").getEditedPostAttribute("meta")[t.statusKey]}})))((function(e){function n(){var t,n;e.setMetaValue((void 0!==(t=document.querySelector("#endhour option:checked"))&&t||(t="12"),void 0!==(n=document.querySelector("#endminutes option:checked"))&&n||(n="00"),t.value+":"+n.value))}return void 0!==e.display&&"set"!=e.display&&e.display.search("ulti")<0?(0,t.createElement)(nt,{label:"Time Display",value:e.display,options:[{label:"End Time Not Displayed",value:""},{label:"Show End Time",value:"set"},{label:"All Day / Time Not Shown",value:"allday"},{label:"2 Days / Time Not Shown",value:"multi|2"},{label:"3 Days / Time Not Shown",value:"multi|3"},{label:"4 Days / Time Not Shown",value:"multi|4"},{label:"5 Days / Time Not Shown",value:"multi|5"},{label:"6 Days / Time Not Shown",value:"multi|6"},{label:"7 Days / Time Not Shown",value:"multi|7"}],onChange:function(t){e.setDisplay(t)}}):(0,t.createElement)("div",null,(0,t.createElement)(nt,{label:"Time Display",value:e.display,options:[{label:"End Time Not Displayed",value:""},{label:"Show End Time",value:"set"},{label:"All Day / Time Not Shown",value:"allday"},{label:"2 Days / Time Not Shown",value:"multi|2"},{label:"3 Days / Time Not Shown",value:"multi|3"},{label:"4 Days / Time Not Shown",value:"multi|4"},{label:"5 Days / Time Not Shown",value:"multi|5"},{label:"6 Days / Time Not Shown",value:"multi|6"},{label:"7 Days / Time Not Shown",value:"multi|7"}],onChange:function(t){e.setDisplay(t)}}),"End Time",(0,t.createElement)("br",null),(0,t.createElement)("select",{id:"endhour",value:e.parts[0],onChange:n},(0,t.createElement)(dt,null)),(0,t.createElement)("select",{id:"endminutes",value:e.parts[1],onChange:n},(0,t.createElement)(mt,null)))})),yt=(wp.compose.compose(st((function(e,t){return{setHour:function(t){e("core/editor").editPost({meta:{_sked_hour:t}})},setMinutes:function(t){e("core/editor").editPost({meta:{_sked_minutes:t}})}}})),it((function(e,t){return{hour:e("core/editor").getEditedPostAttribute("meta")._sked_hour,minutes:e("core/editor").getEditedPostAttribute("meta")._sked_minutes}})))((function(e){return(0,t.createElement)("div",null,"Start Time:",(0,t.createElement)("br",null),(0,t.createElement)("select",{id:"starthour",value:e.hour,onChange:e=>{setHour(e)}},(0,t.createElement)(dt,null)),(0,t.createElement)("select",{id:"startminutes",value:e.minutes,onChange:e=>{setMinutes(e)}},(0,t.createElement)(mt,null)))})),wp.compose.compose(st((function(e,t){return{setMetaValue:function(n){n=n.replace("T"," "),Ye()({path:"rsvpmaker/v1/clearcache/"+rsvpmaker_ajax.event_id}),e("core/editor").editPost({meta:{[t.metaKey]:n}})}}})),it((function(e,t){return{metaValue:e("core/editor").getEditedPostAttribute("meta")[t.metaKey]}})))((function(e){const t=(0,Je.getSettings)(),n=/a(?!\\)/i.test(t.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return Xe(Ze,{label:e.label,is12Hour:n,currentDate:e.metaValue,options:e.options,onChange:function(t){e.setMetaValue(t)}})})),wp.compose.compose(st((function(e,t){return{setMetaValue:function(n){e("core/editor").editPost({meta:{[t.metaKey]:n}})}}})),it((function(e,t){return{metaValue:e("core/editor").getEditedPostAttribute("meta")[t.metaKey]}})))((function(e){return Xe(at,{label:e.label,value:e.metaValue,onChange:function(t){e.setMetaValue(t)}})})));function gt(e){if(!e)return(0,t.createElement)("p",null,"Reloading ...");const{eventdata:n,metaKey:r,label:a}=e,{event:o,meta:i}=n;if(!i)return(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Saving ..."));console.log("meta in RSVPMetaToggle",i);const s=!!i.hasOwnProperty(r)&&i[r],{mutate:l}=We(o);return console.log("Toggle value",s),(0,t.createElement)("div",{class:"rsvpmaker_toggles"},(0,t.createElement)(ot,{checked:s,onChange:function(){const e={metaKey:r,metaValue:!s};l(e),console.log("update toggle to",e)}})," ",a," ")}wp.compose.compose(st((function(e,t){return{setMetaValue:function(n){null==n&&(n=!1),e("core/editor").editPost({meta:{[t.metaKey]:n}})}}})),it((function(e,t){let n=e("core/editor").getEditedPostAttribute("meta")[t.metaKey];return null==n&&(n=!1),{metaValue:n}})))((function(e){return(0,t.createElement)("div",{class:"rsvpmaker_toggles"},(0,t.createElement)(ot,{checked:e.metaValue,onChange:function(){e.setMetaValue(!e.metaValue)}})," ",e.label," ")})),wp.compose.compose(st((function(e,t){return{setMetaValue:function(n,r){e("core/editor").editPost({meta:{[t.metaKey[r]]:n}})}}})),it((function(e,t){return{metaValue:e("core/editor").getEditedPostAttribute("meta")[t.metaKey]}})))((function(e){return e.metaValue.forEach((function(n,r){(0,t.createElement)(rt,{value:n,onChange:function(t){e.setMetaValue(t,r)}})}))})),wp.compose.compose(st((function(e,t){return{setDisplay:function(t){e("core/editor").editPost({meta:{_firsttime:t}})}}})),it((function(e,t){return{display:e("core/editor").getEditedPostAttribute("meta")._firsttime}})))((function(e){return void 0!==e.display&&"set"!=e.display&&e.display.search("ulti")<0?(0,t.createElement)(nt,{label:"Time Display",value:e.display,options:[{label:"End Time Not Displayed",value:""},{label:"Show End Time",value:"set"},{label:"All Day / Time Not Shown",value:"allday"}],onChange:function(t){e.setDisplay(t)}}):(0,t.createElement)("div",null,(0,t.createElement)(nt,{label:"Time Display",value:e.display,options:[{label:"End Time Not Displayed",value:""},{label:"Show End Time",value:"set"},{label:"All Day / Time Not Shown",value:"allday"}],onChange:function(t){e.setDisplay(t)}}),(0,t.createElement)("div",{class:"endtime",style:{backgroundColor:"lightgray",padding:5}},(0,t.createElement)("h3",null,"End Time"),(0,t.createElement)(Et,{metaKey:"_rsvp_end_date"})))}));var Et=wp.compose.compose(st((function(e,t){return{setMetaValue:function(n){n=n.replace("T"," "),Ye()({path:"rsvpmaker/v1/clearcache/"+rsvpmaker_ajax.event_id}),e("core/editor").editPost({meta:{[t.metaKey]:n}})}}})),it((function(e,t){let n=e("core/editor").getEditedPostAttribute("meta")[t.metaKey];if(!n){let t=e("core/editor").getEditedPostAttribute("meta")._rsvp_dates,r=e("core/editor").getEditedPostAttribute("meta")._endfirsttime;if(r)n=t.split(" ")[0]+" "+r;else{let e=new Date(t);e.setTime(e.getTime()+6e4),n=e.getHours(),n<10&&(n="0"+n),n=n+":"+e.getMinutes()+":00"}}return{metaValue:n}})))((function(e){const t=(0,Je.getSettings)(),n=/a(?!\\)/i.test(t.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return Xe(Ze,{label:e.label,is12Hour:n,currentDate:e.metaValue,options:e.options,onChange:function(t){e.setMetaValue(t)}})}));function bt(e){const{metaKey:n,eventdata:r}=e,{meta:a}=r;console.log("RSVPTimestampControl metaKey",n),console.log("RSVPTimestampControl meta",a);const o=a[n];console.log("RSVPTimestampControl value",o);const{mutate:i}=We(r.event);function s(e){return e<10?"0"+e:e}const l=new Date(r.date).getTime()-1e3*r.ts_start,u=new Date,c=1e3*o+l;u.setTime(c);const[d,m]=(0,t.useState)(o?u.getFullYear()+"-"+s(u.getMonth()+1)+"-"+s(u.getDate()):""),[p,f]=(0,t.useState)(o?s(u.getHours())+":"+s(u.getMinutes()):"");return(0,t.createElement)("div",null,(0,t.createElement)("label",null,e.label),(0,t.createElement)("p",null,(0,t.createElement)("input",{type:"date",value:d,onChange:e=>{m(e.target.value)}})," ",(0,t.createElement)("input",{type:"time",value:p,onChange:e=>{f(e.target.value)}})," ",d&&p&&(0,t.createElement)("button",{onClick:function(){const e=new Date(d+" "+p);i({metaKey:n,metaValue:(e.getTime()-l)/1e3})}},"Set")),(d&&!p||p&&!d)&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Enter both date and time")))}wp.compose.compose(st((function(e,t){return{setMetaValue:function(n){console.log("metats dispatch",n),e("core/editor").editPost({meta:{[t.metaKey]:n}})}}})),it((function(e,t){return console.log("withselect props",t),{metaValue:e("core/editor").getEditedPostAttribute("meta")[t.metaKey]}})))((function(e){function n(e){return e<10?"0"+e:e}const r=new Date(rsvpmaker_ajax.eventdata.date);console.log("meta ts props",e);const a=r.getTime()-1e3*rsvpmaker_ajax.eventdata.ts_start,o=new Date;e.metaValue&&o.setTime(1e3*e.metaValue+a);const[i,s]=(0,t.useState)(e.metaValue?o.getFullYear()+"-"+n(o.getMonth()+1)+"-"+n(o.getDate()):""),[l,u]=(0,t.useState)(e.metaValue?n(o.getHours())+":"+n(o.getMinutes()):""),[c,d]=(0,t.useState)("");return(0,t.createElement)("div",null,(0,t.createElement)("label",null,e.label),(0,t.createElement)("p",null,(0,t.createElement)("input",{type:"date",value:i,onChange:e=>{s(e.target.value)}})," ",(0,t.createElement)("input",{type:"time",value:l,onChange:e=>{u(e.target.value)}})," ",i&&l&&(0,t.createElement)("button",{onClick:function(){const t=new Date(i+" "+l);e.setMetaValue((t.getTime()-a)/1e3),d("New date will be recorded when you save/publish/update")}},"Set")),(i&&!l||l&&!i)&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Enter both date and time")),c)})),wp.compose.compose(st((function(e,t){return{setMetaValue:function(n,r){e("core/editor").editPost({meta:{[t.metaKey[r]]:n}})}}})),it((function(e,t){return{metaValue:e("core/editor").getEditedPostAttribute("meta")[t.metaKey]}})))((function(e){return e.metaValue.forEach((function(n,r){(0,t.createElement)(rt,{value:n,onChange:function(t){e.setMetaValue(t,r)}})}))}));const{__:_t}=wp.i18n;function wt(e){const{event_id:n,eventdata:o,isLoadingDates:i}=e,[s,l]=(0,t.useState)(""),{mutate:u}=We(n);o.tzchoices&&Array.isArray(o.tzchoices)||(o.tzchoices=[]),new Date;const c=!0,d=new Date(o.date),m=new Date(o.enddate),p=m.getTime()-d.getTime();function f(e){console.log(typeof e),"string"==typeof e&&(e=new Date(e)),console.log("date for sqlDate",e);var t=function(e){return("00"+e).slice(-2)};return e.getFullYear()+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())+" "+t(e.getHours())+":"+t(e.getMinutes())+":"+t(e.getSeconds())}function h(e,t){const n={...o};n[e]=t,u(n)}return(0,t.createElement)("div",{className:"rsvpmaker-date-time"},(0,t.createElement)("h3",null,"Start Date and Time"),i&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Loading fresh data ...")),(0,t.createElement)(r.DateTimePicker,{currentDate:d,onChange:e=>{!function(e){const t=new Date(e),n=t.getTime(),r=n+p?p:0,a=new Date;a.setTime(r),console.log(n),console.log(r);const o=f(t),i=f(a);u({date:o,enddate:i})}(e),console.log("new date",e)},is12Hour:c,__nextRemoveHelpButton:!0,__nextRemoveResetButton:!0}),s&&(0,t.createElement)("p",{style:{color:"red"}},s),(0,t.createElement)(a,{label:"Date Display Options",value:o.display_type,options:[{label:"Show Start Time Only",value:""},{label:"Show Both Start and End Time",value:"set"},{label:"Show Date Only, No Times",value:"allday"}],onChange:e=>{h("display_type",e)}}),""!=o.display_type&&(0,t.createElement)("div",{className:"rsvp-end-date"},(0,t.createElement)("h3",null,"End Date and Time"),(0,t.createElement)(r.DateTimePicker,{currentDate:m,onChange:e=>{!function(e){const t=new Date(e);if(t.getTime()<d.getTime())return t.setTime(d.getTime()+6e4),void alert("end date cannot be before start date");f(t),u({enddate:f(t)})}(e),console.log("new enddate",e)},is12Hour:c,__nextRemoveHelpButton:!0,__nextRemoveResetButton:!0})),(0,t.createElement)(a,{label:"Time Zone",value:o.timezone,options:o.tzchoices.map((e=>({label:e,value:e}))),onChange:e=>{h("timezone",e)}}),(0,t.createElement)(gt,{label:_t("Collect RSVPs","rsvpmaker"),metaKey:"_rsvp_on",eventdata:o}),o.has_template&&(0,t.createElement)("p",null,(0,t.createElement)("a",{href:o.template_edit},"Based on Template ",o.has_template)))}function St(e){const{eventdata:n,metaKey:r,label:a}=e,{meta:o}=n,{mutate:i}=We(n.event),[s,l]=(0,t.useState)(o[r]),[u,c]=(0,t.useState)("");return(0,t.createElement)("div",null,(0,t.createElement)("p",null,(0,t.createElement)("label",null,a)),(0,t.createElement)("p",null,(0,t.createElement)("input",{type:"time",value:s,onChange:e=>{l(e.target.value),i({metaKey:r,metaValue:e.target.value}),c("setting to "+e.target.value)}})," ",(0,t.createElement)("br",null),(0,t.createElement)("small",null,u)))}const{__:Ct}=wp.i18n;function kt(e){if(!e)return(0,t.createElement)("p",null,"Reloading ...");const[n,r]=(0,t.useState)({}),{eventdata:a,event_id:o}=e;return(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"RSVPMaker Template ",rsvpmaker_ajax.projected_url&&(0,t.createElement)("a",{href:rsvpmaker_ajax.projected_url},"(Create/Update)")),(0,t.createElement)("div",{class:"sked_frequency"},(0,t.createElement)("p",{class:"varies"},(0,t.createElement)(gt,{label:"Varies",metaKey:"_sked_Varies",eventdata:a})),(0,t.createElement)("p",{class:"weeknumber"},(0,t.createElement)(gt,{label:"First",metaKey:"_sked_First",eventdata:a})),(0,t.createElement)("p",{class:"weeknumber"},(0,t.createElement)(gt,{label:"Second",metaKey:"_sked_Second",eventdata:a})),(0,t.createElement)("p",{class:"weeknumber"},(0,t.createElement)(gt,{label:"Third",metaKey:"_sked_Third",eventdata:a})),(0,t.createElement)("p",{class:"weeknumber"},(0,t.createElement)(gt,{label:"Fourth",metaKey:"_sked_Fourth",eventdata:a})),(0,t.createElement)("p",{class:"weeknumber"},(0,t.createElement)(gt,{label:"Last",metaKey:"_sked_Last",eventdata:a})),(0,t.createElement)("p",{class:"every"},(0,t.createElement)(gt,{label:"Every",metaKey:"_sked_Every",eventdata:a}))),(0,t.createElement)("p",null,(0,t.createElement)(gt,{label:"Sunday",metaKey:"_sked_Sunday",eventdata:a})),(0,t.createElement)("p",null,(0,t.createElement)(gt,{label:"Monday",metaKey:"_sked_Monday",eventdata:a})),(0,t.createElement)("p",null,(0,t.createElement)(gt,{label:"Tuesday",metaKey:"_sked_Tuesday",eventdata:a})),(0,t.createElement)("p",null,(0,t.createElement)(gt,{label:"Wednesday",metaKey:"_sked_Wednesday",eventdata:a})),(0,t.createElement)("p",null,(0,t.createElement)(gt,{label:"Thursday",metaKey:"_sked_Thursday",eventdata:a})),(0,t.createElement)("p",null,(0,t.createElement)(gt,{label:"Friday",metaKey:"_sked_Friday",eventdata:a})),(0,t.createElement)("p",null,(0,t.createElement)(gt,{label:"Saturday",metaKey:"_sked_Saturday",eventdata:a})),(0,t.createElement)("br",null),(0,t.createElement)(St,{eventdata:a,metaKey:"_sked_start_time",label:"Start Time"}),(0,t.createElement)(St,{eventdata:a,metaKey:"_sked_end",label:"End Time"}),(0,t.createElement)(vt,{type:"template",statusKey:"_sked_duration",timeKey:"_sked_end",eventdata:a}),(0,t.createElement)(ht,{label:"Time Zone",metaKey:"_timezone",value:a.timezone,options:a.tzchoices.map((e=>({label:e,value:e})))}),(0,t.createElement)("p",null,(0,t.createElement)(gt,{label:"Auto Add Dates",metaKey:"rsvpautorenew",help:"Automatically add dates according to this schedule",eventdata:a})),(0,t.createElement)(gt,{label:Ct("Collect RSVPs","rsvpmaker"),metaKey:"_rsvp_on",eventdata:a,event_id:o}))}var Tt=n(838),Ot=n.n(Tt);function At(e){const{innerHTML:n}=e,r=Ot().sanitize(n).replace("class=","className=");return(0,t.createElement)("div",{dangerouslySetInnerHTML:{__html:r}})}function Rt(e){const{type:n}=e;return(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-arrow-up-circle",viewBox:"0 0 16 16"},(0,t.createElement)("title",null,"Move Up ",n),(0,t.createElement)("path",{"fill-rule":"evenodd",d:"M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-7.5 3.5a.5.5 0 0 1-1 0V5.707L5.354 7.854a.5.5 0 1 1-.708-.708l3-3a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1-.708.708L8.5 5.707V11.5z"}))}function Pt(e){const{type:n}=e;return(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-arrow-down-circle",viewBox:"0 0 16 16"},(0,t.createElement)("title",null,"Move Down ",n),(0,t.createElement)("path",{"fill-rule":"evenodd",d:"M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v5.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V4.5z"}))}function xt(e){const{type:n}=e;return(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-trash",viewBox:"0 0 16 16"},(0,t.createElement)("title",null,"Delete ",n),(0,t.createElement)("path",{d:"M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z"}),(0,t.createElement)("path",{"fill-rule":"evenodd",d:"M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z"}))}function Nt(e){const[n,o]=(0,t.useState)(e.form_id),[i,s]=(0,t.useState)("rsvpmaker/formfield"),[l,u]=(0,t.useState)(""),[c,d]=(0,t.useState)(""),[m,p]=(0,t.useState)(!1),[f,h]=(0,t.useState)(""),{isSaving:v,saveEffect:y,SaveControls:g,makeNotification:E}=function(){const[e,n]=(0,t.useState)(!1),[r,a]=(0,t.useState)(null),[o,i]=(0,t.useState)(null);function s(){n(!0),setTimeout((()=>{n(!1)}),500)}return{SaveControls:function(e){const{changes:n,setChanges:r}=e;console.log("changes SaveControls",n);const{mutate:a}=function(e,t){const n=(0,Ge.useQueryClient)();return(0,Ge.useMutation)((async function(e){return await ze.post("rsvp_options",e)}),{onMutate:async e=>{console.log("optimistic update option",e),await n.cancelQueries(["rsvp_options"]);const t=n.getQueryData(["rsvp_options"]);return n.setQueryData(["rsvp_options"],(t=>{const{data:n}=t;e.forEach((e=>{"rsvp_options"==e.type&&(n.rsvp_options[e.key]=e.value)}));const r={...t,data:n};return console.log("newdata optimistic update",r),r})),console.log("updating options"),{previousValue:t}},onSettled:(e,t,r,a)=>{n.invalidateQueries(["rsvp_options"])},onSuccess:(t,n,r,a)=>{console.log("updated"),e([])},onError:(e,t,r)=>{console.log("update options error",e),n.setQueryData("rsvp_options",r.previousValue)}})}(r);return(0,t.createElement)("div",{id:"savecontrols"},o&&(0,t.createElement)("div",{className:"rsvp-notification rsvp-notification-success"},o.message),(0,t.createElement)("div",{id:"savebuttonwrapper"},(0,t.createElement)("button",{onClick:()=>{console.log("save changeset",n),s(),a(n)}},"Save")))},notification:o,setNotification:i,isSaving:e,saveEffect:s,makeNotification:function(e=""){if(""==e)return o;r&&clearTimeout(r),i({message:e});let t=setTimeout((()=>{i(null)}),5e3);a(t)}}}(),{changes:b,addChange:_,setChanges:w}=e;wp?.data?.select("core/editor")?.getCurrentPostId(),console.log("Forms props",e),console.log("Forms formId",n);const{data:S,isLoading:C,isError:k}=(0,Ge.useQuery)(["rsvp_form",n],(function(){return ze.get("rsvp_form?form_id="+n+"&post_id="+wp?.data?.select("core/editor")?.getCurrentPostId())}),{enabled:!0,retry:2,onSuccess:(e,t,r,a)=>{n||o(e.data.form_id),console.log("rsvp forms query",e)},onError:(e,t,n)=>{console.log("error retrieving rsvp forms",e)},refetchInterval:!1});if(k)return(0,t.createElement)("p",null,"Error loading form options");const T=(0,Ge.useQueryClient)(),{mutate:O}=(0,Ge.useMutation)((async function(t){return await ze.post("rsvp_form?form_id="+n+"&post_id="+wp?.data?.select("core/editor")?.getCurrentPostId(),{form:t,newForm:f,event_id:e.event_id?e.event_id:0})}),{onMutate:async e=>{const t=T.getQueryData(["rsvp_form",n]);return console.log("optimistic update form",e),await T.cancelQueries(["rsvp_form",n]),T.setQueryData(["rsvp_form",n],(t=>{const{data:n}=t;n.form=e;const r={...t,data:n};return console.log("newdata optimistic form update",r),r})),console.log("updating options"),{previousValue:t}},onSettled:(e,t,r,a)=>{T.invalidateQueries(["rsvp_form",n])},onSuccess:(e,t,n,r)=>{console.log("updated"),o(e.data.form_id)},onError:(e,t,r)=>{console.log("update options error",e),T.setQueryData(["rsvp_form",n],r.previousValue)}});if(C)return(0,t.createElement)("p",null,"Loading ...");const A=S.data.form.filter((e=>e.blockName)),R=S.data.form_options,P=S.data.form_id;let x=A.length-1;const N=[];for(let e=0;e<x;e++){let t=A[e];if(t?.attrs.guestform?N.push(e):console.log("guestfields attr not found",e),["rsvpmaker/formnote","rsvpmaker/guests"].includes(t.blockName)){x=e-1;break}}const D=[{label:"Choose Field Type",value:""},{label:"Text Field",value:"rsvpmaker/formfield"},{label:"Text Area",value:"rsvpmaker/formtextarea"},{label:"Select",value:"rsvpmaker/formselect"},{label:"Radio Buttons",value:"rsvpmaker/formradio"},{label:"Add to Email List Checkbox",value:"rsvpmaker/formchimp"}];let M=!1,F=!1;for(let e=0;e<A.length;e++){let t=A[e];console.log("check for end fields",t),"rsvpmaker/guests"==t.blockName&&(M=!0,console.log("check for end fields found guests")),"rsvpmaker/formnote"==t.blockName&&(F=!0,console.log("check for end fields found note"))}function L(e){const[n,r]=(0,t.useState)(!1),{blockindex:a}=e;return(0,t.createElement)(t.Fragment,null,!n&&(0,t.createElement)("button",{className:"blockmove deletebutton",onClick:()=>{r(!0)}},(0,t.createElement)(xt,null)," Delete")," ",n&&(0,t.createElement)("button",{className:"blockmove",onClick:()=>{j(a,"delete")}},(0,t.createElement)(xt,null)," Confirm Delete")," ")}function j(e,t){const n=[],r=A[e];let a="delete"==t;A.forEach(((o,i)=>{null==o.blockName||i==e||("up"==t&&i==e-1&&(n.push(r),a=!0),"down"==t&&i==e+2&&(n.push(r),a=!0),n.push(o))})),a||n.push(r),console.log("newform",n),O(n)}function I(e,t,n){const r=[...A];r[e].attrs[t]=n,O(r)}function U(e){const{blockindex:n,setFormItemAttr:a}=e,[o,i]=(0,t.useState)(e.attrs.choicearray),[s,l]=(0,t.useState)(e.attrs.required),[u,c]=(0,t.useState)(e.attrs.label),[d,m]=(0,t.useState)(e.attrs.guestform);return(0,t.createElement)("div",{className:"formAtts"},["rsvpmaker/formfield","rsvpmaker/formselect","rsvpmaker/formradio","rsvpmaker/formtextarea"].includes(e.blockName)&&(0,t.createElement)("p",null,(0,t.createElement)("label",null,"Field Label")," ",(0,t.createElement)("input",{type:"text",value:u,onChange:e=>{c(e.target.value)},onBlur:()=>{a(n,"label",u)}})),o&&(0,t.createElement)("p",null,"Choices",(0,t.createElement)("br",null),(0,t.createElement)("textarea",{value:o.join("\n"),onChange:e=>{let t=e.target.value.split("\n");i(t),a(n,"choicearray",t)},onBlur:()=>{a(n,"choicearray",o)}}),(0,t.createElement)("br",null),(0,t.createElement)("em",null,"Enter one choice per line")),["rsvpmaker/formfield","rsvpmaker/formselect","rsvpmaker/formradio","rsvpmaker/formtextarea"].includes(e.blockName)&&"email"!=e.attrs.slug&&(0,t.createElement)(r.ToggleControl,{label:"Required",checked:"required"==s,onChange:()=>{let e="required"==s?"":"required";l(e),a(n,"required",e)}}),"email"==e.attrs.slug&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Email is always required")),["rsvpmaker/formfield","rsvpmaker/formselect","rsvpmaker/formradio","rsvpmaker/formtextarea"].includes(e.blockName)&&(0,t.createElement)(r.ToggleControl,{label:"Include on Guest Form",checked:d,onChange:()=>{let e=!d;m(e),a(n,"guestform",e)}}))}function Q(){console.log("guestfields",N);const[e,n]=(0,t.useState)(!1);return e?(0,t.createElement)("div",null,(0,t.createElement)("p",null,"Guest 1"),N.map((e=>{const n=A[e];console.log("guestfields forEach",n);let o=[];return n?.attrs.choicearray&&(o=n.attrs.choicearray.map((e=>({label:e,value:e})))),(0,t.createElement)("div",{className:"formAtts"},"rsvpmaker/formfield"==n.blockName&&(0,t.createElement)(r.TextControl,{label:n.attrs.label}),"rsvpmaker/formtextarea"==n.blockName&&(0,t.createElement)(r.TextareaControl,{label:n.attrs.label}),"rsvpmaker/formselect"==n.blockName&&(0,t.createElement)(a,{label:n.attrs.label,options:o}),"rsvpmaker/formradio"==n.blockName&&(0,t.createElement)(r.RadioControl,{label:n.attrs.label,options:o}))}))):(0,t.createElement)("p",null,(0,t.createElement)("a",{onClick:()=>{n(!0)}},"+ Add Guests"))}M||D.push({label:"Guest Fields",value:"rsvpmaker/guests"}),F||D.push({label:"Note Field",value:"rsvpmaker/formnote"});let q="",K=!0;return(0,t.createElement)("div",{className:"rsvptab"},S.data.is_default&&(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"Default Form Selected"),(0,t.createElement)("p",null,"Changes you make below will apply to all events that use the default form. Switch to a custom form to make customizations for this event only. Forms can also be customized from an event template.")),S.data.is_inherited&&(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"Form Is Inherited"),(0,t.createElement)("p",null,"This form is inherited from a template or another document. Changes you make below will apply to all events that use the same form. Switch to a custom form to make customizations for this event only. Forms can also be customized from an event template.")),(0,t.createElement)(r.ToggleControl,{label:"Show Form Preview",checked:m,onChange:()=>{p(!m)}}),m&&A.map(((e,n)=>{K=e.blockName.indexOf("rsvpmaker")>-1;let o=[];if(e?.attrs.choicearray&&(o=e.attrs.choicearray.map((e=>({label:e,value:e})))),null!=e.blockName)return(0,t.createElement)("div",null,"rsvpmaker/formfield"==e.blockName&&(0,t.createElement)(r.TextControl,{label:e.attrs.label}),"rsvpmaker/formtextarea"==e.blockName&&(0,t.createElement)(r.TextareaControl,{label:e.attrs.label}),"rsvpmaker/formselect"==e.blockName&&(0,t.createElement)(a,{label:e.attrs.label,options:o}),"rsvpmaker/formradio"==e.blockName&&(0,t.createElement)(r.RadioControl,{label:e.attrs.label,options:o}),"rsvpmaker/guests"==e.blockName&&(0,t.createElement)(Q,null),"rsvpmaker/formchimp"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("input",{type:"checkbox"})," Add me to your email list"),!K&&e.innerHTML&&(0,t.createElement)(At,{innerHTML:e.innerHTML}))})),(0,t.createElement)("h4",null,"Form Editing Controls"),A.map(((e,r)=>{if(q=e.blockName.replace(/^[^/]+\//,""),K=e.blockName.indexOf("rsvpmaker")>-1,"formchimp"==q?q="Add to Email List Checkbox":"formnote"==q&&(q="Note"),null!=e.blockName)return(0,t.createElement)("div",{className:"formblock"},(0,t.createElement)("div",{class:"blockheader"},(0,t.createElement)("div",{className:"reorganize-drag"},(0,t.createElement)("div",{className:"titleline"},(0,t.createElement)("h2",null,q," ",e.attrs.label&&(0,t.createElement)("span",{className:"fieldlabel"},e.attrs.label))," ",!["rsvpmaker/formnote","rsvpmaker/guests"].includes(e.blockName)&&r>0&&(0,t.createElement)("button",{className:"blockmove",onClick:()=>{j(r,"up")}},(0,t.createElement)(Rt,null))," ",!["rsvpmaker/formnote","rsvpmaker/guests"].includes(e.blockName)&&r!=x&&(0,t.createElement)("button",{className:"blockmove",onClick:()=>{j(r,"down")}},(0,t.createElement)(Pt,null))," ",(0,t.createElement)(L,{blockindex:r})," "),"rsvpmaker/guests"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Gathers information about guests.")),"rsvpmaker/formnote"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"A free text entry note at the bottom of the form.")),"rsvpmaker/formchimp"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Displays an Add to Email List checkbox on the form")),!K&&e.innerHTML&&(0,t.createElement)("div",null,(0,t.createElement)(At,{innerHTML:e.innerHTML})," ",(0,t.createElement)("br",null),(0,t.createElement)("em",null,(0,t.createElement)("a",{href:"/wp-admin/post.php?action=edit&post="+n},"Open in the WordPress editor"))),(0,t.createElement)(U,{attrs:e.attrs,blockName:e.blockName,blockindex:r,setFormItemAttr:I}))))})),(0,t.createElement)("p",null,"Add a form field ",(0,t.createElement)(a,{label:"Type",options:D,value:i,onChange:e=>{s(e)}})," ",!["rsvpmaker/formnote","rsvpmaker/guests","rsvpmaker/formchimp"].includes(i)&&(0,t.createElement)(r.TextControl,{label:"Field Label",value:l,onChange:e=>{u(e)}})," "),["rsvpmaker/formselect","rsvpmaker/formradio"].includes(i)&&(0,t.createElement)("p",null,(0,t.createElement)("label",null,"Choices"),(0,t.createElement)("br",null),(0,t.createElement)("textarea",{value:c,onChange:e=>{d(e.target.value)}}),(0,t.createElement)("br",null),(0,t.createElement)("em",null,"Enter one choice per line")),(0,t.createElement)("p",null,(0,t.createElement)("button",{onClick:function(){if(!i)return;let e;if(console.log(i),console.log(l),"rsvpmaker/formnote"==i)e={blockName:"rsvpmaker/formnote",attrs:[],innerBlocks:[],innerHTML:"",innerContent:[]};else if("rsvpmaker/guests"==i)e={blockName:"rsvpmaker/guests",attrs:[],innerBlocks:[{blockName:"core/paragraph",attrs:[],innerBlocks:[],innerHTML:"\n<p></p>\n",innerContent:["\n<p></p>\n"]}],innerHTML:'\n<div class="wp-block-rsvpmaker-guests"></div>\n',innerContent:['\n<div class="wp-block-rsvpmaker-guests">',null,"</div>\n"]};else{if(!l)return void alert("a field label is required");let t=l.toLowerCase().replace(/[^a-z0-9]/,"_");"first_name"==t&&(t="first"),"last_name"==t&&(t="last"),e={blockName:i,innerHTML:"",innerBlocks:[],innerContent:[],attrs:{label:l,slug:t}}}c&&(e.attrs.choicearray=c.split("\n")),console.log("newfield",e);const t=[];A.forEach(((n,r)=>{t.push(n),r==x&&t.push(e)})),O(t),s("rsvpmaker/formfield"),u(""),d("")}},"Add")),(0,t.createElement)("p",null,"You can also open this form ",(0,t.createElement)("a",{href:"/wp-admin/post.php?action=edit&post="+n},"in the WordPress editor"),"."),!e.single_form&&(0,t.createElement)(a,{label:"Switch Form",value:P,options:R,onChange:o}),S.data.copied&&(0,t.createElement)("p",null,"Copied ",(0,t.createElement)("strong",null,S.data.copied)),!e.single_form&&(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"Save as Reusable Form"),(0,t.createElement)(r.TextControl,{label:"Form Title",value:f,onChange:h}),(0,t.createElement)("p",null,"You can save the form so it can also be used with other events."),(0,t.createElement)("p",null,(0,t.createElement)("button",{onClick:e=>{e.preventDefault(),O(A),h("")}},"Create Form"))))}const Dt=new Ge.QueryClient;function Mt(e){return(0,t.createElement)(Ge.QueryClientProvider,{client:Dt},(0,t.createElement)(Nt,{form_id:rsvpmaker_ajax.form_id,event_id:rsvpmaker_ajax.event_id}))}function Ft(){const[e,n]=(0,t.useState)(""),[r,o]=(0,t.useState)(1),[i,s]=(0,t.useState)("before"),{data:l,isLoading:u,isError:c}=(0,Ge.useQuery)(["confirm_remind"],(function(){return ze.get("confirm_remind?event_id="+rsvpmaker_ajax.event_id)}),{enabled:!0,retry:2,onSuccess:(e,t,n,r)=>{console.log("rsvp confirmation query",e)},onError:(e,t,n)=>{console.log("error retrieving messages",e)},refetchInterval:!1});if(c)return(0,t.createElement)("p",null,"Error loading confirmation message data");const d=(0,Ge.useQueryClient)(),{mutate:m}=(0,Ge.useMutation)((async function(e){return await ze.post("confirm_remind?event_id="+rsvpmaker_ajax.event_id,e)}),{onSuccess:(e,t,r,a)=>{console.log("updated",e),n(""),d.setQueryData(["confirm_remind"],e)},onError:(e,t,n)=>{console.log("update message error",e)}});if(u)return(0,t.createElement)("p",null,"Loading ...");const p=l.data,{confirmation:f,reminder:h,edit_url:v}=p;return(0,t.createElement)("div",null,(0,t.createElement)("h2",null,"Confirmation Message"),(0,t.createElement)(At,{innerHTML:f.html}),(0,t.createElement)("p",null,(0,t.createElement)("a",{target:"_blank",href:v+f.ID},"Edit")),(0,t.createElement)("p",null,(0,t.createElement)("em",null,"The confirmation message for new posts will be either the default from the RSVPMaker Settings or a copy of the message from an event template. You can customize it as needed for a specific event.")),(0,t.createElement)("h2",null,"Payment Confirmation ",!p.payment_confirmation&&(0,t.createElement)("span",null,":Not Set")),!p.payment_confirmation&&(0,t.createElement)("p",null,(0,t.createElement)("button",{onClick:()=>{m({action:"add_payment_confirmation",type:"payment confirmation",source:f.ID,event_id:rsvpmaker_ajax.event_id}),n("working ...")}},"Customize for this ","rsvpmaker"==rsvpmaker.post_type?"event":"template")," ",e,(0,t.createElement)("br",null),"If you are charging for an event, you can add a separate payment confiration message that is only sent after payment is received."),p.payment_confirmation&&(0,t.createElement)("div",null,(0,t.createElement)(At,{innerHTML:p.payment_confirmation.html}),(0,t.createElement)("p",null,(0,t.createElement)("a",{target:"_blank",href:v+p.payment_confirmation.ID},"Edit"))),(0,t.createElement)("h2",null,"Reminder and Follow Up Messages"),h.map((e=>{const n=parseInt(e.hour),r=n<0?"before":"after";return(0,t.createElement)("div",null,(0,t.createElement)("h2",null,Math.abs(n)," hours ",r),(0,t.createElement)("p",null,(0,t.createElement)("strong",null,(0,t.createElement)(At,{innerHTML:e.post_title}))),(0,t.createElement)(At,{innerHTML:e.html}),(0,t.createElement)("p",null,(0,t.createElement)("a",{target:"_blank",href:v+e.ID},"Edit")))})),(0,t.createElement)("h3",null,"Add a Message"),(0,t.createElement)("p",null,"Number of Hours",(0,t.createElement)("br",null)," ",(0,t.createElement)("input",{type:"number",min:"1",value:r,onChange:e=>{e.target.value>0&&o(e.target.value)}}),(0,t.createElement)(a,{value:i,onChange:e=>{s(e),console.log(e)},options:[{label:"before event start time",value:"before"},{label:"after event start time",value:"after"}]})),(0,t.createElement)("p",null,(0,t.createElement)("button",{onClick:()=>{m({action:"add_reminder",type:"reminder "+r+" "+i,source:f.ID,event_id:rsvpmaker_ajax.event_id,hours:r,beforeafter:i}),n("working ...")}},"Add")))}const{__:Lt}=wp.i18n;function jt(){const[e,n]=(0,t.useState)(""),[a,o]=(0,t.useState)("0.00"),[i,s]=(0,t.useState)(""),[l,u]=(0,t.useState)(""),[c,d]=(0,t.useState)(""),[m,p]=(0,t.useState)(1),[f,h]=(0,t.useState)(-1),[v,y]=(0,t.useState)(""),[g,E]=(0,t.useState)("0.00"),[b,_]=(0,t.useState)("percent"),[w,S]=(0,t.useState)(-1),{data:C,isLoading:k,isError:T}=(0,Ge.useQuery)(["pricing"],(function(){return ze.get("pricing?event_id="+rsvpmaker_ajax.event_id)}),{enabled:!0,retry:2,onSuccess:(e,t,n,r)=>{console.log("rsvp pricing query",e)},onError:(e,t,n)=>{console.log("error retrieving pricing",e)},refetchInterval:!1}),O=(0,Ge.useQueryClient)();if(T)return(0,t.createElement)("p",null,"Error loading pricing data.");const{mutate:A}=(0,Ge.useMutation)((async function(e){return await ze.post("pricing?event_id="+rsvpmaker_ajax.event_id,e)}),{onMutate:async e=>{const t=O.getQueryData(["pricing"]);return await O.cancelQueries(["pricing"]),O.setQueryData(["pricing"],(t=>{const{data:n}=t;return n.change=e.change,{...t,data:n}})),{previousValue:t}},onSettled:(e,t,n,r)=>{O.invalidateQueries(["pricing"])},onSuccess:(e,t,r,a)=>{console.log("updated",e),n(""),O.setQueryData(["pricing"],e)},onError:(e,t,n)=>{console.log("update message error",e)}});function R(e,t){if(!isNaN(e))return e=parseFloat(e),"percent"==t?(100*e).toFixed(2)+"% off, example 5 x $50 = $250, $"+(250-250*e).toFixed(2)+" after discount":"totalamount"==t?e.toFixed(2)+" off total, example 5 x $50 = $250, $"+(250-e).toFixed(2)+" after discount":e.toFixed(2)+" off each, example 5 x $50 = $250, $"+(250-5*e).toFixed(2)+" after discount"}const P=k?null:C.data,x=k?[]:P.pricing,N=k||!P.coupon_codes?[]:P.coupon_codes,D=k||!P.coupon_methods?[]:P.coupon_methods,M=k||!P.coupon_discounts?[]:P.coupon_discounts;return(0,t.createElement)("div",null,(0,t.createElement)("p",null,(0,t.createElement)(ht,{label:"Payment Gateway",metaKey:"_payment_gateway",options:rsvpmaker_ajax.payment_gateway_options.map((e=>({label:e,value:e})))})),(0,t.createElement)("p",null,(0,t.createElement)(pt,{label:"Currency",metaKey:"_rsvp_currency"})),(0,t.createElement)("p",null,(0,t.createElement)(ft,{label:"Price Calculation",metaKey:"_rsvp_count_party",options:[{label:Lt("Multiply by size of party"),value:"1"},{label:Lt("Let user specify number of admissions per category"),value:"0"}]})),k&&(0,t.createElement)("p",null,"Loading prices ..."),x.map(((e,r)=>(0,t.createElement)("p",null,e.unit,": ",e.price," ",e.niceDeadline&&(0,t.createElement)("span",null,"deadline: ",e.niceDeadline)," multiple: ",e.price_multiple," ",(0,t.createElement)("button",{onClick:()=>{console.log("click on index",r),h(r),s(e.unit),o(e.price),p(e.price_multiple),u(e.deadlineDate),d(e.deadlineTime)}},"Edit")," ",(0,t.createElement)("button",{onClick:()=>{!function(e){n("Posting ...");const t=[...x];delete t[e],A({update:"pricing",change:t})}(r)}},"Delete")))),(0,t.createElement)("p",null,(0,t.createElement)("label",null,"Unit")," ",(0,t.createElement)(r.TextControl,{value:i,onChange:s})),(0,t.createElement)("p",null,(0,t.createElement)("label",null,"Price")," ",(0,t.createElement)(r.TextControl,{value:a,onChange:o})),(0,t.createElement)("p",null,(0,t.createElement)("label",null,"Deadline (optional)")," ",(0,t.createElement)("input",{type:"date",value:l,onChange:e=>{u(e.target.value)}})," ",(0,t.createElement)("input",{type:"time",value:c,onChange:e=>{d(e.target.value)}})," ",(l||c)&&(0,t.createElement)("button",{onClick:()=>{u(""),d("")}},"Remove Deadline"),(0,t.createElement)("br",null),(0,t.createElement)("em",null,"Example: early bird rate to register for a conference.")),(0,t.createElement)("p",null,(0,t.createElement)("label",null,"Multiple (optional)")," ",(0,t.createElement)("input",{type:"number",value:m,onChange:e=>{p(e.target.value)}}),(0,t.createElement)("br",null),(0,t.createElement)("em",null,"Example: price for a table of 8 at a dinner, rather than a single registration.")),(0,t.createElement)("p",null,(0,t.createElement)("button",{disabled:k,onClick:function(){n("Posting ...");const e=[...x];f<0?e.push({unit:i,price:a,deadlineDate:l,deadlineTime:c,price_multiple:m}):e[f]={unit:i,price:a,deadlineDate:l,deadlineTime:c,price_multiple:m},A({update:"pricing",change:e}),u(""),d(""),p(1),h(-1),s(""),o("0.00")}},f>-1?"Update Price":"Add Price")," ",e),(0,t.createElement)("h2",null,"Discounts"),k&&(0,t.createElement)("p",null,"Loading discounts ..."),N.map(((e,r)=>{let a=D[r],o=M[r];return isNaN(o)&&(o=0),(0,t.createElement)("div",null,"Code: ",e," ",R(o,a)," ",(0,t.createElement)("span",null,(0,t.createElement)("button",{onClick:()=>{console.log("click on index",r),S(r),y(e),_(a),E(o)}},"Edit")," ",(0,t.createElement)("button",{onClick:()=>{!function(e){n("Posting ...");const t=[...N];delete t[e],A({update:"coupon_codes",change:t})}(r)}},"Delete"))," ")})),(0,t.createElement)("div",null,(0,t.createElement)(r.TextControl,{label:"Coupon Code",value:v,onChange:e=>{y(e)}}),(0,t.createElement)(r.RadioControl,{label:"Method",selected:b,options:[{label:"Discount Percent (enter decimal, 0.5 = 50%)",value:"percent"},{label:"Discount Amount off Each",value:"amount"},{label:"Discount Off Total",value:"totalamount"}],onChange:e=>{_(e)}}),(0,t.createElement)(r.TextControl,{label:"Discount",value:g,onChange:e=>{"percent"==b&&e>1?e=1:isNaN(e)&&(e=0),E(e)}}),(0,t.createElement)("p",null,R(g,b)),(0,t.createElement)("p",null,(0,t.createElement)("button",{disabled:k,onClick:function(){const e=[...N],t=[...M],r=[...D];w<0?(e.push(v),t.push(g),r.push(b)):(e[w]=v,t[w]=g,r[w]=b),n("Posting ..."),A({update:"coupon_codes",change:{coupon_codes:e,coupon_discounts:t,coupon_methods:r}}),y(""),_("percent"),E(0),S(-1)}},w>-1?"Update Code":"Add Code")," ",e)))}const{Modal:It,TabPanel:Ut,Guide:Qt,GuidePage:qt,ToggleControl:Kt,Panel:Bt,PanelBody:Ht,PanelRow:Vt,Flex:zt,FlexBlock:Gt,FlexItem:Wt}=wp.components,{__:$t}=wp.i18n,Yt=e=>{console.log("Selecting tab",e)};function Jt(e){const[n,r]=(0,t.useState)(e.open),{tab:a,eventdata:o}=e,i=a||"basics";function s(){r(!1),e.setOpenModal&&e.setOpenModal(!1)}return console.log("setup start",i),o.status&&wp.data.dispatch("core/notices").createNotice("success",o.status,{id:"rsvpemialnowsnack",isDismissible:!0,type:"snackbar"}),(0,t.createElement)("div",null,!n&&(0,t.createElement)("p",null,(0,t.createElement)("button",{onClick:function(){r(!0),e.setOpenModal&&e.setOpenModal(!0)}},"RSVP / Event Options"),(0,t.createElement)("br",null),(0,t.createElement)("em",null,"Click to see more event options")),n&&(0,t.createElement)(It,{className:"rsvpmaker-setup-modal",title:"RSVP / Event Options",onRequestClose:s},(0,t.createElement)("div",null,o.status),(0,t.createElement)(Ut,{className:"rsvpmaker-tab-panel",activeClass:"is-active",onSelect:Yt,initialTabName:i,tabs:[{name:"basics",title:"Basic Settings",className:"rsvpmaker-modal-tab"},{name:"form",title:"RSVP Form",className:"rsvpmaker-modal-tab"},{name:"confirmation",title:"Confirmation and Reminder Messages",className:"rsvpmaker-modal-tab"},{name:"pricing",title:"Pricing",className:"rsvpmaker-modal-tab"}]},(e=>"basics"==e.name?(0,t.createElement)("div",{className:"rsvpsettings-tab-contents"},(0,t.createElement)(Zt,{eventdata:o})):"form"==e.name?(0,t.createElement)("div",{className:"rsvpsettings-tab-contents"},(0,t.createElement)(Xt,{form_id:o.form_id,event_id:rsvpmaker_ajax.event_id,eventdata:o})):"confirmation"==e.name?(0,t.createElement)("div",{className:"rsvpsettings-tab-contents"},(0,t.createElement)(Ft,{eventdata:o})):"pricing"==e.name?(0,t.createElement)("div",{className:"rsvpsettings-tab-contents"},(0,t.createElement)(jt,{eventdata:o})):void 0)),(0,t.createElement)("div",null,(0,t.createElement)("button",{onClick:s},"Close"))))}function Xt(e){const{eventdata:n}=e;return(0,t.createElement)("div",null,(0,t.createElement)("div",null,rsvpmaker_ajax.form_fields),(0,t.createElement)("div",null,(0,t.createElement)("em",null,rsvpmaker_ajax.form_type)),(0,t.createElement)("div",null,(0,t.createElement)(gt,{label:$t("Login required to RSVP","rsvpmaker"),metaKey:"_rsvp_login_required",eventdata:n}),(0,t.createElement)(gt,{eventdata:n,label:$t("Captcha security challenge","rsvpmaker"),metaKey:"_rsvp_captcha"}),(0,t.createElement)(gt,{eventdata:n,label:$t("Show Yes/No Options on Registration Form","rsvpmaker"),metaKey:"_rsvp_yesno"}),(0,t.createElement)(gt,{eventdata:n,label:$t("Show Date and Time on Form","rsvpmaker"),metaKey:"_rsvp_form_show_date"}),(0,t.createElement)(pt,{label:$t("Maximum number of participants (0 for no limit)","rsvpmaker"),metaKey:"_rsvp_max"}),(0,t.createElement)(yt,{label:$t("Form Instructions for User","rsvpmaker"),metaKey:"_rsvp_instructions"}),"rsvpmaker"==rsvpmaker.post_type&&(0,t.createElement)(bt,{label:"Registration Start Date (optional)",metaKey:"_rsvp_start",eventdata:n}),"rsvpmaker"==rsvpmaker.post_type&&(0,t.createElement)(bt,{label:"Registration Deadline (optional)",metaKey:"_rsvp_deadline",eventdata:n}),"rsvpmaker_template"==rsvpmaker.post_type&&(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"Registration Start Date (optional)"),(0,t.createElement)(pt,{label:$t("Start Date, Days Before","rsvpmaker"),metaKey:"_rsvp_reg_daysbefore"}),(0,t.createElement)(pt,{label:$t("Start Date, Hours Before","rsvpmaker"),metaKey:"_rsvp_reg_hours"}),(0,t.createElement)("h3",null,"Registration Deadline (optional)"),(0,t.createElement)(pt,{label:$t("Deadline, Days Before","rsvpmaker"),metaKey:"_rsvp_deadline_daysbefore"}),(0,t.createElement)(pt,{label:$t("Deadline, Hours Before","rsvpmaker"),metaKey:"_rsvp_deadline_hours"}))),(0,t.createElement)(Mt,null))}function Zt(e){const{eventdata:n}=e;return(0,t.createElement)("div",{className:"guide-page-1-columns"},(0,t.createElement)("div",{className:"rsvpguide-datetime"},"rsvpmaker"==rsvpmaker.post_type&&(0,t.createElement)(wt,{event_id:rsvpmaker_rest.post_id,eventdata:e.eventdata}),"rsvpmaker_template"==rsvpmaker.post_type&&(0,t.createElement)(kt,{event_id:rsvpmaker_rest.post_id,eventdata:e.eventdata})),(0,t.createElement)("div",{className:"guide-options-column"},(0,t.createElement)(gt,{label:$t("Collect RSVPs","rsvpmaker"),metaKey:"_rsvp_on",eventdata:e.eventdata}),(0,t.createElement)("p",null,"RSVP Form: ",n.default_form&&(0,t.createElement)("span",null,"Default")," ",!n.default_form&&(0,t.createElement)("span",null,"Custom for event or template")),(0,t.createElement)("p",null,"Confirmation Message: ",n.default_confirmation&&(0,t.createElement)("span",null,"Default")," ",!n.default_confirmation&&(0,t.createElement)("span",null,"Custom for event or template")),(0,t.createElement)(Bt,null,(0,t.createElement)(Ht,{title:"Display",icon:"admin-settings",initialOpen:!0},(0,t.createElement)(gt,{label:$t('"Show Add to Google/Outlook Calendar Icons" ',"rsvpmaker"),metaKey:"_calendar_icons",eventdata:n}),(0,t.createElement)(gt,{label:$t("Add Timezone to Date","rsvpmaker"),metaKey:"_add_timezone",eventdata:n}),(0,t.createElement)(gt,{label:$t("Show Timezone Conversion Button","rsvpmaker"),metaKey:"_convert_timezone",eventdata:n}),(0,t.createElement)(gt,{label:$t("Show RSVP Count","rsvpmaker"),metaKey:"_rsvp_count",eventdata:n}),(0,t.createElement)(ht,{label:$t("Display attendee names / RSVP note field","rsvpmaker"),metaKey:"_rsvp_show_attendees",options:[{label:"No",value:"0"},{label:"Yes",value:"1"},{label:"Only for Logged In Users",value:"2"}]})),(0,t.createElement)(Ht,{title:$t("Notifications / Reminders","rsvpmaker"),icon:"email",initialOpen:!1},(0,t.createElement)(pt,{title:$t("Send notifications to:","rsvpmaker"),metaKey:"_rsvp_to"}),(0,t.createElement)(gt,{label:$t("Send Confirmation Email","rsvpmaker"),metaKey:"_rsvp_rsvpmaker_send_confirmation_email",eventdata:n}),(0,t.createElement)(gt,{label:$t("Confirm AFTER Payment","rsvpmaker"),metaKey:"_rsvp_confirmation_after_payment",eventdata:n}),(0,t.createElement)(gt,{label:$t('"Include Event Content with Confirmation"',"rsvpmaker"),metaKey:"_rsvp_confirmation_include_event",eventdata:n}),(0,t.createElement)(Vt,null,$t("Confirmation Message (exerpt)","rsvpmaker"),": ",rsvpmaker_ajax.confirmation_excerpt),rsvpmaker_ajax.confirmation_links.map((function(e){return(0,t.createElement)(Vt,null,(0,t.createElement)("a",{href:e.href},e.title))})),(0,t.createElement)(Vt,null,(0,t.createElement)(ht,{label:$t("Email Template for Confirmations","rsvpmaker"),metaKey:"rsvp_tx_template",options:rsvpmaker_ajax.rsvp_tx_template_choices})),(0,t.createElement)("div",null,"Venue:",(0,t.createElement)("br",null),(0,t.createElement)(pt,{title:$t("Venue","rsvpmaker"),metaKey:"venue"}),(0,t.createElement)("br",null),(0,t.createElement)("em",null,$t("A street address or web address to include on the calendar invite attachment included with confirmations. If not specifed, RSVPMaker includes a link to the event post.","rsvpmaker")))))))}function en(){const e=wp?.data?.select("core/editor").getEditedPostAttribute("status"),n=window.location.href.match(/tab=([^&]+)/),r=n?n[1]:"basics",[a,o]=(0,t.useState)("draft"==e||"auto-draft"==e||n&&n[1]),i=wp?.data?.select("core/editor").getCurrentPostId(),{data:s,isLoading:l,isError:u}=(c=i,(0,Ge.useQuery)(["rsvp_event_date"],(function(e){return ze.get("rsvp_event_date?event_id="+c)}),{enabled:!0,retry:2,onSuccess:(e,t,n,r)=>{console.log("rsvp_event_date query",e)},onError:(e,t,n)=>{console.log("error retrieving rsvp_event_date",e)},refetchInterval:!1}));var c;if(u)return(0,t.createElement)("p",null,"Error loading event date");if(l)return(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Loading event data"));const d=s.data;return d.tzchoices&&Array.isArray(d.tzchoices)||(d.tzchoices=[]),(0,t.createElement)("div",{className:"date-or-template"},rsvpmaker_ajax.top_message,(0,t.createElement)(Jt,{open:a,setOpenModal:o,tab:r,eventdata:d}),!rsvpmaker_ajax.special&&"rsvpmaker"==rsvpmaker.post_type&&(0,t.createElement)("div",null,!a&&"rsvpmaker"==rsvpmaker.post_type&&(0,t.createElement)(wt,{event_id:i,eventdata:d})),"rsvpmaker_template"==rsvpmaker.post_type&&(0,t.createElement)(kt,{event_id:i,eventdata:d}))}const{Modal:tn}=wp.components,{subscribe:nn}=wp.data,{subscribe:rn}=wp.data,{DateTimePicker:an}=wp.components,{Panel:on,PanelBody:sn,PanelRow:ln}=wp.components,un=new Ge.QueryClient;var cn=wp.element.createElement;const{__:dn}=wp.i18n;"rsvpmaker"!=rsvpmaker.post_type&&"rsvpmaker_template"!=rsvpmaker.post_type||wp.plugins.registerPlugin("rsvpmaker-sidebar-plugin",{render:function(){if("undefined"==typeof rsvpmaker_ajax)return null;const e=wp?.data?.select("core/editor").getEditedPostAttribute("status"),n=window.location.href.match(/tab=([^&]+)/),[r,a]=(n&&n[1],(0,t.useState)("draft"==e||"auto-draft"==e||n&&n[1]));return Array(),Array(),Array(),wp.data.select("core/editor").getEditedPostAttribute("id"),rsvpmaker_ajax.special?cn(wp.editPost.PluginPostStatusInfo,{},(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"RSVPMaker ",dn("Special Document","rsvpmaker")),rsvpmaker_ajax.top_message,"RSVP Form"==rsvpmaker_ajax.special&&(0,t.createElement)("p",null,(0,t.createElement)("a",{href:"https://rsvpmaker.com/knowledge-base/customize-the-rsvp-form/",target:"_blank"},dn("Documentation","rsvpmaker"))),rsvpmaker_ajax.bottom_message)):cn(wp.editPost.PluginPostStatusInfo,{},(0,t.createElement)("div",null,(0,t.createElement)(Ge.QueryClientProvider,{client:un},(0,t.createElement)(en,null),rsvpmaker_ajax.bottom_message)))}});var mn=wp.editPost.PluginPostPublishPanel;"rsvpmaker"!=rsvpmaker.post_type&&"rsvpmaker_template"!=rsvpmaker.post_type||wp.plugins.registerPlugin("rsvpmaker-sidebar-postpublish",{render:function(){return cn(mn,{className:"rsvpmaker-post-publish-panel",title:dn("RSVPMaker Post Published"),initialOpen:!0})}}),"undefined"!=typeof rsvpmaker_ajax&&rsvpmaker_ajax.template_url&&wp.data.dispatch("core/notices").createNotice("info",dn("You are editing one event in a series defined by a template. To make changes you can apply to the whole series of events, switch to editing the template."),{id:"rsvptemplateedit",isDismissible:!0,actions:[{url:rsvpmaker_ajax.template_url,label:rsvpmaker_ajax.template_label}]}),("rsvpmaker"==rsvpmaker.post_type||"rsvpmaker_template"==rsvpmaker.post_type)&&(wp.data.select("core/edit-post").isEditorSidebarOpened()||wp.data.dispatch("core/edit-post").openGeneralSidebar("edit-post/document"))})()})();1 (()=>{var e={838:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:a}=Object;let{freeze:o,seal:i,create:s}=Object,{apply:l,construct:u}="undefined"!=typeof Reflect&&Reflect;o||(o=function(e){return e}),i||(i=function(e){return e}),l||(l=function(e,t,n){return e.apply(t,n)}),u||(u=function(e,t){return new e(...t)});const c=S(Array.prototype.forEach),m=S(Array.prototype.pop),d=S(Array.prototype.push),p=S(String.prototype.toLowerCase),f=S(String.prototype.toString),h=S(String.prototype.match),v=S(String.prototype.replace),y=S(String.prototype.indexOf),g=S(String.prototype.trim),E=S(Object.prototype.hasOwnProperty),b=S(RegExp.prototype.test),_=(w=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return u(w,t)});var w;function S(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return l(e,t,r)}}function C(e,r){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p;t&&t(e,null);let o=r.length;for(;o--;){let t=r[o];if("string"==typeof t){const e=a(t);e!==t&&(n(r)||(r[o]=e),t=e)}e[t]=!0}return e}function k(e){for(let t=0;t<e.length;t++)E(e,t)||(e[t]=null);return e}function T(t){const n=s(null);for(const[r,a]of e(t))E(t,r)&&(Array.isArray(a)?n[r]=k(a):a&&"object"==typeof a&&a.constructor===Object?n[r]=T(a):n[r]=a);return n}function O(e,t){for(;null!==e;){const n=a(e,t);if(n){if(n.get)return S(n.get);if("function"==typeof n.value)return S(n.value)}e=r(e)}return function(){return null}}const A=o(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),R=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),P=o(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),x=o(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),D=o(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),N=o(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),M=o(["#text"]),F=o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),L=o(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),j=o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),I=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),U=i(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Q=i(/<%[\w\W]*|[\w\W]*%>/gm),q=i(/\${[\w\W]*}/gm),K=i(/^data-[\-\w.\u00B7-\uFFFF]/),B=i(/^aria-[\-\w]+$/),H=i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),V=i(/^(?:\w+script|data):/i),z=i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),G=i(/^html$/i),W=i(/^[a-z][.\w]*(-[.\w]+)+$/i);var $=Object.freeze({__proto__:null,MUSTACHE_EXPR:U,ERB_EXPR:Q,TMPLIT_EXPR:q,DATA_ATTR:K,ARIA_ATTR:B,IS_ALLOWED_URI:H,IS_SCRIPT_OR_DATA:V,ATTR_WHITESPACE:z,DOCTYPE_NAME:G,CUSTOM_ELEMENT:W});const Y=function(){return"undefined"==typeof window?null:window};return function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y();const r=e=>t(e);if(r.version="3.0.11",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;let{document:a}=n;const i=a,l=i.currentScript,{DocumentFragment:u,HTMLTemplateElement:w,Node:S,Element:k,NodeFilter:U,NamedNodeMap:Q=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:q,DOMParser:K,trustedTypes:B}=n,V=k.prototype,z=O(V,"cloneNode"),W=O(V,"nextSibling"),J=O(V,"childNodes"),X=O(V,"parentNode");if("function"==typeof w){const e=a.createElement("template");e.content&&e.content.ownerDocument&&(a=e.content.ownerDocument)}let Z,ee="";const{implementation:te,createNodeIterator:ne,createDocumentFragment:re,getElementsByTagName:ae}=a,{importNode:oe}=i;let ie={};r.isSupported="function"==typeof e&&"function"==typeof X&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:se,ERB_EXPR:le,TMPLIT_EXPR:ue,DATA_ATTR:ce,ARIA_ATTR:me,IS_SCRIPT_OR_DATA:de,ATTR_WHITESPACE:pe,CUSTOM_ELEMENT:fe}=$;let{IS_ALLOWED_URI:he}=$,ve=null;const ye=C({},[...A,...R,...P,...D,...M]);let ge=null;const Ee=C({},[...F,...L,...j,...I]);let be=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),_e=null,we=null,Se=!0,Ce=!0,ke=!1,Te=!0,Oe=!1,Ae=!1,Re=!1,Pe=!1,xe=!1,De=!1,Ne=!1,Me=!0,Fe=!1,Le=!0,je=!1,Ie={},Ue=null;const Qe=C({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let qe=null;const Ke=C({},["audio","video","img","source","image","track"]);let Be=null;const He=C({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ve="http://www.w3.org/1998/Math/MathML",ze="http://www.w3.org/2000/svg",Ge="http://www.w3.org/1999/xhtml";let We=Ge,$e=!1,Ye=null;const Je=C({},[Ve,ze,Ge],f);let Xe=null;const Ze=["application/xhtml+xml","text/html"];let et=null,tt=null;const nt=a.createElement("form"),rt=function(e){return e instanceof RegExp||e instanceof Function},at=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!tt||tt!==e){if(e&&"object"==typeof e||(e={}),e=T(e),Xe=-1===Ze.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,et="application/xhtml+xml"===Xe?f:p,ve=E(e,"ALLOWED_TAGS")?C({},e.ALLOWED_TAGS,et):ye,ge=E(e,"ALLOWED_ATTR")?C({},e.ALLOWED_ATTR,et):Ee,Ye=E(e,"ALLOWED_NAMESPACES")?C({},e.ALLOWED_NAMESPACES,f):Je,Be=E(e,"ADD_URI_SAFE_ATTR")?C(T(He),e.ADD_URI_SAFE_ATTR,et):He,qe=E(e,"ADD_DATA_URI_TAGS")?C(T(Ke),e.ADD_DATA_URI_TAGS,et):Ke,Ue=E(e,"FORBID_CONTENTS")?C({},e.FORBID_CONTENTS,et):Qe,_e=E(e,"FORBID_TAGS")?C({},e.FORBID_TAGS,et):{},we=E(e,"FORBID_ATTR")?C({},e.FORBID_ATTR,et):{},Ie=!!E(e,"USE_PROFILES")&&e.USE_PROFILES,Se=!1!==e.ALLOW_ARIA_ATTR,Ce=!1!==e.ALLOW_DATA_ATTR,ke=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Te=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Oe=e.SAFE_FOR_TEMPLATES||!1,Ae=e.WHOLE_DOCUMENT||!1,xe=e.RETURN_DOM||!1,De=e.RETURN_DOM_FRAGMENT||!1,Ne=e.RETURN_TRUSTED_TYPE||!1,Pe=e.FORCE_BODY||!1,Me=!1!==e.SANITIZE_DOM,Fe=e.SANITIZE_NAMED_PROPS||!1,Le=!1!==e.KEEP_CONTENT,je=e.IN_PLACE||!1,he=e.ALLOWED_URI_REGEXP||H,We=e.NAMESPACE||Ge,be=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(be.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(be.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(be.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Oe&&(Ce=!1),De&&(xe=!0),Ie&&(ve=C({},M),ge=[],!0===Ie.html&&(C(ve,A),C(ge,F)),!0===Ie.svg&&(C(ve,R),C(ge,L),C(ge,I)),!0===Ie.svgFilters&&(C(ve,P),C(ge,L),C(ge,I)),!0===Ie.mathMl&&(C(ve,D),C(ge,j),C(ge,I))),e.ADD_TAGS&&(ve===ye&&(ve=T(ve)),C(ve,e.ADD_TAGS,et)),e.ADD_ATTR&&(ge===Ee&&(ge=T(ge)),C(ge,e.ADD_ATTR,et)),e.ADD_URI_SAFE_ATTR&&C(Be,e.ADD_URI_SAFE_ATTR,et),e.FORBID_CONTENTS&&(Ue===Qe&&(Ue=T(Ue)),C(Ue,e.FORBID_CONTENTS,et)),Le&&(ve["#text"]=!0),Ae&&C(ve,["html","head","body"]),ve.table&&(C(ve,["tbody"]),delete _e.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Z=e.TRUSTED_TYPES_POLICY,ee=Z.createHTML("")}else void 0===Z&&(Z=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+a+" could not be created."),null}}(B,l)),null!==Z&&"string"==typeof ee&&(ee=Z.createHTML(""));o&&o(e),tt=e}},ot=C({},["mi","mo","mn","ms","mtext"]),it=C({},["foreignobject","desc","title","annotation-xml"]),st=C({},["title","style","font","a","script"]),lt=C({},[...R,...P,...x]),ut=C({},[...D,...N]),ct=function(e){d(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},mt=function(e,t){try{d(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){d(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ge[e])if(xe||De)try{ct(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},dt=function(e){let t=null,n=null;if(Pe)e="<remove></remove>"+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Xe&&We===Ge&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=Z?Z.createHTML(e):e;if(We===Ge)try{t=(new K).parseFromString(r,Xe)}catch(e){}if(!t||!t.documentElement){t=te.createDocument(We,"template",null);try{t.documentElement.innerHTML=$e?ee:r}catch(e){}}const o=t.body||t.documentElement;return e&&n&&o.insertBefore(a.createTextNode(n),o.childNodes[0]||null),We===Ge?ae.call(t,Ae?"html":"body")[0]:Ae?t.documentElement:o},pt=function(e){return ne.call(e.ownerDocument||e,e,U.SHOW_ELEMENT|U.SHOW_COMMENT|U.SHOW_TEXT|U.SHOW_PROCESSING_INSTRUCTION|U.SHOW_CDATA_SECTION,null)},ft=function(e){return"function"==typeof S&&e instanceof S},ht=function(e,t,n){ie[e]&&c(ie[e],(e=>{e.call(r,t,n,tt)}))},vt=function(e){let t=null;if(ht("beforeSanitizeElements",e,null),(n=e)instanceof q&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof Q)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return ct(e),!0;var n;const a=et(e.nodeName);if(ht("uponSanitizeElement",e,{tagName:a,allowedTags:ve}),e.hasChildNodes()&&!ft(e.firstElementChild)&&b(/<[/\w]/g,e.innerHTML)&&b(/<[/\w]/g,e.textContent))return ct(e),!0;if(7===e.nodeType)return ct(e),!0;if(!ve[a]||_e[a]){if(!_e[a]&>(a)){if(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,a))return!1;if(be.tagNameCheck instanceof Function&&be.tagNameCheck(a))return!1}if(Le&&!Ue[a]){const t=X(e)||e.parentNode,n=J(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(z(n[r],!0),W(e))}return ct(e),!0}return e instanceof k&&!function(e){let t=X(e);t&&t.tagName||(t={namespaceURI:We,tagName:"template"});const n=p(e.tagName),r=p(t.tagName);return!!Ye[e.namespaceURI]&&(e.namespaceURI===ze?t.namespaceURI===Ge?"svg"===n:t.namespaceURI===Ve?"svg"===n&&("annotation-xml"===r||ot[r]):Boolean(lt[n]):e.namespaceURI===Ve?t.namespaceURI===Ge?"math"===n:t.namespaceURI===ze?"math"===n&&it[r]:Boolean(ut[n]):e.namespaceURI===Ge?!(t.namespaceURI===ze&&!it[r])&&!(t.namespaceURI===Ve&&!ot[r])&&!ut[n]&&(st[n]||!lt[n]):!("application/xhtml+xml"!==Xe||!Ye[e.namespaceURI]))}(e)?(ct(e),!0):"noscript"!==a&&"noembed"!==a&&"noframes"!==a||!b(/<\/no(script|embed|frames)/i,e.innerHTML)?(Oe&&3===e.nodeType&&(t=e.textContent,c([se,le,ue],(e=>{t=v(t,e," ")})),e.textContent!==t&&(d(r.removed,{element:e.cloneNode()}),e.textContent=t)),ht("afterSanitizeElements",e,null),!1):(ct(e),!0)},yt=function(e,t,n){if(Me&&("id"===t||"name"===t)&&(n in a||n in nt))return!1;if(Ce&&!we[t]&&b(ce,t));else if(Se&&b(me,t));else if(!ge[t]||we[t]){if(!(gt(e)&&(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,e)||be.tagNameCheck instanceof Function&&be.tagNameCheck(e))&&(be.attributeNameCheck instanceof RegExp&&b(be.attributeNameCheck,t)||be.attributeNameCheck instanceof Function&&be.attributeNameCheck(t))||"is"===t&&be.allowCustomizedBuiltInElements&&(be.tagNameCheck instanceof RegExp&&b(be.tagNameCheck,n)||be.tagNameCheck instanceof Function&&be.tagNameCheck(n))))return!1}else if(Be[t]);else if(b(he,v(n,pe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(n,"data:")||!qe[e])if(ke&&!b(de,v(n,pe,"")));else if(n)return!1;return!0},gt=function(e){return"annotation-xml"!==e&&h(e,fe)},Et=function(e){ht("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};let a=t.length;for(;a--;){const o=t[a],{name:i,namespaceURI:s,value:l}=o,u=et(i);let d="value"===i?l:g(l);if(n.attrName=u,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,ht("uponSanitizeAttribute",e,n),d=n.attrValue,n.forceKeepAttr)continue;if(mt(i,e),!n.keepAttr)continue;if(!Te&&b(/\/>/i,d)){mt(i,e);continue}Oe&&c([se,le,ue],(e=>{d=v(d,e," ")}));const p=et(e.nodeName);if(yt(p,u,d)){if(!Fe||"id"!==u&&"name"!==u||(mt(i,e),d="user-content-"+d),Z&&"object"==typeof B&&"function"==typeof B.getAttributeType)if(s);else switch(B.getAttributeType(p,u)){case"TrustedHTML":d=Z.createHTML(d);break;case"TrustedScriptURL":d=Z.createScriptURL(d)}try{s?e.setAttributeNS(s,i,d):e.setAttribute(i,d),m(r.removed)}catch(e){}}}ht("afterSanitizeAttributes",e,null)},bt=function e(t){let n=null;const r=pt(t);for(ht("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)ht("uponSanitizeShadowNode",n,null),vt(n)||(n.content instanceof u&&e(n.content),Et(n));ht("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,a=null,o=null,s=null;if($e=!e,$e&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ft(e)){if("function"!=typeof e.toString)throw _("toString is not a function");if("string"!=typeof(e=e.toString()))throw _("dirty is not a string, aborting")}if(!r.isSupported)return e;if(Re||at(t),r.removed=[],"string"==typeof e&&(je=!1),je){if(e.nodeName){const t=et(e.nodeName);if(!ve[t]||_e[t])throw _("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof S)n=dt("\x3c!----\x3e"),a=n.ownerDocument.importNode(e,!0),1===a.nodeType&&"BODY"===a.nodeName||"HTML"===a.nodeName?n=a:n.appendChild(a);else{if(!xe&&!Oe&&!Ae&&-1===e.indexOf("<"))return Z&&Ne?Z.createHTML(e):e;if(n=dt(e),!n)return xe?null:Ne?ee:""}n&&Pe&&ct(n.firstChild);const l=pt(je?e:n);for(;o=l.nextNode();)vt(o)||(o.content instanceof u&&bt(o.content),Et(o));if(je)return e;if(xe){if(De)for(s=re.call(n.ownerDocument);n.firstChild;)s.appendChild(n.firstChild);else s=n;return(ge.shadowroot||ge.shadowrootmode)&&(s=oe.call(i,s,!0)),s}let m=Ae?n.outerHTML:n.innerHTML;return Ae&&ve["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&b(G,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),Oe&&c([se,le,ue],(e=>{m=v(m,e," ")})),Z&&Ne?Z.createHTML(m):m},r.setConfig=function(){at(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Re=!0},r.clearConfig=function(){tt=null,Re=!1},r.isValidAttribute=function(e,t,n){tt||at({});const r=et(e),a=et(t);return yt(r,a,n)},r.addHook=function(e,t){"function"==typeof t&&(ie[e]=ie[e]||[],d(ie[e],t))},r.removeHook=function(e){if(ie[e])return m(ie[e])},r.removeHooks=function(e){ie[e]&&(ie[e]=[])},r.removeAllHooks=function(){ie={}},r}()}()},289:(e,t,n)=>{"use strict";n.d(t,{m:()=>i});var r=n(540),a=n(287),o=n(941),i=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!o.S$&&(null==(t=window)?void 0:t.addEventListener)){var n=function(){return e()};return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),function(){window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}},t}(0,r.A)(t,e);var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)},n.setEventListener=function(e){var t,n=this;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((function(e){"boolean"==typeof e?n.setFocused(e):n.onFocus()}))},n.setFocused=function(e){this.focused=e,e&&this.onFocus()},n.onFocus=function(){this.listeners.forEach((function(e){e()}))},n.isFocused=function(){return"boolean"==typeof this.focused?this.focused:"undefined"==typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)},t}(a.Q))},468:(e,t,n)=>{"use strict";n.d(t,{QueryClient:()=>r.E});var r=n(98),a=n(449);n.o(a,"QueryClientProvider")&&n.d(t,{QueryClientProvider:function(){return a.QueryClientProvider}}),n.o(a,"useMutation")&&n.d(t,{useMutation:function(){return a.useMutation}}),n.o(a,"useQuery")&&n.d(t,{useQuery:function(){return a.useQuery}}),n.o(a,"useQueryClient")&&n.d(t,{useQueryClient:function(){return a.useQueryClient}})},690:(e,t,n)=>{"use strict";n.d(t,{B:()=>o,t:()=>a});var r=console;function a(){return r}function o(e){r=e}},465:(e,t,n)=>{"use strict";n.d(t,{$:()=>u,s:()=>l});var r=n(168),a=n(690),o=n(428),i=n(281),s=n(941),l=function(){function e(e){this.options=(0,r.A)({},e.defaultOptions,e.options),this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.observers=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0},this.meta=e.meta}var t=e.prototype;return t.setState=function(e){this.dispatch({type:"setState",state:e})},t.addObserver=function(e){-1===this.observers.indexOf(e)&&this.observers.push(e)},t.removeObserver=function(e){this.observers=this.observers.filter((function(t){return t!==e}))},t.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(s.lQ).catch(s.lQ)):Promise.resolve()},t.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},t.execute=function(){var e,t=this,n="loading"===this.state.status,r=Promise.resolve();return n||(this.dispatch({type:"loading",variables:this.options.variables}),r=r.then((function(){null==t.mutationCache.config.onMutate||t.mutationCache.config.onMutate(t.state.variables,t)})).then((function(){return null==t.options.onMutate?void 0:t.options.onMutate(t.state.variables)})).then((function(e){e!==t.state.context&&t.dispatch({type:"loading",context:e,variables:t.state.variables})}))),r.then((function(){return t.executeMutation()})).then((function(n){e=n,null==t.mutationCache.config.onSuccess||t.mutationCache.config.onSuccess(e,t.state.variables,t.state.context,t)})).then((function(){return null==t.options.onSuccess?void 0:t.options.onSuccess(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(e,null,t.state.variables,t.state.context)})).then((function(){return t.dispatch({type:"success",data:e}),e})).catch((function(e){return null==t.mutationCache.config.onError||t.mutationCache.config.onError(e,t.state.variables,t.state.context,t),(0,a.t)().error(e),Promise.resolve().then((function(){return null==t.options.onError?void 0:t.options.onError(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(void 0,e,t.state.variables,t.state.context)})).then((function(){throw t.dispatch({type:"error",error:e}),e}))}))},t.executeMutation=function(){var e,t=this;return this.retryer=new i.eJ({fn:function(){return t.options.mutationFn?t.options.mutationFn(t.state.variables):Promise.reject("No mutationFn found")},onFail:function(){t.dispatch({type:"failed"})},onPause:function(){t.dispatch({type:"pause"})},onContinue:function(){t.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay}),this.retryer.promise},t.dispatch=function(e){var t=this;this.state=function(e,t){switch(t.type){case"failed":return(0,r.A)({},e,{failureCount:e.failureCount+1});case"pause":return(0,r.A)({},e,{isPaused:!0});case"continue":return(0,r.A)({},e,{isPaused:!1});case"loading":return(0,r.A)({},e,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return(0,r.A)({},e,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return(0,r.A)({},e,{data:void 0,error:t.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return(0,r.A)({},e,t.state);default:return e}}(this.state,e),o.j.batch((function(){t.observers.forEach((function(t){t.onMutationUpdate(e)})),t.mutationCache.notify(t)}))},e}();function u(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}},428:(e,t,n)=>{"use strict";n.d(t,{j:()=>a});var r=n(941),a=new(function(){function e(){this.queue=[],this.transactions=0,this.notifyFn=function(e){e()},this.batchNotifyFn=function(e){e()}}var t=e.prototype;return t.batch=function(e){var t;this.transactions++;try{t=e()}finally{this.transactions--,this.transactions||this.flush()}return t},t.schedule=function(e){var t=this;this.transactions?this.queue.push(e):(0,r.G6)((function(){t.notifyFn(e)}))},t.batchCalls=function(e){var t=this;return function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];t.schedule((function(){e.apply(void 0,r)}))}},t.flush=function(){var e=this,t=this.queue;this.queue=[],t.length&&(0,r.G6)((function(){e.batchNotifyFn((function(){t.forEach((function(t){e.notifyFn(t)}))}))}))},t.setNotifyFunction=function(e){this.notifyFn=e},t.setBatchNotifyFunction=function(e){this.batchNotifyFn=e},e}())},622:(e,t,n)=>{"use strict";n.d(t,{t:()=>i});var r=n(540),a=n(287),o=n(941),i=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!o.S$&&(null==(t=window)?void 0:t.addEventListener)){var n=function(){return e()};return window.addEventListener("online",n,!1),window.addEventListener("offline",n,!1),function(){window.removeEventListener("online",n),window.removeEventListener("offline",n)}}},t}(0,r.A)(t,e);var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)},n.setEventListener=function(e){var t,n=this;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((function(e){"boolean"==typeof e?n.setOnline(e):n.onOnline()}))},n.setOnline=function(e){this.online=e,e&&this.onOnline()},n.onOnline=function(){this.listeners.forEach((function(e){e()}))},n.isOnline=function(){return"boolean"==typeof this.online?this.online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine},t}(a.Q))},98:(e,t,n)=>{"use strict";n.d(t,{E:()=>y});var r=n(168),a=n(941),o=n(540),i=n(428),s=n(690),l=n(281),u=function(){function e(e){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=e.meta,this.scheduleGc()}var t=e.prototype;return t.setOptions=function(e){var t;this.options=(0,r.A)({},this.defaultOptions,e),this.meta=null==e?void 0:e.meta,this.cacheTime=Math.max(this.cacheTime||0,null!=(t=this.options.cacheTime)?t:3e5)},t.setDefaultOptions=function(e){this.defaultOptions=e},t.scheduleGc=function(){var e=this;this.clearGcTimeout(),(0,a.gn)(this.cacheTime)&&(this.gcTimeout=setTimeout((function(){e.optionalRemove()}),this.cacheTime))},t.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},t.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},t.setData=function(e,t){var n,r,o=this.state.data,i=(0,a.Zw)(e,o);return(null==(n=(r=this.options).isDataEqual)?void 0:n.call(r,o,i))?i=o:!1!==this.options.structuralSharing&&(i=(0,a.BH)(o,i)),this.dispatch({data:i,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt}),i},t.setState=function(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})},t.cancel=function(e){var t,n=this.promise;return null==(t=this.retryer)||t.cancel(e),n?n.then(a.lQ).catch(a.lQ):Promise.resolve()},t.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},t.reset=function(){this.destroy(),this.setState(this.initialState)},t.isActive=function(){return this.observers.some((function(e){return!1!==e.options.enabled}))},t.isFetching=function(){return this.state.isFetching},t.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some((function(e){return e.getCurrentResult().isStale}))},t.isStaleByTime=function(e){return void 0===e&&(e=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!(0,a.j3)(this.state.dataUpdatedAt,e)},t.onFocus=function(){var e,t=this.observers.find((function(e){return e.shouldFetchOnWindowFocus()}));t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.onOnline=function(){var e,t=this.observers.find((function(e){return e.shouldFetchOnReconnect()}));t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.addObserver=function(e){-1===this.observers.indexOf(e)&&(this.observers.push(e),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))},t.removeObserver=function(e){-1!==this.observers.indexOf(e)&&(this.observers=this.observers.filter((function(t){return t!==e})),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:e}))},t.getObserversCount=function(){return this.observers.length},t.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},t.fetch=function(e,t){var n,r,o,i=this;if(this.state.isFetching)if(this.state.dataUpdatedAt&&(null==t?void 0:t.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var u;return null==(u=this.retryer)||u.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){var c=this.observers.find((function(e){return e.options.queryFn}));c&&this.setOptions(c.options)}var m=(0,a.HN)(this.queryKey),d=(0,a.jY)(),p={queryKey:m,pageParam:void 0,meta:this.meta};Object.defineProperty(p,"signal",{enumerable:!0,get:function(){if(d)return i.abortSignalConsumed=!0,d.signal}});var f,h,v={fetchOptions:t,options:this.options,queryKey:m,state:this.state,fetchFn:function(){return i.options.queryFn?(i.abortSignalConsumed=!1,i.options.queryFn(p)):Promise.reject("Missing queryFn")},meta:this.meta};return(null==(n=this.options.behavior)?void 0:n.onFetch)&&(null==(f=this.options.behavior)||f.onFetch(v)),this.revertState=this.state,this.state.isFetching&&this.state.fetchMeta===(null==(r=v.fetchOptions)?void 0:r.meta)||this.dispatch({type:"fetch",meta:null==(h=v.fetchOptions)?void 0:h.meta}),this.retryer=new l.eJ({fn:v.fetchFn,abort:null==d||null==(o=d.abort)?void 0:o.bind(d),onSuccess:function(e){i.setData(e),null==i.cache.config.onSuccess||i.cache.config.onSuccess(e,i),0===i.cacheTime&&i.optionalRemove()},onError:function(e){(0,l.wm)(e)&&e.silent||i.dispatch({type:"error",error:e}),(0,l.wm)(e)||(null==i.cache.config.onError||i.cache.config.onError(e,i),(0,s.t)().error(e)),0===i.cacheTime&&i.optionalRemove()},onFail:function(){i.dispatch({type:"failed"})},onPause:function(){i.dispatch({type:"pause"})},onContinue:function(){i.dispatch({type:"continue"})},retry:v.options.retry,retryDelay:v.options.retryDelay}),this.promise=this.retryer.promise,this.promise},t.dispatch=function(e){var t=this;this.state=this.reducer(this.state,e),i.j.batch((function(){t.observers.forEach((function(t){t.onQueryUpdate(e)})),t.cache.notify({query:t,type:"queryUpdated",action:e})}))},t.getDefaultState=function(e){var t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==e.initialData?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0,r=void 0!==t;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?null!=n?n:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:r?"success":"idle"}},t.reducer=function(e,t){var n,a;switch(t.type){case"failed":return(0,r.A)({},e,{fetchFailureCount:e.fetchFailureCount+1});case"pause":return(0,r.A)({},e,{isPaused:!0});case"continue":return(0,r.A)({},e,{isPaused:!1});case"fetch":return(0,r.A)({},e,{fetchFailureCount:0,fetchMeta:null!=(n=t.meta)?n:null,isFetching:!0,isPaused:!1},!e.dataUpdatedAt&&{error:null,status:"loading"});case"success":return(0,r.A)({},e,{data:t.data,dataUpdateCount:e.dataUpdateCount+1,dataUpdatedAt:null!=(a=t.dataUpdatedAt)?a:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var o=t.error;return(0,l.wm)(o)&&o.revert&&this.revertState?(0,r.A)({},this.revertState):(0,r.A)({},e,{error:o,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return(0,r.A)({},e,{isInvalidated:!0});case"setState":return(0,r.A)({},e,t.state);default:return e}},e}(),c=n(287),m=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.queries=[],n.queriesMap={},n}(0,o.A)(t,e);var n=t.prototype;return n.build=function(e,t,n){var r,o=t.queryKey,i=null!=(r=t.queryHash)?r:(0,a.F$)(o,t),s=this.get(i);return s||(s=new u({cache:this,queryKey:o,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(o),meta:t.meta}),this.add(s)),s},n.add=function(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"queryAdded",query:e}))},n.remove=function(e){var t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter((function(t){return t!==e})),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"queryRemoved",query:e}))},n.clear=function(){var e=this;i.j.batch((function(){e.queries.forEach((function(t){e.remove(t)}))}))},n.get=function(e){return this.queriesMap[e]},n.getAll=function(){return this.queries},n.find=function(e,t){var n=(0,a.b_)(e,t)[0];return void 0===n.exact&&(n.exact=!0),this.queries.find((function(e){return(0,a.MK)(n,e)}))},n.findAll=function(e,t){var n=(0,a.b_)(e,t)[0];return Object.keys(n).length>0?this.queries.filter((function(e){return(0,a.MK)(n,e)})):this.queries},n.notify=function(e){var t=this;i.j.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},n.onFocus=function(){var e=this;i.j.batch((function(){e.queries.forEach((function(e){e.onFocus()}))}))},n.onOnline=function(){var e=this;i.j.batch((function(){e.queries.forEach((function(e){e.onOnline()}))}))},t}(c.Q),d=n(465),p=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.mutations=[],n.mutationId=0,n}(0,o.A)(t,e);var n=t.prototype;return n.build=function(e,t,n){var r=new d.s({mutationCache:this,mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:n,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0,meta:t.meta});return this.add(r),r},n.add=function(e){this.mutations.push(e),this.notify(e)},n.remove=function(e){this.mutations=this.mutations.filter((function(t){return t!==e})),e.cancel(),this.notify(e)},n.clear=function(){var e=this;i.j.batch((function(){e.mutations.forEach((function(t){e.remove(t)}))}))},n.getAll=function(){return this.mutations},n.find=function(e){return void 0===e.exact&&(e.exact=!0),this.mutations.find((function(t){return(0,a.nJ)(e,t)}))},n.findAll=function(e){return this.mutations.filter((function(t){return(0,a.nJ)(e,t)}))},n.notify=function(e){var t=this;i.j.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},n.onFocus=function(){this.resumePausedMutations()},n.onOnline=function(){this.resumePausedMutations()},n.resumePausedMutations=function(){var e=this.mutations.filter((function(e){return e.state.isPaused}));return i.j.batch((function(){return e.reduce((function(e,t){return e.then((function(){return t.continue().catch(a.lQ)}))}),Promise.resolve())}))},t}(c.Q),f=n(289),h=n(622);function v(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}var y=function(){function e(e){void 0===e&&(e={}),this.queryCache=e.queryCache||new m,this.mutationCache=e.mutationCache||new p,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var t=e.prototype;return t.mount=function(){var e=this;this.unsubscribeFocus=f.m.subscribe((function(){f.m.isFocused()&&h.t.isOnline()&&(e.mutationCache.onFocus(),e.queryCache.onFocus())})),this.unsubscribeOnline=h.t.subscribe((function(){f.m.isFocused()&&h.t.isOnline()&&(e.mutationCache.onOnline(),e.queryCache.onOnline())}))},t.unmount=function(){var e,t;null==(e=this.unsubscribeFocus)||e.call(this),null==(t=this.unsubscribeOnline)||t.call(this)},t.isFetching=function(e,t){var n=(0,a.b_)(e,t)[0];return n.fetching=!0,this.queryCache.findAll(n).length},t.isMutating=function(e){return this.mutationCache.findAll((0,r.A)({},e,{fetching:!0})).length},t.getQueryData=function(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state.data},t.getQueriesData=function(e){return this.getQueryCache().findAll(e).map((function(e){return[e.queryKey,e.state.data]}))},t.setQueryData=function(e,t,n){var r=(0,a.vh)(e),o=this.defaultQueryOptions(r);return this.queryCache.build(this,o).setData(t,n)},t.setQueriesData=function(e,t,n){var r=this;return i.j.batch((function(){return r.getQueryCache().findAll(e).map((function(e){var a=e.queryKey;return[a,r.setQueryData(a,t,n)]}))}))},t.getQueryState=function(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state},t.removeQueries=function(e,t){var n=(0,a.b_)(e,t)[0],r=this.queryCache;i.j.batch((function(){r.findAll(n).forEach((function(e){r.remove(e)}))}))},t.resetQueries=function(e,t,n){var o=this,s=(0,a.b_)(e,t,n),l=s[0],u=s[1],c=this.queryCache,m=(0,r.A)({},l,{active:!0});return i.j.batch((function(){return c.findAll(l).forEach((function(e){e.reset()})),o.refetchQueries(m,u)}))},t.cancelQueries=function(e,t,n){var r=this,o=(0,a.b_)(e,t,n),s=o[0],l=o[1],u=void 0===l?{}:l;void 0===u.revert&&(u.revert=!0);var c=i.j.batch((function(){return r.queryCache.findAll(s).map((function(e){return e.cancel(u)}))}));return Promise.all(c).then(a.lQ).catch(a.lQ)},t.invalidateQueries=function(e,t,n){var o,s,l,u=this,c=(0,a.b_)(e,t,n),m=c[0],d=c[1],p=(0,r.A)({},m,{active:null==(o=null!=(s=m.refetchActive)?s:m.active)||o,inactive:null!=(l=m.refetchInactive)&&l});return i.j.batch((function(){return u.queryCache.findAll(m).forEach((function(e){e.invalidate()})),u.refetchQueries(p,d)}))},t.refetchQueries=function(e,t,n){var o=this,s=(0,a.b_)(e,t,n),l=s[0],u=s[1],c=i.j.batch((function(){return o.queryCache.findAll(l).map((function(e){return e.fetch(void 0,(0,r.A)({},u,{meta:{refetchPage:null==l?void 0:l.refetchPage}}))}))})),m=Promise.all(c).then(a.lQ);return(null==u?void 0:u.throwOnError)||(m=m.catch(a.lQ)),m},t.fetchQuery=function(e,t,n){var r=(0,a.vh)(e,t,n),o=this.defaultQueryOptions(r);void 0===o.retry&&(o.retry=!1);var i=this.queryCache.build(this,o);return i.isStaleByTime(o.staleTime)?i.fetch(o):Promise.resolve(i.state.data)},t.prefetchQuery=function(e,t,n){return this.fetchQuery(e,t,n).then(a.lQ).catch(a.lQ)},t.fetchInfiniteQuery=function(e,t,n){var r=(0,a.vh)(e,t,n);return r.behavior={onFetch:function(e){e.fetchFn=function(){var t,n,r,o,i,s,u,c,m,d=null==(t=e.fetchOptions)||null==(n=t.meta)?void 0:n.refetchPage,p=null==(r=e.fetchOptions)||null==(o=r.meta)?void 0:o.fetchMore,f=null==p?void 0:p.pageParam,h="forward"===(null==p?void 0:p.direction),y="backward"===(null==p?void 0:p.direction),g=(null==(i=e.state.data)?void 0:i.pages)||[],E=(null==(s=e.state.data)?void 0:s.pageParams)||[],b=(0,a.jY)(),_=null==b?void 0:b.signal,w=E,S=!1,C=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},k=function(e,t,n,r){return w=r?[t].concat(w):[].concat(w,[t]),r?[n].concat(e):[].concat(e,[n])},T=function(t,n,r,a){if(S)return Promise.reject("Cancelled");if(void 0===r&&!n&&t.length)return Promise.resolve(t);var o={queryKey:e.queryKey,signal:_,pageParam:r,meta:e.meta},i=C(o),s=Promise.resolve(i).then((function(e){return k(t,r,e,a)}));return(0,l.dd)(i)&&(s.cancel=i.cancel),s};if(g.length)if(h){var O=void 0!==f,A=O?f:v(e.options,g);u=T(g,O,A)}else if(y){var R=void 0!==f,P=R?f:(c=e.options,m=g,null==c.getPreviousPageParam?void 0:c.getPreviousPageParam(m[0],m));u=T(g,R,P,!0)}else!function(){w=[];var t=void 0===e.options.getNextPageParam,n=!d||!g[0]||d(g[0],0,g);u=n?T([],t,E[0]):Promise.resolve(k([],E[0],g[0]));for(var r=function(n){u=u.then((function(r){if(!d||!g[n]||d(g[n],n,g)){var a=t?E[n]:v(e.options,r);return T(r,t,a)}return Promise.resolve(k(r,E[n],g[n]))}))},a=1;a<g.length;a++)r(a)}();else u=T([]);var x=u.then((function(e){return{pages:e,pageParams:w}}));return x.cancel=function(){S=!0,null==b||b.abort(),(0,l.dd)(u)&&u.cancel()},x}}},this.fetchQuery(r)},t.prefetchInfiniteQuery=function(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(a.lQ).catch(a.lQ)},t.cancelMutations=function(){var e=this,t=i.j.batch((function(){return e.mutationCache.getAll().map((function(e){return e.cancel()}))}));return Promise.all(t).then(a.lQ).catch(a.lQ)},t.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},t.executeMutation=function(e){return this.mutationCache.build(this,e).execute()},t.getQueryCache=function(){return this.queryCache},t.getMutationCache=function(){return this.mutationCache},t.getDefaultOptions=function(){return this.defaultOptions},t.setDefaultOptions=function(e){this.defaultOptions=e},t.setQueryDefaults=function(e,t){var n=this.queryDefaults.find((function(t){return(0,a.Od)(e)===(0,a.Od)(t.queryKey)}));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})},t.getQueryDefaults=function(e){var t;return e?null==(t=this.queryDefaults.find((function(t){return(0,a.Cp)(e,t.queryKey)})))?void 0:t.defaultOptions:void 0},t.setMutationDefaults=function(e,t){var n=this.mutationDefaults.find((function(t){return(0,a.Od)(e)===(0,a.Od)(t.mutationKey)}));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})},t.getMutationDefaults=function(e){var t;return e?null==(t=this.mutationDefaults.find((function(t){return(0,a.Cp)(e,t.mutationKey)})))?void 0:t.defaultOptions:void 0},t.defaultQueryOptions=function(e){if(null==e?void 0:e._defaulted)return e;var t=(0,r.A)({},this.defaultOptions.queries,this.getQueryDefaults(null==e?void 0:e.queryKey),e,{_defaulted:!0});return!t.queryHash&&t.queryKey&&(t.queryHash=(0,a.F$)(t.queryKey,t)),t},t.defaultQueryObserverOptions=function(e){return this.defaultQueryOptions(e)},t.defaultMutationOptions=function(e){return(null==e?void 0:e._defaulted)?e:(0,r.A)({},this.defaultOptions.mutations,this.getMutationDefaults(null==e?void 0:e.mutationKey),e,{_defaulted:!0})},t.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},e}()},281:(e,t,n)=>{"use strict";n.d(t,{dd:()=>s,eJ:()=>c,wm:()=>u});var r=n(289),a=n(622),o=n(941);function i(e){return Math.min(1e3*Math.pow(2,e),3e4)}function s(e){return"function"==typeof(null==e?void 0:e.cancel)}var l=function(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent};function u(e){return e instanceof l}var c=function(e){var t,n,u,c,m=this,d=!1;this.abort=e.abort,this.cancel=function(e){return null==t?void 0:t(e)},this.cancelRetry=function(){d=!0},this.continueRetry=function(){d=!1},this.continue=function(){return null==n?void 0:n()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise((function(e,t){u=e,c=t}));var p=function(t){m.isResolved||(m.isResolved=!0,null==e.onSuccess||e.onSuccess(t),null==n||n(),u(t))},f=function(t){m.isResolved||(m.isResolved=!0,null==e.onError||e.onError(t),null==n||n(),c(t))};!function u(){if(!m.isResolved){var c;try{c=e.fn()}catch(e){c=Promise.reject(e)}t=function(e){if(!m.isResolved&&(f(new l(e)),null==m.abort||m.abort(),s(c)))try{c.cancel()}catch(e){}},m.isTransportCancelable=s(c),Promise.resolve(c).then(p).catch((function(t){var s,l;if(!m.isResolved){var c=null!=(s=e.retry)?s:3,p=null!=(l=e.retryDelay)?l:i,h="function"==typeof p?p(m.failureCount,t):p,v=!0===c||"number"==typeof c&&m.failureCount<c||"function"==typeof c&&c(m.failureCount,t);!d&&v?(m.failureCount++,null==e.onFail||e.onFail(m.failureCount,t),(0,o.yy)(h).then((function(){if(!r.m.isFocused()||!a.t.isOnline())return new Promise((function(t){n=t,m.isPaused=!0,null==e.onPause||e.onPause()})).then((function(){n=void 0,m.isPaused=!1,null==e.onContinue||e.onContinue()}))})).then((function(){d?f(t):u()}))):f(t)}}))}}()}},287:(e,t,n)=>{"use strict";n.d(t,{Q:()=>r});var r=function(){function e(){this.listeners=[]}var t=e.prototype;return t.subscribe=function(e){var t=this,n=e||function(){};return this.listeners.push(n),this.onSubscribe(),function(){t.listeners=t.listeners.filter((function(e){return e!==n})),t.onUnsubscribe()}},t.hasListeners=function(){return this.listeners.length>0},t.onSubscribe=function(){},t.onUnsubscribe=function(){},e}()},449:()=>{},941:(e,t,n)=>{"use strict";n.d(t,{BH:()=>E,Cp:()=>y,F$:()=>h,G6:()=>k,GR:()=>m,HN:()=>l,MK:()=>p,Od:()=>v,S$:()=>a,Zw:()=>i,b_:()=>d,f8:()=>b,gn:()=>s,j3:()=>u,jY:()=>T,lQ:()=>o,nJ:()=>f,vh:()=>c,yy:()=>C});var r=n(168),a="undefined"==typeof window;function o(){}function i(e,t){return"function"==typeof e?e(t):e}function s(e){return"number"==typeof e&&e>=0&&e!==1/0}function l(e){return Array.isArray(e)?e:[e]}function u(e,t){return Math.max(e+(t||0)-Date.now(),0)}function c(e,t,n){return S(e)?"function"==typeof t?(0,r.A)({},n,{queryKey:e,queryFn:t}):(0,r.A)({},t,{queryKey:e}):e}function m(e,t,n){return S(e)?"function"==typeof t?(0,r.A)({},n,{mutationKey:e,mutationFn:t}):(0,r.A)({},t,{mutationKey:e}):"function"==typeof e?(0,r.A)({},t,{mutationFn:e}):(0,r.A)({},e)}function d(e,t,n){return S(e)?[(0,r.A)({},t,{queryKey:e}),n]:[e||{},t]}function p(e,t){var n=e.active,r=e.exact,a=e.fetching,o=e.inactive,i=e.predicate,s=e.queryKey,l=e.stale;if(S(s))if(r){if(t.queryHash!==h(s,t.options))return!1}else if(!y(t.queryKey,s))return!1;var u=function(e,t){return!0===e&&!0===t||null==e&&null==t?"all":!1===e&&!1===t?"none":(null!=e?e:!t)?"active":"inactive"}(n,o);if("none"===u)return!1;if("all"!==u){var c=t.isActive();if("active"===u&&!c)return!1;if("inactive"===u&&c)return!1}return!("boolean"==typeof l&&t.isStale()!==l||"boolean"==typeof a&&t.isFetching()!==a||i&&!i(t))}function f(e,t){var n=e.exact,r=e.fetching,a=e.predicate,o=e.mutationKey;if(S(o)){if(!t.options.mutationKey)return!1;if(n){if(v(t.options.mutationKey)!==v(o))return!1}else if(!y(t.options.mutationKey,o))return!1}return!("boolean"==typeof r&&"loading"===t.state.status!==r||a&&!a(t))}function h(e,t){return((null==t?void 0:t.queryKeyHashFn)||v)(e)}function v(e){var t;return t=l(e),JSON.stringify(t,(function(e,t){return _(t)?Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{}):t}))}function y(e,t){return g(l(e),l(t))}function g(e,t){return e===t||typeof e==typeof t&&!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((function(n){return!g(e[n],t[n])}))}function E(e,t){if(e===t)return e;var n=Array.isArray(e)&&Array.isArray(t);if(n||_(e)&&_(t)){for(var r=n?e.length:Object.keys(e).length,a=n?t:Object.keys(t),o=a.length,i=n?[]:{},s=0,l=0;l<o;l++){var u=n?l:a[l];i[u]=E(e[u],t[u]),i[u]===e[u]&&s++}return r===o&&s===r?e:i}return t}function b(e,t){if(e&&!t||t&&!e)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}function _(e){if(!w(e))return!1;var t=e.constructor;if(void 0===t)return!0;var n=t.prototype;return!!w(n)&&!!n.hasOwnProperty("isPrototypeOf")}function w(e){return"[object Object]"===Object.prototype.toString.call(e)}function S(e){return"string"==typeof e||Array.isArray(e)}function C(e){return new Promise((function(t){setTimeout(t,e)}))}function k(e){Promise.resolve().then(e).catch((function(e){return setTimeout((function(){throw e}))}))}function T(){if("function"==typeof AbortController)return new AbortController}},942:(e,t,n)=>{"use strict";n.d(t,{QueryClient:()=>r.QueryClient,QueryClientProvider:()=>a.QueryClientProvider,useMutation:()=>a.useMutation,useQuery:()=>a.useQuery,useQueryClient:()=>a.useQueryClient});var r=n(468);n.o(r,"QueryClientProvider")&&n.d(t,{QueryClientProvider:function(){return r.QueryClientProvider}}),n.o(r,"useMutation")&&n.d(t,{useMutation:function(){return r.useMutation}}),n.o(r,"useQuery")&&n.d(t,{useQuery:function(){return r.useQuery}}),n.o(r,"useQueryClient")&&n.d(t,{useQueryClient:function(){return r.useQueryClient}});var a=n(960)},360:(e,t,n)=>{"use strict";n.d(t,{H:()=>u,j:()=>l});var r=n(609),a=n.n(r),o=a().createContext(void 0),i=a().createContext(!1);function s(e){return e&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=o),window.ReactQueryClientContext):o}var l=function(){var e=a().useContext(s(a().useContext(i)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},u=function(e){var t=e.client,n=e.contextSharing,r=void 0!==n&&n,o=e.children;a().useEffect((function(){return t.mount(),function(){t.unmount()}}),[t]);var l=s(r);return a().createElement(i.Provider,{value:r},a().createElement(l.Provider,{value:t},o))}},960:(e,t,n)=>{"use strict";n.d(t,{QueryClientProvider:()=>l.H,useMutation:()=>u.n,useQuery:()=>c.I,useQueryClient:()=>l.j});var r=n(428),a=n(795),o=n.n(a)().unstable_batchedUpdates;r.j.setBatchNotifyFunction(o);var i=n(690),s=console;(0,i.B)(s);var l=n(360),u=n(990),c=n(584)},990:(e,t,n)=>{"use strict";n.d(t,{n:()=>p});var r=n(168),a=n(609),o=n.n(a),i=n(428),s=n(941),l=n(540),u=n(465),c=function(e){function t(t,n){var r;return(r=e.call(this)||this).client=t,r.setOptions(n),r.bindMethods(),r.updateResult(),r}(0,l.A)(t,e);var n=t.prototype;return n.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},n.setOptions=function(e){this.options=this.client.defaultMutationOptions(e)},n.onUnsubscribe=function(){var e;this.listeners.length||null==(e=this.currentMutation)||e.removeObserver(this)},n.onMutationUpdate=function(e){this.updateResult();var t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)},n.getCurrentResult=function(){return this.currentResult},n.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},n.mutate=function(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,(0,r.A)({},this.options,{variables:void 0!==e?e:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},n.updateResult=function(){var e=this.currentMutation?this.currentMutation.state:(0,u.$)(),t=(0,r.A)({},e,{isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset});this.currentResult=t},n.notify=function(e){var t=this;i.j.batch((function(){t.mutateOptions&&(e.onSuccess?(null==t.mutateOptions.onSuccess||t.mutateOptions.onSuccess(t.currentResult.data,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(t.currentResult.data,null,t.currentResult.variables,t.currentResult.context)):e.onError&&(null==t.mutateOptions.onError||t.mutateOptions.onError(t.currentResult.error,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(void 0,t.currentResult.error,t.currentResult.variables,t.currentResult.context))),e.listeners&&t.listeners.forEach((function(e){e(t.currentResult)}))}))},t}(n(287).Q),m=n(360),d=n(439);function p(e,t,n){var a=o().useRef(!1),l=o().useState(0)[1],u=(0,s.GR)(e,t,n),p=(0,m.j)(),f=o().useRef();f.current?f.current.setOptions(u):f.current=new c(p,u);var h=f.current.getCurrentResult();o().useEffect((function(){a.current=!0;var e=f.current.subscribe(i.j.batchCalls((function(){a.current&&l((function(e){return e+1}))})));return function(){a.current=!1,e()}}),[]);var v=o().useCallback((function(e,t){f.current.mutate(e,t).catch(s.lQ)}),[]);if(h.error&&(0,d.G)(void 0,f.current.options.useErrorBoundary,[h.error]))throw h.error;return(0,r.A)({},h,{mutate:v,mutateAsync:h.mutate})}},584:(e,t,n)=>{"use strict";n.d(t,{I:()=>S});var r=n(168),a=n(540),o=n(941),i=n(428),s=n(289),l=n(287),u=n(690),c=n(281),m=function(e){function t(t,n){var r;return(r=e.call(this)||this).client=t,r.options=n,r.trackedProps=[],r.selectError=null,r.bindMethods(),r.setOptions(n),r}(0,a.A)(t,e);var n=t.prototype;return n.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},n.onSubscribe=function(){1===this.listeners.length&&(this.currentQuery.addObserver(this),d(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},n.onUnsubscribe=function(){this.listeners.length||this.destroy()},n.shouldFetchOnReconnect=function(){return p(this.currentQuery,this.options,this.options.refetchOnReconnect)},n.shouldFetchOnWindowFocus=function(){return p(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},n.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},n.setOptions=function(e,t){var n=this.options,r=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled)throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();var a=this.hasListeners();a&&f(this.currentQuery,r,this.options,n)&&this.executeFetch(),this.updateResult(t),!a||this.currentQuery===r&&this.options.enabled===n.enabled&&this.options.staleTime===n.staleTime||this.updateStaleTimeout();var o=this.computeRefetchInterval();!a||this.currentQuery===r&&this.options.enabled===n.enabled&&o===this.currentRefetchInterval||this.updateRefetchInterval(o)},n.getOptimisticResult=function(e){var t=this.client.defaultQueryObserverOptions(e),n=this.client.getQueryCache().build(this.client,t);return this.createResult(n,t)},n.getCurrentResult=function(){return this.currentResult},n.trackResult=function(e,t){var n=this,r={},a=function(e){n.trackedProps.includes(e)||n.trackedProps.push(e)};return Object.keys(e).forEach((function(t){Object.defineProperty(r,t,{configurable:!1,enumerable:!0,get:function(){return a(t),e[t]}})})),(t.useErrorBoundary||t.suspense)&&a("error"),r},n.getNextResult=function(e){var t=this;return new Promise((function(n,r){var a=t.subscribe((function(t){t.isFetching||(a(),t.isError&&(null==e?void 0:e.throwOnError)?r(t.error):n(t))}))}))},n.getCurrentQuery=function(){return this.currentQuery},n.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},n.refetch=function(e){return this.fetch((0,r.A)({},e,{meta:{refetchPage:null==e?void 0:e.refetchPage}}))},n.fetchOptimistic=function(e){var t=this,n=this.client.defaultQueryObserverOptions(e),r=this.client.getQueryCache().build(this.client,n);return r.fetch().then((function(){return t.createResult(r,n)}))},n.fetch=function(e){var t=this;return this.executeFetch(e).then((function(){return t.updateResult(),t.currentResult}))},n.executeFetch=function(e){this.updateQuery();var t=this.currentQuery.fetch(this.options,e);return(null==e?void 0:e.throwOnError)||(t=t.catch(o.lQ)),t},n.updateStaleTimeout=function(){var e=this;if(this.clearStaleTimeout(),!o.S$&&!this.currentResult.isStale&&(0,o.gn)(this.options.staleTime)){var t=(0,o.j3)(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout((function(){e.currentResult.isStale||e.updateResult()}),t)}},n.computeRefetchInterval=function(){var e;return"function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(e=this.options.refetchInterval)&&e},n.updateRefetchInterval=function(e){var t=this;this.clearRefetchInterval(),this.currentRefetchInterval=e,!o.S$&&!1!==this.options.enabled&&(0,o.gn)(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval((function(){(t.options.refetchIntervalInBackground||s.m.isFocused())&&t.executeFetch()}),this.currentRefetchInterval))},n.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},n.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},n.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},n.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},n.createResult=function(e,t){var n,r=this.currentQuery,a=this.options,i=this.currentResult,s=this.currentResultState,l=this.currentResultOptions,c=e!==r,m=c?e.state:this.currentQueryInitialState,p=c?this.currentResult:this.previousQueryResult,v=e.state,y=v.dataUpdatedAt,g=v.error,E=v.errorUpdatedAt,b=v.isFetching,_=v.status,w=!1,S=!1;if(t.optimisticResults){var C=this.hasListeners(),k=!C&&d(e,t),T=C&&f(e,r,t,a);(k||T)&&(b=!0,y||(_="loading"))}if(t.keepPreviousData&&!v.dataUpdateCount&&(null==p?void 0:p.isSuccess)&&"error"!==_)n=p.data,y=p.dataUpdatedAt,_=p.status,w=!0;else if(t.select&&void 0!==v.data)if(i&&v.data===(null==s?void 0:s.data)&&t.select===this.selectFn)n=this.selectResult;else try{this.selectFn=t.select,n=t.select(v.data),!1!==t.structuralSharing&&(n=(0,o.BH)(null==i?void 0:i.data,n)),this.selectResult=n,this.selectError=null}catch(e){(0,u.t)().error(e),this.selectError=e}else n=v.data;if(void 0!==t.placeholderData&&void 0===n&&("loading"===_||"idle"===_)){var O;if((null==i?void 0:i.isPlaceholderData)&&t.placeholderData===(null==l?void 0:l.placeholderData))O=i.data;else if(O="function"==typeof t.placeholderData?t.placeholderData():t.placeholderData,t.select&&void 0!==O)try{O=t.select(O),!1!==t.structuralSharing&&(O=(0,o.BH)(null==i?void 0:i.data,O)),this.selectError=null}catch(e){(0,u.t)().error(e),this.selectError=e}void 0!==O&&(_="success",n=O,S=!0)}return this.selectError&&(g=this.selectError,n=this.selectResult,E=Date.now(),_="error"),{status:_,isLoading:"loading"===_,isSuccess:"success"===_,isError:"error"===_,isIdle:"idle"===_,data:n,dataUpdatedAt:y,error:g,errorUpdatedAt:E,failureCount:v.fetchFailureCount,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>m.dataUpdateCount||v.errorUpdateCount>m.errorUpdateCount,isFetching:b,isRefetching:b&&"loading"!==_,isLoadingError:"error"===_&&0===v.dataUpdatedAt,isPlaceholderData:S,isPreviousData:w,isRefetchError:"error"===_&&0!==v.dataUpdatedAt,isStale:h(e,t),refetch:this.refetch,remove:this.remove}},n.shouldNotifyListeners=function(e,t){if(!t)return!0;var n=this.options,r=n.notifyOnChangeProps,a=n.notifyOnChangePropsExclusions;if(!r&&!a)return!0;if("tracked"===r&&!this.trackedProps.length)return!0;var o="tracked"===r?this.trackedProps:r;return Object.keys(e).some((function(n){var r=n,i=e[r]!==t[r],s=null==o?void 0:o.some((function(e){return e===n})),l=null==a?void 0:a.some((function(e){return e===n}));return i&&!l&&(!o||s)}))},n.updateResult=function(e){var t=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!(0,o.f8)(this.currentResult,t)){var n={cache:!0};!1!==(null==e?void 0:e.listeners)&&this.shouldNotifyListeners(this.currentResult,t)&&(n.listeners=!0),this.notify((0,r.A)({},n,e))}},n.updateQuery=function(){var e=this.client.getQueryCache().build(this.client,this.options);if(e!==this.currentQuery){var t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}},n.onQueryUpdate=function(e){var t={};"success"===e.type?t.onSuccess=!0:"error"!==e.type||(0,c.wm)(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()},n.notify=function(e){var t=this;i.j.batch((function(){e.onSuccess?(null==t.options.onSuccess||t.options.onSuccess(t.currentResult.data),null==t.options.onSettled||t.options.onSettled(t.currentResult.data,null)):e.onError&&(null==t.options.onError||t.options.onError(t.currentResult.error),null==t.options.onSettled||t.options.onSettled(void 0,t.currentResult.error)),e.listeners&&t.listeners.forEach((function(e){e(t.currentResult)})),e.cache&&t.client.getQueryCache().notify({query:t.currentQuery,type:"observerResultsUpdated"})}))},t}(l.Q);function d(e,t){return function(e,t){return!(!1===t.enabled||e.state.dataUpdatedAt||"error"===e.state.status&&!1===t.retryOnMount)}(e,t)||e.state.dataUpdatedAt>0&&p(e,t,t.refetchOnMount)}function p(e,t,n){if(!1!==t.enabled){var r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&h(e,t)}return!1}function f(e,t,n,r){return!1!==n.enabled&&(e!==t||!1===r.enabled)&&(!n.suspense||"error"!==e.state.status)&&h(e,n)}function h(e,t){return e.isStaleByTime(t.staleTime)}var v=n(609),y=n.n(v);var g,E=y().createContext((g=!1,{clearReset:function(){g=!1},reset:function(){g=!0},isReset:function(){return g}})),b=function(){return y().useContext(E)},_=n(360),w=n(439);function S(e,t,n){return function(e,t){var n=y().useRef(!1),r=y().useState(0)[1],a=(0,_.j)(),o=b(),s=a.defaultQueryObserverOptions(e);s.optimisticResults=!0,s.onError&&(s.onError=i.j.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=i.j.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=i.j.batchCalls(s.onSettled)),s.suspense&&("number"!=typeof s.staleTime&&(s.staleTime=1e3),0===s.cacheTime&&(s.cacheTime=1)),(s.suspense||s.useErrorBoundary)&&(o.isReset()||(s.retryOnMount=!1));var l=y().useState((function(){return new t(a,s)}))[0],u=l.getOptimisticResult(s);if(y().useEffect((function(){n.current=!0,o.clearReset();var e=l.subscribe(i.j.batchCalls((function(){n.current&&r((function(e){return e+1}))})));return l.updateResult(),function(){n.current=!1,e()}}),[o,l]),y().useEffect((function(){l.setOptions(s,{listeners:!1})}),[s,l]),s.suspense&&u.isLoading)throw l.fetchOptimistic(s).then((function(e){var t=e.data;null==s.onSuccess||s.onSuccess(t),null==s.onSettled||s.onSettled(t,null)})).catch((function(e){o.clearReset(),null==s.onError||s.onError(e),null==s.onSettled||s.onSettled(void 0,e)}));if(u.isError&&!o.isReset()&&!u.isFetching&&(0,w.G)(s.suspense,s.useErrorBoundary,[u.error,l.getCurrentQuery()]))throw u.error;return"tracked"===s.notifyOnChangeProps&&(u=l.trackResult(u,s)),u}((0,o.vh)(e,t,n),m)}},439:(e,t,n)=>{"use strict";function r(e,t,n){return"function"==typeof t?t.apply(void 0,n):"boolean"==typeof t?t:!!e}n.d(t,{G:()=>r})},609:e=>{"use strict";e.exports=window.React},795:e=>{"use strict";e.exports=window.ReactDOM},168:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{A:()=>r})},540:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,{A:()=>a})}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.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.r(e),n.d(e,{hasBrowserEnv:()=>ae,hasStandardBrowserEnv:()=>oe,hasStandardBrowserWebWorkerEnv:()=>se});var t=n(609);const r=window.wp.components;function a(e){const n={display:e.display?e.display:"block",maxWidth:e.width?e.width:"350px"};return(0,t.createElement)("div",{style:n},(0,t.createElement)("label",{style:{display:"block",fontSize:"11px",textTransform:"uppercase"}},e.label),(0,t.createElement)("select",{value:e.value,onChange:t=>e.onChange(t.target.value)},e.options.map((e=>(0,t.createElement)("option",{value:e.value},e.label)))))}function o(e,t){return function(){return e.apply(t,arguments)}}const{toString:i}=Object.prototype,{getPrototypeOf:s}=Object,l=(u=Object.create(null),e=>{const t=i.call(e);return u[t]||(u[t]=t.slice(8,-1).toLowerCase())});var u;const c=e=>(e=e.toLowerCase(),t=>l(t)===e),m=e=>t=>typeof t===e,{isArray:d}=Array,p=m("undefined"),f=c("ArrayBuffer"),h=m("string"),v=m("function"),y=m("number"),g=e=>null!==e&&"object"==typeof e,E=e=>{if("object"!==l(e))return!1;const t=s(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},b=c("Date"),_=c("File"),w=c("Blob"),S=c("FileList"),C=c("URLSearchParams");function k(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,a;if("object"!=typeof e&&(e=[e]),d(e))for(r=0,a=e.length;r<a;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let i;for(r=0;r<o;r++)i=a[r],t.call(null,e[i],i,e)}}function T(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,a=n.length;for(;a-- >0;)if(r=n[a],t===r.toLowerCase())return r;return null}const O="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,A=e=>!p(e)&&e!==O,R=(P="undefined"!=typeof Uint8Array&&s(Uint8Array),e=>P&&e instanceof P);var P;const x=c("HTMLFormElement"),D=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),N=c("RegExp"),M=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};k(n,((n,a)=>{let o;!1!==(o=t(n,a,e))&&(r[a]=o||n)})),Object.defineProperties(e,r)},F="abcdefghijklmnopqrstuvwxyz",L="0123456789",j={DIGIT:L,ALPHA:F,ALPHA_DIGIT:F+F.toUpperCase()+L},I=c("AsyncFunction"),U={isArray:d,isArrayBuffer:f,isBuffer:function(e){return null!==e&&!p(e)&&null!==e.constructor&&!p(e.constructor)&&v(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||v(e.append)&&("formdata"===(t=l(e))||"object"===t&&v(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&f(e.buffer),t},isString:h,isNumber:y,isBoolean:e=>!0===e||!1===e,isObject:g,isPlainObject:E,isUndefined:p,isDate:b,isFile:_,isBlob:w,isRegExp:N,isFunction:v,isStream:e=>g(e)&&v(e.pipe),isURLSearchParams:C,isTypedArray:R,isFileList:S,forEach:k,merge:function e(){const{caseless:t}=A(this)&&this||{},n={},r=(r,a)=>{const o=t&&T(n,a)||a;E(n[o])&&E(r)?n[o]=e(n[o],r):E(r)?n[o]=e({},r):d(r)?n[o]=r.slice():n[o]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&k(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(k(t,((t,r)=>{n&&v(t)?e[r]=o(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let a,o,i;const l={};if(t=t||{},null==e)return t;do{for(a=Object.getOwnPropertyNames(e),o=a.length;o-- >0;)i=a[o],r&&!r(i,e,t)||l[i]||(t[i]=e[i],l[i]=!0);e=!1!==n&&s(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:l,kindOfTest:c,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(d(e))return e;let t=e.length;if(!y(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:x,hasOwnProperty:D,hasOwnProp:D,reduceDescriptors:M,freezeMethods:e=>{M(e,((t,n)=>{if(v(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];v(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return d(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:T,global:O,isContextDefined:A,ALPHABET:j,generateString:(e=16,t=j.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&v(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(g(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const a=d(e)?[]:{};return k(e,((e,t)=>{const o=n(e,r+1);!p(o)&&(a[t]=o)})),t[r]=void 0,a}}return e};return n(e,0)},isAsyncFn:I,isThenable:e=>e&&(g(e)||v(e))&&v(e.then)&&v(e.catch)};function Q(e,t,n,r,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),a&&(this.response=a)}U.inherits(Q,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:U.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const q=Q.prototype,K={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{K[e]={value:e}})),Object.defineProperties(Q,K),Object.defineProperty(q,"isAxiosError",{value:!0}),Q.from=(e,t,n,r,a,o)=>{const i=Object.create(q);return U.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),Q.call(i,e.message,t,n,r,a),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};const B=Q;function H(e){return U.isPlainObject(e)||U.isArray(e)}function V(e){return U.endsWith(e,"[]")?e.slice(0,-2):e}function z(e,t,n){return e?e.concat(t).map((function(e,t){return e=V(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const G=U.toFlatObject(U,{},null,(function(e){return/^is[A-Z]/.test(e)})),W=function(e,t,n){if(!U.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=U.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!U.isUndefined(t[e])}))).metaTokens,a=n.visitor||u,o=n.dots,i=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&U.isSpecCompliantForm(t);if(!U.isFunction(a))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(U.isDate(e))return e.toISOString();if(!s&&U.isBlob(e))throw new B("Blob is not supported. Use a Buffer instead.");return U.isArrayBuffer(e)||U.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,a){let s=e;if(e&&!a&&"object"==typeof e)if(U.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(U.isArray(e)&&function(e){return U.isArray(e)&&!e.some(H)}(e)||(U.isFileList(e)||U.endsWith(n,"[]"))&&(s=U.toArray(e)))return n=V(n),s.forEach((function(e,r){!U.isUndefined(e)&&null!==e&&t.append(!0===i?z([n],r,o):null===i?n:n+"[]",l(e))})),!1;return!!H(e)||(t.append(z(a,n,o),l(e)),!1)}const c=[],m=Object.assign(G,{defaultVisitor:u,convertValue:l,isVisitable:H});if(!U.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!U.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+r.join("."));c.push(n),U.forEach(n,(function(n,o){!0===(!(U.isUndefined(n)||null===n)&&a.call(t,n,U.isString(o)?o.trim():o,r,m))&&e(n,r?r.concat(o):[o])})),c.pop()}}(e),t};function $(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Y(e,t){this._pairs=[],e&&W(e,this,t)}const J=Y.prototype;J.append=function(e,t){this._pairs.push([e,t])},J.toString=function(e){const t=e?function(t){return e.call(this,t,$)}:$;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const X=Y;function Z(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ee(e,t,n){if(!t)return e;const r=n&&n.encode||Z,a=n&&n.serialize;let o;if(o=a?a(t,n):U.isURLSearchParams(t)?t.toString():new X(t,n).toString(r),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}const te=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){U.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ne={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},re={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:X,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},ae="undefined"!=typeof window&&"undefined"!=typeof document,oe=(ie="undefined"!=typeof navigator&&navigator.product,ae&&["ReactNative","NativeScript","NS"].indexOf(ie)<0);var ie;const se="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,le={...e,...re},ue=function(e){function t(e,n,r,a){let o=e[a++];if("__proto__"===o)return!0;const i=Number.isFinite(+o),s=a>=e.length;return o=!o&&U.isArray(r)?r.length:o,s?(U.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!i):(r[o]&&U.isObject(r[o])||(r[o]=[]),t(e,n,r[o],a)&&U.isArray(r[o])&&(r[o]=function(e){const t={},n=Object.keys(e);let r;const a=n.length;let o;for(r=0;r<a;r++)o=n[r],t[o]=e[o];return t}(r[o])),!i)}if(U.isFormData(e)&&U.isFunction(e.entries)){const n={};return U.forEachEntry(e,((e,r)=>{t(function(e){return U.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null},ce={transitional:ne,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,a=U.isObject(e);if(a&&U.isHTMLForm(e)&&(e=new FormData(e)),U.isFormData(e))return r?JSON.stringify(ue(e)):e;if(U.isArrayBuffer(e)||U.isBuffer(e)||U.isStream(e)||U.isFile(e)||U.isBlob(e))return e;if(U.isArrayBufferView(e))return e.buffer;if(U.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return W(e,new le.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return le.isNode&&U.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=U.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return W(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return a||r?(t.setContentType("application/json",!1),function(e,t,n){if(U.isString(e))try{return(0,JSON.parse)(e),U.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ce.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&U.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw B.from(e,B.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:le.classes.FormData,Blob:le.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};U.forEach(["delete","get","head","post","put","patch"],(e=>{ce.headers[e]={}}));const me=ce,de=U.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),pe=Symbol("internals");function fe(e){return e&&String(e).trim().toLowerCase()}function he(e){return!1===e||null==e?e:U.isArray(e)?e.map(he):String(e)}function ve(e,t,n,r,a){return U.isFunction(r)?r.call(this,t,n):(a&&(t=n),U.isString(t)?U.isString(r)?-1!==t.indexOf(r):U.isRegExp(r)?r.test(t):void 0:void 0)}class ye{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function a(e,t,n){const a=fe(t);if(!a)throw new Error("header name must be a non-empty string");const o=U.findKey(r,a);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||t]=he(e))}const o=(e,t)=>U.forEach(e,((e,n)=>a(e,n,t)));return U.isPlainObject(e)||e instanceof this.constructor?o(e,t):U.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?o((e=>{const t={};let n,r,a;return e&&e.split("\n").forEach((function(e){a=e.indexOf(":"),n=e.substring(0,a).trim().toLowerCase(),r=e.substring(a+1).trim(),!n||t[n]&&de[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&a(t,e,n),this}get(e,t){if(e=fe(e)){const n=U.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(U.isFunction(t))return t.call(this,e,n);if(U.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=fe(e)){const n=U.findKey(this,e);return!(!n||void 0===this[n]||t&&!ve(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function a(e){if(e=fe(e)){const a=U.findKey(n,e);!a||t&&!ve(0,n[a],a,t)||(delete n[a],r=!0)}}return U.isArray(e)?e.forEach(a):a(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const a=t[n];e&&!ve(0,this[a],a,e,!0)||(delete this[a],r=!0)}return r}normalize(e){const t=this,n={};return U.forEach(this,((r,a)=>{const o=U.findKey(n,a);if(o)return t[o]=he(r),void delete t[a];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(a):String(a).trim();i!==a&&delete t[a],t[i]=he(r),n[i]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return U.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&U.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[pe]=this[pe]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=fe(e);t[r]||(function(e,t){const n=U.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,a){return this[r].call(this,t,e,n,a)},configurable:!0})}))}(n,e),t[r]=!0)}return U.isArray(e)?e.forEach(r):r(e),this}}ye.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),U.reduceDescriptors(ye.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),U.freezeMethods(ye);const ge=ye;function Ee(e,t){const n=this||me,r=t||n,a=ge.from(r.headers);let o=r.data;return U.forEach(e,(function(e){o=e.call(n,o,a.normalize(),t?t.status:void 0)})),a.normalize(),o}function be(e){return!(!e||!e.__CANCEL__)}function _e(e,t,n){B.call(this,null==e?"canceled":e,B.ERR_CANCELED,t,n),this.name="CanceledError"}U.inherits(_e,B,{__CANCEL__:!0});const we=_e,Se=le.hasStandardBrowserEnv?{write(e,t,n,r,a,o){const i=[e+"="+encodeURIComponent(t)];U.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),U.isString(r)&&i.push("path="+r),U.isString(a)&&i.push("domain="+a),!0===o&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Ce(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const ke=le.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=U.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function Te(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a,o=0,i=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),u=r[i];a||(a=l),n[o]=s,r[o]=l;let c=i,m=0;for(;c!==o;)m+=n[c++],c%=e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),l-a<t)return;const d=u&&l-u;return d?Math.round(1e3*m/d):void 0}}(50,250);return a=>{const o=a.loaded,i=a.lengthComputable?a.total:void 0,s=o-n,l=r(s);n=o;const u={loaded:o,total:i,progress:i?o/i:void 0,bytes:s,rate:l||void 0,estimated:l&&i&&o<=i?(i-o)/l:void 0,event:a};u[t?"download":"upload"]=!0,e(u)}}const Oe={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const a=ge.from(e.headers).normalize();let o,i,{responseType:s,withXSRFToken:l}=e;function u(){e.cancelToken&&e.cancelToken.unsubscribe(o),e.signal&&e.signal.removeEventListener("abort",o)}if(U.isFormData(r))if(le.hasStandardBrowserEnv||le.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if(!1!==(i=a.getContentType())){const[e,...t]=i?i.split(";").map((e=>e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}let c=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(t+":"+n))}const m=Ce(e.baseURL,e.url);function d(){if(!c)return;const r=ge.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new B("Request failed with status code "+n.status,[B.ERR_BAD_REQUEST,B.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),u()}),(function(e){n(e),u()}),{data:s&&"text"!==s&&"json"!==s?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:e,request:c}),c=null}if(c.open(e.method.toUpperCase(),ee(m,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=d:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(d)},c.onabort=function(){c&&(n(new B("Request aborted",B.ECONNABORTED,e,c)),c=null)},c.onerror=function(){n(new B("Network Error",B.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||ne;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new B(t,r.clarifyTimeoutError?B.ETIMEDOUT:B.ECONNABORTED,e,c)),c=null},le.hasStandardBrowserEnv&&(l&&U.isFunction(l)&&(l=l(e)),l||!1!==l&&ke(m))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&Se.read(e.xsrfCookieName);t&&a.set(e.xsrfHeaderName,t)}void 0===r&&a.setContentType(null),"setRequestHeader"in c&&U.forEach(a.toJSON(),(function(e,t){c.setRequestHeader(t,e)})),U.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),s&&"json"!==s&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",Te(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",Te(e.onUploadProgress)),(e.cancelToken||e.signal)&&(o=t=>{c&&(n(!t||t.type?new we(null,e,c):t),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(o),e.signal&&(e.signal.aborted?o():e.signal.addEventListener("abort",o)));const p=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(m);p&&-1===le.protocols.indexOf(p)?n(new B("Unsupported protocol "+p+":",B.ERR_BAD_REQUEST,e)):c.send(r||null)}))}};U.forEach(Oe,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Ae=e=>`- ${e}`,Re=e=>U.isFunction(e)||null===e||!1===e,Pe=e=>{e=U.isArray(e)?e:[e];const{length:t}=e;let n,r;const a={};for(let o=0;o<t;o++){let t;if(n=e[o],r=n,!Re(n)&&(r=Oe[(t=String(n)).toLowerCase()],void 0===r))throw new B(`Unknown adapter '${t}'`);if(r)break;a[t||"#"+o]=r}if(!r){const e=Object.entries(a).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(Ae).join("\n"):" "+Ae(e[0]):"as no adapter specified";throw new B("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function xe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new we(null,e)}function De(e){return xe(e),e.headers=ge.from(e.headers),e.data=Ee.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Pe(e.adapter||me.adapter)(e).then((function(t){return xe(e),t.data=Ee.call(e,e.transformResponse,t),t.headers=ge.from(t.headers),t}),(function(t){return be(t)||(xe(e),t&&t.response&&(t.response.data=Ee.call(e,e.transformResponse,t.response),t.response.headers=ge.from(t.response.headers))),Promise.reject(t)}))}const Ne=e=>e instanceof ge?{...e}:e;function Me(e,t){t=t||{};const n={};function r(e,t,n){return U.isPlainObject(e)&&U.isPlainObject(t)?U.merge.call({caseless:n},e,t):U.isPlainObject(t)?U.merge({},t):U.isArray(t)?t.slice():t}function a(e,t,n){return U.isUndefined(t)?U.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function o(e,t){if(!U.isUndefined(t))return r(void 0,t)}function i(e,t){return U.isUndefined(t)?U.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,a,o){return o in t?r(n,a):o in e?r(void 0,n):void 0}const l={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:(e,t)=>a(Ne(e),Ne(t),!0)};return U.forEach(Object.keys(Object.assign({},e,t)),(function(r){const o=l[r]||a,i=o(e[r],t[r],r);U.isUndefined(i)&&o!==s||(n[r]=i)})),n}const Fe={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Fe[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Le={};Fe.transitional=function(e,t,n){function r(e,t){return"[Axios v1.6.8] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,a,o)=>{if(!1===e)throw new B(r(a," has been removed"+(t?" in "+t:"")),B.ERR_DEPRECATED);return t&&!Le[a]&&(Le[a]=!0,console.warn(r(a," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,a,o)}};const je={assertOptions:function(e,t,n){if("object"!=typeof e)throw new B("options must be an object",B.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const o=r[a],i=t[o];if(i){const t=e[o],n=void 0===t||i(t,o,e);if(!0!==n)throw new B("option "+o+" must be "+n,B.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new B("Unknown option "+o,B.ERR_BAD_OPTION)}},validators:Fe},Ie=je.validators;class Ue{constructor(e){this.defaults=e,this.interceptors={request:new te,response:new te}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Me(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:a}=t;void 0!==n&&je.assertOptions(n,{silentJSONParsing:Ie.transitional(Ie.boolean),forcedJSONParsing:Ie.transitional(Ie.boolean),clarifyTimeoutError:Ie.transitional(Ie.boolean)},!1),null!=r&&(U.isFunction(r)?t.paramsSerializer={serialize:r}:je.assertOptions(r,{encode:Ie.function,serialize:Ie.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=a&&U.merge(a.common,a[t.method]);a&&U.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete a[e]})),t.headers=ge.concat(o,a);const i=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));const l=[];let u;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let c,m=0;if(!s){const e=[De.bind(this),void 0];for(e.unshift.apply(e,i),e.push.apply(e,l),c=e.length,u=Promise.resolve(t);m<c;)u=u.then(e[m++],e[m++]);return u}c=i.length;let d=t;for(m=0;m<c;){const e=i[m++],t=i[m++];try{d=e(d)}catch(e){t.call(this,e);break}}try{u=De.call(this,d)}catch(e){return Promise.reject(e)}for(m=0,c=l.length;m<c;)u=u.then(l[m++],l[m++]);return u}getUri(e){return ee(Ce((e=Me(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}U.forEach(["delete","get","head","options"],(function(e){Ue.prototype[e]=function(t,n){return this.request(Me(n||{},{method:e,url:t,data:(n||{}).data}))}})),U.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,a){return this.request(Me(a||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Ue.prototype[e]=t(),Ue.prototype[e+"Form"]=t(!0)}));const Qe=Ue;class qe{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,a){n.reason||(n.reason=new we(e,r,a),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new qe((function(t){e=t})),cancel:e}}}const Ke=qe,Be={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Be).forEach((([e,t])=>{Be[t]=e}));const He=Be,Ve=function e(t){const n=new Qe(t),r=o(Qe.prototype.request,n);return U.extend(r,Qe.prototype,n,{allOwnKeys:!0}),U.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Me(t,n))},r}(me);Ve.Axios=Qe,Ve.CanceledError=we,Ve.CancelToken=Ke,Ve.isCancel=be,Ve.VERSION="1.6.8",Ve.toFormData=W,Ve.AxiosError=B,Ve.Cancel=Ve.CanceledError,Ve.all=function(e){return Promise.all(e)},Ve.spread=function(e){return function(t){return e.apply(null,t)}},Ve.isAxiosError=function(e){return U.isObject(e)&&!0===e.isAxiosError},Ve.mergeConfig=Me,Ve.AxiosHeaders=ge,Ve.formToJSON=e=>ue(U.isHTMLForm(e)?new FormData(e):e),Ve.getAdapter=Pe,Ve.HttpStatusCode=He,Ve.default=Ve;const ze=Ve.create({baseURL:"/wp-json/rsvpmaker/v1/",headers:{"Content-type":"application/json","X-WP-Nonce":rsvpmaker_rest.nonce},validateStatus:function(e){return e<400}});var Ge=n(942);function We(e){const t=(0,Ge.useQueryClient)();return console.log("useRSVPDateMutation called with"),console.log("useRSVPDateMutation queryClient",t),(0,Ge.useMutation)((async function(t){return await ze.post("rsvp_event_date?event_id="+e,t)}),{onMutate:async e=>{console.log("optimistic update event",e),await t.cancelQueries(["rsvp_event_date"]);const n=t.getQueryData(["rsvp_event_date"]);return console.log("previousValue",n),t.setQueryData(["rsvp_event_date"],(t=>{const{data:n}=t;e.date&&(n.date=e.date),e.enddate&&(n.enddate=e.enddate),e.display_type&&null!=e.display_type&&(n.display_type=e.display_type),e.timezone&&(n.timezone=e.timezone),e.metaKey&&(n.meta[e.metaKey]=e.metaValue);const r={data:n};return console.log("newdata optimistic update",r),r})),console.log("updating options"),{previousValue:n}},onSettled:(e,n,r,a)=>{t.invalidateQueries(["rsvp_event_date"])},onSuccess:(e,n,r,a)=>{console.log("updated",e),t.setQueryData(["rsvp_event_date"],e),t.invalidateQueries(["rsvp_event_date"])},onError:(e,t,n)=>{console.log("update dates error",e)}})}const $e=window.wp.apiFetch;var Ye=n.n($e);window.wp.utils;const Je=window.wp.date,{__}=wp.i18n,Xe=wp.element.createElement,{DateTimePicker:Ze,TimePicker:et,RadioControl:tt,SelectControl:nt,TextControl:rt,TextareaControl:at,FormToggle:ot}=wp.components,{withSelect:it,withDispatch:st}=wp.data,{Fragment:lt}=wp.element,ut=(0,Je.getSettings)(),ct=/a(?!\\)/i.test(ut.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));function mt(){for(var e=[],n=0;n<24;n++)e.push(n);return e.map((function(e){var n,r="",a="";return n=r=e<10?"0"+e.toString():e.toString(),ct&&(e>12?(r=(e-12).toString(),a="pm"):12==e?(r=e.toString(),a="pm"):0==e?r=__("midnight","rsvpmaker"):(r=e.toString(),a="am")),(0,t.createElement)("option",{value:n},r," ",a)}))}function dt(){return(0,t.createElement)(lt,null,(0,t.createElement)("option",{value:"00"},"00"),(0,t.createElement)("option",{value:"15"},"15"),(0,t.createElement)("option",{value:"30"},"30"),(0,t.createElement)("option",{value:"45"},"45"),(0,t.createElement)("option",{value:"01"},"01"),(0,t.createElement)("option",{value:"02"},"02"),(0,t.createElement)("option",{value:"03"},"03"),(0,t.createElement)("option",{value:"04"},"04"),(0,t.createElement)("option",{value:"05"},"05"),(0,t.createElement)("option",{value:"06"},"06"),(0,t.createElement)("option",{value:"07"},"07"),(0,t.createElement)("option",{value:"08"},"08"),(0,t.createElement)("option",{value:"09"},"09"),(0,t.createElement)("option",{value:"10"},"10"),(0,t.createElement)("option",{value:"11"},"11"),(0,t.createElement)("option",{value:"12"},"12"),(0,t.createElement)("option",{value:"13"},"13"),(0,t.createElement)("option",{value:"14"},"14"),(0,t.createElement)("option",{value:"15"},"15"),(0,t.createElement)("option",{value:"16"},"16"),(0,t.createElement)("option",{value:"17"},"17"),(0,t.createElement)("option",{value:"18"},"18"),(0,t.createElement)("option",{value:"19"},"19"),(0,t.createElement)("option",{value:"20"},"20"),(0,t.createElement)("option",{value:"21"},"21"),(0,t.createElement)("option",{value:"22"},"22"),(0,t.createElement)("option",{value:"23"},"23"),(0,t.createElement)("option",{value:"24"},"24"),(0,t.createElement)("option",{value:"25"},"25"),(0,t.createElement)("option",{value:"26"},"26"),(0,t.createElement)("option",{value:"27"},"27"),(0,t.createElement)("option",{value:"28"},"28"),(0,t.createElement)("option",{value:"29"},"29"),(0,t.createElement)("option",{value:"30"},"30"),(0,t.createElement)("option",{value:"31"},"31"),(0,t.createElement)("option",{value:"32"},"32"),(0,t.createElement)("option",{value:"33"},"33"),(0,t.createElement)("option",{value:"34"},"34"),(0,t.createElement)("option",{value:"35"},"35"),(0,t.createElement)("option",{value:"36"},"36"),(0,t.createElement)("option",{value:"37"},"37"),(0,t.createElement)("option",{value:"38"},"38"),(0,t.createElement)("option",{value:"39"},"39"),(0,t.createElement)("option",{value:"40"},"40"),(0,t.createElement)("option",{value:"41"},"41"),(0,t.createElement)("option",{value:"42"},"42"),(0,t.createElement)("option",{value:"43"},"43"),(0,t.createElement)("option",{value:"44"},"44"),(0,t.createElement)("option",{value:"45"},"45"),(0,t.createElement)("option",{value:"46"},"46"),(0,t.createElement)("option",{value:"47"},"47"),(0,t.createElement)("option",{value:"48"},"48"),(0,t.createElement)("option",{value:"49"},"49"),(0,t.createElement)("option",{value:"50"},"50"),(0,t.createElement)("option",{value:"51"},"51"),(0,t.createElement)("option",{value:"52"},"52"),(0,t.createElement)("option",{value:"53"},"53"),(0,t.createElement)("option",{value:"54"},"54"),(0,t.createElement)("option",{value:"55"},"55"),(0,t.createElement)("option",{value:"56"},"56"),(0,t.createElement)("option",{value:"57"},"57"),(0,t.createElement)("option",{value:"58"},"58"),(0,t.createElement)("option",{value:"59"},"59"))}var pt=wp.compose.compose(st((function(e,t){return{setMetaValue:function(n){e("core/editor").editPost({meta:{[t.metaKey]:n}})}}})),it((function(e,t){return{metaValue:e("core/editor").getEditedPostAttribute("meta")[t.metaKey]}})))((function(e){return Xe(rt,{label:e.label,value:e.metaValue,onChange:function(t){e.setMetaValue(t)}})})),ft=wp.compose.compose(st((function(e,t){return{setMetaValue:function(n){console.log("onchange setMetaValue",n),e("core/editor").editPost({meta:{[t.metaKey]:n}})}}})),it((function(e,t){return{metaValue:e("core/editor").getEditedPostAttribute("meta")[t.metaKey]}})))((function(e){return Xe(tt,{label:e.label,selected:e.metaValue,options:e.options,onChange:function(t){console.log("onchange to",t),e.setMetaValue(t)}})})),ht=wp.compose.compose(st((function(e,t){return{setMetaValue:function(n){e("core/editor").editPost({meta:{[t.metaKey]:n}})}}})),it((function(e,t){return{metaValue:e("core/editor").getEditedPostAttribute("meta")[t.metaKey]}})))((function(e){return Xe(nt,{label:e.label,value:e.metaValue,options:e.options,onChange:function(t){e.setMetaValue(t)}})})),vt=wp.compose.compose(st((function(e,t){return{setMetaValue:function(n){e("core/editor").editPost({meta:{[t.timeKey]:n}})},setDisplay:function(n){e("core/editor").editPost({meta:{[t.statusKey]:n}})}}})),it((function(e,t){let n=e("core/editor").getEditedPostAttribute("meta")[t.timeKey];var r,a="",o="";if("Array"==n&&(n="12:00"),"string"==typeof n&&n.indexOf(":")>0)r=n.split(":");else if(r=["12","00"],"date"==t.type){var i=e("core/editor").getEditedPostAttribute("meta")._rsvp_date.split("/ :/");(s=parseInt(i[1])+1)<10&&(a="0"+s.toString()),r=[a=s.toString(),i[2]]}else{var s;a=e("core/editor").getEditedPostAttribute("meta")._sked_hour,o=e("core/editor").getEditedPostAttribute("meta")._sked_minutes,(s=parseInt(a)+1)<10&&(a="0"+s.toString()),r=[a=s.toString(),o]}return{parts:r,display:e("core/editor").getEditedPostAttribute("meta")[t.statusKey]}})))((function(e){function n(){var t,n;e.setMetaValue((void 0!==(t=document.querySelector("#endhour option:checked"))&&t||(t="12"),void 0!==(n=document.querySelector("#endminutes option:checked"))&&n||(n="00"),t.value+":"+n.value))}return void 0!==e.display&&"set"!=e.display&&e.display.search("ulti")<0?(0,t.createElement)(nt,{label:"Time Display",value:e.display,options:[{label:"End Time Not Displayed",value:""},{label:"Show End Time",value:"set"},{label:"All Day / Time Not Shown",value:"allday"},{label:"2 Days / Time Not Shown",value:"multi|2"},{label:"3 Days / Time Not Shown",value:"multi|3"},{label:"4 Days / Time Not Shown",value:"multi|4"},{label:"5 Days / Time Not Shown",value:"multi|5"},{label:"6 Days / Time Not Shown",value:"multi|6"},{label:"7 Days / Time Not Shown",value:"multi|7"}],onChange:function(t){e.setDisplay(t)}}):(0,t.createElement)("div",null,(0,t.createElement)(nt,{label:"Time Display",value:e.display,options:[{label:"End Time Not Displayed",value:""},{label:"Show End Time",value:"set"},{label:"All Day / Time Not Shown",value:"allday"},{label:"2 Days / Time Not Shown",value:"multi|2"},{label:"3 Days / Time Not Shown",value:"multi|3"},{label:"4 Days / Time Not Shown",value:"multi|4"},{label:"5 Days / Time Not Shown",value:"multi|5"},{label:"6 Days / Time Not Shown",value:"multi|6"},{label:"7 Days / Time Not Shown",value:"multi|7"}],onChange:function(t){e.setDisplay(t)}}),"End Time",(0,t.createElement)("br",null),(0,t.createElement)("select",{id:"endhour",value:e.parts[0],onChange:n},(0,t.createElement)(mt,null)),(0,t.createElement)("select",{id:"endminutes",value:e.parts[1],onChange:n},(0,t.createElement)(dt,null)))})),yt=(wp.compose.compose(st((function(e,t){return{setHour:function(t){e("core/editor").editPost({meta:{_sked_hour:t}})},setMinutes:function(t){e("core/editor").editPost({meta:{_sked_minutes:t}})}}})),it((function(e,t){return{hour:e("core/editor").getEditedPostAttribute("meta")._sked_hour,minutes:e("core/editor").getEditedPostAttribute("meta")._sked_minutes}})))((function(e){return(0,t.createElement)("div",null,"Start Time:",(0,t.createElement)("br",null),(0,t.createElement)("select",{id:"starthour",value:e.hour,onChange:e=>{setHour(e)}},(0,t.createElement)(mt,null)),(0,t.createElement)("select",{id:"startminutes",value:e.minutes,onChange:e=>{setMinutes(e)}},(0,t.createElement)(dt,null)))})),wp.compose.compose(st((function(e,t){return{setMetaValue:function(n){n=n.replace("T"," "),Ye()({path:"rsvpmaker/v1/clearcache/"+rsvpmaker_ajax.event_id}),e("core/editor").editPost({meta:{[t.metaKey]:n}})}}})),it((function(e,t){return{metaValue:e("core/editor").getEditedPostAttribute("meta")[t.metaKey]}})))((function(e){const t=(0,Je.getSettings)(),n=/a(?!\\)/i.test(t.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return Xe(Ze,{label:e.label,is12Hour:n,currentDate:e.metaValue,options:e.options,onChange:function(t){e.setMetaValue(t)}})})),wp.compose.compose(st((function(e,t){return{setMetaValue:function(n){e("core/editor").editPost({meta:{[t.metaKey]:n}})}}})),it((function(e,t){return{metaValue:e("core/editor").getEditedPostAttribute("meta")[t.metaKey]}})))((function(e){return Xe(at,{label:e.label,value:e.metaValue,onChange:function(t){e.setMetaValue(t)}})})));function gt(e){if(!e)return(0,t.createElement)("p",null,"Reloading ...");const{eventdata:n,metaKey:r,label:a}=e,{event:o,meta:i}=n;if(!i)return(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Saving ..."));console.log("meta in RSVPMetaToggle",i);const s=!!i.hasOwnProperty(r)&&i[r],{mutate:l}=We(o);return console.log("Toggle value",s),(0,t.createElement)("div",{class:"rsvpmaker_toggles"},(0,t.createElement)(ot,{checked:s,onChange:function(){const e={metaKey:r,metaValue:!s};l(e),console.log("update toggle to",e)}})," ",a," ")}wp.compose.compose(st((function(e,t){return{setMetaValue:function(n){null==n&&(n=!1),e("core/editor").editPost({meta:{[t.metaKey]:n}})}}})),it((function(e,t){let n=e("core/editor").getEditedPostAttribute("meta")[t.metaKey];return null==n&&(n=!1),{metaValue:n}})))((function(e){return(0,t.createElement)("div",{class:"rsvpmaker_toggles"},(0,t.createElement)(ot,{checked:e.metaValue,onChange:function(){e.setMetaValue(!e.metaValue)}})," ",e.label," ")})),wp.compose.compose(st((function(e,t){return{setMetaValue:function(n,r){e("core/editor").editPost({meta:{[t.metaKey[r]]:n}})}}})),it((function(e,t){return{metaValue:e("core/editor").getEditedPostAttribute("meta")[t.metaKey]}})))((function(e){return e.metaValue.forEach((function(n,r){(0,t.createElement)(rt,{value:n,onChange:function(t){e.setMetaValue(t,r)}})}))})),wp.compose.compose(st((function(e,t){return{setDisplay:function(t){e("core/editor").editPost({meta:{_firsttime:t}})}}})),it((function(e,t){return{display:e("core/editor").getEditedPostAttribute("meta")._firsttime}})))((function(e){return void 0!==e.display&&"set"!=e.display&&e.display.search("ulti")<0?(0,t.createElement)(nt,{label:"Time Display",value:e.display,options:[{label:"End Time Not Displayed",value:""},{label:"Show End Time",value:"set"},{label:"All Day / Time Not Shown",value:"allday"}],onChange:function(t){e.setDisplay(t)}}):(0,t.createElement)("div",null,(0,t.createElement)(nt,{label:"Time Display",value:e.display,options:[{label:"End Time Not Displayed",value:""},{label:"Show End Time",value:"set"},{label:"All Day / Time Not Shown",value:"allday"}],onChange:function(t){e.setDisplay(t)}}),(0,t.createElement)("div",{class:"endtime",style:{backgroundColor:"lightgray",padding:5}},(0,t.createElement)("h3",null,"End Time"),(0,t.createElement)(Et,{metaKey:"_rsvp_end_date"})))}));var Et=wp.compose.compose(st((function(e,t){return{setMetaValue:function(n){n=n.replace("T"," "),Ye()({path:"rsvpmaker/v1/clearcache/"+rsvpmaker_ajax.event_id}),e("core/editor").editPost({meta:{[t.metaKey]:n}})}}})),it((function(e,t){let n=e("core/editor").getEditedPostAttribute("meta")[t.metaKey];if(!n){let t=e("core/editor").getEditedPostAttribute("meta")._rsvp_dates,r=e("core/editor").getEditedPostAttribute("meta")._endfirsttime;if(r)n=t.split(" ")[0]+" "+r;else{let e=new Date(t);e.setTime(e.getTime()+6e4),n=e.getHours(),n<10&&(n="0"+n),n=n+":"+e.getMinutes()+":00"}}return{metaValue:n}})))((function(e){const t=(0,Je.getSettings)(),n=/a(?!\\)/i.test(t.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return Xe(Ze,{label:e.label,is12Hour:n,currentDate:e.metaValue,options:e.options,onChange:function(t){e.setMetaValue(t)}})}));function bt(e){const{metaKey:n,eventdata:r}=e,{meta:a}=r;console.log("RSVPTimestampControl metaKey",n),console.log("RSVPTimestampControl meta",a);const o=a[n];console.log("RSVPTimestampControl value",o);const{mutate:i}=We(r.event);function s(e){return e<10?"0"+e:e}const l=new Date(r.date).getTime()-1e3*r.ts_start,u=new Date,c=1e3*o+l;u.setTime(c);const[m,d]=(0,t.useState)(o?u.getFullYear()+"-"+s(u.getMonth()+1)+"-"+s(u.getDate()):""),[p,f]=(0,t.useState)(o?s(u.getHours())+":"+s(u.getMinutes()):"");return(0,t.createElement)("div",null,(0,t.createElement)("label",null,e.label),(0,t.createElement)("p",null,(0,t.createElement)("input",{type:"date",value:m,onChange:e=>{d(e.target.value)}})," ",(0,t.createElement)("input",{type:"time",value:p,onChange:e=>{f(e.target.value)}})," ",m&&p&&(0,t.createElement)("button",{onClick:function(){const e=new Date(m+" "+p);i({metaKey:n,metaValue:(e.getTime()-l)/1e3})}},"Set")),(m&&!p||p&&!m)&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Enter both date and time")))}wp.compose.compose(st((function(e,t){return{setMetaValue:function(n){console.log("metats dispatch",n),e("core/editor").editPost({meta:{[t.metaKey]:n}})}}})),it((function(e,t){return console.log("withselect props",t),{metaValue:e("core/editor").getEditedPostAttribute("meta")[t.metaKey]}})))((function(e){function n(e){return e<10?"0"+e:e}const r=new Date(rsvpmaker_ajax.eventdata.date);console.log("meta ts props",e);const a=r.getTime()-1e3*rsvpmaker_ajax.eventdata.ts_start,o=new Date;e.metaValue&&o.setTime(1e3*e.metaValue+a);const[i,s]=(0,t.useState)(e.metaValue?o.getFullYear()+"-"+n(o.getMonth()+1)+"-"+n(o.getDate()):""),[l,u]=(0,t.useState)(e.metaValue?n(o.getHours())+":"+n(o.getMinutes()):""),[c,m]=(0,t.useState)("");return(0,t.createElement)("div",null,(0,t.createElement)("label",null,e.label),(0,t.createElement)("p",null,(0,t.createElement)("input",{type:"date",value:i,onChange:e=>{s(e.target.value)}})," ",(0,t.createElement)("input",{type:"time",value:l,onChange:e=>{u(e.target.value)}})," ",i&&l&&(0,t.createElement)("button",{onClick:function(){const t=new Date(i+" "+l);e.setMetaValue((t.getTime()-a)/1e3),m("New date will be recorded when you save/publish/update")}},"Set")),(i&&!l||l&&!i)&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Enter both date and time")),c)})),wp.compose.compose(st((function(e,t){return{setMetaValue:function(n,r){e("core/editor").editPost({meta:{[t.metaKey[r]]:n}})}}})),it((function(e,t){return{metaValue:e("core/editor").getEditedPostAttribute("meta")[t.metaKey]}})))((function(e){return e.metaValue.forEach((function(n,r){(0,t.createElement)(rt,{value:n,onChange:function(t){e.setMetaValue(t,r)}})}))}));const{__:_t}=wp.i18n;function wt(e){const{event_id:n,eventdata:o,isLoadingDates:i}=e,[s,l]=(0,t.useState)(""),{mutate:u}=We(n);o.tzchoices&&Array.isArray(o.tzchoices)||(o.tzchoices=[]),new Date;const c=!0,m=new Date(o.date),d=new Date(o.enddate),p=d.getTime()-m.getTime();function f(e){console.log(typeof e),"string"==typeof e&&(e=new Date(e)),console.log("date for sqlDate",e);var t=function(e){return("00"+e).slice(-2)};return e.getFullYear()+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())+" "+t(e.getHours())+":"+t(e.getMinutes())+":"+t(e.getSeconds())}function h(e,t){const n={...o};n[e]=t,u(n)}return(0,t.createElement)("div",{className:"rsvpmaker-date-time"},(0,t.createElement)("h3",null,"Start Date and Time"),i&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Loading fresh data ...")),(0,t.createElement)(r.DateTimePicker,{currentDate:m,onChange:e=>{!function(e){const t=new Date(e),n=t.getTime(),r=n+p?p:0,a=new Date;a.setTime(r),console.log(n),console.log(r);const o=f(t),i=f(a);u({date:o,enddate:i})}(e),console.log("new date",e)},is12Hour:c,__nextRemoveHelpButton:!0,__nextRemoveResetButton:!0}),s&&(0,t.createElement)("p",{style:{color:"red"}},s),(0,t.createElement)(a,{label:"Date Display Options",value:o.display_type,options:[{label:"Show Start Time Only",value:""},{label:"Show Both Start and End Time",value:"set"},{label:"Show Date Only, No Times",value:"allday"}],onChange:e=>{h("display_type",e)}}),""!=o.display_type&&(0,t.createElement)("div",{className:"rsvp-end-date"},(0,t.createElement)("h3",null,"End Date and Time"),(0,t.createElement)(r.DateTimePicker,{currentDate:d,onChange:e=>{!function(e){const t=new Date(e);if(t.getTime()<m.getTime())return t.setTime(m.getTime()+6e4),void alert("end date cannot be before start date");f(t),u({enddate:f(t)})}(e),console.log("new enddate",e)},is12Hour:c,__nextRemoveHelpButton:!0,__nextRemoveResetButton:!0})),(0,t.createElement)(a,{label:"Time Zone",value:o.timezone,options:o.tzchoices.map((e=>({label:e,value:e}))),onChange:e=>{h("timezone",e)}}),(0,t.createElement)(gt,{label:_t("Collect RSVPs","rsvpmaker"),metaKey:"_rsvp_on",eventdata:o}),o.has_template&&(0,t.createElement)("p",null,(0,t.createElement)("a",{href:o.template_edit},"Based on Template ",o.has_template)))}function St(e){const{eventdata:n,metaKey:r,label:a}=e,{meta:o}=n,{mutate:i}=We(n.event),[s,l]=(0,t.useState)(o[r]),[u,c]=(0,t.useState)("");return(0,t.createElement)("div",null,(0,t.createElement)("p",null,(0,t.createElement)("label",null,a)),(0,t.createElement)("p",null,(0,t.createElement)("input",{type:"time",value:s,onChange:e=>{l(e.target.value),i({metaKey:r,metaValue:e.target.value}),c("setting to "+e.target.value)}})," ",(0,t.createElement)("br",null),(0,t.createElement)("small",null,u)))}const{__:Ct}=wp.i18n;function kt(e){if(!e)return(0,t.createElement)("p",null,"Reloading ...");const[n,r]=(0,t.useState)({}),{eventdata:a,event_id:o}=e;return(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"RSVPMaker Template ",rsvpmaker_ajax.projected_url&&(0,t.createElement)("a",{href:rsvpmaker_ajax.projected_url},"(Create/Update)")),(0,t.createElement)("div",{class:"sked_frequency"},(0,t.createElement)("p",{class:"varies"},(0,t.createElement)(gt,{label:"Varies",metaKey:"_sked_Varies",eventdata:a})),(0,t.createElement)("p",{class:"weeknumber"},(0,t.createElement)(gt,{label:"First",metaKey:"_sked_First",eventdata:a})),(0,t.createElement)("p",{class:"weeknumber"},(0,t.createElement)(gt,{label:"Second",metaKey:"_sked_Second",eventdata:a})),(0,t.createElement)("p",{class:"weeknumber"},(0,t.createElement)(gt,{label:"Third",metaKey:"_sked_Third",eventdata:a})),(0,t.createElement)("p",{class:"weeknumber"},(0,t.createElement)(gt,{label:"Fourth",metaKey:"_sked_Fourth",eventdata:a})),(0,t.createElement)("p",{class:"weeknumber"},(0,t.createElement)(gt,{label:"Last",metaKey:"_sked_Last",eventdata:a})),(0,t.createElement)("p",{class:"every"},(0,t.createElement)(gt,{label:"Every",metaKey:"_sked_Every",eventdata:a}))),(0,t.createElement)("p",null,(0,t.createElement)(gt,{label:"Sunday",metaKey:"_sked_Sunday",eventdata:a})),(0,t.createElement)("p",null,(0,t.createElement)(gt,{label:"Monday",metaKey:"_sked_Monday",eventdata:a})),(0,t.createElement)("p",null,(0,t.createElement)(gt,{label:"Tuesday",metaKey:"_sked_Tuesday",eventdata:a})),(0,t.createElement)("p",null,(0,t.createElement)(gt,{label:"Wednesday",metaKey:"_sked_Wednesday",eventdata:a})),(0,t.createElement)("p",null,(0,t.createElement)(gt,{label:"Thursday",metaKey:"_sked_Thursday",eventdata:a})),(0,t.createElement)("p",null,(0,t.createElement)(gt,{label:"Friday",metaKey:"_sked_Friday",eventdata:a})),(0,t.createElement)("p",null,(0,t.createElement)(gt,{label:"Saturday",metaKey:"_sked_Saturday",eventdata:a})),(0,t.createElement)("br",null),(0,t.createElement)(St,{eventdata:a,metaKey:"_sked_start_time",label:"Start Time"}),(0,t.createElement)(St,{eventdata:a,metaKey:"_sked_end",label:"End Time"}),(0,t.createElement)(vt,{type:"template",statusKey:"_sked_duration",timeKey:"_sked_end",eventdata:a}),(0,t.createElement)(ht,{label:"Time Zone",metaKey:"_timezone",value:a.timezone,options:a.tzchoices.map((e=>({label:e,value:e})))}),(0,t.createElement)("p",null,(0,t.createElement)(gt,{label:"Auto Add Dates",metaKey:"rsvpautorenew",help:"Automatically add dates according to this schedule",eventdata:a})),(0,t.createElement)(gt,{label:Ct("Collect RSVPs","rsvpmaker"),metaKey:"_rsvp_on",eventdata:a,event_id:o}))}var Tt=n(838),Ot=n.n(Tt);function At(e){const{innerHTML:n}=e,r=Ot().sanitize(n).replace("class=","className=");return(0,t.createElement)("div",{dangerouslySetInnerHTML:{__html:r}})}function Rt(e){const{type:n}=e;return(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-arrow-up-circle",viewBox:"0 0 16 16"},(0,t.createElement)("title",null,"Move Up ",n),(0,t.createElement)("path",{"fill-rule":"evenodd",d:"M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-7.5 3.5a.5.5 0 0 1-1 0V5.707L5.354 7.854a.5.5 0 1 1-.708-.708l3-3a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1-.708.708L8.5 5.707V11.5z"}))}function Pt(e){const{type:n}=e;return(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-arrow-down-circle",viewBox:"0 0 16 16"},(0,t.createElement)("title",null,"Move Down ",n),(0,t.createElement)("path",{"fill-rule":"evenodd",d:"M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v5.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V4.5z"}))}function xt(e){const{type:n}=e;return(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-trash",viewBox:"0 0 16 16"},(0,t.createElement)("title",null,"Delete ",n),(0,t.createElement)("path",{d:"M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z"}),(0,t.createElement)("path",{"fill-rule":"evenodd",d:"M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z"}))}function Dt(e){const[n,o]=(0,t.useState)(e.form_id),[i,s]=(0,t.useState)("rsvpmaker/formfield"),[l,u]=(0,t.useState)(""),[c,m]=(0,t.useState)(""),[d,p]=(0,t.useState)(!1),[f,h]=(0,t.useState)(""),{isSaving:v,saveEffect:y,SaveControls:g,makeNotification:E}=function(){const[e,n]=(0,t.useState)(!1),[r,a]=(0,t.useState)(null),[o,i]=(0,t.useState)(null);function s(){n(!0),setTimeout((()=>{n(!1)}),500)}return{SaveControls:function(e){const{changes:n,setChanges:r}=e;console.log("changes SaveControls",n);const{mutate:a}=function(e,t){const n=(0,Ge.useQueryClient)();return(0,Ge.useMutation)((async function(e){return await ze.post("rsvp_options",e)}),{onMutate:async e=>{console.log("optimistic update option",e),await n.cancelQueries(["rsvp_options"]);const t=n.getQueryData(["rsvp_options"]);return n.setQueryData(["rsvp_options"],(t=>{const{data:n}=t;e.forEach((e=>{"rsvp_options"==e.type&&(n.rsvp_options[e.key]=e.value)}));const r={...t,data:n};return console.log("newdata optimistic update",r),r})),console.log("updating options"),{previousValue:t}},onSettled:(e,t,r,a)=>{n.invalidateQueries(["rsvp_options"])},onSuccess:(t,n,r,a)=>{console.log("updated"),e([])},onError:(e,t,r)=>{console.log("update options error",e),n.setQueryData("rsvp_options",r.previousValue)}})}(r);return(0,t.createElement)("div",{id:"savecontrols"},o&&(0,t.createElement)("div",{className:"rsvp-notification rsvp-notification-success"},o.message),(0,t.createElement)("div",{id:"savebuttonwrapper"},(0,t.createElement)("button",{onClick:()=>{console.log("save changeset",n),s(),a(n)}},"Save")))},notification:o,setNotification:i,isSaving:e,saveEffect:s,makeNotification:function(e=""){if(""==e)return o;r&&clearTimeout(r),i({message:e});let t=setTimeout((()=>{i(null)}),5e3);a(t)}}}(),{changes:b,addChange:_,setChanges:w}=e;wp?.data?.select("core/editor")?.getCurrentPostId(),console.log("Forms props",e),console.log("Forms formId",n);const{data:S,isLoading:C,isError:k}=(0,Ge.useQuery)(["rsvp_form",n],(function(){return ze.get("rsvp_form?form_id="+n+"&post_id="+wp?.data?.select("core/editor")?.getCurrentPostId())}),{enabled:!0,retry:2,onSuccess:(e,t,r,a)=>{n||o(e.data.form_id),console.log("rsvp forms query",e)},onError:(e,t,n)=>{console.log("error retrieving rsvp forms",e)},refetchInterval:!1});if(k)return(0,t.createElement)("p",null,"Error loading form options");const T=(0,Ge.useQueryClient)(),{mutate:O}=(0,Ge.useMutation)((async function(t){return await ze.post("rsvp_form?form_id="+n+"&post_id="+wp?.data?.select("core/editor")?.getCurrentPostId(),{form:t,newForm:f,event_id:e.event_id?e.event_id:0})}),{onMutate:async e=>{const t=T.getQueryData(["rsvp_form",n]);return console.log("optimistic update form",e),await T.cancelQueries(["rsvp_form",n]),T.setQueryData(["rsvp_form",n],(t=>{const{data:n}=t;n.form=e;const r={...t,data:n};return console.log("newdata optimistic form update",r),r})),console.log("updating options"),{previousValue:t}},onSettled:(e,t,r,a)=>{T.invalidateQueries(["rsvp_form",n])},onSuccess:(e,t,n,r)=>{console.log("updated"),o(e.data.form_id)},onError:(e,t,r)=>{console.log("update options error",e),T.setQueryData(["rsvp_form",n],r.previousValue)}});if(C)return(0,t.createElement)("p",null,"Loading ...");const A=S.data.form.filter((e=>e.blockName)),R=S.data.form_options,P=S.data.form_id;let x=A.length-1;const D=[];for(let e=0;e<x;e++){let t=A[e];if(t?.attrs.guestform?D.push(e):console.log("guestfields attr not found",e),["rsvpmaker/formnote","rsvpmaker/guests"].includes(t.blockName)){x=e-1;break}}const N=[{label:"Choose Field Type",value:""},{label:"Text Field",value:"rsvpmaker/formfield"},{label:"Text Area",value:"rsvpmaker/formtextarea"},{label:"Select",value:"rsvpmaker/formselect"},{label:"Radio Buttons",value:"rsvpmaker/formradio"},{label:"Add to Email List Checkbox",value:"rsvpmaker/formchimp"}];let M=!1,F=!1;for(let e=0;e<A.length;e++){let t=A[e];console.log("check for end fields",t),"rsvpmaker/guests"==t.blockName&&(M=!0,console.log("check for end fields found guests")),"rsvpmaker/formnote"==t.blockName&&(F=!0,console.log("check for end fields found note"))}function L(e){const[n,r]=(0,t.useState)(!1),{blockindex:a}=e;return(0,t.createElement)(t.Fragment,null,!n&&(0,t.createElement)("button",{className:"blockmove deletebutton",onClick:()=>{r(!0)}},(0,t.createElement)(xt,null)," Delete")," ",n&&(0,t.createElement)("button",{className:"blockmove",onClick:()=>{j(a,"delete")}},(0,t.createElement)(xt,null)," Confirm Delete")," ")}function j(e,t){const n=[],r=A[e];let a="delete"==t;A.forEach(((o,i)=>{null==o.blockName||i==e||("up"==t&&i==e-1&&(n.push(r),a=!0),"down"==t&&i==e+2&&(n.push(r),a=!0),n.push(o))})),a||n.push(r),console.log("newform",n),O(n)}function I(e,t,n){const r=[...A];r[e].attrs[t]=n,O(r)}function U(e){const{blockindex:n,setFormItemAttr:a}=e,[o,i]=(0,t.useState)(e.attrs.choicearray),[s,l]=(0,t.useState)(e.attrs.required),[u,c]=(0,t.useState)(e.attrs.label),[m,d]=(0,t.useState)(e.attrs.guestform),[p,f]=(0,t.useState)(e.attrs.defaultToFirst);return(0,t.createElement)("div",{className:"formAtts"},["rsvpmaker/formfield","rsvpmaker/formselect","rsvpmaker/formradio","rsvpmaker/formtextarea"].includes(e.blockName)&&(0,t.createElement)("p",null,(0,t.createElement)("label",null,"Field Label")," ",(0,t.createElement)("input",{type:"text",value:u,onChange:e=>{c(e.target.value)},onBlur:()=>{a(n,"label",u)}})),o&&(0,t.createElement)("p",null,"Choices",(0,t.createElement)("br",null),(0,t.createElement)("textarea",{value:o.join("\n"),onChange:e=>{let t=e.target.value.split("\n");i(t),a(n,"choicearray",t)},onBlur:()=>{a(n,"choicearray",o)}}),(0,t.createElement)("br",null),(0,t.createElement)("em",null,"Enter one choice per line")),["rsvpmaker/formfield","rsvpmaker/formselect","rsvpmaker/formradio","rsvpmaker/formtextarea"].includes(e.blockName)&&"email"!=e.attrs.slug&&(0,t.createElement)(r.ToggleControl,{label:"Required",checked:"required"==s,onChange:()=>{let e="required"==s?"":"required";l(e),a(n,"required",e)}}),"email"==e.attrs.slug&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Email is always required")),["rsvpmaker/formfield","rsvpmaker/formselect","rsvpmaker/formradio","rsvpmaker/formtextarea"].includes(e.blockName)&&(0,t.createElement)(r.ToggleControl,{label:"Include on Guest Form",checked:m,onChange:()=>{let e=!m;d(e),a(n,"guestform",e)}}),["rsvpmaker/formradio"].includes(e.blockName)&&(0,t.createElement)(r.ToggleControl,{label:"Default to First Item",checked:p,onChange:()=>{let e=!p;f(e),a(n,"defaultToFirst",e)}}))}function Q(){console.log("guestfields",D);const[e,n]=(0,t.useState)(!1);return e?(0,t.createElement)("div",null,(0,t.createElement)("p",null,"Guest 1"),D.map((e=>{const n=A[e];console.log("guestfields forEach",n);let o=[];return n?.attrs.choicearray&&(o=n.attrs.choicearray.map((e=>({label:e,value:e})))),(0,t.createElement)("div",{className:"formAtts"},"rsvpmaker/formfield"==n.blockName&&(0,t.createElement)(r.TextControl,{label:n.attrs.label}),"rsvpmaker/formtextarea"==n.blockName&&(0,t.createElement)(r.TextareaControl,{label:n.attrs.label}),"rsvpmaker/formselect"==n.blockName&&(0,t.createElement)(a,{label:n.attrs.label,options:o}),"rsvpmaker/formradio"==n.blockName&&(0,t.createElement)(r.RadioControl,{label:n.attrs.label,options:o}))}))):(0,t.createElement)("p",null,(0,t.createElement)("a",{onClick:()=>{n(!0)}},"+ Add Guests"))}M||N.push({label:"Guest Fields",value:"rsvpmaker/guests"}),F||N.push({label:"Note Field",value:"rsvpmaker/formnote"});let q="",K=!0;return(0,t.createElement)("div",{className:"rsvptab"},S.data.is_default&&(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"Default Form Selected"),(0,t.createElement)("p",null,"Changes you make below will apply to all events that use the default form. Switch to a custom form to make customizations for this event only. Forms can also be customized from an event template.")),S.data.is_inherited&&(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"Form Is Inherited"),(0,t.createElement)("p",null,"This form is inherited from a template or another document. Changes you make below will apply to all events that use the same form. Switch to a custom form to make customizations for this event only. Forms can also be customized from an event template.")),(0,t.createElement)(r.ToggleControl,{label:"Show Form Preview",checked:d,onChange:()=>{p(!d)}}),d&&A.map(((e,n)=>{K=e.blockName.indexOf("rsvpmaker")>-1;let o=[];if(e?.attrs.choicearray&&(o=e.attrs.choicearray.map((e=>({label:e,value:e})))),null!=e.blockName)return(0,t.createElement)("div",null,"rsvpmaker/formfield"==e.blockName&&(0,t.createElement)(r.TextControl,{label:e.attrs.label}),"rsvpmaker/formtextarea"==e.blockName&&(0,t.createElement)(r.TextareaControl,{label:e.attrs.label}),"rsvpmaker/formselect"==e.blockName&&(0,t.createElement)(a,{label:e.attrs.label,options:o}),"rsvpmaker/formradio"==e.blockName&&(0,t.createElement)(r.RadioControl,{label:e.attrs.label,options:o}),"rsvpmaker/guests"==e.blockName&&(0,t.createElement)(Q,null),"rsvpmaker/formchimp"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("input",{type:"checkbox"})," Add me to your email list"),!K&&e.innerHTML&&(0,t.createElement)(At,{innerHTML:e.innerHTML}))})),(0,t.createElement)("h4",null,"Form Editing Controls"),A.map(((e,r)=>{if(q=e.blockName.replace(/^[^/]+\//,""),K=e.blockName.indexOf("rsvpmaker")>-1,"formchimp"==q?q="Add to Email List Checkbox":"formnote"==q&&(q="Note"),null!=e.blockName)return(0,t.createElement)("div",{className:"formblock"},(0,t.createElement)("div",{class:"blockheader"},(0,t.createElement)("div",{className:"reorganize-drag"},(0,t.createElement)("div",{className:"titleline"},(0,t.createElement)("h2",null,q," ",e.attrs.label&&(0,t.createElement)("span",{className:"fieldlabel"},e.attrs.label))," ",!["rsvpmaker/formnote","rsvpmaker/guests"].includes(e.blockName)&&r>0&&(0,t.createElement)("button",{className:"blockmove",onClick:()=>{j(r,"up")}},(0,t.createElement)(Rt,null))," ",!["rsvpmaker/formnote","rsvpmaker/guests"].includes(e.blockName)&&r!=x&&(0,t.createElement)("button",{className:"blockmove",onClick:()=>{j(r,"down")}},(0,t.createElement)(Pt,null))," ",(0,t.createElement)(L,{blockindex:r})," "),"rsvpmaker/guests"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Gathers information about guests.")),"rsvpmaker/formnote"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"A free text entry note at the bottom of the form.")),"rsvpmaker/formchimp"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Displays an Add to Email List checkbox on the form")),!K&&e.innerHTML&&(0,t.createElement)("div",null,(0,t.createElement)(At,{innerHTML:e.innerHTML})," ",(0,t.createElement)("br",null),(0,t.createElement)("em",null,(0,t.createElement)("a",{href:"/wp-admin/post.php?action=edit&post="+n},"Open in the WordPress editor"))),(0,t.createElement)(U,{attrs:e.attrs,blockName:e.blockName,blockindex:r,setFormItemAttr:I}))))})),(0,t.createElement)("p",null,"Add a form field ",(0,t.createElement)(a,{label:"Type",options:N,value:i,onChange:e=>{s(e)}})," ",!["rsvpmaker/formnote","rsvpmaker/guests","rsvpmaker/formchimp"].includes(i)&&(0,t.createElement)(r.TextControl,{label:"Field Label",value:l,onChange:e=>{u(e)}})," "),["rsvpmaker/formselect","rsvpmaker/formradio"].includes(i)&&(0,t.createElement)("p",null,(0,t.createElement)("label",null,"Choices"),(0,t.createElement)("br",null),(0,t.createElement)("textarea",{value:c,onChange:e=>{m(e.target.value)}}),(0,t.createElement)("br",null),(0,t.createElement)("em",null,"Enter one choice per line")),(0,t.createElement)("p",null,(0,t.createElement)("button",{onClick:function(){if(!i)return;let e;if(console.log(i),console.log(l),"rsvpmaker/formnote"==i)e={blockName:"rsvpmaker/formnote",attrs:[],innerBlocks:[],innerHTML:"",innerContent:[]};else if("rsvpmaker/guests"==i)e={blockName:"rsvpmaker/guests",attrs:[],innerBlocks:[{blockName:"core/paragraph",attrs:[],innerBlocks:[],innerHTML:"\n<p></p>\n",innerContent:["\n<p></p>\n"]}],innerHTML:'\n<div class="wp-block-rsvpmaker-guests"></div>\n',innerContent:['\n<div class="wp-block-rsvpmaker-guests">',null,"</div>\n"]};else{if(!l)return void alert("a field label is required");let t=l.toLowerCase().replace(/[^a-z0-9]/,"_");"first_name"==t&&(t="first"),"last_name"==t&&(t="last"),e={blockName:i,innerHTML:"",innerBlocks:[],innerContent:[],attrs:{label:l,slug:t}}}c&&(e.attrs.choicearray=c.split("\n")),console.log("newfield",e);const t=[];A.forEach(((n,r)=>{t.push(n),r==x&&t.push(e)})),O(t),s("rsvpmaker/formfield"),u(""),m("")}},"Add")),(0,t.createElement)("p",null,"You can also open this form ",(0,t.createElement)("a",{href:"/wp-admin/post.php?action=edit&post="+n},"in the WordPress editor"),"."),!e.single_form&&(0,t.createElement)(a,{label:"Switch Form",value:P,options:R,onChange:o}),S.data.copied&&(0,t.createElement)("p",null,"Copied ",(0,t.createElement)("strong",null,S.data.copied)),!e.single_form&&(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"Save as Reusable Form"),(0,t.createElement)(r.TextControl,{label:"Form Title",value:f,onChange:h}),(0,t.createElement)("p",null,"You can save the form so it can also be used with other events."),(0,t.createElement)("p",null,(0,t.createElement)("button",{onClick:e=>{e.preventDefault(),O(A),h("")}},"Create Form"))))}const Nt=new Ge.QueryClient;function Mt(e){return(0,t.createElement)(Ge.QueryClientProvider,{client:Nt},(0,t.createElement)(Dt,{form_id:rsvpmaker_ajax.form_id,event_id:rsvpmaker_ajax.event_id}))}function Ft(){const[e,n]=(0,t.useState)(""),[r,o]=(0,t.useState)(1),[i,s]=(0,t.useState)("before"),{data:l,isLoading:u,isError:c}=(0,Ge.useQuery)(["confirm_remind"],(function(){return ze.get("confirm_remind?event_id="+rsvpmaker_ajax.event_id)}),{enabled:!0,retry:2,onSuccess:(e,t,n,r)=>{console.log("rsvp confirmation query",e)},onError:(e,t,n)=>{console.log("error retrieving messages",e)},refetchInterval:!1});if(c)return(0,t.createElement)("p",null,"Error loading confirmation message data");const m=(0,Ge.useQueryClient)(),{mutate:d}=(0,Ge.useMutation)((async function(e){return await ze.post("confirm_remind?event_id="+rsvpmaker_ajax.event_id,e)}),{onSuccess:(e,t,r,a)=>{console.log("updated",e),n(""),m.setQueryData(["confirm_remind"],e)},onError:(e,t,n)=>{console.log("update message error",e)}});if(u)return(0,t.createElement)("p",null,"Loading ...");const p=l.data,{confirmation:f,reminder:h,edit_url:v}=p;return(0,t.createElement)("div",null,(0,t.createElement)("h2",null,"Confirmation Message"),(0,t.createElement)(At,{innerHTML:f.html}),(0,t.createElement)("p",null,(0,t.createElement)("a",{target:"_blank",href:v+f.ID},"Edit")),(0,t.createElement)("p",null,(0,t.createElement)("em",null,"The confirmation message for new posts will be either the default from the RSVPMaker Settings or a copy of the message from an event template. You can customize it as needed for a specific event.")),(0,t.createElement)("h2",null,"Payment Confirmation ",!p.payment_confirmation&&(0,t.createElement)("span",null,":Not Set")),!p.payment_confirmation&&(0,t.createElement)("p",null,(0,t.createElement)("button",{onClick:()=>{d({action:"add_payment_confirmation",type:"payment confirmation",source:f.ID,event_id:rsvpmaker_ajax.event_id}),n("working ...")}},"Customize for this ","rsvpmaker"==rsvpmaker.post_type?"event":"template")," ",e,(0,t.createElement)("br",null),"If you are charging for an event, you can add a separate payment confiration message that is only sent after payment is received."),p.payment_confirmation&&(0,t.createElement)("div",null,(0,t.createElement)(At,{innerHTML:p.payment_confirmation.html}),(0,t.createElement)("p",null,(0,t.createElement)("a",{target:"_blank",href:v+p.payment_confirmation.ID},"Edit"))),(0,t.createElement)("h2",null,"Reminder and Follow Up Messages"),h.map((e=>{const n=parseInt(e.hour),r=n<0?"before":"after";return(0,t.createElement)("div",null,(0,t.createElement)("h2",null,Math.abs(n)," hours ",r),(0,t.createElement)("p",null,(0,t.createElement)("strong",null,(0,t.createElement)(At,{innerHTML:e.post_title}))),(0,t.createElement)(At,{innerHTML:e.html}),(0,t.createElement)("p",null,(0,t.createElement)("a",{target:"_blank",href:v+e.ID},"Edit")))})),(0,t.createElement)("h3",null,"Add a Message"),(0,t.createElement)("p",null,"Number of Hours",(0,t.createElement)("br",null)," ",(0,t.createElement)("input",{type:"number",min:"1",value:r,onChange:e=>{e.target.value>0&&o(e.target.value)}}),(0,t.createElement)(a,{value:i,onChange:e=>{s(e),console.log(e)},options:[{label:"before event start time",value:"before"},{label:"after event start time",value:"after"}]})),(0,t.createElement)("p",null,(0,t.createElement)("button",{onClick:()=>{d({action:"add_reminder",type:"reminder "+r+" "+i,source:f.ID,event_id:rsvpmaker_ajax.event_id,hours:r,beforeafter:i}),n("working ...")}},"Add")))}const{__:Lt}=wp.i18n;function jt(){const[e,n]=(0,t.useState)(""),[a,o]=(0,t.useState)("0.00"),[i,s]=(0,t.useState)(""),[l,u]=(0,t.useState)(""),[c,m]=(0,t.useState)(""),[d,p]=(0,t.useState)(1),[f,h]=(0,t.useState)(-1),[v,y]=(0,t.useState)(""),[g,E]=(0,t.useState)("0.00"),[b,_]=(0,t.useState)("percent"),[w,S]=(0,t.useState)(-1),[C,k]=(0,t.useState)(null),[T,O]=(0,t.useState)(""),[A,R]=(0,t.useState)(0),{data:P,isLoading:x,isError:D}=(0,Ge.useQuery)(["pricing"],(function(){return ze.get("pricing?event_id="+rsvpmaker_ajax.event_id)}),{enabled:!0,retry:2,onSuccess:(e,t,n,r)=>{console.log("rsvp pricing query",e)},onError:(e,t,n)=>{console.log("error retrieving pricing",e)},refetchInterval:!1}),N=(0,Ge.useQueryClient)();if(D)return(0,t.createElement)("p",null,"Error loading pricing data.");const{mutate:M}=(0,Ge.useMutation)((async function(e){return await ze.post("pricing?event_id="+rsvpmaker_ajax.event_id,e)}),{onMutate:async e=>{const t=N.getQueryData(["pricing"]);return await N.cancelQueries(["pricing"]),N.setQueryData(["pricing"],(t=>{const{data:n}=t;return n.change=e.change,{...t,data:n}})),{previousValue:t}},onSettled:(e,t,n,r)=>{N.invalidateQueries(["pricing"])},onSuccess:(e,t,r,a)=>{console.log("updated",e),n(""),N.setQueryData(["pricing"],e)},onError:(e,t,n)=>{console.log("update message error",e)}});function F(e,t){if(!isNaN(e))return e=parseFloat(e),"percent"==t?(100*e).toFixed(2)+"% off, example 5 x $50 = $250, $"+(250-250*e).toFixed(2)+" after discount":"totalamount"==t?e.toFixed(2)+" off total, example 5 x $50 = $250, $"+(250-e).toFixed(2)+" after discount":e.toFixed(2)+" off each, example 5 x $50 = $250, $"+(250-5*e).toFixed(2)+" after discount"}const L=x?null:P.data,j=x?[]:L.pricing,I=x||!L.coupon_codes?[]:L.coupon_codes,U=x||!L.coupon_methods?[]:L.coupon_methods,Q=x||!L.coupon_discounts?[]:L.coupon_discounts,q=x||!L.form_fields?[]:L.form_fields,K=["phone_type"];x||C==L.item_prices||k(L.item_prices);const B=[];return q.map(((e,n)=>{K.includes(e.slug)||e.choicearray&&(e.choicearray.forEach((n=>{B.push((0,t.createElement)("p",null,e.label+": "+n," ",(0,t.createElement)(r.TextControl,{value:C&&C[e.slug]&&C[e.slug][n]?C[e.slug][n]:0,onChange:t=>{console.log("new value",t);const r={...C};r[e.slug][n]=t,M({update:"item_prices",change:r})}})))})),console.log("roptions",B))})),(0,t.createElement)("div",null,(0,t.createElement)("p",null,(0,t.createElement)("a",{href:"https://rsvpmaker.com/knowledge-base/pricing-per-person-and-by-options-like-meal-choice/",target:"_blank"},"Documentation: Pricing Options")),(0,t.createElement)("p",null,(0,t.createElement)(ht,{label:"Payment Gateway",metaKey:"_payment_gateway",options:rsvpmaker_ajax.payment_gateway_options.map((e=>({label:e,value:e})))})),(0,t.createElement)("p",null,(0,t.createElement)(pt,{label:"Currency",metaKey:"_rsvp_currency"})),(0,t.createElement)("p",null,(0,t.createElement)(ft,{label:"Price Calculation",metaKey:"_rsvp_count_party",options:[{label:Lt("Multiply by size of party"),value:"1"},{label:Lt("Let user specify number of admissions per category"),value:"0"}]})),x&&(0,t.createElement)("p",null,"Loading prices ..."),j.map(((e,r)=>(0,t.createElement)("p",null,e.unit,": ",e.price," ",e.niceDeadline&&(0,t.createElement)("span",null,"deadline: ",e.niceDeadline)," multiple: ",e.price_multiple," ",(0,t.createElement)("button",{onClick:()=>{console.log("click on index",r),h(r),s(e.unit),o(e.price),p(e.price_multiple),u(e.deadlineDate),m(e.deadlineTime)}},"Edit")," ",(0,t.createElement)("button",{onClick:()=>{!function(e){n("Posting ...");const t=[...j];delete t[e],M({update:"pricing",change:t})}(r)}},"Delete")))),(0,t.createElement)("p",null,(0,t.createElement)("label",null,"Unit")," ",(0,t.createElement)(r.TextControl,{value:i,onChange:s})),(0,t.createElement)("p",null,(0,t.createElement)("label",null,"Price")," ",(0,t.createElement)(r.TextControl,{value:a,onChange:o})),(0,t.createElement)("p",null,(0,t.createElement)("label",null,"Deadline (optional)")," ",(0,t.createElement)("input",{type:"date",value:l,onChange:e=>{u(e.target.value)}})," ",(0,t.createElement)("input",{type:"time",value:c,onChange:e=>{m(e.target.value)}})," ",(l||c)&&(0,t.createElement)("button",{onClick:()=>{u(""),m("")}},"Remove Deadline"),(0,t.createElement)("br",null),(0,t.createElement)("em",null,"Example: early bird rate to register for a conference.")),(0,t.createElement)("p",null,(0,t.createElement)("label",null,"Multiple (optional)")," ",(0,t.createElement)("input",{type:"number",value:d,onChange:e=>{p(e.target.value)}}),(0,t.createElement)("br",null),(0,t.createElement)("em",null,"Example: price for a table of 8 at a dinner, rather than a single registration.")),(0,t.createElement)("p",null,(0,t.createElement)("button",{disabled:x,onClick:function(){n("Posting ...");const e=[...j];f<0?e.push({unit:i,price:a,deadlineDate:l,deadlineTime:c,price_multiple:d}):e[f]={unit:i,price:a,deadlineDate:l,deadlineTime:c,price_multiple:d},M({update:"pricing",change:e}),u(""),m(""),p(1),h(-1),s(""),o("0.00")}},f>-1?"Update Price":"Add Price")," ",e),B.length&&(0,t.createElement)("div",null,(0,t.createElement)("h2",null,"Priced Options"),(0,t.createElement)("div",null,B)),(0,t.createElement)("h2",null,"Discounts"),x&&(0,t.createElement)("p",null,"Loading discounts ..."),I.map(((e,r)=>{let a=U[r],o=Q[r];return isNaN(o)&&(o=0),(0,t.createElement)("div",null,"Code: ",e," ",F(o,a)," ",(0,t.createElement)("span",null,(0,t.createElement)("button",{onClick:()=>{console.log("click on index",r),S(r),y(e),_(a),E(o)}},"Edit")," ",(0,t.createElement)("button",{onClick:()=>{!function(e){n("Posting ...");const t=[...I];delete t[e],M({update:"coupon_codes",change:t})}(r)}},"Delete"))," ")})),(0,t.createElement)("div",null,(0,t.createElement)(r.TextControl,{label:"Coupon Code",value:v,onChange:e=>{y(e)}}),(0,t.createElement)(r.RadioControl,{label:"Method",selected:b,options:[{label:"Discount Percent (enter decimal, 0.5 = 50%)",value:"percent"},{label:"Discount Amount off Each",value:"amount"},{label:"Discount Off Total",value:"totalamount"}],onChange:e=>{_(e)}}),(0,t.createElement)(r.TextControl,{label:"Discount",value:g,onChange:e=>{"percent"==b&&e>1?e=1:isNaN(e)&&(e=0),E(e)}}),(0,t.createElement)("p",null,F(g,b)),(0,t.createElement)("p",null,(0,t.createElement)("button",{disabled:x,onClick:function(){const e=[...I],t=[...Q],r=[...U];w<0?(e.push(v),t.push(g),r.push(b)):(e[w]=v,t[w]=g,r[w]=b),n("Posting ..."),M({update:"coupon_codes",change:{coupon_codes:e,coupon_discounts:t,coupon_methods:r}}),y(""),_("percent"),E(0),S(-1)}},w>-1?"Update Code":"Add Code")," ",e)))}const{Modal:It,TabPanel:Ut,Guide:Qt,GuidePage:qt,ToggleControl:Kt,Panel:Bt,PanelBody:Ht,PanelRow:Vt,Flex:zt,FlexBlock:Gt,FlexItem:Wt}=wp.components,{__:$t}=wp.i18n,Yt=e=>{console.log("Selecting tab",e)};function Jt(e){const[n,r]=(0,t.useState)(e.open),{tab:a,eventdata:o}=e,i=a||"basics";function s(){r(!1),e.setOpenModal&&e.setOpenModal(!1)}return console.log("setup start",i),o.status&&wp.data.dispatch("core/notices").createNotice("success",o.status,{id:"rsvpemialnowsnack",isDismissible:!0,type:"snackbar"}),(0,t.createElement)("div",null,!n&&(0,t.createElement)("p",null,(0,t.createElement)("button",{onClick:function(){r(!0),e.setOpenModal&&e.setOpenModal(!0)}},"RSVP / Event Options"),(0,t.createElement)("br",null),(0,t.createElement)("em",null,"Click to see more event options")),n&&(0,t.createElement)(It,{className:"rsvpmaker-setup-modal",title:"RSVP / Event Options",onRequestClose:s},(0,t.createElement)("div",null,o.status),(0,t.createElement)(Ut,{className:"rsvpmaker-tab-panel",activeClass:"is-active",onSelect:Yt,initialTabName:i,tabs:[{name:"basics",title:"Basic Settings",className:"rsvpmaker-modal-tab"},{name:"form",title:"RSVP Form",className:"rsvpmaker-modal-tab"},{name:"confirmation",title:"Confirmation and Reminder Messages",className:"rsvpmaker-modal-tab"},{name:"pricing",title:"Pricing",className:"rsvpmaker-modal-tab"}]},(e=>"basics"==e.name?(0,t.createElement)("div",{className:"rsvpsettings-tab-contents"},(0,t.createElement)(Zt,{eventdata:o})):"form"==e.name?(0,t.createElement)("div",{className:"rsvpsettings-tab-contents"},(0,t.createElement)(Xt,{form_id:o.form_id,event_id:rsvpmaker_ajax.event_id,eventdata:o})):"confirmation"==e.name?(0,t.createElement)("div",{className:"rsvpsettings-tab-contents"},(0,t.createElement)(Ft,{eventdata:o})):"pricing"==e.name?(0,t.createElement)("div",{className:"rsvpsettings-tab-contents"},(0,t.createElement)(jt,{eventdata:o})):void 0)),(0,t.createElement)("div",null,(0,t.createElement)("button",{onClick:s},"Close"))))}function Xt(e){const{eventdata:n}=e;return(0,t.createElement)("div",null,(0,t.createElement)("div",null,rsvpmaker_ajax.form_fields),(0,t.createElement)("div",null,(0,t.createElement)("em",null,rsvpmaker_ajax.form_type)),(0,t.createElement)("div",null,(0,t.createElement)(gt,{label:$t("Login required to RSVP","rsvpmaker"),metaKey:"_rsvp_login_required",eventdata:n}),(0,t.createElement)(gt,{eventdata:n,label:$t("Captcha security challenge","rsvpmaker"),metaKey:"_rsvp_captcha"}),(0,t.createElement)(gt,{eventdata:n,label:$t("Show Yes/No Options on Registration Form","rsvpmaker"),metaKey:"_rsvp_yesno"}),(0,t.createElement)(gt,{eventdata:n,label:$t("Show Date and Time on Form","rsvpmaker"),metaKey:"_rsvp_form_show_date"}),(0,t.createElement)(pt,{label:$t("Maximum number of participants (0 for no limit)","rsvpmaker"),metaKey:"_rsvp_max"}),(0,t.createElement)(yt,{label:$t("Form Instructions for User","rsvpmaker"),metaKey:"_rsvp_instructions"}),"rsvpmaker"==rsvpmaker.post_type&&(0,t.createElement)(bt,{label:"Registration Start Date (optional)",metaKey:"_rsvp_start",eventdata:n}),"rsvpmaker"==rsvpmaker.post_type&&(0,t.createElement)(bt,{label:"Registration Deadline (optional)",metaKey:"_rsvp_deadline",eventdata:n}),"rsvpmaker_template"==rsvpmaker.post_type&&(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"Registration Start Date (optional)"),(0,t.createElement)(pt,{label:$t("Start Date, Days Before","rsvpmaker"),metaKey:"_rsvp_reg_daysbefore"}),(0,t.createElement)(pt,{label:$t("Start Date, Hours Before","rsvpmaker"),metaKey:"_rsvp_reg_hours"}),(0,t.createElement)("h3",null,"Registration Deadline (optional)"),(0,t.createElement)(pt,{label:$t("Deadline, Days Before","rsvpmaker"),metaKey:"_rsvp_deadline_daysbefore"}),(0,t.createElement)(pt,{label:$t("Deadline, Hours Before","rsvpmaker"),metaKey:"_rsvp_deadline_hours"}))),(0,t.createElement)(Mt,null))}function Zt(e){const{eventdata:n}=e;return(0,t.createElement)("div",{className:"guide-page-1-columns"},(0,t.createElement)("div",{className:"rsvpguide-datetime"},"rsvpmaker"==rsvpmaker.post_type&&(0,t.createElement)(wt,{event_id:rsvpmaker_rest.post_id,eventdata:e.eventdata}),"rsvpmaker_template"==rsvpmaker.post_type&&(0,t.createElement)(kt,{event_id:rsvpmaker_rest.post_id,eventdata:e.eventdata})),(0,t.createElement)("div",{className:"guide-options-column"},(0,t.createElement)(gt,{label:$t("Collect RSVPs","rsvpmaker"),metaKey:"_rsvp_on",eventdata:e.eventdata}),(0,t.createElement)("p",null,"RSVP Form: ",n.default_form&&(0,t.createElement)("span",null,"Default")," ",!n.default_form&&(0,t.createElement)("span",null,"Custom for event or template")),(0,t.createElement)("p",null,"Confirmation Message: ",n.default_confirmation&&(0,t.createElement)("span",null,"Default")," ",!n.default_confirmation&&(0,t.createElement)("span",null,"Custom for event or template")),(0,t.createElement)(Bt,null,(0,t.createElement)(Ht,{title:"Display",icon:"admin-settings",initialOpen:!0},(0,t.createElement)(gt,{label:$t('"Show Add to Google/Outlook Calendar Icons" ',"rsvpmaker"),metaKey:"_calendar_icons",eventdata:n}),(0,t.createElement)(gt,{label:$t("Add Timezone to Date","rsvpmaker"),metaKey:"_add_timezone",eventdata:n}),(0,t.createElement)(gt,{label:$t("Show Timezone Conversion Button","rsvpmaker"),metaKey:"_convert_timezone",eventdata:n}),(0,t.createElement)(gt,{label:$t("Show RSVP Count","rsvpmaker"),metaKey:"_rsvp_count",eventdata:n}),(0,t.createElement)(ht,{label:$t("Display attendee names / RSVP note field","rsvpmaker"),metaKey:"_rsvp_show_attendees",options:[{label:"No",value:"0"},{label:"Yes",value:"1"},{label:"Only for Logged In Users",value:"2"}]})),(0,t.createElement)(Ht,{title:$t("Notifications / Reminders","rsvpmaker"),icon:"email",initialOpen:!1},(0,t.createElement)(pt,{title:$t("Send notifications to:","rsvpmaker"),metaKey:"_rsvp_to"}),(0,t.createElement)(gt,{label:$t("Send Confirmation Email","rsvpmaker"),metaKey:"_rsvp_rsvpmaker_send_confirmation_email",eventdata:n}),(0,t.createElement)(gt,{label:$t("Confirm AFTER Payment","rsvpmaker"),metaKey:"_rsvp_confirmation_after_payment",eventdata:n}),(0,t.createElement)(gt,{label:$t('"Include Event Content with Confirmation"',"rsvpmaker"),metaKey:"_rsvp_confirmation_include_event",eventdata:n}),(0,t.createElement)(Vt,null,$t("Confirmation Message (exerpt)","rsvpmaker"),": ",rsvpmaker_ajax.confirmation_excerpt),rsvpmaker_ajax.confirmation_links.map((function(e){return(0,t.createElement)(Vt,null,(0,t.createElement)("a",{href:e.href},e.title))})),(0,t.createElement)(Vt,null,(0,t.createElement)(ht,{label:$t("Email Template for Confirmations","rsvpmaker"),metaKey:"rsvp_tx_template",options:rsvpmaker_ajax.rsvp_tx_template_choices})),(0,t.createElement)("div",null,"Venue:",(0,t.createElement)("br",null),(0,t.createElement)(pt,{title:$t("Venue","rsvpmaker"),metaKey:"venue"}),(0,t.createElement)("br",null),(0,t.createElement)("em",null,$t("A street address or web address to include on the calendar invite attachment included with confirmations. If not specifed, RSVPMaker includes a link to the event post.","rsvpmaker")))))))}function en(){const e=wp?.data?.select("core/editor").getEditedPostAttribute("status"),n=window.location.href.match(/tab=([^&]+)/),r=n?n[1]:"basics",[a,o]=(0,t.useState)("draft"==e||"auto-draft"==e||n&&n[1]),i=wp?.data?.select("core/editor").getCurrentPostId(),{data:s,isLoading:l,isError:u}=(c=i,(0,Ge.useQuery)(["rsvp_event_date"],(function(e){return ze.get("rsvp_event_date?event_id="+c)}),{enabled:!0,retry:2,onSuccess:(e,t,n,r)=>{console.log("rsvp_event_date query",e)},onError:(e,t,n)=>{console.log("error retrieving rsvp_event_date",e)},refetchInterval:!1}));var c;if(u)return(0,t.createElement)("p",null,"Error loading event date");if(l)return(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Loading event data"));const m=s.data;return m.tzchoices&&Array.isArray(m.tzchoices)||(m.tzchoices=[]),(0,t.createElement)("div",{className:"date-or-template"},rsvpmaker_ajax.top_message,(0,t.createElement)(Jt,{open:a,setOpenModal:o,tab:r,eventdata:m}),!rsvpmaker_ajax.special&&"rsvpmaker"==rsvpmaker.post_type&&(0,t.createElement)("div",null,!a&&"rsvpmaker"==rsvpmaker.post_type&&(0,t.createElement)(wt,{event_id:i,eventdata:m})),"rsvpmaker_template"==rsvpmaker.post_type&&(0,t.createElement)(kt,{event_id:i,eventdata:m}))}const{Modal:tn}=wp.components,{subscribe:nn}=wp.data,{subscribe:rn}=wp.data,{DateTimePicker:an}=wp.components,{Panel:on,PanelBody:sn,PanelRow:ln}=wp.components,un=new Ge.QueryClient;var cn=wp.element.createElement;const{__:mn}=wp.i18n;"rsvpmaker"!=rsvpmaker.post_type&&"rsvpmaker_template"!=rsvpmaker.post_type||wp.plugins.registerPlugin("rsvpmaker-sidebar-plugin",{render:function(){if("undefined"==typeof rsvpmaker_ajax)return null;const e=wp?.data?.select("core/editor").getEditedPostAttribute("status"),n=window.location.href.match(/tab=([^&]+)/),[r,a]=(n&&n[1],(0,t.useState)("draft"==e||"auto-draft"==e||n&&n[1]));return Array(),Array(),Array(),wp.data.select("core/editor").getEditedPostAttribute("id"),rsvpmaker_ajax.special?cn(wp.editPost.PluginPostStatusInfo,{},(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"RSVPMaker ",mn("Special Document","rsvpmaker")),rsvpmaker_ajax.top_message,"RSVP Form"==rsvpmaker_ajax.special&&(0,t.createElement)("p",null,(0,t.createElement)("a",{href:"https://rsvpmaker.com/knowledge-base/customize-the-rsvp-form/",target:"_blank"},mn("Documentation","rsvpmaker"))),rsvpmaker_ajax.bottom_message)):cn(wp.editPost.PluginPostStatusInfo,{},(0,t.createElement)("div",null,(0,t.createElement)(Ge.QueryClientProvider,{client:un},(0,t.createElement)(en,null),rsvpmaker_ajax.bottom_message)))}});var dn=wp.editPost.PluginPostPublishPanel;"rsvpmaker"!=rsvpmaker.post_type&&"rsvpmaker_template"!=rsvpmaker.post_type||wp.plugins.registerPlugin("rsvpmaker-sidebar-postpublish",{render:function(){return cn(dn,{className:"rsvpmaker-post-publish-panel",title:mn("RSVPMaker Post Published"),initialOpen:!0})}}),"undefined"!=typeof rsvpmaker_ajax&&rsvpmaker_ajax.template_url&&wp.data.dispatch("core/notices").createNotice("info",mn("You are editing one event in a series defined by a template. To make changes you can apply to the whole series of events, switch to editing the template."),{id:"rsvptemplateedit",isDismissible:!0,actions:[{url:rsvpmaker_ajax.template_url,label:rsvpmaker_ajax.template_label}]}),("rsvpmaker"==rsvpmaker.post_type||"rsvpmaker_template"==rsvpmaker.post_type)&&(wp.data.select("core/edit-post").isEditorSidebarOpened()||wp.data.dispatch("core/edit-post").openGeneralSidebar("edit-post/document"))})()})(); -
rsvpmaker/tags/11.1.5/admin/build/event-options.asset.php
r3104244 r3110769 1 <?php return array('dependencies' => array('react', 'react-dom', 'wp-components'), 'version' => ' ff0a9f438105ece3efbe');1 <?php return array('dependencies' => array('react', 'react-dom', 'wp-components'), 'version' => '7bd6a4a61d9a94ffce63'); -
rsvpmaker/tags/11.1.5/admin/build/event-options.js
r3104244 r3110769 1 (()=>{var e={838:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:o}=Object;let{freeze:i,seal:s,create:a}=Object,{apply:u,construct:c}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),s||(s=function(e){return e}),u||(u=function(e,t,n){return e.apply(t,n)}),c||(c=function(e,t){return new e(...t)});const l= C(Array.prototype.forEach),f=C(Array.prototype.pop),d=C(Array.prototype.push),h=C(String.prototype.toLowerCase),p=C(String.prototype.toString),m=C(String.prototype.match),v=C(String.prototype.replace),y=C(String.prototype.indexOf),g=C(String.prototype.trim),b=C(Object.prototype.hasOwnProperty),E=C(RegExp.prototype.test),w=(O=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c(O,t)});var O;function C(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return u(e,t,r)}}function S(e,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;t&&t(e,null);let i=r.length;for(;i--;){let t=r[i];if("string"==typeof t){const e=o(t);e!==t&&(n(r)||(r[i]=e),t=e)}e[t]=!0}return e}function A(e){for(let t=0;t<e.length;t++)b(e,t)||(e[t]=null);return e}function T(t){const n=a(null);for(const[r,o]of e(t))b(t,r)&&(Array.isArray(o)?n[r]=A(o):o&&"object"==typeof o&&o.constructor===Object?n[r]=T(o):n[r]=o);return n}function R(e,t){for(;null!==e;){const n=o(e,t);if(n){if(n.get)return C(n.get);if("function"==typeof n.value)return C(n.value)}e=r(e)}return function(){return null}}const k=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),N=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),_=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),x=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),P=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),D=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),F=i(["#text"]),L=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),M=i(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),I=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),U=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),j=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Q=s(/<%[\w\W]*|[\w\W]*%>/gm),q=s(/\${[\w\W]*}/gm),B=s(/^data-[\-\w.\u00B7-\uFFFF]/),H=s(/^aria-[\-\w]+$/),z=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),K=s(/^(?:\w+script|data):/i),G=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),W=s(/^html$/i),V=s(/^[a-z][.\w]*(-[.\w]+)+$/i);var J=Object.freeze({__proto__:null,MUSTACHE_EXPR:j,ERB_EXPR:Q,TMPLIT_EXPR:q,DATA_ATTR:B,ARIA_ATTR:H,IS_ALLOWED_URI:z,IS_SCRIPT_OR_DATA:K,ATTR_WHITESPACE:G,DOCTYPE_NAME:W,CUSTOM_ELEMENT:V});const Y=function(){return"undefined"==typeof window?null:window};return function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y();const r=e=>t(e);if(r.version="3.0.11",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;let{document:o}=n;const s=o,u=s.currentScript,{DocumentFragment:c,HTMLTemplateElement:O,Node:C,Element:A,NodeFilter:j,NamedNodeMap:Q=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:q,DOMParser:B,trustedTypes:H}=n,K=A.prototype,G=R(K,"cloneNode"),V=R(K,"nextSibling"),$=R(K,"childNodes"),X=R(K,"parentNode");if("function"==typeof O){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let Z,ee="";const{implementation:te,createNodeIterator:ne,createDocumentFragment:re,getElementsByTagName:oe}=o,{importNode:ie}=s;let se={};r.isSupported="function"==typeof e&&"function"==typeof X&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:ue,TMPLIT_EXPR:ce,DATA_ATTR:le,ARIA_ATTR:fe,IS_SCRIPT_OR_DATA:de,ATTR_WHITESPACE:he,CUSTOM_ELEMENT:pe}=J;let{IS_ALLOWED_URI:me}=J,ve=null;const ye=S({},[...k,...N,..._,...P,...F]);let ge=null;const be=S({},[...L,...M,...I,...U]);let Ee=Object.seal(a(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),we=null,Oe=null,Ce=!0,Se=!0,Ae=!1,Te=!0,Re=!1,ke=!1,Ne=!1,_e=!1,xe=!1,Pe=!1,De=!1,Fe=!0,Le=!1,Me=!0,Ie=!1,Ue={},je=null;const Qe=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let qe=null;const Be=S({},["audio","video","img","source","image","track"]);let He=null;const ze=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ke="http://www.w3.org/1998/Math/MathML",Ge="http://www.w3.org/2000/svg",We="http://www.w3.org/1999/xhtml";let Ve=We,Je=!1,Ye=null;const $e=S({},[Ke,Ge,We],p);let Xe=null;const Ze=["application/xhtml+xml","text/html"];let et=null,tt=null;const nt=o.createElement("form"),rt=function(e){return e instanceof RegExp||e instanceof Function},ot=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!tt||tt!==e){if(e&&"object"==typeof e||(e={}),e=T(e),Xe=-1===Ze.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,et="application/xhtml+xml"===Xe?p:h,ve=b(e,"ALLOWED_TAGS")?S({},e.ALLOWED_TAGS,et):ye,ge=b(e,"ALLOWED_ATTR")?S({},e.ALLOWED_ATTR,et):be,Ye=b(e,"ALLOWED_NAMESPACES")?S({},e.ALLOWED_NAMESPACES,p):$e,He=b(e,"ADD_URI_SAFE_ATTR")?S(T(ze),e.ADD_URI_SAFE_ATTR,et):ze,qe=b(e,"ADD_DATA_URI_TAGS")?S(T(Be),e.ADD_DATA_URI_TAGS,et):Be,je=b(e,"FORBID_CONTENTS")?S({},e.FORBID_CONTENTS,et):Qe,we=b(e,"FORBID_TAGS")?S({},e.FORBID_TAGS,et):{},Oe=b(e,"FORBID_ATTR")?S({},e.FORBID_ATTR,et):{},Ue=!!b(e,"USE_PROFILES")&&e.USE_PROFILES,Ce=!1!==e.ALLOW_ARIA_ATTR,Se=!1!==e.ALLOW_DATA_ATTR,Ae=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Te=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Re=e.SAFE_FOR_TEMPLATES||!1,ke=e.WHOLE_DOCUMENT||!1,xe=e.RETURN_DOM||!1,Pe=e.RETURN_DOM_FRAGMENT||!1,De=e.RETURN_TRUSTED_TYPE||!1,_e=e.FORCE_BODY||!1,Fe=!1!==e.SANITIZE_DOM,Le=e.SANITIZE_NAMED_PROPS||!1,Me=!1!==e.KEEP_CONTENT,Ie=e.IN_PLACE||!1,me=e.ALLOWED_URI_REGEXP||z,Ve=e.NAMESPACE||We,Ee=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ee.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ee.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ee.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Re&&(Se=!1),Pe&&(xe=!0),Ue&&(ve=S({},F),ge=[],!0===Ue.html&&(S(ve,k),S(ge,L)),!0===Ue.svg&&(S(ve,N),S(ge,M),S(ge,U)),!0===Ue.svgFilters&&(S(ve,_),S(ge,M),S(ge,U)),!0===Ue.mathMl&&(S(ve,P),S(ge,I),S(ge,U))),e.ADD_TAGS&&(ve===ye&&(ve=T(ve)),S(ve,e.ADD_TAGS,et)),e.ADD_ATTR&&(ge===be&&(ge=T(ge)),S(ge,e.ADD_ATTR,et)),e.ADD_URI_SAFE_ATTR&&S(He,e.ADD_URI_SAFE_ATTR,et),e.FORBID_CONTENTS&&(je===Qe&&(je=T(je)),S(je,e.FORBID_CONTENTS,et)),Me&&(ve["#text"]=!0),ke&&S(ve,["html","head","body"]),ve.table&&(S(ve,["tbody"]),delete we.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Z=e.TRUSTED_TYPES_POLICY,ee=Z.createHTML("")}else void 0===Z&&(Z=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(H,u)),null!==Z&&"string"==typeof ee&&(ee=Z.createHTML(""));i&&i(e),tt=e}},it=S({},["mi","mo","mn","ms","mtext"]),st=S({},["foreignobject","desc","title","annotation-xml"]),at=S({},["title","style","font","a","script"]),ut=S({},[...N,..._,...x]),ct=S({},[...P,...D]),lt=function(e){d(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ft=function(e,t){try{d(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){d(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ge[e])if(xe||Pe)try{lt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},dt=function(e){let t=null,n=null;if(_e)e="<remove></remove>"+e;else{const t=m(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Xe&&Ve===We&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=Z?Z.createHTML(e):e;if(Ve===We)try{t=(new B).parseFromString(r,Xe)}catch(e){}if(!t||!t.documentElement){t=te.createDocument(Ve,"template",null);try{t.documentElement.innerHTML=Je?ee:r}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(o.createTextNode(n),i.childNodes[0]||null),Ve===We?oe.call(t,ke?"html":"body")[0]:ke?t.documentElement:i},ht=function(e){return ne.call(e.ownerDocument||e,e,j.SHOW_ELEMENT|j.SHOW_COMMENT|j.SHOW_TEXT|j.SHOW_PROCESSING_INSTRUCTION|j.SHOW_CDATA_SECTION,null)},pt=function(e){return"function"==typeof C&&e instanceof C},mt=function(e,t,n){se[e]&&l(se[e],(e=>{e.call(r,t,n,tt)}))},vt=function(e){let t=null;if(mt("beforeSanitizeElements",e,null),(n=e)instanceof q&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof Q)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return lt(e),!0;var n;const o=et(e.nodeName);if(mt("uponSanitizeElement",e,{tagName:o,allowedTags:ve}),e.hasChildNodes()&&!pt(e.firstElementChild)&&E(/<[/\w]/g,e.innerHTML)&&E(/<[/\w]/g,e.textContent))return lt(e),!0;if(7===e.nodeType)return lt(e),!0;if(!ve[o]||we[o]){if(!we[o]&>(o)){if(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,o))return!1;if(Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(o))return!1}if(Me&&!je[o]){const t=X(e)||e.parentNode,n=$(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(G(n[r],!0),V(e))}return lt(e),!0}return e instanceof A&&!function(e){let t=X(e);t&&t.tagName||(t={namespaceURI:Ve,tagName:"template"});const n=h(e.tagName),r=h(t.tagName);return!!Ye[e.namespaceURI]&&(e.namespaceURI===Ge?t.namespaceURI===We?"svg"===n:t.namespaceURI===Ke?"svg"===n&&("annotation-xml"===r||it[r]):Boolean(ut[n]):e.namespaceURI===Ke?t.namespaceURI===We?"math"===n:t.namespaceURI===Ge?"math"===n&&st[r]:Boolean(ct[n]):e.namespaceURI===We?!(t.namespaceURI===Ge&&!st[r])&&!(t.namespaceURI===Ke&&!it[r])&&!ct[n]&&(at[n]||!ut[n]):!("application/xhtml+xml"!==Xe||!Ye[e.namespaceURI]))}(e)?(lt(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!E(/<\/no(script|embed|frames)/i,e.innerHTML)?(Re&&3===e.nodeType&&(t=e.textContent,l([ae,ue,ce],(e=>{t=v(t,e," ")})),e.textContent!==t&&(d(r.removed,{element:e.cloneNode()}),e.textContent=t)),mt("afterSanitizeElements",e,null),!1):(lt(e),!0)},yt=function(e,t,n){if(Fe&&("id"===t||"name"===t)&&(n in o||n in nt))return!1;if(Se&&!Oe[t]&&E(le,t));else if(Ce&&E(fe,t));else if(!ge[t]||Oe[t]){if(!(gt(e)&&(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,e)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(e))&&(Ee.attributeNameCheck instanceof RegExp&&E(Ee.attributeNameCheck,t)||Ee.attributeNameCheck instanceof Function&&Ee.attributeNameCheck(t))||"is"===t&&Ee.allowCustomizedBuiltInElements&&(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,n)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(n))))return!1}else if(He[t]);else if(E(me,v(n,he,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(n,"data:")||!qe[e])if(Ae&&!E(de,v(n,he,"")));else if(n)return!1;return!0},gt=function(e){return"annotation-xml"!==e&&m(e,pe)},bt=function(e){mt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};let o=t.length;for(;o--;){const i=t[o],{name:s,namespaceURI:a,value:u}=i,c=et(s);let d="value"===s?u:g(u);if(n.attrName=c,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,mt("uponSanitizeAttribute",e,n),d=n.attrValue,n.forceKeepAttr)continue;if(ft(s,e),!n.keepAttr)continue;if(!Te&&E(/\/>/i,d)){ft(s,e);continue}Re&&l([ae,ue,ce],(e=>{d=v(d,e," ")}));const h=et(e.nodeName);if(yt(h,c,d)){if(!Le||"id"!==c&&"name"!==c||(ft(s,e),d="user-content-"+d),Z&&"object"==typeof H&&"function"==typeof H.getAttributeType)if(a);else switch(H.getAttributeType(h,c)){case"TrustedHTML":d=Z.createHTML(d);break;case"TrustedScriptURL":d=Z.createScriptURL(d)}try{a?e.setAttributeNS(a,s,d):e.setAttribute(s,d),f(r.removed)}catch(e){}}}mt("afterSanitizeAttributes",e,null)},Et=function e(t){let n=null;const r=ht(t);for(mt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)mt("uponSanitizeShadowNode",n,null),vt(n)||(n.content instanceof c&&e(n.content),bt(n));mt("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,i=null,a=null;if(Je=!e,Je&&(e="\x3c!--\x3e"),"string"!=typeof e&&!pt(e)){if("function"!=typeof e.toString)throw w("toString is not a function");if("string"!=typeof(e=e.toString()))throw w("dirty is not a string, aborting")}if(!r.isSupported)return e;if(Ne||ot(t),r.removed=[],"string"==typeof e&&(Ie=!1),Ie){if(e.nodeName){const t=et(e.nodeName);if(!ve[t]||we[t])throw w("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof C)n=dt("\x3c!----\x3e"),o=n.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?n=o:n.appendChild(o);else{if(!xe&&!Re&&!ke&&-1===e.indexOf("<"))return Z&&De?Z.createHTML(e):e;if(n=dt(e),!n)return xe?null:De?ee:""}n&&_e&<(n.firstChild);const u=ht(Ie?e:n);for(;i=u.nextNode();)vt(i)||(i.content instanceof c&&Et(i.content),bt(i));if(Ie)return e;if(xe){if(Pe)for(a=re.call(n.ownerDocument);n.firstChild;)a.appendChild(n.firstChild);else a=n;return(ge.shadowroot||ge.shadowrootmode)&&(a=ie.call(s,a,!0)),a}let f=ke?n.outerHTML:n.innerHTML;return ke&&ve["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&E(W,n.ownerDocument.doctype.name)&&(f="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+f),Re&&l([ae,ue,ce],(e=>{f=v(f,e," ")})),Z&&De?Z.createHTML(f):f},r.setConfig=function(){ot(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ne=!0},r.clearConfig=function(){tt=null,Ne=!1},r.isValidAttribute=function(e,t,n){tt||ot({});const r=et(e),o=et(t);return yt(r,o,n)},r.addHook=function(e,t){"function"==typeof t&&(se[e]=se[e]||[],d(se[e],t))},r.removeHook=function(e){if(se[e])return f(se[e])},r.removeHooks=function(e){se[e]&&(se[e]=[])},r.removeAllHooks=function(){se={}},r}()}()},289:(e,t,n)=>{"use strict";n.d(t,{m:()=>s});var r=n(540),o=n(287),i=n(941),s=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!i.S$&&(null==(t=window)?void 0:t.addEventListener)){var n=function(){return e()};return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),function(){window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}},t}(0,r.A)(t,e);var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)},n.setEventListener=function(e){var t,n=this;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((function(e){"boolean"==typeof e?n.setFocused(e):n.onFocus()}))},n.setFocused=function(e){this.focused=e,e&&this.onFocus()},n.onFocus=function(){this.listeners.forEach((function(e){e()}))},n.isFocused=function(){return"boolean"==typeof this.focused?this.focused:"undefined"==typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)},t}(o.Q))},468:(e,t,n)=>{"use strict";n.d(t,{QueryClient:()=>r.E});var r=n(98),o=n(449);n.o(o,"QueryClientProvider")&&n.d(t,{QueryClientProvider:function(){return o.QueryClientProvider}}),n.o(o,"useMutation")&&n.d(t,{useMutation:function(){return o.useMutation}}),n.o(o,"useQuery")&&n.d(t,{useQuery:function(){return o.useQuery}}),n.o(o,"useQueryClient")&&n.d(t,{useQueryClient:function(){return o.useQueryClient}})},690:(e,t,n)=>{"use strict";n.d(t,{B:()=>i,t:()=>o});var r=console;function o(){return r}function i(e){r=e}},465:(e,t,n)=>{"use strict";n.d(t,{$:()=>c,s:()=>u});var r=n(168),o=n(690),i=n(428),s=n(281),a=n(941),u=function(){function e(e){this.options=(0,r.A)({},e.defaultOptions,e.options),this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.observers=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0},this.meta=e.meta}var t=e.prototype;return t.setState=function(e){this.dispatch({type:"setState",state:e})},t.addObserver=function(e){-1===this.observers.indexOf(e)&&this.observers.push(e)},t.removeObserver=function(e){this.observers=this.observers.filter((function(t){return t!==e}))},t.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(a.lQ).catch(a.lQ)):Promise.resolve()},t.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},t.execute=function(){var e,t=this,n="loading"===this.state.status,r=Promise.resolve();return n||(this.dispatch({type:"loading",variables:this.options.variables}),r=r.then((function(){null==t.mutationCache.config.onMutate||t.mutationCache.config.onMutate(t.state.variables,t)})).then((function(){return null==t.options.onMutate?void 0:t.options.onMutate(t.state.variables)})).then((function(e){e!==t.state.context&&t.dispatch({type:"loading",context:e,variables:t.state.variables})}))),r.then((function(){return t.executeMutation()})).then((function(n){e=n,null==t.mutationCache.config.onSuccess||t.mutationCache.config.onSuccess(e,t.state.variables,t.state.context,t)})).then((function(){return null==t.options.onSuccess?void 0:t.options.onSuccess(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(e,null,t.state.variables,t.state.context)})).then((function(){return t.dispatch({type:"success",data:e}),e})).catch((function(e){return null==t.mutationCache.config.onError||t.mutationCache.config.onError(e,t.state.variables,t.state.context,t),(0,o.t)().error(e),Promise.resolve().then((function(){return null==t.options.onError?void 0:t.options.onError(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(void 0,e,t.state.variables,t.state.context)})).then((function(){throw t.dispatch({type:"error",error:e}),e}))}))},t.executeMutation=function(){var e,t=this;return this.retryer=new s.eJ({fn:function(){return t.options.mutationFn?t.options.mutationFn(t.state.variables):Promise.reject("No mutationFn found")},onFail:function(){t.dispatch({type:"failed"})},onPause:function(){t.dispatch({type:"pause"})},onContinue:function(){t.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay}),this.retryer.promise},t.dispatch=function(e){var t=this;this.state=function(e,t){switch(t.type){case"failed":return(0,r.A)({},e,{failureCount:e.failureCount+1});case"pause":return(0,r.A)({},e,{isPaused:!0});case"continue":return(0,r.A)({},e,{isPaused:!1});case"loading":return(0,r.A)({},e,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return(0,r.A)({},e,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return(0,r.A)({},e,{data:void 0,error:t.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return(0,r.A)({},e,t.state);default:return e}}(this.state,e),i.j.batch((function(){t.observers.forEach((function(t){t.onMutationUpdate(e)})),t.mutationCache.notify(t)}))},e}();function c(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}},428:(e,t,n)=>{"use strict";n.d(t,{j:()=>o});var r=n(941),o=new(function(){function e(){this.queue=[],this.transactions=0,this.notifyFn=function(e){e()},this.batchNotifyFn=function(e){e()}}var t=e.prototype;return t.batch=function(e){var t;this.transactions++;try{t=e()}finally{this.transactions--,this.transactions||this.flush()}return t},t.schedule=function(e){var t=this;this.transactions?this.queue.push(e):(0,r.G6)((function(){t.notifyFn(e)}))},t.batchCalls=function(e){var t=this;return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];t.schedule((function(){e.apply(void 0,r)}))}},t.flush=function(){var e=this,t=this.queue;this.queue=[],t.length&&(0,r.G6)((function(){e.batchNotifyFn((function(){t.forEach((function(t){e.notifyFn(t)}))}))}))},t.setNotifyFunction=function(e){this.notifyFn=e},t.setBatchNotifyFunction=function(e){this.batchNotifyFn=e},e}())},622:(e,t,n)=>{"use strict";n.d(t,{t:()=>s});var r=n(540),o=n(287),i=n(941),s=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!i.S$&&(null==(t=window)?void 0:t.addEventListener)){var n=function(){return e()};return window.addEventListener("online",n,!1),window.addEventListener("offline",n,!1),function(){window.removeEventListener("online",n),window.removeEventListener("offline",n)}}},t}(0,r.A)(t,e);var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)},n.setEventListener=function(e){var t,n=this;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((function(e){"boolean"==typeof e?n.setOnline(e):n.onOnline()}))},n.setOnline=function(e){this.online=e,e&&this.onOnline()},n.onOnline=function(){this.listeners.forEach((function(e){e()}))},n.isOnline=function(){return"boolean"==typeof this.online?this.online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine},t}(o.Q))},98:(e,t,n)=>{"use strict";n.d(t,{E:()=>y});var r=n(168),o=n(941),i=n(540),s=n(428),a=n(690),u=n(281),c=function(){function e(e){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=e.meta,this.scheduleGc()}var t=e.prototype;return t.setOptions=function(e){var t;this.options=(0,r.A)({},this.defaultOptions,e),this.meta=null==e?void 0:e.meta,this.cacheTime=Math.max(this.cacheTime||0,null!=(t=this.options.cacheTime)?t:3e5)},t.setDefaultOptions=function(e){this.defaultOptions=e},t.scheduleGc=function(){var e=this;this.clearGcTimeout(),(0,o.gn)(this.cacheTime)&&(this.gcTimeout=setTimeout((function(){e.optionalRemove()}),this.cacheTime))},t.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},t.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},t.setData=function(e,t){var n,r,i=this.state.data,s=(0,o.Zw)(e,i);return(null==(n=(r=this.options).isDataEqual)?void 0:n.call(r,i,s))?s=i:!1!==this.options.structuralSharing&&(s=(0,o.BH)(i,s)),this.dispatch({data:s,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt}),s},t.setState=function(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})},t.cancel=function(e){var t,n=this.promise;return null==(t=this.retryer)||t.cancel(e),n?n.then(o.lQ).catch(o.lQ):Promise.resolve()},t.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},t.reset=function(){this.destroy(),this.setState(this.initialState)},t.isActive=function(){return this.observers.some((function(e){return!1!==e.options.enabled}))},t.isFetching=function(){return this.state.isFetching},t.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some((function(e){return e.getCurrentResult().isStale}))},t.isStaleByTime=function(e){return void 0===e&&(e=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!(0,o.j3)(this.state.dataUpdatedAt,e)},t.onFocus=function(){var e,t=this.observers.find((function(e){return e.shouldFetchOnWindowFocus()}));t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.onOnline=function(){var e,t=this.observers.find((function(e){return e.shouldFetchOnReconnect()}));t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.addObserver=function(e){-1===this.observers.indexOf(e)&&(this.observers.push(e),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))},t.removeObserver=function(e){-1!==this.observers.indexOf(e)&&(this.observers=this.observers.filter((function(t){return t!==e})),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:e}))},t.getObserversCount=function(){return this.observers.length},t.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},t.fetch=function(e,t){var n,r,i,s=this;if(this.state.isFetching)if(this.state.dataUpdatedAt&&(null==t?void 0:t.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var c;return null==(c=this.retryer)||c.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){var l=this.observers.find((function(e){return e.options.queryFn}));l&&this.setOptions(l.options)}var f=(0,o.HN)(this.queryKey),d=(0,o.jY)(),h={queryKey:f,pageParam:void 0,meta:this.meta};Object.defineProperty(h,"signal",{enumerable:!0,get:function(){if(d)return s.abortSignalConsumed=!0,d.signal}});var p,m,v={fetchOptions:t,options:this.options,queryKey:f,state:this.state,fetchFn:function(){return s.options.queryFn?(s.abortSignalConsumed=!1,s.options.queryFn(h)):Promise.reject("Missing queryFn")},meta:this.meta};return(null==(n=this.options.behavior)?void 0:n.onFetch)&&(null==(p=this.options.behavior)||p.onFetch(v)),this.revertState=this.state,this.state.isFetching&&this.state.fetchMeta===(null==(r=v.fetchOptions)?void 0:r.meta)||this.dispatch({type:"fetch",meta:null==(m=v.fetchOptions)?void 0:m.meta}),this.retryer=new u.eJ({fn:v.fetchFn,abort:null==d||null==(i=d.abort)?void 0:i.bind(d),onSuccess:function(e){s.setData(e),null==s.cache.config.onSuccess||s.cache.config.onSuccess(e,s),0===s.cacheTime&&s.optionalRemove()},onError:function(e){(0,u.wm)(e)&&e.silent||s.dispatch({type:"error",error:e}),(0,u.wm)(e)||(null==s.cache.config.onError||s.cache.config.onError(e,s),(0,a.t)().error(e)),0===s.cacheTime&&s.optionalRemove()},onFail:function(){s.dispatch({type:"failed"})},onPause:function(){s.dispatch({type:"pause"})},onContinue:function(){s.dispatch({type:"continue"})},retry:v.options.retry,retryDelay:v.options.retryDelay}),this.promise=this.retryer.promise,this.promise},t.dispatch=function(e){var t=this;this.state=this.reducer(this.state,e),s.j.batch((function(){t.observers.forEach((function(t){t.onQueryUpdate(e)})),t.cache.notify({query:t,type:"queryUpdated",action:e})}))},t.getDefaultState=function(e){var t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==e.initialData?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0,r=void 0!==t;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?null!=n?n:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:r?"success":"idle"}},t.reducer=function(e,t){var n,o;switch(t.type){case"failed":return(0,r.A)({},e,{fetchFailureCount:e.fetchFailureCount+1});case"pause":return(0,r.A)({},e,{isPaused:!0});case"continue":return(0,r.A)({},e,{isPaused:!1});case"fetch":return(0,r.A)({},e,{fetchFailureCount:0,fetchMeta:null!=(n=t.meta)?n:null,isFetching:!0,isPaused:!1},!e.dataUpdatedAt&&{error:null,status:"loading"});case"success":return(0,r.A)({},e,{data:t.data,dataUpdateCount:e.dataUpdateCount+1,dataUpdatedAt:null!=(o=t.dataUpdatedAt)?o:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var i=t.error;return(0,u.wm)(i)&&i.revert&&this.revertState?(0,r.A)({},this.revertState):(0,r.A)({},e,{error:i,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return(0,r.A)({},e,{isInvalidated:!0});case"setState":return(0,r.A)({},e,t.state);default:return e}},e}(),l=n(287),f=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.queries=[],n.queriesMap={},n}(0,i.A)(t,e);var n=t.prototype;return n.build=function(e,t,n){var r,i=t.queryKey,s=null!=(r=t.queryHash)?r:(0,o.F$)(i,t),a=this.get(s);return a||(a=new c({cache:this,queryKey:i,queryHash:s,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i),meta:t.meta}),this.add(a)),a},n.add=function(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"queryAdded",query:e}))},n.remove=function(e){var t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter((function(t){return t!==e})),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"queryRemoved",query:e}))},n.clear=function(){var e=this;s.j.batch((function(){e.queries.forEach((function(t){e.remove(t)}))}))},n.get=function(e){return this.queriesMap[e]},n.getAll=function(){return this.queries},n.find=function(e,t){var n=(0,o.b_)(e,t)[0];return void 0===n.exact&&(n.exact=!0),this.queries.find((function(e){return(0,o.MK)(n,e)}))},n.findAll=function(e,t){var n=(0,o.b_)(e,t)[0];return Object.keys(n).length>0?this.queries.filter((function(e){return(0,o.MK)(n,e)})):this.queries},n.notify=function(e){var t=this;s.j.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},n.onFocus=function(){var e=this;s.j.batch((function(){e.queries.forEach((function(e){e.onFocus()}))}))},n.onOnline=function(){var e=this;s.j.batch((function(){e.queries.forEach((function(e){e.onOnline()}))}))},t}(l.Q),d=n(465),h=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.mutations=[],n.mutationId=0,n}(0,i.A)(t,e);var n=t.prototype;return n.build=function(e,t,n){var r=new d.s({mutationCache:this,mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:n,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0,meta:t.meta});return this.add(r),r},n.add=function(e){this.mutations.push(e),this.notify(e)},n.remove=function(e){this.mutations=this.mutations.filter((function(t){return t!==e})),e.cancel(),this.notify(e)},n.clear=function(){var e=this;s.j.batch((function(){e.mutations.forEach((function(t){e.remove(t)}))}))},n.getAll=function(){return this.mutations},n.find=function(e){return void 0===e.exact&&(e.exact=!0),this.mutations.find((function(t){return(0,o.nJ)(e,t)}))},n.findAll=function(e){return this.mutations.filter((function(t){return(0,o.nJ)(e,t)}))},n.notify=function(e){var t=this;s.j.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},n.onFocus=function(){this.resumePausedMutations()},n.onOnline=function(){this.resumePausedMutations()},n.resumePausedMutations=function(){var e=this.mutations.filter((function(e){return e.state.isPaused}));return s.j.batch((function(){return e.reduce((function(e,t){return e.then((function(){return t.continue().catch(o.lQ)}))}),Promise.resolve())}))},t}(l.Q),p=n(289),m=n(622);function v(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}var y=function(){function e(e){void 0===e&&(e={}),this.queryCache=e.queryCache||new f,this.mutationCache=e.mutationCache||new h,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var t=e.prototype;return t.mount=function(){var e=this;this.unsubscribeFocus=p.m.subscribe((function(){p.m.isFocused()&&m.t.isOnline()&&(e.mutationCache.onFocus(),e.queryCache.onFocus())})),this.unsubscribeOnline=m.t.subscribe((function(){p.m.isFocused()&&m.t.isOnline()&&(e.mutationCache.onOnline(),e.queryCache.onOnline())}))},t.unmount=function(){var e,t;null==(e=this.unsubscribeFocus)||e.call(this),null==(t=this.unsubscribeOnline)||t.call(this)},t.isFetching=function(e,t){var n=(0,o.b_)(e,t)[0];return n.fetching=!0,this.queryCache.findAll(n).length},t.isMutating=function(e){return this.mutationCache.findAll((0,r.A)({},e,{fetching:!0})).length},t.getQueryData=function(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state.data},t.getQueriesData=function(e){return this.getQueryCache().findAll(e).map((function(e){return[e.queryKey,e.state.data]}))},t.setQueryData=function(e,t,n){var r=(0,o.vh)(e),i=this.defaultQueryOptions(r);return this.queryCache.build(this,i).setData(t,n)},t.setQueriesData=function(e,t,n){var r=this;return s.j.batch((function(){return r.getQueryCache().findAll(e).map((function(e){var o=e.queryKey;return[o,r.setQueryData(o,t,n)]}))}))},t.getQueryState=function(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state},t.removeQueries=function(e,t){var n=(0,o.b_)(e,t)[0],r=this.queryCache;s.j.batch((function(){r.findAll(n).forEach((function(e){r.remove(e)}))}))},t.resetQueries=function(e,t,n){var i=this,a=(0,o.b_)(e,t,n),u=a[0],c=a[1],l=this.queryCache,f=(0,r.A)({},u,{active:!0});return s.j.batch((function(){return l.findAll(u).forEach((function(e){e.reset()})),i.refetchQueries(f,c)}))},t.cancelQueries=function(e,t,n){var r=this,i=(0,o.b_)(e,t,n),a=i[0],u=i[1],c=void 0===u?{}:u;void 0===c.revert&&(c.revert=!0);var l=s.j.batch((function(){return r.queryCache.findAll(a).map((function(e){return e.cancel(c)}))}));return Promise.all(l).then(o.lQ).catch(o.lQ)},t.invalidateQueries=function(e,t,n){var i,a,u,c=this,l=(0,o.b_)(e,t,n),f=l[0],d=l[1],h=(0,r.A)({},f,{active:null==(i=null!=(a=f.refetchActive)?a:f.active)||i,inactive:null!=(u=f.refetchInactive)&&u});return s.j.batch((function(){return c.queryCache.findAll(f).forEach((function(e){e.invalidate()})),c.refetchQueries(h,d)}))},t.refetchQueries=function(e,t,n){var i=this,a=(0,o.b_)(e,t,n),u=a[0],c=a[1],l=s.j.batch((function(){return i.queryCache.findAll(u).map((function(e){return e.fetch(void 0,(0,r.A)({},c,{meta:{refetchPage:null==u?void 0:u.refetchPage}}))}))})),f=Promise.all(l).then(o.lQ);return(null==c?void 0:c.throwOnError)||(f=f.catch(o.lQ)),f},t.fetchQuery=function(e,t,n){var r=(0,o.vh)(e,t,n),i=this.defaultQueryOptions(r);void 0===i.retry&&(i.retry=!1);var s=this.queryCache.build(this,i);return s.isStaleByTime(i.staleTime)?s.fetch(i):Promise.resolve(s.state.data)},t.prefetchQuery=function(e,t,n){return this.fetchQuery(e,t,n).then(o.lQ).catch(o.lQ)},t.fetchInfiniteQuery=function(e,t,n){var r=(0,o.vh)(e,t,n);return r.behavior={onFetch:function(e){e.fetchFn=function(){var t,n,r,i,s,a,c,l,f,d=null==(t=e.fetchOptions)||null==(n=t.meta)?void 0:n.refetchPage,h=null==(r=e.fetchOptions)||null==(i=r.meta)?void 0:i.fetchMore,p=null==h?void 0:h.pageParam,m="forward"===(null==h?void 0:h.direction),y="backward"===(null==h?void 0:h.direction),g=(null==(s=e.state.data)?void 0:s.pages)||[],b=(null==(a=e.state.data)?void 0:a.pageParams)||[],E=(0,o.jY)(),w=null==E?void 0:E.signal,O=b,C=!1,S=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},A=function(e,t,n,r){return O=r?[t].concat(O):[].concat(O,[t]),r?[n].concat(e):[].concat(e,[n])},T=function(t,n,r,o){if(C)return Promise.reject("Cancelled");if(void 0===r&&!n&&t.length)return Promise.resolve(t);var i={queryKey:e.queryKey,signal:w,pageParam:r,meta:e.meta},s=S(i),a=Promise.resolve(s).then((function(e){return A(t,r,e,o)}));return(0,u.dd)(s)&&(a.cancel=s.cancel),a};if(g.length)if(m){var R=void 0!==p,k=R?p:v(e.options,g);c=T(g,R,k)}else if(y){var N=void 0!==p,_=N?p:(l=e.options,f=g,null==l.getPreviousPageParam?void 0:l.getPreviousPageParam(f[0],f));c=T(g,N,_,!0)}else!function(){O=[];var t=void 0===e.options.getNextPageParam,n=!d||!g[0]||d(g[0],0,g);c=n?T([],t,b[0]):Promise.resolve(A([],b[0],g[0]));for(var r=function(n){c=c.then((function(r){if(!d||!g[n]||d(g[n],n,g)){var o=t?b[n]:v(e.options,r);return T(r,t,o)}return Promise.resolve(A(r,b[n],g[n]))}))},o=1;o<g.length;o++)r(o)}();else c=T([]);var x=c.then((function(e){return{pages:e,pageParams:O}}));return x.cancel=function(){C=!0,null==E||E.abort(),(0,u.dd)(c)&&c.cancel()},x}}},this.fetchQuery(r)},t.prefetchInfiniteQuery=function(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(o.lQ).catch(o.lQ)},t.cancelMutations=function(){var e=this,t=s.j.batch((function(){return e.mutationCache.getAll().map((function(e){return e.cancel()}))}));return Promise.all(t).then(o.lQ).catch(o.lQ)},t.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},t.executeMutation=function(e){return this.mutationCache.build(this,e).execute()},t.getQueryCache=function(){return this.queryCache},t.getMutationCache=function(){return this.mutationCache},t.getDefaultOptions=function(){return this.defaultOptions},t.setDefaultOptions=function(e){this.defaultOptions=e},t.setQueryDefaults=function(e,t){var n=this.queryDefaults.find((function(t){return(0,o.Od)(e)===(0,o.Od)(t.queryKey)}));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})},t.getQueryDefaults=function(e){var t;return e?null==(t=this.queryDefaults.find((function(t){return(0,o.Cp)(e,t.queryKey)})))?void 0:t.defaultOptions:void 0},t.setMutationDefaults=function(e,t){var n=this.mutationDefaults.find((function(t){return(0,o.Od)(e)===(0,o.Od)(t.mutationKey)}));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})},t.getMutationDefaults=function(e){var t;return e?null==(t=this.mutationDefaults.find((function(t){return(0,o.Cp)(e,t.mutationKey)})))?void 0:t.defaultOptions:void 0},t.defaultQueryOptions=function(e){if(null==e?void 0:e._defaulted)return e;var t=(0,r.A)({},this.defaultOptions.queries,this.getQueryDefaults(null==e?void 0:e.queryKey),e,{_defaulted:!0});return!t.queryHash&&t.queryKey&&(t.queryHash=(0,o.F$)(t.queryKey,t)),t},t.defaultQueryObserverOptions=function(e){return this.defaultQueryOptions(e)},t.defaultMutationOptions=function(e){return(null==e?void 0:e._defaulted)?e:(0,r.A)({},this.defaultOptions.mutations,this.getMutationDefaults(null==e?void 0:e.mutationKey),e,{_defaulted:!0})},t.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},e}()},281:(e,t,n)=>{"use strict";n.d(t,{dd:()=>a,eJ:()=>l,wm:()=>c});var r=n(289),o=n(622),i=n(941);function s(e){return Math.min(1e3*Math.pow(2,e),3e4)}function a(e){return"function"==typeof(null==e?void 0:e.cancel)}var u=function(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent};function c(e){return e instanceof u}var l=function(e){var t,n,c,l,f=this,d=!1;this.abort=e.abort,this.cancel=function(e){return null==t?void 0:t(e)},this.cancelRetry=function(){d=!0},this.continueRetry=function(){d=!1},this.continue=function(){return null==n?void 0:n()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise((function(e,t){c=e,l=t}));var h=function(t){f.isResolved||(f.isResolved=!0,null==e.onSuccess||e.onSuccess(t),null==n||n(),c(t))},p=function(t){f.isResolved||(f.isResolved=!0,null==e.onError||e.onError(t),null==n||n(),l(t))};!function c(){if(!f.isResolved){var l;try{l=e.fn()}catch(e){l=Promise.reject(e)}t=function(e){if(!f.isResolved&&(p(new u(e)),null==f.abort||f.abort(),a(l)))try{l.cancel()}catch(e){}},f.isTransportCancelable=a(l),Promise.resolve(l).then(h).catch((function(t){var a,u;if(!f.isResolved){var l=null!=(a=e.retry)?a:3,h=null!=(u=e.retryDelay)?u:s,m="function"==typeof h?h(f.failureCount,t):h,v=!0===l||"number"==typeof l&&f.failureCount<l||"function"==typeof l&&l(f.failureCount,t);!d&&v?(f.failureCount++,null==e.onFail||e.onFail(f.failureCount,t),(0,i.yy)(m).then((function(){if(!r.m.isFocused()||!o.t.isOnline())return new Promise((function(t){n=t,f.isPaused=!0,null==e.onPause||e.onPause()})).then((function(){n=void 0,f.isPaused=!1,null==e.onContinue||e.onContinue()}))})).then((function(){d?p(t):c()}))):p(t)}}))}}()}},287:(e,t,n)=>{"use strict";n.d(t,{Q:()=>r});var r=function(){function e(){this.listeners=[]}var t=e.prototype;return t.subscribe=function(e){var t=this,n=e||function(){};return this.listeners.push(n),this.onSubscribe(),function(){t.listeners=t.listeners.filter((function(e){return e!==n})),t.onUnsubscribe()}},t.hasListeners=function(){return this.listeners.length>0},t.onSubscribe=function(){},t.onUnsubscribe=function(){},e}()},449:()=>{},941:(e,t,n)=>{"use strict";n.d(t,{BH:()=>b,Cp:()=>y,F$:()=>m,G6:()=>A,GR:()=>f,HN:()=>u,MK:()=>h,Od:()=>v,S$:()=>o,Zw:()=>s,b_:()=>d,f8:()=>E,gn:()=>a,j3:()=>c,jY:()=>T,lQ:()=>i,nJ:()=>p,vh:()=>l,yy:()=>S});var r=n(168),o="undefined"==typeof window;function i(){}function s(e,t){return"function"==typeof e?e(t):e}function a(e){return"number"==typeof e&&e>=0&&e!==1/0}function u(e){return Array.isArray(e)?e:[e]}function c(e,t){return Math.max(e+(t||0)-Date.now(),0)}function l(e,t,n){return C(e)?"function"==typeof t?(0,r.A)({},n,{queryKey:e,queryFn:t}):(0,r.A)({},t,{queryKey:e}):e}function f(e,t,n){return C(e)?"function"==typeof t?(0,r.A)({},n,{mutationKey:e,mutationFn:t}):(0,r.A)({},t,{mutationKey:e}):"function"==typeof e?(0,r.A)({},t,{mutationFn:e}):(0,r.A)({},e)}function d(e,t,n){return C(e)?[(0,r.A)({},t,{queryKey:e}),n]:[e||{},t]}function h(e,t){var n=e.active,r=e.exact,o=e.fetching,i=e.inactive,s=e.predicate,a=e.queryKey,u=e.stale;if(C(a))if(r){if(t.queryHash!==m(a,t.options))return!1}else if(!y(t.queryKey,a))return!1;var c=function(e,t){return!0===e&&!0===t||null==e&&null==t?"all":!1===e&&!1===t?"none":(null!=e?e:!t)?"active":"inactive"}(n,i);if("none"===c)return!1;if("all"!==c){var l=t.isActive();if("active"===c&&!l)return!1;if("inactive"===c&&l)return!1}return!("boolean"==typeof u&&t.isStale()!==u||"boolean"==typeof o&&t.isFetching()!==o||s&&!s(t))}function p(e,t){var n=e.exact,r=e.fetching,o=e.predicate,i=e.mutationKey;if(C(i)){if(!t.options.mutationKey)return!1;if(n){if(v(t.options.mutationKey)!==v(i))return!1}else if(!y(t.options.mutationKey,i))return!1}return!("boolean"==typeof r&&"loading"===t.state.status!==r||o&&!o(t))}function m(e,t){return((null==t?void 0:t.queryKeyHashFn)||v)(e)}function v(e){var t;return t=u(e),JSON.stringify(t,(function(e,t){return w(t)?Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{}):t}))}function y(e,t){return g(u(e),u(t))}function g(e,t){return e===t||typeof e==typeof t&&!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((function(n){return!g(e[n],t[n])}))}function b(e,t){if(e===t)return e;var n=Array.isArray(e)&&Array.isArray(t);if(n||w(e)&&w(t)){for(var r=n?e.length:Object.keys(e).length,o=n?t:Object.keys(t),i=o.length,s=n?[]:{},a=0,u=0;u<i;u++){var c=n?u:o[u];s[c]=b(e[c],t[c]),s[c]===e[c]&&a++}return r===i&&a===r?e:s}return t}function E(e,t){if(e&&!t||t&&!e)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}function w(e){if(!O(e))return!1;var t=e.constructor;if(void 0===t)return!0;var n=t.prototype;return!!O(n)&&!!n.hasOwnProperty("isPrototypeOf")}function O(e){return"[object Object]"===Object.prototype.toString.call(e)}function C(e){return"string"==typeof e||Array.isArray(e)}function S(e){return new Promise((function(t){setTimeout(t,e)}))}function A(e){Promise.resolve().then(e).catch((function(e){return setTimeout((function(){throw e}))}))}function T(){if("function"==typeof AbortController)return new AbortController}},942:(e,t,n)=>{"use strict";n.d(t,{QueryClient:()=>r.QueryClient,QueryClientProvider:()=>o.QueryClientProvider,useMutation:()=>o.useMutation,useQuery:()=>o.useQuery,useQueryClient:()=>o.useQueryClient});var r=n(468);n.o(r,"QueryClientProvider")&&n.d(t,{QueryClientProvider:function(){return r.QueryClientProvider}}),n.o(r,"useMutation")&&n.d(t,{useMutation:function(){return r.useMutation}}),n.o(r,"useQuery")&&n.d(t,{useQuery:function(){return r.useQuery}}),n.o(r,"useQueryClient")&&n.d(t,{useQueryClient:function(){return r.useQueryClient}});var o=n(960)},360:(e,t,n)=>{"use strict";n.d(t,{H:()=>c,j:()=>u});var r=n(609),o=n.n(r),i=o().createContext(void 0),s=o().createContext(!1);function a(e){return e&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=i),window.ReactQueryClientContext):i}var u=function(){var e=o().useContext(a(o().useContext(s)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},c=function(e){var t=e.client,n=e.contextSharing,r=void 0!==n&&n,i=e.children;o().useEffect((function(){return t.mount(),function(){t.unmount()}}),[t]);var u=a(r);return o().createElement(s.Provider,{value:r},o().createElement(u.Provider,{value:t},i))}},960:(e,t,n)=>{"use strict";n.d(t,{QueryClientProvider:()=>u.H,useMutation:()=>c.n,useQuery:()=>l.I,useQueryClient:()=>u.j});var r=n(428),o=n(795),i=n.n(o)().unstable_batchedUpdates;r.j.setBatchNotifyFunction(i);var s=n(690),a=console;(0,s.B)(a);var u=n(360),c=n(990),l=n(584)},990:(e,t,n)=>{"use strict";n.d(t,{n:()=>h});var r=n(168),o=n(609),i=n.n(o),s=n(428),a=n(941),u=n(540),c=n(465),l=function(e){function t(t,n){var r;return(r=e.call(this)||this).client=t,r.setOptions(n),r.bindMethods(),r.updateResult(),r}(0,u.A)(t,e);var n=t.prototype;return n.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},n.setOptions=function(e){this.options=this.client.defaultMutationOptions(e)},n.onUnsubscribe=function(){var e;this.listeners.length||null==(e=this.currentMutation)||e.removeObserver(this)},n.onMutationUpdate=function(e){this.updateResult();var t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)},n.getCurrentResult=function(){return this.currentResult},n.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},n.mutate=function(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,(0,r.A)({},this.options,{variables:void 0!==e?e:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},n.updateResult=function(){var e=this.currentMutation?this.currentMutation.state:(0,c.$)(),t=(0,r.A)({},e,{isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset});this.currentResult=t},n.notify=function(e){var t=this;s.j.batch((function(){t.mutateOptions&&(e.onSuccess?(null==t.mutateOptions.onSuccess||t.mutateOptions.onSuccess(t.currentResult.data,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(t.currentResult.data,null,t.currentResult.variables,t.currentResult.context)):e.onError&&(null==t.mutateOptions.onError||t.mutateOptions.onError(t.currentResult.error,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(void 0,t.currentResult.error,t.currentResult.variables,t.currentResult.context))),e.listeners&&t.listeners.forEach((function(e){e(t.currentResult)}))}))},t}(n(287).Q),f=n(360),d=n(439);function h(e,t,n){var o=i().useRef(!1),u=i().useState(0)[1],c=(0,a.GR)(e,t,n),h=(0,f.j)(),p=i().useRef();p.current?p.current.setOptions(c):p.current=new l(h,c);var m=p.current.getCurrentResult();i().useEffect((function(){o.current=!0;var e=p.current.subscribe(s.j.batchCalls((function(){o.current&&u((function(e){return e+1}))})));return function(){o.current=!1,e()}}),[]);var v=i().useCallback((function(e,t){p.current.mutate(e,t).catch(a.lQ)}),[]);if(m.error&&(0,d.G)(void 0,p.current.options.useErrorBoundary,[m.error]))throw m.error;return(0,r.A)({},m,{mutate:v,mutateAsync:m.mutate})}},584:(e,t,n)=>{"use strict";n.d(t,{I:()=>C});var r=n(168),o=n(540),i=n(941),s=n(428),a=n(289),u=n(287),c=n(690),l=n(281),f=function(e){function t(t,n){var r;return(r=e.call(this)||this).client=t,r.options=n,r.trackedProps=[],r.selectError=null,r.bindMethods(),r.setOptions(n),r}(0,o.A)(t,e);var n=t.prototype;return n.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},n.onSubscribe=function(){1===this.listeners.length&&(this.currentQuery.addObserver(this),d(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},n.onUnsubscribe=function(){this.listeners.length||this.destroy()},n.shouldFetchOnReconnect=function(){return h(this.currentQuery,this.options,this.options.refetchOnReconnect)},n.shouldFetchOnWindowFocus=function(){return h(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},n.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},n.setOptions=function(e,t){var n=this.options,r=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled)throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();var o=this.hasListeners();o&&p(this.currentQuery,r,this.options,n)&&this.executeFetch(),this.updateResult(t),!o||this.currentQuery===r&&this.options.enabled===n.enabled&&this.options.staleTime===n.staleTime||this.updateStaleTimeout();var i=this.computeRefetchInterval();!o||this.currentQuery===r&&this.options.enabled===n.enabled&&i===this.currentRefetchInterval||this.updateRefetchInterval(i)},n.getOptimisticResult=function(e){var t=this.client.defaultQueryObserverOptions(e),n=this.client.getQueryCache().build(this.client,t);return this.createResult(n,t)},n.getCurrentResult=function(){return this.currentResult},n.trackResult=function(e,t){var n=this,r={},o=function(e){n.trackedProps.includes(e)||n.trackedProps.push(e)};return Object.keys(e).forEach((function(t){Object.defineProperty(r,t,{configurable:!1,enumerable:!0,get:function(){return o(t),e[t]}})})),(t.useErrorBoundary||t.suspense)&&o("error"),r},n.getNextResult=function(e){var t=this;return new Promise((function(n,r){var o=t.subscribe((function(t){t.isFetching||(o(),t.isError&&(null==e?void 0:e.throwOnError)?r(t.error):n(t))}))}))},n.getCurrentQuery=function(){return this.currentQuery},n.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},n.refetch=function(e){return this.fetch((0,r.A)({},e,{meta:{refetchPage:null==e?void 0:e.refetchPage}}))},n.fetchOptimistic=function(e){var t=this,n=this.client.defaultQueryObserverOptions(e),r=this.client.getQueryCache().build(this.client,n);return r.fetch().then((function(){return t.createResult(r,n)}))},n.fetch=function(e){var t=this;return this.executeFetch(e).then((function(){return t.updateResult(),t.currentResult}))},n.executeFetch=function(e){this.updateQuery();var t=this.currentQuery.fetch(this.options,e);return(null==e?void 0:e.throwOnError)||(t=t.catch(i.lQ)),t},n.updateStaleTimeout=function(){var e=this;if(this.clearStaleTimeout(),!i.S$&&!this.currentResult.isStale&&(0,i.gn)(this.options.staleTime)){var t=(0,i.j3)(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout((function(){e.currentResult.isStale||e.updateResult()}),t)}},n.computeRefetchInterval=function(){var e;return"function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(e=this.options.refetchInterval)&&e},n.updateRefetchInterval=function(e){var t=this;this.clearRefetchInterval(),this.currentRefetchInterval=e,!i.S$&&!1!==this.options.enabled&&(0,i.gn)(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval((function(){(t.options.refetchIntervalInBackground||a.m.isFocused())&&t.executeFetch()}),this.currentRefetchInterval))},n.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},n.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},n.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},n.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},n.createResult=function(e,t){var n,r=this.currentQuery,o=this.options,s=this.currentResult,a=this.currentResultState,u=this.currentResultOptions,l=e!==r,f=l?e.state:this.currentQueryInitialState,h=l?this.currentResult:this.previousQueryResult,v=e.state,y=v.dataUpdatedAt,g=v.error,b=v.errorUpdatedAt,E=v.isFetching,w=v.status,O=!1,C=!1;if(t.optimisticResults){var S=this.hasListeners(),A=!S&&d(e,t),T=S&&p(e,r,t,o);(A||T)&&(E=!0,y||(w="loading"))}if(t.keepPreviousData&&!v.dataUpdateCount&&(null==h?void 0:h.isSuccess)&&"error"!==w)n=h.data,y=h.dataUpdatedAt,w=h.status,O=!0;else if(t.select&&void 0!==v.data)if(s&&v.data===(null==a?void 0:a.data)&&t.select===this.selectFn)n=this.selectResult;else try{this.selectFn=t.select,n=t.select(v.data),!1!==t.structuralSharing&&(n=(0,i.BH)(null==s?void 0:s.data,n)),this.selectResult=n,this.selectError=null}catch(e){(0,c.t)().error(e),this.selectError=e}else n=v.data;if(void 0!==t.placeholderData&&void 0===n&&("loading"===w||"idle"===w)){var R;if((null==s?void 0:s.isPlaceholderData)&&t.placeholderData===(null==u?void 0:u.placeholderData))R=s.data;else if(R="function"==typeof t.placeholderData?t.placeholderData():t.placeholderData,t.select&&void 0!==R)try{R=t.select(R),!1!==t.structuralSharing&&(R=(0,i.BH)(null==s?void 0:s.data,R)),this.selectError=null}catch(e){(0,c.t)().error(e),this.selectError=e}void 0!==R&&(w="success",n=R,C=!0)}return this.selectError&&(g=this.selectError,n=this.selectResult,b=Date.now(),w="error"),{status:w,isLoading:"loading"===w,isSuccess:"success"===w,isError:"error"===w,isIdle:"idle"===w,data:n,dataUpdatedAt:y,error:g,errorUpdatedAt:b,failureCount:v.fetchFailureCount,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>f.dataUpdateCount||v.errorUpdateCount>f.errorUpdateCount,isFetching:E,isRefetching:E&&"loading"!==w,isLoadingError:"error"===w&&0===v.dataUpdatedAt,isPlaceholderData:C,isPreviousData:O,isRefetchError:"error"===w&&0!==v.dataUpdatedAt,isStale:m(e,t),refetch:this.refetch,remove:this.remove}},n.shouldNotifyListeners=function(e,t){if(!t)return!0;var n=this.options,r=n.notifyOnChangeProps,o=n.notifyOnChangePropsExclusions;if(!r&&!o)return!0;if("tracked"===r&&!this.trackedProps.length)return!0;var i="tracked"===r?this.trackedProps:r;return Object.keys(e).some((function(n){var r=n,s=e[r]!==t[r],a=null==i?void 0:i.some((function(e){return e===n})),u=null==o?void 0:o.some((function(e){return e===n}));return s&&!u&&(!i||a)}))},n.updateResult=function(e){var t=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!(0,i.f8)(this.currentResult,t)){var n={cache:!0};!1!==(null==e?void 0:e.listeners)&&this.shouldNotifyListeners(this.currentResult,t)&&(n.listeners=!0),this.notify((0,r.A)({},n,e))}},n.updateQuery=function(){var e=this.client.getQueryCache().build(this.client,this.options);if(e!==this.currentQuery){var t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}},n.onQueryUpdate=function(e){var t={};"success"===e.type?t.onSuccess=!0:"error"!==e.type||(0,l.wm)(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()},n.notify=function(e){var t=this;s.j.batch((function(){e.onSuccess?(null==t.options.onSuccess||t.options.onSuccess(t.currentResult.data),null==t.options.onSettled||t.options.onSettled(t.currentResult.data,null)):e.onError&&(null==t.options.onError||t.options.onError(t.currentResult.error),null==t.options.onSettled||t.options.onSettled(void 0,t.currentResult.error)),e.listeners&&t.listeners.forEach((function(e){e(t.currentResult)})),e.cache&&t.client.getQueryCache().notify({query:t.currentQuery,type:"observerResultsUpdated"})}))},t}(u.Q);function d(e,t){return function(e,t){return!(!1===t.enabled||e.state.dataUpdatedAt||"error"===e.state.status&&!1===t.retryOnMount)}(e,t)||e.state.dataUpdatedAt>0&&h(e,t,t.refetchOnMount)}function h(e,t,n){if(!1!==t.enabled){var r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&m(e,t)}return!1}function p(e,t,n,r){return!1!==n.enabled&&(e!==t||!1===r.enabled)&&(!n.suspense||"error"!==e.state.status)&&m(e,n)}function m(e,t){return e.isStaleByTime(t.staleTime)}var v=n(609),y=n.n(v);var g,b=y().createContext((g=!1,{clearReset:function(){g=!1},reset:function(){g=!0},isReset:function(){return g}})),E=function(){return y().useContext(b)},w=n(360),O=n(439);function C(e,t,n){return function(e,t){var n=y().useRef(!1),r=y().useState(0)[1],o=(0,w.j)(),i=E(),a=o.defaultQueryObserverOptions(e);a.optimisticResults=!0,a.onError&&(a.onError=s.j.batchCalls(a.onError)),a.onSuccess&&(a.onSuccess=s.j.batchCalls(a.onSuccess)),a.onSettled&&(a.onSettled=s.j.batchCalls(a.onSettled)),a.suspense&&("number"!=typeof a.staleTime&&(a.staleTime=1e3),0===a.cacheTime&&(a.cacheTime=1)),(a.suspense||a.useErrorBoundary)&&(i.isReset()||(a.retryOnMount=!1));var u=y().useState((function(){return new t(o,a)}))[0],c=u.getOptimisticResult(a);if(y().useEffect((function(){n.current=!0,i.clearReset();var e=u.subscribe(s.j.batchCalls((function(){n.current&&r((function(e){return e+1}))})));return u.updateResult(),function(){n.current=!1,e()}}),[i,u]),y().useEffect((function(){u.setOptions(a,{listeners:!1})}),[a,u]),a.suspense&&c.isLoading)throw u.fetchOptimistic(a).then((function(e){var t=e.data;null==a.onSuccess||a.onSuccess(t),null==a.onSettled||a.onSettled(t,null)})).catch((function(e){i.clearReset(),null==a.onError||a.onError(e),null==a.onSettled||a.onSettled(void 0,e)}));if(c.isError&&!i.isReset()&&!c.isFetching&&(0,O.G)(a.suspense,a.useErrorBoundary,[c.error,u.getCurrentQuery()]))throw c.error;return"tracked"===a.notifyOnChangeProps&&(c=u.trackResult(c,a)),c}((0,i.vh)(e,t,n),f)}},439:(e,t,n)=>{"use strict";function r(e,t,n){return"function"==typeof t?t.apply(void 0,n):"boolean"==typeof t?t:!!e}n.d(t,{G:()=>r})},609:e=>{"use strict";e.exports=window.React},795:e=>{"use strict";e.exports=window.ReactDOM},168:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{A:()=>r})},540:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,{A:()=>o})}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.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.r(e),n.d(e,{hasBrowserEnv:()=>fe,hasStandardBrowserEnv:()=>de,hasStandardBrowserWebWorkerEnv:()=>pe});var t=n(609),r=n.n(t),o=n(795),i=n.n(o),s=n(942);const a=window.wp.components;function u(e){const n={display:e.display?e.display:"block",maxWidth:e.width?e.width:"350px"};return(0,t.createElement)("div",{style:n},(0,t.createElement)("label",{style:{display:"block",fontSize:"11px",textTransform:"uppercase"}},e.label),(0,t.createElement)("select",{value:e.value,onChange:t=>e.onChange(t.target.value)},e.options.map((e=>(0,t.createElement)("option",{value:e.value},e.label)))))}var c=n(838),l=n.n(c);function f(e){const{innerHTML:n}=e,r=l().sanitize(n).replace("class=","className=");return(0,t.createElement)("div",{dangerouslySetInnerHTML:{__html:r}})}function d(e,t){return function(){return e.apply(t,arguments)}}const{toString:h}=Object.prototype,{getPrototypeOf:p}=Object,m=(v=Object.create(null),e=>{const t=h.call(e);return v[t]||(v[t]=t.slice(8,-1).toLowerCase())});var v;const y=e=>(e=e.toLowerCase(),t=>m(t)===e),g=e=>t=>typeof t===e,{isArray:b}=Array,E=g("undefined"),w=y("ArrayBuffer"),O=g("string"),C=g("function"),S=g("number"),A=e=>null!==e&&"object"==typeof e,T=e=>{if("object"!==m(e))return!1;const t=p(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},R=y("Date"),k=y("File"),N=y("Blob"),_=y("FileList"),x=y("URLSearchParams");function P(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),b(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(r=0;r<i;r++)s=o[r],t.call(null,e[s],s,e)}}function D(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const F="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,L=e=>!E(e)&&e!==F,M=(I="undefined"!=typeof Uint8Array&&p(Uint8Array),e=>I&&e instanceof I);var I;const U=y("HTMLFormElement"),j=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Q=y("RegExp"),q=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};P(n,((n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)})),Object.defineProperties(e,r)},B="abcdefghijklmnopqrstuvwxyz",H="0123456789",z={DIGIT:H,ALPHA:B,ALPHA_DIGIT:B+B.toUpperCase()+H},K=y("AsyncFunction"),G={isArray:b,isArrayBuffer:w,isBuffer:function(e){return null!==e&&!E(e)&&null!==e.constructor&&!E(e.constructor)&&C(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||C(e.append)&&("formdata"===(t=m(e))||"object"===t&&C(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&w(e.buffer),t},isString:O,isNumber:S,isBoolean:e=>!0===e||!1===e,isObject:A,isPlainObject:T,isUndefined:E,isDate:R,isFile:k,isBlob:N,isRegExp:Q,isFunction:C,isStream:e=>A(e)&&C(e.pipe),isURLSearchParams:x,isTypedArray:M,isFileList:_,forEach:P,merge:function e(){const{caseless:t}=L(this)&&this||{},n={},r=(r,o)=>{const i=t&&D(n,o)||o;T(n[i])&&T(r)?n[i]=e(n[i],r):T(r)?n[i]=e({},r):b(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&P(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(P(t,((t,r)=>{n&&C(t)?e[r]=d(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,s;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],r&&!r(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==n&&p(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:m,kindOfTest:y,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(b(e))return e;let t=e.length;if(!S(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:U,hasOwnProperty:j,hasOwnProp:j,reduceDescriptors:q,freezeMethods:e=>{q(e,((t,n)=>{if(C(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];C(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return b(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:D,global:F,isContextDefined:L,ALPHABET:z,generateString:(e=16,t=z.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&C(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(A(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=b(e)?[]:{};return P(e,((e,t)=>{const i=n(e,r+1);!E(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:K,isThenable:e=>e&&(A(e)||C(e))&&C(e.then)&&C(e.catch)};function W(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}G.inherits(W,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:G.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const V=W.prototype,J={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{J[e]={value:e}})),Object.defineProperties(W,J),Object.defineProperty(V,"isAxiosError",{value:!0}),W.from=(e,t,n,r,o,i)=>{const s=Object.create(V);return G.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),W.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const Y=W;function $(e){return G.isPlainObject(e)||G.isArray(e)}function X(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function Z(e,t,n){return e?e.concat(t).map((function(e,t){return e=X(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const ee=G.toFlatObject(G,{},null,(function(e){return/^is[A-Z]/.test(e)})),te=function(e,t,n){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=G.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!G.isUndefined(t[e])}))).metaTokens,o=n.visitor||c,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&G.isSpecCompliantForm(t);if(!G.isFunction(o))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(G.isDate(e))return e.toISOString();if(!a&&G.isBlob(e))throw new Y("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(e)||G.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(G.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(G.isArray(e)&&function(e){return G.isArray(e)&&!e.some($)}(e)||(G.isFileList(e)||G.endsWith(n,"[]"))&&(a=G.toArray(e)))return n=X(n),a.forEach((function(e,r){!G.isUndefined(e)&&null!==e&&t.append(!0===s?Z([n],r,i):null===s?n:n+"[]",u(e))})),!1;return!!$(e)||(t.append(Z(o,n,i),u(e)),!1)}const l=[],f=Object.assign(ee,{defaultVisitor:c,convertValue:u,isVisitable:$});if(!G.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!G.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),G.forEach(n,(function(n,i){!0===(!(G.isUndefined(n)||null===n)&&o.call(t,n,G.isString(i)?i.trim():i,r,f))&&e(n,r?r.concat(i):[i])})),l.pop()}}(e),t};function ne(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function re(e,t){this._pairs=[],e&&te(e,this,t)}const oe=re.prototype;oe.append=function(e,t){this._pairs.push([e,t])},oe.toString=function(e){const t=e?function(t){return e.call(this,t,ne)}:ne;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const ie=re;function se(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ae(e,t,n){if(!t)return e;const r=n&&n.encode||se,o=n&&n.serialize;let i;if(i=o?o(t,n):G.isURLSearchParams(t)?t.toString():new ie(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const ue=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){G.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ce={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},le={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ie,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},fe="undefined"!=typeof window&&"undefined"!=typeof document,de=(he="undefined"!=typeof navigator&&navigator.product,fe&&["ReactNative","NativeScript","NS"].indexOf(he)<0);var he;const pe="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,me={...e,...le},ve=function(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=e.length;return i=!i&&G.isArray(r)?r.length:i,a?(G.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s):(r[i]&&G.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&G.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!s)}if(G.isFormData(e)&&G.isFunction(e.entries)){const n={};return G.forEachEntry(e,((e,r)=>{t(function(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null},ye={transitional:ce,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=G.isObject(e);if(o&&G.isHTMLForm(e)&&(e=new FormData(e)),G.isFormData(e))return r?JSON.stringify(ve(e)):e;if(G.isArrayBuffer(e)||G.isBuffer(e)||G.isStream(e)||G.isFile(e)||G.isBlob(e))return e;if(G.isArrayBufferView(e))return e.buffer;if(G.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return te(e,new me.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return me.isNode&&G.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=G.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return te(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(G.isString(e))try{return(0,JSON.parse)(e),G.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ye.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&G.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw Y.from(e,Y.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:me.classes.FormData,Blob:me.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};G.forEach(["delete","get","head","post","put","patch"],(e=>{ye.headers[e]={}}));const ge=ye,be=G.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ee=Symbol("internals");function we(e){return e&&String(e).trim().toLowerCase()}function Oe(e){return!1===e||null==e?e:G.isArray(e)?e.map(Oe):String(e)}function Ce(e,t,n,r,o){return G.isFunction(r)?r.call(this,t,n):(o&&(t=n),G.isString(t)?G.isString(r)?-1!==t.indexOf(r):G.isRegExp(r)?r.test(t):void 0:void 0)}class Se{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=we(t);if(!o)throw new Error("header name must be a non-empty string");const i=G.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Oe(e))}const i=(e,t)=>G.forEach(e,((e,n)=>o(e,n,t)));return G.isPlainObject(e)||e instanceof this.constructor?i(e,t):G.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&be[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=we(e)){const n=G.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(G.isFunction(t))return t.call(this,e,n);if(G.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=we(e)){const n=G.findKey(this,e);return!(!n||void 0===this[n]||t&&!Ce(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=we(e)){const o=G.findKey(n,e);!o||t&&!Ce(0,n[o],o,t)||(delete n[o],r=!0)}}return G.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!Ce(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return G.forEach(this,((r,o)=>{const i=G.findKey(n,o);if(i)return t[i]=Oe(r),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();s!==o&&delete t[o],t[s]=Oe(r),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return G.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&G.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Ee]=this[Ee]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=we(e);t[r]||(function(e,t){const n=G.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return G.isArray(e)?e.forEach(r):r(e),this}}Se.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),G.reduceDescriptors(Se.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),G.freezeMethods(Se);const Ae=Se;function Te(e,t){const n=this||ge,r=t||n,o=Ae.from(r.headers);let i=r.data;return G.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Re(e){return!(!e||!e.__CANCEL__)}function ke(e,t,n){Y.call(this,null==e?"canceled":e,Y.ERR_CANCELED,t,n),this.name="CanceledError"}G.inherits(ke,Y,{__CANCEL__:!0});const Ne=ke,_e=me.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const s=[e+"="+encodeURIComponent(t)];G.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),G.isString(r)&&s.push("path="+r),G.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function xe(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Pe=me.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=G.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function De(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const u=Date.now(),c=r[s];o||(o=u),n[i]=a,r[i]=u;let l=s,f=0;for(;l!==i;)f+=n[l++],l%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),u-o<t)return;const d=c&&u-c;return d?Math.round(1e3*f/d):void 0}}(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-n,u=r(a);n=i;const c={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:u||void 0,estimated:u&&s&&i<=s?(s-i)/u:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}const Fe={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=Ae.from(e.headers).normalize();let i,s,{responseType:a,withXSRFToken:u}=e;function c(){e.cancelToken&&e.cancelToken.unsubscribe(i),e.signal&&e.signal.removeEventListener("abort",i)}if(G.isFormData(r))if(me.hasStandardBrowserEnv||me.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(s=o.getContentType())){const[e,...t]=s?s.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const f=xe(e.baseURL,e.url);function d(){if(!l)return;const r=Ae.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Y("Request failed with status code "+n.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),c()}),(function(e){n(e),c()}),{data:a&&"text"!==a&&"json"!==a?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),ae(f,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(d)},l.onabort=function(){l&&(n(new Y("Request aborted",Y.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new Y("Network Error",Y.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||ce;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new Y(t,r.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,e,l)),l=null},me.hasStandardBrowserEnv&&(u&&G.isFunction(u)&&(u=u(e)),u||!1!==u&&Pe(f))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&_e.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),"setRequestHeader"in l&&G.forEach(o.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),G.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),a&&"json"!==a&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",De(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",De(e.onUploadProgress)),(e.cancelToken||e.signal)&&(i=t=>{l&&(n(!t||t.type?new Ne(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(i),e.signal&&(e.signal.aborted?i():e.signal.addEventListener("abort",i)));const h=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(f);h&&-1===me.protocols.indexOf(h)?n(new Y("Unsupported protocol "+h+":",Y.ERR_BAD_REQUEST,e)):l.send(r||null)}))}};G.forEach(Fe,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Le=e=>`- ${e}`,Me=e=>G.isFunction(e)||null===e||!1===e,Ie=e=>{e=G.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){let t;if(n=e[i],r=n,!Me(n)&&(r=Fe[(t=String(n)).toLowerCase()],void 0===r))throw new Y(`Unknown adapter '${t}'`);if(r)break;o[t||"#"+i]=r}if(!r){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(Le).join("\n"):" "+Le(e[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function Ue(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ne(null,e)}function je(e){return Ue(e),e.headers=Ae.from(e.headers),e.data=Te.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ie(e.adapter||ge.adapter)(e).then((function(t){return Ue(e),t.data=Te.call(e,e.transformResponse,t),t.headers=Ae.from(t.headers),t}),(function(t){return Re(t)||(Ue(e),t&&t.response&&(t.response.data=Te.call(e,e.transformResponse,t.response),t.response.headers=Ae.from(t.response.headers))),Promise.reject(t)}))}const Qe=e=>e instanceof Ae?{...e}:e;function qe(e,t){t=t||{};const n={};function r(e,t,n){return G.isPlainObject(e)&&G.isPlainObject(t)?G.merge.call({caseless:n},e,t):G.isPlainObject(t)?G.merge({},t):G.isArray(t)?t.slice():t}function o(e,t,n){return G.isUndefined(t)?G.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!G.isUndefined(t))return r(void 0,t)}function s(e,t){return G.isUndefined(t)?G.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const u={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>o(Qe(e),Qe(t),!0)};return G.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=u[r]||o,s=i(e[r],t[r],r);G.isUndefined(s)&&i!==a||(n[r]=s)})),n}const Be={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Be[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const He={};Be.transitional=function(e,t,n){function r(e,t){return"[Axios v1.6.8] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new Y(r(o," has been removed"+(t?" in "+t:"")),Y.ERR_DEPRECATED);return t&&!He[o]&&(He[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}};const ze={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new Y("option "+i+" must be "+n,Y.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Y("Unknown option "+i,Y.ERR_BAD_OPTION)}},validators:Be},Ke=ze.validators;class Ge{constructor(e){this.defaults=e,this.interceptors={request:new ue,response:new ue}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=qe(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&ze.assertOptions(n,{silentJSONParsing:Ke.transitional(Ke.boolean),forcedJSONParsing:Ke.transitional(Ke.boolean),clarifyTimeoutError:Ke.transitional(Ke.boolean)},!1),null!=r&&(G.isFunction(r)?t.paramsSerializer={serialize:r}:ze.assertOptions(r,{encode:Ke.function,serialize:Ke.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&G.merge(o.common,o[t.method]);o&&G.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Ae.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const u=[];let c;this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)}));let l,f=0;if(!a){const e=[je.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,u),l=e.length,c=Promise.resolve(t);f<l;)c=c.then(e[f++],e[f++]);return c}l=s.length;let d=t;for(f=0;f<l;){const e=s[f++],t=s[f++];try{d=e(d)}catch(e){t.call(this,e);break}}try{c=je.call(this,d)}catch(e){return Promise.reject(e)}for(f=0,l=u.length;f<l;)c=c.then(u[f++],u[f++]);return c}getUri(e){return ae(xe((e=qe(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}G.forEach(["delete","get","head","options"],(function(e){Ge.prototype[e]=function(t,n){return this.request(qe(n||{},{method:e,url:t,data:(n||{}).data}))}})),G.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(qe(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Ge.prototype[e]=t(),Ge.prototype[e+"Form"]=t(!0)}));const We=Ge;class Ve{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new Ne(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Ve((function(t){e=t})),cancel:e}}}const Je=Ve,Ye={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ye).forEach((([e,t])=>{Ye[t]=e}));const $e=Ye,Xe=function e(t){const n=new We(t),r=d(We.prototype.request,n);return G.extend(r,We.prototype,n,{allOwnKeys:!0}),G.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(qe(t,n))},r}(ge);Xe.Axios=We,Xe.CanceledError=Ne,Xe.CancelToken=Je,Xe.isCancel=Re,Xe.VERSION="1.6.8",Xe.toFormData=te,Xe.AxiosError=Y,Xe.Cancel=Xe.CanceledError,Xe.all=function(e){return Promise.all(e)},Xe.spread=function(e){return function(t){return e.apply(null,t)}},Xe.isAxiosError=function(e){return G.isObject(e)&&!0===e.isAxiosError},Xe.mergeConfig=qe,Xe.AxiosHeaders=Ae,Xe.formToJSON=e=>ve(G.isHTMLForm(e)?new FormData(e):e),Xe.getAdapter=Ie,Xe.HttpStatusCode=$e,Xe.default=Xe;const Ze=Xe.create({baseURL:"/wp-json/rsvpmaker/v1/",headers:{"Content-type":"application/json","X-WP-Nonce":rsvpmaker_rest.nonce},validateStatus:function(e){return e<400}});function et(e){const{type:n}=e;return(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-arrow-up-circle",viewBox:"0 0 16 16"},(0,t.createElement)("title",null,"Move Up ",n),(0,t.createElement)("path",{"fill-rule":"evenodd",d:"M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-7.5 3.5a.5.5 0 0 1-1 0V5.707L5.354 7.854a.5.5 0 1 1-.708-.708l3-3a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1-.708.708L8.5 5.707V11.5z"}))}function tt(e){const{type:n}=e;return(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-arrow-down-circle",viewBox:"0 0 16 16"},(0,t.createElement)("title",null,"Move Down ",n),(0,t.createElement)("path",{"fill-rule":"evenodd",d:"M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v5.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V4.5z"}))}function nt(e){const{type:n}=e;return(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-trash",viewBox:"0 0 16 16"},(0,t.createElement)("title",null,"Delete ",n),(0,t.createElement)("path",{d:"M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z"}),(0,t.createElement)("path",{"fill-rule":"evenodd",d:"M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z"}))}function rt(e){const[n,r]=(0,t.useState)(e.form_id),[o,i]=(0,t.useState)("rsvpmaker/formfield"),[c,l]=(0,t.useState)(""),[d,h]=(0,t.useState)(""),[p,m]=(0,t.useState)(!1),[v,y]=(0,t.useState)(""),{isSaving:g,saveEffect:b,SaveControls:E,makeNotification:w}=function(){const[e,n]=(0,t.useState)(!1),[r,o]=(0,t.useState)(null),[i,a]=(0,t.useState)(null);function u(){n(!0),setTimeout((()=>{n(!1)}),500)}return{SaveControls:function(e){const{changes:n,setChanges:r}=e;console.log("changes SaveControls",n);const{mutate:o}=function(e,t){const n=(0,s.useQueryClient)();return(0,s.useMutation)((async function(e){return await Ze.post("rsvp_options",e)}),{onMutate:async e=>{console.log("optimistic update option",e),await n.cancelQueries(["rsvp_options"]);const t=n.getQueryData(["rsvp_options"]);return n.setQueryData(["rsvp_options"],(t=>{const{data:n}=t;e.forEach((e=>{"rsvp_options"==e.type&&(n.rsvp_options[e.key]=e.value)}));const r={...t,data:n};return console.log("newdata optimistic update",r),r})),console.log("updating options"),{previousValue:t}},onSettled:(e,t,r,o)=>{n.invalidateQueries(["rsvp_options"])},onSuccess:(t,n,r,o)=>{console.log("updated"),e([])},onError:(e,t,r)=>{console.log("update options error",e),n.setQueryData("rsvp_options",r.previousValue)}})}(r);return(0,t.createElement)("div",{id:"savecontrols"},i&&(0,t.createElement)("div",{className:"rsvp-notification rsvp-notification-success"},i.message),(0,t.createElement)("div",{id:"savebuttonwrapper"},(0,t.createElement)("button",{onClick:()=>{console.log("save changeset",n),u(),o(n)}},"Save")))},notification:i,setNotification:a,isSaving:e,saveEffect:u,makeNotification:function(e=""){if(""==e)return i;r&&clearTimeout(r),a({message:e});let t=setTimeout((()=>{a(null)}),5e3);o(t)}}}(),{changes:O,addChange:C,setChanges:S}=e;wp?.data?.select("core/editor")?.getCurrentPostId(),console.log("Forms props",e),console.log("Forms formId",n);const{data:A,isLoading:T,isError:R}=(0,s.useQuery)(["rsvp_form",n],(function(){return Ze.get("rsvp_form?form_id="+n+"&post_id="+wp?.data?.select("core/editor")?.getCurrentPostId())}),{enabled:!0,retry:2,onSuccess:(e,t,o,i)=>{n||r(e.data.form_id),console.log("rsvp forms query",e)},onError:(e,t,n)=>{console.log("error retrieving rsvp forms",e)},refetchInterval:!1});if(R)return(0,t.createElement)("p",null,"Error loading form options");const k=(0,s.useQueryClient)(),{mutate:N}=(0,s.useMutation)((async function(t){return await Ze.post("rsvp_form?form_id="+n+"&post_id="+wp?.data?.select("core/editor")?.getCurrentPostId(),{form:t,newForm:v,event_id:e.event_id?e.event_id:0})}),{onMutate:async e=>{const t=k.getQueryData(["rsvp_form",n]);return console.log("optimistic update form",e),await k.cancelQueries(["rsvp_form",n]),k.setQueryData(["rsvp_form",n],(t=>{const{data:n}=t;n.form=e;const r={...t,data:n};return console.log("newdata optimistic form update",r),r})),console.log("updating options"),{previousValue:t}},onSettled:(e,t,r,o)=>{k.invalidateQueries(["rsvp_form",n])},onSuccess:(e,t,n,o)=>{console.log("updated"),r(e.data.form_id)},onError:(e,t,r)=>{console.log("update options error",e),k.setQueryData(["rsvp_form",n],r.previousValue)}});if(T)return(0,t.createElement)("p",null,"Loading ...");const _=A.data.form.filter((e=>e.blockName)),x=A.data.form_options,P=A.data.form_id;let D=_.length-1;const F=[];for(let e=0;e<D;e++){let t=_[e];if(t?.attrs.guestform?F.push(e):console.log("guestfields attr not found",e),["rsvpmaker/formnote","rsvpmaker/guests"].includes(t.blockName)){D=e-1;break}}const L=[{label:"Choose Field Type",value:""},{label:"Text Field",value:"rsvpmaker/formfield"},{label:"Text Area",value:"rsvpmaker/formtextarea"},{label:"Select",value:"rsvpmaker/formselect"},{label:"Radio Buttons",value:"rsvpmaker/formradio"},{label:"Add to Email List Checkbox",value:"rsvpmaker/formchimp"}];let M=!1,I=!1;for(let e=0;e<_.length;e++){let t=_[e];console.log("check for end fields",t),"rsvpmaker/guests"==t.blockName&&(M=!0,console.log("check for end fields found guests")),"rsvpmaker/formnote"==t.blockName&&(I=!0,console.log("check for end fields found note"))}function U(e){const[n,r]=(0,t.useState)(!1),{blockindex:o}=e;return(0,t.createElement)(t.Fragment,null,!n&&(0,t.createElement)("button",{className:"blockmove deletebutton",onClick:()=>{r(!0)}},(0,t.createElement)(nt,null)," Delete")," ",n&&(0,t.createElement)("button",{className:"blockmove",onClick:()=>{j(o,"delete")}},(0,t.createElement)(nt,null)," Confirm Delete")," ")}function j(e,t){const n=[],r=_[e];let o="delete"==t;_.forEach(((i,s)=>{null==i.blockName||s==e||("up"==t&&s==e-1&&(n.push(r),o=!0),"down"==t&&s==e+2&&(n.push(r),o=!0),n.push(i))})),o||n.push(r),console.log("newform",n),N(n)}function Q(e,t,n){const r=[..._];r[e].attrs[t]=n,N(r)}function q(e){const{blockindex:n,setFormItemAttr:r}=e,[o,i]=(0,t.useState)(e.attrs.choicearray),[s,u]=(0,t.useState)(e.attrs.required),[c,l]=(0,t.useState)(e.attrs.label),[f,d]=(0,t.useState)(e.attrs.guestform);return(0,t.createElement)("div",{className:"formAtts"},["rsvpmaker/formfield","rsvpmaker/formselect","rsvpmaker/formradio","rsvpmaker/formtextarea"].includes(e.blockName)&&(0,t.createElement)("p",null,(0,t.createElement)("label",null,"Field Label")," ",(0,t.createElement)("input",{type:"text",value:c,onChange:e=>{l(e.target.value)},onBlur:()=>{r(n,"label",c)}})),o&&(0,t.createElement)("p",null,"Choices",(0,t.createElement)("br",null),(0,t.createElement)("textarea",{value:o.join("\n"),onChange:e=>{let t=e.target.value.split("\n");i(t),r(n,"choicearray",t)},onBlur:()=>{r(n,"choicearray",o)}}),(0,t.createElement)("br",null),(0,t.createElement)("em",null,"Enter one choice per line")),["rsvpmaker/formfield","rsvpmaker/formselect","rsvpmaker/formradio","rsvpmaker/formtextarea"].includes(e.blockName)&&"email"!=e.attrs.slug&&(0,t.createElement)(a.ToggleControl,{label:"Required",checked:"required"==s,onChange:()=>{let e="required"==s?"":"required";u(e),r(n,"required",e)}}),"email"==e.attrs.slug&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Email is always required")),["rsvpmaker/formfield","rsvpmaker/formselect","rsvpmaker/formradio","rsvpmaker/formtextarea"].includes(e.blockName)&&(0,t.createElement)(a.ToggleControl,{label:"Include on Guest Form",checked:f,onChange:()=>{let e=!f;d(e),r(n,"guestform",e)}}))}function B(){console.log("guestfields",F);const[e,n]=(0,t.useState)(!1);return e?(0,t.createElement)("div",null,(0,t.createElement)("p",null,"Guest 1"),F.map((e=>{const n=_[e];console.log("guestfields forEach",n);let r=[];return n?.attrs.choicearray&&(r=n.attrs.choicearray.map((e=>({label:e,value:e})))),(0,t.createElement)("div",{className:"formAtts"},"rsvpmaker/formfield"==n.blockName&&(0,t.createElement)(a.TextControl,{label:n.attrs.label}),"rsvpmaker/formtextarea"==n.blockName&&(0,t.createElement)(a.TextareaControl,{label:n.attrs.label}),"rsvpmaker/formselect"==n.blockName&&(0,t.createElement)(u,{label:n.attrs.label,options:r}),"rsvpmaker/formradio"==n.blockName&&(0,t.createElement)(a.RadioControl,{label:n.attrs.label,options:r}))}))):(0,t.createElement)("p",null,(0,t.createElement)("a",{onClick:()=>{n(!0)}},"+ Add Guests"))}M||L.push({label:"Guest Fields",value:"rsvpmaker/guests"}),I||L.push({label:"Note Field",value:"rsvpmaker/formnote"});let H="",z=!0;return(0,t.createElement)("div",{className:"rsvptab"},A.data.is_default&&(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"Default Form Selected"),(0,t.createElement)("p",null,"Changes you make below will apply to all events that use the default form. Switch to a custom form to make customizations for this event only. Forms can also be customized from an event template.")),A.data.is_inherited&&(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"Form Is Inherited"),(0,t.createElement)("p",null,"This form is inherited from a template or another document. Changes you make below will apply to all events that use the same form. Switch to a custom form to make customizations for this event only. Forms can also be customized from an event template.")),(0,t.createElement)(a.ToggleControl,{label:"Show Form Preview",checked:p,onChange:()=>{m(!p)}}),p&&_.map(((e,n)=>{z=e.blockName.indexOf("rsvpmaker")>-1;let r=[];if(e?.attrs.choicearray&&(r=e.attrs.choicearray.map((e=>({label:e,value:e})))),null!=e.blockName)return(0,t.createElement)("div",null,"rsvpmaker/formfield"==e.blockName&&(0,t.createElement)(a.TextControl,{label:e.attrs.label}),"rsvpmaker/formtextarea"==e.blockName&&(0,t.createElement)(a.TextareaControl,{label:e.attrs.label}),"rsvpmaker/formselect"==e.blockName&&(0,t.createElement)(u,{label:e.attrs.label,options:r}),"rsvpmaker/formradio"==e.blockName&&(0,t.createElement)(a.RadioControl,{label:e.attrs.label,options:r}),"rsvpmaker/guests"==e.blockName&&(0,t.createElement)(B,null),"rsvpmaker/formchimp"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("input",{type:"checkbox"})," Add me to your email list"),!z&&e.innerHTML&&(0,t.createElement)(f,{innerHTML:e.innerHTML}))})),(0,t.createElement)("h4",null,"Form Editing Controls"),_.map(((e,r)=>{if(H=e.blockName.replace(/^[^/]+\//,""),z=e.blockName.indexOf("rsvpmaker")>-1,"formchimp"==H?H="Add to Email List Checkbox":"formnote"==H&&(H="Note"),null!=e.blockName)return(0,t.createElement)("div",{className:"formblock"},(0,t.createElement)("div",{class:"blockheader"},(0,t.createElement)("div",{className:"reorganize-drag"},(0,t.createElement)("div",{className:"titleline"},(0,t.createElement)("h2",null,H," ",e.attrs.label&&(0,t.createElement)("span",{className:"fieldlabel"},e.attrs.label))," ",!["rsvpmaker/formnote","rsvpmaker/guests"].includes(e.blockName)&&r>0&&(0,t.createElement)("button",{className:"blockmove",onClick:()=>{j(r,"up")}},(0,t.createElement)(et,null))," ",!["rsvpmaker/formnote","rsvpmaker/guests"].includes(e.blockName)&&r!=D&&(0,t.createElement)("button",{className:"blockmove",onClick:()=>{j(r,"down")}},(0,t.createElement)(tt,null))," ",(0,t.createElement)(U,{blockindex:r})," "),"rsvpmaker/guests"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Gathers information about guests.")),"rsvpmaker/formnote"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"A free text entry note at the bottom of the form.")),"rsvpmaker/formchimp"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Displays an Add to Email List checkbox on the form")),!z&&e.innerHTML&&(0,t.createElement)("div",null,(0,t.createElement)(f,{innerHTML:e.innerHTML})," ",(0,t.createElement)("br",null),(0,t.createElement)("em",null,(0,t.createElement)("a",{href:"/wp-admin/post.php?action=edit&post="+n},"Open in the WordPress editor"))),(0,t.createElement)(q,{attrs:e.attrs,blockName:e.blockName,blockindex:r,setFormItemAttr:Q}))))})),(0,t.createElement)("p",null,"Add a form field ",(0,t.createElement)(u,{label:"Type",options:L,value:o,onChange:e=>{i(e)}})," ",!["rsvpmaker/formnote","rsvpmaker/guests","rsvpmaker/formchimp"].includes(o)&&(0,t.createElement)(a.TextControl,{label:"Field Label",value:c,onChange:e=>{l(e)}})," "),["rsvpmaker/formselect","rsvpmaker/formradio"].includes(o)&&(0,t.createElement)("p",null,(0,t.createElement)("label",null,"Choices"),(0,t.createElement)("br",null),(0,t.createElement)("textarea",{value:d,onChange:e=>{h(e.target.value)}}),(0,t.createElement)("br",null),(0,t.createElement)("em",null,"Enter one choice per line")),(0,t.createElement)("p",null,(0,t.createElement)("button",{onClick:function(){if(!o)return;let e;if(console.log(o),console.log(c),"rsvpmaker/formnote"==o)e={blockName:"rsvpmaker/formnote",attrs:[],innerBlocks:[],innerHTML:"",innerContent:[]};else if("rsvpmaker/guests"==o)e={blockName:"rsvpmaker/guests",attrs:[],innerBlocks:[{blockName:"core/paragraph",attrs:[],innerBlocks:[],innerHTML:"\n<p></p>\n",innerContent:["\n<p></p>\n"]}],innerHTML:'\n<div class="wp-block-rsvpmaker-guests"></div>\n',innerContent:['\n<div class="wp-block-rsvpmaker-guests">',null,"</div>\n"]};else{if(!c)return void alert("a field label is required");let t=c.toLowerCase().replace(/[^a-z0-9]/,"_");"first_name"==t&&(t="first"),"last_name"==t&&(t="last"),e={blockName:o,innerHTML:"",innerBlocks:[],innerContent:[],attrs:{label:c,slug:t}}}d&&(e.attrs.choicearray=d.split("\n")),console.log("newfield",e);const t=[];_.forEach(((n,r)=>{t.push(n),r==D&&t.push(e)})),N(t),i("rsvpmaker/formfield"),l(""),h("")}},"Add")),(0,t.createElement)("p",null,"You can also open this form ",(0,t.createElement)("a",{href:"/wp-admin/post.php?action=edit&post="+n},"in the WordPress editor"),"."),!e.single_form&&(0,t.createElement)(u,{label:"Switch Form",value:P,options:x,onChange:r}),A.data.copied&&(0,t.createElement)("p",null,"Copied ",(0,t.createElement)("strong",null,A.data.copied)),!e.single_form&&(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"Save as Reusable Form"),(0,t.createElement)(a.TextControl,{label:"Form Title",value:v,onChange:y}),(0,t.createElement)("p",null,"You can save the form so it can also be used with other events."),(0,t.createElement)("p",null,(0,t.createElement)("button",{onClick:e=>{e.preventDefault(),N(_),y("")}},"Create Form"))))}function ot(e){const{form_id:n,event_id:r}=e,[o,i]=(0,t.useState)(!1);return o?(0,t.createElement)(rt,{form_id:n,event_id:r}):(0,t.createElement)("p",null,(0,t.createElement)("button",{onClick:e=>{e.preventDefault(),i(!0)}},"Customize Form"))}const it=new s.QueryClient;window.addEventListener("load",(function(e){const n=document.getElementById("react_event_options"),o=n.getAttribute("form_id"),a=n.getAttribute("event_id");i().render((0,t.createElement)(r().StrictMode,null,(0,t.createElement)(s.QueryClientProvider,{client:it},(0,t.createElement)(ot,{form_id:o,event_id:a}))),n)}))})()})();1 (()=>{var e={838:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:o}=Object;let{freeze:i,seal:s,create:a}=Object,{apply:u,construct:c}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),s||(s=function(e){return e}),u||(u=function(e,t,n){return e.apply(t,n)}),c||(c=function(e,t){return new e(...t)});const l=O(Array.prototype.forEach),f=O(Array.prototype.pop),d=O(Array.prototype.push),h=O(String.prototype.toLowerCase),p=O(String.prototype.toString),m=O(String.prototype.match),v=O(String.prototype.replace),y=O(String.prototype.indexOf),g=O(String.prototype.trim),b=O(Object.prototype.hasOwnProperty),E=O(RegExp.prototype.test),w=(C=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c(C,t)});var C;function O(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return u(e,t,r)}}function S(e,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;t&&t(e,null);let i=r.length;for(;i--;){let t=r[i];if("string"==typeof t){const e=o(t);e!==t&&(n(r)||(r[i]=e),t=e)}e[t]=!0}return e}function A(e){for(let t=0;t<e.length;t++)b(e,t)||(e[t]=null);return e}function T(t){const n=a(null);for(const[r,o]of e(t))b(t,r)&&(Array.isArray(o)?n[r]=A(o):o&&"object"==typeof o&&o.constructor===Object?n[r]=T(o):n[r]=o);return n}function R(e,t){for(;null!==e;){const n=o(e,t);if(n){if(n.get)return O(n.get);if("function"==typeof n.value)return O(n.value)}e=r(e)}return function(){return null}}const k=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),N=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),_=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),x=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),P=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),F=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),D=i(["#text"]),L=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),M=i(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),I=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),U=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),j=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Q=s(/<%[\w\W]*|[\w\W]*%>/gm),q=s(/\${[\w\W]*}/gm),B=s(/^data-[\-\w.\u00B7-\uFFFF]/),H=s(/^aria-[\-\w]+$/),z=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),K=s(/^(?:\w+script|data):/i),G=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),W=s(/^html$/i),V=s(/^[a-z][.\w]*(-[.\w]+)+$/i);var J=Object.freeze({__proto__:null,MUSTACHE_EXPR:j,ERB_EXPR:Q,TMPLIT_EXPR:q,DATA_ATTR:B,ARIA_ATTR:H,IS_ALLOWED_URI:z,IS_SCRIPT_OR_DATA:K,ATTR_WHITESPACE:G,DOCTYPE_NAME:W,CUSTOM_ELEMENT:V});const Y=function(){return"undefined"==typeof window?null:window};return function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y();const r=e=>t(e);if(r.version="3.0.11",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;let{document:o}=n;const s=o,u=s.currentScript,{DocumentFragment:c,HTMLTemplateElement:C,Node:O,Element:A,NodeFilter:j,NamedNodeMap:Q=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:q,DOMParser:B,trustedTypes:H}=n,K=A.prototype,G=R(K,"cloneNode"),V=R(K,"nextSibling"),$=R(K,"childNodes"),X=R(K,"parentNode");if("function"==typeof C){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let Z,ee="";const{implementation:te,createNodeIterator:ne,createDocumentFragment:re,getElementsByTagName:oe}=o,{importNode:ie}=s;let se={};r.isSupported="function"==typeof e&&"function"==typeof X&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:ue,TMPLIT_EXPR:ce,DATA_ATTR:le,ARIA_ATTR:fe,IS_SCRIPT_OR_DATA:de,ATTR_WHITESPACE:he,CUSTOM_ELEMENT:pe}=J;let{IS_ALLOWED_URI:me}=J,ve=null;const ye=S({},[...k,...N,..._,...P,...D]);let ge=null;const be=S({},[...L,...M,...I,...U]);let Ee=Object.seal(a(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),we=null,Ce=null,Oe=!0,Se=!0,Ae=!1,Te=!0,Re=!1,ke=!1,Ne=!1,_e=!1,xe=!1,Pe=!1,Fe=!1,De=!0,Le=!1,Me=!0,Ie=!1,Ue={},je=null;const Qe=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let qe=null;const Be=S({},["audio","video","img","source","image","track"]);let He=null;const ze=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ke="http://www.w3.org/1998/Math/MathML",Ge="http://www.w3.org/2000/svg",We="http://www.w3.org/1999/xhtml";let Ve=We,Je=!1,Ye=null;const $e=S({},[Ke,Ge,We],p);let Xe=null;const Ze=["application/xhtml+xml","text/html"];let et=null,tt=null;const nt=o.createElement("form"),rt=function(e){return e instanceof RegExp||e instanceof Function},ot=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!tt||tt!==e){if(e&&"object"==typeof e||(e={}),e=T(e),Xe=-1===Ze.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,et="application/xhtml+xml"===Xe?p:h,ve=b(e,"ALLOWED_TAGS")?S({},e.ALLOWED_TAGS,et):ye,ge=b(e,"ALLOWED_ATTR")?S({},e.ALLOWED_ATTR,et):be,Ye=b(e,"ALLOWED_NAMESPACES")?S({},e.ALLOWED_NAMESPACES,p):$e,He=b(e,"ADD_URI_SAFE_ATTR")?S(T(ze),e.ADD_URI_SAFE_ATTR,et):ze,qe=b(e,"ADD_DATA_URI_TAGS")?S(T(Be),e.ADD_DATA_URI_TAGS,et):Be,je=b(e,"FORBID_CONTENTS")?S({},e.FORBID_CONTENTS,et):Qe,we=b(e,"FORBID_TAGS")?S({},e.FORBID_TAGS,et):{},Ce=b(e,"FORBID_ATTR")?S({},e.FORBID_ATTR,et):{},Ue=!!b(e,"USE_PROFILES")&&e.USE_PROFILES,Oe=!1!==e.ALLOW_ARIA_ATTR,Se=!1!==e.ALLOW_DATA_ATTR,Ae=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Te=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Re=e.SAFE_FOR_TEMPLATES||!1,ke=e.WHOLE_DOCUMENT||!1,xe=e.RETURN_DOM||!1,Pe=e.RETURN_DOM_FRAGMENT||!1,Fe=e.RETURN_TRUSTED_TYPE||!1,_e=e.FORCE_BODY||!1,De=!1!==e.SANITIZE_DOM,Le=e.SANITIZE_NAMED_PROPS||!1,Me=!1!==e.KEEP_CONTENT,Ie=e.IN_PLACE||!1,me=e.ALLOWED_URI_REGEXP||z,Ve=e.NAMESPACE||We,Ee=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ee.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ee.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ee.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Re&&(Se=!1),Pe&&(xe=!0),Ue&&(ve=S({},D),ge=[],!0===Ue.html&&(S(ve,k),S(ge,L)),!0===Ue.svg&&(S(ve,N),S(ge,M),S(ge,U)),!0===Ue.svgFilters&&(S(ve,_),S(ge,M),S(ge,U)),!0===Ue.mathMl&&(S(ve,P),S(ge,I),S(ge,U))),e.ADD_TAGS&&(ve===ye&&(ve=T(ve)),S(ve,e.ADD_TAGS,et)),e.ADD_ATTR&&(ge===be&&(ge=T(ge)),S(ge,e.ADD_ATTR,et)),e.ADD_URI_SAFE_ATTR&&S(He,e.ADD_URI_SAFE_ATTR,et),e.FORBID_CONTENTS&&(je===Qe&&(je=T(je)),S(je,e.FORBID_CONTENTS,et)),Me&&(ve["#text"]=!0),ke&&S(ve,["html","head","body"]),ve.table&&(S(ve,["tbody"]),delete we.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Z=e.TRUSTED_TYPES_POLICY,ee=Z.createHTML("")}else void 0===Z&&(Z=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(H,u)),null!==Z&&"string"==typeof ee&&(ee=Z.createHTML(""));i&&i(e),tt=e}},it=S({},["mi","mo","mn","ms","mtext"]),st=S({},["foreignobject","desc","title","annotation-xml"]),at=S({},["title","style","font","a","script"]),ut=S({},[...N,..._,...x]),ct=S({},[...P,...F]),lt=function(e){d(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ft=function(e,t){try{d(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){d(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ge[e])if(xe||Pe)try{lt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},dt=function(e){let t=null,n=null;if(_e)e="<remove></remove>"+e;else{const t=m(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Xe&&Ve===We&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=Z?Z.createHTML(e):e;if(Ve===We)try{t=(new B).parseFromString(r,Xe)}catch(e){}if(!t||!t.documentElement){t=te.createDocument(Ve,"template",null);try{t.documentElement.innerHTML=Je?ee:r}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(o.createTextNode(n),i.childNodes[0]||null),Ve===We?oe.call(t,ke?"html":"body")[0]:ke?t.documentElement:i},ht=function(e){return ne.call(e.ownerDocument||e,e,j.SHOW_ELEMENT|j.SHOW_COMMENT|j.SHOW_TEXT|j.SHOW_PROCESSING_INSTRUCTION|j.SHOW_CDATA_SECTION,null)},pt=function(e){return"function"==typeof O&&e instanceof O},mt=function(e,t,n){se[e]&&l(se[e],(e=>{e.call(r,t,n,tt)}))},vt=function(e){let t=null;if(mt("beforeSanitizeElements",e,null),(n=e)instanceof q&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof Q)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return lt(e),!0;var n;const o=et(e.nodeName);if(mt("uponSanitizeElement",e,{tagName:o,allowedTags:ve}),e.hasChildNodes()&&!pt(e.firstElementChild)&&E(/<[/\w]/g,e.innerHTML)&&E(/<[/\w]/g,e.textContent))return lt(e),!0;if(7===e.nodeType)return lt(e),!0;if(!ve[o]||we[o]){if(!we[o]&>(o)){if(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,o))return!1;if(Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(o))return!1}if(Me&&!je[o]){const t=X(e)||e.parentNode,n=$(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(G(n[r],!0),V(e))}return lt(e),!0}return e instanceof A&&!function(e){let t=X(e);t&&t.tagName||(t={namespaceURI:Ve,tagName:"template"});const n=h(e.tagName),r=h(t.tagName);return!!Ye[e.namespaceURI]&&(e.namespaceURI===Ge?t.namespaceURI===We?"svg"===n:t.namespaceURI===Ke?"svg"===n&&("annotation-xml"===r||it[r]):Boolean(ut[n]):e.namespaceURI===Ke?t.namespaceURI===We?"math"===n:t.namespaceURI===Ge?"math"===n&&st[r]:Boolean(ct[n]):e.namespaceURI===We?!(t.namespaceURI===Ge&&!st[r])&&!(t.namespaceURI===Ke&&!it[r])&&!ct[n]&&(at[n]||!ut[n]):!("application/xhtml+xml"!==Xe||!Ye[e.namespaceURI]))}(e)?(lt(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!E(/<\/no(script|embed|frames)/i,e.innerHTML)?(Re&&3===e.nodeType&&(t=e.textContent,l([ae,ue,ce],(e=>{t=v(t,e," ")})),e.textContent!==t&&(d(r.removed,{element:e.cloneNode()}),e.textContent=t)),mt("afterSanitizeElements",e,null),!1):(lt(e),!0)},yt=function(e,t,n){if(De&&("id"===t||"name"===t)&&(n in o||n in nt))return!1;if(Se&&!Ce[t]&&E(le,t));else if(Oe&&E(fe,t));else if(!ge[t]||Ce[t]){if(!(gt(e)&&(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,e)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(e))&&(Ee.attributeNameCheck instanceof RegExp&&E(Ee.attributeNameCheck,t)||Ee.attributeNameCheck instanceof Function&&Ee.attributeNameCheck(t))||"is"===t&&Ee.allowCustomizedBuiltInElements&&(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,n)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(n))))return!1}else if(He[t]);else if(E(me,v(n,he,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(n,"data:")||!qe[e])if(Ae&&!E(de,v(n,he,"")));else if(n)return!1;return!0},gt=function(e){return"annotation-xml"!==e&&m(e,pe)},bt=function(e){mt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};let o=t.length;for(;o--;){const i=t[o],{name:s,namespaceURI:a,value:u}=i,c=et(s);let d="value"===s?u:g(u);if(n.attrName=c,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,mt("uponSanitizeAttribute",e,n),d=n.attrValue,n.forceKeepAttr)continue;if(ft(s,e),!n.keepAttr)continue;if(!Te&&E(/\/>/i,d)){ft(s,e);continue}Re&&l([ae,ue,ce],(e=>{d=v(d,e," ")}));const h=et(e.nodeName);if(yt(h,c,d)){if(!Le||"id"!==c&&"name"!==c||(ft(s,e),d="user-content-"+d),Z&&"object"==typeof H&&"function"==typeof H.getAttributeType)if(a);else switch(H.getAttributeType(h,c)){case"TrustedHTML":d=Z.createHTML(d);break;case"TrustedScriptURL":d=Z.createScriptURL(d)}try{a?e.setAttributeNS(a,s,d):e.setAttribute(s,d),f(r.removed)}catch(e){}}}mt("afterSanitizeAttributes",e,null)},Et=function e(t){let n=null;const r=ht(t);for(mt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)mt("uponSanitizeShadowNode",n,null),vt(n)||(n.content instanceof c&&e(n.content),bt(n));mt("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,i=null,a=null;if(Je=!e,Je&&(e="\x3c!--\x3e"),"string"!=typeof e&&!pt(e)){if("function"!=typeof e.toString)throw w("toString is not a function");if("string"!=typeof(e=e.toString()))throw w("dirty is not a string, aborting")}if(!r.isSupported)return e;if(Ne||ot(t),r.removed=[],"string"==typeof e&&(Ie=!1),Ie){if(e.nodeName){const t=et(e.nodeName);if(!ve[t]||we[t])throw w("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof O)n=dt("\x3c!----\x3e"),o=n.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?n=o:n.appendChild(o);else{if(!xe&&!Re&&!ke&&-1===e.indexOf("<"))return Z&&Fe?Z.createHTML(e):e;if(n=dt(e),!n)return xe?null:Fe?ee:""}n&&_e&<(n.firstChild);const u=ht(Ie?e:n);for(;i=u.nextNode();)vt(i)||(i.content instanceof c&&Et(i.content),bt(i));if(Ie)return e;if(xe){if(Pe)for(a=re.call(n.ownerDocument);n.firstChild;)a.appendChild(n.firstChild);else a=n;return(ge.shadowroot||ge.shadowrootmode)&&(a=ie.call(s,a,!0)),a}let f=ke?n.outerHTML:n.innerHTML;return ke&&ve["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&E(W,n.ownerDocument.doctype.name)&&(f="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+f),Re&&l([ae,ue,ce],(e=>{f=v(f,e," ")})),Z&&Fe?Z.createHTML(f):f},r.setConfig=function(){ot(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ne=!0},r.clearConfig=function(){tt=null,Ne=!1},r.isValidAttribute=function(e,t,n){tt||ot({});const r=et(e),o=et(t);return yt(r,o,n)},r.addHook=function(e,t){"function"==typeof t&&(se[e]=se[e]||[],d(se[e],t))},r.removeHook=function(e){if(se[e])return f(se[e])},r.removeHooks=function(e){se[e]&&(se[e]=[])},r.removeAllHooks=function(){se={}},r}()}()},289:(e,t,n)=>{"use strict";n.d(t,{m:()=>s});var r=n(540),o=n(287),i=n(941),s=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!i.S$&&(null==(t=window)?void 0:t.addEventListener)){var n=function(){return e()};return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),function(){window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}},t}(0,r.A)(t,e);var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)},n.setEventListener=function(e){var t,n=this;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((function(e){"boolean"==typeof e?n.setFocused(e):n.onFocus()}))},n.setFocused=function(e){this.focused=e,e&&this.onFocus()},n.onFocus=function(){this.listeners.forEach((function(e){e()}))},n.isFocused=function(){return"boolean"==typeof this.focused?this.focused:"undefined"==typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)},t}(o.Q))},468:(e,t,n)=>{"use strict";n.d(t,{QueryClient:()=>r.E});var r=n(98),o=n(449);n.o(o,"QueryClientProvider")&&n.d(t,{QueryClientProvider:function(){return o.QueryClientProvider}}),n.o(o,"useMutation")&&n.d(t,{useMutation:function(){return o.useMutation}}),n.o(o,"useQuery")&&n.d(t,{useQuery:function(){return o.useQuery}}),n.o(o,"useQueryClient")&&n.d(t,{useQueryClient:function(){return o.useQueryClient}})},690:(e,t,n)=>{"use strict";n.d(t,{B:()=>i,t:()=>o});var r=console;function o(){return r}function i(e){r=e}},465:(e,t,n)=>{"use strict";n.d(t,{$:()=>c,s:()=>u});var r=n(168),o=n(690),i=n(428),s=n(281),a=n(941),u=function(){function e(e){this.options=(0,r.A)({},e.defaultOptions,e.options),this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.observers=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0},this.meta=e.meta}var t=e.prototype;return t.setState=function(e){this.dispatch({type:"setState",state:e})},t.addObserver=function(e){-1===this.observers.indexOf(e)&&this.observers.push(e)},t.removeObserver=function(e){this.observers=this.observers.filter((function(t){return t!==e}))},t.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(a.lQ).catch(a.lQ)):Promise.resolve()},t.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},t.execute=function(){var e,t=this,n="loading"===this.state.status,r=Promise.resolve();return n||(this.dispatch({type:"loading",variables:this.options.variables}),r=r.then((function(){null==t.mutationCache.config.onMutate||t.mutationCache.config.onMutate(t.state.variables,t)})).then((function(){return null==t.options.onMutate?void 0:t.options.onMutate(t.state.variables)})).then((function(e){e!==t.state.context&&t.dispatch({type:"loading",context:e,variables:t.state.variables})}))),r.then((function(){return t.executeMutation()})).then((function(n){e=n,null==t.mutationCache.config.onSuccess||t.mutationCache.config.onSuccess(e,t.state.variables,t.state.context,t)})).then((function(){return null==t.options.onSuccess?void 0:t.options.onSuccess(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(e,null,t.state.variables,t.state.context)})).then((function(){return t.dispatch({type:"success",data:e}),e})).catch((function(e){return null==t.mutationCache.config.onError||t.mutationCache.config.onError(e,t.state.variables,t.state.context,t),(0,o.t)().error(e),Promise.resolve().then((function(){return null==t.options.onError?void 0:t.options.onError(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(void 0,e,t.state.variables,t.state.context)})).then((function(){throw t.dispatch({type:"error",error:e}),e}))}))},t.executeMutation=function(){var e,t=this;return this.retryer=new s.eJ({fn:function(){return t.options.mutationFn?t.options.mutationFn(t.state.variables):Promise.reject("No mutationFn found")},onFail:function(){t.dispatch({type:"failed"})},onPause:function(){t.dispatch({type:"pause"})},onContinue:function(){t.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay}),this.retryer.promise},t.dispatch=function(e){var t=this;this.state=function(e,t){switch(t.type){case"failed":return(0,r.A)({},e,{failureCount:e.failureCount+1});case"pause":return(0,r.A)({},e,{isPaused:!0});case"continue":return(0,r.A)({},e,{isPaused:!1});case"loading":return(0,r.A)({},e,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return(0,r.A)({},e,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return(0,r.A)({},e,{data:void 0,error:t.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return(0,r.A)({},e,t.state);default:return e}}(this.state,e),i.j.batch((function(){t.observers.forEach((function(t){t.onMutationUpdate(e)})),t.mutationCache.notify(t)}))},e}();function c(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}},428:(e,t,n)=>{"use strict";n.d(t,{j:()=>o});var r=n(941),o=new(function(){function e(){this.queue=[],this.transactions=0,this.notifyFn=function(e){e()},this.batchNotifyFn=function(e){e()}}var t=e.prototype;return t.batch=function(e){var t;this.transactions++;try{t=e()}finally{this.transactions--,this.transactions||this.flush()}return t},t.schedule=function(e){var t=this;this.transactions?this.queue.push(e):(0,r.G6)((function(){t.notifyFn(e)}))},t.batchCalls=function(e){var t=this;return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];t.schedule((function(){e.apply(void 0,r)}))}},t.flush=function(){var e=this,t=this.queue;this.queue=[],t.length&&(0,r.G6)((function(){e.batchNotifyFn((function(){t.forEach((function(t){e.notifyFn(t)}))}))}))},t.setNotifyFunction=function(e){this.notifyFn=e},t.setBatchNotifyFunction=function(e){this.batchNotifyFn=e},e}())},622:(e,t,n)=>{"use strict";n.d(t,{t:()=>s});var r=n(540),o=n(287),i=n(941),s=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!i.S$&&(null==(t=window)?void 0:t.addEventListener)){var n=function(){return e()};return window.addEventListener("online",n,!1),window.addEventListener("offline",n,!1),function(){window.removeEventListener("online",n),window.removeEventListener("offline",n)}}},t}(0,r.A)(t,e);var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)},n.setEventListener=function(e){var t,n=this;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((function(e){"boolean"==typeof e?n.setOnline(e):n.onOnline()}))},n.setOnline=function(e){this.online=e,e&&this.onOnline()},n.onOnline=function(){this.listeners.forEach((function(e){e()}))},n.isOnline=function(){return"boolean"==typeof this.online?this.online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine},t}(o.Q))},98:(e,t,n)=>{"use strict";n.d(t,{E:()=>y});var r=n(168),o=n(941),i=n(540),s=n(428),a=n(690),u=n(281),c=function(){function e(e){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=e.meta,this.scheduleGc()}var t=e.prototype;return t.setOptions=function(e){var t;this.options=(0,r.A)({},this.defaultOptions,e),this.meta=null==e?void 0:e.meta,this.cacheTime=Math.max(this.cacheTime||0,null!=(t=this.options.cacheTime)?t:3e5)},t.setDefaultOptions=function(e){this.defaultOptions=e},t.scheduleGc=function(){var e=this;this.clearGcTimeout(),(0,o.gn)(this.cacheTime)&&(this.gcTimeout=setTimeout((function(){e.optionalRemove()}),this.cacheTime))},t.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},t.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},t.setData=function(e,t){var n,r,i=this.state.data,s=(0,o.Zw)(e,i);return(null==(n=(r=this.options).isDataEqual)?void 0:n.call(r,i,s))?s=i:!1!==this.options.structuralSharing&&(s=(0,o.BH)(i,s)),this.dispatch({data:s,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt}),s},t.setState=function(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})},t.cancel=function(e){var t,n=this.promise;return null==(t=this.retryer)||t.cancel(e),n?n.then(o.lQ).catch(o.lQ):Promise.resolve()},t.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},t.reset=function(){this.destroy(),this.setState(this.initialState)},t.isActive=function(){return this.observers.some((function(e){return!1!==e.options.enabled}))},t.isFetching=function(){return this.state.isFetching},t.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some((function(e){return e.getCurrentResult().isStale}))},t.isStaleByTime=function(e){return void 0===e&&(e=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!(0,o.j3)(this.state.dataUpdatedAt,e)},t.onFocus=function(){var e,t=this.observers.find((function(e){return e.shouldFetchOnWindowFocus()}));t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.onOnline=function(){var e,t=this.observers.find((function(e){return e.shouldFetchOnReconnect()}));t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.addObserver=function(e){-1===this.observers.indexOf(e)&&(this.observers.push(e),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))},t.removeObserver=function(e){-1!==this.observers.indexOf(e)&&(this.observers=this.observers.filter((function(t){return t!==e})),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:e}))},t.getObserversCount=function(){return this.observers.length},t.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},t.fetch=function(e,t){var n,r,i,s=this;if(this.state.isFetching)if(this.state.dataUpdatedAt&&(null==t?void 0:t.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var c;return null==(c=this.retryer)||c.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){var l=this.observers.find((function(e){return e.options.queryFn}));l&&this.setOptions(l.options)}var f=(0,o.HN)(this.queryKey),d=(0,o.jY)(),h={queryKey:f,pageParam:void 0,meta:this.meta};Object.defineProperty(h,"signal",{enumerable:!0,get:function(){if(d)return s.abortSignalConsumed=!0,d.signal}});var p,m,v={fetchOptions:t,options:this.options,queryKey:f,state:this.state,fetchFn:function(){return s.options.queryFn?(s.abortSignalConsumed=!1,s.options.queryFn(h)):Promise.reject("Missing queryFn")},meta:this.meta};return(null==(n=this.options.behavior)?void 0:n.onFetch)&&(null==(p=this.options.behavior)||p.onFetch(v)),this.revertState=this.state,this.state.isFetching&&this.state.fetchMeta===(null==(r=v.fetchOptions)?void 0:r.meta)||this.dispatch({type:"fetch",meta:null==(m=v.fetchOptions)?void 0:m.meta}),this.retryer=new u.eJ({fn:v.fetchFn,abort:null==d||null==(i=d.abort)?void 0:i.bind(d),onSuccess:function(e){s.setData(e),null==s.cache.config.onSuccess||s.cache.config.onSuccess(e,s),0===s.cacheTime&&s.optionalRemove()},onError:function(e){(0,u.wm)(e)&&e.silent||s.dispatch({type:"error",error:e}),(0,u.wm)(e)||(null==s.cache.config.onError||s.cache.config.onError(e,s),(0,a.t)().error(e)),0===s.cacheTime&&s.optionalRemove()},onFail:function(){s.dispatch({type:"failed"})},onPause:function(){s.dispatch({type:"pause"})},onContinue:function(){s.dispatch({type:"continue"})},retry:v.options.retry,retryDelay:v.options.retryDelay}),this.promise=this.retryer.promise,this.promise},t.dispatch=function(e){var t=this;this.state=this.reducer(this.state,e),s.j.batch((function(){t.observers.forEach((function(t){t.onQueryUpdate(e)})),t.cache.notify({query:t,type:"queryUpdated",action:e})}))},t.getDefaultState=function(e){var t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==e.initialData?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0,r=void 0!==t;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?null!=n?n:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:r?"success":"idle"}},t.reducer=function(e,t){var n,o;switch(t.type){case"failed":return(0,r.A)({},e,{fetchFailureCount:e.fetchFailureCount+1});case"pause":return(0,r.A)({},e,{isPaused:!0});case"continue":return(0,r.A)({},e,{isPaused:!1});case"fetch":return(0,r.A)({},e,{fetchFailureCount:0,fetchMeta:null!=(n=t.meta)?n:null,isFetching:!0,isPaused:!1},!e.dataUpdatedAt&&{error:null,status:"loading"});case"success":return(0,r.A)({},e,{data:t.data,dataUpdateCount:e.dataUpdateCount+1,dataUpdatedAt:null!=(o=t.dataUpdatedAt)?o:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var i=t.error;return(0,u.wm)(i)&&i.revert&&this.revertState?(0,r.A)({},this.revertState):(0,r.A)({},e,{error:i,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return(0,r.A)({},e,{isInvalidated:!0});case"setState":return(0,r.A)({},e,t.state);default:return e}},e}(),l=n(287),f=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.queries=[],n.queriesMap={},n}(0,i.A)(t,e);var n=t.prototype;return n.build=function(e,t,n){var r,i=t.queryKey,s=null!=(r=t.queryHash)?r:(0,o.F$)(i,t),a=this.get(s);return a||(a=new c({cache:this,queryKey:i,queryHash:s,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i),meta:t.meta}),this.add(a)),a},n.add=function(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"queryAdded",query:e}))},n.remove=function(e){var t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter((function(t){return t!==e})),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"queryRemoved",query:e}))},n.clear=function(){var e=this;s.j.batch((function(){e.queries.forEach((function(t){e.remove(t)}))}))},n.get=function(e){return this.queriesMap[e]},n.getAll=function(){return this.queries},n.find=function(e,t){var n=(0,o.b_)(e,t)[0];return void 0===n.exact&&(n.exact=!0),this.queries.find((function(e){return(0,o.MK)(n,e)}))},n.findAll=function(e,t){var n=(0,o.b_)(e,t)[0];return Object.keys(n).length>0?this.queries.filter((function(e){return(0,o.MK)(n,e)})):this.queries},n.notify=function(e){var t=this;s.j.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},n.onFocus=function(){var e=this;s.j.batch((function(){e.queries.forEach((function(e){e.onFocus()}))}))},n.onOnline=function(){var e=this;s.j.batch((function(){e.queries.forEach((function(e){e.onOnline()}))}))},t}(l.Q),d=n(465),h=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.mutations=[],n.mutationId=0,n}(0,i.A)(t,e);var n=t.prototype;return n.build=function(e,t,n){var r=new d.s({mutationCache:this,mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:n,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0,meta:t.meta});return this.add(r),r},n.add=function(e){this.mutations.push(e),this.notify(e)},n.remove=function(e){this.mutations=this.mutations.filter((function(t){return t!==e})),e.cancel(),this.notify(e)},n.clear=function(){var e=this;s.j.batch((function(){e.mutations.forEach((function(t){e.remove(t)}))}))},n.getAll=function(){return this.mutations},n.find=function(e){return void 0===e.exact&&(e.exact=!0),this.mutations.find((function(t){return(0,o.nJ)(e,t)}))},n.findAll=function(e){return this.mutations.filter((function(t){return(0,o.nJ)(e,t)}))},n.notify=function(e){var t=this;s.j.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},n.onFocus=function(){this.resumePausedMutations()},n.onOnline=function(){this.resumePausedMutations()},n.resumePausedMutations=function(){var e=this.mutations.filter((function(e){return e.state.isPaused}));return s.j.batch((function(){return e.reduce((function(e,t){return e.then((function(){return t.continue().catch(o.lQ)}))}),Promise.resolve())}))},t}(l.Q),p=n(289),m=n(622);function v(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}var y=function(){function e(e){void 0===e&&(e={}),this.queryCache=e.queryCache||new f,this.mutationCache=e.mutationCache||new h,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var t=e.prototype;return t.mount=function(){var e=this;this.unsubscribeFocus=p.m.subscribe((function(){p.m.isFocused()&&m.t.isOnline()&&(e.mutationCache.onFocus(),e.queryCache.onFocus())})),this.unsubscribeOnline=m.t.subscribe((function(){p.m.isFocused()&&m.t.isOnline()&&(e.mutationCache.onOnline(),e.queryCache.onOnline())}))},t.unmount=function(){var e,t;null==(e=this.unsubscribeFocus)||e.call(this),null==(t=this.unsubscribeOnline)||t.call(this)},t.isFetching=function(e,t){var n=(0,o.b_)(e,t)[0];return n.fetching=!0,this.queryCache.findAll(n).length},t.isMutating=function(e){return this.mutationCache.findAll((0,r.A)({},e,{fetching:!0})).length},t.getQueryData=function(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state.data},t.getQueriesData=function(e){return this.getQueryCache().findAll(e).map((function(e){return[e.queryKey,e.state.data]}))},t.setQueryData=function(e,t,n){var r=(0,o.vh)(e),i=this.defaultQueryOptions(r);return this.queryCache.build(this,i).setData(t,n)},t.setQueriesData=function(e,t,n){var r=this;return s.j.batch((function(){return r.getQueryCache().findAll(e).map((function(e){var o=e.queryKey;return[o,r.setQueryData(o,t,n)]}))}))},t.getQueryState=function(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state},t.removeQueries=function(e,t){var n=(0,o.b_)(e,t)[0],r=this.queryCache;s.j.batch((function(){r.findAll(n).forEach((function(e){r.remove(e)}))}))},t.resetQueries=function(e,t,n){var i=this,a=(0,o.b_)(e,t,n),u=a[0],c=a[1],l=this.queryCache,f=(0,r.A)({},u,{active:!0});return s.j.batch((function(){return l.findAll(u).forEach((function(e){e.reset()})),i.refetchQueries(f,c)}))},t.cancelQueries=function(e,t,n){var r=this,i=(0,o.b_)(e,t,n),a=i[0],u=i[1],c=void 0===u?{}:u;void 0===c.revert&&(c.revert=!0);var l=s.j.batch((function(){return r.queryCache.findAll(a).map((function(e){return e.cancel(c)}))}));return Promise.all(l).then(o.lQ).catch(o.lQ)},t.invalidateQueries=function(e,t,n){var i,a,u,c=this,l=(0,o.b_)(e,t,n),f=l[0],d=l[1],h=(0,r.A)({},f,{active:null==(i=null!=(a=f.refetchActive)?a:f.active)||i,inactive:null!=(u=f.refetchInactive)&&u});return s.j.batch((function(){return c.queryCache.findAll(f).forEach((function(e){e.invalidate()})),c.refetchQueries(h,d)}))},t.refetchQueries=function(e,t,n){var i=this,a=(0,o.b_)(e,t,n),u=a[0],c=a[1],l=s.j.batch((function(){return i.queryCache.findAll(u).map((function(e){return e.fetch(void 0,(0,r.A)({},c,{meta:{refetchPage:null==u?void 0:u.refetchPage}}))}))})),f=Promise.all(l).then(o.lQ);return(null==c?void 0:c.throwOnError)||(f=f.catch(o.lQ)),f},t.fetchQuery=function(e,t,n){var r=(0,o.vh)(e,t,n),i=this.defaultQueryOptions(r);void 0===i.retry&&(i.retry=!1);var s=this.queryCache.build(this,i);return s.isStaleByTime(i.staleTime)?s.fetch(i):Promise.resolve(s.state.data)},t.prefetchQuery=function(e,t,n){return this.fetchQuery(e,t,n).then(o.lQ).catch(o.lQ)},t.fetchInfiniteQuery=function(e,t,n){var r=(0,o.vh)(e,t,n);return r.behavior={onFetch:function(e){e.fetchFn=function(){var t,n,r,i,s,a,c,l,f,d=null==(t=e.fetchOptions)||null==(n=t.meta)?void 0:n.refetchPage,h=null==(r=e.fetchOptions)||null==(i=r.meta)?void 0:i.fetchMore,p=null==h?void 0:h.pageParam,m="forward"===(null==h?void 0:h.direction),y="backward"===(null==h?void 0:h.direction),g=(null==(s=e.state.data)?void 0:s.pages)||[],b=(null==(a=e.state.data)?void 0:a.pageParams)||[],E=(0,o.jY)(),w=null==E?void 0:E.signal,C=b,O=!1,S=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},A=function(e,t,n,r){return C=r?[t].concat(C):[].concat(C,[t]),r?[n].concat(e):[].concat(e,[n])},T=function(t,n,r,o){if(O)return Promise.reject("Cancelled");if(void 0===r&&!n&&t.length)return Promise.resolve(t);var i={queryKey:e.queryKey,signal:w,pageParam:r,meta:e.meta},s=S(i),a=Promise.resolve(s).then((function(e){return A(t,r,e,o)}));return(0,u.dd)(s)&&(a.cancel=s.cancel),a};if(g.length)if(m){var R=void 0!==p,k=R?p:v(e.options,g);c=T(g,R,k)}else if(y){var N=void 0!==p,_=N?p:(l=e.options,f=g,null==l.getPreviousPageParam?void 0:l.getPreviousPageParam(f[0],f));c=T(g,N,_,!0)}else!function(){C=[];var t=void 0===e.options.getNextPageParam,n=!d||!g[0]||d(g[0],0,g);c=n?T([],t,b[0]):Promise.resolve(A([],b[0],g[0]));for(var r=function(n){c=c.then((function(r){if(!d||!g[n]||d(g[n],n,g)){var o=t?b[n]:v(e.options,r);return T(r,t,o)}return Promise.resolve(A(r,b[n],g[n]))}))},o=1;o<g.length;o++)r(o)}();else c=T([]);var x=c.then((function(e){return{pages:e,pageParams:C}}));return x.cancel=function(){O=!0,null==E||E.abort(),(0,u.dd)(c)&&c.cancel()},x}}},this.fetchQuery(r)},t.prefetchInfiniteQuery=function(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(o.lQ).catch(o.lQ)},t.cancelMutations=function(){var e=this,t=s.j.batch((function(){return e.mutationCache.getAll().map((function(e){return e.cancel()}))}));return Promise.all(t).then(o.lQ).catch(o.lQ)},t.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},t.executeMutation=function(e){return this.mutationCache.build(this,e).execute()},t.getQueryCache=function(){return this.queryCache},t.getMutationCache=function(){return this.mutationCache},t.getDefaultOptions=function(){return this.defaultOptions},t.setDefaultOptions=function(e){this.defaultOptions=e},t.setQueryDefaults=function(e,t){var n=this.queryDefaults.find((function(t){return(0,o.Od)(e)===(0,o.Od)(t.queryKey)}));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})},t.getQueryDefaults=function(e){var t;return e?null==(t=this.queryDefaults.find((function(t){return(0,o.Cp)(e,t.queryKey)})))?void 0:t.defaultOptions:void 0},t.setMutationDefaults=function(e,t){var n=this.mutationDefaults.find((function(t){return(0,o.Od)(e)===(0,o.Od)(t.mutationKey)}));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})},t.getMutationDefaults=function(e){var t;return e?null==(t=this.mutationDefaults.find((function(t){return(0,o.Cp)(e,t.mutationKey)})))?void 0:t.defaultOptions:void 0},t.defaultQueryOptions=function(e){if(null==e?void 0:e._defaulted)return e;var t=(0,r.A)({},this.defaultOptions.queries,this.getQueryDefaults(null==e?void 0:e.queryKey),e,{_defaulted:!0});return!t.queryHash&&t.queryKey&&(t.queryHash=(0,o.F$)(t.queryKey,t)),t},t.defaultQueryObserverOptions=function(e){return this.defaultQueryOptions(e)},t.defaultMutationOptions=function(e){return(null==e?void 0:e._defaulted)?e:(0,r.A)({},this.defaultOptions.mutations,this.getMutationDefaults(null==e?void 0:e.mutationKey),e,{_defaulted:!0})},t.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},e}()},281:(e,t,n)=>{"use strict";n.d(t,{dd:()=>a,eJ:()=>l,wm:()=>c});var r=n(289),o=n(622),i=n(941);function s(e){return Math.min(1e3*Math.pow(2,e),3e4)}function a(e){return"function"==typeof(null==e?void 0:e.cancel)}var u=function(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent};function c(e){return e instanceof u}var l=function(e){var t,n,c,l,f=this,d=!1;this.abort=e.abort,this.cancel=function(e){return null==t?void 0:t(e)},this.cancelRetry=function(){d=!0},this.continueRetry=function(){d=!1},this.continue=function(){return null==n?void 0:n()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise((function(e,t){c=e,l=t}));var h=function(t){f.isResolved||(f.isResolved=!0,null==e.onSuccess||e.onSuccess(t),null==n||n(),c(t))},p=function(t){f.isResolved||(f.isResolved=!0,null==e.onError||e.onError(t),null==n||n(),l(t))};!function c(){if(!f.isResolved){var l;try{l=e.fn()}catch(e){l=Promise.reject(e)}t=function(e){if(!f.isResolved&&(p(new u(e)),null==f.abort||f.abort(),a(l)))try{l.cancel()}catch(e){}},f.isTransportCancelable=a(l),Promise.resolve(l).then(h).catch((function(t){var a,u;if(!f.isResolved){var l=null!=(a=e.retry)?a:3,h=null!=(u=e.retryDelay)?u:s,m="function"==typeof h?h(f.failureCount,t):h,v=!0===l||"number"==typeof l&&f.failureCount<l||"function"==typeof l&&l(f.failureCount,t);!d&&v?(f.failureCount++,null==e.onFail||e.onFail(f.failureCount,t),(0,i.yy)(m).then((function(){if(!r.m.isFocused()||!o.t.isOnline())return new Promise((function(t){n=t,f.isPaused=!0,null==e.onPause||e.onPause()})).then((function(){n=void 0,f.isPaused=!1,null==e.onContinue||e.onContinue()}))})).then((function(){d?p(t):c()}))):p(t)}}))}}()}},287:(e,t,n)=>{"use strict";n.d(t,{Q:()=>r});var r=function(){function e(){this.listeners=[]}var t=e.prototype;return t.subscribe=function(e){var t=this,n=e||function(){};return this.listeners.push(n),this.onSubscribe(),function(){t.listeners=t.listeners.filter((function(e){return e!==n})),t.onUnsubscribe()}},t.hasListeners=function(){return this.listeners.length>0},t.onSubscribe=function(){},t.onUnsubscribe=function(){},e}()},449:()=>{},941:(e,t,n)=>{"use strict";n.d(t,{BH:()=>b,Cp:()=>y,F$:()=>m,G6:()=>A,GR:()=>f,HN:()=>u,MK:()=>h,Od:()=>v,S$:()=>o,Zw:()=>s,b_:()=>d,f8:()=>E,gn:()=>a,j3:()=>c,jY:()=>T,lQ:()=>i,nJ:()=>p,vh:()=>l,yy:()=>S});var r=n(168),o="undefined"==typeof window;function i(){}function s(e,t){return"function"==typeof e?e(t):e}function a(e){return"number"==typeof e&&e>=0&&e!==1/0}function u(e){return Array.isArray(e)?e:[e]}function c(e,t){return Math.max(e+(t||0)-Date.now(),0)}function l(e,t,n){return O(e)?"function"==typeof t?(0,r.A)({},n,{queryKey:e,queryFn:t}):(0,r.A)({},t,{queryKey:e}):e}function f(e,t,n){return O(e)?"function"==typeof t?(0,r.A)({},n,{mutationKey:e,mutationFn:t}):(0,r.A)({},t,{mutationKey:e}):"function"==typeof e?(0,r.A)({},t,{mutationFn:e}):(0,r.A)({},e)}function d(e,t,n){return O(e)?[(0,r.A)({},t,{queryKey:e}),n]:[e||{},t]}function h(e,t){var n=e.active,r=e.exact,o=e.fetching,i=e.inactive,s=e.predicate,a=e.queryKey,u=e.stale;if(O(a))if(r){if(t.queryHash!==m(a,t.options))return!1}else if(!y(t.queryKey,a))return!1;var c=function(e,t){return!0===e&&!0===t||null==e&&null==t?"all":!1===e&&!1===t?"none":(null!=e?e:!t)?"active":"inactive"}(n,i);if("none"===c)return!1;if("all"!==c){var l=t.isActive();if("active"===c&&!l)return!1;if("inactive"===c&&l)return!1}return!("boolean"==typeof u&&t.isStale()!==u||"boolean"==typeof o&&t.isFetching()!==o||s&&!s(t))}function p(e,t){var n=e.exact,r=e.fetching,o=e.predicate,i=e.mutationKey;if(O(i)){if(!t.options.mutationKey)return!1;if(n){if(v(t.options.mutationKey)!==v(i))return!1}else if(!y(t.options.mutationKey,i))return!1}return!("boolean"==typeof r&&"loading"===t.state.status!==r||o&&!o(t))}function m(e,t){return((null==t?void 0:t.queryKeyHashFn)||v)(e)}function v(e){var t;return t=u(e),JSON.stringify(t,(function(e,t){return w(t)?Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{}):t}))}function y(e,t){return g(u(e),u(t))}function g(e,t){return e===t||typeof e==typeof t&&!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((function(n){return!g(e[n],t[n])}))}function b(e,t){if(e===t)return e;var n=Array.isArray(e)&&Array.isArray(t);if(n||w(e)&&w(t)){for(var r=n?e.length:Object.keys(e).length,o=n?t:Object.keys(t),i=o.length,s=n?[]:{},a=0,u=0;u<i;u++){var c=n?u:o[u];s[c]=b(e[c],t[c]),s[c]===e[c]&&a++}return r===i&&a===r?e:s}return t}function E(e,t){if(e&&!t||t&&!e)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}function w(e){if(!C(e))return!1;var t=e.constructor;if(void 0===t)return!0;var n=t.prototype;return!!C(n)&&!!n.hasOwnProperty("isPrototypeOf")}function C(e){return"[object Object]"===Object.prototype.toString.call(e)}function O(e){return"string"==typeof e||Array.isArray(e)}function S(e){return new Promise((function(t){setTimeout(t,e)}))}function A(e){Promise.resolve().then(e).catch((function(e){return setTimeout((function(){throw e}))}))}function T(){if("function"==typeof AbortController)return new AbortController}},942:(e,t,n)=>{"use strict";n.d(t,{QueryClient:()=>r.QueryClient,QueryClientProvider:()=>o.QueryClientProvider,useMutation:()=>o.useMutation,useQuery:()=>o.useQuery,useQueryClient:()=>o.useQueryClient});var r=n(468);n.o(r,"QueryClientProvider")&&n.d(t,{QueryClientProvider:function(){return r.QueryClientProvider}}),n.o(r,"useMutation")&&n.d(t,{useMutation:function(){return r.useMutation}}),n.o(r,"useQuery")&&n.d(t,{useQuery:function(){return r.useQuery}}),n.o(r,"useQueryClient")&&n.d(t,{useQueryClient:function(){return r.useQueryClient}});var o=n(960)},360:(e,t,n)=>{"use strict";n.d(t,{H:()=>c,j:()=>u});var r=n(609),o=n.n(r),i=o().createContext(void 0),s=o().createContext(!1);function a(e){return e&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=i),window.ReactQueryClientContext):i}var u=function(){var e=o().useContext(a(o().useContext(s)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},c=function(e){var t=e.client,n=e.contextSharing,r=void 0!==n&&n,i=e.children;o().useEffect((function(){return t.mount(),function(){t.unmount()}}),[t]);var u=a(r);return o().createElement(s.Provider,{value:r},o().createElement(u.Provider,{value:t},i))}},960:(e,t,n)=>{"use strict";n.d(t,{QueryClientProvider:()=>u.H,useMutation:()=>c.n,useQuery:()=>l.I,useQueryClient:()=>u.j});var r=n(428),o=n(795),i=n.n(o)().unstable_batchedUpdates;r.j.setBatchNotifyFunction(i);var s=n(690),a=console;(0,s.B)(a);var u=n(360),c=n(990),l=n(584)},990:(e,t,n)=>{"use strict";n.d(t,{n:()=>h});var r=n(168),o=n(609),i=n.n(o),s=n(428),a=n(941),u=n(540),c=n(465),l=function(e){function t(t,n){var r;return(r=e.call(this)||this).client=t,r.setOptions(n),r.bindMethods(),r.updateResult(),r}(0,u.A)(t,e);var n=t.prototype;return n.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},n.setOptions=function(e){this.options=this.client.defaultMutationOptions(e)},n.onUnsubscribe=function(){var e;this.listeners.length||null==(e=this.currentMutation)||e.removeObserver(this)},n.onMutationUpdate=function(e){this.updateResult();var t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)},n.getCurrentResult=function(){return this.currentResult},n.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},n.mutate=function(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,(0,r.A)({},this.options,{variables:void 0!==e?e:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},n.updateResult=function(){var e=this.currentMutation?this.currentMutation.state:(0,c.$)(),t=(0,r.A)({},e,{isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset});this.currentResult=t},n.notify=function(e){var t=this;s.j.batch((function(){t.mutateOptions&&(e.onSuccess?(null==t.mutateOptions.onSuccess||t.mutateOptions.onSuccess(t.currentResult.data,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(t.currentResult.data,null,t.currentResult.variables,t.currentResult.context)):e.onError&&(null==t.mutateOptions.onError||t.mutateOptions.onError(t.currentResult.error,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(void 0,t.currentResult.error,t.currentResult.variables,t.currentResult.context))),e.listeners&&t.listeners.forEach((function(e){e(t.currentResult)}))}))},t}(n(287).Q),f=n(360),d=n(439);function h(e,t,n){var o=i().useRef(!1),u=i().useState(0)[1],c=(0,a.GR)(e,t,n),h=(0,f.j)(),p=i().useRef();p.current?p.current.setOptions(c):p.current=new l(h,c);var m=p.current.getCurrentResult();i().useEffect((function(){o.current=!0;var e=p.current.subscribe(s.j.batchCalls((function(){o.current&&u((function(e){return e+1}))})));return function(){o.current=!1,e()}}),[]);var v=i().useCallback((function(e,t){p.current.mutate(e,t).catch(a.lQ)}),[]);if(m.error&&(0,d.G)(void 0,p.current.options.useErrorBoundary,[m.error]))throw m.error;return(0,r.A)({},m,{mutate:v,mutateAsync:m.mutate})}},584:(e,t,n)=>{"use strict";n.d(t,{I:()=>O});var r=n(168),o=n(540),i=n(941),s=n(428),a=n(289),u=n(287),c=n(690),l=n(281),f=function(e){function t(t,n){var r;return(r=e.call(this)||this).client=t,r.options=n,r.trackedProps=[],r.selectError=null,r.bindMethods(),r.setOptions(n),r}(0,o.A)(t,e);var n=t.prototype;return n.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},n.onSubscribe=function(){1===this.listeners.length&&(this.currentQuery.addObserver(this),d(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},n.onUnsubscribe=function(){this.listeners.length||this.destroy()},n.shouldFetchOnReconnect=function(){return h(this.currentQuery,this.options,this.options.refetchOnReconnect)},n.shouldFetchOnWindowFocus=function(){return h(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},n.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},n.setOptions=function(e,t){var n=this.options,r=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled)throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();var o=this.hasListeners();o&&p(this.currentQuery,r,this.options,n)&&this.executeFetch(),this.updateResult(t),!o||this.currentQuery===r&&this.options.enabled===n.enabled&&this.options.staleTime===n.staleTime||this.updateStaleTimeout();var i=this.computeRefetchInterval();!o||this.currentQuery===r&&this.options.enabled===n.enabled&&i===this.currentRefetchInterval||this.updateRefetchInterval(i)},n.getOptimisticResult=function(e){var t=this.client.defaultQueryObserverOptions(e),n=this.client.getQueryCache().build(this.client,t);return this.createResult(n,t)},n.getCurrentResult=function(){return this.currentResult},n.trackResult=function(e,t){var n=this,r={},o=function(e){n.trackedProps.includes(e)||n.trackedProps.push(e)};return Object.keys(e).forEach((function(t){Object.defineProperty(r,t,{configurable:!1,enumerable:!0,get:function(){return o(t),e[t]}})})),(t.useErrorBoundary||t.suspense)&&o("error"),r},n.getNextResult=function(e){var t=this;return new Promise((function(n,r){var o=t.subscribe((function(t){t.isFetching||(o(),t.isError&&(null==e?void 0:e.throwOnError)?r(t.error):n(t))}))}))},n.getCurrentQuery=function(){return this.currentQuery},n.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},n.refetch=function(e){return this.fetch((0,r.A)({},e,{meta:{refetchPage:null==e?void 0:e.refetchPage}}))},n.fetchOptimistic=function(e){var t=this,n=this.client.defaultQueryObserverOptions(e),r=this.client.getQueryCache().build(this.client,n);return r.fetch().then((function(){return t.createResult(r,n)}))},n.fetch=function(e){var t=this;return this.executeFetch(e).then((function(){return t.updateResult(),t.currentResult}))},n.executeFetch=function(e){this.updateQuery();var t=this.currentQuery.fetch(this.options,e);return(null==e?void 0:e.throwOnError)||(t=t.catch(i.lQ)),t},n.updateStaleTimeout=function(){var e=this;if(this.clearStaleTimeout(),!i.S$&&!this.currentResult.isStale&&(0,i.gn)(this.options.staleTime)){var t=(0,i.j3)(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout((function(){e.currentResult.isStale||e.updateResult()}),t)}},n.computeRefetchInterval=function(){var e;return"function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(e=this.options.refetchInterval)&&e},n.updateRefetchInterval=function(e){var t=this;this.clearRefetchInterval(),this.currentRefetchInterval=e,!i.S$&&!1!==this.options.enabled&&(0,i.gn)(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval((function(){(t.options.refetchIntervalInBackground||a.m.isFocused())&&t.executeFetch()}),this.currentRefetchInterval))},n.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},n.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},n.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},n.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},n.createResult=function(e,t){var n,r=this.currentQuery,o=this.options,s=this.currentResult,a=this.currentResultState,u=this.currentResultOptions,l=e!==r,f=l?e.state:this.currentQueryInitialState,h=l?this.currentResult:this.previousQueryResult,v=e.state,y=v.dataUpdatedAt,g=v.error,b=v.errorUpdatedAt,E=v.isFetching,w=v.status,C=!1,O=!1;if(t.optimisticResults){var S=this.hasListeners(),A=!S&&d(e,t),T=S&&p(e,r,t,o);(A||T)&&(E=!0,y||(w="loading"))}if(t.keepPreviousData&&!v.dataUpdateCount&&(null==h?void 0:h.isSuccess)&&"error"!==w)n=h.data,y=h.dataUpdatedAt,w=h.status,C=!0;else if(t.select&&void 0!==v.data)if(s&&v.data===(null==a?void 0:a.data)&&t.select===this.selectFn)n=this.selectResult;else try{this.selectFn=t.select,n=t.select(v.data),!1!==t.structuralSharing&&(n=(0,i.BH)(null==s?void 0:s.data,n)),this.selectResult=n,this.selectError=null}catch(e){(0,c.t)().error(e),this.selectError=e}else n=v.data;if(void 0!==t.placeholderData&&void 0===n&&("loading"===w||"idle"===w)){var R;if((null==s?void 0:s.isPlaceholderData)&&t.placeholderData===(null==u?void 0:u.placeholderData))R=s.data;else if(R="function"==typeof t.placeholderData?t.placeholderData():t.placeholderData,t.select&&void 0!==R)try{R=t.select(R),!1!==t.structuralSharing&&(R=(0,i.BH)(null==s?void 0:s.data,R)),this.selectError=null}catch(e){(0,c.t)().error(e),this.selectError=e}void 0!==R&&(w="success",n=R,O=!0)}return this.selectError&&(g=this.selectError,n=this.selectResult,b=Date.now(),w="error"),{status:w,isLoading:"loading"===w,isSuccess:"success"===w,isError:"error"===w,isIdle:"idle"===w,data:n,dataUpdatedAt:y,error:g,errorUpdatedAt:b,failureCount:v.fetchFailureCount,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>f.dataUpdateCount||v.errorUpdateCount>f.errorUpdateCount,isFetching:E,isRefetching:E&&"loading"!==w,isLoadingError:"error"===w&&0===v.dataUpdatedAt,isPlaceholderData:O,isPreviousData:C,isRefetchError:"error"===w&&0!==v.dataUpdatedAt,isStale:m(e,t),refetch:this.refetch,remove:this.remove}},n.shouldNotifyListeners=function(e,t){if(!t)return!0;var n=this.options,r=n.notifyOnChangeProps,o=n.notifyOnChangePropsExclusions;if(!r&&!o)return!0;if("tracked"===r&&!this.trackedProps.length)return!0;var i="tracked"===r?this.trackedProps:r;return Object.keys(e).some((function(n){var r=n,s=e[r]!==t[r],a=null==i?void 0:i.some((function(e){return e===n})),u=null==o?void 0:o.some((function(e){return e===n}));return s&&!u&&(!i||a)}))},n.updateResult=function(e){var t=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!(0,i.f8)(this.currentResult,t)){var n={cache:!0};!1!==(null==e?void 0:e.listeners)&&this.shouldNotifyListeners(this.currentResult,t)&&(n.listeners=!0),this.notify((0,r.A)({},n,e))}},n.updateQuery=function(){var e=this.client.getQueryCache().build(this.client,this.options);if(e!==this.currentQuery){var t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}},n.onQueryUpdate=function(e){var t={};"success"===e.type?t.onSuccess=!0:"error"!==e.type||(0,l.wm)(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()},n.notify=function(e){var t=this;s.j.batch((function(){e.onSuccess?(null==t.options.onSuccess||t.options.onSuccess(t.currentResult.data),null==t.options.onSettled||t.options.onSettled(t.currentResult.data,null)):e.onError&&(null==t.options.onError||t.options.onError(t.currentResult.error),null==t.options.onSettled||t.options.onSettled(void 0,t.currentResult.error)),e.listeners&&t.listeners.forEach((function(e){e(t.currentResult)})),e.cache&&t.client.getQueryCache().notify({query:t.currentQuery,type:"observerResultsUpdated"})}))},t}(u.Q);function d(e,t){return function(e,t){return!(!1===t.enabled||e.state.dataUpdatedAt||"error"===e.state.status&&!1===t.retryOnMount)}(e,t)||e.state.dataUpdatedAt>0&&h(e,t,t.refetchOnMount)}function h(e,t,n){if(!1!==t.enabled){var r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&m(e,t)}return!1}function p(e,t,n,r){return!1!==n.enabled&&(e!==t||!1===r.enabled)&&(!n.suspense||"error"!==e.state.status)&&m(e,n)}function m(e,t){return e.isStaleByTime(t.staleTime)}var v=n(609),y=n.n(v);var g,b=y().createContext((g=!1,{clearReset:function(){g=!1},reset:function(){g=!0},isReset:function(){return g}})),E=function(){return y().useContext(b)},w=n(360),C=n(439);function O(e,t,n){return function(e,t){var n=y().useRef(!1),r=y().useState(0)[1],o=(0,w.j)(),i=E(),a=o.defaultQueryObserverOptions(e);a.optimisticResults=!0,a.onError&&(a.onError=s.j.batchCalls(a.onError)),a.onSuccess&&(a.onSuccess=s.j.batchCalls(a.onSuccess)),a.onSettled&&(a.onSettled=s.j.batchCalls(a.onSettled)),a.suspense&&("number"!=typeof a.staleTime&&(a.staleTime=1e3),0===a.cacheTime&&(a.cacheTime=1)),(a.suspense||a.useErrorBoundary)&&(i.isReset()||(a.retryOnMount=!1));var u=y().useState((function(){return new t(o,a)}))[0],c=u.getOptimisticResult(a);if(y().useEffect((function(){n.current=!0,i.clearReset();var e=u.subscribe(s.j.batchCalls((function(){n.current&&r((function(e){return e+1}))})));return u.updateResult(),function(){n.current=!1,e()}}),[i,u]),y().useEffect((function(){u.setOptions(a,{listeners:!1})}),[a,u]),a.suspense&&c.isLoading)throw u.fetchOptimistic(a).then((function(e){var t=e.data;null==a.onSuccess||a.onSuccess(t),null==a.onSettled||a.onSettled(t,null)})).catch((function(e){i.clearReset(),null==a.onError||a.onError(e),null==a.onSettled||a.onSettled(void 0,e)}));if(c.isError&&!i.isReset()&&!c.isFetching&&(0,C.G)(a.suspense,a.useErrorBoundary,[c.error,u.getCurrentQuery()]))throw c.error;return"tracked"===a.notifyOnChangeProps&&(c=u.trackResult(c,a)),c}((0,i.vh)(e,t,n),f)}},439:(e,t,n)=>{"use strict";function r(e,t,n){return"function"==typeof t?t.apply(void 0,n):"boolean"==typeof t?t:!!e}n.d(t,{G:()=>r})},609:e=>{"use strict";e.exports=window.React},795:e=>{"use strict";e.exports=window.ReactDOM},168:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{A:()=>r})},540:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,{A:()=>o})}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.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.r(e),n.d(e,{hasBrowserEnv:()=>fe,hasStandardBrowserEnv:()=>de,hasStandardBrowserWebWorkerEnv:()=>pe});var t=n(609),r=n.n(t),o=n(795),i=n.n(o),s=n(942);const a=window.wp.components;function u(e){const n={display:e.display?e.display:"block",maxWidth:e.width?e.width:"350px"};return(0,t.createElement)("div",{style:n},(0,t.createElement)("label",{style:{display:"block",fontSize:"11px",textTransform:"uppercase"}},e.label),(0,t.createElement)("select",{value:e.value,onChange:t=>e.onChange(t.target.value)},e.options.map((e=>(0,t.createElement)("option",{value:e.value},e.label)))))}var c=n(838),l=n.n(c);function f(e){const{innerHTML:n}=e,r=l().sanitize(n).replace("class=","className=");return(0,t.createElement)("div",{dangerouslySetInnerHTML:{__html:r}})}function d(e,t){return function(){return e.apply(t,arguments)}}const{toString:h}=Object.prototype,{getPrototypeOf:p}=Object,m=(v=Object.create(null),e=>{const t=h.call(e);return v[t]||(v[t]=t.slice(8,-1).toLowerCase())});var v;const y=e=>(e=e.toLowerCase(),t=>m(t)===e),g=e=>t=>typeof t===e,{isArray:b}=Array,E=g("undefined"),w=y("ArrayBuffer"),C=g("string"),O=g("function"),S=g("number"),A=e=>null!==e&&"object"==typeof e,T=e=>{if("object"!==m(e))return!1;const t=p(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},R=y("Date"),k=y("File"),N=y("Blob"),_=y("FileList"),x=y("URLSearchParams");function P(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),b(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(r=0;r<i;r++)s=o[r],t.call(null,e[s],s,e)}}function F(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const D="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,L=e=>!E(e)&&e!==D,M=(I="undefined"!=typeof Uint8Array&&p(Uint8Array),e=>I&&e instanceof I);var I;const U=y("HTMLFormElement"),j=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Q=y("RegExp"),q=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};P(n,((n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)})),Object.defineProperties(e,r)},B="abcdefghijklmnopqrstuvwxyz",H="0123456789",z={DIGIT:H,ALPHA:B,ALPHA_DIGIT:B+B.toUpperCase()+H},K=y("AsyncFunction"),G={isArray:b,isArrayBuffer:w,isBuffer:function(e){return null!==e&&!E(e)&&null!==e.constructor&&!E(e.constructor)&&O(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||O(e.append)&&("formdata"===(t=m(e))||"object"===t&&O(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&w(e.buffer),t},isString:C,isNumber:S,isBoolean:e=>!0===e||!1===e,isObject:A,isPlainObject:T,isUndefined:E,isDate:R,isFile:k,isBlob:N,isRegExp:Q,isFunction:O,isStream:e=>A(e)&&O(e.pipe),isURLSearchParams:x,isTypedArray:M,isFileList:_,forEach:P,merge:function e(){const{caseless:t}=L(this)&&this||{},n={},r=(r,o)=>{const i=t&&F(n,o)||o;T(n[i])&&T(r)?n[i]=e(n[i],r):T(r)?n[i]=e({},r):b(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&P(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(P(t,((t,r)=>{n&&O(t)?e[r]=d(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,s;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],r&&!r(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==n&&p(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:m,kindOfTest:y,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(b(e))return e;let t=e.length;if(!S(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:U,hasOwnProperty:j,hasOwnProp:j,reduceDescriptors:q,freezeMethods:e=>{q(e,((t,n)=>{if(O(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];O(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return b(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:F,global:D,isContextDefined:L,ALPHABET:z,generateString:(e=16,t=z.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&O(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(A(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=b(e)?[]:{};return P(e,((e,t)=>{const i=n(e,r+1);!E(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:K,isThenable:e=>e&&(A(e)||O(e))&&O(e.then)&&O(e.catch)};function W(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}G.inherits(W,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:G.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const V=W.prototype,J={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{J[e]={value:e}})),Object.defineProperties(W,J),Object.defineProperty(V,"isAxiosError",{value:!0}),W.from=(e,t,n,r,o,i)=>{const s=Object.create(V);return G.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),W.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const Y=W;function $(e){return G.isPlainObject(e)||G.isArray(e)}function X(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function Z(e,t,n){return e?e.concat(t).map((function(e,t){return e=X(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const ee=G.toFlatObject(G,{},null,(function(e){return/^is[A-Z]/.test(e)})),te=function(e,t,n){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=G.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!G.isUndefined(t[e])}))).metaTokens,o=n.visitor||c,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&G.isSpecCompliantForm(t);if(!G.isFunction(o))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(G.isDate(e))return e.toISOString();if(!a&&G.isBlob(e))throw new Y("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(e)||G.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(G.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(G.isArray(e)&&function(e){return G.isArray(e)&&!e.some($)}(e)||(G.isFileList(e)||G.endsWith(n,"[]"))&&(a=G.toArray(e)))return n=X(n),a.forEach((function(e,r){!G.isUndefined(e)&&null!==e&&t.append(!0===s?Z([n],r,i):null===s?n:n+"[]",u(e))})),!1;return!!$(e)||(t.append(Z(o,n,i),u(e)),!1)}const l=[],f=Object.assign(ee,{defaultVisitor:c,convertValue:u,isVisitable:$});if(!G.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!G.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),G.forEach(n,(function(n,i){!0===(!(G.isUndefined(n)||null===n)&&o.call(t,n,G.isString(i)?i.trim():i,r,f))&&e(n,r?r.concat(i):[i])})),l.pop()}}(e),t};function ne(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function re(e,t){this._pairs=[],e&&te(e,this,t)}const oe=re.prototype;oe.append=function(e,t){this._pairs.push([e,t])},oe.toString=function(e){const t=e?function(t){return e.call(this,t,ne)}:ne;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const ie=re;function se(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ae(e,t,n){if(!t)return e;const r=n&&n.encode||se,o=n&&n.serialize;let i;if(i=o?o(t,n):G.isURLSearchParams(t)?t.toString():new ie(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const ue=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){G.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ce={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},le={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ie,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},fe="undefined"!=typeof window&&"undefined"!=typeof document,de=(he="undefined"!=typeof navigator&&navigator.product,fe&&["ReactNative","NativeScript","NS"].indexOf(he)<0);var he;const pe="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,me={...e,...le},ve=function(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=e.length;return i=!i&&G.isArray(r)?r.length:i,a?(G.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s):(r[i]&&G.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&G.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!s)}if(G.isFormData(e)&&G.isFunction(e.entries)){const n={};return G.forEachEntry(e,((e,r)=>{t(function(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null},ye={transitional:ce,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=G.isObject(e);if(o&&G.isHTMLForm(e)&&(e=new FormData(e)),G.isFormData(e))return r?JSON.stringify(ve(e)):e;if(G.isArrayBuffer(e)||G.isBuffer(e)||G.isStream(e)||G.isFile(e)||G.isBlob(e))return e;if(G.isArrayBufferView(e))return e.buffer;if(G.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return te(e,new me.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return me.isNode&&G.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=G.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return te(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(G.isString(e))try{return(0,JSON.parse)(e),G.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ye.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&G.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw Y.from(e,Y.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:me.classes.FormData,Blob:me.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};G.forEach(["delete","get","head","post","put","patch"],(e=>{ye.headers[e]={}}));const ge=ye,be=G.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ee=Symbol("internals");function we(e){return e&&String(e).trim().toLowerCase()}function Ce(e){return!1===e||null==e?e:G.isArray(e)?e.map(Ce):String(e)}function Oe(e,t,n,r,o){return G.isFunction(r)?r.call(this,t,n):(o&&(t=n),G.isString(t)?G.isString(r)?-1!==t.indexOf(r):G.isRegExp(r)?r.test(t):void 0:void 0)}class Se{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=we(t);if(!o)throw new Error("header name must be a non-empty string");const i=G.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Ce(e))}const i=(e,t)=>G.forEach(e,((e,n)=>o(e,n,t)));return G.isPlainObject(e)||e instanceof this.constructor?i(e,t):G.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&be[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=we(e)){const n=G.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(G.isFunction(t))return t.call(this,e,n);if(G.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=we(e)){const n=G.findKey(this,e);return!(!n||void 0===this[n]||t&&!Oe(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=we(e)){const o=G.findKey(n,e);!o||t&&!Oe(0,n[o],o,t)||(delete n[o],r=!0)}}return G.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!Oe(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return G.forEach(this,((r,o)=>{const i=G.findKey(n,o);if(i)return t[i]=Ce(r),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();s!==o&&delete t[o],t[s]=Ce(r),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return G.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&G.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Ee]=this[Ee]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=we(e);t[r]||(function(e,t){const n=G.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return G.isArray(e)?e.forEach(r):r(e),this}}Se.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),G.reduceDescriptors(Se.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),G.freezeMethods(Se);const Ae=Se;function Te(e,t){const n=this||ge,r=t||n,o=Ae.from(r.headers);let i=r.data;return G.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Re(e){return!(!e||!e.__CANCEL__)}function ke(e,t,n){Y.call(this,null==e?"canceled":e,Y.ERR_CANCELED,t,n),this.name="CanceledError"}G.inherits(ke,Y,{__CANCEL__:!0});const Ne=ke,_e=me.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const s=[e+"="+encodeURIComponent(t)];G.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),G.isString(r)&&s.push("path="+r),G.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function xe(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Pe=me.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=G.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function Fe(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const u=Date.now(),c=r[s];o||(o=u),n[i]=a,r[i]=u;let l=s,f=0;for(;l!==i;)f+=n[l++],l%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),u-o<t)return;const d=c&&u-c;return d?Math.round(1e3*f/d):void 0}}(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-n,u=r(a);n=i;const c={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:u||void 0,estimated:u&&s&&i<=s?(s-i)/u:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}const De={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=Ae.from(e.headers).normalize();let i,s,{responseType:a,withXSRFToken:u}=e;function c(){e.cancelToken&&e.cancelToken.unsubscribe(i),e.signal&&e.signal.removeEventListener("abort",i)}if(G.isFormData(r))if(me.hasStandardBrowserEnv||me.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(s=o.getContentType())){const[e,...t]=s?s.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const f=xe(e.baseURL,e.url);function d(){if(!l)return;const r=Ae.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Y("Request failed with status code "+n.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),c()}),(function(e){n(e),c()}),{data:a&&"text"!==a&&"json"!==a?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),ae(f,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(d)},l.onabort=function(){l&&(n(new Y("Request aborted",Y.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new Y("Network Error",Y.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||ce;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new Y(t,r.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,e,l)),l=null},me.hasStandardBrowserEnv&&(u&&G.isFunction(u)&&(u=u(e)),u||!1!==u&&Pe(f))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&_e.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),"setRequestHeader"in l&&G.forEach(o.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),G.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),a&&"json"!==a&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",Fe(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",Fe(e.onUploadProgress)),(e.cancelToken||e.signal)&&(i=t=>{l&&(n(!t||t.type?new Ne(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(i),e.signal&&(e.signal.aborted?i():e.signal.addEventListener("abort",i)));const h=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(f);h&&-1===me.protocols.indexOf(h)?n(new Y("Unsupported protocol "+h+":",Y.ERR_BAD_REQUEST,e)):l.send(r||null)}))}};G.forEach(De,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Le=e=>`- ${e}`,Me=e=>G.isFunction(e)||null===e||!1===e,Ie=e=>{e=G.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){let t;if(n=e[i],r=n,!Me(n)&&(r=De[(t=String(n)).toLowerCase()],void 0===r))throw new Y(`Unknown adapter '${t}'`);if(r)break;o[t||"#"+i]=r}if(!r){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(Le).join("\n"):" "+Le(e[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function Ue(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ne(null,e)}function je(e){return Ue(e),e.headers=Ae.from(e.headers),e.data=Te.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ie(e.adapter||ge.adapter)(e).then((function(t){return Ue(e),t.data=Te.call(e,e.transformResponse,t),t.headers=Ae.from(t.headers),t}),(function(t){return Re(t)||(Ue(e),t&&t.response&&(t.response.data=Te.call(e,e.transformResponse,t.response),t.response.headers=Ae.from(t.response.headers))),Promise.reject(t)}))}const Qe=e=>e instanceof Ae?{...e}:e;function qe(e,t){t=t||{};const n={};function r(e,t,n){return G.isPlainObject(e)&&G.isPlainObject(t)?G.merge.call({caseless:n},e,t):G.isPlainObject(t)?G.merge({},t):G.isArray(t)?t.slice():t}function o(e,t,n){return G.isUndefined(t)?G.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!G.isUndefined(t))return r(void 0,t)}function s(e,t){return G.isUndefined(t)?G.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const u={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>o(Qe(e),Qe(t),!0)};return G.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=u[r]||o,s=i(e[r],t[r],r);G.isUndefined(s)&&i!==a||(n[r]=s)})),n}const Be={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Be[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const He={};Be.transitional=function(e,t,n){function r(e,t){return"[Axios v1.6.8] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new Y(r(o," has been removed"+(t?" in "+t:"")),Y.ERR_DEPRECATED);return t&&!He[o]&&(He[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}};const ze={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new Y("option "+i+" must be "+n,Y.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Y("Unknown option "+i,Y.ERR_BAD_OPTION)}},validators:Be},Ke=ze.validators;class Ge{constructor(e){this.defaults=e,this.interceptors={request:new ue,response:new ue}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=qe(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&ze.assertOptions(n,{silentJSONParsing:Ke.transitional(Ke.boolean),forcedJSONParsing:Ke.transitional(Ke.boolean),clarifyTimeoutError:Ke.transitional(Ke.boolean)},!1),null!=r&&(G.isFunction(r)?t.paramsSerializer={serialize:r}:ze.assertOptions(r,{encode:Ke.function,serialize:Ke.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&G.merge(o.common,o[t.method]);o&&G.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Ae.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const u=[];let c;this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)}));let l,f=0;if(!a){const e=[je.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,u),l=e.length,c=Promise.resolve(t);f<l;)c=c.then(e[f++],e[f++]);return c}l=s.length;let d=t;for(f=0;f<l;){const e=s[f++],t=s[f++];try{d=e(d)}catch(e){t.call(this,e);break}}try{c=je.call(this,d)}catch(e){return Promise.reject(e)}for(f=0,l=u.length;f<l;)c=c.then(u[f++],u[f++]);return c}getUri(e){return ae(xe((e=qe(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}G.forEach(["delete","get","head","options"],(function(e){Ge.prototype[e]=function(t,n){return this.request(qe(n||{},{method:e,url:t,data:(n||{}).data}))}})),G.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(qe(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Ge.prototype[e]=t(),Ge.prototype[e+"Form"]=t(!0)}));const We=Ge;class Ve{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new Ne(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Ve((function(t){e=t})),cancel:e}}}const Je=Ve,Ye={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ye).forEach((([e,t])=>{Ye[t]=e}));const $e=Ye,Xe=function e(t){const n=new We(t),r=d(We.prototype.request,n);return G.extend(r,We.prototype,n,{allOwnKeys:!0}),G.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(qe(t,n))},r}(ge);Xe.Axios=We,Xe.CanceledError=Ne,Xe.CancelToken=Je,Xe.isCancel=Re,Xe.VERSION="1.6.8",Xe.toFormData=te,Xe.AxiosError=Y,Xe.Cancel=Xe.CanceledError,Xe.all=function(e){return Promise.all(e)},Xe.spread=function(e){return function(t){return e.apply(null,t)}},Xe.isAxiosError=function(e){return G.isObject(e)&&!0===e.isAxiosError},Xe.mergeConfig=qe,Xe.AxiosHeaders=Ae,Xe.formToJSON=e=>ve(G.isHTMLForm(e)?new FormData(e):e),Xe.getAdapter=Ie,Xe.HttpStatusCode=$e,Xe.default=Xe;const Ze=Xe.create({baseURL:"/wp-json/rsvpmaker/v1/",headers:{"Content-type":"application/json","X-WP-Nonce":rsvpmaker_rest.nonce},validateStatus:function(e){return e<400}});function et(e){const{type:n}=e;return(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-arrow-up-circle",viewBox:"0 0 16 16"},(0,t.createElement)("title",null,"Move Up ",n),(0,t.createElement)("path",{"fill-rule":"evenodd",d:"M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-7.5 3.5a.5.5 0 0 1-1 0V5.707L5.354 7.854a.5.5 0 1 1-.708-.708l3-3a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1-.708.708L8.5 5.707V11.5z"}))}function tt(e){const{type:n}=e;return(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-arrow-down-circle",viewBox:"0 0 16 16"},(0,t.createElement)("title",null,"Move Down ",n),(0,t.createElement)("path",{"fill-rule":"evenodd",d:"M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v5.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V4.5z"}))}function nt(e){const{type:n}=e;return(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-trash",viewBox:"0 0 16 16"},(0,t.createElement)("title",null,"Delete ",n),(0,t.createElement)("path",{d:"M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z"}),(0,t.createElement)("path",{"fill-rule":"evenodd",d:"M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z"}))}function rt(e){const[n,r]=(0,t.useState)(e.form_id),[o,i]=(0,t.useState)("rsvpmaker/formfield"),[c,l]=(0,t.useState)(""),[d,h]=(0,t.useState)(""),[p,m]=(0,t.useState)(!1),[v,y]=(0,t.useState)(""),{isSaving:g,saveEffect:b,SaveControls:E,makeNotification:w}=function(){const[e,n]=(0,t.useState)(!1),[r,o]=(0,t.useState)(null),[i,a]=(0,t.useState)(null);function u(){n(!0),setTimeout((()=>{n(!1)}),500)}return{SaveControls:function(e){const{changes:n,setChanges:r}=e;console.log("changes SaveControls",n);const{mutate:o}=function(e,t){const n=(0,s.useQueryClient)();return(0,s.useMutation)((async function(e){return await Ze.post("rsvp_options",e)}),{onMutate:async e=>{console.log("optimistic update option",e),await n.cancelQueries(["rsvp_options"]);const t=n.getQueryData(["rsvp_options"]);return n.setQueryData(["rsvp_options"],(t=>{const{data:n}=t;e.forEach((e=>{"rsvp_options"==e.type&&(n.rsvp_options[e.key]=e.value)}));const r={...t,data:n};return console.log("newdata optimistic update",r),r})),console.log("updating options"),{previousValue:t}},onSettled:(e,t,r,o)=>{n.invalidateQueries(["rsvp_options"])},onSuccess:(t,n,r,o)=>{console.log("updated"),e([])},onError:(e,t,r)=>{console.log("update options error",e),n.setQueryData("rsvp_options",r.previousValue)}})}(r);return(0,t.createElement)("div",{id:"savecontrols"},i&&(0,t.createElement)("div",{className:"rsvp-notification rsvp-notification-success"},i.message),(0,t.createElement)("div",{id:"savebuttonwrapper"},(0,t.createElement)("button",{onClick:()=>{console.log("save changeset",n),u(),o(n)}},"Save")))},notification:i,setNotification:a,isSaving:e,saveEffect:u,makeNotification:function(e=""){if(""==e)return i;r&&clearTimeout(r),a({message:e});let t=setTimeout((()=>{a(null)}),5e3);o(t)}}}(),{changes:C,addChange:O,setChanges:S}=e;wp?.data?.select("core/editor")?.getCurrentPostId(),console.log("Forms props",e),console.log("Forms formId",n);const{data:A,isLoading:T,isError:R}=(0,s.useQuery)(["rsvp_form",n],(function(){return Ze.get("rsvp_form?form_id="+n+"&post_id="+wp?.data?.select("core/editor")?.getCurrentPostId())}),{enabled:!0,retry:2,onSuccess:(e,t,o,i)=>{n||r(e.data.form_id),console.log("rsvp forms query",e)},onError:(e,t,n)=>{console.log("error retrieving rsvp forms",e)},refetchInterval:!1});if(R)return(0,t.createElement)("p",null,"Error loading form options");const k=(0,s.useQueryClient)(),{mutate:N}=(0,s.useMutation)((async function(t){return await Ze.post("rsvp_form?form_id="+n+"&post_id="+wp?.data?.select("core/editor")?.getCurrentPostId(),{form:t,newForm:v,event_id:e.event_id?e.event_id:0})}),{onMutate:async e=>{const t=k.getQueryData(["rsvp_form",n]);return console.log("optimistic update form",e),await k.cancelQueries(["rsvp_form",n]),k.setQueryData(["rsvp_form",n],(t=>{const{data:n}=t;n.form=e;const r={...t,data:n};return console.log("newdata optimistic form update",r),r})),console.log("updating options"),{previousValue:t}},onSettled:(e,t,r,o)=>{k.invalidateQueries(["rsvp_form",n])},onSuccess:(e,t,n,o)=>{console.log("updated"),r(e.data.form_id)},onError:(e,t,r)=>{console.log("update options error",e),k.setQueryData(["rsvp_form",n],r.previousValue)}});if(T)return(0,t.createElement)("p",null,"Loading ...");const _=A.data.form.filter((e=>e.blockName)),x=A.data.form_options,P=A.data.form_id;let F=_.length-1;const D=[];for(let e=0;e<F;e++){let t=_[e];if(t?.attrs.guestform?D.push(e):console.log("guestfields attr not found",e),["rsvpmaker/formnote","rsvpmaker/guests"].includes(t.blockName)){F=e-1;break}}const L=[{label:"Choose Field Type",value:""},{label:"Text Field",value:"rsvpmaker/formfield"},{label:"Text Area",value:"rsvpmaker/formtextarea"},{label:"Select",value:"rsvpmaker/formselect"},{label:"Radio Buttons",value:"rsvpmaker/formradio"},{label:"Add to Email List Checkbox",value:"rsvpmaker/formchimp"}];let M=!1,I=!1;for(let e=0;e<_.length;e++){let t=_[e];console.log("check for end fields",t),"rsvpmaker/guests"==t.blockName&&(M=!0,console.log("check for end fields found guests")),"rsvpmaker/formnote"==t.blockName&&(I=!0,console.log("check for end fields found note"))}function U(e){const[n,r]=(0,t.useState)(!1),{blockindex:o}=e;return(0,t.createElement)(t.Fragment,null,!n&&(0,t.createElement)("button",{className:"blockmove deletebutton",onClick:()=>{r(!0)}},(0,t.createElement)(nt,null)," Delete")," ",n&&(0,t.createElement)("button",{className:"blockmove",onClick:()=>{j(o,"delete")}},(0,t.createElement)(nt,null)," Confirm Delete")," ")}function j(e,t){const n=[],r=_[e];let o="delete"==t;_.forEach(((i,s)=>{null==i.blockName||s==e||("up"==t&&s==e-1&&(n.push(r),o=!0),"down"==t&&s==e+2&&(n.push(r),o=!0),n.push(i))})),o||n.push(r),console.log("newform",n),N(n)}function Q(e,t,n){const r=[..._];r[e].attrs[t]=n,N(r)}function q(e){const{blockindex:n,setFormItemAttr:r}=e,[o,i]=(0,t.useState)(e.attrs.choicearray),[s,u]=(0,t.useState)(e.attrs.required),[c,l]=(0,t.useState)(e.attrs.label),[f,d]=(0,t.useState)(e.attrs.guestform),[h,p]=(0,t.useState)(e.attrs.defaultToFirst);return(0,t.createElement)("div",{className:"formAtts"},["rsvpmaker/formfield","rsvpmaker/formselect","rsvpmaker/formradio","rsvpmaker/formtextarea"].includes(e.blockName)&&(0,t.createElement)("p",null,(0,t.createElement)("label",null,"Field Label")," ",(0,t.createElement)("input",{type:"text",value:c,onChange:e=>{l(e.target.value)},onBlur:()=>{r(n,"label",c)}})),o&&(0,t.createElement)("p",null,"Choices",(0,t.createElement)("br",null),(0,t.createElement)("textarea",{value:o.join("\n"),onChange:e=>{let t=e.target.value.split("\n");i(t),r(n,"choicearray",t)},onBlur:()=>{r(n,"choicearray",o)}}),(0,t.createElement)("br",null),(0,t.createElement)("em",null,"Enter one choice per line")),["rsvpmaker/formfield","rsvpmaker/formselect","rsvpmaker/formradio","rsvpmaker/formtextarea"].includes(e.blockName)&&"email"!=e.attrs.slug&&(0,t.createElement)(a.ToggleControl,{label:"Required",checked:"required"==s,onChange:()=>{let e="required"==s?"":"required";u(e),r(n,"required",e)}}),"email"==e.attrs.slug&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Email is always required")),["rsvpmaker/formfield","rsvpmaker/formselect","rsvpmaker/formradio","rsvpmaker/formtextarea"].includes(e.blockName)&&(0,t.createElement)(a.ToggleControl,{label:"Include on Guest Form",checked:f,onChange:()=>{let e=!f;d(e),r(n,"guestform",e)}}),["rsvpmaker/formradio"].includes(e.blockName)&&(0,t.createElement)(a.ToggleControl,{label:"Default to First Item",checked:h,onChange:()=>{let e=!h;p(e),r(n,"defaultToFirst",e)}}))}function B(){console.log("guestfields",D);const[e,n]=(0,t.useState)(!1);return e?(0,t.createElement)("div",null,(0,t.createElement)("p",null,"Guest 1"),D.map((e=>{const n=_[e];console.log("guestfields forEach",n);let r=[];return n?.attrs.choicearray&&(r=n.attrs.choicearray.map((e=>({label:e,value:e})))),(0,t.createElement)("div",{className:"formAtts"},"rsvpmaker/formfield"==n.blockName&&(0,t.createElement)(a.TextControl,{label:n.attrs.label}),"rsvpmaker/formtextarea"==n.blockName&&(0,t.createElement)(a.TextareaControl,{label:n.attrs.label}),"rsvpmaker/formselect"==n.blockName&&(0,t.createElement)(u,{label:n.attrs.label,options:r}),"rsvpmaker/formradio"==n.blockName&&(0,t.createElement)(a.RadioControl,{label:n.attrs.label,options:r}))}))):(0,t.createElement)("p",null,(0,t.createElement)("a",{onClick:()=>{n(!0)}},"+ Add Guests"))}M||L.push({label:"Guest Fields",value:"rsvpmaker/guests"}),I||L.push({label:"Note Field",value:"rsvpmaker/formnote"});let H="",z=!0;return(0,t.createElement)("div",{className:"rsvptab"},A.data.is_default&&(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"Default Form Selected"),(0,t.createElement)("p",null,"Changes you make below will apply to all events that use the default form. Switch to a custom form to make customizations for this event only. Forms can also be customized from an event template.")),A.data.is_inherited&&(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"Form Is Inherited"),(0,t.createElement)("p",null,"This form is inherited from a template or another document. Changes you make below will apply to all events that use the same form. Switch to a custom form to make customizations for this event only. Forms can also be customized from an event template.")),(0,t.createElement)(a.ToggleControl,{label:"Show Form Preview",checked:p,onChange:()=>{m(!p)}}),p&&_.map(((e,n)=>{z=e.blockName.indexOf("rsvpmaker")>-1;let r=[];if(e?.attrs.choicearray&&(r=e.attrs.choicearray.map((e=>({label:e,value:e})))),null!=e.blockName)return(0,t.createElement)("div",null,"rsvpmaker/formfield"==e.blockName&&(0,t.createElement)(a.TextControl,{label:e.attrs.label}),"rsvpmaker/formtextarea"==e.blockName&&(0,t.createElement)(a.TextareaControl,{label:e.attrs.label}),"rsvpmaker/formselect"==e.blockName&&(0,t.createElement)(u,{label:e.attrs.label,options:r}),"rsvpmaker/formradio"==e.blockName&&(0,t.createElement)(a.RadioControl,{label:e.attrs.label,options:r}),"rsvpmaker/guests"==e.blockName&&(0,t.createElement)(B,null),"rsvpmaker/formchimp"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("input",{type:"checkbox"})," Add me to your email list"),!z&&e.innerHTML&&(0,t.createElement)(f,{innerHTML:e.innerHTML}))})),(0,t.createElement)("h4",null,"Form Editing Controls"),_.map(((e,r)=>{if(H=e.blockName.replace(/^[^/]+\//,""),z=e.blockName.indexOf("rsvpmaker")>-1,"formchimp"==H?H="Add to Email List Checkbox":"formnote"==H&&(H="Note"),null!=e.blockName)return(0,t.createElement)("div",{className:"formblock"},(0,t.createElement)("div",{class:"blockheader"},(0,t.createElement)("div",{className:"reorganize-drag"},(0,t.createElement)("div",{className:"titleline"},(0,t.createElement)("h2",null,H," ",e.attrs.label&&(0,t.createElement)("span",{className:"fieldlabel"},e.attrs.label))," ",!["rsvpmaker/formnote","rsvpmaker/guests"].includes(e.blockName)&&r>0&&(0,t.createElement)("button",{className:"blockmove",onClick:()=>{j(r,"up")}},(0,t.createElement)(et,null))," ",!["rsvpmaker/formnote","rsvpmaker/guests"].includes(e.blockName)&&r!=F&&(0,t.createElement)("button",{className:"blockmove",onClick:()=>{j(r,"down")}},(0,t.createElement)(tt,null))," ",(0,t.createElement)(U,{blockindex:r})," "),"rsvpmaker/guests"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Gathers information about guests.")),"rsvpmaker/formnote"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"A free text entry note at the bottom of the form.")),"rsvpmaker/formchimp"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Displays an Add to Email List checkbox on the form")),!z&&e.innerHTML&&(0,t.createElement)("div",null,(0,t.createElement)(f,{innerHTML:e.innerHTML})," ",(0,t.createElement)("br",null),(0,t.createElement)("em",null,(0,t.createElement)("a",{href:"/wp-admin/post.php?action=edit&post="+n},"Open in the WordPress editor"))),(0,t.createElement)(q,{attrs:e.attrs,blockName:e.blockName,blockindex:r,setFormItemAttr:Q}))))})),(0,t.createElement)("p",null,"Add a form field ",(0,t.createElement)(u,{label:"Type",options:L,value:o,onChange:e=>{i(e)}})," ",!["rsvpmaker/formnote","rsvpmaker/guests","rsvpmaker/formchimp"].includes(o)&&(0,t.createElement)(a.TextControl,{label:"Field Label",value:c,onChange:e=>{l(e)}})," "),["rsvpmaker/formselect","rsvpmaker/formradio"].includes(o)&&(0,t.createElement)("p",null,(0,t.createElement)("label",null,"Choices"),(0,t.createElement)("br",null),(0,t.createElement)("textarea",{value:d,onChange:e=>{h(e.target.value)}}),(0,t.createElement)("br",null),(0,t.createElement)("em",null,"Enter one choice per line")),(0,t.createElement)("p",null,(0,t.createElement)("button",{onClick:function(){if(!o)return;let e;if(console.log(o),console.log(c),"rsvpmaker/formnote"==o)e={blockName:"rsvpmaker/formnote",attrs:[],innerBlocks:[],innerHTML:"",innerContent:[]};else if("rsvpmaker/guests"==o)e={blockName:"rsvpmaker/guests",attrs:[],innerBlocks:[{blockName:"core/paragraph",attrs:[],innerBlocks:[],innerHTML:"\n<p></p>\n",innerContent:["\n<p></p>\n"]}],innerHTML:'\n<div class="wp-block-rsvpmaker-guests"></div>\n',innerContent:['\n<div class="wp-block-rsvpmaker-guests">',null,"</div>\n"]};else{if(!c)return void alert("a field label is required");let t=c.toLowerCase().replace(/[^a-z0-9]/,"_");"first_name"==t&&(t="first"),"last_name"==t&&(t="last"),e={blockName:o,innerHTML:"",innerBlocks:[],innerContent:[],attrs:{label:c,slug:t}}}d&&(e.attrs.choicearray=d.split("\n")),console.log("newfield",e);const t=[];_.forEach(((n,r)=>{t.push(n),r==F&&t.push(e)})),N(t),i("rsvpmaker/formfield"),l(""),h("")}},"Add")),(0,t.createElement)("p",null,"You can also open this form ",(0,t.createElement)("a",{href:"/wp-admin/post.php?action=edit&post="+n},"in the WordPress editor"),"."),!e.single_form&&(0,t.createElement)(u,{label:"Switch Form",value:P,options:x,onChange:r}),A.data.copied&&(0,t.createElement)("p",null,"Copied ",(0,t.createElement)("strong",null,A.data.copied)),!e.single_form&&(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"Save as Reusable Form"),(0,t.createElement)(a.TextControl,{label:"Form Title",value:v,onChange:y}),(0,t.createElement)("p",null,"You can save the form so it can also be used with other events."),(0,t.createElement)("p",null,(0,t.createElement)("button",{onClick:e=>{e.preventDefault(),N(_),y("")}},"Create Form"))))}function ot(e){const{form_id:n,event_id:r}=e,[o,i]=(0,t.useState)(!1);return o?(0,t.createElement)(rt,{form_id:n,event_id:r}):(0,t.createElement)("p",null,(0,t.createElement)("button",{onClick:e=>{e.preventDefault(),i(!0)}},"Customize Form"))}const it=new s.QueryClient;window.addEventListener("load",(function(e){const n=document.getElementById("react_event_options"),o=n.getAttribute("form_id"),a=n.getAttribute("event_id");i().render((0,t.createElement)(r().StrictMode,null,(0,t.createElement)(s.QueryClientProvider,{client:it},(0,t.createElement)(ot,{form_id:o,event_id:a}))),n)}))})()})(); -
rsvpmaker/tags/11.1.5/admin/build/single-form.asset.php
r3104244 r3110769 1 <?php return array('dependencies' => array('react', 'react-dom', 'wp-components'), 'version' => ' 8dcfaa090700afdfa6ef');1 <?php return array('dependencies' => array('react', 'react-dom', 'wp-components'), 'version' => '721c8b27d29816a87e8e'); -
rsvpmaker/tags/11.1.5/admin/build/single-form.js
r3104244 r3110769 1 (()=>{var e={838:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:o}=Object;let{freeze:i,seal:s,create:a}=Object,{apply:u,construct:c}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),s||(s=function(e){return e}),u||(u=function(e,t,n){return e.apply(t,n)}),c||(c=function(e,t){return new e(...t)});const l= S(Array.prototype.forEach),f=S(Array.prototype.pop),d=S(Array.prototype.push),h=S(String.prototype.toLowerCase),p=S(String.prototype.toString),m=S(String.prototype.match),v=S(String.prototype.replace),y=S(String.prototype.indexOf),g=S(String.prototype.trim),b=S(Object.prototype.hasOwnProperty),E=S(RegExp.prototype.test),w=(O=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c(O,t)});var O;function S(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return u(e,t,r)}}function C(e,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;t&&t(e,null);let i=r.length;for(;i--;){let t=r[i];if("string"==typeof t){const e=o(t);e!==t&&(n(r)||(r[i]=e),t=e)}e[t]=!0}return e}function A(e){for(let t=0;t<e.length;t++)b(e,t)||(e[t]=null);return e}function T(t){const n=a(null);for(const[r,o]of e(t))b(t,r)&&(Array.isArray(o)?n[r]=A(o):o&&"object"==typeof o&&o.constructor===Object?n[r]=T(o):n[r]=o);return n}function R(e,t){for(;null!==e;){const n=o(e,t);if(n){if(n.get)return S(n.get);if("function"==typeof n.value)return S(n.value)}e=r(e)}return function(){return null}}const k=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),N=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),x=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),_=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),P=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),D=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),F=i(["#text"]),L=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),M=i(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),I=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),U=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),j=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Q=s(/<%[\w\W]*|[\w\W]*%>/gm),q=s(/\${[\w\W]*}/gm),B=s(/^data-[\-\w.\u00B7-\uFFFF]/),H=s(/^aria-[\-\w]+$/),z=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),K=s(/^(?:\w+script|data):/i),G=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),W=s(/^html$/i),V=s(/^[a-z][.\w]*(-[.\w]+)+$/i);var J=Object.freeze({__proto__:null,MUSTACHE_EXPR:j,ERB_EXPR:Q,TMPLIT_EXPR:q,DATA_ATTR:B,ARIA_ATTR:H,IS_ALLOWED_URI:z,IS_SCRIPT_OR_DATA:K,ATTR_WHITESPACE:G,DOCTYPE_NAME:W,CUSTOM_ELEMENT:V});const Y=function(){return"undefined"==typeof window?null:window};return function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y();const r=e=>t(e);if(r.version="3.0.11",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;let{document:o}=n;const s=o,u=s.currentScript,{DocumentFragment:c,HTMLTemplateElement:O,Node:S,Element:A,NodeFilter:j,NamedNodeMap:Q=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:q,DOMParser:B,trustedTypes:H}=n,K=A.prototype,G=R(K,"cloneNode"),V=R(K,"nextSibling"),$=R(K,"childNodes"),X=R(K,"parentNode");if("function"==typeof O){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let Z,ee="";const{implementation:te,createNodeIterator:ne,createDocumentFragment:re,getElementsByTagName:oe}=o,{importNode:ie}=s;let se={};r.isSupported="function"==typeof e&&"function"==typeof X&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:ue,TMPLIT_EXPR:ce,DATA_ATTR:le,ARIA_ATTR:fe,IS_SCRIPT_OR_DATA:de,ATTR_WHITESPACE:he,CUSTOM_ELEMENT:pe}=J;let{IS_ALLOWED_URI:me}=J,ve=null;const ye=C({},[...k,...N,...x,...P,...F]);let ge=null;const be=C({},[...L,...M,...I,...U]);let Ee=Object.seal(a(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),we=null,Oe=null,Se=!0,Ce=!0,Ae=!1,Te=!0,Re=!1,ke=!1,Ne=!1,xe=!1,_e=!1,Pe=!1,De=!1,Fe=!0,Le=!1,Me=!0,Ie=!1,Ue={},je=null;const Qe=C({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let qe=null;const Be=C({},["audio","video","img","source","image","track"]);let He=null;const ze=C({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ke="http://www.w3.org/1998/Math/MathML",Ge="http://www.w3.org/2000/svg",We="http://www.w3.org/1999/xhtml";let Ve=We,Je=!1,Ye=null;const $e=C({},[Ke,Ge,We],p);let Xe=null;const Ze=["application/xhtml+xml","text/html"];let et=null,tt=null;const nt=o.createElement("form"),rt=function(e){return e instanceof RegExp||e instanceof Function},ot=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!tt||tt!==e){if(e&&"object"==typeof e||(e={}),e=T(e),Xe=-1===Ze.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,et="application/xhtml+xml"===Xe?p:h,ve=b(e,"ALLOWED_TAGS")?C({},e.ALLOWED_TAGS,et):ye,ge=b(e,"ALLOWED_ATTR")?C({},e.ALLOWED_ATTR,et):be,Ye=b(e,"ALLOWED_NAMESPACES")?C({},e.ALLOWED_NAMESPACES,p):$e,He=b(e,"ADD_URI_SAFE_ATTR")?C(T(ze),e.ADD_URI_SAFE_ATTR,et):ze,qe=b(e,"ADD_DATA_URI_TAGS")?C(T(Be),e.ADD_DATA_URI_TAGS,et):Be,je=b(e,"FORBID_CONTENTS")?C({},e.FORBID_CONTENTS,et):Qe,we=b(e,"FORBID_TAGS")?C({},e.FORBID_TAGS,et):{},Oe=b(e,"FORBID_ATTR")?C({},e.FORBID_ATTR,et):{},Ue=!!b(e,"USE_PROFILES")&&e.USE_PROFILES,Se=!1!==e.ALLOW_ARIA_ATTR,Ce=!1!==e.ALLOW_DATA_ATTR,Ae=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Te=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Re=e.SAFE_FOR_TEMPLATES||!1,ke=e.WHOLE_DOCUMENT||!1,_e=e.RETURN_DOM||!1,Pe=e.RETURN_DOM_FRAGMENT||!1,De=e.RETURN_TRUSTED_TYPE||!1,xe=e.FORCE_BODY||!1,Fe=!1!==e.SANITIZE_DOM,Le=e.SANITIZE_NAMED_PROPS||!1,Me=!1!==e.KEEP_CONTENT,Ie=e.IN_PLACE||!1,me=e.ALLOWED_URI_REGEXP||z,Ve=e.NAMESPACE||We,Ee=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ee.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ee.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ee.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Re&&(Ce=!1),Pe&&(_e=!0),Ue&&(ve=C({},F),ge=[],!0===Ue.html&&(C(ve,k),C(ge,L)),!0===Ue.svg&&(C(ve,N),C(ge,M),C(ge,U)),!0===Ue.svgFilters&&(C(ve,x),C(ge,M),C(ge,U)),!0===Ue.mathMl&&(C(ve,P),C(ge,I),C(ge,U))),e.ADD_TAGS&&(ve===ye&&(ve=T(ve)),C(ve,e.ADD_TAGS,et)),e.ADD_ATTR&&(ge===be&&(ge=T(ge)),C(ge,e.ADD_ATTR,et)),e.ADD_URI_SAFE_ATTR&&C(He,e.ADD_URI_SAFE_ATTR,et),e.FORBID_CONTENTS&&(je===Qe&&(je=T(je)),C(je,e.FORBID_CONTENTS,et)),Me&&(ve["#text"]=!0),ke&&C(ve,["html","head","body"]),ve.table&&(C(ve,["tbody"]),delete we.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Z=e.TRUSTED_TYPES_POLICY,ee=Z.createHTML("")}else void 0===Z&&(Z=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(H,u)),null!==Z&&"string"==typeof ee&&(ee=Z.createHTML(""));i&&i(e),tt=e}},it=C({},["mi","mo","mn","ms","mtext"]),st=C({},["foreignobject","desc","title","annotation-xml"]),at=C({},["title","style","font","a","script"]),ut=C({},[...N,...x,..._]),ct=C({},[...P,...D]),lt=function(e){d(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ft=function(e,t){try{d(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){d(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ge[e])if(_e||Pe)try{lt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},dt=function(e){let t=null,n=null;if(xe)e="<remove></remove>"+e;else{const t=m(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Xe&&Ve===We&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=Z?Z.createHTML(e):e;if(Ve===We)try{t=(new B).parseFromString(r,Xe)}catch(e){}if(!t||!t.documentElement){t=te.createDocument(Ve,"template",null);try{t.documentElement.innerHTML=Je?ee:r}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(o.createTextNode(n),i.childNodes[0]||null),Ve===We?oe.call(t,ke?"html":"body")[0]:ke?t.documentElement:i},ht=function(e){return ne.call(e.ownerDocument||e,e,j.SHOW_ELEMENT|j.SHOW_COMMENT|j.SHOW_TEXT|j.SHOW_PROCESSING_INSTRUCTION|j.SHOW_CDATA_SECTION,null)},pt=function(e){return"function"==typeof S&&e instanceof S},mt=function(e,t,n){se[e]&&l(se[e],(e=>{e.call(r,t,n,tt)}))},vt=function(e){let t=null;if(mt("beforeSanitizeElements",e,null),(n=e)instanceof q&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof Q)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return lt(e),!0;var n;const o=et(e.nodeName);if(mt("uponSanitizeElement",e,{tagName:o,allowedTags:ve}),e.hasChildNodes()&&!pt(e.firstElementChild)&&E(/<[/\w]/g,e.innerHTML)&&E(/<[/\w]/g,e.textContent))return lt(e),!0;if(7===e.nodeType)return lt(e),!0;if(!ve[o]||we[o]){if(!we[o]&>(o)){if(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,o))return!1;if(Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(o))return!1}if(Me&&!je[o]){const t=X(e)||e.parentNode,n=$(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(G(n[r],!0),V(e))}return lt(e),!0}return e instanceof A&&!function(e){let t=X(e);t&&t.tagName||(t={namespaceURI:Ve,tagName:"template"});const n=h(e.tagName),r=h(t.tagName);return!!Ye[e.namespaceURI]&&(e.namespaceURI===Ge?t.namespaceURI===We?"svg"===n:t.namespaceURI===Ke?"svg"===n&&("annotation-xml"===r||it[r]):Boolean(ut[n]):e.namespaceURI===Ke?t.namespaceURI===We?"math"===n:t.namespaceURI===Ge?"math"===n&&st[r]:Boolean(ct[n]):e.namespaceURI===We?!(t.namespaceURI===Ge&&!st[r])&&!(t.namespaceURI===Ke&&!it[r])&&!ct[n]&&(at[n]||!ut[n]):!("application/xhtml+xml"!==Xe||!Ye[e.namespaceURI]))}(e)?(lt(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!E(/<\/no(script|embed|frames)/i,e.innerHTML)?(Re&&3===e.nodeType&&(t=e.textContent,l([ae,ue,ce],(e=>{t=v(t,e," ")})),e.textContent!==t&&(d(r.removed,{element:e.cloneNode()}),e.textContent=t)),mt("afterSanitizeElements",e,null),!1):(lt(e),!0)},yt=function(e,t,n){if(Fe&&("id"===t||"name"===t)&&(n in o||n in nt))return!1;if(Ce&&!Oe[t]&&E(le,t));else if(Se&&E(fe,t));else if(!ge[t]||Oe[t]){if(!(gt(e)&&(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,e)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(e))&&(Ee.attributeNameCheck instanceof RegExp&&E(Ee.attributeNameCheck,t)||Ee.attributeNameCheck instanceof Function&&Ee.attributeNameCheck(t))||"is"===t&&Ee.allowCustomizedBuiltInElements&&(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,n)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(n))))return!1}else if(He[t]);else if(E(me,v(n,he,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(n,"data:")||!qe[e])if(Ae&&!E(de,v(n,he,"")));else if(n)return!1;return!0},gt=function(e){return"annotation-xml"!==e&&m(e,pe)},bt=function(e){mt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};let o=t.length;for(;o--;){const i=t[o],{name:s,namespaceURI:a,value:u}=i,c=et(s);let d="value"===s?u:g(u);if(n.attrName=c,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,mt("uponSanitizeAttribute",e,n),d=n.attrValue,n.forceKeepAttr)continue;if(ft(s,e),!n.keepAttr)continue;if(!Te&&E(/\/>/i,d)){ft(s,e);continue}Re&&l([ae,ue,ce],(e=>{d=v(d,e," ")}));const h=et(e.nodeName);if(yt(h,c,d)){if(!Le||"id"!==c&&"name"!==c||(ft(s,e),d="user-content-"+d),Z&&"object"==typeof H&&"function"==typeof H.getAttributeType)if(a);else switch(H.getAttributeType(h,c)){case"TrustedHTML":d=Z.createHTML(d);break;case"TrustedScriptURL":d=Z.createScriptURL(d)}try{a?e.setAttributeNS(a,s,d):e.setAttribute(s,d),f(r.removed)}catch(e){}}}mt("afterSanitizeAttributes",e,null)},Et=function e(t){let n=null;const r=ht(t);for(mt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)mt("uponSanitizeShadowNode",n,null),vt(n)||(n.content instanceof c&&e(n.content),bt(n));mt("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,i=null,a=null;if(Je=!e,Je&&(e="\x3c!--\x3e"),"string"!=typeof e&&!pt(e)){if("function"!=typeof e.toString)throw w("toString is not a function");if("string"!=typeof(e=e.toString()))throw w("dirty is not a string, aborting")}if(!r.isSupported)return e;if(Ne||ot(t),r.removed=[],"string"==typeof e&&(Ie=!1),Ie){if(e.nodeName){const t=et(e.nodeName);if(!ve[t]||we[t])throw w("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof S)n=dt("\x3c!----\x3e"),o=n.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?n=o:n.appendChild(o);else{if(!_e&&!Re&&!ke&&-1===e.indexOf("<"))return Z&&De?Z.createHTML(e):e;if(n=dt(e),!n)return _e?null:De?ee:""}n&&xe&<(n.firstChild);const u=ht(Ie?e:n);for(;i=u.nextNode();)vt(i)||(i.content instanceof c&&Et(i.content),bt(i));if(Ie)return e;if(_e){if(Pe)for(a=re.call(n.ownerDocument);n.firstChild;)a.appendChild(n.firstChild);else a=n;return(ge.shadowroot||ge.shadowrootmode)&&(a=ie.call(s,a,!0)),a}let f=ke?n.outerHTML:n.innerHTML;return ke&&ve["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&E(W,n.ownerDocument.doctype.name)&&(f="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+f),Re&&l([ae,ue,ce],(e=>{f=v(f,e," ")})),Z&&De?Z.createHTML(f):f},r.setConfig=function(){ot(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ne=!0},r.clearConfig=function(){tt=null,Ne=!1},r.isValidAttribute=function(e,t,n){tt||ot({});const r=et(e),o=et(t);return yt(r,o,n)},r.addHook=function(e,t){"function"==typeof t&&(se[e]=se[e]||[],d(se[e],t))},r.removeHook=function(e){if(se[e])return f(se[e])},r.removeHooks=function(e){se[e]&&(se[e]=[])},r.removeAllHooks=function(){se={}},r}()}()},289:(e,t,n)=>{"use strict";n.d(t,{m:()=>s});var r=n(540),o=n(287),i=n(941),s=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!i.S$&&(null==(t=window)?void 0:t.addEventListener)){var n=function(){return e()};return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),function(){window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}},t}(0,r.A)(t,e);var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)},n.setEventListener=function(e){var t,n=this;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((function(e){"boolean"==typeof e?n.setFocused(e):n.onFocus()}))},n.setFocused=function(e){this.focused=e,e&&this.onFocus()},n.onFocus=function(){this.listeners.forEach((function(e){e()}))},n.isFocused=function(){return"boolean"==typeof this.focused?this.focused:"undefined"==typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)},t}(o.Q))},468:(e,t,n)=>{"use strict";n.d(t,{QueryClient:()=>r.E});var r=n(98),o=n(449);n.o(o,"QueryClientProvider")&&n.d(t,{QueryClientProvider:function(){return o.QueryClientProvider}}),n.o(o,"useMutation")&&n.d(t,{useMutation:function(){return o.useMutation}}),n.o(o,"useQuery")&&n.d(t,{useQuery:function(){return o.useQuery}}),n.o(o,"useQueryClient")&&n.d(t,{useQueryClient:function(){return o.useQueryClient}})},690:(e,t,n)=>{"use strict";n.d(t,{B:()=>i,t:()=>o});var r=console;function o(){return r}function i(e){r=e}},465:(e,t,n)=>{"use strict";n.d(t,{$:()=>c,s:()=>u});var r=n(168),o=n(690),i=n(428),s=n(281),a=n(941),u=function(){function e(e){this.options=(0,r.A)({},e.defaultOptions,e.options),this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.observers=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0},this.meta=e.meta}var t=e.prototype;return t.setState=function(e){this.dispatch({type:"setState",state:e})},t.addObserver=function(e){-1===this.observers.indexOf(e)&&this.observers.push(e)},t.removeObserver=function(e){this.observers=this.observers.filter((function(t){return t!==e}))},t.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(a.lQ).catch(a.lQ)):Promise.resolve()},t.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},t.execute=function(){var e,t=this,n="loading"===this.state.status,r=Promise.resolve();return n||(this.dispatch({type:"loading",variables:this.options.variables}),r=r.then((function(){null==t.mutationCache.config.onMutate||t.mutationCache.config.onMutate(t.state.variables,t)})).then((function(){return null==t.options.onMutate?void 0:t.options.onMutate(t.state.variables)})).then((function(e){e!==t.state.context&&t.dispatch({type:"loading",context:e,variables:t.state.variables})}))),r.then((function(){return t.executeMutation()})).then((function(n){e=n,null==t.mutationCache.config.onSuccess||t.mutationCache.config.onSuccess(e,t.state.variables,t.state.context,t)})).then((function(){return null==t.options.onSuccess?void 0:t.options.onSuccess(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(e,null,t.state.variables,t.state.context)})).then((function(){return t.dispatch({type:"success",data:e}),e})).catch((function(e){return null==t.mutationCache.config.onError||t.mutationCache.config.onError(e,t.state.variables,t.state.context,t),(0,o.t)().error(e),Promise.resolve().then((function(){return null==t.options.onError?void 0:t.options.onError(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(void 0,e,t.state.variables,t.state.context)})).then((function(){throw t.dispatch({type:"error",error:e}),e}))}))},t.executeMutation=function(){var e,t=this;return this.retryer=new s.eJ({fn:function(){return t.options.mutationFn?t.options.mutationFn(t.state.variables):Promise.reject("No mutationFn found")},onFail:function(){t.dispatch({type:"failed"})},onPause:function(){t.dispatch({type:"pause"})},onContinue:function(){t.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay}),this.retryer.promise},t.dispatch=function(e){var t=this;this.state=function(e,t){switch(t.type){case"failed":return(0,r.A)({},e,{failureCount:e.failureCount+1});case"pause":return(0,r.A)({},e,{isPaused:!0});case"continue":return(0,r.A)({},e,{isPaused:!1});case"loading":return(0,r.A)({},e,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return(0,r.A)({},e,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return(0,r.A)({},e,{data:void 0,error:t.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return(0,r.A)({},e,t.state);default:return e}}(this.state,e),i.j.batch((function(){t.observers.forEach((function(t){t.onMutationUpdate(e)})),t.mutationCache.notify(t)}))},e}();function c(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}},428:(e,t,n)=>{"use strict";n.d(t,{j:()=>o});var r=n(941),o=new(function(){function e(){this.queue=[],this.transactions=0,this.notifyFn=function(e){e()},this.batchNotifyFn=function(e){e()}}var t=e.prototype;return t.batch=function(e){var t;this.transactions++;try{t=e()}finally{this.transactions--,this.transactions||this.flush()}return t},t.schedule=function(e){var t=this;this.transactions?this.queue.push(e):(0,r.G6)((function(){t.notifyFn(e)}))},t.batchCalls=function(e){var t=this;return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];t.schedule((function(){e.apply(void 0,r)}))}},t.flush=function(){var e=this,t=this.queue;this.queue=[],t.length&&(0,r.G6)((function(){e.batchNotifyFn((function(){t.forEach((function(t){e.notifyFn(t)}))}))}))},t.setNotifyFunction=function(e){this.notifyFn=e},t.setBatchNotifyFunction=function(e){this.batchNotifyFn=e},e}())},622:(e,t,n)=>{"use strict";n.d(t,{t:()=>s});var r=n(540),o=n(287),i=n(941),s=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!i.S$&&(null==(t=window)?void 0:t.addEventListener)){var n=function(){return e()};return window.addEventListener("online",n,!1),window.addEventListener("offline",n,!1),function(){window.removeEventListener("online",n),window.removeEventListener("offline",n)}}},t}(0,r.A)(t,e);var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)},n.setEventListener=function(e){var t,n=this;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((function(e){"boolean"==typeof e?n.setOnline(e):n.onOnline()}))},n.setOnline=function(e){this.online=e,e&&this.onOnline()},n.onOnline=function(){this.listeners.forEach((function(e){e()}))},n.isOnline=function(){return"boolean"==typeof this.online?this.online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine},t}(o.Q))},98:(e,t,n)=>{"use strict";n.d(t,{E:()=>y});var r=n(168),o=n(941),i=n(540),s=n(428),a=n(690),u=n(281),c=function(){function e(e){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=e.meta,this.scheduleGc()}var t=e.prototype;return t.setOptions=function(e){var t;this.options=(0,r.A)({},this.defaultOptions,e),this.meta=null==e?void 0:e.meta,this.cacheTime=Math.max(this.cacheTime||0,null!=(t=this.options.cacheTime)?t:3e5)},t.setDefaultOptions=function(e){this.defaultOptions=e},t.scheduleGc=function(){var e=this;this.clearGcTimeout(),(0,o.gn)(this.cacheTime)&&(this.gcTimeout=setTimeout((function(){e.optionalRemove()}),this.cacheTime))},t.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},t.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},t.setData=function(e,t){var n,r,i=this.state.data,s=(0,o.Zw)(e,i);return(null==(n=(r=this.options).isDataEqual)?void 0:n.call(r,i,s))?s=i:!1!==this.options.structuralSharing&&(s=(0,o.BH)(i,s)),this.dispatch({data:s,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt}),s},t.setState=function(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})},t.cancel=function(e){var t,n=this.promise;return null==(t=this.retryer)||t.cancel(e),n?n.then(o.lQ).catch(o.lQ):Promise.resolve()},t.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},t.reset=function(){this.destroy(),this.setState(this.initialState)},t.isActive=function(){return this.observers.some((function(e){return!1!==e.options.enabled}))},t.isFetching=function(){return this.state.isFetching},t.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some((function(e){return e.getCurrentResult().isStale}))},t.isStaleByTime=function(e){return void 0===e&&(e=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!(0,o.j3)(this.state.dataUpdatedAt,e)},t.onFocus=function(){var e,t=this.observers.find((function(e){return e.shouldFetchOnWindowFocus()}));t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.onOnline=function(){var e,t=this.observers.find((function(e){return e.shouldFetchOnReconnect()}));t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.addObserver=function(e){-1===this.observers.indexOf(e)&&(this.observers.push(e),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))},t.removeObserver=function(e){-1!==this.observers.indexOf(e)&&(this.observers=this.observers.filter((function(t){return t!==e})),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:e}))},t.getObserversCount=function(){return this.observers.length},t.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},t.fetch=function(e,t){var n,r,i,s=this;if(this.state.isFetching)if(this.state.dataUpdatedAt&&(null==t?void 0:t.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var c;return null==(c=this.retryer)||c.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){var l=this.observers.find((function(e){return e.options.queryFn}));l&&this.setOptions(l.options)}var f=(0,o.HN)(this.queryKey),d=(0,o.jY)(),h={queryKey:f,pageParam:void 0,meta:this.meta};Object.defineProperty(h,"signal",{enumerable:!0,get:function(){if(d)return s.abortSignalConsumed=!0,d.signal}});var p,m,v={fetchOptions:t,options:this.options,queryKey:f,state:this.state,fetchFn:function(){return s.options.queryFn?(s.abortSignalConsumed=!1,s.options.queryFn(h)):Promise.reject("Missing queryFn")},meta:this.meta};return(null==(n=this.options.behavior)?void 0:n.onFetch)&&(null==(p=this.options.behavior)||p.onFetch(v)),this.revertState=this.state,this.state.isFetching&&this.state.fetchMeta===(null==(r=v.fetchOptions)?void 0:r.meta)||this.dispatch({type:"fetch",meta:null==(m=v.fetchOptions)?void 0:m.meta}),this.retryer=new u.eJ({fn:v.fetchFn,abort:null==d||null==(i=d.abort)?void 0:i.bind(d),onSuccess:function(e){s.setData(e),null==s.cache.config.onSuccess||s.cache.config.onSuccess(e,s),0===s.cacheTime&&s.optionalRemove()},onError:function(e){(0,u.wm)(e)&&e.silent||s.dispatch({type:"error",error:e}),(0,u.wm)(e)||(null==s.cache.config.onError||s.cache.config.onError(e,s),(0,a.t)().error(e)),0===s.cacheTime&&s.optionalRemove()},onFail:function(){s.dispatch({type:"failed"})},onPause:function(){s.dispatch({type:"pause"})},onContinue:function(){s.dispatch({type:"continue"})},retry:v.options.retry,retryDelay:v.options.retryDelay}),this.promise=this.retryer.promise,this.promise},t.dispatch=function(e){var t=this;this.state=this.reducer(this.state,e),s.j.batch((function(){t.observers.forEach((function(t){t.onQueryUpdate(e)})),t.cache.notify({query:t,type:"queryUpdated",action:e})}))},t.getDefaultState=function(e){var t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==e.initialData?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0,r=void 0!==t;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?null!=n?n:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:r?"success":"idle"}},t.reducer=function(e,t){var n,o;switch(t.type){case"failed":return(0,r.A)({},e,{fetchFailureCount:e.fetchFailureCount+1});case"pause":return(0,r.A)({},e,{isPaused:!0});case"continue":return(0,r.A)({},e,{isPaused:!1});case"fetch":return(0,r.A)({},e,{fetchFailureCount:0,fetchMeta:null!=(n=t.meta)?n:null,isFetching:!0,isPaused:!1},!e.dataUpdatedAt&&{error:null,status:"loading"});case"success":return(0,r.A)({},e,{data:t.data,dataUpdateCount:e.dataUpdateCount+1,dataUpdatedAt:null!=(o=t.dataUpdatedAt)?o:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var i=t.error;return(0,u.wm)(i)&&i.revert&&this.revertState?(0,r.A)({},this.revertState):(0,r.A)({},e,{error:i,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return(0,r.A)({},e,{isInvalidated:!0});case"setState":return(0,r.A)({},e,t.state);default:return e}},e}(),l=n(287),f=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.queries=[],n.queriesMap={},n}(0,i.A)(t,e);var n=t.prototype;return n.build=function(e,t,n){var r,i=t.queryKey,s=null!=(r=t.queryHash)?r:(0,o.F$)(i,t),a=this.get(s);return a||(a=new c({cache:this,queryKey:i,queryHash:s,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i),meta:t.meta}),this.add(a)),a},n.add=function(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"queryAdded",query:e}))},n.remove=function(e){var t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter((function(t){return t!==e})),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"queryRemoved",query:e}))},n.clear=function(){var e=this;s.j.batch((function(){e.queries.forEach((function(t){e.remove(t)}))}))},n.get=function(e){return this.queriesMap[e]},n.getAll=function(){return this.queries},n.find=function(e,t){var n=(0,o.b_)(e,t)[0];return void 0===n.exact&&(n.exact=!0),this.queries.find((function(e){return(0,o.MK)(n,e)}))},n.findAll=function(e,t){var n=(0,o.b_)(e,t)[0];return Object.keys(n).length>0?this.queries.filter((function(e){return(0,o.MK)(n,e)})):this.queries},n.notify=function(e){var t=this;s.j.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},n.onFocus=function(){var e=this;s.j.batch((function(){e.queries.forEach((function(e){e.onFocus()}))}))},n.onOnline=function(){var e=this;s.j.batch((function(){e.queries.forEach((function(e){e.onOnline()}))}))},t}(l.Q),d=n(465),h=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.mutations=[],n.mutationId=0,n}(0,i.A)(t,e);var n=t.prototype;return n.build=function(e,t,n){var r=new d.s({mutationCache:this,mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:n,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0,meta:t.meta});return this.add(r),r},n.add=function(e){this.mutations.push(e),this.notify(e)},n.remove=function(e){this.mutations=this.mutations.filter((function(t){return t!==e})),e.cancel(),this.notify(e)},n.clear=function(){var e=this;s.j.batch((function(){e.mutations.forEach((function(t){e.remove(t)}))}))},n.getAll=function(){return this.mutations},n.find=function(e){return void 0===e.exact&&(e.exact=!0),this.mutations.find((function(t){return(0,o.nJ)(e,t)}))},n.findAll=function(e){return this.mutations.filter((function(t){return(0,o.nJ)(e,t)}))},n.notify=function(e){var t=this;s.j.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},n.onFocus=function(){this.resumePausedMutations()},n.onOnline=function(){this.resumePausedMutations()},n.resumePausedMutations=function(){var e=this.mutations.filter((function(e){return e.state.isPaused}));return s.j.batch((function(){return e.reduce((function(e,t){return e.then((function(){return t.continue().catch(o.lQ)}))}),Promise.resolve())}))},t}(l.Q),p=n(289),m=n(622);function v(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}var y=function(){function e(e){void 0===e&&(e={}),this.queryCache=e.queryCache||new f,this.mutationCache=e.mutationCache||new h,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var t=e.prototype;return t.mount=function(){var e=this;this.unsubscribeFocus=p.m.subscribe((function(){p.m.isFocused()&&m.t.isOnline()&&(e.mutationCache.onFocus(),e.queryCache.onFocus())})),this.unsubscribeOnline=m.t.subscribe((function(){p.m.isFocused()&&m.t.isOnline()&&(e.mutationCache.onOnline(),e.queryCache.onOnline())}))},t.unmount=function(){var e,t;null==(e=this.unsubscribeFocus)||e.call(this),null==(t=this.unsubscribeOnline)||t.call(this)},t.isFetching=function(e,t){var n=(0,o.b_)(e,t)[0];return n.fetching=!0,this.queryCache.findAll(n).length},t.isMutating=function(e){return this.mutationCache.findAll((0,r.A)({},e,{fetching:!0})).length},t.getQueryData=function(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state.data},t.getQueriesData=function(e){return this.getQueryCache().findAll(e).map((function(e){return[e.queryKey,e.state.data]}))},t.setQueryData=function(e,t,n){var r=(0,o.vh)(e),i=this.defaultQueryOptions(r);return this.queryCache.build(this,i).setData(t,n)},t.setQueriesData=function(e,t,n){var r=this;return s.j.batch((function(){return r.getQueryCache().findAll(e).map((function(e){var o=e.queryKey;return[o,r.setQueryData(o,t,n)]}))}))},t.getQueryState=function(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state},t.removeQueries=function(e,t){var n=(0,o.b_)(e,t)[0],r=this.queryCache;s.j.batch((function(){r.findAll(n).forEach((function(e){r.remove(e)}))}))},t.resetQueries=function(e,t,n){var i=this,a=(0,o.b_)(e,t,n),u=a[0],c=a[1],l=this.queryCache,f=(0,r.A)({},u,{active:!0});return s.j.batch((function(){return l.findAll(u).forEach((function(e){e.reset()})),i.refetchQueries(f,c)}))},t.cancelQueries=function(e,t,n){var r=this,i=(0,o.b_)(e,t,n),a=i[0],u=i[1],c=void 0===u?{}:u;void 0===c.revert&&(c.revert=!0);var l=s.j.batch((function(){return r.queryCache.findAll(a).map((function(e){return e.cancel(c)}))}));return Promise.all(l).then(o.lQ).catch(o.lQ)},t.invalidateQueries=function(e,t,n){var i,a,u,c=this,l=(0,o.b_)(e,t,n),f=l[0],d=l[1],h=(0,r.A)({},f,{active:null==(i=null!=(a=f.refetchActive)?a:f.active)||i,inactive:null!=(u=f.refetchInactive)&&u});return s.j.batch((function(){return c.queryCache.findAll(f).forEach((function(e){e.invalidate()})),c.refetchQueries(h,d)}))},t.refetchQueries=function(e,t,n){var i=this,a=(0,o.b_)(e,t,n),u=a[0],c=a[1],l=s.j.batch((function(){return i.queryCache.findAll(u).map((function(e){return e.fetch(void 0,(0,r.A)({},c,{meta:{refetchPage:null==u?void 0:u.refetchPage}}))}))})),f=Promise.all(l).then(o.lQ);return(null==c?void 0:c.throwOnError)||(f=f.catch(o.lQ)),f},t.fetchQuery=function(e,t,n){var r=(0,o.vh)(e,t,n),i=this.defaultQueryOptions(r);void 0===i.retry&&(i.retry=!1);var s=this.queryCache.build(this,i);return s.isStaleByTime(i.staleTime)?s.fetch(i):Promise.resolve(s.state.data)},t.prefetchQuery=function(e,t,n){return this.fetchQuery(e,t,n).then(o.lQ).catch(o.lQ)},t.fetchInfiniteQuery=function(e,t,n){var r=(0,o.vh)(e,t,n);return r.behavior={onFetch:function(e){e.fetchFn=function(){var t,n,r,i,s,a,c,l,f,d=null==(t=e.fetchOptions)||null==(n=t.meta)?void 0:n.refetchPage,h=null==(r=e.fetchOptions)||null==(i=r.meta)?void 0:i.fetchMore,p=null==h?void 0:h.pageParam,m="forward"===(null==h?void 0:h.direction),y="backward"===(null==h?void 0:h.direction),g=(null==(s=e.state.data)?void 0:s.pages)||[],b=(null==(a=e.state.data)?void 0:a.pageParams)||[],E=(0,o.jY)(),w=null==E?void 0:E.signal,O=b,S=!1,C=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},A=function(e,t,n,r){return O=r?[t].concat(O):[].concat(O,[t]),r?[n].concat(e):[].concat(e,[n])},T=function(t,n,r,o){if(S)return Promise.reject("Cancelled");if(void 0===r&&!n&&t.length)return Promise.resolve(t);var i={queryKey:e.queryKey,signal:w,pageParam:r,meta:e.meta},s=C(i),a=Promise.resolve(s).then((function(e){return A(t,r,e,o)}));return(0,u.dd)(s)&&(a.cancel=s.cancel),a};if(g.length)if(m){var R=void 0!==p,k=R?p:v(e.options,g);c=T(g,R,k)}else if(y){var N=void 0!==p,x=N?p:(l=e.options,f=g,null==l.getPreviousPageParam?void 0:l.getPreviousPageParam(f[0],f));c=T(g,N,x,!0)}else!function(){O=[];var t=void 0===e.options.getNextPageParam,n=!d||!g[0]||d(g[0],0,g);c=n?T([],t,b[0]):Promise.resolve(A([],b[0],g[0]));for(var r=function(n){c=c.then((function(r){if(!d||!g[n]||d(g[n],n,g)){var o=t?b[n]:v(e.options,r);return T(r,t,o)}return Promise.resolve(A(r,b[n],g[n]))}))},o=1;o<g.length;o++)r(o)}();else c=T([]);var _=c.then((function(e){return{pages:e,pageParams:O}}));return _.cancel=function(){S=!0,null==E||E.abort(),(0,u.dd)(c)&&c.cancel()},_}}},this.fetchQuery(r)},t.prefetchInfiniteQuery=function(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(o.lQ).catch(o.lQ)},t.cancelMutations=function(){var e=this,t=s.j.batch((function(){return e.mutationCache.getAll().map((function(e){return e.cancel()}))}));return Promise.all(t).then(o.lQ).catch(o.lQ)},t.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},t.executeMutation=function(e){return this.mutationCache.build(this,e).execute()},t.getQueryCache=function(){return this.queryCache},t.getMutationCache=function(){return this.mutationCache},t.getDefaultOptions=function(){return this.defaultOptions},t.setDefaultOptions=function(e){this.defaultOptions=e},t.setQueryDefaults=function(e,t){var n=this.queryDefaults.find((function(t){return(0,o.Od)(e)===(0,o.Od)(t.queryKey)}));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})},t.getQueryDefaults=function(e){var t;return e?null==(t=this.queryDefaults.find((function(t){return(0,o.Cp)(e,t.queryKey)})))?void 0:t.defaultOptions:void 0},t.setMutationDefaults=function(e,t){var n=this.mutationDefaults.find((function(t){return(0,o.Od)(e)===(0,o.Od)(t.mutationKey)}));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})},t.getMutationDefaults=function(e){var t;return e?null==(t=this.mutationDefaults.find((function(t){return(0,o.Cp)(e,t.mutationKey)})))?void 0:t.defaultOptions:void 0},t.defaultQueryOptions=function(e){if(null==e?void 0:e._defaulted)return e;var t=(0,r.A)({},this.defaultOptions.queries,this.getQueryDefaults(null==e?void 0:e.queryKey),e,{_defaulted:!0});return!t.queryHash&&t.queryKey&&(t.queryHash=(0,o.F$)(t.queryKey,t)),t},t.defaultQueryObserverOptions=function(e){return this.defaultQueryOptions(e)},t.defaultMutationOptions=function(e){return(null==e?void 0:e._defaulted)?e:(0,r.A)({},this.defaultOptions.mutations,this.getMutationDefaults(null==e?void 0:e.mutationKey),e,{_defaulted:!0})},t.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},e}()},281:(e,t,n)=>{"use strict";n.d(t,{dd:()=>a,eJ:()=>l,wm:()=>c});var r=n(289),o=n(622),i=n(941);function s(e){return Math.min(1e3*Math.pow(2,e),3e4)}function a(e){return"function"==typeof(null==e?void 0:e.cancel)}var u=function(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent};function c(e){return e instanceof u}var l=function(e){var t,n,c,l,f=this,d=!1;this.abort=e.abort,this.cancel=function(e){return null==t?void 0:t(e)},this.cancelRetry=function(){d=!0},this.continueRetry=function(){d=!1},this.continue=function(){return null==n?void 0:n()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise((function(e,t){c=e,l=t}));var h=function(t){f.isResolved||(f.isResolved=!0,null==e.onSuccess||e.onSuccess(t),null==n||n(),c(t))},p=function(t){f.isResolved||(f.isResolved=!0,null==e.onError||e.onError(t),null==n||n(),l(t))};!function c(){if(!f.isResolved){var l;try{l=e.fn()}catch(e){l=Promise.reject(e)}t=function(e){if(!f.isResolved&&(p(new u(e)),null==f.abort||f.abort(),a(l)))try{l.cancel()}catch(e){}},f.isTransportCancelable=a(l),Promise.resolve(l).then(h).catch((function(t){var a,u;if(!f.isResolved){var l=null!=(a=e.retry)?a:3,h=null!=(u=e.retryDelay)?u:s,m="function"==typeof h?h(f.failureCount,t):h,v=!0===l||"number"==typeof l&&f.failureCount<l||"function"==typeof l&&l(f.failureCount,t);!d&&v?(f.failureCount++,null==e.onFail||e.onFail(f.failureCount,t),(0,i.yy)(m).then((function(){if(!r.m.isFocused()||!o.t.isOnline())return new Promise((function(t){n=t,f.isPaused=!0,null==e.onPause||e.onPause()})).then((function(){n=void 0,f.isPaused=!1,null==e.onContinue||e.onContinue()}))})).then((function(){d?p(t):c()}))):p(t)}}))}}()}},287:(e,t,n)=>{"use strict";n.d(t,{Q:()=>r});var r=function(){function e(){this.listeners=[]}var t=e.prototype;return t.subscribe=function(e){var t=this,n=e||function(){};return this.listeners.push(n),this.onSubscribe(),function(){t.listeners=t.listeners.filter((function(e){return e!==n})),t.onUnsubscribe()}},t.hasListeners=function(){return this.listeners.length>0},t.onSubscribe=function(){},t.onUnsubscribe=function(){},e}()},449:()=>{},941:(e,t,n)=>{"use strict";n.d(t,{BH:()=>b,Cp:()=>y,F$:()=>m,G6:()=>A,GR:()=>f,HN:()=>u,MK:()=>h,Od:()=>v,S$:()=>o,Zw:()=>s,b_:()=>d,f8:()=>E,gn:()=>a,j3:()=>c,jY:()=>T,lQ:()=>i,nJ:()=>p,vh:()=>l,yy:()=>C});var r=n(168),o="undefined"==typeof window;function i(){}function s(e,t){return"function"==typeof e?e(t):e}function a(e){return"number"==typeof e&&e>=0&&e!==1/0}function u(e){return Array.isArray(e)?e:[e]}function c(e,t){return Math.max(e+(t||0)-Date.now(),0)}function l(e,t,n){return S(e)?"function"==typeof t?(0,r.A)({},n,{queryKey:e,queryFn:t}):(0,r.A)({},t,{queryKey:e}):e}function f(e,t,n){return S(e)?"function"==typeof t?(0,r.A)({},n,{mutationKey:e,mutationFn:t}):(0,r.A)({},t,{mutationKey:e}):"function"==typeof e?(0,r.A)({},t,{mutationFn:e}):(0,r.A)({},e)}function d(e,t,n){return S(e)?[(0,r.A)({},t,{queryKey:e}),n]:[e||{},t]}function h(e,t){var n=e.active,r=e.exact,o=e.fetching,i=e.inactive,s=e.predicate,a=e.queryKey,u=e.stale;if(S(a))if(r){if(t.queryHash!==m(a,t.options))return!1}else if(!y(t.queryKey,a))return!1;var c=function(e,t){return!0===e&&!0===t||null==e&&null==t?"all":!1===e&&!1===t?"none":(null!=e?e:!t)?"active":"inactive"}(n,i);if("none"===c)return!1;if("all"!==c){var l=t.isActive();if("active"===c&&!l)return!1;if("inactive"===c&&l)return!1}return!("boolean"==typeof u&&t.isStale()!==u||"boolean"==typeof o&&t.isFetching()!==o||s&&!s(t))}function p(e,t){var n=e.exact,r=e.fetching,o=e.predicate,i=e.mutationKey;if(S(i)){if(!t.options.mutationKey)return!1;if(n){if(v(t.options.mutationKey)!==v(i))return!1}else if(!y(t.options.mutationKey,i))return!1}return!("boolean"==typeof r&&"loading"===t.state.status!==r||o&&!o(t))}function m(e,t){return((null==t?void 0:t.queryKeyHashFn)||v)(e)}function v(e){var t;return t=u(e),JSON.stringify(t,(function(e,t){return w(t)?Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{}):t}))}function y(e,t){return g(u(e),u(t))}function g(e,t){return e===t||typeof e==typeof t&&!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((function(n){return!g(e[n],t[n])}))}function b(e,t){if(e===t)return e;var n=Array.isArray(e)&&Array.isArray(t);if(n||w(e)&&w(t)){for(var r=n?e.length:Object.keys(e).length,o=n?t:Object.keys(t),i=o.length,s=n?[]:{},a=0,u=0;u<i;u++){var c=n?u:o[u];s[c]=b(e[c],t[c]),s[c]===e[c]&&a++}return r===i&&a===r?e:s}return t}function E(e,t){if(e&&!t||t&&!e)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}function w(e){if(!O(e))return!1;var t=e.constructor;if(void 0===t)return!0;var n=t.prototype;return!!O(n)&&!!n.hasOwnProperty("isPrototypeOf")}function O(e){return"[object Object]"===Object.prototype.toString.call(e)}function S(e){return"string"==typeof e||Array.isArray(e)}function C(e){return new Promise((function(t){setTimeout(t,e)}))}function A(e){Promise.resolve().then(e).catch((function(e){return setTimeout((function(){throw e}))}))}function T(){if("function"==typeof AbortController)return new AbortController}},942:(e,t,n)=>{"use strict";n.d(t,{QueryClient:()=>r.QueryClient,QueryClientProvider:()=>o.QueryClientProvider,useMutation:()=>o.useMutation,useQuery:()=>o.useQuery,useQueryClient:()=>o.useQueryClient});var r=n(468);n.o(r,"QueryClientProvider")&&n.d(t,{QueryClientProvider:function(){return r.QueryClientProvider}}),n.o(r,"useMutation")&&n.d(t,{useMutation:function(){return r.useMutation}}),n.o(r,"useQuery")&&n.d(t,{useQuery:function(){return r.useQuery}}),n.o(r,"useQueryClient")&&n.d(t,{useQueryClient:function(){return r.useQueryClient}});var o=n(960)},360:(e,t,n)=>{"use strict";n.d(t,{H:()=>c,j:()=>u});var r=n(609),o=n.n(r),i=o().createContext(void 0),s=o().createContext(!1);function a(e){return e&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=i),window.ReactQueryClientContext):i}var u=function(){var e=o().useContext(a(o().useContext(s)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},c=function(e){var t=e.client,n=e.contextSharing,r=void 0!==n&&n,i=e.children;o().useEffect((function(){return t.mount(),function(){t.unmount()}}),[t]);var u=a(r);return o().createElement(s.Provider,{value:r},o().createElement(u.Provider,{value:t},i))}},960:(e,t,n)=>{"use strict";n.d(t,{QueryClientProvider:()=>u.H,useMutation:()=>c.n,useQuery:()=>l.I,useQueryClient:()=>u.j});var r=n(428),o=n(795),i=n.n(o)().unstable_batchedUpdates;r.j.setBatchNotifyFunction(i);var s=n(690),a=console;(0,s.B)(a);var u=n(360),c=n(990),l=n(584)},990:(e,t,n)=>{"use strict";n.d(t,{n:()=>h});var r=n(168),o=n(609),i=n.n(o),s=n(428),a=n(941),u=n(540),c=n(465),l=function(e){function t(t,n){var r;return(r=e.call(this)||this).client=t,r.setOptions(n),r.bindMethods(),r.updateResult(),r}(0,u.A)(t,e);var n=t.prototype;return n.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},n.setOptions=function(e){this.options=this.client.defaultMutationOptions(e)},n.onUnsubscribe=function(){var e;this.listeners.length||null==(e=this.currentMutation)||e.removeObserver(this)},n.onMutationUpdate=function(e){this.updateResult();var t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)},n.getCurrentResult=function(){return this.currentResult},n.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},n.mutate=function(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,(0,r.A)({},this.options,{variables:void 0!==e?e:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},n.updateResult=function(){var e=this.currentMutation?this.currentMutation.state:(0,c.$)(),t=(0,r.A)({},e,{isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset});this.currentResult=t},n.notify=function(e){var t=this;s.j.batch((function(){t.mutateOptions&&(e.onSuccess?(null==t.mutateOptions.onSuccess||t.mutateOptions.onSuccess(t.currentResult.data,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(t.currentResult.data,null,t.currentResult.variables,t.currentResult.context)):e.onError&&(null==t.mutateOptions.onError||t.mutateOptions.onError(t.currentResult.error,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(void 0,t.currentResult.error,t.currentResult.variables,t.currentResult.context))),e.listeners&&t.listeners.forEach((function(e){e(t.currentResult)}))}))},t}(n(287).Q),f=n(360),d=n(439);function h(e,t,n){var o=i().useRef(!1),u=i().useState(0)[1],c=(0,a.GR)(e,t,n),h=(0,f.j)(),p=i().useRef();p.current?p.current.setOptions(c):p.current=new l(h,c);var m=p.current.getCurrentResult();i().useEffect((function(){o.current=!0;var e=p.current.subscribe(s.j.batchCalls((function(){o.current&&u((function(e){return e+1}))})));return function(){o.current=!1,e()}}),[]);var v=i().useCallback((function(e,t){p.current.mutate(e,t).catch(a.lQ)}),[]);if(m.error&&(0,d.G)(void 0,p.current.options.useErrorBoundary,[m.error]))throw m.error;return(0,r.A)({},m,{mutate:v,mutateAsync:m.mutate})}},584:(e,t,n)=>{"use strict";n.d(t,{I:()=>S});var r=n(168),o=n(540),i=n(941),s=n(428),a=n(289),u=n(287),c=n(690),l=n(281),f=function(e){function t(t,n){var r;return(r=e.call(this)||this).client=t,r.options=n,r.trackedProps=[],r.selectError=null,r.bindMethods(),r.setOptions(n),r}(0,o.A)(t,e);var n=t.prototype;return n.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},n.onSubscribe=function(){1===this.listeners.length&&(this.currentQuery.addObserver(this),d(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},n.onUnsubscribe=function(){this.listeners.length||this.destroy()},n.shouldFetchOnReconnect=function(){return h(this.currentQuery,this.options,this.options.refetchOnReconnect)},n.shouldFetchOnWindowFocus=function(){return h(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},n.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},n.setOptions=function(e,t){var n=this.options,r=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled)throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();var o=this.hasListeners();o&&p(this.currentQuery,r,this.options,n)&&this.executeFetch(),this.updateResult(t),!o||this.currentQuery===r&&this.options.enabled===n.enabled&&this.options.staleTime===n.staleTime||this.updateStaleTimeout();var i=this.computeRefetchInterval();!o||this.currentQuery===r&&this.options.enabled===n.enabled&&i===this.currentRefetchInterval||this.updateRefetchInterval(i)},n.getOptimisticResult=function(e){var t=this.client.defaultQueryObserverOptions(e),n=this.client.getQueryCache().build(this.client,t);return this.createResult(n,t)},n.getCurrentResult=function(){return this.currentResult},n.trackResult=function(e,t){var n=this,r={},o=function(e){n.trackedProps.includes(e)||n.trackedProps.push(e)};return Object.keys(e).forEach((function(t){Object.defineProperty(r,t,{configurable:!1,enumerable:!0,get:function(){return o(t),e[t]}})})),(t.useErrorBoundary||t.suspense)&&o("error"),r},n.getNextResult=function(e){var t=this;return new Promise((function(n,r){var o=t.subscribe((function(t){t.isFetching||(o(),t.isError&&(null==e?void 0:e.throwOnError)?r(t.error):n(t))}))}))},n.getCurrentQuery=function(){return this.currentQuery},n.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},n.refetch=function(e){return this.fetch((0,r.A)({},e,{meta:{refetchPage:null==e?void 0:e.refetchPage}}))},n.fetchOptimistic=function(e){var t=this,n=this.client.defaultQueryObserverOptions(e),r=this.client.getQueryCache().build(this.client,n);return r.fetch().then((function(){return t.createResult(r,n)}))},n.fetch=function(e){var t=this;return this.executeFetch(e).then((function(){return t.updateResult(),t.currentResult}))},n.executeFetch=function(e){this.updateQuery();var t=this.currentQuery.fetch(this.options,e);return(null==e?void 0:e.throwOnError)||(t=t.catch(i.lQ)),t},n.updateStaleTimeout=function(){var e=this;if(this.clearStaleTimeout(),!i.S$&&!this.currentResult.isStale&&(0,i.gn)(this.options.staleTime)){var t=(0,i.j3)(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout((function(){e.currentResult.isStale||e.updateResult()}),t)}},n.computeRefetchInterval=function(){var e;return"function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(e=this.options.refetchInterval)&&e},n.updateRefetchInterval=function(e){var t=this;this.clearRefetchInterval(),this.currentRefetchInterval=e,!i.S$&&!1!==this.options.enabled&&(0,i.gn)(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval((function(){(t.options.refetchIntervalInBackground||a.m.isFocused())&&t.executeFetch()}),this.currentRefetchInterval))},n.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},n.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},n.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},n.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},n.createResult=function(e,t){var n,r=this.currentQuery,o=this.options,s=this.currentResult,a=this.currentResultState,u=this.currentResultOptions,l=e!==r,f=l?e.state:this.currentQueryInitialState,h=l?this.currentResult:this.previousQueryResult,v=e.state,y=v.dataUpdatedAt,g=v.error,b=v.errorUpdatedAt,E=v.isFetching,w=v.status,O=!1,S=!1;if(t.optimisticResults){var C=this.hasListeners(),A=!C&&d(e,t),T=C&&p(e,r,t,o);(A||T)&&(E=!0,y||(w="loading"))}if(t.keepPreviousData&&!v.dataUpdateCount&&(null==h?void 0:h.isSuccess)&&"error"!==w)n=h.data,y=h.dataUpdatedAt,w=h.status,O=!0;else if(t.select&&void 0!==v.data)if(s&&v.data===(null==a?void 0:a.data)&&t.select===this.selectFn)n=this.selectResult;else try{this.selectFn=t.select,n=t.select(v.data),!1!==t.structuralSharing&&(n=(0,i.BH)(null==s?void 0:s.data,n)),this.selectResult=n,this.selectError=null}catch(e){(0,c.t)().error(e),this.selectError=e}else n=v.data;if(void 0!==t.placeholderData&&void 0===n&&("loading"===w||"idle"===w)){var R;if((null==s?void 0:s.isPlaceholderData)&&t.placeholderData===(null==u?void 0:u.placeholderData))R=s.data;else if(R="function"==typeof t.placeholderData?t.placeholderData():t.placeholderData,t.select&&void 0!==R)try{R=t.select(R),!1!==t.structuralSharing&&(R=(0,i.BH)(null==s?void 0:s.data,R)),this.selectError=null}catch(e){(0,c.t)().error(e),this.selectError=e}void 0!==R&&(w="success",n=R,S=!0)}return this.selectError&&(g=this.selectError,n=this.selectResult,b=Date.now(),w="error"),{status:w,isLoading:"loading"===w,isSuccess:"success"===w,isError:"error"===w,isIdle:"idle"===w,data:n,dataUpdatedAt:y,error:g,errorUpdatedAt:b,failureCount:v.fetchFailureCount,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>f.dataUpdateCount||v.errorUpdateCount>f.errorUpdateCount,isFetching:E,isRefetching:E&&"loading"!==w,isLoadingError:"error"===w&&0===v.dataUpdatedAt,isPlaceholderData:S,isPreviousData:O,isRefetchError:"error"===w&&0!==v.dataUpdatedAt,isStale:m(e,t),refetch:this.refetch,remove:this.remove}},n.shouldNotifyListeners=function(e,t){if(!t)return!0;var n=this.options,r=n.notifyOnChangeProps,o=n.notifyOnChangePropsExclusions;if(!r&&!o)return!0;if("tracked"===r&&!this.trackedProps.length)return!0;var i="tracked"===r?this.trackedProps:r;return Object.keys(e).some((function(n){var r=n,s=e[r]!==t[r],a=null==i?void 0:i.some((function(e){return e===n})),u=null==o?void 0:o.some((function(e){return e===n}));return s&&!u&&(!i||a)}))},n.updateResult=function(e){var t=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!(0,i.f8)(this.currentResult,t)){var n={cache:!0};!1!==(null==e?void 0:e.listeners)&&this.shouldNotifyListeners(this.currentResult,t)&&(n.listeners=!0),this.notify((0,r.A)({},n,e))}},n.updateQuery=function(){var e=this.client.getQueryCache().build(this.client,this.options);if(e!==this.currentQuery){var t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}},n.onQueryUpdate=function(e){var t={};"success"===e.type?t.onSuccess=!0:"error"!==e.type||(0,l.wm)(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()},n.notify=function(e){var t=this;s.j.batch((function(){e.onSuccess?(null==t.options.onSuccess||t.options.onSuccess(t.currentResult.data),null==t.options.onSettled||t.options.onSettled(t.currentResult.data,null)):e.onError&&(null==t.options.onError||t.options.onError(t.currentResult.error),null==t.options.onSettled||t.options.onSettled(void 0,t.currentResult.error)),e.listeners&&t.listeners.forEach((function(e){e(t.currentResult)})),e.cache&&t.client.getQueryCache().notify({query:t.currentQuery,type:"observerResultsUpdated"})}))},t}(u.Q);function d(e,t){return function(e,t){return!(!1===t.enabled||e.state.dataUpdatedAt||"error"===e.state.status&&!1===t.retryOnMount)}(e,t)||e.state.dataUpdatedAt>0&&h(e,t,t.refetchOnMount)}function h(e,t,n){if(!1!==t.enabled){var r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&m(e,t)}return!1}function p(e,t,n,r){return!1!==n.enabled&&(e!==t||!1===r.enabled)&&(!n.suspense||"error"!==e.state.status)&&m(e,n)}function m(e,t){return e.isStaleByTime(t.staleTime)}var v=n(609),y=n.n(v);var g,b=y().createContext((g=!1,{clearReset:function(){g=!1},reset:function(){g=!0},isReset:function(){return g}})),E=function(){return y().useContext(b)},w=n(360),O=n(439);function S(e,t,n){return function(e,t){var n=y().useRef(!1),r=y().useState(0)[1],o=(0,w.j)(),i=E(),a=o.defaultQueryObserverOptions(e);a.optimisticResults=!0,a.onError&&(a.onError=s.j.batchCalls(a.onError)),a.onSuccess&&(a.onSuccess=s.j.batchCalls(a.onSuccess)),a.onSettled&&(a.onSettled=s.j.batchCalls(a.onSettled)),a.suspense&&("number"!=typeof a.staleTime&&(a.staleTime=1e3),0===a.cacheTime&&(a.cacheTime=1)),(a.suspense||a.useErrorBoundary)&&(i.isReset()||(a.retryOnMount=!1));var u=y().useState((function(){return new t(o,a)}))[0],c=u.getOptimisticResult(a);if(y().useEffect((function(){n.current=!0,i.clearReset();var e=u.subscribe(s.j.batchCalls((function(){n.current&&r((function(e){return e+1}))})));return u.updateResult(),function(){n.current=!1,e()}}),[i,u]),y().useEffect((function(){u.setOptions(a,{listeners:!1})}),[a,u]),a.suspense&&c.isLoading)throw u.fetchOptimistic(a).then((function(e){var t=e.data;null==a.onSuccess||a.onSuccess(t),null==a.onSettled||a.onSettled(t,null)})).catch((function(e){i.clearReset(),null==a.onError||a.onError(e),null==a.onSettled||a.onSettled(void 0,e)}));if(c.isError&&!i.isReset()&&!c.isFetching&&(0,O.G)(a.suspense,a.useErrorBoundary,[c.error,u.getCurrentQuery()]))throw c.error;return"tracked"===a.notifyOnChangeProps&&(c=u.trackResult(c,a)),c}((0,i.vh)(e,t,n),f)}},439:(e,t,n)=>{"use strict";function r(e,t,n){return"function"==typeof t?t.apply(void 0,n):"boolean"==typeof t?t:!!e}n.d(t,{G:()=>r})},609:e=>{"use strict";e.exports=window.React},795:e=>{"use strict";e.exports=window.ReactDOM},168:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{A:()=>r})},540:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,{A:()=>o})}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.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.r(e),n.d(e,{hasBrowserEnv:()=>fe,hasStandardBrowserEnv:()=>de,hasStandardBrowserWebWorkerEnv:()=>pe});var t=n(609),r=n.n(t),o=n(795),i=n.n(o),s=n(942);const a=window.wp.components;function u(e){const n={display:e.display?e.display:"block",maxWidth:e.width?e.width:"350px"};return(0,t.createElement)("div",{style:n},(0,t.createElement)("label",{style:{display:"block",fontSize:"11px",textTransform:"uppercase"}},e.label),(0,t.createElement)("select",{value:e.value,onChange:t=>e.onChange(t.target.value)},e.options.map((e=>(0,t.createElement)("option",{value:e.value},e.label)))))}var c=n(838),l=n.n(c);function f(e){const{innerHTML:n}=e,r=l().sanitize(n).replace("class=","className=");return(0,t.createElement)("div",{dangerouslySetInnerHTML:{__html:r}})}function d(e,t){return function(){return e.apply(t,arguments)}}const{toString:h}=Object.prototype,{getPrototypeOf:p}=Object,m=(v=Object.create(null),e=>{const t=h.call(e);return v[t]||(v[t]=t.slice(8,-1).toLowerCase())});var v;const y=e=>(e=e.toLowerCase(),t=>m(t)===e),g=e=>t=>typeof t===e,{isArray:b}=Array,E=g("undefined"),w=y("ArrayBuffer"),O=g("string"),S=g("function"),C=g("number"),A=e=>null!==e&&"object"==typeof e,T=e=>{if("object"!==m(e))return!1;const t=p(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},R=y("Date"),k=y("File"),N=y("Blob"),x=y("FileList"),_=y("URLSearchParams");function P(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),b(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(r=0;r<i;r++)s=o[r],t.call(null,e[s],s,e)}}function D(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const F="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,L=e=>!E(e)&&e!==F,M=(I="undefined"!=typeof Uint8Array&&p(Uint8Array),e=>I&&e instanceof I);var I;const U=y("HTMLFormElement"),j=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Q=y("RegExp"),q=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};P(n,((n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)})),Object.defineProperties(e,r)},B="abcdefghijklmnopqrstuvwxyz",H="0123456789",z={DIGIT:H,ALPHA:B,ALPHA_DIGIT:B+B.toUpperCase()+H},K=y("AsyncFunction"),G={isArray:b,isArrayBuffer:w,isBuffer:function(e){return null!==e&&!E(e)&&null!==e.constructor&&!E(e.constructor)&&S(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||S(e.append)&&("formdata"===(t=m(e))||"object"===t&&S(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&w(e.buffer),t},isString:O,isNumber:C,isBoolean:e=>!0===e||!1===e,isObject:A,isPlainObject:T,isUndefined:E,isDate:R,isFile:k,isBlob:N,isRegExp:Q,isFunction:S,isStream:e=>A(e)&&S(e.pipe),isURLSearchParams:_,isTypedArray:M,isFileList:x,forEach:P,merge:function e(){const{caseless:t}=L(this)&&this||{},n={},r=(r,o)=>{const i=t&&D(n,o)||o;T(n[i])&&T(r)?n[i]=e(n[i],r):T(r)?n[i]=e({},r):b(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&P(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(P(t,((t,r)=>{n&&S(t)?e[r]=d(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,s;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],r&&!r(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==n&&p(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:m,kindOfTest:y,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(b(e))return e;let t=e.length;if(!C(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:U,hasOwnProperty:j,hasOwnProp:j,reduceDescriptors:q,freezeMethods:e=>{q(e,((t,n)=>{if(S(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];S(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return b(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:D,global:F,isContextDefined:L,ALPHABET:z,generateString:(e=16,t=z.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&S(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(A(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=b(e)?[]:{};return P(e,((e,t)=>{const i=n(e,r+1);!E(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:K,isThenable:e=>e&&(A(e)||S(e))&&S(e.then)&&S(e.catch)};function W(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}G.inherits(W,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:G.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const V=W.prototype,J={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{J[e]={value:e}})),Object.defineProperties(W,J),Object.defineProperty(V,"isAxiosError",{value:!0}),W.from=(e,t,n,r,o,i)=>{const s=Object.create(V);return G.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),W.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const Y=W;function $(e){return G.isPlainObject(e)||G.isArray(e)}function X(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function Z(e,t,n){return e?e.concat(t).map((function(e,t){return e=X(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const ee=G.toFlatObject(G,{},null,(function(e){return/^is[A-Z]/.test(e)})),te=function(e,t,n){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=G.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!G.isUndefined(t[e])}))).metaTokens,o=n.visitor||c,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&G.isSpecCompliantForm(t);if(!G.isFunction(o))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(G.isDate(e))return e.toISOString();if(!a&&G.isBlob(e))throw new Y("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(e)||G.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(G.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(G.isArray(e)&&function(e){return G.isArray(e)&&!e.some($)}(e)||(G.isFileList(e)||G.endsWith(n,"[]"))&&(a=G.toArray(e)))return n=X(n),a.forEach((function(e,r){!G.isUndefined(e)&&null!==e&&t.append(!0===s?Z([n],r,i):null===s?n:n+"[]",u(e))})),!1;return!!$(e)||(t.append(Z(o,n,i),u(e)),!1)}const l=[],f=Object.assign(ee,{defaultVisitor:c,convertValue:u,isVisitable:$});if(!G.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!G.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),G.forEach(n,(function(n,i){!0===(!(G.isUndefined(n)||null===n)&&o.call(t,n,G.isString(i)?i.trim():i,r,f))&&e(n,r?r.concat(i):[i])})),l.pop()}}(e),t};function ne(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function re(e,t){this._pairs=[],e&&te(e,this,t)}const oe=re.prototype;oe.append=function(e,t){this._pairs.push([e,t])},oe.toString=function(e){const t=e?function(t){return e.call(this,t,ne)}:ne;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const ie=re;function se(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ae(e,t,n){if(!t)return e;const r=n&&n.encode||se,o=n&&n.serialize;let i;if(i=o?o(t,n):G.isURLSearchParams(t)?t.toString():new ie(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const ue=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){G.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ce={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},le={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ie,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},fe="undefined"!=typeof window&&"undefined"!=typeof document,de=(he="undefined"!=typeof navigator&&navigator.product,fe&&["ReactNative","NativeScript","NS"].indexOf(he)<0);var he;const pe="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,me={...e,...le},ve=function(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=e.length;return i=!i&&G.isArray(r)?r.length:i,a?(G.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s):(r[i]&&G.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&G.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!s)}if(G.isFormData(e)&&G.isFunction(e.entries)){const n={};return G.forEachEntry(e,((e,r)=>{t(function(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null},ye={transitional:ce,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=G.isObject(e);if(o&&G.isHTMLForm(e)&&(e=new FormData(e)),G.isFormData(e))return r?JSON.stringify(ve(e)):e;if(G.isArrayBuffer(e)||G.isBuffer(e)||G.isStream(e)||G.isFile(e)||G.isBlob(e))return e;if(G.isArrayBufferView(e))return e.buffer;if(G.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return te(e,new me.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return me.isNode&&G.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=G.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return te(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(G.isString(e))try{return(0,JSON.parse)(e),G.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ye.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&G.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw Y.from(e,Y.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:me.classes.FormData,Blob:me.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};G.forEach(["delete","get","head","post","put","patch"],(e=>{ye.headers[e]={}}));const ge=ye,be=G.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ee=Symbol("internals");function we(e){return e&&String(e).trim().toLowerCase()}function Oe(e){return!1===e||null==e?e:G.isArray(e)?e.map(Oe):String(e)}function Se(e,t,n,r,o){return G.isFunction(r)?r.call(this,t,n):(o&&(t=n),G.isString(t)?G.isString(r)?-1!==t.indexOf(r):G.isRegExp(r)?r.test(t):void 0:void 0)}class Ce{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=we(t);if(!o)throw new Error("header name must be a non-empty string");const i=G.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Oe(e))}const i=(e,t)=>G.forEach(e,((e,n)=>o(e,n,t)));return G.isPlainObject(e)||e instanceof this.constructor?i(e,t):G.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&be[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=we(e)){const n=G.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(G.isFunction(t))return t.call(this,e,n);if(G.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=we(e)){const n=G.findKey(this,e);return!(!n||void 0===this[n]||t&&!Se(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=we(e)){const o=G.findKey(n,e);!o||t&&!Se(0,n[o],o,t)||(delete n[o],r=!0)}}return G.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!Se(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return G.forEach(this,((r,o)=>{const i=G.findKey(n,o);if(i)return t[i]=Oe(r),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();s!==o&&delete t[o],t[s]=Oe(r),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return G.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&G.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Ee]=this[Ee]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=we(e);t[r]||(function(e,t){const n=G.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return G.isArray(e)?e.forEach(r):r(e),this}}Ce.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),G.reduceDescriptors(Ce.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),G.freezeMethods(Ce);const Ae=Ce;function Te(e,t){const n=this||ge,r=t||n,o=Ae.from(r.headers);let i=r.data;return G.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Re(e){return!(!e||!e.__CANCEL__)}function ke(e,t,n){Y.call(this,null==e?"canceled":e,Y.ERR_CANCELED,t,n),this.name="CanceledError"}G.inherits(ke,Y,{__CANCEL__:!0});const Ne=ke,xe=me.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const s=[e+"="+encodeURIComponent(t)];G.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),G.isString(r)&&s.push("path="+r),G.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function _e(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Pe=me.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=G.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function De(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const u=Date.now(),c=r[s];o||(o=u),n[i]=a,r[i]=u;let l=s,f=0;for(;l!==i;)f+=n[l++],l%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),u-o<t)return;const d=c&&u-c;return d?Math.round(1e3*f/d):void 0}}(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-n,u=r(a);n=i;const c={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:u||void 0,estimated:u&&s&&i<=s?(s-i)/u:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}const Fe={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=Ae.from(e.headers).normalize();let i,s,{responseType:a,withXSRFToken:u}=e;function c(){e.cancelToken&&e.cancelToken.unsubscribe(i),e.signal&&e.signal.removeEventListener("abort",i)}if(G.isFormData(r))if(me.hasStandardBrowserEnv||me.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(s=o.getContentType())){const[e,...t]=s?s.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const f=_e(e.baseURL,e.url);function d(){if(!l)return;const r=Ae.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Y("Request failed with status code "+n.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),c()}),(function(e){n(e),c()}),{data:a&&"text"!==a&&"json"!==a?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),ae(f,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(d)},l.onabort=function(){l&&(n(new Y("Request aborted",Y.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new Y("Network Error",Y.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||ce;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new Y(t,r.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,e,l)),l=null},me.hasStandardBrowserEnv&&(u&&G.isFunction(u)&&(u=u(e)),u||!1!==u&&Pe(f))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&xe.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),"setRequestHeader"in l&&G.forEach(o.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),G.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),a&&"json"!==a&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",De(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",De(e.onUploadProgress)),(e.cancelToken||e.signal)&&(i=t=>{l&&(n(!t||t.type?new Ne(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(i),e.signal&&(e.signal.aborted?i():e.signal.addEventListener("abort",i)));const h=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(f);h&&-1===me.protocols.indexOf(h)?n(new Y("Unsupported protocol "+h+":",Y.ERR_BAD_REQUEST,e)):l.send(r||null)}))}};G.forEach(Fe,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Le=e=>`- ${e}`,Me=e=>G.isFunction(e)||null===e||!1===e,Ie=e=>{e=G.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){let t;if(n=e[i],r=n,!Me(n)&&(r=Fe[(t=String(n)).toLowerCase()],void 0===r))throw new Y(`Unknown adapter '${t}'`);if(r)break;o[t||"#"+i]=r}if(!r){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(Le).join("\n"):" "+Le(e[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function Ue(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ne(null,e)}function je(e){return Ue(e),e.headers=Ae.from(e.headers),e.data=Te.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ie(e.adapter||ge.adapter)(e).then((function(t){return Ue(e),t.data=Te.call(e,e.transformResponse,t),t.headers=Ae.from(t.headers),t}),(function(t){return Re(t)||(Ue(e),t&&t.response&&(t.response.data=Te.call(e,e.transformResponse,t.response),t.response.headers=Ae.from(t.response.headers))),Promise.reject(t)}))}const Qe=e=>e instanceof Ae?{...e}:e;function qe(e,t){t=t||{};const n={};function r(e,t,n){return G.isPlainObject(e)&&G.isPlainObject(t)?G.merge.call({caseless:n},e,t):G.isPlainObject(t)?G.merge({},t):G.isArray(t)?t.slice():t}function o(e,t,n){return G.isUndefined(t)?G.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!G.isUndefined(t))return r(void 0,t)}function s(e,t){return G.isUndefined(t)?G.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const u={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>o(Qe(e),Qe(t),!0)};return G.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=u[r]||o,s=i(e[r],t[r],r);G.isUndefined(s)&&i!==a||(n[r]=s)})),n}const Be={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Be[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const He={};Be.transitional=function(e,t,n){function r(e,t){return"[Axios v1.6.8] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new Y(r(o," has been removed"+(t?" in "+t:"")),Y.ERR_DEPRECATED);return t&&!He[o]&&(He[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}};const ze={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new Y("option "+i+" must be "+n,Y.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Y("Unknown option "+i,Y.ERR_BAD_OPTION)}},validators:Be},Ke=ze.validators;class Ge{constructor(e){this.defaults=e,this.interceptors={request:new ue,response:new ue}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=qe(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&ze.assertOptions(n,{silentJSONParsing:Ke.transitional(Ke.boolean),forcedJSONParsing:Ke.transitional(Ke.boolean),clarifyTimeoutError:Ke.transitional(Ke.boolean)},!1),null!=r&&(G.isFunction(r)?t.paramsSerializer={serialize:r}:ze.assertOptions(r,{encode:Ke.function,serialize:Ke.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&G.merge(o.common,o[t.method]);o&&G.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Ae.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const u=[];let c;this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)}));let l,f=0;if(!a){const e=[je.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,u),l=e.length,c=Promise.resolve(t);f<l;)c=c.then(e[f++],e[f++]);return c}l=s.length;let d=t;for(f=0;f<l;){const e=s[f++],t=s[f++];try{d=e(d)}catch(e){t.call(this,e);break}}try{c=je.call(this,d)}catch(e){return Promise.reject(e)}for(f=0,l=u.length;f<l;)c=c.then(u[f++],u[f++]);return c}getUri(e){return ae(_e((e=qe(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}G.forEach(["delete","get","head","options"],(function(e){Ge.prototype[e]=function(t,n){return this.request(qe(n||{},{method:e,url:t,data:(n||{}).data}))}})),G.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(qe(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Ge.prototype[e]=t(),Ge.prototype[e+"Form"]=t(!0)}));const We=Ge;class Ve{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new Ne(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Ve((function(t){e=t})),cancel:e}}}const Je=Ve,Ye={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ye).forEach((([e,t])=>{Ye[t]=e}));const $e=Ye,Xe=function e(t){const n=new We(t),r=d(We.prototype.request,n);return G.extend(r,We.prototype,n,{allOwnKeys:!0}),G.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(qe(t,n))},r}(ge);Xe.Axios=We,Xe.CanceledError=Ne,Xe.CancelToken=Je,Xe.isCancel=Re,Xe.VERSION="1.6.8",Xe.toFormData=te,Xe.AxiosError=Y,Xe.Cancel=Xe.CanceledError,Xe.all=function(e){return Promise.all(e)},Xe.spread=function(e){return function(t){return e.apply(null,t)}},Xe.isAxiosError=function(e){return G.isObject(e)&&!0===e.isAxiosError},Xe.mergeConfig=qe,Xe.AxiosHeaders=Ae,Xe.formToJSON=e=>ve(G.isHTMLForm(e)?new FormData(e):e),Xe.getAdapter=Ie,Xe.HttpStatusCode=$e,Xe.default=Xe;const Ze=Xe.create({baseURL:"/wp-json/rsvpmaker/v1/",headers:{"Content-type":"application/json","X-WP-Nonce":rsvpmaker_rest.nonce},validateStatus:function(e){return e<400}});function et(e){const{type:n}=e;return(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-arrow-up-circle",viewBox:"0 0 16 16"},(0,t.createElement)("title",null,"Move Up ",n),(0,t.createElement)("path",{"fill-rule":"evenodd",d:"M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-7.5 3.5a.5.5 0 0 1-1 0V5.707L5.354 7.854a.5.5 0 1 1-.708-.708l3-3a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1-.708.708L8.5 5.707V11.5z"}))}function tt(e){const{type:n}=e;return(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-arrow-down-circle",viewBox:"0 0 16 16"},(0,t.createElement)("title",null,"Move Down ",n),(0,t.createElement)("path",{"fill-rule":"evenodd",d:"M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v5.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V4.5z"}))}function nt(e){const{type:n}=e;return(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-trash",viewBox:"0 0 16 16"},(0,t.createElement)("title",null,"Delete ",n),(0,t.createElement)("path",{d:"M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z"}),(0,t.createElement)("path",{"fill-rule":"evenodd",d:"M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z"}))}function rt(e){const[n,r]=(0,t.useState)(e.form_id),[o,i]=(0,t.useState)("rsvpmaker/formfield"),[c,l]=(0,t.useState)(""),[d,h]=(0,t.useState)(""),[p,m]=(0,t.useState)(!1),[v,y]=(0,t.useState)(""),{isSaving:g,saveEffect:b,SaveControls:E,makeNotification:w}=function(){const[e,n]=(0,t.useState)(!1),[r,o]=(0,t.useState)(null),[i,a]=(0,t.useState)(null);function u(){n(!0),setTimeout((()=>{n(!1)}),500)}return{SaveControls:function(e){const{changes:n,setChanges:r}=e;console.log("changes SaveControls",n);const{mutate:o}=function(e,t){const n=(0,s.useQueryClient)();return(0,s.useMutation)((async function(e){return await Ze.post("rsvp_options",e)}),{onMutate:async e=>{console.log("optimistic update option",e),await n.cancelQueries(["rsvp_options"]);const t=n.getQueryData(["rsvp_options"]);return n.setQueryData(["rsvp_options"],(t=>{const{data:n}=t;e.forEach((e=>{"rsvp_options"==e.type&&(n.rsvp_options[e.key]=e.value)}));const r={...t,data:n};return console.log("newdata optimistic update",r),r})),console.log("updating options"),{previousValue:t}},onSettled:(e,t,r,o)=>{n.invalidateQueries(["rsvp_options"])},onSuccess:(t,n,r,o)=>{console.log("updated"),e([])},onError:(e,t,r)=>{console.log("update options error",e),n.setQueryData("rsvp_options",r.previousValue)}})}(r);return(0,t.createElement)("div",{id:"savecontrols"},i&&(0,t.createElement)("div",{className:"rsvp-notification rsvp-notification-success"},i.message),(0,t.createElement)("div",{id:"savebuttonwrapper"},(0,t.createElement)("button",{onClick:()=>{console.log("save changeset",n),u(),o(n)}},"Save")))},notification:i,setNotification:a,isSaving:e,saveEffect:u,makeNotification:function(e=""){if(""==e)return i;r&&clearTimeout(r),a({message:e});let t=setTimeout((()=>{a(null)}),5e3);o(t)}}}(),{changes:O,addChange:S,setChanges:C}=e;wp?.data?.select("core/editor")?.getCurrentPostId(),console.log("Forms props",e),console.log("Forms formId",n);const{data:A,isLoading:T,isError:R}=(0,s.useQuery)(["rsvp_form",n],(function(){return Ze.get("rsvp_form?form_id="+n+"&post_id="+wp?.data?.select("core/editor")?.getCurrentPostId())}),{enabled:!0,retry:2,onSuccess:(e,t,o,i)=>{n||r(e.data.form_id),console.log("rsvp forms query",e)},onError:(e,t,n)=>{console.log("error retrieving rsvp forms",e)},refetchInterval:!1});if(R)return(0,t.createElement)("p",null,"Error loading form options");const k=(0,s.useQueryClient)(),{mutate:N}=(0,s.useMutation)((async function(t){return await Ze.post("rsvp_form?form_id="+n+"&post_id="+wp?.data?.select("core/editor")?.getCurrentPostId(),{form:t,newForm:v,event_id:e.event_id?e.event_id:0})}),{onMutate:async e=>{const t=k.getQueryData(["rsvp_form",n]);return console.log("optimistic update form",e),await k.cancelQueries(["rsvp_form",n]),k.setQueryData(["rsvp_form",n],(t=>{const{data:n}=t;n.form=e;const r={...t,data:n};return console.log("newdata optimistic form update",r),r})),console.log("updating options"),{previousValue:t}},onSettled:(e,t,r,o)=>{k.invalidateQueries(["rsvp_form",n])},onSuccess:(e,t,n,o)=>{console.log("updated"),r(e.data.form_id)},onError:(e,t,r)=>{console.log("update options error",e),k.setQueryData(["rsvp_form",n],r.previousValue)}});if(T)return(0,t.createElement)("p",null,"Loading ...");const x=A.data.form.filter((e=>e.blockName)),_=A.data.form_options,P=A.data.form_id;let D=x.length-1;const F=[];for(let e=0;e<D;e++){let t=x[e];if(t?.attrs.guestform?F.push(e):console.log("guestfields attr not found",e),["rsvpmaker/formnote","rsvpmaker/guests"].includes(t.blockName)){D=e-1;break}}const L=[{label:"Choose Field Type",value:""},{label:"Text Field",value:"rsvpmaker/formfield"},{label:"Text Area",value:"rsvpmaker/formtextarea"},{label:"Select",value:"rsvpmaker/formselect"},{label:"Radio Buttons",value:"rsvpmaker/formradio"},{label:"Add to Email List Checkbox",value:"rsvpmaker/formchimp"}];let M=!1,I=!1;for(let e=0;e<x.length;e++){let t=x[e];console.log("check for end fields",t),"rsvpmaker/guests"==t.blockName&&(M=!0,console.log("check for end fields found guests")),"rsvpmaker/formnote"==t.blockName&&(I=!0,console.log("check for end fields found note"))}function U(e){const[n,r]=(0,t.useState)(!1),{blockindex:o}=e;return(0,t.createElement)(t.Fragment,null,!n&&(0,t.createElement)("button",{className:"blockmove deletebutton",onClick:()=>{r(!0)}},(0,t.createElement)(nt,null)," Delete")," ",n&&(0,t.createElement)("button",{className:"blockmove",onClick:()=>{j(o,"delete")}},(0,t.createElement)(nt,null)," Confirm Delete")," ")}function j(e,t){const n=[],r=x[e];let o="delete"==t;x.forEach(((i,s)=>{null==i.blockName||s==e||("up"==t&&s==e-1&&(n.push(r),o=!0),"down"==t&&s==e+2&&(n.push(r),o=!0),n.push(i))})),o||n.push(r),console.log("newform",n),N(n)}function Q(e,t,n){const r=[...x];r[e].attrs[t]=n,N(r)}function q(e){const{blockindex:n,setFormItemAttr:r}=e,[o,i]=(0,t.useState)(e.attrs.choicearray),[s,u]=(0,t.useState)(e.attrs.required),[c,l]=(0,t.useState)(e.attrs.label),[f,d]=(0,t.useState)(e.attrs.guestform);return(0,t.createElement)("div",{className:"formAtts"},["rsvpmaker/formfield","rsvpmaker/formselect","rsvpmaker/formradio","rsvpmaker/formtextarea"].includes(e.blockName)&&(0,t.createElement)("p",null,(0,t.createElement)("label",null,"Field Label")," ",(0,t.createElement)("input",{type:"text",value:c,onChange:e=>{l(e.target.value)},onBlur:()=>{r(n,"label",c)}})),o&&(0,t.createElement)("p",null,"Choices",(0,t.createElement)("br",null),(0,t.createElement)("textarea",{value:o.join("\n"),onChange:e=>{let t=e.target.value.split("\n");i(t),r(n,"choicearray",t)},onBlur:()=>{r(n,"choicearray",o)}}),(0,t.createElement)("br",null),(0,t.createElement)("em",null,"Enter one choice per line")),["rsvpmaker/formfield","rsvpmaker/formselect","rsvpmaker/formradio","rsvpmaker/formtextarea"].includes(e.blockName)&&"email"!=e.attrs.slug&&(0,t.createElement)(a.ToggleControl,{label:"Required",checked:"required"==s,onChange:()=>{let e="required"==s?"":"required";u(e),r(n,"required",e)}}),"email"==e.attrs.slug&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Email is always required")),["rsvpmaker/formfield","rsvpmaker/formselect","rsvpmaker/formradio","rsvpmaker/formtextarea"].includes(e.blockName)&&(0,t.createElement)(a.ToggleControl,{label:"Include on Guest Form",checked:f,onChange:()=>{let e=!f;d(e),r(n,"guestform",e)}}))}function B(){console.log("guestfields",F);const[e,n]=(0,t.useState)(!1);return e?(0,t.createElement)("div",null,(0,t.createElement)("p",null,"Guest 1"),F.map((e=>{const n=x[e];console.log("guestfields forEach",n);let r=[];return n?.attrs.choicearray&&(r=n.attrs.choicearray.map((e=>({label:e,value:e})))),(0,t.createElement)("div",{className:"formAtts"},"rsvpmaker/formfield"==n.blockName&&(0,t.createElement)(a.TextControl,{label:n.attrs.label}),"rsvpmaker/formtextarea"==n.blockName&&(0,t.createElement)(a.TextareaControl,{label:n.attrs.label}),"rsvpmaker/formselect"==n.blockName&&(0,t.createElement)(u,{label:n.attrs.label,options:r}),"rsvpmaker/formradio"==n.blockName&&(0,t.createElement)(a.RadioControl,{label:n.attrs.label,options:r}))}))):(0,t.createElement)("p",null,(0,t.createElement)("a",{onClick:()=>{n(!0)}},"+ Add Guests"))}M||L.push({label:"Guest Fields",value:"rsvpmaker/guests"}),I||L.push({label:"Note Field",value:"rsvpmaker/formnote"});let H="",z=!0;return(0,t.createElement)("div",{className:"rsvptab"},A.data.is_default&&(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"Default Form Selected"),(0,t.createElement)("p",null,"Changes you make below will apply to all events that use the default form. Switch to a custom form to make customizations for this event only. Forms can also be customized from an event template.")),A.data.is_inherited&&(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"Form Is Inherited"),(0,t.createElement)("p",null,"This form is inherited from a template or another document. Changes you make below will apply to all events that use the same form. Switch to a custom form to make customizations for this event only. Forms can also be customized from an event template.")),(0,t.createElement)(a.ToggleControl,{label:"Show Form Preview",checked:p,onChange:()=>{m(!p)}}),p&&x.map(((e,n)=>{z=e.blockName.indexOf("rsvpmaker")>-1;let r=[];if(e?.attrs.choicearray&&(r=e.attrs.choicearray.map((e=>({label:e,value:e})))),null!=e.blockName)return(0,t.createElement)("div",null,"rsvpmaker/formfield"==e.blockName&&(0,t.createElement)(a.TextControl,{label:e.attrs.label}),"rsvpmaker/formtextarea"==e.blockName&&(0,t.createElement)(a.TextareaControl,{label:e.attrs.label}),"rsvpmaker/formselect"==e.blockName&&(0,t.createElement)(u,{label:e.attrs.label,options:r}),"rsvpmaker/formradio"==e.blockName&&(0,t.createElement)(a.RadioControl,{label:e.attrs.label,options:r}),"rsvpmaker/guests"==e.blockName&&(0,t.createElement)(B,null),"rsvpmaker/formchimp"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("input",{type:"checkbox"})," Add me to your email list"),!z&&e.innerHTML&&(0,t.createElement)(f,{innerHTML:e.innerHTML}))})),(0,t.createElement)("h4",null,"Form Editing Controls"),x.map(((e,r)=>{if(H=e.blockName.replace(/^[^/]+\//,""),z=e.blockName.indexOf("rsvpmaker")>-1,"formchimp"==H?H="Add to Email List Checkbox":"formnote"==H&&(H="Note"),null!=e.blockName)return(0,t.createElement)("div",{className:"formblock"},(0,t.createElement)("div",{class:"blockheader"},(0,t.createElement)("div",{className:"reorganize-drag"},(0,t.createElement)("div",{className:"titleline"},(0,t.createElement)("h2",null,H," ",e.attrs.label&&(0,t.createElement)("span",{className:"fieldlabel"},e.attrs.label))," ",!["rsvpmaker/formnote","rsvpmaker/guests"].includes(e.blockName)&&r>0&&(0,t.createElement)("button",{className:"blockmove",onClick:()=>{j(r,"up")}},(0,t.createElement)(et,null))," ",!["rsvpmaker/formnote","rsvpmaker/guests"].includes(e.blockName)&&r!=D&&(0,t.createElement)("button",{className:"blockmove",onClick:()=>{j(r,"down")}},(0,t.createElement)(tt,null))," ",(0,t.createElement)(U,{blockindex:r})," "),"rsvpmaker/guests"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Gathers information about guests.")),"rsvpmaker/formnote"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"A free text entry note at the bottom of the form.")),"rsvpmaker/formchimp"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Displays an Add to Email List checkbox on the form")),!z&&e.innerHTML&&(0,t.createElement)("div",null,(0,t.createElement)(f,{innerHTML:e.innerHTML})," ",(0,t.createElement)("br",null),(0,t.createElement)("em",null,(0,t.createElement)("a",{href:"/wp-admin/post.php?action=edit&post="+n},"Open in the WordPress editor"))),(0,t.createElement)(q,{attrs:e.attrs,blockName:e.blockName,blockindex:r,setFormItemAttr:Q}))))})),(0,t.createElement)("p",null,"Add a form field ",(0,t.createElement)(u,{label:"Type",options:L,value:o,onChange:e=>{i(e)}})," ",!["rsvpmaker/formnote","rsvpmaker/guests","rsvpmaker/formchimp"].includes(o)&&(0,t.createElement)(a.TextControl,{label:"Field Label",value:c,onChange:e=>{l(e)}})," "),["rsvpmaker/formselect","rsvpmaker/formradio"].includes(o)&&(0,t.createElement)("p",null,(0,t.createElement)("label",null,"Choices"),(0,t.createElement)("br",null),(0,t.createElement)("textarea",{value:d,onChange:e=>{h(e.target.value)}}),(0,t.createElement)("br",null),(0,t.createElement)("em",null,"Enter one choice per line")),(0,t.createElement)("p",null,(0,t.createElement)("button",{onClick:function(){if(!o)return;let e;if(console.log(o),console.log(c),"rsvpmaker/formnote"==o)e={blockName:"rsvpmaker/formnote",attrs:[],innerBlocks:[],innerHTML:"",innerContent:[]};else if("rsvpmaker/guests"==o)e={blockName:"rsvpmaker/guests",attrs:[],innerBlocks:[{blockName:"core/paragraph",attrs:[],innerBlocks:[],innerHTML:"\n<p></p>\n",innerContent:["\n<p></p>\n"]}],innerHTML:'\n<div class="wp-block-rsvpmaker-guests"></div>\n',innerContent:['\n<div class="wp-block-rsvpmaker-guests">',null,"</div>\n"]};else{if(!c)return void alert("a field label is required");let t=c.toLowerCase().replace(/[^a-z0-9]/,"_");"first_name"==t&&(t="first"),"last_name"==t&&(t="last"),e={blockName:o,innerHTML:"",innerBlocks:[],innerContent:[],attrs:{label:c,slug:t}}}d&&(e.attrs.choicearray=d.split("\n")),console.log("newfield",e);const t=[];x.forEach(((n,r)=>{t.push(n),r==D&&t.push(e)})),N(t),i("rsvpmaker/formfield"),l(""),h("")}},"Add")),(0,t.createElement)("p",null,"You can also open this form ",(0,t.createElement)("a",{href:"/wp-admin/post.php?action=edit&post="+n},"in the WordPress editor"),"."),!e.single_form&&(0,t.createElement)(u,{label:"Switch Form",value:P,options:_,onChange:r}),A.data.copied&&(0,t.createElement)("p",null,"Copied ",(0,t.createElement)("strong",null,A.data.copied)),!e.single_form&&(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"Save as Reusable Form"),(0,t.createElement)(a.TextControl,{label:"Form Title",value:v,onChange:y}),(0,t.createElement)("p",null,"You can save the form so it can also be used with other events."),(0,t.createElement)("p",null,(0,t.createElement)("button",{onClick:e=>{e.preventDefault(),N(x),y("")}},"Create Form"))))}const ot=new s.QueryClient;window.addEventListener("load",(function(e){const n=document.getElementById("rsvpmaker-single-form"),o=n.getAttribute("form_id");i().render((0,t.createElement)(r().StrictMode,null,(0,t.createElement)(s.QueryClientProvider,{client:ot},(0,t.createElement)(rt,{form_id:o,single_form:!0}))),n)}))})()})();1 (()=>{var e={838:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:o}=Object;let{freeze:i,seal:s,create:a}=Object,{apply:u,construct:c}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),s||(s=function(e){return e}),u||(u=function(e,t,n){return e.apply(t,n)}),c||(c=function(e,t){return new e(...t)});const l=C(Array.prototype.forEach),f=C(Array.prototype.pop),d=C(Array.prototype.push),h=C(String.prototype.toLowerCase),p=C(String.prototype.toString),m=C(String.prototype.match),v=C(String.prototype.replace),y=C(String.prototype.indexOf),g=C(String.prototype.trim),b=C(Object.prototype.hasOwnProperty),E=C(RegExp.prototype.test),w=(O=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c(O,t)});var O;function C(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return u(e,t,r)}}function S(e,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;t&&t(e,null);let i=r.length;for(;i--;){let t=r[i];if("string"==typeof t){const e=o(t);e!==t&&(n(r)||(r[i]=e),t=e)}e[t]=!0}return e}function T(e){for(let t=0;t<e.length;t++)b(e,t)||(e[t]=null);return e}function A(t){const n=a(null);for(const[r,o]of e(t))b(t,r)&&(Array.isArray(o)?n[r]=T(o):o&&"object"==typeof o&&o.constructor===Object?n[r]=A(o):n[r]=o);return n}function R(e,t){for(;null!==e;){const n=o(e,t);if(n){if(n.get)return C(n.get);if("function"==typeof n.value)return C(n.value)}e=r(e)}return function(){return null}}const k=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),N=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),x=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),_=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),P=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),F=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),D=i(["#text"]),L=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),M=i(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),I=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),U=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),j=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Q=s(/<%[\w\W]*|[\w\W]*%>/gm),q=s(/\${[\w\W]*}/gm),B=s(/^data-[\-\w.\u00B7-\uFFFF]/),H=s(/^aria-[\-\w]+$/),z=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),K=s(/^(?:\w+script|data):/i),G=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),W=s(/^html$/i),V=s(/^[a-z][.\w]*(-[.\w]+)+$/i);var J=Object.freeze({__proto__:null,MUSTACHE_EXPR:j,ERB_EXPR:Q,TMPLIT_EXPR:q,DATA_ATTR:B,ARIA_ATTR:H,IS_ALLOWED_URI:z,IS_SCRIPT_OR_DATA:K,ATTR_WHITESPACE:G,DOCTYPE_NAME:W,CUSTOM_ELEMENT:V});const Y=function(){return"undefined"==typeof window?null:window};return function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y();const r=e=>t(e);if(r.version="3.0.11",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;let{document:o}=n;const s=o,u=s.currentScript,{DocumentFragment:c,HTMLTemplateElement:O,Node:C,Element:T,NodeFilter:j,NamedNodeMap:Q=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:q,DOMParser:B,trustedTypes:H}=n,K=T.prototype,G=R(K,"cloneNode"),V=R(K,"nextSibling"),$=R(K,"childNodes"),X=R(K,"parentNode");if("function"==typeof O){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let Z,ee="";const{implementation:te,createNodeIterator:ne,createDocumentFragment:re,getElementsByTagName:oe}=o,{importNode:ie}=s;let se={};r.isSupported="function"==typeof e&&"function"==typeof X&&te&&void 0!==te.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:ue,TMPLIT_EXPR:ce,DATA_ATTR:le,ARIA_ATTR:fe,IS_SCRIPT_OR_DATA:de,ATTR_WHITESPACE:he,CUSTOM_ELEMENT:pe}=J;let{IS_ALLOWED_URI:me}=J,ve=null;const ye=S({},[...k,...N,...x,...P,...D]);let ge=null;const be=S({},[...L,...M,...I,...U]);let Ee=Object.seal(a(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),we=null,Oe=null,Ce=!0,Se=!0,Te=!1,Ae=!0,Re=!1,ke=!1,Ne=!1,xe=!1,_e=!1,Pe=!1,Fe=!1,De=!0,Le=!1,Me=!0,Ie=!1,Ue={},je=null;const Qe=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let qe=null;const Be=S({},["audio","video","img","source","image","track"]);let He=null;const ze=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ke="http://www.w3.org/1998/Math/MathML",Ge="http://www.w3.org/2000/svg",We="http://www.w3.org/1999/xhtml";let Ve=We,Je=!1,Ye=null;const $e=S({},[Ke,Ge,We],p);let Xe=null;const Ze=["application/xhtml+xml","text/html"];let et=null,tt=null;const nt=o.createElement("form"),rt=function(e){return e instanceof RegExp||e instanceof Function},ot=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!tt||tt!==e){if(e&&"object"==typeof e||(e={}),e=A(e),Xe=-1===Ze.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,et="application/xhtml+xml"===Xe?p:h,ve=b(e,"ALLOWED_TAGS")?S({},e.ALLOWED_TAGS,et):ye,ge=b(e,"ALLOWED_ATTR")?S({},e.ALLOWED_ATTR,et):be,Ye=b(e,"ALLOWED_NAMESPACES")?S({},e.ALLOWED_NAMESPACES,p):$e,He=b(e,"ADD_URI_SAFE_ATTR")?S(A(ze),e.ADD_URI_SAFE_ATTR,et):ze,qe=b(e,"ADD_DATA_URI_TAGS")?S(A(Be),e.ADD_DATA_URI_TAGS,et):Be,je=b(e,"FORBID_CONTENTS")?S({},e.FORBID_CONTENTS,et):Qe,we=b(e,"FORBID_TAGS")?S({},e.FORBID_TAGS,et):{},Oe=b(e,"FORBID_ATTR")?S({},e.FORBID_ATTR,et):{},Ue=!!b(e,"USE_PROFILES")&&e.USE_PROFILES,Ce=!1!==e.ALLOW_ARIA_ATTR,Se=!1!==e.ALLOW_DATA_ATTR,Te=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ae=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Re=e.SAFE_FOR_TEMPLATES||!1,ke=e.WHOLE_DOCUMENT||!1,_e=e.RETURN_DOM||!1,Pe=e.RETURN_DOM_FRAGMENT||!1,Fe=e.RETURN_TRUSTED_TYPE||!1,xe=e.FORCE_BODY||!1,De=!1!==e.SANITIZE_DOM,Le=e.SANITIZE_NAMED_PROPS||!1,Me=!1!==e.KEEP_CONTENT,Ie=e.IN_PLACE||!1,me=e.ALLOWED_URI_REGEXP||z,Ve=e.NAMESPACE||We,Ee=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ee.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&rt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ee.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ee.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Re&&(Se=!1),Pe&&(_e=!0),Ue&&(ve=S({},D),ge=[],!0===Ue.html&&(S(ve,k),S(ge,L)),!0===Ue.svg&&(S(ve,N),S(ge,M),S(ge,U)),!0===Ue.svgFilters&&(S(ve,x),S(ge,M),S(ge,U)),!0===Ue.mathMl&&(S(ve,P),S(ge,I),S(ge,U))),e.ADD_TAGS&&(ve===ye&&(ve=A(ve)),S(ve,e.ADD_TAGS,et)),e.ADD_ATTR&&(ge===be&&(ge=A(ge)),S(ge,e.ADD_ATTR,et)),e.ADD_URI_SAFE_ATTR&&S(He,e.ADD_URI_SAFE_ATTR,et),e.FORBID_CONTENTS&&(je===Qe&&(je=A(je)),S(je,e.FORBID_CONTENTS,et)),Me&&(ve["#text"]=!0),ke&&S(ve,["html","head","body"]),ve.table&&(S(ve,["tbody"]),delete we.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw w('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Z=e.TRUSTED_TYPES_POLICY,ee=Z.createHTML("")}else void 0===Z&&(Z=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(H,u)),null!==Z&&"string"==typeof ee&&(ee=Z.createHTML(""));i&&i(e),tt=e}},it=S({},["mi","mo","mn","ms","mtext"]),st=S({},["foreignobject","desc","title","annotation-xml"]),at=S({},["title","style","font","a","script"]),ut=S({},[...N,...x,..._]),ct=S({},[...P,...F]),lt=function(e){d(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ft=function(e,t){try{d(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){d(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ge[e])if(_e||Pe)try{lt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},dt=function(e){let t=null,n=null;if(xe)e="<remove></remove>"+e;else{const t=m(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Xe&&Ve===We&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=Z?Z.createHTML(e):e;if(Ve===We)try{t=(new B).parseFromString(r,Xe)}catch(e){}if(!t||!t.documentElement){t=te.createDocument(Ve,"template",null);try{t.documentElement.innerHTML=Je?ee:r}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(o.createTextNode(n),i.childNodes[0]||null),Ve===We?oe.call(t,ke?"html":"body")[0]:ke?t.documentElement:i},ht=function(e){return ne.call(e.ownerDocument||e,e,j.SHOW_ELEMENT|j.SHOW_COMMENT|j.SHOW_TEXT|j.SHOW_PROCESSING_INSTRUCTION|j.SHOW_CDATA_SECTION,null)},pt=function(e){return"function"==typeof C&&e instanceof C},mt=function(e,t,n){se[e]&&l(se[e],(e=>{e.call(r,t,n,tt)}))},vt=function(e){let t=null;if(mt("beforeSanitizeElements",e,null),(n=e)instanceof q&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof Q)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return lt(e),!0;var n;const o=et(e.nodeName);if(mt("uponSanitizeElement",e,{tagName:o,allowedTags:ve}),e.hasChildNodes()&&!pt(e.firstElementChild)&&E(/<[/\w]/g,e.innerHTML)&&E(/<[/\w]/g,e.textContent))return lt(e),!0;if(7===e.nodeType)return lt(e),!0;if(!ve[o]||we[o]){if(!we[o]&>(o)){if(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,o))return!1;if(Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(o))return!1}if(Me&&!je[o]){const t=X(e)||e.parentNode,n=$(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(G(n[r],!0),V(e))}return lt(e),!0}return e instanceof T&&!function(e){let t=X(e);t&&t.tagName||(t={namespaceURI:Ve,tagName:"template"});const n=h(e.tagName),r=h(t.tagName);return!!Ye[e.namespaceURI]&&(e.namespaceURI===Ge?t.namespaceURI===We?"svg"===n:t.namespaceURI===Ke?"svg"===n&&("annotation-xml"===r||it[r]):Boolean(ut[n]):e.namespaceURI===Ke?t.namespaceURI===We?"math"===n:t.namespaceURI===Ge?"math"===n&&st[r]:Boolean(ct[n]):e.namespaceURI===We?!(t.namespaceURI===Ge&&!st[r])&&!(t.namespaceURI===Ke&&!it[r])&&!ct[n]&&(at[n]||!ut[n]):!("application/xhtml+xml"!==Xe||!Ye[e.namespaceURI]))}(e)?(lt(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!E(/<\/no(script|embed|frames)/i,e.innerHTML)?(Re&&3===e.nodeType&&(t=e.textContent,l([ae,ue,ce],(e=>{t=v(t,e," ")})),e.textContent!==t&&(d(r.removed,{element:e.cloneNode()}),e.textContent=t)),mt("afterSanitizeElements",e,null),!1):(lt(e),!0)},yt=function(e,t,n){if(De&&("id"===t||"name"===t)&&(n in o||n in nt))return!1;if(Se&&!Oe[t]&&E(le,t));else if(Ce&&E(fe,t));else if(!ge[t]||Oe[t]){if(!(gt(e)&&(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,e)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(e))&&(Ee.attributeNameCheck instanceof RegExp&&E(Ee.attributeNameCheck,t)||Ee.attributeNameCheck instanceof Function&&Ee.attributeNameCheck(t))||"is"===t&&Ee.allowCustomizedBuiltInElements&&(Ee.tagNameCheck instanceof RegExp&&E(Ee.tagNameCheck,n)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(n))))return!1}else if(He[t]);else if(E(me,v(n,he,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==y(n,"data:")||!qe[e])if(Te&&!E(de,v(n,he,"")));else if(n)return!1;return!0},gt=function(e){return"annotation-xml"!==e&&m(e,pe)},bt=function(e){mt("beforeSanitizeAttributes",e,null);const{attributes:t}=e;if(!t)return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};let o=t.length;for(;o--;){const i=t[o],{name:s,namespaceURI:a,value:u}=i,c=et(s);let d="value"===s?u:g(u);if(n.attrName=c,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,mt("uponSanitizeAttribute",e,n),d=n.attrValue,n.forceKeepAttr)continue;if(ft(s,e),!n.keepAttr)continue;if(!Ae&&E(/\/>/i,d)){ft(s,e);continue}Re&&l([ae,ue,ce],(e=>{d=v(d,e," ")}));const h=et(e.nodeName);if(yt(h,c,d)){if(!Le||"id"!==c&&"name"!==c||(ft(s,e),d="user-content-"+d),Z&&"object"==typeof H&&"function"==typeof H.getAttributeType)if(a);else switch(H.getAttributeType(h,c)){case"TrustedHTML":d=Z.createHTML(d);break;case"TrustedScriptURL":d=Z.createScriptURL(d)}try{a?e.setAttributeNS(a,s,d):e.setAttribute(s,d),f(r.removed)}catch(e){}}}mt("afterSanitizeAttributes",e,null)},Et=function e(t){let n=null;const r=ht(t);for(mt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)mt("uponSanitizeShadowNode",n,null),vt(n)||(n.content instanceof c&&e(n.content),bt(n));mt("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,i=null,a=null;if(Je=!e,Je&&(e="\x3c!--\x3e"),"string"!=typeof e&&!pt(e)){if("function"!=typeof e.toString)throw w("toString is not a function");if("string"!=typeof(e=e.toString()))throw w("dirty is not a string, aborting")}if(!r.isSupported)return e;if(Ne||ot(t),r.removed=[],"string"==typeof e&&(Ie=!1),Ie){if(e.nodeName){const t=et(e.nodeName);if(!ve[t]||we[t])throw w("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof C)n=dt("\x3c!----\x3e"),o=n.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?n=o:n.appendChild(o);else{if(!_e&&!Re&&!ke&&-1===e.indexOf("<"))return Z&&Fe?Z.createHTML(e):e;if(n=dt(e),!n)return _e?null:Fe?ee:""}n&&xe&<(n.firstChild);const u=ht(Ie?e:n);for(;i=u.nextNode();)vt(i)||(i.content instanceof c&&Et(i.content),bt(i));if(Ie)return e;if(_e){if(Pe)for(a=re.call(n.ownerDocument);n.firstChild;)a.appendChild(n.firstChild);else a=n;return(ge.shadowroot||ge.shadowrootmode)&&(a=ie.call(s,a,!0)),a}let f=ke?n.outerHTML:n.innerHTML;return ke&&ve["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&E(W,n.ownerDocument.doctype.name)&&(f="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+f),Re&&l([ae,ue,ce],(e=>{f=v(f,e," ")})),Z&&Fe?Z.createHTML(f):f},r.setConfig=function(){ot(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ne=!0},r.clearConfig=function(){tt=null,Ne=!1},r.isValidAttribute=function(e,t,n){tt||ot({});const r=et(e),o=et(t);return yt(r,o,n)},r.addHook=function(e,t){"function"==typeof t&&(se[e]=se[e]||[],d(se[e],t))},r.removeHook=function(e){if(se[e])return f(se[e])},r.removeHooks=function(e){se[e]&&(se[e]=[])},r.removeAllHooks=function(){se={}},r}()}()},289:(e,t,n)=>{"use strict";n.d(t,{m:()=>s});var r=n(540),o=n(287),i=n(941),s=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!i.S$&&(null==(t=window)?void 0:t.addEventListener)){var n=function(){return e()};return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),function(){window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}},t}(0,r.A)(t,e);var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)},n.setEventListener=function(e){var t,n=this;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((function(e){"boolean"==typeof e?n.setFocused(e):n.onFocus()}))},n.setFocused=function(e){this.focused=e,e&&this.onFocus()},n.onFocus=function(){this.listeners.forEach((function(e){e()}))},n.isFocused=function(){return"boolean"==typeof this.focused?this.focused:"undefined"==typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)},t}(o.Q))},468:(e,t,n)=>{"use strict";n.d(t,{QueryClient:()=>r.E});var r=n(98),o=n(449);n.o(o,"QueryClientProvider")&&n.d(t,{QueryClientProvider:function(){return o.QueryClientProvider}}),n.o(o,"useMutation")&&n.d(t,{useMutation:function(){return o.useMutation}}),n.o(o,"useQuery")&&n.d(t,{useQuery:function(){return o.useQuery}}),n.o(o,"useQueryClient")&&n.d(t,{useQueryClient:function(){return o.useQueryClient}})},690:(e,t,n)=>{"use strict";n.d(t,{B:()=>i,t:()=>o});var r=console;function o(){return r}function i(e){r=e}},465:(e,t,n)=>{"use strict";n.d(t,{$:()=>c,s:()=>u});var r=n(168),o=n(690),i=n(428),s=n(281),a=n(941),u=function(){function e(e){this.options=(0,r.A)({},e.defaultOptions,e.options),this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.observers=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0},this.meta=e.meta}var t=e.prototype;return t.setState=function(e){this.dispatch({type:"setState",state:e})},t.addObserver=function(e){-1===this.observers.indexOf(e)&&this.observers.push(e)},t.removeObserver=function(e){this.observers=this.observers.filter((function(t){return t!==e}))},t.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(a.lQ).catch(a.lQ)):Promise.resolve()},t.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},t.execute=function(){var e,t=this,n="loading"===this.state.status,r=Promise.resolve();return n||(this.dispatch({type:"loading",variables:this.options.variables}),r=r.then((function(){null==t.mutationCache.config.onMutate||t.mutationCache.config.onMutate(t.state.variables,t)})).then((function(){return null==t.options.onMutate?void 0:t.options.onMutate(t.state.variables)})).then((function(e){e!==t.state.context&&t.dispatch({type:"loading",context:e,variables:t.state.variables})}))),r.then((function(){return t.executeMutation()})).then((function(n){e=n,null==t.mutationCache.config.onSuccess||t.mutationCache.config.onSuccess(e,t.state.variables,t.state.context,t)})).then((function(){return null==t.options.onSuccess?void 0:t.options.onSuccess(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(e,null,t.state.variables,t.state.context)})).then((function(){return t.dispatch({type:"success",data:e}),e})).catch((function(e){return null==t.mutationCache.config.onError||t.mutationCache.config.onError(e,t.state.variables,t.state.context,t),(0,o.t)().error(e),Promise.resolve().then((function(){return null==t.options.onError?void 0:t.options.onError(e,t.state.variables,t.state.context)})).then((function(){return null==t.options.onSettled?void 0:t.options.onSettled(void 0,e,t.state.variables,t.state.context)})).then((function(){throw t.dispatch({type:"error",error:e}),e}))}))},t.executeMutation=function(){var e,t=this;return this.retryer=new s.eJ({fn:function(){return t.options.mutationFn?t.options.mutationFn(t.state.variables):Promise.reject("No mutationFn found")},onFail:function(){t.dispatch({type:"failed"})},onPause:function(){t.dispatch({type:"pause"})},onContinue:function(){t.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay}),this.retryer.promise},t.dispatch=function(e){var t=this;this.state=function(e,t){switch(t.type){case"failed":return(0,r.A)({},e,{failureCount:e.failureCount+1});case"pause":return(0,r.A)({},e,{isPaused:!0});case"continue":return(0,r.A)({},e,{isPaused:!1});case"loading":return(0,r.A)({},e,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return(0,r.A)({},e,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return(0,r.A)({},e,{data:void 0,error:t.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return(0,r.A)({},e,t.state);default:return e}}(this.state,e),i.j.batch((function(){t.observers.forEach((function(t){t.onMutationUpdate(e)})),t.mutationCache.notify(t)}))},e}();function c(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}},428:(e,t,n)=>{"use strict";n.d(t,{j:()=>o});var r=n(941),o=new(function(){function e(){this.queue=[],this.transactions=0,this.notifyFn=function(e){e()},this.batchNotifyFn=function(e){e()}}var t=e.prototype;return t.batch=function(e){var t;this.transactions++;try{t=e()}finally{this.transactions--,this.transactions||this.flush()}return t},t.schedule=function(e){var t=this;this.transactions?this.queue.push(e):(0,r.G6)((function(){t.notifyFn(e)}))},t.batchCalls=function(e){var t=this;return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];t.schedule((function(){e.apply(void 0,r)}))}},t.flush=function(){var e=this,t=this.queue;this.queue=[],t.length&&(0,r.G6)((function(){e.batchNotifyFn((function(){t.forEach((function(t){e.notifyFn(t)}))}))}))},t.setNotifyFunction=function(e){this.notifyFn=e},t.setBatchNotifyFunction=function(e){this.batchNotifyFn=e},e}())},622:(e,t,n)=>{"use strict";n.d(t,{t:()=>s});var r=n(540),o=n(287),i=n(941),s=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!i.S$&&(null==(t=window)?void 0:t.addEventListener)){var n=function(){return e()};return window.addEventListener("online",n,!1),window.addEventListener("offline",n,!1),function(){window.removeEventListener("online",n),window.removeEventListener("offline",n)}}},t}(0,r.A)(t,e);var n=t.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){var e;this.hasListeners()||(null==(e=this.cleanup)||e.call(this),this.cleanup=void 0)},n.setEventListener=function(e){var t,n=this;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e((function(e){"boolean"==typeof e?n.setOnline(e):n.onOnline()}))},n.setOnline=function(e){this.online=e,e&&this.onOnline()},n.onOnline=function(){this.listeners.forEach((function(e){e()}))},n.isOnline=function(){return"boolean"==typeof this.online?this.online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine},t}(o.Q))},98:(e,t,n)=>{"use strict";n.d(t,{E:()=>y});var r=n(168),o=n(941),i=n(540),s=n(428),a=n(690),u=n(281),c=function(){function e(e){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=e.meta,this.scheduleGc()}var t=e.prototype;return t.setOptions=function(e){var t;this.options=(0,r.A)({},this.defaultOptions,e),this.meta=null==e?void 0:e.meta,this.cacheTime=Math.max(this.cacheTime||0,null!=(t=this.options.cacheTime)?t:3e5)},t.setDefaultOptions=function(e){this.defaultOptions=e},t.scheduleGc=function(){var e=this;this.clearGcTimeout(),(0,o.gn)(this.cacheTime)&&(this.gcTimeout=setTimeout((function(){e.optionalRemove()}),this.cacheTime))},t.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},t.optionalRemove=function(){this.observers.length||(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},t.setData=function(e,t){var n,r,i=this.state.data,s=(0,o.Zw)(e,i);return(null==(n=(r=this.options).isDataEqual)?void 0:n.call(r,i,s))?s=i:!1!==this.options.structuralSharing&&(s=(0,o.BH)(i,s)),this.dispatch({data:s,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt}),s},t.setState=function(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})},t.cancel=function(e){var t,n=this.promise;return null==(t=this.retryer)||t.cancel(e),n?n.then(o.lQ).catch(o.lQ):Promise.resolve()},t.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},t.reset=function(){this.destroy(),this.setState(this.initialState)},t.isActive=function(){return this.observers.some((function(e){return!1!==e.options.enabled}))},t.isFetching=function(){return this.state.isFetching},t.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some((function(e){return e.getCurrentResult().isStale}))},t.isStaleByTime=function(e){return void 0===e&&(e=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!(0,o.j3)(this.state.dataUpdatedAt,e)},t.onFocus=function(){var e,t=this.observers.find((function(e){return e.shouldFetchOnWindowFocus()}));t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.onOnline=function(){var e,t=this.observers.find((function(e){return e.shouldFetchOnReconnect()}));t&&t.refetch(),null==(e=this.retryer)||e.continue()},t.addObserver=function(e){-1===this.observers.indexOf(e)&&(this.observers.push(e),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))},t.removeObserver=function(e){-1!==this.observers.indexOf(e)&&(this.observers=this.observers.filter((function(t){return t!==e})),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:e}))},t.getObserversCount=function(){return this.observers.length},t.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},t.fetch=function(e,t){var n,r,i,s=this;if(this.state.isFetching)if(this.state.dataUpdatedAt&&(null==t?void 0:t.cancelRefetch))this.cancel({silent:!0});else if(this.promise){var c;return null==(c=this.retryer)||c.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){var l=this.observers.find((function(e){return e.options.queryFn}));l&&this.setOptions(l.options)}var f=(0,o.HN)(this.queryKey),d=(0,o.jY)(),h={queryKey:f,pageParam:void 0,meta:this.meta};Object.defineProperty(h,"signal",{enumerable:!0,get:function(){if(d)return s.abortSignalConsumed=!0,d.signal}});var p,m,v={fetchOptions:t,options:this.options,queryKey:f,state:this.state,fetchFn:function(){return s.options.queryFn?(s.abortSignalConsumed=!1,s.options.queryFn(h)):Promise.reject("Missing queryFn")},meta:this.meta};return(null==(n=this.options.behavior)?void 0:n.onFetch)&&(null==(p=this.options.behavior)||p.onFetch(v)),this.revertState=this.state,this.state.isFetching&&this.state.fetchMeta===(null==(r=v.fetchOptions)?void 0:r.meta)||this.dispatch({type:"fetch",meta:null==(m=v.fetchOptions)?void 0:m.meta}),this.retryer=new u.eJ({fn:v.fetchFn,abort:null==d||null==(i=d.abort)?void 0:i.bind(d),onSuccess:function(e){s.setData(e),null==s.cache.config.onSuccess||s.cache.config.onSuccess(e,s),0===s.cacheTime&&s.optionalRemove()},onError:function(e){(0,u.wm)(e)&&e.silent||s.dispatch({type:"error",error:e}),(0,u.wm)(e)||(null==s.cache.config.onError||s.cache.config.onError(e,s),(0,a.t)().error(e)),0===s.cacheTime&&s.optionalRemove()},onFail:function(){s.dispatch({type:"failed"})},onPause:function(){s.dispatch({type:"pause"})},onContinue:function(){s.dispatch({type:"continue"})},retry:v.options.retry,retryDelay:v.options.retryDelay}),this.promise=this.retryer.promise,this.promise},t.dispatch=function(e){var t=this;this.state=this.reducer(this.state,e),s.j.batch((function(){t.observers.forEach((function(t){t.onQueryUpdate(e)})),t.cache.notify({query:t,type:"queryUpdated",action:e})}))},t.getDefaultState=function(e){var t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==e.initialData?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0,r=void 0!==t;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?null!=n?n:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:r?"success":"idle"}},t.reducer=function(e,t){var n,o;switch(t.type){case"failed":return(0,r.A)({},e,{fetchFailureCount:e.fetchFailureCount+1});case"pause":return(0,r.A)({},e,{isPaused:!0});case"continue":return(0,r.A)({},e,{isPaused:!1});case"fetch":return(0,r.A)({},e,{fetchFailureCount:0,fetchMeta:null!=(n=t.meta)?n:null,isFetching:!0,isPaused:!1},!e.dataUpdatedAt&&{error:null,status:"loading"});case"success":return(0,r.A)({},e,{data:t.data,dataUpdateCount:e.dataUpdateCount+1,dataUpdatedAt:null!=(o=t.dataUpdatedAt)?o:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var i=t.error;return(0,u.wm)(i)&&i.revert&&this.revertState?(0,r.A)({},this.revertState):(0,r.A)({},e,{error:i,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return(0,r.A)({},e,{isInvalidated:!0});case"setState":return(0,r.A)({},e,t.state);default:return e}},e}(),l=n(287),f=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.queries=[],n.queriesMap={},n}(0,i.A)(t,e);var n=t.prototype;return n.build=function(e,t,n){var r,i=t.queryKey,s=null!=(r=t.queryHash)?r:(0,o.F$)(i,t),a=this.get(s);return a||(a=new c({cache:this,queryKey:i,queryHash:s,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i),meta:t.meta}),this.add(a)),a},n.add=function(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"queryAdded",query:e}))},n.remove=function(e){var t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter((function(t){return t!==e})),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"queryRemoved",query:e}))},n.clear=function(){var e=this;s.j.batch((function(){e.queries.forEach((function(t){e.remove(t)}))}))},n.get=function(e){return this.queriesMap[e]},n.getAll=function(){return this.queries},n.find=function(e,t){var n=(0,o.b_)(e,t)[0];return void 0===n.exact&&(n.exact=!0),this.queries.find((function(e){return(0,o.MK)(n,e)}))},n.findAll=function(e,t){var n=(0,o.b_)(e,t)[0];return Object.keys(n).length>0?this.queries.filter((function(e){return(0,o.MK)(n,e)})):this.queries},n.notify=function(e){var t=this;s.j.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},n.onFocus=function(){var e=this;s.j.batch((function(){e.queries.forEach((function(e){e.onFocus()}))}))},n.onOnline=function(){var e=this;s.j.batch((function(){e.queries.forEach((function(e){e.onOnline()}))}))},t}(l.Q),d=n(465),h=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.mutations=[],n.mutationId=0,n}(0,i.A)(t,e);var n=t.prototype;return n.build=function(e,t,n){var r=new d.s({mutationCache:this,mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:n,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0,meta:t.meta});return this.add(r),r},n.add=function(e){this.mutations.push(e),this.notify(e)},n.remove=function(e){this.mutations=this.mutations.filter((function(t){return t!==e})),e.cancel(),this.notify(e)},n.clear=function(){var e=this;s.j.batch((function(){e.mutations.forEach((function(t){e.remove(t)}))}))},n.getAll=function(){return this.mutations},n.find=function(e){return void 0===e.exact&&(e.exact=!0),this.mutations.find((function(t){return(0,o.nJ)(e,t)}))},n.findAll=function(e){return this.mutations.filter((function(t){return(0,o.nJ)(e,t)}))},n.notify=function(e){var t=this;s.j.batch((function(){t.listeners.forEach((function(t){t(e)}))}))},n.onFocus=function(){this.resumePausedMutations()},n.onOnline=function(){this.resumePausedMutations()},n.resumePausedMutations=function(){var e=this.mutations.filter((function(e){return e.state.isPaused}));return s.j.batch((function(){return e.reduce((function(e,t){return e.then((function(){return t.continue().catch(o.lQ)}))}),Promise.resolve())}))},t}(l.Q),p=n(289),m=n(622);function v(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}var y=function(){function e(e){void 0===e&&(e={}),this.queryCache=e.queryCache||new f,this.mutationCache=e.mutationCache||new h,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var t=e.prototype;return t.mount=function(){var e=this;this.unsubscribeFocus=p.m.subscribe((function(){p.m.isFocused()&&m.t.isOnline()&&(e.mutationCache.onFocus(),e.queryCache.onFocus())})),this.unsubscribeOnline=m.t.subscribe((function(){p.m.isFocused()&&m.t.isOnline()&&(e.mutationCache.onOnline(),e.queryCache.onOnline())}))},t.unmount=function(){var e,t;null==(e=this.unsubscribeFocus)||e.call(this),null==(t=this.unsubscribeOnline)||t.call(this)},t.isFetching=function(e,t){var n=(0,o.b_)(e,t)[0];return n.fetching=!0,this.queryCache.findAll(n).length},t.isMutating=function(e){return this.mutationCache.findAll((0,r.A)({},e,{fetching:!0})).length},t.getQueryData=function(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state.data},t.getQueriesData=function(e){return this.getQueryCache().findAll(e).map((function(e){return[e.queryKey,e.state.data]}))},t.setQueryData=function(e,t,n){var r=(0,o.vh)(e),i=this.defaultQueryOptions(r);return this.queryCache.build(this,i).setData(t,n)},t.setQueriesData=function(e,t,n){var r=this;return s.j.batch((function(){return r.getQueryCache().findAll(e).map((function(e){var o=e.queryKey;return[o,r.setQueryData(o,t,n)]}))}))},t.getQueryState=function(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state},t.removeQueries=function(e,t){var n=(0,o.b_)(e,t)[0],r=this.queryCache;s.j.batch((function(){r.findAll(n).forEach((function(e){r.remove(e)}))}))},t.resetQueries=function(e,t,n){var i=this,a=(0,o.b_)(e,t,n),u=a[0],c=a[1],l=this.queryCache,f=(0,r.A)({},u,{active:!0});return s.j.batch((function(){return l.findAll(u).forEach((function(e){e.reset()})),i.refetchQueries(f,c)}))},t.cancelQueries=function(e,t,n){var r=this,i=(0,o.b_)(e,t,n),a=i[0],u=i[1],c=void 0===u?{}:u;void 0===c.revert&&(c.revert=!0);var l=s.j.batch((function(){return r.queryCache.findAll(a).map((function(e){return e.cancel(c)}))}));return Promise.all(l).then(o.lQ).catch(o.lQ)},t.invalidateQueries=function(e,t,n){var i,a,u,c=this,l=(0,o.b_)(e,t,n),f=l[0],d=l[1],h=(0,r.A)({},f,{active:null==(i=null!=(a=f.refetchActive)?a:f.active)||i,inactive:null!=(u=f.refetchInactive)&&u});return s.j.batch((function(){return c.queryCache.findAll(f).forEach((function(e){e.invalidate()})),c.refetchQueries(h,d)}))},t.refetchQueries=function(e,t,n){var i=this,a=(0,o.b_)(e,t,n),u=a[0],c=a[1],l=s.j.batch((function(){return i.queryCache.findAll(u).map((function(e){return e.fetch(void 0,(0,r.A)({},c,{meta:{refetchPage:null==u?void 0:u.refetchPage}}))}))})),f=Promise.all(l).then(o.lQ);return(null==c?void 0:c.throwOnError)||(f=f.catch(o.lQ)),f},t.fetchQuery=function(e,t,n){var r=(0,o.vh)(e,t,n),i=this.defaultQueryOptions(r);void 0===i.retry&&(i.retry=!1);var s=this.queryCache.build(this,i);return s.isStaleByTime(i.staleTime)?s.fetch(i):Promise.resolve(s.state.data)},t.prefetchQuery=function(e,t,n){return this.fetchQuery(e,t,n).then(o.lQ).catch(o.lQ)},t.fetchInfiniteQuery=function(e,t,n){var r=(0,o.vh)(e,t,n);return r.behavior={onFetch:function(e){e.fetchFn=function(){var t,n,r,i,s,a,c,l,f,d=null==(t=e.fetchOptions)||null==(n=t.meta)?void 0:n.refetchPage,h=null==(r=e.fetchOptions)||null==(i=r.meta)?void 0:i.fetchMore,p=null==h?void 0:h.pageParam,m="forward"===(null==h?void 0:h.direction),y="backward"===(null==h?void 0:h.direction),g=(null==(s=e.state.data)?void 0:s.pages)||[],b=(null==(a=e.state.data)?void 0:a.pageParams)||[],E=(0,o.jY)(),w=null==E?void 0:E.signal,O=b,C=!1,S=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},T=function(e,t,n,r){return O=r?[t].concat(O):[].concat(O,[t]),r?[n].concat(e):[].concat(e,[n])},A=function(t,n,r,o){if(C)return Promise.reject("Cancelled");if(void 0===r&&!n&&t.length)return Promise.resolve(t);var i={queryKey:e.queryKey,signal:w,pageParam:r,meta:e.meta},s=S(i),a=Promise.resolve(s).then((function(e){return T(t,r,e,o)}));return(0,u.dd)(s)&&(a.cancel=s.cancel),a};if(g.length)if(m){var R=void 0!==p,k=R?p:v(e.options,g);c=A(g,R,k)}else if(y){var N=void 0!==p,x=N?p:(l=e.options,f=g,null==l.getPreviousPageParam?void 0:l.getPreviousPageParam(f[0],f));c=A(g,N,x,!0)}else!function(){O=[];var t=void 0===e.options.getNextPageParam,n=!d||!g[0]||d(g[0],0,g);c=n?A([],t,b[0]):Promise.resolve(T([],b[0],g[0]));for(var r=function(n){c=c.then((function(r){if(!d||!g[n]||d(g[n],n,g)){var o=t?b[n]:v(e.options,r);return A(r,t,o)}return Promise.resolve(T(r,b[n],g[n]))}))},o=1;o<g.length;o++)r(o)}();else c=A([]);var _=c.then((function(e){return{pages:e,pageParams:O}}));return _.cancel=function(){C=!0,null==E||E.abort(),(0,u.dd)(c)&&c.cancel()},_}}},this.fetchQuery(r)},t.prefetchInfiniteQuery=function(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(o.lQ).catch(o.lQ)},t.cancelMutations=function(){var e=this,t=s.j.batch((function(){return e.mutationCache.getAll().map((function(e){return e.cancel()}))}));return Promise.all(t).then(o.lQ).catch(o.lQ)},t.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},t.executeMutation=function(e){return this.mutationCache.build(this,e).execute()},t.getQueryCache=function(){return this.queryCache},t.getMutationCache=function(){return this.mutationCache},t.getDefaultOptions=function(){return this.defaultOptions},t.setDefaultOptions=function(e){this.defaultOptions=e},t.setQueryDefaults=function(e,t){var n=this.queryDefaults.find((function(t){return(0,o.Od)(e)===(0,o.Od)(t.queryKey)}));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})},t.getQueryDefaults=function(e){var t;return e?null==(t=this.queryDefaults.find((function(t){return(0,o.Cp)(e,t.queryKey)})))?void 0:t.defaultOptions:void 0},t.setMutationDefaults=function(e,t){var n=this.mutationDefaults.find((function(t){return(0,o.Od)(e)===(0,o.Od)(t.mutationKey)}));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})},t.getMutationDefaults=function(e){var t;return e?null==(t=this.mutationDefaults.find((function(t){return(0,o.Cp)(e,t.mutationKey)})))?void 0:t.defaultOptions:void 0},t.defaultQueryOptions=function(e){if(null==e?void 0:e._defaulted)return e;var t=(0,r.A)({},this.defaultOptions.queries,this.getQueryDefaults(null==e?void 0:e.queryKey),e,{_defaulted:!0});return!t.queryHash&&t.queryKey&&(t.queryHash=(0,o.F$)(t.queryKey,t)),t},t.defaultQueryObserverOptions=function(e){return this.defaultQueryOptions(e)},t.defaultMutationOptions=function(e){return(null==e?void 0:e._defaulted)?e:(0,r.A)({},this.defaultOptions.mutations,this.getMutationDefaults(null==e?void 0:e.mutationKey),e,{_defaulted:!0})},t.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},e}()},281:(e,t,n)=>{"use strict";n.d(t,{dd:()=>a,eJ:()=>l,wm:()=>c});var r=n(289),o=n(622),i=n(941);function s(e){return Math.min(1e3*Math.pow(2,e),3e4)}function a(e){return"function"==typeof(null==e?void 0:e.cancel)}var u=function(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent};function c(e){return e instanceof u}var l=function(e){var t,n,c,l,f=this,d=!1;this.abort=e.abort,this.cancel=function(e){return null==t?void 0:t(e)},this.cancelRetry=function(){d=!0},this.continueRetry=function(){d=!1},this.continue=function(){return null==n?void 0:n()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise((function(e,t){c=e,l=t}));var h=function(t){f.isResolved||(f.isResolved=!0,null==e.onSuccess||e.onSuccess(t),null==n||n(),c(t))},p=function(t){f.isResolved||(f.isResolved=!0,null==e.onError||e.onError(t),null==n||n(),l(t))};!function c(){if(!f.isResolved){var l;try{l=e.fn()}catch(e){l=Promise.reject(e)}t=function(e){if(!f.isResolved&&(p(new u(e)),null==f.abort||f.abort(),a(l)))try{l.cancel()}catch(e){}},f.isTransportCancelable=a(l),Promise.resolve(l).then(h).catch((function(t){var a,u;if(!f.isResolved){var l=null!=(a=e.retry)?a:3,h=null!=(u=e.retryDelay)?u:s,m="function"==typeof h?h(f.failureCount,t):h,v=!0===l||"number"==typeof l&&f.failureCount<l||"function"==typeof l&&l(f.failureCount,t);!d&&v?(f.failureCount++,null==e.onFail||e.onFail(f.failureCount,t),(0,i.yy)(m).then((function(){if(!r.m.isFocused()||!o.t.isOnline())return new Promise((function(t){n=t,f.isPaused=!0,null==e.onPause||e.onPause()})).then((function(){n=void 0,f.isPaused=!1,null==e.onContinue||e.onContinue()}))})).then((function(){d?p(t):c()}))):p(t)}}))}}()}},287:(e,t,n)=>{"use strict";n.d(t,{Q:()=>r});var r=function(){function e(){this.listeners=[]}var t=e.prototype;return t.subscribe=function(e){var t=this,n=e||function(){};return this.listeners.push(n),this.onSubscribe(),function(){t.listeners=t.listeners.filter((function(e){return e!==n})),t.onUnsubscribe()}},t.hasListeners=function(){return this.listeners.length>0},t.onSubscribe=function(){},t.onUnsubscribe=function(){},e}()},449:()=>{},941:(e,t,n)=>{"use strict";n.d(t,{BH:()=>b,Cp:()=>y,F$:()=>m,G6:()=>T,GR:()=>f,HN:()=>u,MK:()=>h,Od:()=>v,S$:()=>o,Zw:()=>s,b_:()=>d,f8:()=>E,gn:()=>a,j3:()=>c,jY:()=>A,lQ:()=>i,nJ:()=>p,vh:()=>l,yy:()=>S});var r=n(168),o="undefined"==typeof window;function i(){}function s(e,t){return"function"==typeof e?e(t):e}function a(e){return"number"==typeof e&&e>=0&&e!==1/0}function u(e){return Array.isArray(e)?e:[e]}function c(e,t){return Math.max(e+(t||0)-Date.now(),0)}function l(e,t,n){return C(e)?"function"==typeof t?(0,r.A)({},n,{queryKey:e,queryFn:t}):(0,r.A)({},t,{queryKey:e}):e}function f(e,t,n){return C(e)?"function"==typeof t?(0,r.A)({},n,{mutationKey:e,mutationFn:t}):(0,r.A)({},t,{mutationKey:e}):"function"==typeof e?(0,r.A)({},t,{mutationFn:e}):(0,r.A)({},e)}function d(e,t,n){return C(e)?[(0,r.A)({},t,{queryKey:e}),n]:[e||{},t]}function h(e,t){var n=e.active,r=e.exact,o=e.fetching,i=e.inactive,s=e.predicate,a=e.queryKey,u=e.stale;if(C(a))if(r){if(t.queryHash!==m(a,t.options))return!1}else if(!y(t.queryKey,a))return!1;var c=function(e,t){return!0===e&&!0===t||null==e&&null==t?"all":!1===e&&!1===t?"none":(null!=e?e:!t)?"active":"inactive"}(n,i);if("none"===c)return!1;if("all"!==c){var l=t.isActive();if("active"===c&&!l)return!1;if("inactive"===c&&l)return!1}return!("boolean"==typeof u&&t.isStale()!==u||"boolean"==typeof o&&t.isFetching()!==o||s&&!s(t))}function p(e,t){var n=e.exact,r=e.fetching,o=e.predicate,i=e.mutationKey;if(C(i)){if(!t.options.mutationKey)return!1;if(n){if(v(t.options.mutationKey)!==v(i))return!1}else if(!y(t.options.mutationKey,i))return!1}return!("boolean"==typeof r&&"loading"===t.state.status!==r||o&&!o(t))}function m(e,t){return((null==t?void 0:t.queryKeyHashFn)||v)(e)}function v(e){var t;return t=u(e),JSON.stringify(t,(function(e,t){return w(t)?Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{}):t}))}function y(e,t){return g(u(e),u(t))}function g(e,t){return e===t||typeof e==typeof t&&!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((function(n){return!g(e[n],t[n])}))}function b(e,t){if(e===t)return e;var n=Array.isArray(e)&&Array.isArray(t);if(n||w(e)&&w(t)){for(var r=n?e.length:Object.keys(e).length,o=n?t:Object.keys(t),i=o.length,s=n?[]:{},a=0,u=0;u<i;u++){var c=n?u:o[u];s[c]=b(e[c],t[c]),s[c]===e[c]&&a++}return r===i&&a===r?e:s}return t}function E(e,t){if(e&&!t||t&&!e)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}function w(e){if(!O(e))return!1;var t=e.constructor;if(void 0===t)return!0;var n=t.prototype;return!!O(n)&&!!n.hasOwnProperty("isPrototypeOf")}function O(e){return"[object Object]"===Object.prototype.toString.call(e)}function C(e){return"string"==typeof e||Array.isArray(e)}function S(e){return new Promise((function(t){setTimeout(t,e)}))}function T(e){Promise.resolve().then(e).catch((function(e){return setTimeout((function(){throw e}))}))}function A(){if("function"==typeof AbortController)return new AbortController}},942:(e,t,n)=>{"use strict";n.d(t,{QueryClient:()=>r.QueryClient,QueryClientProvider:()=>o.QueryClientProvider,useMutation:()=>o.useMutation,useQuery:()=>o.useQuery,useQueryClient:()=>o.useQueryClient});var r=n(468);n.o(r,"QueryClientProvider")&&n.d(t,{QueryClientProvider:function(){return r.QueryClientProvider}}),n.o(r,"useMutation")&&n.d(t,{useMutation:function(){return r.useMutation}}),n.o(r,"useQuery")&&n.d(t,{useQuery:function(){return r.useQuery}}),n.o(r,"useQueryClient")&&n.d(t,{useQueryClient:function(){return r.useQueryClient}});var o=n(960)},360:(e,t,n)=>{"use strict";n.d(t,{H:()=>c,j:()=>u});var r=n(609),o=n.n(r),i=o().createContext(void 0),s=o().createContext(!1);function a(e){return e&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=i),window.ReactQueryClientContext):i}var u=function(){var e=o().useContext(a(o().useContext(s)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},c=function(e){var t=e.client,n=e.contextSharing,r=void 0!==n&&n,i=e.children;o().useEffect((function(){return t.mount(),function(){t.unmount()}}),[t]);var u=a(r);return o().createElement(s.Provider,{value:r},o().createElement(u.Provider,{value:t},i))}},960:(e,t,n)=>{"use strict";n.d(t,{QueryClientProvider:()=>u.H,useMutation:()=>c.n,useQuery:()=>l.I,useQueryClient:()=>u.j});var r=n(428),o=n(795),i=n.n(o)().unstable_batchedUpdates;r.j.setBatchNotifyFunction(i);var s=n(690),a=console;(0,s.B)(a);var u=n(360),c=n(990),l=n(584)},990:(e,t,n)=>{"use strict";n.d(t,{n:()=>h});var r=n(168),o=n(609),i=n.n(o),s=n(428),a=n(941),u=n(540),c=n(465),l=function(e){function t(t,n){var r;return(r=e.call(this)||this).client=t,r.setOptions(n),r.bindMethods(),r.updateResult(),r}(0,u.A)(t,e);var n=t.prototype;return n.bindMethods=function(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)},n.setOptions=function(e){this.options=this.client.defaultMutationOptions(e)},n.onUnsubscribe=function(){var e;this.listeners.length||null==(e=this.currentMutation)||e.removeObserver(this)},n.onMutationUpdate=function(e){this.updateResult();var t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)},n.getCurrentResult=function(){return this.currentResult},n.reset=function(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})},n.mutate=function(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,(0,r.A)({},this.options,{variables:void 0!==e?e:this.options.variables})),this.currentMutation.addObserver(this),this.currentMutation.execute()},n.updateResult=function(){var e=this.currentMutation?this.currentMutation.state:(0,c.$)(),t=(0,r.A)({},e,{isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset});this.currentResult=t},n.notify=function(e){var t=this;s.j.batch((function(){t.mutateOptions&&(e.onSuccess?(null==t.mutateOptions.onSuccess||t.mutateOptions.onSuccess(t.currentResult.data,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(t.currentResult.data,null,t.currentResult.variables,t.currentResult.context)):e.onError&&(null==t.mutateOptions.onError||t.mutateOptions.onError(t.currentResult.error,t.currentResult.variables,t.currentResult.context),null==t.mutateOptions.onSettled||t.mutateOptions.onSettled(void 0,t.currentResult.error,t.currentResult.variables,t.currentResult.context))),e.listeners&&t.listeners.forEach((function(e){e(t.currentResult)}))}))},t}(n(287).Q),f=n(360),d=n(439);function h(e,t,n){var o=i().useRef(!1),u=i().useState(0)[1],c=(0,a.GR)(e,t,n),h=(0,f.j)(),p=i().useRef();p.current?p.current.setOptions(c):p.current=new l(h,c);var m=p.current.getCurrentResult();i().useEffect((function(){o.current=!0;var e=p.current.subscribe(s.j.batchCalls((function(){o.current&&u((function(e){return e+1}))})));return function(){o.current=!1,e()}}),[]);var v=i().useCallback((function(e,t){p.current.mutate(e,t).catch(a.lQ)}),[]);if(m.error&&(0,d.G)(void 0,p.current.options.useErrorBoundary,[m.error]))throw m.error;return(0,r.A)({},m,{mutate:v,mutateAsync:m.mutate})}},584:(e,t,n)=>{"use strict";n.d(t,{I:()=>C});var r=n(168),o=n(540),i=n(941),s=n(428),a=n(289),u=n(287),c=n(690),l=n(281),f=function(e){function t(t,n){var r;return(r=e.call(this)||this).client=t,r.options=n,r.trackedProps=[],r.selectError=null,r.bindMethods(),r.setOptions(n),r}(0,o.A)(t,e);var n=t.prototype;return n.bindMethods=function(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)},n.onSubscribe=function(){1===this.listeners.length&&(this.currentQuery.addObserver(this),d(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},n.onUnsubscribe=function(){this.listeners.length||this.destroy()},n.shouldFetchOnReconnect=function(){return h(this.currentQuery,this.options,this.options.refetchOnReconnect)},n.shouldFetchOnWindowFocus=function(){return h(this.currentQuery,this.options,this.options.refetchOnWindowFocus)},n.destroy=function(){this.listeners=[],this.clearTimers(),this.currentQuery.removeObserver(this)},n.setOptions=function(e,t){var n=this.options,r=this.currentQuery;if(this.options=this.client.defaultQueryObserverOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled)throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();var o=this.hasListeners();o&&p(this.currentQuery,r,this.options,n)&&this.executeFetch(),this.updateResult(t),!o||this.currentQuery===r&&this.options.enabled===n.enabled&&this.options.staleTime===n.staleTime||this.updateStaleTimeout();var i=this.computeRefetchInterval();!o||this.currentQuery===r&&this.options.enabled===n.enabled&&i===this.currentRefetchInterval||this.updateRefetchInterval(i)},n.getOptimisticResult=function(e){var t=this.client.defaultQueryObserverOptions(e),n=this.client.getQueryCache().build(this.client,t);return this.createResult(n,t)},n.getCurrentResult=function(){return this.currentResult},n.trackResult=function(e,t){var n=this,r={},o=function(e){n.trackedProps.includes(e)||n.trackedProps.push(e)};return Object.keys(e).forEach((function(t){Object.defineProperty(r,t,{configurable:!1,enumerable:!0,get:function(){return o(t),e[t]}})})),(t.useErrorBoundary||t.suspense)&&o("error"),r},n.getNextResult=function(e){var t=this;return new Promise((function(n,r){var o=t.subscribe((function(t){t.isFetching||(o(),t.isError&&(null==e?void 0:e.throwOnError)?r(t.error):n(t))}))}))},n.getCurrentQuery=function(){return this.currentQuery},n.remove=function(){this.client.getQueryCache().remove(this.currentQuery)},n.refetch=function(e){return this.fetch((0,r.A)({},e,{meta:{refetchPage:null==e?void 0:e.refetchPage}}))},n.fetchOptimistic=function(e){var t=this,n=this.client.defaultQueryObserverOptions(e),r=this.client.getQueryCache().build(this.client,n);return r.fetch().then((function(){return t.createResult(r,n)}))},n.fetch=function(e){var t=this;return this.executeFetch(e).then((function(){return t.updateResult(),t.currentResult}))},n.executeFetch=function(e){this.updateQuery();var t=this.currentQuery.fetch(this.options,e);return(null==e?void 0:e.throwOnError)||(t=t.catch(i.lQ)),t},n.updateStaleTimeout=function(){var e=this;if(this.clearStaleTimeout(),!i.S$&&!this.currentResult.isStale&&(0,i.gn)(this.options.staleTime)){var t=(0,i.j3)(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout((function(){e.currentResult.isStale||e.updateResult()}),t)}},n.computeRefetchInterval=function(){var e;return"function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(e=this.options.refetchInterval)&&e},n.updateRefetchInterval=function(e){var t=this;this.clearRefetchInterval(),this.currentRefetchInterval=e,!i.S$&&!1!==this.options.enabled&&(0,i.gn)(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval((function(){(t.options.refetchIntervalInBackground||a.m.isFocused())&&t.executeFetch()}),this.currentRefetchInterval))},n.updateTimers=function(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())},n.clearTimers=function(){this.clearStaleTimeout(),this.clearRefetchInterval()},n.clearStaleTimeout=function(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)},n.clearRefetchInterval=function(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)},n.createResult=function(e,t){var n,r=this.currentQuery,o=this.options,s=this.currentResult,a=this.currentResultState,u=this.currentResultOptions,l=e!==r,f=l?e.state:this.currentQueryInitialState,h=l?this.currentResult:this.previousQueryResult,v=e.state,y=v.dataUpdatedAt,g=v.error,b=v.errorUpdatedAt,E=v.isFetching,w=v.status,O=!1,C=!1;if(t.optimisticResults){var S=this.hasListeners(),T=!S&&d(e,t),A=S&&p(e,r,t,o);(T||A)&&(E=!0,y||(w="loading"))}if(t.keepPreviousData&&!v.dataUpdateCount&&(null==h?void 0:h.isSuccess)&&"error"!==w)n=h.data,y=h.dataUpdatedAt,w=h.status,O=!0;else if(t.select&&void 0!==v.data)if(s&&v.data===(null==a?void 0:a.data)&&t.select===this.selectFn)n=this.selectResult;else try{this.selectFn=t.select,n=t.select(v.data),!1!==t.structuralSharing&&(n=(0,i.BH)(null==s?void 0:s.data,n)),this.selectResult=n,this.selectError=null}catch(e){(0,c.t)().error(e),this.selectError=e}else n=v.data;if(void 0!==t.placeholderData&&void 0===n&&("loading"===w||"idle"===w)){var R;if((null==s?void 0:s.isPlaceholderData)&&t.placeholderData===(null==u?void 0:u.placeholderData))R=s.data;else if(R="function"==typeof t.placeholderData?t.placeholderData():t.placeholderData,t.select&&void 0!==R)try{R=t.select(R),!1!==t.structuralSharing&&(R=(0,i.BH)(null==s?void 0:s.data,R)),this.selectError=null}catch(e){(0,c.t)().error(e),this.selectError=e}void 0!==R&&(w="success",n=R,C=!0)}return this.selectError&&(g=this.selectError,n=this.selectResult,b=Date.now(),w="error"),{status:w,isLoading:"loading"===w,isSuccess:"success"===w,isError:"error"===w,isIdle:"idle"===w,data:n,dataUpdatedAt:y,error:g,errorUpdatedAt:b,failureCount:v.fetchFailureCount,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>f.dataUpdateCount||v.errorUpdateCount>f.errorUpdateCount,isFetching:E,isRefetching:E&&"loading"!==w,isLoadingError:"error"===w&&0===v.dataUpdatedAt,isPlaceholderData:C,isPreviousData:O,isRefetchError:"error"===w&&0!==v.dataUpdatedAt,isStale:m(e,t),refetch:this.refetch,remove:this.remove}},n.shouldNotifyListeners=function(e,t){if(!t)return!0;var n=this.options,r=n.notifyOnChangeProps,o=n.notifyOnChangePropsExclusions;if(!r&&!o)return!0;if("tracked"===r&&!this.trackedProps.length)return!0;var i="tracked"===r?this.trackedProps:r;return Object.keys(e).some((function(n){var r=n,s=e[r]!==t[r],a=null==i?void 0:i.some((function(e){return e===n})),u=null==o?void 0:o.some((function(e){return e===n}));return s&&!u&&(!i||a)}))},n.updateResult=function(e){var t=this.currentResult;if(this.currentResult=this.createResult(this.currentQuery,this.options),this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,!(0,i.f8)(this.currentResult,t)){var n={cache:!0};!1!==(null==e?void 0:e.listeners)&&this.shouldNotifyListeners(this.currentResult,t)&&(n.listeners=!0),this.notify((0,r.A)({},n,e))}},n.updateQuery=function(){var e=this.client.getQueryCache().build(this.client,this.options);if(e!==this.currentQuery){var t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}},n.onQueryUpdate=function(e){var t={};"success"===e.type?t.onSuccess=!0:"error"!==e.type||(0,l.wm)(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()},n.notify=function(e){var t=this;s.j.batch((function(){e.onSuccess?(null==t.options.onSuccess||t.options.onSuccess(t.currentResult.data),null==t.options.onSettled||t.options.onSettled(t.currentResult.data,null)):e.onError&&(null==t.options.onError||t.options.onError(t.currentResult.error),null==t.options.onSettled||t.options.onSettled(void 0,t.currentResult.error)),e.listeners&&t.listeners.forEach((function(e){e(t.currentResult)})),e.cache&&t.client.getQueryCache().notify({query:t.currentQuery,type:"observerResultsUpdated"})}))},t}(u.Q);function d(e,t){return function(e,t){return!(!1===t.enabled||e.state.dataUpdatedAt||"error"===e.state.status&&!1===t.retryOnMount)}(e,t)||e.state.dataUpdatedAt>0&&h(e,t,t.refetchOnMount)}function h(e,t,n){if(!1!==t.enabled){var r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&m(e,t)}return!1}function p(e,t,n,r){return!1!==n.enabled&&(e!==t||!1===r.enabled)&&(!n.suspense||"error"!==e.state.status)&&m(e,n)}function m(e,t){return e.isStaleByTime(t.staleTime)}var v=n(609),y=n.n(v);var g,b=y().createContext((g=!1,{clearReset:function(){g=!1},reset:function(){g=!0},isReset:function(){return g}})),E=function(){return y().useContext(b)},w=n(360),O=n(439);function C(e,t,n){return function(e,t){var n=y().useRef(!1),r=y().useState(0)[1],o=(0,w.j)(),i=E(),a=o.defaultQueryObserverOptions(e);a.optimisticResults=!0,a.onError&&(a.onError=s.j.batchCalls(a.onError)),a.onSuccess&&(a.onSuccess=s.j.batchCalls(a.onSuccess)),a.onSettled&&(a.onSettled=s.j.batchCalls(a.onSettled)),a.suspense&&("number"!=typeof a.staleTime&&(a.staleTime=1e3),0===a.cacheTime&&(a.cacheTime=1)),(a.suspense||a.useErrorBoundary)&&(i.isReset()||(a.retryOnMount=!1));var u=y().useState((function(){return new t(o,a)}))[0],c=u.getOptimisticResult(a);if(y().useEffect((function(){n.current=!0,i.clearReset();var e=u.subscribe(s.j.batchCalls((function(){n.current&&r((function(e){return e+1}))})));return u.updateResult(),function(){n.current=!1,e()}}),[i,u]),y().useEffect((function(){u.setOptions(a,{listeners:!1})}),[a,u]),a.suspense&&c.isLoading)throw u.fetchOptimistic(a).then((function(e){var t=e.data;null==a.onSuccess||a.onSuccess(t),null==a.onSettled||a.onSettled(t,null)})).catch((function(e){i.clearReset(),null==a.onError||a.onError(e),null==a.onSettled||a.onSettled(void 0,e)}));if(c.isError&&!i.isReset()&&!c.isFetching&&(0,O.G)(a.suspense,a.useErrorBoundary,[c.error,u.getCurrentQuery()]))throw c.error;return"tracked"===a.notifyOnChangeProps&&(c=u.trackResult(c,a)),c}((0,i.vh)(e,t,n),f)}},439:(e,t,n)=>{"use strict";function r(e,t,n){return"function"==typeof t?t.apply(void 0,n):"boolean"==typeof t?t:!!e}n.d(t,{G:()=>r})},609:e=>{"use strict";e.exports=window.React},795:e=>{"use strict";e.exports=window.ReactDOM},168:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{A:()=>r})},540:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,{A:()=>o})}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.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.r(e),n.d(e,{hasBrowserEnv:()=>fe,hasStandardBrowserEnv:()=>de,hasStandardBrowserWebWorkerEnv:()=>pe});var t=n(609),r=n.n(t),o=n(795),i=n.n(o),s=n(942);const a=window.wp.components;function u(e){const n={display:e.display?e.display:"block",maxWidth:e.width?e.width:"350px"};return(0,t.createElement)("div",{style:n},(0,t.createElement)("label",{style:{display:"block",fontSize:"11px",textTransform:"uppercase"}},e.label),(0,t.createElement)("select",{value:e.value,onChange:t=>e.onChange(t.target.value)},e.options.map((e=>(0,t.createElement)("option",{value:e.value},e.label)))))}var c=n(838),l=n.n(c);function f(e){const{innerHTML:n}=e,r=l().sanitize(n).replace("class=","className=");return(0,t.createElement)("div",{dangerouslySetInnerHTML:{__html:r}})}function d(e,t){return function(){return e.apply(t,arguments)}}const{toString:h}=Object.prototype,{getPrototypeOf:p}=Object,m=(v=Object.create(null),e=>{const t=h.call(e);return v[t]||(v[t]=t.slice(8,-1).toLowerCase())});var v;const y=e=>(e=e.toLowerCase(),t=>m(t)===e),g=e=>t=>typeof t===e,{isArray:b}=Array,E=g("undefined"),w=y("ArrayBuffer"),O=g("string"),C=g("function"),S=g("number"),T=e=>null!==e&&"object"==typeof e,A=e=>{if("object"!==m(e))return!1;const t=p(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},R=y("Date"),k=y("File"),N=y("Blob"),x=y("FileList"),_=y("URLSearchParams");function P(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),b(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(r=0;r<i;r++)s=o[r],t.call(null,e[s],s,e)}}function F(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const D="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,L=e=>!E(e)&&e!==D,M=(I="undefined"!=typeof Uint8Array&&p(Uint8Array),e=>I&&e instanceof I);var I;const U=y("HTMLFormElement"),j=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Q=y("RegExp"),q=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};P(n,((n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)})),Object.defineProperties(e,r)},B="abcdefghijklmnopqrstuvwxyz",H="0123456789",z={DIGIT:H,ALPHA:B,ALPHA_DIGIT:B+B.toUpperCase()+H},K=y("AsyncFunction"),G={isArray:b,isArrayBuffer:w,isBuffer:function(e){return null!==e&&!E(e)&&null!==e.constructor&&!E(e.constructor)&&C(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||C(e.append)&&("formdata"===(t=m(e))||"object"===t&&C(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&w(e.buffer),t},isString:O,isNumber:S,isBoolean:e=>!0===e||!1===e,isObject:T,isPlainObject:A,isUndefined:E,isDate:R,isFile:k,isBlob:N,isRegExp:Q,isFunction:C,isStream:e=>T(e)&&C(e.pipe),isURLSearchParams:_,isTypedArray:M,isFileList:x,forEach:P,merge:function e(){const{caseless:t}=L(this)&&this||{},n={},r=(r,o)=>{const i=t&&F(n,o)||o;A(n[i])&&A(r)?n[i]=e(n[i],r):A(r)?n[i]=e({},r):b(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&P(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(P(t,((t,r)=>{n&&C(t)?e[r]=d(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,s;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],r&&!r(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==n&&p(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:m,kindOfTest:y,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(b(e))return e;let t=e.length;if(!S(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:U,hasOwnProperty:j,hasOwnProp:j,reduceDescriptors:q,freezeMethods:e=>{q(e,((t,n)=>{if(C(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];C(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return b(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:F,global:D,isContextDefined:L,ALPHABET:z,generateString:(e=16,t=z.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&C(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(T(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=b(e)?[]:{};return P(e,((e,t)=>{const i=n(e,r+1);!E(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:K,isThenable:e=>e&&(T(e)||C(e))&&C(e.then)&&C(e.catch)};function W(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}G.inherits(W,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:G.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const V=W.prototype,J={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{J[e]={value:e}})),Object.defineProperties(W,J),Object.defineProperty(V,"isAxiosError",{value:!0}),W.from=(e,t,n,r,o,i)=>{const s=Object.create(V);return G.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),W.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};const Y=W;function $(e){return G.isPlainObject(e)||G.isArray(e)}function X(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function Z(e,t,n){return e?e.concat(t).map((function(e,t){return e=X(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const ee=G.toFlatObject(G,{},null,(function(e){return/^is[A-Z]/.test(e)})),te=function(e,t,n){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=G.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!G.isUndefined(t[e])}))).metaTokens,o=n.visitor||c,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&G.isSpecCompliantForm(t);if(!G.isFunction(o))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(G.isDate(e))return e.toISOString();if(!a&&G.isBlob(e))throw new Y("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(e)||G.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(G.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(G.isArray(e)&&function(e){return G.isArray(e)&&!e.some($)}(e)||(G.isFileList(e)||G.endsWith(n,"[]"))&&(a=G.toArray(e)))return n=X(n),a.forEach((function(e,r){!G.isUndefined(e)&&null!==e&&t.append(!0===s?Z([n],r,i):null===s?n:n+"[]",u(e))})),!1;return!!$(e)||(t.append(Z(o,n,i),u(e)),!1)}const l=[],f=Object.assign(ee,{defaultVisitor:c,convertValue:u,isVisitable:$});if(!G.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!G.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),G.forEach(n,(function(n,i){!0===(!(G.isUndefined(n)||null===n)&&o.call(t,n,G.isString(i)?i.trim():i,r,f))&&e(n,r?r.concat(i):[i])})),l.pop()}}(e),t};function ne(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function re(e,t){this._pairs=[],e&&te(e,this,t)}const oe=re.prototype;oe.append=function(e,t){this._pairs.push([e,t])},oe.toString=function(e){const t=e?function(t){return e.call(this,t,ne)}:ne;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const ie=re;function se(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ae(e,t,n){if(!t)return e;const r=n&&n.encode||se,o=n&&n.serialize;let i;if(i=o?o(t,n):G.isURLSearchParams(t)?t.toString():new ie(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const ue=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){G.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},ce={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},le={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ie,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},fe="undefined"!=typeof window&&"undefined"!=typeof document,de=(he="undefined"!=typeof navigator&&navigator.product,fe&&["ReactNative","NativeScript","NS"].indexOf(he)<0);var he;const pe="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,me={...e,...le},ve=function(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=e.length;return i=!i&&G.isArray(r)?r.length:i,a?(G.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s):(r[i]&&G.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&G.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!s)}if(G.isFormData(e)&&G.isFunction(e.entries)){const n={};return G.forEachEntry(e,((e,r)=>{t(function(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null},ye={transitional:ce,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=G.isObject(e);if(o&&G.isHTMLForm(e)&&(e=new FormData(e)),G.isFormData(e))return r?JSON.stringify(ve(e)):e;if(G.isArrayBuffer(e)||G.isBuffer(e)||G.isStream(e)||G.isFile(e)||G.isBlob(e))return e;if(G.isArrayBufferView(e))return e.buffer;if(G.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return te(e,new me.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return me.isNode&&G.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=G.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return te(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(G.isString(e))try{return(0,JSON.parse)(e),G.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ye.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&G.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw Y.from(e,Y.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:me.classes.FormData,Blob:me.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};G.forEach(["delete","get","head","post","put","patch"],(e=>{ye.headers[e]={}}));const ge=ye,be=G.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ee=Symbol("internals");function we(e){return e&&String(e).trim().toLowerCase()}function Oe(e){return!1===e||null==e?e:G.isArray(e)?e.map(Oe):String(e)}function Ce(e,t,n,r,o){return G.isFunction(r)?r.call(this,t,n):(o&&(t=n),G.isString(t)?G.isString(r)?-1!==t.indexOf(r):G.isRegExp(r)?r.test(t):void 0:void 0)}class Se{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=we(t);if(!o)throw new Error("header name must be a non-empty string");const i=G.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Oe(e))}const i=(e,t)=>G.forEach(e,((e,n)=>o(e,n,t)));return G.isPlainObject(e)||e instanceof this.constructor?i(e,t):G.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&be[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=we(e)){const n=G.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(G.isFunction(t))return t.call(this,e,n);if(G.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=we(e)){const n=G.findKey(this,e);return!(!n||void 0===this[n]||t&&!Ce(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=we(e)){const o=G.findKey(n,e);!o||t&&!Ce(0,n[o],o,t)||(delete n[o],r=!0)}}return G.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!Ce(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return G.forEach(this,((r,o)=>{const i=G.findKey(n,o);if(i)return t[i]=Oe(r),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();s!==o&&delete t[o],t[s]=Oe(r),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return G.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&G.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Ee]=this[Ee]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=we(e);t[r]||(function(e,t){const n=G.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return G.isArray(e)?e.forEach(r):r(e),this}}Se.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),G.reduceDescriptors(Se.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),G.freezeMethods(Se);const Te=Se;function Ae(e,t){const n=this||ge,r=t||n,o=Te.from(r.headers);let i=r.data;return G.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Re(e){return!(!e||!e.__CANCEL__)}function ke(e,t,n){Y.call(this,null==e?"canceled":e,Y.ERR_CANCELED,t,n),this.name="CanceledError"}G.inherits(ke,Y,{__CANCEL__:!0});const Ne=ke,xe=me.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const s=[e+"="+encodeURIComponent(t)];G.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),G.isString(r)&&s.push("path="+r),G.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function _e(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Pe=me.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=G.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function Fe(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const u=Date.now(),c=r[s];o||(o=u),n[i]=a,r[i]=u;let l=s,f=0;for(;l!==i;)f+=n[l++],l%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),u-o<t)return;const d=c&&u-c;return d?Math.round(1e3*f/d):void 0}}(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-n,u=r(a);n=i;const c={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:u||void 0,estimated:u&&s&&i<=s?(s-i)/u:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}const De={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=Te.from(e.headers).normalize();let i,s,{responseType:a,withXSRFToken:u}=e;function c(){e.cancelToken&&e.cancelToken.unsubscribe(i),e.signal&&e.signal.removeEventListener("abort",i)}if(G.isFormData(r))if(me.hasStandardBrowserEnv||me.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(s=o.getContentType())){const[e,...t]=s?s.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const f=_e(e.baseURL,e.url);function d(){if(!l)return;const r=Te.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Y("Request failed with status code "+n.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),c()}),(function(e){n(e),c()}),{data:a&&"text"!==a&&"json"!==a?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),ae(f,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(d)},l.onabort=function(){l&&(n(new Y("Request aborted",Y.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new Y("Network Error",Y.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||ce;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new Y(t,r.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,e,l)),l=null},me.hasStandardBrowserEnv&&(u&&G.isFunction(u)&&(u=u(e)),u||!1!==u&&Pe(f))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&xe.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),"setRequestHeader"in l&&G.forEach(o.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),G.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),a&&"json"!==a&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",Fe(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",Fe(e.onUploadProgress)),(e.cancelToken||e.signal)&&(i=t=>{l&&(n(!t||t.type?new Ne(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(i),e.signal&&(e.signal.aborted?i():e.signal.addEventListener("abort",i)));const h=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(f);h&&-1===me.protocols.indexOf(h)?n(new Y("Unsupported protocol "+h+":",Y.ERR_BAD_REQUEST,e)):l.send(r||null)}))}};G.forEach(De,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Le=e=>`- ${e}`,Me=e=>G.isFunction(e)||null===e||!1===e,Ie=e=>{e=G.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){let t;if(n=e[i],r=n,!Me(n)&&(r=De[(t=String(n)).toLowerCase()],void 0===r))throw new Y(`Unknown adapter '${t}'`);if(r)break;o[t||"#"+i]=r}if(!r){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(Le).join("\n"):" "+Le(e[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function Ue(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ne(null,e)}function je(e){return Ue(e),e.headers=Te.from(e.headers),e.data=Ae.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ie(e.adapter||ge.adapter)(e).then((function(t){return Ue(e),t.data=Ae.call(e,e.transformResponse,t),t.headers=Te.from(t.headers),t}),(function(t){return Re(t)||(Ue(e),t&&t.response&&(t.response.data=Ae.call(e,e.transformResponse,t.response),t.response.headers=Te.from(t.response.headers))),Promise.reject(t)}))}const Qe=e=>e instanceof Te?{...e}:e;function qe(e,t){t=t||{};const n={};function r(e,t,n){return G.isPlainObject(e)&&G.isPlainObject(t)?G.merge.call({caseless:n},e,t):G.isPlainObject(t)?G.merge({},t):G.isArray(t)?t.slice():t}function o(e,t,n){return G.isUndefined(t)?G.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function i(e,t){if(!G.isUndefined(t))return r(void 0,t)}function s(e,t){return G.isUndefined(t)?G.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const u={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>o(Qe(e),Qe(t),!0)};return G.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=u[r]||o,s=i(e[r],t[r],r);G.isUndefined(s)&&i!==a||(n[r]=s)})),n}const Be={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Be[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const He={};Be.transitional=function(e,t,n){function r(e,t){return"[Axios v1.6.8] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new Y(r(o," has been removed"+(t?" in "+t:"")),Y.ERR_DEPRECATED);return t&&!He[o]&&(He[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}};const ze={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new Y("option "+i+" must be "+n,Y.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Y("Unknown option "+i,Y.ERR_BAD_OPTION)}},validators:Be},Ke=ze.validators;class Ge{constructor(e){this.defaults=e,this.interceptors={request:new ue,response:new ue}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=qe(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&ze.assertOptions(n,{silentJSONParsing:Ke.transitional(Ke.boolean),forcedJSONParsing:Ke.transitional(Ke.boolean),clarifyTimeoutError:Ke.transitional(Ke.boolean)},!1),null!=r&&(G.isFunction(r)?t.paramsSerializer={serialize:r}:ze.assertOptions(r,{encode:Ke.function,serialize:Ke.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&G.merge(o.common,o[t.method]);o&&G.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Te.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const u=[];let c;this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)}));let l,f=0;if(!a){const e=[je.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,u),l=e.length,c=Promise.resolve(t);f<l;)c=c.then(e[f++],e[f++]);return c}l=s.length;let d=t;for(f=0;f<l;){const e=s[f++],t=s[f++];try{d=e(d)}catch(e){t.call(this,e);break}}try{c=je.call(this,d)}catch(e){return Promise.reject(e)}for(f=0,l=u.length;f<l;)c=c.then(u[f++],u[f++]);return c}getUri(e){return ae(_e((e=qe(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}G.forEach(["delete","get","head","options"],(function(e){Ge.prototype[e]=function(t,n){return this.request(qe(n||{},{method:e,url:t,data:(n||{}).data}))}})),G.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(qe(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Ge.prototype[e]=t(),Ge.prototype[e+"Form"]=t(!0)}));const We=Ge;class Ve{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new Ne(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new Ve((function(t){e=t})),cancel:e}}}const Je=Ve,Ye={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ye).forEach((([e,t])=>{Ye[t]=e}));const $e=Ye,Xe=function e(t){const n=new We(t),r=d(We.prototype.request,n);return G.extend(r,We.prototype,n,{allOwnKeys:!0}),G.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(qe(t,n))},r}(ge);Xe.Axios=We,Xe.CanceledError=Ne,Xe.CancelToken=Je,Xe.isCancel=Re,Xe.VERSION="1.6.8",Xe.toFormData=te,Xe.AxiosError=Y,Xe.Cancel=Xe.CanceledError,Xe.all=function(e){return Promise.all(e)},Xe.spread=function(e){return function(t){return e.apply(null,t)}},Xe.isAxiosError=function(e){return G.isObject(e)&&!0===e.isAxiosError},Xe.mergeConfig=qe,Xe.AxiosHeaders=Te,Xe.formToJSON=e=>ve(G.isHTMLForm(e)?new FormData(e):e),Xe.getAdapter=Ie,Xe.HttpStatusCode=$e,Xe.default=Xe;const Ze=Xe.create({baseURL:"/wp-json/rsvpmaker/v1/",headers:{"Content-type":"application/json","X-WP-Nonce":rsvpmaker_rest.nonce},validateStatus:function(e){return e<400}});function et(e){const{type:n}=e;return(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-arrow-up-circle",viewBox:"0 0 16 16"},(0,t.createElement)("title",null,"Move Up ",n),(0,t.createElement)("path",{"fill-rule":"evenodd",d:"M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-7.5 3.5a.5.5 0 0 1-1 0V5.707L5.354 7.854a.5.5 0 1 1-.708-.708l3-3a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1-.708.708L8.5 5.707V11.5z"}))}function tt(e){const{type:n}=e;return(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-arrow-down-circle",viewBox:"0 0 16 16"},(0,t.createElement)("title",null,"Move Down ",n),(0,t.createElement)("path",{"fill-rule":"evenodd",d:"M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v5.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V4.5z"}))}function nt(e){const{type:n}=e;return(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-trash",viewBox:"0 0 16 16"},(0,t.createElement)("title",null,"Delete ",n),(0,t.createElement)("path",{d:"M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z"}),(0,t.createElement)("path",{"fill-rule":"evenodd",d:"M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z"}))}function rt(e){const[n,r]=(0,t.useState)(e.form_id),[o,i]=(0,t.useState)("rsvpmaker/formfield"),[c,l]=(0,t.useState)(""),[d,h]=(0,t.useState)(""),[p,m]=(0,t.useState)(!1),[v,y]=(0,t.useState)(""),{isSaving:g,saveEffect:b,SaveControls:E,makeNotification:w}=function(){const[e,n]=(0,t.useState)(!1),[r,o]=(0,t.useState)(null),[i,a]=(0,t.useState)(null);function u(){n(!0),setTimeout((()=>{n(!1)}),500)}return{SaveControls:function(e){const{changes:n,setChanges:r}=e;console.log("changes SaveControls",n);const{mutate:o}=function(e,t){const n=(0,s.useQueryClient)();return(0,s.useMutation)((async function(e){return await Ze.post("rsvp_options",e)}),{onMutate:async e=>{console.log("optimistic update option",e),await n.cancelQueries(["rsvp_options"]);const t=n.getQueryData(["rsvp_options"]);return n.setQueryData(["rsvp_options"],(t=>{const{data:n}=t;e.forEach((e=>{"rsvp_options"==e.type&&(n.rsvp_options[e.key]=e.value)}));const r={...t,data:n};return console.log("newdata optimistic update",r),r})),console.log("updating options"),{previousValue:t}},onSettled:(e,t,r,o)=>{n.invalidateQueries(["rsvp_options"])},onSuccess:(t,n,r,o)=>{console.log("updated"),e([])},onError:(e,t,r)=>{console.log("update options error",e),n.setQueryData("rsvp_options",r.previousValue)}})}(r);return(0,t.createElement)("div",{id:"savecontrols"},i&&(0,t.createElement)("div",{className:"rsvp-notification rsvp-notification-success"},i.message),(0,t.createElement)("div",{id:"savebuttonwrapper"},(0,t.createElement)("button",{onClick:()=>{console.log("save changeset",n),u(),o(n)}},"Save")))},notification:i,setNotification:a,isSaving:e,saveEffect:u,makeNotification:function(e=""){if(""==e)return i;r&&clearTimeout(r),a({message:e});let t=setTimeout((()=>{a(null)}),5e3);o(t)}}}(),{changes:O,addChange:C,setChanges:S}=e;wp?.data?.select("core/editor")?.getCurrentPostId(),console.log("Forms props",e),console.log("Forms formId",n);const{data:T,isLoading:A,isError:R}=(0,s.useQuery)(["rsvp_form",n],(function(){return Ze.get("rsvp_form?form_id="+n+"&post_id="+wp?.data?.select("core/editor")?.getCurrentPostId())}),{enabled:!0,retry:2,onSuccess:(e,t,o,i)=>{n||r(e.data.form_id),console.log("rsvp forms query",e)},onError:(e,t,n)=>{console.log("error retrieving rsvp forms",e)},refetchInterval:!1});if(R)return(0,t.createElement)("p",null,"Error loading form options");const k=(0,s.useQueryClient)(),{mutate:N}=(0,s.useMutation)((async function(t){return await Ze.post("rsvp_form?form_id="+n+"&post_id="+wp?.data?.select("core/editor")?.getCurrentPostId(),{form:t,newForm:v,event_id:e.event_id?e.event_id:0})}),{onMutate:async e=>{const t=k.getQueryData(["rsvp_form",n]);return console.log("optimistic update form",e),await k.cancelQueries(["rsvp_form",n]),k.setQueryData(["rsvp_form",n],(t=>{const{data:n}=t;n.form=e;const r={...t,data:n};return console.log("newdata optimistic form update",r),r})),console.log("updating options"),{previousValue:t}},onSettled:(e,t,r,o)=>{k.invalidateQueries(["rsvp_form",n])},onSuccess:(e,t,n,o)=>{console.log("updated"),r(e.data.form_id)},onError:(e,t,r)=>{console.log("update options error",e),k.setQueryData(["rsvp_form",n],r.previousValue)}});if(A)return(0,t.createElement)("p",null,"Loading ...");const x=T.data.form.filter((e=>e.blockName)),_=T.data.form_options,P=T.data.form_id;let F=x.length-1;const D=[];for(let e=0;e<F;e++){let t=x[e];if(t?.attrs.guestform?D.push(e):console.log("guestfields attr not found",e),["rsvpmaker/formnote","rsvpmaker/guests"].includes(t.blockName)){F=e-1;break}}const L=[{label:"Choose Field Type",value:""},{label:"Text Field",value:"rsvpmaker/formfield"},{label:"Text Area",value:"rsvpmaker/formtextarea"},{label:"Select",value:"rsvpmaker/formselect"},{label:"Radio Buttons",value:"rsvpmaker/formradio"},{label:"Add to Email List Checkbox",value:"rsvpmaker/formchimp"}];let M=!1,I=!1;for(let e=0;e<x.length;e++){let t=x[e];console.log("check for end fields",t),"rsvpmaker/guests"==t.blockName&&(M=!0,console.log("check for end fields found guests")),"rsvpmaker/formnote"==t.blockName&&(I=!0,console.log("check for end fields found note"))}function U(e){const[n,r]=(0,t.useState)(!1),{blockindex:o}=e;return(0,t.createElement)(t.Fragment,null,!n&&(0,t.createElement)("button",{className:"blockmove deletebutton",onClick:()=>{r(!0)}},(0,t.createElement)(nt,null)," Delete")," ",n&&(0,t.createElement)("button",{className:"blockmove",onClick:()=>{j(o,"delete")}},(0,t.createElement)(nt,null)," Confirm Delete")," ")}function j(e,t){const n=[],r=x[e];let o="delete"==t;x.forEach(((i,s)=>{null==i.blockName||s==e||("up"==t&&s==e-1&&(n.push(r),o=!0),"down"==t&&s==e+2&&(n.push(r),o=!0),n.push(i))})),o||n.push(r),console.log("newform",n),N(n)}function Q(e,t,n){const r=[...x];r[e].attrs[t]=n,N(r)}function q(e){const{blockindex:n,setFormItemAttr:r}=e,[o,i]=(0,t.useState)(e.attrs.choicearray),[s,u]=(0,t.useState)(e.attrs.required),[c,l]=(0,t.useState)(e.attrs.label),[f,d]=(0,t.useState)(e.attrs.guestform),[h,p]=(0,t.useState)(e.attrs.defaultToFirst);return(0,t.createElement)("div",{className:"formAtts"},["rsvpmaker/formfield","rsvpmaker/formselect","rsvpmaker/formradio","rsvpmaker/formtextarea"].includes(e.blockName)&&(0,t.createElement)("p",null,(0,t.createElement)("label",null,"Field Label")," ",(0,t.createElement)("input",{type:"text",value:c,onChange:e=>{l(e.target.value)},onBlur:()=>{r(n,"label",c)}})),o&&(0,t.createElement)("p",null,"Choices",(0,t.createElement)("br",null),(0,t.createElement)("textarea",{value:o.join("\n"),onChange:e=>{let t=e.target.value.split("\n");i(t),r(n,"choicearray",t)},onBlur:()=>{r(n,"choicearray",o)}}),(0,t.createElement)("br",null),(0,t.createElement)("em",null,"Enter one choice per line")),["rsvpmaker/formfield","rsvpmaker/formselect","rsvpmaker/formradio","rsvpmaker/formtextarea"].includes(e.blockName)&&"email"!=e.attrs.slug&&(0,t.createElement)(a.ToggleControl,{label:"Required",checked:"required"==s,onChange:()=>{let e="required"==s?"":"required";u(e),r(n,"required",e)}}),"email"==e.attrs.slug&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Email is always required")),["rsvpmaker/formfield","rsvpmaker/formselect","rsvpmaker/formradio","rsvpmaker/formtextarea"].includes(e.blockName)&&(0,t.createElement)(a.ToggleControl,{label:"Include on Guest Form",checked:f,onChange:()=>{let e=!f;d(e),r(n,"guestform",e)}}),["rsvpmaker/formradio"].includes(e.blockName)&&(0,t.createElement)(a.ToggleControl,{label:"Default to First Item",checked:h,onChange:()=>{let e=!h;p(e),r(n,"defaultToFirst",e)}}))}function B(){console.log("guestfields",D);const[e,n]=(0,t.useState)(!1);return e?(0,t.createElement)("div",null,(0,t.createElement)("p",null,"Guest 1"),D.map((e=>{const n=x[e];console.log("guestfields forEach",n);let r=[];return n?.attrs.choicearray&&(r=n.attrs.choicearray.map((e=>({label:e,value:e})))),(0,t.createElement)("div",{className:"formAtts"},"rsvpmaker/formfield"==n.blockName&&(0,t.createElement)(a.TextControl,{label:n.attrs.label}),"rsvpmaker/formtextarea"==n.blockName&&(0,t.createElement)(a.TextareaControl,{label:n.attrs.label}),"rsvpmaker/formselect"==n.blockName&&(0,t.createElement)(u,{label:n.attrs.label,options:r}),"rsvpmaker/formradio"==n.blockName&&(0,t.createElement)(a.RadioControl,{label:n.attrs.label,options:r}))}))):(0,t.createElement)("p",null,(0,t.createElement)("a",{onClick:()=>{n(!0)}},"+ Add Guests"))}M||L.push({label:"Guest Fields",value:"rsvpmaker/guests"}),I||L.push({label:"Note Field",value:"rsvpmaker/formnote"});let H="",z=!0;return(0,t.createElement)("div",{className:"rsvptab"},T.data.is_default&&(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"Default Form Selected"),(0,t.createElement)("p",null,"Changes you make below will apply to all events that use the default form. Switch to a custom form to make customizations for this event only. Forms can also be customized from an event template.")),T.data.is_inherited&&(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"Form Is Inherited"),(0,t.createElement)("p",null,"This form is inherited from a template or another document. Changes you make below will apply to all events that use the same form. Switch to a custom form to make customizations for this event only. Forms can also be customized from an event template.")),(0,t.createElement)(a.ToggleControl,{label:"Show Form Preview",checked:p,onChange:()=>{m(!p)}}),p&&x.map(((e,n)=>{z=e.blockName.indexOf("rsvpmaker")>-1;let r=[];if(e?.attrs.choicearray&&(r=e.attrs.choicearray.map((e=>({label:e,value:e})))),null!=e.blockName)return(0,t.createElement)("div",null,"rsvpmaker/formfield"==e.blockName&&(0,t.createElement)(a.TextControl,{label:e.attrs.label}),"rsvpmaker/formtextarea"==e.blockName&&(0,t.createElement)(a.TextareaControl,{label:e.attrs.label}),"rsvpmaker/formselect"==e.blockName&&(0,t.createElement)(u,{label:e.attrs.label,options:r}),"rsvpmaker/formradio"==e.blockName&&(0,t.createElement)(a.RadioControl,{label:e.attrs.label,options:r}),"rsvpmaker/guests"==e.blockName&&(0,t.createElement)(B,null),"rsvpmaker/formchimp"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("input",{type:"checkbox"})," Add me to your email list"),!z&&e.innerHTML&&(0,t.createElement)(f,{innerHTML:e.innerHTML}))})),(0,t.createElement)("h4",null,"Form Editing Controls"),x.map(((e,r)=>{if(H=e.blockName.replace(/^[^/]+\//,""),z=e.blockName.indexOf("rsvpmaker")>-1,"formchimp"==H?H="Add to Email List Checkbox":"formnote"==H&&(H="Note"),null!=e.blockName)return(0,t.createElement)("div",{className:"formblock"},(0,t.createElement)("div",{class:"blockheader"},(0,t.createElement)("div",{className:"reorganize-drag"},(0,t.createElement)("div",{className:"titleline"},(0,t.createElement)("h2",null,H," ",e.attrs.label&&(0,t.createElement)("span",{className:"fieldlabel"},e.attrs.label))," ",!["rsvpmaker/formnote","rsvpmaker/guests"].includes(e.blockName)&&r>0&&(0,t.createElement)("button",{className:"blockmove",onClick:()=>{j(r,"up")}},(0,t.createElement)(et,null))," ",!["rsvpmaker/formnote","rsvpmaker/guests"].includes(e.blockName)&&r!=F&&(0,t.createElement)("button",{className:"blockmove",onClick:()=>{j(r,"down")}},(0,t.createElement)(tt,null))," ",(0,t.createElement)(U,{blockindex:r})," "),"rsvpmaker/guests"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Gathers information about guests.")),"rsvpmaker/formnote"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"A free text entry note at the bottom of the form.")),"rsvpmaker/formchimp"==e.blockName&&(0,t.createElement)("p",null,(0,t.createElement)("em",null,"Displays an Add to Email List checkbox on the form")),!z&&e.innerHTML&&(0,t.createElement)("div",null,(0,t.createElement)(f,{innerHTML:e.innerHTML})," ",(0,t.createElement)("br",null),(0,t.createElement)("em",null,(0,t.createElement)("a",{href:"/wp-admin/post.php?action=edit&post="+n},"Open in the WordPress editor"))),(0,t.createElement)(q,{attrs:e.attrs,blockName:e.blockName,blockindex:r,setFormItemAttr:Q}))))})),(0,t.createElement)("p",null,"Add a form field ",(0,t.createElement)(u,{label:"Type",options:L,value:o,onChange:e=>{i(e)}})," ",!["rsvpmaker/formnote","rsvpmaker/guests","rsvpmaker/formchimp"].includes(o)&&(0,t.createElement)(a.TextControl,{label:"Field Label",value:c,onChange:e=>{l(e)}})," "),["rsvpmaker/formselect","rsvpmaker/formradio"].includes(o)&&(0,t.createElement)("p",null,(0,t.createElement)("label",null,"Choices"),(0,t.createElement)("br",null),(0,t.createElement)("textarea",{value:d,onChange:e=>{h(e.target.value)}}),(0,t.createElement)("br",null),(0,t.createElement)("em",null,"Enter one choice per line")),(0,t.createElement)("p",null,(0,t.createElement)("button",{onClick:function(){if(!o)return;let e;if(console.log(o),console.log(c),"rsvpmaker/formnote"==o)e={blockName:"rsvpmaker/formnote",attrs:[],innerBlocks:[],innerHTML:"",innerContent:[]};else if("rsvpmaker/guests"==o)e={blockName:"rsvpmaker/guests",attrs:[],innerBlocks:[{blockName:"core/paragraph",attrs:[],innerBlocks:[],innerHTML:"\n<p></p>\n",innerContent:["\n<p></p>\n"]}],innerHTML:'\n<div class="wp-block-rsvpmaker-guests"></div>\n',innerContent:['\n<div class="wp-block-rsvpmaker-guests">',null,"</div>\n"]};else{if(!c)return void alert("a field label is required");let t=c.toLowerCase().replace(/[^a-z0-9]/,"_");"first_name"==t&&(t="first"),"last_name"==t&&(t="last"),e={blockName:o,innerHTML:"",innerBlocks:[],innerContent:[],attrs:{label:c,slug:t}}}d&&(e.attrs.choicearray=d.split("\n")),console.log("newfield",e);const t=[];x.forEach(((n,r)=>{t.push(n),r==F&&t.push(e)})),N(t),i("rsvpmaker/formfield"),l(""),h("")}},"Add")),(0,t.createElement)("p",null,"You can also open this form ",(0,t.createElement)("a",{href:"/wp-admin/post.php?action=edit&post="+n},"in the WordPress editor"),"."),!e.single_form&&(0,t.createElement)(u,{label:"Switch Form",value:P,options:_,onChange:r}),T.data.copied&&(0,t.createElement)("p",null,"Copied ",(0,t.createElement)("strong",null,T.data.copied)),!e.single_form&&(0,t.createElement)("div",null,(0,t.createElement)("h3",null,"Save as Reusable Form"),(0,t.createElement)(a.TextControl,{label:"Form Title",value:v,onChange:y}),(0,t.createElement)("p",null,"You can save the form so it can also be used with other events."),(0,t.createElement)("p",null,(0,t.createElement)("button",{onClick:e=>{e.preventDefault(),N(x),y("")}},"Create Form"))))}const ot=new s.QueryClient;window.addEventListener("load",(function(e){const n=document.getElementById("rsvpmaker-single-form"),o=n.getAttribute("form_id");i().render((0,t.createElement)(r().StrictMode,null,(0,t.createElement)(s.QueryClientProvider,{client:ot},(0,t.createElement)(rt,{form_id:o,single_form:!0}))),n)}))})()})(); -
rsvpmaker/tags/11.1.5/admin/src/Forms.js
r3104244 r3110769 204 204 const [label,setLabel] = useState(props.attrs.label); 205 205 const [guestform,setGuestform] = useState(props.attrs.guestform); 206 const [defaultToFirst,setDefaultToFirst] = useState(props.attrs.defaultToFirst); 206 207 return ( 207 208 <div className="formAtts"> … … 211 212 {(props.attrs.slug == 'email') && <p><em>Email is always required</em></p>} 212 213 {['rsvpmaker/formfield','rsvpmaker/formselect','rsvpmaker/formradio','rsvpmaker/formtextarea'].includes(props.blockName) && <ToggleControl label="Include on Guest Form" checked={guestform} onChange={() => { let newg = !guestform; setGuestform(newg); setFormItemAttr(blockindex,'guestform',newg); }} />} 214 {['rsvpmaker/formradio'].includes(props.blockName) && <ToggleControl label="Default to First Item" checked={defaultToFirst} onChange={() => { let newg = !defaultToFirst; setDefaultToFirst(newg); setFormItemAttr(blockindex,'defaultToFirst',newg); }} />} 213 215 </div>) 214 216 } -
rsvpmaker/tags/11.1.5/admin/src/editor-sidebar/Pricing.js
r3103285 r3110769 18 18 const [method,setMethod] = useState('percent'); 19 19 const [codeToUpdate,setCodeToUpdate] = useState(-1); 20 //const [itemPrices,setItemPrices] = useState({'meal_choice:Steak':"15",'meal_choice:Chicken':"10"}); 21 const [itemPrices,setItemPrices] = useState(null); 22 const [itemToUpdate,setItemToUpdate] = useState(''); 23 const [itemPriceToUpdate,setItemPriceToUpdate] = useState(0); 20 24 21 25 function fetchPricing() { … … 136 140 const coupon_methods = (isLoading || !pricingdata.coupon_methods) ? [] : pricingdata.coupon_methods; 137 141 const coupon_discounts = (isLoading || !pricingdata.coupon_discounts) ? [] : pricingdata.coupon_discounts; 138 142 const form_fields = (isLoading || !pricingdata.form_fields) ? [] : pricingdata.form_fields; 143 const exclude = ['phone_type']; 144 if(!isLoading && itemPrices != pricingdata.item_prices) 145 setItemPrices(pricingdata.item_prices); 146 const roptions = []; 147 148 form_fields.map( 149 (item, index) => { 150 if(exclude.includes(item.slug)) 151 return; 152 if(!item.choicearray) 153 return; 154 155 item.choicearray.forEach( (choice) => { roptions.push(<p>{item.label+': '+choice} <TextControl value={(itemPrices && itemPrices[item.slug] && itemPrices[item.slug][choice]) ? itemPrices[item.slug][choice] : 0} onChange={(value) => {console.log('new value', value); const change = {...itemPrices}; change[item.slug][choice] = value; mutatePricing({'update':'item_prices','change':change}); }} /></p>); } ); 156 console.log('roptions',roptions); 157 } 158 ) 159 139 160 return <div> 161 <p><a href="https://rsvpmaker.com/knowledge-base/pricing-per-person-and-by-options-like-meal-choice/" target="_blank">Documentation: Pricing Options</a></p> 140 162 <p><MetaSelectControl label="Payment Gateway" metaKey="_payment_gateway" options={rsvpmaker_ajax.payment_gateway_options.map((value) => { return {'label':value,'value':value}})} /></p> 141 163 <p><MetaTextControl label="Currency" metaKey="_rsvp_currency" /></p> … … 155 177 <br /><em>Example: price for a table of 8 at a dinner, rather than a single registration.</em></p> 156 178 <p><button disabled={isLoading} onClick={postPrice}>{(toUpdate > -1) ? 'Update Price' : 'Add Price'}</button> {status}</p> 179 180 {roptions.length && <div><h2>Priced Options</h2><div>{roptions}</div></div>} 157 181 158 182 <h2>Discounts</h2> -
rsvpmaker/tags/11.1.5/rsvpmaker-api-endpoints.php
r3104263 r3110769 2534 2534 update_post_meta($post_id,'pricing',$change); 2535 2535 } 2536 if('item_prices' == $data->update) { 2537 update_post_meta($post_id,'_rsvp_item_prices',$data->change); 2538 } 2536 2539 if('coupon_codes' == $data->update) { 2537 2540 $status .= 'change: '.var_export($data->change, true); … … 2551 2554 //if(sizeof($pricing) && $pricing[0]->price) 2552 2555 $response['pricing'] = $pricing; 2556 $form = get_post(get_post_meta($post_id,'_rsvp_form',true)); 2557 if($form and isset($form->post_content)) 2558 $response['form_fields'] = rsvpmaker_data_from_document($form->post_content); 2559 $response['item_prices'] = rsvpmaker_item_pricing($post_id); 2553 2560 $coupon_codes = get_post_meta( $post_id, '_rsvp_coupon_code' ); 2554 2561 $coupon_methods = get_post_meta( $post_id, '_rsvp_coupon_method' ); -
rsvpmaker/tags/11.1.5/rsvpmaker-display.php
r3106066 r3110769 1695 1695 1696 1696 $log = var_export( $request, true ); 1697 1698 //mail( 'david@carrcommunications.com', 'query test', $log );1699 1697 1700 1698 return $request; … … 2495 2493 2496 2494 if ( isset( $custom_fields['_convert_timezone'][0] ) && $custom_fields['_convert_timezone'][0] ) { 2497 2498 2495 if ( is_email_context() ) { 2499 2500 $tzbutton = sprintf( ' | <a href="%s">%s</a>', esc_url_raw( add_query_arg( 'tz', $post_id, get_permalink( $post_id ) ) ), __( 'Show in my timezone', 'rsvpmaker' ) );2496 $tz_url = esc_url_raw( add_query_arg( 'tz', $post_id, get_permalink( $post_id ) )); 2497 $tzbutton = sprintf( ' | <a href="%s">%s</a>', $tz_url, __( 'Show in my timezone', 'rsvpmaker' ) ); 2501 2498 2502 2499 } else { … … 3060 3057 function rsvpmaker_timezone_converter( $atts ) { 3061 3058 global $post; 3059 $tz_url = add_query_arg( 'tz', $post->ID, get_permalink( $post_id ) ); 3060 3062 3061 $post_id = ( empty( $post->ID ) ) ? 0 : $post->ID; 3063 3062 if ( ! isset( $atts['time'] ) ) { … … 3071 3070 $format = ( isset( $atts['format'] ) ) ? $atts['format'] : ''; 3072 3071 $nofluxbutton = (isset($atts['nofluxbutton'])) ? ' nofluxbutton="1" ' : ''; 3073 return sprintf( '<div class="tz_converter" id="%s" time="%s" end="%s" format="%s" server_timezone="%s" post_id="%d" timezone_abbrev="%s" %s></div>', esc_attr( $id ), esc_attr( $time ), esc_attr( $end ), esc_attr( $format ), esc_attr( $server_timezone ), esc_attr( $post_id ), esc_attr($abbrev), $nofluxbutton );3072 return sprintf( '<div class="tz_converter" id="%s" time="%s" end="%s" format="%s" server_timezone="%s" post_id="%d" timezone_abbrev="%s" tz_url="%s" %s></div>', esc_attr( $id ), esc_attr( $time ), esc_attr( $end ), esc_attr( $format ), esc_attr( $server_timezone ), esc_attr( $post_id ), esc_attr($abbrev), esc_attr($tz_url), $nofluxbutton ); 3074 3073 } 3075 3074 -
rsvpmaker/tags/11.1.5/rsvpmaker-email.php
r3104263 r3110769 1261 1261 if(!empty($recipients)) { 1262 1262 if(rsvpmaker_postmark_is_active()) { 1263 printf('<p>Trying Postmark: %s</p>',$rsvp_options['postmark_mode']);1264 1263 $result = rsvpmaker_postmark_broadcast($recipients,$post_id); 1264 error_log('rsvpmailer_submitted rsvpmaker_postmark_broadcast result '.$result); 1265 1265 add_post_meta($post_id,'rsvprelay_sending',$recipients); 1266 1266 } … … 1707 1707 echo $bigsend_prompt; 1708 1708 } 1709 elseif( $postvars["send_check"]&& empty($_POST['send_confirmed'])) {1709 elseif(!empty($postvars["send_check"]) && empty($_POST['send_confirmed'])) { 1710 1710 //better get confirmation 1711 1711 $bigsend_prompt = '<div style="border: medium solid red; padding: 10px; margin-bottom: 20px;">'; … … 5431 5431 function rsvpmail_latest_post_promo($args = array()) { 5432 5432 global $rsvp_options, $wpdb; 5433 error_log('rsvpmail_latest_post_promo begins '.var_export($args,true)); 5433 5434 if(empty($args['additional_posts'])) $args['additional_posts'] = 4; 5434 5435 if(empty($args['paragraphs'])) $args['paragraphs'] = 5; … … 5472 5473 add_post_meta($featured->ID,'promo_email',$promo_id); 5473 5474 $schedule = ''; 5475 error_log('rsvpmail_latest_posts_promo '.var_export($args,true).' featured->ID '.$featured->ID.' promo id '.$promo_id); 5474 5476 if(!empty($args['promo_type']) && 'auto' == $args['promo_type']) 5475 5477 { … … 5499 5501 $schedule = sprintf('<p><em>Scheduling to send at %s to %s mailing list. Options: <a href="%s">Edit</a> | <a href="%s">cancel</a>.</em></p>',rsvpmaker_date($rsvp_options['short_date'].' '.$rsvp_options['time_format'],$t), $segment, admin_url("post.php?post=$promo_id&action=edit"), add_query_arg($cancel,get_permalink($promo_id)) ); 5500 5502 $html = $schedule.$html; 5503 mail('david@carrcommunications.com','scheduling to run at '.rsvpmaker_date($rsvp_options['time_format'],$t),$html); 5501 5504 } 5502 5505 else … … 5512 5515 //added date check to avoid resending old entries, even if pending_post_promo was not deleted 5513 5516 $promo_id = $wpdb->get_var("SELECT post_id FROM $wpdb->posts JOIN $wpdb->postmeta on $wpdb->posts.ID = $wpdb->postmeta.post_id WHERE meta_key='pending_post_promo' and post_date > DATE_SUB(NOW(), INTERVAL 48 HOUR) ORDER BY post_id DESC "); 5517 $posthash = 'not set'; 5514 5518 if($promo_id) { 5515 5519 $posthash = get_post_meta($promo_id,'rsvpmail_last_hash',true); 5516 5520 rsvpmailer_delayed_send($promo_id,0,$posthash,null,'pending_post_promo'); 5517 5521 } 5522 error_log('rsvpmailer_post_promo_cron promo found id '.$promo_id .' hash '.$posthash); 5518 5523 } 5519 5524 … … 5583 5588 5584 5589 function rsvpmail_latest_posts_notification($new_status, $old_status, $post ) { 5590 error_log('rsvpmail_latest_posts_notification new/old '.$new_status.' / '.$old_status.' '.$post->post_title); 5585 5591 if($new_status != $old_status && 'publish' == $new_status && 'post' == $post->post_type) { 5586 5592 $args = get_option('rsvpmaker_new_post_promos'); -
rsvpmaker/tags/11.1.5/rsvpmaker-form.php
r3104244 r3110769 207 207 $choices = ''; 208 208 209 $pricing = rsvpmaker_item_pricing($post->ID); 210 $currency = ( empty( $rsvp_options['paypal_currency'] ) ) ? 'usd' : strtolower( $rsvp_options['paypal_currency'] ); 211 if ( $currency == 'usd' ) { 212 $currency = '$'; 213 } elseif ( $currency == 'eur' ) { 214 $currency = '€'; 215 } 216 else { 217 $currency = strtoupper($currency).' '; 218 } 219 209 220 if ( isset( $atts['choicearray'] ) && ! empty( $atts['choicearray'] ) && is_array( $atts['choicearray'] ) ) { 210 221 211 222 foreach ( $atts['choicearray'] as $i => $choice ) { 212 223 $is_checked = (isset($atts['defaultToFirst']) && !empty($atts['defaultToFirst']) && 0 == $i) ? ' checked="checked" ' : ''; 213 $choices .= sprintf( '<span class="rsvp-form-radio"><input type="radio" class="%s" name="profile[%s]" id="%s" value="%s" %s/> %s </span>', esc_attr( $slug ), esc_attr( $slug ), esc_attr( $slug ), esc_attr( $choice ), $is_checked, esc_html( $choice ) ); 224 $pricelabel = (!empty($pricing) && !empty($pricing->$slug) && !empty($pricing->$slug->$choice)) ? ' +'.$currency.$pricing->$slug->$choice : ''; 225 $choices .= sprintf( '<span class="rsvp-form-radio"><input type="radio" class="%s" name="profile[%s]" id="%s" value="%s" %s/> %s </span>', esc_attr( $slug ), esc_attr( $slug ), esc_attr( $slug ), esc_attr( $choice ), $is_checked, esc_html( $choice.$pricelabel ) ); 214 226 } 215 227 } … … 676 688 return array('message' => 'Submitted: '.$message); 677 689 } 690 691 function rsvpmaker_item_pricing($post_id) { 692 $form = get_post(get_post_meta($post_id,'_rsvp_form',true)); 693 $exclude = ['phone_type']; 694 $item_prices = get_post_meta($post_id,'_rsvp_item_prices',true); 695 if(!$item_prices) 696 $item_prices = (object) []; 697 //testing 698 //if(!sizeof($item_prices)) 699 //$item_prices->meal_choice->Steak = 15.00; 700 if($form and isset($form->post_content)) { 701 $fields = rsvpmaker_data_from_document($form->post_content); 702 foreach($fields as $field) { 703 if(in_array($field->slug,$exclude)) 704 continue; 705 $slug = $field->slug; 706 if(isset($field->choicearray)) { 707 $slugdata = null; 708 foreach($field->choicearray as $choice) { 709 if(empty($slugdata)) { 710 if(!isset($item_prices->$slug)) 711 $slugdata = array($choice => 0); 712 else 713 $slugdata = (array) $item_prices->$slug; 714 } 715 716 if(!isset($item_prices->$slug->$choice)) { 717 $slugdata[$choice] = 0; 718 } 719 } 720 $item_prices->$slug = (object) $slugdata; 721 } 722 } 723 } 724 return $item_prices; 725 } 726 727 function rsvpmaker_form_field_labels($post_id) { 728 $form = get_post(get_post_meta($post_id,'_rsvp_form',true)); 729 $field_labels = []; 730 if($form and isset($form->post_content)) { 731 $fields = rsvpmaker_data_from_document($form->post_content); 732 foreach($fields as $field) { 733 if(isset($field->slug) && isset($field->label)) 734 $field_labels[$field->slug] = $field->label; 735 } 736 } 737 return $field_labels; 738 } -
rsvpmaker/tags/11.1.5/rsvpmaker-group-email.php
r3074309 r3110769 1133 1133 $recipients = rsvpmail_recipients_by_slug_and_id($slug_and_id); 1134 1134 } 1135 if( $recipients)1135 if(isset($recipients)) 1136 1136 return $recipients; 1137 1137 else -
rsvpmaker/tags/11.1.5/rsvpmaker-plugabble.php
r3104263 r3110769 882 882 $payment_details = ''; 883 883 884 $currency = ( empty( $rsvp_options['paypal_currency'] ) ) ? 'usd' : strtolower( $rsvp_options['paypal_currency'] ); 885 if ( $currency == 'usd' ) { 886 $currency = '$'; 887 } elseif ( $currency == 'eur' ) { 888 $currency = '€'; 889 } 890 else { 891 $currency = strtoupper($currency).' '; 892 } 893 884 894 $rsvp['total'] = 0; 885 895 … … 1119 1129 $cost = $value * $price; 1120 1130 1121 $rsvp['payingfor'] .= " $value $unit @ " . number_format( $price, 2, $rsvp_options['currency_decimal'], $rsvp_options['currency_thousands'] ) . ' ' . $rsvp_options['paypal_currency'];1131 $rsvp['payingfor'] .= " $value $unit @ " .$currency. number_format( $price, 2, $rsvp_options['currency_decimal'], $rsvp_options['currency_thousands'] ) . ' ' . $rsvp_options['paypal_currency']; 1122 1132 1123 1133 $rsvp['total'] += $cost; … … 1206 1216 } 1207 1217 1208 $rsvp['payingfor'] .= "$participants $unit @ " . number_format( $price, 2, $rsvp_options['currency_decimal'], $rsvp_options['currency_thousands'] );1218 $rsvp['payingfor'] .= "$participants $unit @ " .$currency. number_format( $price, 2, $rsvp_options['currency_decimal'], $rsvp_options['currency_thousands'] ); 1209 1219 1210 1220 $rsvp['pricechoice'] = $index; 1211 1221 1212 1222 } 1223 1213 1224 1214 1225 global $current_user; // if logged in … … 1240 1251 } 1241 1252 1242 $nv = array('first'=>$rsvp['first'], 'last'=>$rsvp['last'], 'email'=>$rsvp['email'], 'yesno' => $yesno, 'event'=>$event, 'note' => $note, 'details'=>serialize( $rsvp ), 'participants'=>1, 'user_id'=>$current_user->ID,'amountpaid'=>$paid,'owed'=>$owed,'fee_total'=>$rsvp['total']); 1243 capture_email( $rsvp ); 1244 1245 if ( $rsvp_id ) { 1246 $wpdb->update($wpdb->prefix . 'rsvpmaker',$nv,array('id'=>$rsvp_id)); 1247 $wpdb->show_errors(); 1248 } else { 1249 1250 $count++; 1251 1252 if ( $rsvp_max && ( $count > $rsvp_max ) ) { 1253 1254 $cleanmessage .= '<div style="color:red;">' . __( 'Max RSVP count limit reached, entry not added for:', 'rsvpmaker' ) . "\n" . $rsvp['first'] . ' ' . $rsvp['last'] . '</div>'; 1255 1256 $rsvp_id = 0; 1257 1258 } else { 1259 $wpdb->insert($wpdb->prefix . 'rsvpmaker',$nv); 1260 $rsvp_id = $wpdb->insert_id; 1261 1262 $sql = 'SELECT date FROM ' . $wpdb->prefix . "rsvpmaker_event WHERE event=$event "; 1263 1264 if ( empty( $wpdb->get_var( $sql ) ) ) { 1265 $wpdb->insert($wpdb->prefix . 'rsvpmaker_event',array('event'=>$event, 'post_title'=>$post->post_title, 'date'=> get_rsvp_date( $event ))); 1253 $item_pricing = rsvpmaker_item_pricing($post->ID); 1254 $itemlog = ''; 1255 if(sizeof(((array) $item_pricing))) { 1256 $field_labels = rsvpmaker_form_field_labels($post->ID); 1257 $pricing_vars = get_object_vars($item_pricing); 1258 $item_fees = []; 1259 $item_count = []; 1260 foreach($pricing_vars as $index => $slugv) { 1261 $slugv = (array) $slugv; 1262 if(sizeof($slugv)) 1263 foreach($slugv as $slugindex => $v) { 1264 $item_count[$index.':'.$slugindex] = 0; 1266 1265 } 1267 1266 } 1268 } 1269 1270 if ( ! empty( $rsvp_options['send_payment_reminders'] ) && isset( $price ) && ( $price > 0 ) ) { 1271 rsvpmaker_payment_reminder_cron( $rsvp_id ); 1272 } 1273 if(!is_admin()) 1274 { 1275 setcookie( 'rsvp_for_' . $post->ID, $rsvp_id, time() + 60 * 60 * 24 * 90, '/', sanitize_text_field($_SERVER['SERVER_NAME']) ); 1276 setcookie( 'rsvpmaker', $rsvp_id, time() + 60 * 60 * 24 * 90, '/', sanitize_text_field($_SERVER['SERVER_NAME']) ); 1277 } 1278 if ( isset( $_POST['timeslot'] ) ) { 1279 1280 $participants = (int) $_POST['participants']; 1281 1282 // clear previous response, if any 1283 1284 $wpdb->query( 'DELETE FROM ' . $wpdb->prefix . "rsvp_volunteer_time WHERE rsvp=$rsvp_id" ); 1285 1286 foreach ( $_POST['timeslot'] as $slot ) { 1287 1288 $slot = (int) $slot; 1289 1290 $sql = $wpdb->prepare( 'INSERT INTO ' . $wpdb->prefix . 'rsvp_volunteer_time SET time=%d, event=%d, rsvp=%d, participants=%d', $slot, $post->ID, $rsvp_id, $participants ); 1291 1292 $wpdb->query( $sql ); 1293 1294 } 1295 } 1296 1297 // get start date 1298 1299 $rows = get_rsvp_dates( $event ); 1300 1301 $row = $rows[0]; 1302 1303 $date = rsvpdate_shortcode( array( 'format' => '%b %e' ) ); 1304 1305 foreach ( $rsvp as $name => $value ) { 1306 1307 $label = get_post_meta( $post->ID, 'rsvpform' . $name, true ); 1308 1309 if ( $label ) { 1310 1311 $name = $label; 1312 } 1313 1314 if ( ! empty( $value ) ) { 1315 1316 $cleanmessage .= $name . ': ' . $value . "\n";// labels from rsvp form 1317 } 1318 } 1319 1320 $guestof = (empty($rsvp['first'])) ? '' : $rsvp['first'] . ' '; 1321 $guestof .= (empty($rsvp['last'])) ? '' : $rsvp['last']; 1322 $guestnv = array(); 1267 foreach($rsvp as $rsvpkey => $rsvpvalue) { 1268 $itemlog .= $rsvpkey . ' ' . $rsvpvalue.' '; 1269 if(!empty($item_pricing->$rsvpkey)) 1270 $itemlog .= ' pricing key match for '.$rsvpkey.' '; 1271 if(!empty($item_pricing->$rsvpkey) && !empty($item_pricing->$rsvpkey->$rsvpvalue)) 1272 { 1273 $item_count[$rsvpkey.':'.$rsvpvalue] = (empty($item_count[$rsvpkey.':'.$rsvpvalue])) ? 1 : $item_count[$rsvpkey.':'.$rsvpvalue] + 1; 1274 $item_fees[$rsvpkey.':'.$rsvpvalue] = floatval($item_pricing->$rsvpkey->$rsvpvalue); 1275 $rsvp['total'] += floatval($item_pricing->$rsvpkey->$rsvpvalue); 1276 } 1277 } 1278 } 1323 1279 1324 1280 if ( isset( $_POST['guest'] ) ) { … … 1331 1287 } 1332 1288 } 1289 1290 if ( !empty($gvs) && !empty(sizeof((array) $item_pricing)) ) { 1291 foreach($gvs as $key => $gv) { 1292 foreach($gv as $rsvpkey => $rsvpvalue) { 1293 if(!empty($item_pricing->$rsvpkey) && !empty($item_pricing->$rsvpkey->$rsvpvalue)) 1294 { 1295 $item_count[$rsvpkey.':'.$rsvpvalue] = (empty($item_count[$rsvpkey.':'.$rsvpvalue])) ? 1 : $item_count[$rsvpkey.':'.$rsvpvalue] + 1; 1296 $item_fees[$rsvpkey.':'.$rsvpvalue] = floatval($item_pricing->$rsvpkey->$rsvpvalue); 1297 $price_before = $rsvp['total']; 1298 $rsvp['total'] += floatval($item_pricing->$rsvpkey->$rsvpvalue); 1299 } 1300 } 1301 } 1302 } 1303 if(sizeof($item_count)) { 1304 foreach($item_count as $rsvpkey => $count) { 1305 if($count) { 1306 $parts = explode(':',$rsvpkey); 1307 $label = (empty($field_labels[$parts[0]])) ? $parts[0] : $field_labels[$parts[0]]; 1308 $rsvp['payingfor'] .= ' '.$label.':'.$parts[1]." $count @ ".$currency.$item_fees[$rsvpkey].' '; 1309 } 1310 } 1311 } 1312 1313 $nv = array('first'=>$rsvp['first'], 'last'=>$rsvp['last'], 'email'=>$rsvp['email'], 'yesno' => $yesno, 'event'=>$event, 'note' => $note, 'details'=>serialize( $rsvp ), 'participants'=>1, 'user_id'=>$current_user->ID,'amountpaid'=>$paid,'owed'=>$owed,'fee_total'=>$rsvp['total']); 1314 capture_email( $rsvp ); 1315 1316 if ( $rsvp_id ) { 1317 $wpdb->update($wpdb->prefix . 'rsvpmaker',$nv,array('id'=>$rsvp_id)); 1318 $wpdb->show_errors(); 1319 } else { 1320 1321 $count++; 1322 1323 if ( $rsvp_max && ( $count > $rsvp_max ) ) { 1324 1325 $cleanmessage .= '<div style="color:red;">' . __( 'Max RSVP count limit reached, entry not added for:', 'rsvpmaker' ) . "\n" . $rsvp['first'] . ' ' . $rsvp['last'] . '</div>'; 1326 1327 $rsvp_id = 0; 1328 1329 } else { 1330 $wpdb->insert($wpdb->prefix . 'rsvpmaker',$nv); 1331 $rsvp_id = $wpdb->insert_id; 1332 1333 $sql = 'SELECT date FROM ' . $wpdb->prefix . "rsvpmaker_event WHERE event=$event "; 1334 1335 if ( empty( $wpdb->get_var( $sql ) ) ) { 1336 $wpdb->insert($wpdb->prefix . 'rsvpmaker_event',array('event'=>$event, 'post_title'=>$post->post_title, 'date'=> get_rsvp_date( $event ))); 1337 } 1338 } 1339 } 1340 1341 if ( ! empty( $rsvp_options['send_payment_reminders'] ) && isset( $price ) && ( $price > 0 ) ) { 1342 rsvpmaker_payment_reminder_cron( $rsvp_id ); 1343 } 1344 if(!is_admin()) 1345 { 1346 setcookie( 'rsvp_for_' . $post->ID, $rsvp_id, time() + 60 * 60 * 24 * 90, '/', sanitize_text_field($_SERVER['SERVER_NAME']) ); 1347 setcookie( 'rsvpmaker', $rsvp_id, time() + 60 * 60 * 24 * 90, '/', sanitize_text_field($_SERVER['SERVER_NAME']) ); 1348 } 1349 if ( isset( $_POST['timeslot'] ) ) { 1350 1351 $participants = (int) $_POST['participants']; 1352 1353 // clear previous response, if any 1354 1355 $wpdb->query( 'DELETE FROM ' . $wpdb->prefix . "rsvp_volunteer_time WHERE rsvp=$rsvp_id" ); 1356 1357 foreach ( $_POST['timeslot'] as $slot ) { 1358 1359 $slot = (int) $slot; 1360 1361 $sql = $wpdb->prepare( 'INSERT INTO ' . $wpdb->prefix . 'rsvp_volunteer_time SET time=%d, event=%d, rsvp=%d, participants=%d', $slot, $post->ID, $rsvp_id, $participants ); 1362 1363 $wpdb->query( $sql ); 1364 1365 } 1366 } 1367 1368 // get start date 1369 1370 $rows = get_rsvp_dates( $event ); 1371 1372 $row = $rows[0]; 1373 1374 $date = rsvpdate_shortcode( array( 'format' => '%b %e' ) ); 1375 1376 foreach ( $rsvp as $name => $value ) { 1377 1378 $label = get_post_meta( $post->ID, 'rsvpform' . $name, true ); 1379 1380 if ( $label ) { 1381 1382 $name = $label; 1383 } 1384 1385 if ( ! empty( $value ) ) { 1386 1387 $cleanmessage .= $name . ': ' . $value . "\n";// labels from rsvp form 1388 } 1389 } 1390 1391 $guestof = (empty($rsvp['first'])) ? '' : $rsvp['first'] . ' '; 1392 $guestof .= (empty($rsvp['last'])) ? '' : $rsvp['last']; 1393 $guestnv = array(); 1333 1394 1334 1395 if ( isset( $_POST['guest']['first'] ) ) { … … 1444 1505 } 1445 1506 1507 1446 1508 if($rsvp['total']) { 1447 1509 $url = get_permalink($post->ID); … … 1651 1713 return $content; 1652 1714 } 1715 $currency = ( empty( $rsvp_options['paypal_currency'] ) ) ? 'usd' : strtolower( $rsvp_options['paypal_currency'] ); 1716 if ( $currency == 'usd' ) { 1717 $currency = '$'; 1718 } elseif ( $currency == 'eur' ) { 1719 $currency = '€'; 1720 } 1721 else { 1722 $currency = strtoupper($currency).' '; 1723 } 1653 1724 1654 1725 $rsvpconfirm = $rsvp_confirm = ''; … … 1835 1906 } 1836 1907 1837 $payment_details .= '<p><strong>' . __( 'Pay for ', 'rsvpmaker' ) . ' ' . esc_html( $details['payingfor'] ) . ' = ' . number_format( $details['total'], 2, $rsvp_options['currency_decimal'], $rsvp_options['currency_thousands'] . ' ' . $rsvp_options['paypal_currency'] ) . '</strong></p>';1908 $payment_details .= '<p><strong>' . __( 'Pay for ', 'rsvpmaker' ) . ' ' . esc_html( $details['payingfor'] ) . ' = ' .$currency. number_format( $details['total'], 2, $rsvp_options['currency_decimal'], $rsvp_options['currency_thousands'] . ' ' . $rsvp_options['paypal_currency'] ) . '</strong></p>'; 1838 1909 1839 1910 if ( $charge != $details['total'] ) { -
rsvpmaker/tags/11.1.5/rsvpmaker-postmark.php
r3091020 r3110769 175 175 $chunks = array_chunk($recipients,200); 176 176 echo $log = sprintf('<p>split into %s chunks</p>',sizeof($chunks)); 177 error_log('rsvpmaker_postmark_broadcast '.$log); 177 178 $recipients = array_shift($chunks); 178 179 foreach($chunks as $chunk) { … … 324 325 } 325 326 $result = rsvpmaker_guest_list_add($email, $first, $last, 'incoming_email_signup', false); 326 mail('david@carrcommunications.com','rsvpmaker_postmark_incoming_list_signup result',$result.' '.var_export($emailobj,true));327 327 } 328 328 -
rsvpmaker/tags/11.1.5/rsvpmaker-stripe.php
r3089105 r3110769 162 162 update_option( $idempotency_key, $vars ); 163 163 164 $url = get_permalink( $rsvpmaker_stripe_checkout_page_id);164 $url = rsvpmaker_stripe_checkout_get_url(); 165 165 $sandbox = empty($vars['sandbox']) ? 0 : 1; // sandbox set at block level 166 166 $keys = get_rsvpmaker_stripe_keys($sandbox); … … 187 187 return $output; 188 188 189 } 190 191 function rsvpmaker_stripe_checkout_get_url( ) { 192 global $rsvp_options; 193 194 global $post, $rsvp_options, $current_user, $button, $rsvpmaker_stripe_form, $wpdb; 195 $rsvpmaker_stripe_checkout_page_id = get_option( 'rsvpmaker_stripe_checkout_page_id' ); 196 $ck = ($rsvpmaker_stripe_checkout_page_id) ? get_post($rsvpmaker_stripe_checkout_page_id) : false; 197 //wp_die(var_export($ck,true)); 198 if(!$rsvpmaker_stripe_checkout_page_id || !$ck || ($ck->post_type == 'rsvpmaker')) { 199 200 $postvar['post_content'] = '<!-- wp:shortcode --> 201 202 [rsvpmaker_stripe_checkout] 203 204 <!-- /wp:shortcode --> 205 206 <!-- wp:paragraph --> 207 208 <p>Secure payment processing by <a href="https://stripe.com/" target="_blank">Stripe</a>.</p> 209 210 <!-- /wp:paragraph --> 211 212 '; 213 214 $postvar['post_title'] = 'Checkout'; 215 216 $postvar['post_status'] = 'publish'; 217 218 $postvar['post_author'] = 1; 219 220 $postvar['post_type'] = 'page'; 221 222 $rsvpmaker_stripe_checkout_page_id = wp_insert_post( $postvar ); 223 224 update_post_meta( $rsvpmaker_stripe_checkout_page_id, '_rsvpmaker_special', 'Payment checkout page for Stripe' ); 225 update_option( 'rsvpmaker_stripe_checkout_page_id',$rsvpmaker_stripe_checkout_page_id ); 226 } 227 return get_permalink($rsvpmaker_stripe_checkout_page_id); 189 228 } 190 229 -
rsvpmaker/tags/11.1.5/rsvpmaker-util.php
r3104263 r3110769 4561 4561 return false; // don't exclude multiple events with same tite/post date (may have been created from a template) 4562 4562 } 4563 4564 function rsvpmaker_data_from_document($content) { 4565 $results = []; 4566 preg_match_all('/wp\:([a-z0-9\-\/]+)[^>]+(\{[^\}]+\})/',$content,$matches); 4567 if($matches[2]) 4568 foreach($matches[0] as $index => $m) 4569 { 4570 $data = json_decode($matches[2][$index]); 4571 $data->block_signature = $matches[1][$index]; 4572 $results[] = $data; 4573 } 4574 return $results; 4575 } -
rsvpmaker/tags/11.1.5/rsvpmaker.js
r3096484 r3110769 192 192 var server_timezone = $( this ).attr( 'server_timezone' ); 193 193 var timezone_abbrev = $( this ).attr( 'timezone_abbrev' ); 194 var tz_url = $( this ).attr( 'tz_url' ); 194 195 var nofluxbutton = $( this ).attr( 'nofluxbutton' ); 195 196 console.log('post '+id+' noflux '+nofluxbutton); … … 203 204 fluxbutton[id] = document.createElement( "A" ); 204 205 fluxbutton[id].innerHTML = 'Show in My Timezone'; 206 fluxbutton[id].href = tz_url; 205 207 fluxbutton[id].className = 'tzbutton'; 206 208 fluxbutton[id].style.fontSize = 'small'; … … 209 211 'click', 210 212 (event) => { 213 event.preventDefault(); 211 214 fluxbutton[id].style.display = 'none'; 212 215 var tz = jstz.determine(); -
rsvpmaker/tags/11.1.5/rsvpmaker.min.js
r3096484 r3110769 1 function showMessage(t){appslug=document.getElementById("appslug").value,console.log("appslug for message: "+appslug),document.getElementById("flexible-form-"+appslug).innerHTML="",document.getElementById("flexform-result-"+appslug).innerHTML=t.message}jQuery(document).ready(function(t){function e(n="",s=!0){t(".tz_converter").each(function(){var a=t(this).attr("id"),r=t(this).attr("time"), o=t(this).attr("end"),i=t(this).attr("format"),l=t(this).attr("post_id"),c=t(this).attr("server_timezone"),d=t(this).attr("timezone_abbrev"),p=t(this).attr("nofluxbutton");console.log("post "+a+" noflux "+p),console.log(d);var m={},h={};if(s&&n==c){if(p)return;return t(this).css("display","inline-block"),h[a]=document.createElement("A"),h[a].innerHTML="Show in My Timezone",h[a].className="tzbutton",h[a].style.fontSize="small",document.getElementById(a).appendChild(h[a]),void h[a].addEventListener("click",t=>{h[a].style.display="none";var n=jstz.determine(),s=n.name();e(s,!1)})}var u={time:r,end:o,tzstring:n,format:i,post_id:l,timezone_abbrev:d};console.log(u),jQuery.post(rsvpmaker_rest.rest_url+"rsvpmaker/v1/flux_capacitor",u,function(n){console.log(n),t("#"+a).html(n.content+" "),m[a]=document.createElement("SELECT"),m[a].innerHTML=n.tzoptions,m[a].className="tzselect",m[a].style.display="none",document.getElementById(a).appendChild(m[a]),m[a].addEventListener("change",t=>{var n=t.target.value;e(n,!1)}),h[a]=document.createElement("A"),h[a].innerHTML="Switch Timzeone?",h[a].className="tzswitch",h[a].style.fontSize="small",document.getElementById(a).appendChild(h[a]),h[a].addEventListener("click",t=>{m[a].style.display="block",h[a].style.display="none"})})})}function n(t){(t.first||t.last)&&(o=o.concat("<h3>"+t.first),t.last&&(o=o.concat(" "+t.last)),o=o.concat("</h3>\n"),t.note&&(o=o.concat("<p>"+t.note+"</p>")))}function s(e){var s=rsvpmaker_rest.rsvpmaker_json_url+"guestlist/"+e;fetch(s).then(t=>t.json()).then(s=>{Array.isArray(s)&&(s.forEach(n),""==o&&(o="<div>?</div>"),t("#attendees-"+e).html(o))}).catch(n=>{console.log(n),t("#attendees-"+e).html("Error fetching guestlist from "+s)})}t.ajaxSetup({headers:{"X-WP-Nonce":rsvpmaker_rest.nonce}}),t(".wp-block-rsvpmaker-formfield input").change(function(){let e=t(this).val(),n=e.includes("//");console.log(e+" "+n),n&&(e=e.replace(/[a-z]{0,8}:{0,1}\/\//,""),console.log("strip prefix"),t(this).val(e))}),t(".rsvpmaker-schedule-detail").hide(),t(".rsvpmaker-schedule-button").click(function(e){var n=t(this).attr("id"),s=n.replace("button","detail");t("#"+n).hide(),t("#"+s).show()}),t(".wp-block-rsvpmaker-countdown").each(function(){var e=t(this).attr("event_id"),n=t(this).attr("id");if(""==e){var s=n.split("-");s[1]&&(e=s[1])}if(""==e)return;let a=rsvpmaker_rest.rest_url+"rsvpmaker/v1/time_and_zone/"+e;jQuery.get(a,null,function(e){let s=parseInt(e);if(Number.isNaN(s))return void t("#"+n).html("Event not found");let a=setInterval(function(){var e=(new Date).getTime(),r=s-e,o=Math.floor(r/864e5),i=Math.floor(r%864e5/36e5),l=i<10?"0":"",c=Math.floor(r%36e5/6e4),d=c<10?"0":"",p=Math.floor(r%6e4/1e3),m=p<10?"0":"";if(r<0){clearInterval(a),o=i=c=p="00";let e=t("#"+n).attr("expiration_display"),s=t("#"+n).attr("expiration_message"),r="";"stoppedclock"!=e&&"clockmessage"!=e||(r='<div class="countdowndigits-line"><div class="countdowndigits countdowndays">'+o+'</div> <span class="countdowndayslabel">days</span> <div class="countdowndigits countdownhours">'+i+'</div><span class="countdownspacer">:</span><div class="countdowndigits countdownminutes">'+c+'</div><span class="countdownspacer">:</span><div class="countdowndigits countdownseconds">'+p+"</div></div>"),"message"!=e&&"clockmessage"!=e||(r=r+'<p class="countdown_expiration_message">'+s+"</p>"),t("#"+n).html(r)}else t("#"+n).html('<div class="countdowndigits-line"><div class="countdowndigits countdowndays">'+o+'</div> <span class="countdowndayslabel">days</span> <div class="countdowndigits countdownhours">'+l+i+'</div><span class="countdownspacer">:</span><div class="countdowndigits countdownminutes">'+d+c+'</div><span class="countdownspacer">:</span><div class="countdowndigits countdownseconds">'+m+p+"</div></div>")},1e3)})}),t(".timezone_on").click(function(){var e=t(this).attr("utc"),n=t(this).attr("target"),s=n.replace("timezone_converted","tz_convert_to"),a=t(this).attr("event_tz");if(""!=a){var r=new Date(e);localstring=r.toString(),t("#"+n).html(localstring);var o=localstring.match(/\(([^)]+)/);t(this).attr("event_tz",""),t("#"+s).html("Converting to "+o[1]);var i,l=e.split(/T/);t(".tz-convert, .tz-convert table tr td, .tz-table1 table tr td:first-child, .tz-table2 table tr td:nth-child(2), .tz-table3 table tr td:nth-child(3)").each(function(){celltime=this.innerHTML.replace(" "," "),celltime.search(/\d:\d\d/)>=0&&celltime.search("<")<0&&(0,i=l[0]+" "+celltime+" "+a,ts=Date.parse(i),Number.isNaN(ts)||(r.setTime(ts),i=r.toLocaleTimeString().replace(":00 "," "),this.innerHTML=i,t(this).css("font-weight","bold")))});var c=!0;t(".tz-table1 table tr td:first-child, .tz-table2 table tr td:nth-child(2), .tz-table3 table tr td:nth-child(3)").each(function(){c&&""!=this.innerHTML&&this.innerHTML.search(":")<0&&(this.innerHTML="<strong>Your TZ</strong>"),c=!1});var d={action:"rsvpmaker_localstring",localstring:localstring,timelord:rsvpmaker_rest.timelord};jQuery.post(rsvpmaker_rest.ajaxurl,d,function(e){t("#"+n).html(e)})}}),t(".signed_up_ajax").each(function(){var e=t(this).attr("post"),n={event:e,timelord:rsvpmaker_rest.timelord};jQuery.get(rsvpmaker_rest.rest_url+"rsvpmaker/v1/signed_up",n,function(n){t("#signed_up_"+e).html(n)})});var a=jstz.determine(),r=a.name();e(r);var o="";t(".rsvpmaker_show_attendees").click(function(e){var n=t(this).attr("post_id");o="",s(n)});const i=document.getElementsByClassName("rsvpmaker_menu_dropdown");if(i&&i.length){const t=[];let e=0;Array.prototype.filter.call(i,(n,s)=>{if(n.className.includes("rsvpmaker_menu_dropdown"))if(e++,console.log("dropdown",n),console.log("dropdown children",n.children),n.className.includes("rsvpmaker_menu_type")){const e=n.className.match(/rsvpmaker_menu_type_([^\s]+)/);e&&e[1]&&fetch("/wp-json/rsvpmaker/v1/type/"+e[1]).then(t=>t.json()).then(e=>{t.push(""),Array.isArray(e)&&e.forEach(e=>{t[t.length-1]+='<li class=" wp-block-navigation-item wp-block-navigation-link"><a class="wp-block-navigation-item__content" href="'+e.permalink+'"><span class="wp-block-navigation-item__label">'+e.post_title+" - "+e.date+"</span></a></li>"}),t[t.length-1]&&Array.prototype.filter.call(n.children,e=>{"UL"==e.nodeName&&(e.innerHTML=e.innerHTML+t[t.length-1])})})}else fetch("/wp-json/rsvpmaker/v1/future").then(t=>t.json()).then(e=>{t.push(""),console.log(e),Array.isArray(e)&&e.forEach(e=>{t[t.length-1]+='<li class=" wp-block-navigation-item wp-block-navigation-link"><a class="wp-block-navigation-item__content" href="'+e.permalink+'"><span class="wp-block-navigation-item__label">'+e.post_title+" - "+e.date+"</span></a></li>"}),t[t.length-1]&&Array.prototype.filter.call(n.children,e=>{"UL"==e.nodeName&&(e.innerHTML=e.innerHTML+t[t.length-1])})})})}});class RSVPJsonWidget{constructor(t,e,n,s=""){this.el=document.getElementById(t),this.url=e,this.limit=n,this.morelink=s;let a="";fetch(e).then(t=>t.json()).then(t=>{var e=!1;Array.isArray(t)?(n&&t.length>=n&&(t=t.slice(0,n),e=!0),t.forEach(function(t,e,n){if(!t.datetime)return"";new Date(t.datetime);a=a.concat('<li class="rsvpmaker-widget-li"><span class="rsvpmaker-widget-title"><a href="'+t.guid+'">'+t.post_title+'</a></span> - <span class="rsvpmaker-widget-date">'+t.date+"</span></li>")})):this.el.innerHTML="None found: "+t.code,""==a?this.el.innerHTML="No event listings found":(e&&""!=s&&(a=a.concat('<li><a href="'+s+'">More events</a></li>')),this.el.innerHTML='<ul class="eventslist rsvpmakerjson">'+a+"</ul>")}).catch(t=>{this.el.innerHTML="Error fetching events from "+this.url,console.log(t)})}}const flexforms=document.querySelectorAll(".rsvpmaker-flexible-form");flexforms.forEach(t=>{t.addEventListener("submit",function(t){t.preventDefault();const e=new FormData(this);console.log(e),fetch(rsvpmaker_rest.rest_url+"rsvpmaker/v1/flexform",{method:"POST",body:e}).then(t=>t.json()).then(t=>showMessage(t))})});1 function showMessage(t){appslug=document.getElementById("appslug").value,console.log("appslug for message: "+appslug),document.getElementById("flexible-form-"+appslug).innerHTML="",document.getElementById("flexform-result-"+appslug).innerHTML=t.message}jQuery(document).ready(function(t){function e(n="",s=!0){t(".tz_converter").each(function(){var a=t(this).attr("id"),r=t(this).attr("time"),i=t(this).attr("end"),o=t(this).attr("format"),l=t(this).attr("post_id"),c=t(this).attr("server_timezone"),d=t(this).attr("timezone_abbrev"),p=t(this).attr("tz_url"),m=t(this).attr("nofluxbutton");console.log("post "+a+" noflux "+m),console.log(d);var h={},u={};if(s&&n==c){if(m)return;return t(this).css("display","inline-block"),u[a]=document.createElement("A"),u[a].innerHTML="Show in My Timezone",u[a].href=p,u[a].className="tzbutton",u[a].style.fontSize="small",document.getElementById(a).appendChild(u[a]),void u[a].addEventListener("click",t=>{t.preventDefault(),u[a].style.display="none";var n=jstz.determine(),s=n.name();e(s,!1)})}var v={time:r,end:i,tzstring:n,format:o,post_id:l,timezone_abbrev:d};console.log(v),jQuery.post(rsvpmaker_rest.rest_url+"rsvpmaker/v1/flux_capacitor",v,function(n){console.log(n),t("#"+a).html(n.content+" "),h[a]=document.createElement("SELECT"),h[a].innerHTML=n.tzoptions,h[a].className="tzselect",h[a].style.display="none",document.getElementById(a).appendChild(h[a]),h[a].addEventListener("change",t=>{var n=t.target.value;e(n,!1)}),u[a]=document.createElement("A"),u[a].innerHTML="Switch Timzeone?",u[a].className="tzswitch",u[a].style.fontSize="small",document.getElementById(a).appendChild(u[a]),u[a].addEventListener("click",t=>{h[a].style.display="block",u[a].style.display="none"})})})}function n(t){(t.first||t.last)&&(i=i.concat("<h3>"+t.first),t.last&&(i=i.concat(" "+t.last)),i=i.concat("</h3>\n"),t.note&&(i=i.concat("<p>"+t.note+"</p>")))}function s(e){var s=rsvpmaker_rest.rsvpmaker_json_url+"guestlist/"+e;fetch(s).then(t=>t.json()).then(s=>{Array.isArray(s)&&(s.forEach(n),""==i&&(i="<div>?</div>"),t("#attendees-"+e).html(i))}).catch(n=>{console.log(n),t("#attendees-"+e).html("Error fetching guestlist from "+s)})}t.ajaxSetup({headers:{"X-WP-Nonce":rsvpmaker_rest.nonce}}),t(".wp-block-rsvpmaker-formfield input").change(function(){let e=t(this).val(),n=e.includes("//");console.log(e+" "+n),n&&(e=e.replace(/[a-z]{0,8}:{0,1}\/\//,""),console.log("strip prefix"),t(this).val(e))}),t(".rsvpmaker-schedule-detail").hide(),t(".rsvpmaker-schedule-button").click(function(e){var n=t(this).attr("id"),s=n.replace("button","detail");t("#"+n).hide(),t("#"+s).show()}),t(".wp-block-rsvpmaker-countdown").each(function(){var e=t(this).attr("event_id"),n=t(this).attr("id");if(""==e){var s=n.split("-");s[1]&&(e=s[1])}if(""==e)return;let a=rsvpmaker_rest.rest_url+"rsvpmaker/v1/time_and_zone/"+e;jQuery.get(a,null,function(e){let s=parseInt(e);if(Number.isNaN(s))return void t("#"+n).html("Event not found");let a=setInterval(function(){var e=(new Date).getTime(),r=s-e,i=Math.floor(r/864e5),o=Math.floor(r%864e5/36e5),l=o<10?"0":"",c=Math.floor(r%36e5/6e4),d=c<10?"0":"",p=Math.floor(r%6e4/1e3),m=p<10?"0":"";if(r<0){clearInterval(a),i=o=c=p="00";let e=t("#"+n).attr("expiration_display"),s=t("#"+n).attr("expiration_message"),r="";"stoppedclock"!=e&&"clockmessage"!=e||(r='<div class="countdowndigits-line"><div class="countdowndigits countdowndays">'+i+'</div> <span class="countdowndayslabel">days</span> <div class="countdowndigits countdownhours">'+o+'</div><span class="countdownspacer">:</span><div class="countdowndigits countdownminutes">'+c+'</div><span class="countdownspacer">:</span><div class="countdowndigits countdownseconds">'+p+"</div></div>"),"message"!=e&&"clockmessage"!=e||(r=r+'<p class="countdown_expiration_message">'+s+"</p>"),t("#"+n).html(r)}else t("#"+n).html('<div class="countdowndigits-line"><div class="countdowndigits countdowndays">'+i+'</div> <span class="countdowndayslabel">days</span> <div class="countdowndigits countdownhours">'+l+o+'</div><span class="countdownspacer">:</span><div class="countdowndigits countdownminutes">'+d+c+'</div><span class="countdownspacer">:</span><div class="countdowndigits countdownseconds">'+m+p+"</div></div>")},1e3)})}),t(".timezone_on").click(function(){var e=t(this).attr("utc"),n=t(this).attr("target"),s=n.replace("timezone_converted","tz_convert_to"),a=t(this).attr("event_tz");if(""!=a){var r=new Date(e);localstring=r.toString(),t("#"+n).html(localstring);var i=localstring.match(/\(([^)]+)/);t(this).attr("event_tz",""),t("#"+s).html("Converting to "+i[1]);var o,l=e.split(/T/);t(".tz-convert, .tz-convert table tr td, .tz-table1 table tr td:first-child, .tz-table2 table tr td:nth-child(2), .tz-table3 table tr td:nth-child(3)").each(function(){celltime=this.innerHTML.replace(" "," "),celltime.search(/\d:\d\d/)>=0&&celltime.search("<")<0&&(0,o=l[0]+" "+celltime+" "+a,ts=Date.parse(o),Number.isNaN(ts)||(r.setTime(ts),o=r.toLocaleTimeString().replace(":00 "," "),this.innerHTML=o,t(this).css("font-weight","bold")))});var c=!0;t(".tz-table1 table tr td:first-child, .tz-table2 table tr td:nth-child(2), .tz-table3 table tr td:nth-child(3)").each(function(){c&&""!=this.innerHTML&&this.innerHTML.search(":")<0&&(this.innerHTML="<strong>Your TZ</strong>"),c=!1});var d={action:"rsvpmaker_localstring",localstring:localstring,timelord:rsvpmaker_rest.timelord};jQuery.post(rsvpmaker_rest.ajaxurl,d,function(e){t("#"+n).html(e)})}}),t(".signed_up_ajax").each(function(){var e=t(this).attr("post"),n={event:e,timelord:rsvpmaker_rest.timelord};jQuery.get(rsvpmaker_rest.rest_url+"rsvpmaker/v1/signed_up",n,function(n){t("#signed_up_"+e).html(n)})});var a=jstz.determine(),r=a.name();e(r);var i="";t(".rsvpmaker_show_attendees").click(function(e){var n=t(this).attr("post_id");i="",s(n)});const o=document.getElementsByClassName("rsvpmaker_menu_dropdown");if(o&&o.length){const t=[];let e=0;Array.prototype.filter.call(o,(n,s)=>{if(n.className.includes("rsvpmaker_menu_dropdown"))if(e++,console.log("dropdown",n),console.log("dropdown children",n.children),n.className.includes("rsvpmaker_menu_type")){const e=n.className.match(/rsvpmaker_menu_type_([^\s]+)/);e&&e[1]&&fetch("/wp-json/rsvpmaker/v1/type/"+e[1]).then(t=>t.json()).then(e=>{t.push(""),Array.isArray(e)&&e.forEach(e=>{t[t.length-1]+='<li class=" wp-block-navigation-item wp-block-navigation-link"><a class="wp-block-navigation-item__content" href="'+e.permalink+'"><span class="wp-block-navigation-item__label">'+e.post_title+" - "+e.date+"</span></a></li>"}),t[t.length-1]&&Array.prototype.filter.call(n.children,e=>{"UL"==e.nodeName&&(e.innerHTML=e.innerHTML+t[t.length-1])})})}else fetch("/wp-json/rsvpmaker/v1/future").then(t=>t.json()).then(e=>{t.push(""),console.log(e),Array.isArray(e)&&e.forEach(e=>{t[t.length-1]+='<li class=" wp-block-navigation-item wp-block-navigation-link"><a class="wp-block-navigation-item__content" href="'+e.permalink+'"><span class="wp-block-navigation-item__label">'+e.post_title+" - "+e.date+"</span></a></li>"}),t[t.length-1]&&Array.prototype.filter.call(n.children,e=>{"UL"==e.nodeName&&(e.innerHTML=e.innerHTML+t[t.length-1])})})})}});class RSVPJsonWidget{constructor(t,e,n,s=""){this.el=document.getElementById(t),this.url=e,this.limit=n,this.morelink=s;let a="";fetch(e).then(t=>t.json()).then(t=>{var e=!1;Array.isArray(t)?(n&&t.length>=n&&(t=t.slice(0,n),e=!0),t.forEach(function(t,e,n){if(!t.datetime)return"";new Date(t.datetime);a=a.concat('<li class="rsvpmaker-widget-li"><span class="rsvpmaker-widget-title"><a href="'+t.guid+'">'+t.post_title+'</a></span> - <span class="rsvpmaker-widget-date">'+t.date+"</span></li>")})):this.el.innerHTML="None found: "+t.code,""==a?this.el.innerHTML="No event listings found":(e&&""!=s&&(a=a.concat('<li><a href="'+s+'">More events</a></li>')),this.el.innerHTML='<ul class="eventslist rsvpmakerjson">'+a+"</ul>")}).catch(t=>{this.el.innerHTML="Error fetching events from "+this.url,console.log(t)})}}const flexforms=document.querySelectorAll(".rsvpmaker-flexible-form");flexforms.forEach(t=>{t.addEventListener("submit",function(t){t.preventDefault();const e=new FormData(this);console.log(e),fetch(rsvpmaker_rest.rest_url+"rsvpmaker/v1/flexform",{method:"POST",body:e}).then(t=>t.json()).then(t=>showMessage(t))})}); -
rsvpmaker/tags/11.1.5/rsvpmaker.php
r3106066 r3110769 11 11 * License: GPL v2 or later 12 12 * License URI: https://www.gnu.org/licenses/gpl-2.0.html 13 * Version: 11.1. 313 * Version: 11.1.5 14 14 */ 15 15 16 16 function get_rsvpversion() { 17 17 //return time(); //uncomment for testing 18 return '11.1. 3';18 return '11.1.5'; 19 19 } 20 20
Note: See TracChangeset
for help on using the changeset viewer.