Plugin Directory

Changeset 3482534


Ignore:
Timestamp:
03/14/2026 01:00:06 PM (2 weeks ago)
Author:
davidfcarr
Message:

make sure agenda ProjectChooser refreshes after speaker change

Location:
rsvpmaker-for-toastmasters
Files:
602 added
7 edited

Legend:

Unmodified
Added
Removed
  • rsvpmaker-for-toastmasters/trunk/agenda/build/frontend.asset.php

    r3481370 r3482534  
    1 <?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '397dacffd97b5cb6c757');
     1<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '264d7ff906e2bbb152a3');
  • rsvpmaker-for-toastmasters/trunk/agenda/build/frontend.js

    r3481370 r3482534  
    1 (()=>{var e,t,n={174:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,e:()=>r});const o=n(1083).A.create({baseURL:"/wp-json/rsvptm/v1/",headers:{"Content-type":"application/json"},validateStatus:function(e){return e<400}});function r(e){o.interceptors.request.use(t=>(t.headers["X-WP-Nonce"]=e,t))}const s=o},376:e=>{e.exports={ReactQueryDevtools:function(){return null},ReactQueryDevtoolsPanel:function(){return null}}},428:(e,t,n)=>{"use strict";n.d(t,{j:()=>r});var o=n(941),r=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,o.G6)(function(){t.notifyFn(e)})},t.batchCalls=function(e){var t=this;return function(){for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];t.schedule(function(){e.apply(void 0,o)})}},t.flush=function(){var e=this,t=this.queue;this.queue=[],t.length&&(0,o.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}())},790:e=>{"use strict";e.exports=window.ReactJSXRuntime},924:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>f});var o=n(1609),r=n(9692),s=n(6427),i=n(9439),a=n(8662),l=n(5148),c=n(6606),u=n(790);function d(e){const[t,n]=(0,o.useState)(""),[r,a]=(0,o.useState)([]),{project:l,manual:d,title:h,setEvaluate:p,setManual:f,setProject:m,setTitle:g,makeNotification:b}=e,v=(0,c.p)();return(0,o.useEffect)(()=>{fetch(v.url+"rsvptm/v1/paths_and_projects",{headers:{"X-WP-Nonce":v.nonce}}).then(e=>e.json()).then(e=>{e.paths&&a(e)},[]),e.project&&function(t){let o=t.replace(/([\s0-9]+)$/,""),r=o.replace(/ Level.+/,"");n(r),!e.manual&&o&&f(o)}(e.project)},[]),console.log("evaluation project chooser choices",r),r&&r.manuals&&void 0!==r.manuals?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{children:(0,u.jsx)(i.k,{source:"paths",options:r.paths,value:t,label:"Path",onChange:e=>n(e)})}),(0,u.jsx)("div",{children:(0,u.jsx)(i.k,{source:"manuals",options:r.manuals[t],value:d,label:"Level",onChange:e=>{f(e)}})}),(0,u.jsx)("div",{children:(0,u.jsx)(i.k,{source:"projects",options:r.projects[d]?r.projects[d]:[{value:"",label:"Set Path and Level to See Projects"}],value:l,label:"Project",onChange:e=>{m(e),p(t=>(t.manual=d,t.project=e,t)),b("Loading evaluation form ...")}})}),(0,u.jsxs)("p",{children:[(0,u.jsx)("strong",{children:"Title"})," ",(0,u.jsx)(s.TextControl,{value:h,onChange:e=>{g(e),p(t=>(t.title=e,t))}})]})]}):(0,u.jsx)("p",{children:"Loading project choices"})}function h(e){const{item:t,promptindex:n,note:r,response:i,setResponses:a,setNotes:l}=e,[c,d]=(0,o.useState)(i),[h,p]=(0,o.useState)(!0),f=(0,o.useRef)("");return(0,u.jsxs)("div",{children:[(0,u.jsxs)("p",{children:[(0,u.jsx)("strong",{children:t.prompt})," ",c]}),t.choices&&t.choices.length>0&&(0,u.jsx)("div",{children:(0,u.jsx)(s.RadioControl,{className:"radio-mode",options:t.choices,selected:c,onChange:e=>{d(e),a(t=>{let o=[...t];return o[n]=e,o})}})}),(0,u.jsx)("p",{children:(0,u.jsx)("textarea",{className:"evaluation-note",ref:f,onBlur:function(e){e.preventDefault(),l(e=>(e[n]=f.current.value,e)),p(!1)}})})]})}var p=n(5286);function f(e){const{makeNotification:t,data:n,evaluate:c,setEvaluate:f,scrolltoId:m,mode:g}=e,{isLoading:b,isError:v,isFetching:y,data:x}=(0,l.wM)(c.project,c.ID,function(e){e.data.second_language_requested>0?(console.log("adding second language prompts",e.data),B({prompts:e.data.form.concat(e.data.second_language),intro:e.data.intro,second_language_requested:!0})):(console.log("no second language prompts",e.data),B({prompts:e.data.form,intro:e.data.intro,second_language_requested:!1,second_language:e.data.second_language}))});if(v)return(0,u.jsx)("p",{children:(0,r.A)("Error loading evaluation data",n)});const[j,w]=(0,o.useState)("Path Not Set"),[k,_]=(0,o.useState)(c&&c.manual?c.manual:""),[C,S]=(0,o.useState)(c&&c.title?c.title:""),[E,A]=(0,o.useState)(c&&c.name?c.name:""),[T,O]=(0,o.useState)(n.current_user_name),[N,R]=(0,o.useState)(),[D,M]=(0,o.useState)(c&&c.project?c.project:""),[L,P]=(0,o.useState)([]),[I,F]=(0,o.useState)([]),[U,B]=(0,o.useState)({}),[Q,z]=(0,o.useState)(""),[q,H]=(0,o.useState)("");let V=-1==window.location.href.indexOf("?")?"?mode=evaluation":"&mode=evaluation",W=-1==window.location.href.indexOf("mode")?window.location.href+V:window.location.href;const{mutate:K}=(0,l.Nb)(n.post_id,z,t);if((0,o.useEffect)(()=>{m("react-agenda")},[Q,U]),b||y)return(0,u.jsx)("p",{children:(0,r.A)("Loading ...",n)});let G=[{value:"",label:"Choose Speaker"},{value:"guest",label:"Enter Guest Name"}];console.log("evaluation dashboard data",n.blocksdata),n.blocksdata&&n.blocksdata.forEach(e=>{e.attrs&&e.attrs.role&&"Speaker"==e.attrs.role&&e.assignments&&Array.isArray(e.assignments)&&(e.assignments.forEach(e=>{if(window.location.href.indexOf("speaker=")>0){const t=window.location.href.match(/speaker=([0-9]+)/),n=t&&t[1]?t[1]:"";if(e.ID!=n)return}if(""!=e.ID&&"0"!=e.ID&&0!=e.ID){let t=e.project_text?" / "+e.project_text:" / Speech Project Not Set";G.push({value:JSON.stringify(e),label:e.name+t})}}),c.ID>0&&G.push({value:JSON.stringify(c),label:c.name}),(window.location.href.indexOf("showprev")>0||window.location.href.indexOf("wp4t_evaluations")>0)&&Array.isArray(x.data.previous_speeches)&&x.data.previous_speeches.length&&(x.data.previous_speeches.forEach(e=>{G.push({value:JSON.stringify(e.value),label:e.label})}),G=G.concat(x.data.previous_speeches)),Array.isArray(e.memberoptions)&&e.memberoptions.length&&e.memberoptions.forEach(e=>{e.value>0&&G.push({value:JSON.stringify({ID:e.value,name:e.label,project:""}),label:e.label})}))}),G.length<4&&n.allmembers.forEach(e=>{G.push(e)}),console.log("evaluation assignment options",G);let Y=[];return console.log("evaluation tool mode",g),(0,u.jsxs)("div",{className:"eval",children:[(0,u.jsx)("h2",{children:(0,r.A)("Evaluation Tool",n)}),Q&&(0,u.jsxs)("div",{children:[(0,u.jsxs)("p",{children:[(0,u.jsx)("button",{onClick:function(){const e=new Blob([Q],{type:"text/html"}),t=new ClipboardItem({"text/html":e});navigator.clipboard.write([t])},children:(0,r.A)("Copy to Clipboard",n)})," ",(0,u.jsx)("em",{children:(0,r.A)("works in most browsers, but not Firefox",n)})]}),(0,u.jsx)("p",{children:(0,u.jsx)("a",{href:W,children:(0,r.A)("Reset",n)})}),(0,u.jsx)(a.d,{innerHTML:Q}),(0,u.jsx)("p",{children:(0,u.jsx)("a",{href:W,children:(0,r.A)("Reset",n)})})]}),(0,u.jsx)("h3",{children:(0,r.A)("Get Feedback",n)}),n.current_user_id&&(0,u.jsxs)("p",{children:[(0,r.A)("To request an evaluation, share this link",n),(0,u.jsx)("br",{}),(0,u.jsx)("a",{href:n.request_evaluation,children:n.request_evaluation})," ",n.request_evaluation.indexOf("admin")>0&&(0,u.jsxs)("span",{children:["(",(0,r.A)("login required",n),")"]}),(0,u.jsx)("br",{})]}),0==n.current_user_id&&(0,u.jsx)("p",{children:(0,r.A)("Toastmost users can request an evaluation from a fellow Toastmaster using this system.",n)}),(0,u.jsx)("div",{id:"YoodliPromo",children:(0,u.jsx)(p.dW,{})}),(0,u.jsx)("h3",{children:(0,r.A)("Give Feedback",n)}),(0,u.jsx)("p",{children:(0,r.A)("To give an evaluation, use the form below. When both the evaluator and the speaker have user accounts, the completed evaluation will be sent by email and archived on the member dashboard.",n)}),!E&&(!g||"evaluation_demo"!=g)&&(0,u.jsx)(i.k,{source:"Member or Guest",value:JSON.stringify(c),options:G,onChange:e=>{if("guest"==e)return void A("guest");const t=JSON.parse(e);S(t.title),M(t.project),f(t)}}),(E||g&&"evaluation_demo"==g)&&(0,u.jsx)(s.TextControl,{label:(0,r.A)("Speaker Name",n),value:E,onChange:e=>{e?(A(e),f(t=>(t.ID=e,t.name=e,t))):A(" ")}}),!n.current_user_name&&(0,u.jsx)(s.TextControl,{label:(0,r.A)("Evaluator Name",n),value:T,onChange:e=>{O(e)}}),"evaluation_guest"==g&&!n.is_user_logged_in&&(0,u.jsx)(s.TextControl,{label:(0,r.A)("Evaluator Email",n),value:N,onChange:e=>{R(e)}}),(0,u.jsx)(d,{manual:k,project:D,title:C,setManual:_,setProject:M,setTitle:S,setEvaluate:f,makeNotification:t}),(0,u.jsx)(a.d,{innerHTML:U.intro}),U.prompts.map((e,t)=>(L[t]||I[t]||Y.push(t),(0,u.jsx)("div",{children:(0,u.jsx)(h,{promptindex:t,response:L[t],note:I[t],setResponses:P,setNotes:F,item:e})}))),q&&U.second_language.map((e,t)=>{let n=t+U.prompts.length;return L[n]||I[n]||Y.push(n),(0,u.jsx)("div",{children:(0,u.jsx)(h,{promptindex:n,response:L[n],note:I[n],setResponses:P,setNotes:F,item:e})})}),Y.length>0&&(0,u.jsx)("p",{children:(0,u.jsxs)("em",{children:[Y.length," ",(0,r.A)("prompts have not been answered",n)]})}),U.second_language_requested&&(0,u.jsx)("p",{children:(0,u.jsx)("em",{children:(0,r.A)("The last four speaking-in-a-second-language prompts were requested by the speaker.",n)})}),!U.second_language_requested&&!q&&(0,u.jsxs)("p",{children:[(0,u.jsx)("input",{type:"checkbox",onClick:()=>{H(!0)}})," ",(0,r.A)("Add prompts for those speaking in a second language",n)]}),(0,u.jsx)("p",{children:(0,u.jsx)("button",{className:"tmform",onClick:function(){K({evaluate:c,form:U,responses:L,notes:I,evaluator_name:T,evaluator_email:N}),t("Saving ...")},children:(0,r.A)("Send",n)})})]})}n(5942)},941:(e,t,n)=>{"use strict";n.d(t,{BH:()=>y,Cp:()=>b,F$:()=>m,G6:()=>C,GR:()=>d,HN:()=>l,MK:()=>p,Od:()=>g,S$:()=>r,Zw:()=>i,b_:()=>h,f8:()=>x,gn:()=>a,j3:()=>c,jY:()=>S,lQ:()=>s,nJ:()=>f,vh:()=>u,yy:()=>_});var o=n(8168),r="undefined"==typeof window;function s(){}function i(e,t){return"function"==typeof e?e(t):e}function a(e){return"number"==typeof e&&e>=0&&e!==1/0}function l(e){return Array.isArray(e)?e:[e]}function c(e,t){return Math.max(e+(t||0)-Date.now(),0)}function u(e,t,n){return k(e)?"function"==typeof t?(0,o.A)({},n,{queryKey:e,queryFn:t}):(0,o.A)({},t,{queryKey:e}):e}function d(e,t,n){return k(e)?"function"==typeof t?(0,o.A)({},n,{mutationKey:e,mutationFn:t}):(0,o.A)({},t,{mutationKey:e}):"function"==typeof e?(0,o.A)({},t,{mutationFn:e}):(0,o.A)({},e)}function h(e,t,n){return k(e)?[(0,o.A)({},t,{queryKey:e}),n]:[e||{},t]}function p(e,t){var n=e.active,o=e.exact,r=e.fetching,s=e.inactive,i=e.predicate,a=e.queryKey,l=e.stale;if(k(a))if(o){if(t.queryHash!==m(a,t.options))return!1}else if(!b(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,s);if("none"===c)return!1;if("all"!==c){var u=t.isActive();if("active"===c&&!u)return!1;if("inactive"===c&&u)return!1}return!("boolean"==typeof l&&t.isStale()!==l||"boolean"==typeof r&&t.isFetching()!==r||i&&!i(t))}function f(e,t){var n=e.exact,o=e.fetching,r=e.predicate,s=e.mutationKey;if(k(s)){if(!t.options.mutationKey)return!1;if(n){if(g(t.options.mutationKey)!==g(s))return!1}else if(!b(t.options.mutationKey,s))return!1}return!("boolean"==typeof o&&"loading"===t.state.status!==o||r&&!r(t))}function m(e,t){return((null==t?void 0:t.queryKeyHashFn)||g)(e)}function g(e){return t=l(e),JSON.stringify(t,function(e,t){return j(t)?Object.keys(t).sort().reduce(function(e,n){return e[n]=t[n],e},{}):t});var t}function b(e,t){return v(l(e),l(t))}function v(e,t){return e===t||typeof e==typeof t&&!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some(function(n){return!v(e[n],t[n])})}function y(e,t){if(e===t)return e;var n=Array.isArray(e)&&Array.isArray(t);if(n||j(e)&&j(t)){for(var o=n?e.length:Object.keys(e).length,r=n?t:Object.keys(t),s=r.length,i=n?[]:{},a=0,l=0;l<s;l++){var c=n?l:r[l];i[c]=y(e[c],t[c]),i[c]===e[c]&&a++}return o===s&&a===o?e:i}return t}function x(e,t){if(e&&!t||t&&!e)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}function j(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 k(e){return"string"==typeof e||Array.isArray(e)}function _(e){return new Promise(function(t){setTimeout(t,e)})}function C(e){Promise.resolve().then(e).catch(function(e){return setTimeout(function(){throw e})})}function S(){if("function"==typeof AbortController)return new AbortController}},1083:(e,t,n)=>{"use strict";n.d(t,{A:()=>yt});var o={};function r(e,t){return function(){return e.apply(t,arguments)}}n.r(o),n.d(o,{hasBrowserEnv:()=>pe,hasStandardBrowserEnv:()=>me,hasStandardBrowserWebWorkerEnv:()=>ge,navigator:()=>fe,origin:()=>be});const{toString:s}=Object.prototype,{getPrototypeOf:i}=Object,{iterator:a,toStringTag:l}=Symbol,c=(u=Object.create(null),e=>{const t=s.call(e);return u[t]||(u[t]=t.slice(8,-1).toLowerCase())});var u;const d=e=>(e=e.toLowerCase(),t=>c(t)===e),h=e=>t=>typeof t===e,{isArray:p}=Array,f=h("undefined");function m(e){return null!==e&&!f(e)&&null!==e.constructor&&!f(e.constructor)&&v(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const g=d("ArrayBuffer"),b=h("string"),v=h("function"),y=h("number"),x=e=>null!==e&&"object"==typeof e,j=e=>{if("object"!==c(e))return!1;const t=i(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||l in e||a in e)},w=d("Date"),k=d("File"),_=d("Blob"),C=d("FileList"),S=d("URLSearchParams"),[E,A,T,O]=["ReadableStream","Request","Response","Headers"].map(d);function N(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let o,r;if("object"!=typeof e&&(e=[e]),p(e))for(o=0,r=e.length;o<r;o++)t.call(null,e[o],o,e);else{if(m(e))return;const r=n?Object.getOwnPropertyNames(e):Object.keys(e),s=r.length;let i;for(o=0;o<s;o++)i=r[o],t.call(null,e[i],i,e)}}function R(e,t){if(m(e))return null;t=t.toLowerCase();const n=Object.keys(e);let o,r=n.length;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const D="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:globalThis,M=e=>!f(e)&&e!==D,L=(P="undefined"!=typeof Uint8Array&&i(Uint8Array),e=>P&&e instanceof P);var P;const I=d("HTMLFormElement"),F=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),U=d("RegExp"),B=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};N(n,(n,r)=>{let s;!1!==(s=t(n,r,e))&&(o[r]=s||n)}),Object.defineProperties(e,o)},Q=d("AsyncFunction"),z=(q="function"==typeof setImmediate,H=v(D.postMessage),q?setImmediate:H?(V=`axios@${Math.random()}`,W=[],D.addEventListener("message",({source:e,data:t})=>{e===D&&t===V&&W.length&&W.shift()()},!1),e=>{W.push(e),D.postMessage(V,"*")}):e=>setTimeout(e));var q,H,V,W;const K="undefined"!=typeof queueMicrotask?queueMicrotask.bind(D):"undefined"!=typeof process&&process.nextTick||z,G={isArray:p,isArrayBuffer:g,isBuffer:m,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||v(e.append)&&("formdata"===(t=c(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&&g(e.buffer),t},isString:b,isNumber:y,isBoolean:e=>!0===e||!1===e,isObject:x,isPlainObject:j,isEmptyObject:e=>{if(!x(e)||m(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:E,isRequest:A,isResponse:T,isHeaders:O,isUndefined:f,isDate:w,isFile:k,isBlob:_,isRegExp:U,isFunction:v,isStream:e=>x(e)&&v(e.pipe),isURLSearchParams:S,isTypedArray:L,isFileList:C,forEach:N,merge:function e(){const{caseless:t,skipUndefined:n}=M(this)&&this||{},o={},r=(r,s)=>{const i=t&&R(o,s)||s;j(o[i])&&j(r)?o[i]=e(o[i],r):j(r)?o[i]=e({},r):p(r)?o[i]=r.slice():n&&f(r)||(o[i]=r)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&N(arguments[e],r);return o},extend:(e,t,n,{allOwnKeys:o}={})=>(N(t,(t,o)=>{n&&v(t)?e[o]=r(t,n):e[o]=t},{allOwnKeys:o}),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,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,o)=>{let r,s,a;const l={};if(t=t||{},null==e)return t;do{for(r=Object.getOwnPropertyNames(e),s=r.length;s-- >0;)a=r[s],o&&!o(a,e,t)||l[a]||(t[a]=e[a],l[a]=!0);e=!1!==n&&i(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:c,kindOfTest:d,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const o=e.indexOf(t,n);return-1!==o&&o===n},toArray:e=>{if(!e)return null;if(p(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[a]).call(e);let o;for(;(o=n.next())&&!o.done;){const n=o.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const o=[];for(;null!==(n=e.exec(t));)o.push(n);return o},isHTMLForm:I,hasOwnProperty:F,hasOwnProp:F,reduceDescriptors:B,freezeMethods:e=>{B(e,(t,n)=>{if(v(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const o=e[n];v(o)&&(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={},o=e=>{e.forEach(e=>{n[e]=!0})};return p(e)?o(e):o(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)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:R,global:D,isContextDefined:M,isSpecCompliantForm:function(e){return!!(e&&v(e.append)&&"FormData"===e[l]&&e[a])},toJSONObject:e=>{const t=new Array(10),n=(e,o)=>{if(x(e)){if(t.indexOf(e)>=0)return;if(m(e))return e;if(!("toJSON"in e)){t[o]=e;const r=p(e)?[]:{};return N(e,(e,t)=>{const s=n(e,o+1);!f(s)&&(r[t]=s)}),t[o]=void 0,r}}return e};return n(e,0)},isAsyncFn:Q,isThenable:e=>e&&(x(e)||v(e))&&v(e.then)&&v(e.catch),setImmediate:z,asap:K,isIterable:e=>null!=e&&v(e[a])};function Y(e,t,n,o,r){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),o&&(this.request=o),r&&(this.response=r,this.status=r.status?r.status:null)}G.inherits(Y,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.status}}});const J=Y.prototype,$={};["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=>{$[e]={value:e}}),Object.defineProperties(Y,$),Object.defineProperty(J,"isAxiosError",{value:!0}),Y.from=(e,t,n,o,r,s)=>{const i=Object.create(J);G.toFlatObject(e,i,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const a=e&&e.message?e.message:"Error",l=null==t&&e?e.code:t;return Y.call(i,a,l,n,o,r),e&&null==i.cause&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",s&&Object.assign(i,s),i};const X=Y;function Z(e){return G.isPlainObject(e)||G.isArray(e)}function ee(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function te(e,t,n){return e?e.concat(t).map(function(e,t){return e=ee(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const ne=G.toFlatObject(G,{},null,function(e){return/^is[A-Z]/.test(e)}),oe=function(e,t,n){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const o=(n=G.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!G.isUndefined(t[e])})).metaTokens,r=n.visitor||c,s=n.dots,i=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&G.isSpecCompliantForm(t);if(!G.isFunction(r))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(G.isDate(e))return e.toISOString();if(G.isBoolean(e))return e.toString();if(!a&&G.isBlob(e))throw new X("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,r){let a=e;if(e&&!r&&"object"==typeof e)if(G.endsWith(n,"{}"))n=o?n:n.slice(0,-2),e=JSON.stringify(e);else if(G.isArray(e)&&function(e){return G.isArray(e)&&!e.some(Z)}(e)||(G.isFileList(e)||G.endsWith(n,"[]"))&&(a=G.toArray(e)))return n=ee(n),a.forEach(function(e,o){!G.isUndefined(e)&&null!==e&&t.append(!0===i?te([n],o,s):null===i?n:n+"[]",l(e))}),!1;return!!Z(e)||(t.append(te(r,n,s),l(e)),!1)}const u=[],d=Object.assign(ne,{defaultVisitor:c,convertValue:l,isVisitable:Z});if(!G.isObject(e))throw new TypeError("data must be an object");return function e(n,o){if(!G.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+o.join("."));u.push(n),G.forEach(n,function(n,s){!0===(!(G.isUndefined(n)||null===n)&&r.call(t,n,G.isString(s)?s.trim():s,o,d))&&e(n,o?o.concat(s):[s])}),u.pop()}}(e),t};function re(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function se(e,t){this._pairs=[],e&&oe(e,this,t)}const ie=se.prototype;ie.append=function(e,t){this._pairs.push([e,t])},ie.toString=function(e){const t=e?function(t){return e.call(this,t,re)}:re;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};const ae=se;function le(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ce(e,t,n){if(!t)return e;const o=n&&n.encode||le;G.isFunction(n)&&(n={serialize:n});const r=n&&n.serialize;let s;if(s=r?r(t,n):G.isURLSearchParams(t)?t.toString():new ae(t,n).toString(o),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}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)})}},de={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},he={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ae,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},pe="undefined"!=typeof window&&"undefined"!=typeof document,fe="object"==typeof navigator&&navigator||void 0,me=pe&&(!fe||["ReactNative","NativeScript","NS"].indexOf(fe.product)<0),ge="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,be=pe&&window.location.href||"http://localhost",ve={...o,...he},ye=function(e){function t(e,n,o,r){let s=e[r++];if("__proto__"===s)return!0;const i=Number.isFinite(+s),a=r>=e.length;return s=!s&&G.isArray(o)?o.length:s,a?(G.hasOwnProp(o,s)?o[s]=[o[s],n]:o[s]=n,!i):(o[s]&&G.isObject(o[s])||(o[s]=[]),t(e,n,o[s],r)&&G.isArray(o[s])&&(o[s]=function(e){const t={},n=Object.keys(e);let o;const r=n.length;let s;for(o=0;o<r;o++)s=n[o],t[s]=e[s];return t}(o[s])),!i)}if(G.isFormData(e)&&G.isFunction(e.entries)){const n={};return G.forEachEntry(e,(e,o)=>{t(function(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),o,n,0)}),n}return null},xe={transitional:de,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",o=n.indexOf("application/json")>-1,r=G.isObject(e);if(r&&G.isHTMLForm(e)&&(e=new FormData(e)),G.isFormData(e))return o?JSON.stringify(ye(e)):e;if(G.isArrayBuffer(e)||G.isBuffer(e)||G.isStream(e)||G.isFile(e)||G.isBlob(e)||G.isReadableStream(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 s;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return oe(e,new ve.classes.URLSearchParams,{visitor:function(e,t,n,o){return ve.isNode&&G.isBuffer(e)?(this.append(t,e.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((s=G.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return oe(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return r||o?(t.setContentType("application/json",!1),function(e){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||xe.transitional,n=t&&t.forcedJSONParsing,o="json"===this.responseType;if(G.isResponse(e)||G.isReadableStream(e))return e;if(e&&G.isString(e)&&(n&&!this.responseType||o)){const n=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw X.from(e,X.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:ve.classes.FormData,Blob:ve.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=>{xe.headers[e]={}});const je=xe,we=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"]),ke=Symbol("internals");function _e(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 Se(e,t,n,o,r){return G.isFunction(o)?o.call(this,t,n):(r&&(t=n),G.isString(t)?G.isString(o)?-1!==t.indexOf(o):G.isRegExp(o)?o.test(t):void 0:void 0)}class Ee{constructor(e){e&&this.set(e)}set(e,t,n){const o=this;function r(e,t,n){const r=_e(t);if(!r)throw new Error("header name must be a non-empty string");const s=G.findKey(o,r);(!s||void 0===o[s]||!0===n||void 0===n&&!1!==o[s])&&(o[s||t]=Ce(e))}const s=(e,t)=>G.forEach(e,(e,n)=>r(e,n,t));if(G.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(G.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let n,o,r;return e&&e.split("\n").forEach(function(e){r=e.indexOf(":"),n=e.substring(0,r).trim().toLowerCase(),o=e.substring(r+1).trim(),!n||t[n]&&we[n]||("set-cookie"===n?t[n]?t[n].push(o):t[n]=[o]:t[n]=t[n]?t[n]+", "+o:o)}),t})(e),t);else if(G.isObject(e)&&G.isIterable(e)){let n,o,r={};for(const t of e){if(!G.isArray(t))throw TypeError("Object iterator must return a key-value pair");r[o=t[0]]=(n=r[o])?G.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}s(r,t)}else null!=e&&r(t,e,n);return this}get(e,t){if(e=_e(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 o;for(;o=n.exec(e);)t[o[1]]=o[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=_e(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 o=!1;function r(e){if(e=_e(e)){const r=G.findKey(n,e);!r||t&&!Se(0,n[r],r,t)||(delete n[r],o=!0)}}return G.isArray(e)?e.forEach(r):r(e),o}clear(e){const t=Object.keys(this);let n=t.length,o=!1;for(;n--;){const r=t[n];e&&!Se(0,this[r],r,e,!0)||(delete this[r],o=!0)}return o}normalize(e){const t=this,n={};return G.forEach(this,(o,r)=>{const s=G.findKey(n,r);if(s)return t[s]=Ce(o),void delete t[r];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(r):String(r).trim();i!==r&&delete t[r],t[i]=Ce(o),n[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return G.forEach(this,(n,o)=>{null!=n&&!1!==n&&(t[o]=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")}getSetCookie(){return this.get("set-cookie")||[]}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[ke]=this[ke]={accessors:{}}).accessors,n=this.prototype;function o(e){const o=_e(e);t[o]||(function(e,t){const n=G.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(e,o+n,{value:function(e,n,r){return this[o].call(this,t,e,n,r)},configurable:!0})})}(n,e),t[o]=!0)}return G.isArray(e)?e.forEach(o):o(e),this}}Ee.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),G.reduceDescriptors(Ee.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),G.freezeMethods(Ee);const Ae=Ee;function Te(e,t){const n=this||je,o=t||n,r=Ae.from(o.headers);let s=o.data;return G.forEach(e,function(e){s=e.call(n,s,r.normalize(),t?t.status:void 0)}),r.normalize(),s}function Oe(e){return!(!e||!e.__CANCEL__)}function Ne(e,t,n){X.call(this,null==e?"canceled":e,X.ERR_CANCELED,t,n),this.name="CanceledError"}G.inherits(Ne,X,{__CANCEL__:!0});const Re=Ne;function De(e,t,n){const o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(new X("Request failed with status code "+n.status,[X.ERR_BAD_REQUEST,X.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Me=(e,t,n=3)=>{let o=0;const r=function(e,t){e=e||10;const n=new Array(e),o=new Array(e);let r,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=o[i];r||(r=l),n[s]=a,o[s]=l;let u=i,d=0;for(;u!==s;)d+=n[u++],u%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),l-r<t)return;const h=c&&l-c;return h?Math.round(1e3*d/h):void 0}}(50,250);return function(e,t){let n,o,r=0,s=1e3/t;const i=(t,s=Date.now())=>{r=s,n=null,o&&(clearTimeout(o),o=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-r;a>=s?i(e,t):(n=e,o||(o=setTimeout(()=>{o=null,i(n)},s-a)))},()=>n&&i(n)]}(n=>{const s=n.loaded,i=n.lengthComputable?n.total:void 0,a=s-o,l=r(a);o=s,e({loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:l||void 0,estimated:l&&i&&s<=i?(i-s)/l:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})},n)},Le=(e,t)=>{const n=null!=e;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},Pe=e=>(...t)=>G.asap(()=>e(...t)),Ie=ve.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,ve.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(ve.origin),ve.navigator&&/(msie|trident)/i.test(ve.navigator.userAgent)):()=>!0,Fe=ve.hasStandardBrowserEnv?{write(e,t,n,o,r,s,i){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];G.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),G.isString(o)&&a.push(`path=${o}`),G.isString(r)&&a.push(`domain=${r}`),!0===s&&a.push("secure"),G.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function Ue(e,t,n){let o=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(o||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Be=e=>e instanceof Ae?{...e}:e;function Qe(e,t){t=t||{};const n={};function o(e,t,n,o){return G.isPlainObject(e)&&G.isPlainObject(t)?G.merge.call({caseless:o},e,t):G.isPlainObject(t)?G.merge({},t):G.isArray(t)?t.slice():t}function r(e,t,n,r){return G.isUndefined(t)?G.isUndefined(e)?void 0:o(void 0,e,0,r):o(e,t,0,r)}function s(e,t){if(!G.isUndefined(t))return o(void 0,t)}function i(e,t){return G.isUndefined(t)?G.isUndefined(e)?void 0:o(void 0,e):o(void 0,t)}function a(n,r,s){return s in t?o(n,r):s in e?o(void 0,n):void 0}const l={url:s,method:s,data:s,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:a,headers:(e,t,n)=>r(Be(e),Be(t),0,!0)};return G.forEach(Object.keys({...e,...t}),function(o){const s=l[o]||r,i=s(e[o],t[o],o);G.isUndefined(i)&&s!==a||(n[o]=i)}),n}const ze=e=>{const t=Qe({},e);let{data:n,withXSRFToken:o,xsrfHeaderName:r,xsrfCookieName:s,headers:i,auth:a}=t;if(t.headers=i=Ae.from(i),t.url=ce(Ue(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),G.isFormData(n))if(ve.hasStandardBrowserEnv||ve.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(G.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&i.set(e,n)})}if(ve.hasStandardBrowserEnv&&(o&&G.isFunction(o)&&(o=o(t)),o||!1!==o&&Ie(t.url))){const e=r&&s&&Fe.read(s);e&&i.set(r,e)}return t},qe="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const o=ze(e);let r=o.data;const s=Ae.from(o.headers).normalize();let i,a,l,c,u,{responseType:d,onUploadProgress:h,onDownloadProgress:p}=o;function f(){c&&c(),u&&u(),o.cancelToken&&o.cancelToken.unsubscribe(i),o.signal&&o.signal.removeEventListener("abort",i)}let m=new XMLHttpRequest;function g(){if(!m)return;const o=Ae.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());De(function(e){t(e),f()},function(e){n(e),f()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:o,config:e,request:m}),m=null}m.open(o.method.toUpperCase(),o.url,!0),m.timeout=o.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new X("Request aborted",X.ECONNABORTED,e,m)),m=null)},m.onerror=function(t){const o=t&&t.message?t.message:"Network Error",r=new X(o,X.ERR_NETWORK,e,m);r.event=t||null,n(r),m=null},m.ontimeout=function(){let t=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const r=o.transitional||de;o.timeoutErrorMessage&&(t=o.timeoutErrorMessage),n(new X(t,r.clarifyTimeoutError?X.ETIMEDOUT:X.ECONNABORTED,e,m)),m=null},void 0===r&&s.setContentType(null),"setRequestHeader"in m&&G.forEach(s.toJSON(),function(e,t){m.setRequestHeader(t,e)}),G.isUndefined(o.withCredentials)||(m.withCredentials=!!o.withCredentials),d&&"json"!==d&&(m.responseType=o.responseType),p&&([l,u]=Me(p,!0),m.addEventListener("progress",l)),h&&m.upload&&([a,c]=Me(h),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",c)),(o.cancelToken||o.signal)&&(i=t=>{m&&(n(!t||t.type?new Re(null,e,m):t),m.abort(),m=null)},o.cancelToken&&o.cancelToken.subscribe(i),o.signal&&(o.signal.aborted?i():o.signal.addEventListener("abort",i)));const b=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(o.url);b&&-1===ve.protocols.indexOf(b)?n(new X("Unsupported protocol "+b+":",X.ERR_BAD_REQUEST,e)):m.send(r||null)})},He=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,o=new AbortController;const r=function(e){if(!n){n=!0,i();const t=e instanceof Error?e:this.reason;o.abort(t instanceof X?t:new Re(t instanceof Error?t.message:t))}};let s=t&&setTimeout(()=>{s=null,r(new X(`timeout ${t} of ms exceeded`,X.ETIMEDOUT))},t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(r):e.removeEventListener("abort",r)}),e=null)};e.forEach(e=>e.addEventListener("abort",r));const{signal:a}=o;return a.unsubscribe=()=>G.asap(i),a}},Ve=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let o,r=0;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},We=(e,t,n,o)=>{const r=async function*(e,t){for await(const n of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}}(e))yield*Ve(n,t)}(e,t);let s,i=0,a=e=>{s||(s=!0,o&&o(e))};return new ReadableStream({async pull(e){try{const{done:t,value:o}=await r.next();if(t)return a(),void e.close();let s=o.byteLength;if(n){let e=i+=s;n(e)}e.enqueue(new Uint8Array(o))}catch(e){throw a(e),e}},cancel:e=>(a(e),r.return())},{highWaterMark:2})},{isFunction:Ke}=G,Ge=(({Request:e,Response:t})=>({Request:e,Response:t}))(G.global),{ReadableStream:Ye,TextEncoder:Je}=G.global,$e=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Xe=e=>{e=G.merge.call({skipUndefined:!0},Ge,e);const{fetch:t,Request:n,Response:o}=e,r=t?Ke(t):"function"==typeof fetch,s=Ke(n),i=Ke(o);if(!r)return!1;const a=r&&Ke(Ye),l=r&&("function"==typeof Je?(c=new Je,e=>c.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var c;const u=s&&a&&$e(()=>{let e=!1;const t=new n(ve.origin,{body:new Ye,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=i&&a&&$e(()=>G.isReadableStream(new o("").body)),h={stream:d&&(e=>e.body)};r&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!h[e]&&(h[e]=(t,n)=>{let o=t&&t[e];if(o)return o.call(t);throw new X(`Response type '${e}' is not supported`,X.ERR_NOT_SUPPORT,n)})});return async e=>{let{url:r,method:i,data:a,signal:c,cancelToken:p,timeout:f,onDownloadProgress:m,onUploadProgress:g,responseType:b,headers:v,withCredentials:y="same-origin",fetchOptions:x}=ze(e),j=t||fetch;b=b?(b+"").toLowerCase():"text";let w=He([c,p&&p.toAbortSignal()],f),k=null;const _=w&&w.unsubscribe&&(()=>{w.unsubscribe()});let C;try{if(g&&u&&"get"!==i&&"head"!==i&&0!==(C=await(async(e,t)=>{const o=G.toFiniteNumber(e.getContentLength());return null==o?(async e=>{if(null==e)return 0;if(G.isBlob(e))return e.size;if(G.isSpecCompliantForm(e)){const t=new n(ve.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return G.isArrayBufferView(e)||G.isArrayBuffer(e)?e.byteLength:(G.isURLSearchParams(e)&&(e+=""),G.isString(e)?(await l(e)).byteLength:void 0)})(t):o})(v,a))){let e,t=new n(r,{method:"POST",body:a,duplex:"half"});if(G.isFormData(a)&&(e=t.headers.get("content-type"))&&v.setContentType(e),t.body){const[e,n]=Le(C,Me(Pe(g)));a=We(t.body,65536,e,n)}}G.isString(y)||(y=y?"include":"omit");const t=s&&"credentials"in n.prototype,c={...x,signal:w,method:i.toUpperCase(),headers:v.normalize().toJSON(),body:a,duplex:"half",credentials:t?y:void 0};k=s&&new n(r,c);let p=await(s?j(k,x):j(r,c));const f=d&&("stream"===b||"response"===b);if(d&&(m||f&&_)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=p[t]});const t=G.toFiniteNumber(p.headers.get("content-length")),[n,r]=m&&Le(t,Me(Pe(m),!0))||[];p=new o(We(p.body,65536,n,()=>{r&&r(),_&&_()}),e)}b=b||"text";let S=await h[G.findKey(h,b)||"text"](p,e);return!f&&_&&_(),await new Promise((t,n)=>{De(t,n,{data:S,headers:Ae.from(p.headers),status:p.status,statusText:p.statusText,config:e,request:k})})}catch(t){if(_&&_(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new X("Network Error",X.ERR_NETWORK,e,k),{cause:t.cause||t});throw X.from(t,t&&t.code,e,k)}}},Ze=new Map,et=e=>{let t=e&&e.env||{};const{fetch:n,Request:o,Response:r}=t,s=[o,r,n];let i,a,l=s.length,c=Ze;for(;l--;)i=s[l],a=c.get(i),void 0===a&&c.set(i,a=l?new Map:Xe(t)),c=a;return a},tt=(et(),{http:null,xhr:qe,fetch:{get:et}});G.forEach(tt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const nt=e=>`- ${e}`,ot=e=>G.isFunction(e)||null===e||!1===e,rt=function(e,t){e=G.isArray(e)?e:[e];const{length:n}=e;let o,r;const s={};for(let i=0;i<n;i++){let n;if(o=e[i],r=o,!ot(o)&&(r=tt[(n=String(o)).toLowerCase()],void 0===r))throw new X(`Unknown adapter '${n}'`);if(r&&(G.isFunction(r)||(r=r.get(t))))break;s[n||"#"+i]=r}if(!r){const e=Object.entries(s).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(nt).join("\n"):" "+nt(e[0]):"as no adapter specified";throw new X("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return r};function st(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Re(null,e)}function it(e){return st(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),rt(e.adapter||je.adapter,e)(e).then(function(t){return st(e),t.data=Te.call(e,e.transformResponse,t),t.headers=Ae.from(t.headers),t},function(t){return Oe(t)||(st(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 at="1.13.2",lt={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{lt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const ct={};lt.transitional=function(e,t,n){function o(e,t){return"[Axios v"+at+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,r,s)=>{if(!1===e)throw new X(o(r," has been removed"+(t?" in "+t:"")),X.ERR_DEPRECATED);return t&&!ct[r]&&(ct[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,s)}},lt.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const ut={assertOptions:function(e,t,n){if("object"!=typeof e)throw new X("options must be an object",X.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let r=o.length;for(;r-- >0;){const s=o[r],i=t[s];if(i){const t=e[s],n=void 0===t||i(t,s,e);if(!0!==n)throw new X("option "+s+" must be "+n,X.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new X("Unknown option "+s,X.ERR_BAD_OPTION)}},validators:lt},dt=ut.validators;class ht{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/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Qe(this.defaults,t);const{transitional:n,paramsSerializer:o,headers:r}=t;void 0!==n&&ut.assertOptions(n,{silentJSONParsing:dt.transitional(dt.boolean),forcedJSONParsing:dt.transitional(dt.boolean),clarifyTimeoutError:dt.transitional(dt.boolean)},!1),null!=o&&(G.isFunction(o)?t.paramsSerializer={serialize:o}:ut.assertOptions(o,{encode:dt.function,serialize:dt.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),ut.assertOptions(t,{baseUrl:dt.spelling("baseURL"),withXsrfToken:dt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=r&&G.merge(r.common,r[t.method]);r&&G.forEach(["delete","get","head","post","put","patch","common"],e=>{delete r[e]}),t.headers=Ae.concat(s,r);const i=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))});const l=[];let c;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let u,d=0;if(!a){const e=[it.bind(this),void 0];for(e.unshift(...i),e.push(...l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=i.length;let h=t;for(;d<u;){const e=i[d++],t=i[d++];try{h=e(h)}catch(e){t.call(this,e);break}}try{c=it.call(this,h)}catch(e){return Promise.reject(e)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return ce(Ue((e=Qe(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}G.forEach(["delete","get","head","options"],function(e){ht.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,o,r){return this.request(Qe(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:o}))}}ht.prototype[e]=t(),ht.prototype[e+"Form"]=t(!0)});const pt=ht;class ft{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 o=new Promise(e=>{n.subscribe(e),t=e}).then(e);return o.cancel=function(){n.unsubscribe(t)},o},e(function(e,o,r){n.reason||(n.reason=new Re(e,o,r),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)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new ft(function(t){e=t}),cancel:e}}}const mt=ft,gt={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(gt).forEach(([e,t])=>{gt[t]=e});const bt=gt,vt=function e(t){const n=new pt(t),o=r(pt.prototype.request,n);return G.extend(o,pt.prototype,n,{allOwnKeys:!0}),G.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return e(Qe(t,n))},o}(je);vt.Axios=pt,vt.CanceledError=Re,vt.CancelToken=mt,vt.isCancel=Oe,vt.VERSION=at,vt.toFormData=oe,vt.AxiosError=X,vt.Cancel=vt.CanceledError,vt.all=function(e){return Promise.all(e)},vt.spread=function(e){return function(t){return e.apply(null,t)}},vt.isAxiosError=function(e){return G.isObject(e)&&!0===e.isAxiosError},vt.mergeConfig=Qe,vt.AxiosHeaders=Ae,vt.formToJSON=e=>ye(G.isHTMLForm(e)?new FormData(e):e),vt.getAdapter=rt,vt.HttpStatusCode=bt,vt.default=vt;const yt=vt},1289:(e,t,n)=>{"use strict";n.d(t,{m:()=>i});var o=n(5540),r=n(3287),s=n(941),i=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!s.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,o.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}(r.Q))},1609:e=>{"use strict";e.exports=window.React},2532:(e,t,n)=>{"use strict";n.d(t,{QueryClientProvider:()=>f,useMutation:()=>w,useQuery:()=>D,useQueryClient:()=>p});var o=n(428),r=n(5795),s=n.n(r)().unstable_batchedUpdates;o.j.setBatchNotifyFunction(s);var i=n(9690),a=console;(0,i.B)(a);var l=n(1609),c=n.n(l),u=c().createContext(void 0),d=c().createContext(!1);function h(e){return e&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=u),window.ReactQueryClientContext):u}var p=function(){var e=c().useContext(h(c().useContext(d)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},f=function(e){var t=e.client,n=e.contextSharing,o=void 0!==n&&n,r=e.children;c().useEffect(function(){return t.mount(),function(){t.unmount()}},[t]);var s=h(o);return c().createElement(d.Provider,{value:o},c().createElement(s.Provider,{value:t},r))},m=n(8168),g=n(941),b=n(5540),v=n(3465),y=n(3287),x=function(e){function t(t,n){var o;return(o=e.call(this)||this).client=t,o.setOptions(n),o.bindMethods(),o.updateResult(),o}(0,b.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,m.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,v.$)(),t=(0,m.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;o.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}(y.Q);function j(e,t,n){return"function"==typeof t?t.apply(void 0,n):"boolean"==typeof t?t:!!e}function w(e,t,n){var r=c().useRef(!1),s=c().useState(0)[1],i=(0,g.GR)(e,t,n),a=p(),l=c().useRef();l.current?l.current.setOptions(i):l.current=new x(a,i);var u=l.current.getCurrentResult();c().useEffect(function(){r.current=!0;var e=l.current.subscribe(o.j.batchCalls(function(){r.current&&s(function(e){return e+1})}));return function(){r.current=!1,e()}},[]);var d=c().useCallback(function(e,t){l.current.mutate(e,t).catch(g.lQ)},[]);if(u.error&&j(void 0,l.current.options.useErrorBoundary,[u.error]))throw u.error;return(0,m.A)({},u,{mutate:d,mutateAsync:u.mutate})}var k=n(1289),_=n(6281),C=function(e){function t(t,n){var o;return(o=e.call(this)||this).client=t,o.options=n,o.trackedProps=[],o.selectError=null,o.bindMethods(),o.setOptions(n),o}(0,b.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),S(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},n.onUnsubscribe=function(){this.listeners.length||this.destroy()},n.shouldFetchOnReconnect=function(){return E(this.currentQuery,this.options,this.options.refetchOnReconnect)},n.shouldFetchOnWindowFocus=function(){return E(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,o=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 r=this.hasListeners();r&&A(this.currentQuery,o,this.options,n)&&this.executeFetch(),this.updateResult(t),!r||this.currentQuery===o&&this.options.enabled===n.enabled&&this.options.staleTime===n.staleTime||this.updateStaleTimeout();var s=this.computeRefetchInterval();!r||this.currentQuery===o&&this.options.enabled===n.enabled&&s===this.currentRefetchInterval||this.updateRefetchInterval(s)},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,o={},r=function(e){n.trackedProps.includes(e)||n.trackedProps.push(e)};return Object.keys(e).forEach(function(t){Object.defineProperty(o,t,{configurable:!1,enumerable:!0,get:function(){return r(t),e[t]}})}),(t.useErrorBoundary||t.suspense)&&r("error"),o},n.getNextResult=function(e){var t=this;return new Promise(function(n,o){var r=t.subscribe(function(t){t.isFetching||(r(),t.isError&&(null==e?void 0:e.throwOnError)?o(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,m.A)({},e,{meta:{refetchPage:null==e?void 0:e.refetchPage}}))},n.fetchOptimistic=function(e){var t=this,n=this.client.defaultQueryObserverOptions(e),o=this.client.getQueryCache().build(this.client,n);return o.fetch().then(function(){return t.createResult(o,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(g.lQ)),t},n.updateStaleTimeout=function(){var e=this;if(this.clearStaleTimeout(),!g.S$&&!this.currentResult.isStale&&(0,g.gn)(this.options.staleTime)){var t=(0,g.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,!g.S$&&!1!==this.options.enabled&&(0,g.gn)(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval(function(){(t.options.refetchIntervalInBackground||k.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,o=this.currentQuery,r=this.options,s=this.currentResult,a=this.currentResultState,l=this.currentResultOptions,c=e!==o,u=c?e.state:this.currentQueryInitialState,d=c?this.currentResult:this.previousQueryResult,h=e.state,p=h.dataUpdatedAt,f=h.error,m=h.errorUpdatedAt,b=h.isFetching,v=h.status,y=!1,x=!1;if(t.optimisticResults){var j=this.hasListeners(),w=!j&&S(e,t),k=j&&A(e,o,t,r);(w||k)&&(b=!0,p||(v="loading"))}if(t.keepPreviousData&&!h.dataUpdateCount&&(null==d?void 0:d.isSuccess)&&"error"!==v)n=d.data,p=d.dataUpdatedAt,v=d.status,y=!0;else if(t.select&&void 0!==h.data)if(s&&h.data===(null==a?void 0:a.data)&&t.select===this.selectFn)n=this.selectResult;else try{this.selectFn=t.select,n=t.select(h.data),!1!==t.structuralSharing&&(n=(0,g.BH)(null==s?void 0:s.data,n)),this.selectResult=n,this.selectError=null}catch(e){(0,i.t)().error(e),this.selectError=e}else n=h.data;if(void 0!==t.placeholderData&&void 0===n&&("loading"===v||"idle"===v)){var _;if((null==s?void 0:s.isPlaceholderData)&&t.placeholderData===(null==l?void 0:l.placeholderData))_=s.data;else if(_="function"==typeof t.placeholderData?t.placeholderData():t.placeholderData,t.select&&void 0!==_)try{_=t.select(_),!1!==t.structuralSharing&&(_=(0,g.BH)(null==s?void 0:s.data,_)),this.selectError=null}catch(e){(0,i.t)().error(e),this.selectError=e}void 0!==_&&(v="success",n=_,x=!0)}return this.selectError&&(f=this.selectError,n=this.selectResult,m=Date.now(),v="error"),{status:v,isLoading:"loading"===v,isSuccess:"success"===v,isError:"error"===v,isIdle:"idle"===v,data:n,dataUpdatedAt:p,error:f,errorUpdatedAt:m,failureCount:h.fetchFailureCount,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&"loading"!==v,isLoadingError:"error"===v&&0===h.dataUpdatedAt,isPlaceholderData:x,isPreviousData:y,isRefetchError:"error"===v&&0!==h.dataUpdatedAt,isStale:T(e,t),refetch:this.refetch,remove:this.remove}},n.shouldNotifyListeners=function(e,t){if(!t)return!0;var n=this.options,o=n.notifyOnChangeProps,r=n.notifyOnChangePropsExclusions;if(!o&&!r)return!0;if("tracked"===o&&!this.trackedProps.length)return!0;var s="tracked"===o?this.trackedProps:o;return Object.keys(e).some(function(n){var o=n,i=e[o]!==t[o],a=null==s?void 0:s.some(function(e){return e===n}),l=null==r?void 0:r.some(function(e){return e===n});return i&&!l&&(!s||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,g.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,m.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,_.wm)(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()},n.notify=function(e){var t=this;o.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}(y.Q);function S(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&&E(e,t,t.refetchOnMount)}function E(e,t,n){if(!1!==t.enabled){var o="function"==typeof n?n(e):n;return"always"===o||!1!==o&&T(e,t)}return!1}function A(e,t,n,o){return!1!==n.enabled&&(e!==t||!1===o.enabled)&&(!n.suspense||"error"!==e.state.status)&&T(e,n)}function T(e,t){return e.isStaleByTime(t.staleTime)}var O,N=c().createContext((O=!1,{clearReset:function(){O=!1},reset:function(){O=!0},isReset:function(){return O}})),R=function(){return c().useContext(N)};function D(e,t,n){return function(e,t){var n=c().useRef(!1),r=c().useState(0)[1],s=p(),i=R(),a=s.defaultQueryObserverOptions(e);a.optimisticResults=!0,a.onError&&(a.onError=o.j.batchCalls(a.onError)),a.onSuccess&&(a.onSuccess=o.j.batchCalls(a.onSuccess)),a.onSettled&&(a.onSettled=o.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 l=c().useState(function(){return new t(s,a)})[0],u=l.getOptimisticResult(a);if(c().useEffect(function(){n.current=!0,i.clearReset();var e=l.subscribe(o.j.batchCalls(function(){n.current&&r(function(e){return e+1})}));return l.updateResult(),function(){n.current=!1,e()}},[i,l]),c().useEffect(function(){l.setOptions(a,{listeners:!1})},[a,l]),a.suspense&&u.isLoading)throw l.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(u.isError&&!i.isReset()&&!u.isFetching&&j(a.suspense,a.useErrorBoundary,[u.error,l.getCurrentQuery()]))throw u.error;return"tracked"===a.notifyOnChangeProps&&(u=l.trackResult(u,a)),u}((0,g.vh)(e,t,n),C)}},2694:(e,t,n)=>{"use strict";var o=n(6925);function r(){}function s(){}s.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,s,i){if(i!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:s,resetWarningCache:r};return n.PropTypes=n,n}},3287:(e,t,n)=>{"use strict";n.d(t,{Q:()=>o});var o=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}()},3465:(e,t,n)=>{"use strict";n.d(t,{$:()=>c,s:()=>l});var o=n(8168),r=n(9690),s=n(428),i=n(6281),a=n(941),l=function(){function e(e){this.options=(0,o.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,o=Promise.resolve();return n||(this.dispatch({type:"loading",variables:this.options.variables}),o=o.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})})),o.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,r.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,o.A)({},e,{failureCount:e.failureCount+1});case"pause":return(0,o.A)({},e,{isPaused:!0});case"continue":return(0,o.A)({},e,{isPaused:!1});case"loading":return(0,o.A)({},e,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return(0,o.A)({},e,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return(0,o.A)({},e,{data:void 0,error:t.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return(0,o.A)({},e,t.state);default:return e}}(this.state,e),s.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}}},4468:(e,t,n)=>{"use strict";n.d(t,{QueryClient:()=>o.E});var o=n(7098),r=n(6449);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}})},4622:(e,t,n)=>{"use strict";n.d(t,{t:()=>i});var o=n(5540),r=n(3287),s=n(941),i=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!s.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,o.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}(r.Q))},5148:(e,t,n)=>{"use strict";n.d(t,{HZ:()=>g,Nb:()=>a,_o:()=>l,b0:()=>b,cV:()=>u,cl:()=>v,qL:()=>s,sJ:()=>i,tP:()=>h,wM:()=>m});var o=n(174),r=n(5942);function s(e,t="",n=!1){return(0,r.useQuery)(["blocks-data",e],function(r){return n=-1!=window.location.href.indexOf("wp-admin"),o.A.get("blocks_data/"+e+"?mode="+t+"&admin="+n+"&_locale=user")},{enabled:!0,retry:2,onSuccess:p,onError:f,refetchInterval:6e4,meta:t})}function i(e,t){return(0,r.useQuery)(["member-evaluation"],function(n){return o.A.get("member_evaluation?member="+e+"&project="+t+"&_locale=user")},{enabled:!0,retry:2,refetchInterval:!1})}function a(e,t,n){return(0,r.useMutation)(async function(t){return t.post_id=e,await o.A.post("evaluation?_locale=user",t)},{onSuccess:(e,o,r,s)=>{n(e.data.status),t(e.data.message)},onError:(e,t,o)=>{n("error posting evaluation"),console.log("error posting evaluation",e)}})}function l(e,t){const n=(0,r.useQueryClient)().getQueryData(["blocks-data",e]);return function(e,o){const r=n.data;return r.blocksdata[t].attrs[e]=o,r}}async function c(e){return await o.A.post("update_agenda?_locale=user",e)}function u(e,t=null,n=null){const o=(0,r.useQueryClient)();return(0,r.useMutation)(c,{onMutate:async r=>{await o.cancelQueries(["blocks-data",e]);const s=o.getQueryData(["blocks-data",e]);return o.setQueryData(["blocks-data",e],e=>{const{data:t}=e;return{...e,data:{...t,blocksdata:r.blocksdata}}}),t&&t("Updating ..."),n&&n.setInsert&&n.setInsert(""),{previousValue:s}},onSettled:(e,t,n,r)=>{o.invalidateQueries(["blocks-data",n.post_id])},onSuccess:(e,n,o,r)=>{t&&t("Updated")},onError:(e,n,r)=>{t&&t("Error "+e.message),console.log("updateAgenda error",e),o.setQueryData("blocks-data",r.previousValue)}})}async function d(e,t){return await o.A.post("update_agenda?_locale=user",{post_id:e,template_id:t})}function h(e,t){const n=(0,r.useQueryClient)();return(0,r.useMutation)(d,{onSuccess:(e,t,n,o)=>{makeNotification("Agenda Copied")},onError:(e,t,o)=>{makeNotification("Error "+e.message),console.log("updateAgenda error",e),n.setQueryData("blocks-data",o.previousValue)}})}function p(e){e.current_user_id&&(setCurrentUserId(e.current_user_id),setPostId(e.post_id))}function f(e){console.log("error downloading data",e)}function m(e,t,n){return(0,r.useQuery)(["evaluation",e],function(n){return o.A.get("evaluation/?project="+e+"&speaker="+t+"&_locale=user")},{enabled:!0,retry:2,onSuccess:n,onError:f,refetchInterval:!1,refetchOnWindowFocus:!1})}function g(e){return(0,r.useMutation)(async function(e){return await o.A.post("user_meta?_locale=user",e)},{onSuccess:(t,n,o,r)=>{e(t.data.status)},onError:(t,n,o)=>{e("error posting preference"),console.log("error posting preference",t)}})}function b(e,t=0,n){return(0,r.useQuery)(["voting",t],function(n){const r=(new Date).getTime();console.log("get","regularvoting/"+t+"?mobile="+e+"&ts="+r);const s=o.A.get("regularvoting/"+t+"?mobile="+e+"&ts="+r+"&_locale=user");return console.log("result",s),s},{enabled:!0,retry:2,onSuccess:e=>{n(e.data),console.log("voting data fetched",e)},onError:f,refetchInterval:6e4})}function v(e){return(0,r.useMutation)(async function(e){const t=(new Date).getTime();return console.log("voting postdata",e),await o.A.post("regularvoting/"+e.post_id+"?mobile="+e.identifier+"&ts="+t+"&_locale=user",e)},{onSuccess:(t,n,o,r)=>{e(t.data),console.log("data returned",t)},onError:(e,t,n)=>{console.log("error posting evaluation",e)}})}},5264:(e,t,n)=>{"use strict";function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.CopyToClipboard=void 0;var r=a(n(1609)),s=a(n(7965)),i=["text","onCopy","options","children"];function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach(function(t){f(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function d(e,t){return d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},d(e,t)}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(g,e);var t,n,a,l,m=(a=g,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=p(a);if(l){var n=p(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return h(e)}(this,e)});function g(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return f(h(e=m.call.apply(m,[this].concat(n))),"onClick",function(t){var n=e.props,o=n.text,i=n.onCopy,a=n.children,l=n.options,c=r.default.Children.only(a),u=(0,s.default)(o,l);i&&i(o,u),c&&c.props&&"function"==typeof c.props.onClick&&c.props.onClick(t)}),e}return t=g,(n=[{key:"render",value:function(){var e=this.props,t=(e.text,e.onCopy,e.options,e.children),n=function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},s=Object.keys(e);for(o=0;o<s.length;o++)n=s[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)n=s[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,i),o=r.default.Children.only(t);return r.default.cloneElement(o,c(c({},n),{},{onClick:this.onClick}))}}])&&u(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),g}(r.default.PureComponent);t.CopyToClipboard=m,f(m,"defaultProps",{onCopy:void 0,options:void 0})},5286:(e,t,n)=>{"use strict";n.d(t,{Ej:()=>s,RU:()=>i,Up:()=>r,bm:()=>l,dW:()=>c,ep:()=>a});var o=n(790);function r(e){const{type:t}=e;return(0,o.jsxs)("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",children:[(0,o.jsxs)("title",{children:["Move Up ",t]}),(0,o.jsx)("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 s(e){const{type:t}=e;return(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-arrow-up-circle-fill",viewBox:"0 0 16 16",children:[(0,o.jsxs)("title",{children:["Move to Top ",t]}),(0,o.jsx)("path",{d:"M16 8A8 8 0 1 0 0 8a8 8 0 0 0 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 i(e){const{type:t}=e;return(0,o.jsxs)("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",children:[(0,o.jsxs)("title",{children:["Move Down ",t]}),(0,o.jsx)("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 a(e){const{type:t}=e;return(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-trash",viewBox:"0 0 16 16",children:[(0,o.jsxs)("title",{children:["Delete ",t]}),(0,o.jsx)("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,o.jsx)("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 l(){return(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-chevron-bar-contract",viewBox:"0 0 16 16",children:[(0,o.jsx)("title",{children:"Close Gaps (Unassigned)"}),(0,o.jsx)("path",{"fill-rule":"evenodd",d:"M3.646 14.854a.5.5 0 0 0 .708 0L8 11.207l3.646 3.647a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 0 0 0 .708zm0-13.708a.5.5 0 0 1 .708 0L8 4.793l3.646-3.647a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 0-.708zM1 8a.5.5 0 0 1 .5-.5h13a.5.5 0 0 1 0 1h-13A.5.5 0 0 1 1 8z"})]})}function c(){return(0,o.jsxs)("div",{className:"yoodli-promo",children:[(0,o.jsx)("div",{children:(0,o.jsx)("a",{href:"https://toastmasters.yoodli.ai/",target:"_blank",children:(0,o.jsxs)("svg",{"data-bbox":"0 -30 826 263",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 790 220",height:"50",width:"150","data-type":"ugc","aria-hidden":"true","aria-labelledby":"svgcid--4ssaar9x3u6k",children:[(0,o.jsx)("path",{fill:"url(#YoodliTextLogo_svg__a)",d:"M149.194 82.786c-2.896-8.722-12.549-13.465-21.72-10.71-5.148 1.53-9.17 5.202-10.94 9.945 9.814 5.815 20.272 10.405 31.051 14.078 2.574-3.979 3.057-8.875 1.609-13.313z"}),(0,o.jsx)("path",{fill:"#6966FD",d:"M149.194 82.786c-2.896-8.722-12.549-13.465-21.72-10.71-5.148 1.53-9.17 5.202-10.94 9.945 9.814 5.815 20.272 10.405 31.051 14.078 2.574-3.979 3.057-8.875 1.609-13.313z"}),(0,o.jsx)("path",{fill:"url(#YoodliTextLogo_svg__b)",d:"M115.248 95.027c.16.612.482 1.224.804 1.836l-1.931 4.438 12.871 6.426c1.931.919 3.701 1.837 5.47 2.755l3.057-4.438c.483-.153.966-.153 1.287-.306 3.057-.918 5.631-2.601 7.723-4.743a174.996 174.996 0 0 1-29.925-13.772 14.536 14.536 0 0 0 .644 7.804z"}),(0,o.jsx)("path",{fill:"#6966FD",d:"M115.248 95.027c.16.612.482 1.224.804 1.836l-1.931 4.438 12.871 6.426c1.931.919 3.701 1.837 5.47 2.755l3.057-4.438c.483-.153.966-.153 1.287-.306 3.057-.918 5.631-2.601 7.723-4.743a174.996 174.996 0 0 1-29.925-13.772c-.483 2.602-.322 5.203.644 7.804z"}),(0,o.jsx)("path",{fill:"url(#YoodliTextLogo_svg__c)",d:"m111.224 105.892-8.527 20.045v.153l-38.934 74.518c-1.127 3.366-4.827 5.203-8.366 4.285l-.322-.153c-3.057-.766-4.827-3.673-4.023-6.427.161-.306.161-.612.322-.918l73.204-143.682c4.987-9.793.643-21.575-9.653-26.318-.644-.306-1.448-.612-2.092-.765l-.483-.153c-9.975-3.367-20.915.918-25.58 9.945l-39.579 77.12c-2.896 5.662-9.975 7.957-15.928 5.203-5.47-2.448-8.044-8.569-5.952-13.925.16-.459.321-.765.482-1.224l37.004-71.305c4.988-9.793.805-21.575-9.492-26.319-9.975-4.59-22.042-.918-27.35 8.416l-25.1 45.14c-1.93 3.52-.482 7.804 3.219 9.64 3.7 1.836 8.205.459 10.135-2.908l25.099-45.139c1.448-2.601 4.826-3.52 7.562-2.142 2.574 1.224 3.7 4.131 2.574 6.58l-.161.458-37.004 71.306c-6.758 12.547-1.61 28.155 11.744 34.581 13.193 6.427 29.604 1.53 36.361-11.17l.483-.918 39.578-77.273a5.732 5.732 0 0 1 6.918-2.754l.483.153c2.896.918 4.504 3.978 3.378 6.733 0 .153-.161.306-.321.459L37.699 190.662c-2.735 5.356-2.735 11.476-.161 16.832 2.413 5.202 7.24 9.181 13.032 10.711 2.091.612 4.344 1.071 6.757 1.071 8.849.153 16.732-4.897 20.111-12.7l38.774-74.213 12.227-17.903c-5.792-2.601-11.423-5.508-17.215-8.568z"}),(0,o.jsx)("path",{fill:"url(#YoodliTextLogo_svg__d)",d:"m111.224 105.892-8.527 20.045v.153l-39.095 74.518c-1.127 3.366-4.827 5.203-8.366 4.132l-.322-.154c-3.057-.765-4.827-3.672-4.022-6.426.16-.306.16-.612.321-.918l73.365-143.529c4.987-9.793.643-21.575-9.653-26.318-.644-.306-1.448-.612-2.092-.765l-.483-.153c-9.975-3.367-20.915.918-25.58 9.945l-39.579 77.12c-2.896 5.662-9.975 7.957-15.928 5.203-5.47-2.448-8.044-8.569-5.952-13.925.16-.459.321-.765.482-1.224l37.004-71.305c4.988-9.793.805-21.575-9.492-26.319-9.975-4.59-22.042-.918-27.35 8.416l-25.1 45.14c-1.93 3.52-.482 7.804 3.219 9.64 3.7 1.836 8.205.459 10.135-2.908l25.099-45.139c1.448-2.601 4.826-3.52 7.562-2.142 2.574 1.224 3.7 4.131 2.574 6.58 0 .152-.161.305-.161.458L12.279 97.323c-6.758 12.547-1.61 28.155 11.744 34.581 13.193 6.427 29.604 1.53 36.361-11.17l.483-.918 39.578-77.273a5.732 5.732 0 0 1 6.918-2.754l.483.153c2.896.918 4.504 3.978 3.378 6.733 0 .153-.161.306-.321.459L37.699 190.662c-2.735 5.356-2.735 11.476-.161 16.832 2.413 5.202 7.24 9.181 13.032 10.711 2.091.612 4.344 1.071 6.757 1.071 8.849.153 16.732-4.897 20.111-12.7l38.774-74.213 12.227-17.903c-5.792-2.601-11.584-5.661-17.215-8.568z"}),(0,o.jsx)("mask",{height:"189",width:"595",y:"0",x:"195",maskUnits:"userSpaceOnUse",id:"YoodliTextLogo_svg__e",fill:"none",children:(0,o.jsx)("path",{fill:"#fff",d:"M697.61 3.756c-9.042 48.156-17.755 95.374-26.632 142.749h-19.234c-.165-4.065-.494-7.974-.822-12.508-1.48 1.094-2.466 1.563-3.124 2.345-15.124 12.977-32.55 15.166-50.634 7.974-17.754-7.036-25.481-21.264-26.138-39.088-1.151-27.361 13.316-50.658 37.482-60.195 11.672-4.69 24.001-5.785 35.838-1.876 7.233 2.345 13.645 7.348 20.549 11.257 1.48-8.13 3.288-17.511 5.096-26.893 1.316-6.566 2.302-13.29 3.781-19.856.329-1.407 1.973-3.44 3.288-3.44 6.576-.625 13.152-.47 20.55-.47zm-38.633 86.463c-.493-12.509-2.795-23.297-15.289-28.3s-24.495-2.345-34.687 6.097c-11.672 10.007-15.618 22.828-14.138 37.525 2.466 24.078 24.823 27.674 40.441 20.795 16.44-7.036 22.358-20.951 23.673-36.117zM255.551 121.958c1.48-2.658 2.466-4.378 3.452-5.942 12.659-22.827 25.482-45.654 37.976-68.482 2.301-4.221 4.932-5.785 9.699-5.316 5.918.47 11.672.157 18.248.157-1.151 2.189-1.808 3.596-2.63 5.003-23.18 39.088-46.524 78.332-69.704 117.42-.329.469-.658.938-.822 1.407-7.891 15.792-20.221 24.079-39.455 21.89-5.26-.626-10.685-.157-16.439-.157l3.288-19.544c5.425 0 10.685-.156 15.946 0 6.083.469 11.836-2.501 14.96-7.505 5.096-7.348 8.384-14.384 5.918-24.078-7.069-29.238-12.823-58.788-19.234-88.182-.329-1.876-.658-3.909-1.151-6.254 7.398 0 14.303-.157 21.043.156 1.315 0 3.123 2.658 3.452 4.222 4.767 23.609 9.206 47.218 13.809 70.827.493 1.094.822 2.189 1.644 4.378zM380.162 40.968c33.537.156 54.908 23.765 50.305 54.254-4.439 28.612-20.385 45.811-48.003 51.596-27.783 5.785-52.935-5.629-60.662-28.612-9.535-27.987 4.11-71.453 51.456-76.77 2.63-.468 5.589-.468 6.904-.468zm-37.646 55.817c-.329 27.049 20.878 39.557 43.236 28.769 14.138-6.879 23.508-24.391 21.7-40.495-2.137-20.795-21.7-31.427-41.757-22.358-16.275 7.348-22.193 21.107-23.179 34.084zM444.935 101.319c.822-46.123 39.454-66.293 75.95-58.944 20.056 4.065 33.372 18.45 35.674 39.244 2.63 23.296-7.562 47.687-31.071 59.257-14.467 7.349-31.399 9.225-47.346 5.004-20.22-5.16-33.372-22.984-33.207-44.561zm88.609-13.133c.164-22.515-20.55-35.336-41.921-25.486-17.097 7.974-23.344 22.359-23.015 39.557.164 19.544 16.439 30.802 36.331 25.642 16.933-4.221 28.44-20.169 28.605-39.713zM716.844 146.505h-23.015c1.315-7.817 2.63-15.322 4.11-22.671 7.069-38.306 14.467-76.612 21.371-114.918.822-4.065 2.302-5.473 6.576-5.316 5.754.312 11.343 0 17.59 0-8.877 48-17.754 95.218-26.632 142.905zM739.695 146.505l19.07-103.974h23.344a19544.361 19544.361 0 0 0-19.399 103.974h-23.015zM790 12.668c-.164 7.818-6.905 14.072-15.124 14.072-7.891 0-13.152-5.004-13.152-12.196 0-7.974 6.905-14.54 15.289-14.54C783.917-.154 789.836 5.006 790 11.73v.938z"})}),(0,o.jsx)("g",{mask:"url(#YoodliTextLogo_svg__e)",children:(0,o.jsx)("path",{fill:"url(#YoodliTextLogo_svg__f)",d:"M826-30v263H176V-30h650z"})}),(0,o.jsxs)("defs",{fill:"none",children:[(0,o.jsxs)("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"96.099",x2:"133.267",y1:"71.293",x1:"133.267",id:"YoodliTextLogo_svg__a",children:[(0,o.jsx)("stop",{"stop-color":"#6966FD",offset:"0.573"}),(0,o.jsx)("stop",{"stop-color":"#1DA9E6",offset:"1"})]}),(0,o.jsxs)("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"110.482",x2:"129.325",y1:"87.223",x1:"129.325",id:"YoodliTextLogo_svg__b",children:[(0,o.jsx)("stop",{"stop-color":"#6966FD",offset:"0.573"}),(0,o.jsx)("stop",{"stop-color":"#1DA9E6",offset:"1"})]}),(0,o.jsxs)("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"219.279",x2:"64.22",y1:"4",x1:"64.22",id:"YoodliTextLogo_svg__c",children:[(0,o.jsx)("stop",{"stop-color":"#6966FD",offset:"0.573"}),(0,o.jsx)("stop",{"stop-color":"#1DA9E6",offset:"1"})]}),(0,o.jsxs)("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"219.279",x2:"64.22",y1:"4",x1:"64.22",id:"YoodliTextLogo_svg__d",children:[(0,o.jsx)("stop",{"stop-color":"#6966FD",offset:"0.443"}),(0,o.jsx)("stop",{"stop-color":"#1DA9E6",offset:"1"})]}),(0,o.jsxs)("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"-278.934",x2:"596.064",y1:"342.833",x1:"-110.237",id:"YoodliTextLogo_svg__f",children:[(0,o.jsx)("stop",{"stop-color":"#1DA9E6"}),(0,o.jsx)("stop",{"stop-color":"#6966FE",offset:"0.823"})]})]})]})})}),(0,o.jsxs)("div",{children:["Get AI-powered coaching to prepare a speech or get feedback on a recording with ",(0,o.jsx)("a",{href:"https://toastmasters.yoodli.ai/",target:"_blank",children:"Yoodli, Toastmasters Edition"}),"."]})]})}},5338:(e,t,n)=>{"use strict";var o=n(5795);t.H=o.createRoot,o.hydrateRoot},5540:(e,t,n)=>{"use strict";function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,o(e,t)}n.d(t,{A:()=>r})},5556:(e,t,n)=>{e.exports=n(2694)()},5795:e=>{"use strict";e.exports=window.ReactDOM},5942:(e,t,n)=>{"use strict";n.d(t,{QueryClient:()=>o.QueryClient,QueryClientProvider:()=>r.QueryClientProvider,useMutation:()=>r.useMutation,useQuery:()=>r.useQuery,useQueryClient:()=>r.useQueryClient});var o=n(4468);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}});var r=n(2532)},6281:(e,t,n)=>{"use strict";n.d(t,{dd:()=>a,eJ:()=>u,wm:()=>c});var o=n(1289),r=n(4622),s=n(941);function i(e){return Math.min(1e3*Math.pow(2,e),3e4)}function a(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 c(e){return e instanceof l}var u=function(e){var t,n,c,u,d=this,h=!1;this.abort=e.abort,this.cancel=function(e){return null==t?void 0:t(e)},this.cancelRetry=function(){h=!0},this.continueRetry=function(){h=!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,u=t});var p=function(t){d.isResolved||(d.isResolved=!0,null==e.onSuccess||e.onSuccess(t),null==n||n(),c(t))},f=function(t){d.isResolved||(d.isResolved=!0,null==e.onError||e.onError(t),null==n||n(),u(t))};!function c(){if(!d.isResolved){var u;try{u=e.fn()}catch(e){u=Promise.reject(e)}t=function(e){if(!d.isResolved&&(f(new l(e)),null==d.abort||d.abort(),a(u)))try{u.cancel()}catch(e){}},d.isTransportCancelable=a(u),Promise.resolve(u).then(p).catch(function(t){var a,l;if(!d.isResolved){var u=null!=(a=e.retry)?a:3,p=null!=(l=e.retryDelay)?l:i,m="function"==typeof p?p(d.failureCount,t):p,g=!0===u||"number"==typeof u&&d.failureCount<u||"function"==typeof u&&u(d.failureCount,t);!h&&g?(d.failureCount++,null==e.onFail||e.onFail(d.failureCount,t),(0,s.yy)(m).then(function(){if(!o.m.isFocused()||!r.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(){h?f(t):c()})):f(t)}})}}()}},6426:e=>{e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],o=0;o<e.rangeCount;o++)n.push(e.getRangeAt(o));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach(function(t){e.addRange(t)}),t&&t.focus()}}},6427:e=>{"use strict";e.exports=window.wp.components},6449:()=>{},6606:(e,t,n)=>{"use strict";n.d(t,{p:()=>r});var o=n(7143);function r(){return(0,o.useSelect)(e=>{const t=e("rsvpmaker");return t?t.getSettings():(console.log("useRsvpmakerRest: rsvpmaker store not found"),{})})}},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},7098:(e,t,n)=>{"use strict";n.d(t,{E:()=>b});var o=n(8168),r=n(941),s=n(5540),i=n(428),a=n(9690),l=n(6281),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,o.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,r.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,o,s=this.state.data,i=(0,r.Zw)(e,s);return(null==(n=(o=this.options).isDataEqual)?void 0:n.call(o,s,i))?i=s:!1!==this.options.structuralSharing&&(i=(0,r.BH)(s,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(r.lQ).catch(r.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,r.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,o,s,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 c;return null==(c=this.retryer)||c.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){var u=this.observers.find(function(e){return e.options.queryFn});u&&this.setOptions(u.options)}var d=(0,r.HN)(this.queryKey),h=(0,r.jY)(),p={queryKey:d,pageParam:void 0,meta:this.meta};Object.defineProperty(p,"signal",{enumerable:!0,get:function(){if(h)return i.abortSignalConsumed=!0,h.signal}});var f,m,g={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(g)),this.revertState=this.state,this.state.isFetching&&this.state.fetchMeta===(null==(o=g.fetchOptions)?void 0:o.meta)||this.dispatch({type:"fetch",meta:null==(m=g.fetchOptions)?void 0:m.meta}),this.retryer=new l.eJ({fn:g.fetchFn,abort:null==h||null==(s=h.abort)?void 0:s.bind(h),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,a.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:g.options.retry,retryDelay:g.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,o=void 0!==t;return{data:t,dataUpdateCount:0,dataUpdatedAt:o?null!=n?n:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:o?"success":"idle"}},t.reducer=function(e,t){var n,r;switch(t.type){case"failed":return(0,o.A)({},e,{fetchFailureCount:e.fetchFailureCount+1});case"pause":return(0,o.A)({},e,{isPaused:!0});case"continue":return(0,o.A)({},e,{isPaused:!1});case"fetch":return(0,o.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,o.A)({},e,{data:t.data,dataUpdateCount:e.dataUpdateCount+1,dataUpdatedAt:null!=(r=t.dataUpdatedAt)?r:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var s=t.error;return(0,l.wm)(s)&&s.revert&&this.revertState?(0,o.A)({},this.revertState):(0,o.A)({},e,{error:s,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return(0,o.A)({},e,{isInvalidated:!0});case"setState":return(0,o.A)({},e,t.state);default:return e}},e}(),u=n(3287),d=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.queries=[],n.queriesMap={},n}(0,s.A)(t,e);var n=t.prototype;return n.build=function(e,t,n){var o,s=t.queryKey,i=null!=(o=t.queryHash)?o:(0,r.F$)(s,t),a=this.get(i);return a||(a=new c({cache:this,queryKey:s,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(s),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;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,r.b_)(e,t)[0];return void 0===n.exact&&(n.exact=!0),this.queries.find(function(e){return(0,r.MK)(n,e)})},n.findAll=function(e,t){var n=(0,r.b_)(e,t)[0];return Object.keys(n).length>0?this.queries.filter(function(e){return(0,r.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}(u.Q),h=n(3465),p=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.mutations=[],n.mutationId=0,n}(0,s.A)(t,e);var n=t.prototype;return n.build=function(e,t,n){var o=new h.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(o),o},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,r.nJ)(e,t)})},n.findAll=function(e){return this.mutations.filter(function(t){return(0,r.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(r.lQ)})},Promise.resolve())})},t}(u.Q),f=n(1289),m=n(4622);function g(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}var b=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()&&m.t.isOnline()&&(e.mutationCache.onFocus(),e.queryCache.onFocus())}),this.unsubscribeOnline=m.t.subscribe(function(){f.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,r.b_)(e,t)[0];return n.fetching=!0,this.queryCache.findAll(n).length},t.isMutating=function(e){return this.mutationCache.findAll((0,o.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 o=(0,r.vh)(e),s=this.defaultQueryOptions(o);return this.queryCache.build(this,s).setData(t,n)},t.setQueriesData=function(e,t,n){var o=this;return i.j.batch(function(){return o.getQueryCache().findAll(e).map(function(e){var r=e.queryKey;return[r,o.setQueryData(r,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,r.b_)(e,t)[0],o=this.queryCache;i.j.batch(function(){o.findAll(n).forEach(function(e){o.remove(e)})})},t.resetQueries=function(e,t,n){var s=this,a=(0,r.b_)(e,t,n),l=a[0],c=a[1],u=this.queryCache,d=(0,o.A)({},l,{active:!0});return i.j.batch(function(){return u.findAll(l).forEach(function(e){e.reset()}),s.refetchQueries(d,c)})},t.cancelQueries=function(e,t,n){var o=this,s=(0,r.b_)(e,t,n),a=s[0],l=s[1],c=void 0===l?{}:l;void 0===c.revert&&(c.revert=!0);var u=i.j.batch(function(){return o.queryCache.findAll(a).map(function(e){return e.cancel(c)})});return Promise.all(u).then(r.lQ).catch(r.lQ)},t.invalidateQueries=function(e,t,n){var s,a,l,c=this,u=(0,r.b_)(e,t,n),d=u[0],h=u[1],p=(0,o.A)({},d,{active:null==(s=null!=(a=d.refetchActive)?a:d.active)||s,inactive:null!=(l=d.refetchInactive)&&l});return i.j.batch(function(){return c.queryCache.findAll(d).forEach(function(e){e.invalidate()}),c.refetchQueries(p,h)})},t.refetchQueries=function(e,t,n){var s=this,a=(0,r.b_)(e,t,n),l=a[0],c=a[1],u=i.j.batch(function(){return s.queryCache.findAll(l).map(function(e){return e.fetch(void 0,(0,o.A)({},c,{meta:{refetchPage:null==l?void 0:l.refetchPage}}))})}),d=Promise.all(u).then(r.lQ);return(null==c?void 0:c.throwOnError)||(d=d.catch(r.lQ)),d},t.fetchQuery=function(e,t,n){var o=(0,r.vh)(e,t,n),s=this.defaultQueryOptions(o);void 0===s.retry&&(s.retry=!1);var i=this.queryCache.build(this,s);return i.isStaleByTime(s.staleTime)?i.fetch(s):Promise.resolve(i.state.data)},t.prefetchQuery=function(e,t,n){return this.fetchQuery(e,t,n).then(r.lQ).catch(r.lQ)},t.fetchInfiniteQuery=function(e,t,n){var o=(0,r.vh)(e,t,n);return o.behavior={onFetch:function(e){e.fetchFn=function(){var t,n,o,s,i,a,c,u,d,h=null==(t=e.fetchOptions)||null==(n=t.meta)?void 0:n.refetchPage,p=null==(o=e.fetchOptions)||null==(s=o.meta)?void 0:s.fetchMore,f=null==p?void 0:p.pageParam,m="forward"===(null==p?void 0:p.direction),b="backward"===(null==p?void 0:p.direction),v=(null==(i=e.state.data)?void 0:i.pages)||[],y=(null==(a=e.state.data)?void 0:a.pageParams)||[],x=(0,r.jY)(),j=null==x?void 0:x.signal,w=y,k=!1,_=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},C=function(e,t,n,o){return w=o?[t].concat(w):[].concat(w,[t]),o?[n].concat(e):[].concat(e,[n])},S=function(t,n,o,r){if(k)return Promise.reject("Cancelled");if(void 0===o&&!n&&t.length)return Promise.resolve(t);var s={queryKey:e.queryKey,signal:j,pageParam:o,meta:e.meta},i=_(s),a=Promise.resolve(i).then(function(e){return C(t,o,e,r)});return(0,l.dd)(i)&&(a.cancel=i.cancel),a};if(v.length)if(m){var E=void 0!==f,A=E?f:g(e.options,v);c=S(v,E,A)}else if(b){var T=void 0!==f,O=T?f:(u=e.options,d=v,null==u.getPreviousPageParam?void 0:u.getPreviousPageParam(d[0],d));c=S(v,T,O,!0)}else!function(){w=[];var t=void 0===e.options.getNextPageParam,n=!h||!v[0]||h(v[0],0,v);c=n?S([],t,y[0]):Promise.resolve(C([],y[0],v[0]));for(var o=function(n){c=c.then(function(o){if(!h||!v[n]||h(v[n],n,v)){var r=t?y[n]:g(e.options,o);return S(o,t,r)}return Promise.resolve(C(o,y[n],v[n]))})},r=1;r<v.length;r++)o(r)}();else c=S([]);var N=c.then(function(e){return{pages:e,pageParams:w}});return N.cancel=function(){k=!0,null==x||x.abort(),(0,l.dd)(c)&&c.cancel()},N}}},this.fetchQuery(o)},t.prefetchInfiniteQuery=function(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(r.lQ).catch(r.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(r.lQ).catch(r.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,r.Od)(e)===(0,r.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,r.Cp)(e,t.queryKey)}))?void 0:t.defaultOptions:void 0},t.setMutationDefaults=function(e,t){var n=this.mutationDefaults.find(function(t){return(0,r.Od)(e)===(0,r.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,r.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,o.A)({},this.defaultOptions.queries,this.getQueryDefaults(null==e?void 0:e.queryKey),e,{_defaulted:!0});return!t.queryHash&&t.queryKey&&(t.queryHash=(0,r.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,o.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}()},7143:e=>{"use strict";e.exports=window.wp.data},7965:(e,t,n)=>{"use strict";var o=n(6426),r={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,s,i,a,l,c,u=!1;t||(t={}),n=t.debug||!1;try{if(i=o(),a=document.createRange(),l=document.getSelection(),(c=document.createElement("span")).textContent=e,c.ariaHidden="true",c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",function(o){if(o.stopPropagation(),t.format)if(o.preventDefault(),void 0===o.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var s=r[t.format]||r.default;window.clipboardData.setData(s,e)}else o.clipboardData.clearData(),o.clipboardData.setData(t.format,e);t.onCopy&&(o.preventDefault(),t.onCopy(o.clipboardData))}),document.body.appendChild(c),a.selectNodeContents(c),l.addRange(a),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(o){n&&console.error("unable to copy using execCommand: ",o),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(o){n&&console.error("unable to copy using clipboardData: ",o),n&&console.error("falling back to prompt"),s=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(s,e)}}finally{l&&("function"==typeof l.removeRange?l.removeRange(a):l.removeAllRanges()),c&&document.body.removeChild(c),i()}return u}},8168:(e,t,n)=>{"use strict";function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},o.apply(null,arguments)}n.d(t,{A:()=>o})},8662:(e,t,n)=>{"use strict";n.d(t,{d:()=>re}),n(1609);const{entries:o,setPrototypeOf:r,isFrozen:s,getPrototypeOf:i,getOwnPropertyDescriptor:a}=Object;let{freeze:l,seal:c,create:u}=Object,{apply:d,construct:h}="undefined"!=typeof Reflect&&Reflect;l||(l=function(e){return e}),c||(c=function(e){return e}),d||(d=function(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];return e.apply(t,o)}),h||(h=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return new e(...n)});const p=A(Array.prototype.forEach),f=A(Array.prototype.lastIndexOf),m=A(Array.prototype.pop),g=A(Array.prototype.push),b=A(Array.prototype.splice),v=A(String.prototype.toLowerCase),y=A(String.prototype.toString),x=A(String.prototype.match),j=A(String.prototype.replace),w=A(String.prototype.indexOf),k=A(String.prototype.trim),_=A(Object.prototype.hasOwnProperty),C=A(RegExp.prototype.test),S=(E=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return h(E,t)});var E;function A(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return d(e,t,o)}}function T(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:v;r&&r(e,null);let o=t.length;for(;o--;){let r=t[o];if("string"==typeof r){const e=n(r);e!==r&&(s(t)||(t[o]=e),r=e)}e[r]=!0}return e}function O(e){for(let t=0;t<e.length;t++)_(e,t)||(e[t]=null);return e}function N(e){const t=u(null);for(const[n,r]of o(e))_(e,n)&&(Array.isArray(r)?t[n]=O(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=N(r):t[n]=r);return t}function R(e,t){for(;null!==e;){const n=a(e,t);if(n){if(n.get)return A(n.get);if("function"==typeof n.value)return A(n.value)}e=i(e)}return function(){return null}}const D=l(["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","search","section","select","shadow","slot","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"]),M=l(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),L=l(["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"]),P=l(["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"]),I=l(["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=l(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=l(["#text"]),B=l(["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","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","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","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Q=l(["accent-height","accumulate","additive","alignment-baseline","amplitude","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","exponent","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","intercept","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","mask-type","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","slope","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","tablevalues","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"]),z=l(["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"]),q=l(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),H=c(/\{\{[\w\W]*|[\w\W]*\}\}/gm),V=c(/<%[\w\W]*|[\w\W]*%>/gm),W=c(/\$\{[\w\W]*/gm),K=c(/^data-[\-\w.\u00B7-\uFFFF]+$/),G=c(/^aria-[\-\w]+$/),Y=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),J=c(/^(?:\w+script|data):/i),$=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),X=c(/^html$/i),Z=c(/^[a-z][.\w]*(-[.\w]+)+$/i);var ee=Object.freeze({__proto__:null,ARIA_ATTR:G,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:Z,DATA_ATTR:K,DOCTYPE_NAME:X,ERB_EXPR:V,IS_ALLOWED_URI:Y,IS_SCRIPT_OR_DATA:J,MUSTACHE_EXPR:H,TMPLIT_EXPR:W});const te=function(){return"undefined"==typeof window?null:window};var ne=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te();const n=t=>e(t);if(n.version="3.3.0",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const s=r,i=s.currentScript,{DocumentFragment:a,HTMLTemplateElement:c,Node:d,Element:h,NodeFilter:E,NamedNodeMap:A=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:O,DOMParser:H,trustedTypes:V}=t,W=h.prototype,K=R(W,"cloneNode"),G=R(W,"remove"),J=R(W,"nextSibling"),$=R(W,"childNodes"),Z=R(W,"parentNode");if("function"==typeof c){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let ne,oe="";const{implementation:re,createNodeIterator:se,createDocumentFragment:ie,getElementsByTagName:ae}=r,{importNode:le}=s;let ce={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof o&&"function"==typeof Z&&re&&void 0!==re.createHTMLDocument;const{MUSTACHE_EXPR:ue,ERB_EXPR:de,TMPLIT_EXPR:he,DATA_ATTR:pe,ARIA_ATTR:fe,IS_SCRIPT_OR_DATA:me,ATTR_WHITESPACE:ge,CUSTOM_ELEMENT:be}=ee;let{IS_ALLOWED_URI:ve}=ee,ye=null;const xe=T({},[...D,...M,...L,...I,...U]);let je=null;const we=T({},[...B,...Q,...z,...q]);let ke=Object.seal(u(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,Ce=null;const Se=Object.seal(u(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ee=!0,Ae=!0,Te=!1,Oe=!0,Ne=!1,Re=!0,De=!1,Me=!1,Le=!1,Pe=!1,Ie=!1,Fe=!1,Ue=!0,Be=!1,Qe=!0,ze=!1,qe={},He=null;const Ve=T({},["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 We=null;const Ke=T({},["audio","video","img","source","image","track"]);let Ge=null;const Ye=T({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Je="http://www.w3.org/1998/Math/MathML",$e="http://www.w3.org/2000/svg",Xe="http://www.w3.org/1999/xhtml";let Ze=Xe,et=!1,tt=null;const nt=T({},[Je,$e,Xe],y);let ot=T({},["mi","mo","mn","ms","mtext"]),rt=T({},["annotation-xml"]);const st=T({},["title","style","font","a","script"]);let it=null;const at=["application/xhtml+xml","text/html"];let lt=null,ct=null;const ut=r.createElement("form"),dt=function(e){return e instanceof RegExp||e instanceof Function},ht=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ct||ct!==e){if(e&&"object"==typeof e||(e={}),e=N(e),it=-1===at.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,lt="application/xhtml+xml"===it?y:v,ye=_(e,"ALLOWED_TAGS")?T({},e.ALLOWED_TAGS,lt):xe,je=_(e,"ALLOWED_ATTR")?T({},e.ALLOWED_ATTR,lt):we,tt=_(e,"ALLOWED_NAMESPACES")?T({},e.ALLOWED_NAMESPACES,y):nt,Ge=_(e,"ADD_URI_SAFE_ATTR")?T(N(Ye),e.ADD_URI_SAFE_ATTR,lt):Ye,We=_(e,"ADD_DATA_URI_TAGS")?T(N(Ke),e.ADD_DATA_URI_TAGS,lt):Ke,He=_(e,"FORBID_CONTENTS")?T({},e.FORBID_CONTENTS,lt):Ve,_e=_(e,"FORBID_TAGS")?T({},e.FORBID_TAGS,lt):N({}),Ce=_(e,"FORBID_ATTR")?T({},e.FORBID_ATTR,lt):N({}),qe=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,Ee=!1!==e.ALLOW_ARIA_ATTR,Ae=!1!==e.ALLOW_DATA_ATTR,Te=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Oe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ne=e.SAFE_FOR_TEMPLATES||!1,Re=!1!==e.SAFE_FOR_XML,De=e.WHOLE_DOCUMENT||!1,Pe=e.RETURN_DOM||!1,Ie=e.RETURN_DOM_FRAGMENT||!1,Fe=e.RETURN_TRUSTED_TYPE||!1,Le=e.FORCE_BODY||!1,Ue=!1!==e.SANITIZE_DOM,Be=e.SANITIZE_NAMED_PROPS||!1,Qe=!1!==e.KEEP_CONTENT,ze=e.IN_PLACE||!1,ve=e.ALLOWED_URI_REGEXP||Y,Ze=e.NAMESPACE||Xe,ot=e.MATHML_TEXT_INTEGRATION_POINTS||ot,rt=e.HTML_INTEGRATION_POINTS||rt,ke=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&dt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ke.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&dt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ke.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ke.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ne&&(Ae=!1),Ie&&(Pe=!0),qe&&(ye=T({},U),je=[],!0===qe.html&&(T(ye,D),T(je,B)),!0===qe.svg&&(T(ye,M),T(je,Q),T(je,q)),!0===qe.svgFilters&&(T(ye,L),T(je,Q),T(je,q)),!0===qe.mathMl&&(T(ye,I),T(je,z),T(je,q))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?Se.tagCheck=e.ADD_TAGS:(ye===xe&&(ye=N(ye)),T(ye,e.ADD_TAGS,lt))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?Se.attributeCheck=e.ADD_ATTR:(je===we&&(je=N(je)),T(je,e.ADD_ATTR,lt))),e.ADD_URI_SAFE_ATTR&&T(Ge,e.ADD_URI_SAFE_ATTR,lt),e.FORBID_CONTENTS&&(He===Ve&&(He=N(He)),T(He,e.FORBID_CONTENTS,lt)),Qe&&(ye["#text"]=!0),De&&T(ye,["html","head","body"]),ye.table&&(T(ye,["tbody"]),delete _e.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ne=e.TRUSTED_TYPES_POLICY,oe=ne.createHTML("")}else void 0===ne&&(ne=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(V,i)),null!==ne&&"string"==typeof oe&&(oe=ne.createHTML(""));l&&l(e),ct=e}},pt=T({},[...M,...L,...P]),ft=T({},[...I,...F]),mt=function(e){g(n.removed,{element:e});try{Z(e).removeChild(e)}catch(t){G(e)}},gt=function(e,t){try{g(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){g(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Pe||Ie)try{mt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},bt=function(e){let t=null,n=null;if(Le)e="<remove></remove>"+e;else{const t=x(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===it&&Ze===Xe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=ne?ne.createHTML(e):e;if(Ze===Xe)try{t=(new H).parseFromString(o,it)}catch(e){}if(!t||!t.documentElement){t=re.createDocument(Ze,"template",null);try{t.documentElement.innerHTML=et?oe:o}catch(e){}}const s=t.body||t.documentElement;return e&&n&&s.insertBefore(r.createTextNode(n),s.childNodes[0]||null),Ze===Xe?ae.call(t,De?"html":"body")[0]:De?t.documentElement:s},vt=function(e){return se.call(e.ownerDocument||e,e,E.SHOW_ELEMENT|E.SHOW_COMMENT|E.SHOW_TEXT|E.SHOW_PROCESSING_INSTRUCTION|E.SHOW_CDATA_SECTION,null)},yt=function(e){return e instanceof O&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof A)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},xt=function(e){return"function"==typeof d&&e instanceof d};function jt(e,t,o){p(e,e=>{e.call(n,t,o,ct)})}const wt=function(e){let t=null;if(jt(ce.beforeSanitizeElements,e,null),yt(e))return mt(e),!0;const o=lt(e.nodeName);if(jt(ce.uponSanitizeElement,e,{tagName:o,allowedTags:ye}),Re&&e.hasChildNodes()&&!xt(e.firstElementChild)&&C(/<[/\w!]/g,e.innerHTML)&&C(/<[/\w!]/g,e.textContent))return mt(e),!0;if(7===e.nodeType)return mt(e),!0;if(Re&&8===e.nodeType&&C(/<[/\w]/g,e.data))return mt(e),!0;if(!(Se.tagCheck instanceof Function&&Se.tagCheck(o))&&(!ye[o]||_e[o])){if(!_e[o]&&_t(o)){if(ke.tagNameCheck instanceof RegExp&&C(ke.tagNameCheck,o))return!1;if(ke.tagNameCheck instanceof Function&&ke.tagNameCheck(o))return!1}if(Qe&&!He[o]){const t=Z(e)||e.parentNode,n=$(e)||e.childNodes;if(n&&t)for(let o=n.length-1;o>=0;--o){const r=K(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,J(e))}}return mt(e),!0}return e instanceof h&&!function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:Ze,tagName:"template"});const n=v(e.tagName),o=v(t.tagName);return!!tt[e.namespaceURI]&&(e.namespaceURI===$e?t.namespaceURI===Xe?"svg"===n:t.namespaceURI===Je?"svg"===n&&("annotation-xml"===o||ot[o]):Boolean(pt[n]):e.namespaceURI===Je?t.namespaceURI===Xe?"math"===n:t.namespaceURI===$e?"math"===n&&rt[o]:Boolean(ft[n]):e.namespaceURI===Xe?!(t.namespaceURI===$e&&!rt[o])&&!(t.namespaceURI===Je&&!ot[o])&&!ft[n]&&(st[n]||!pt[n]):!("application/xhtml+xml"!==it||!tt[e.namespaceURI]))}(e)?(mt(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!C(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ne&&3===e.nodeType&&(t=e.textContent,p([ue,de,he],e=>{t=j(t,e," ")}),e.textContent!==t&&(g(n.removed,{element:e.cloneNode()}),e.textContent=t)),jt(ce.afterSanitizeElements,e,null),!1):(mt(e),!0)},kt=function(e,t,n){if(Ue&&("id"===t||"name"===t)&&(n in r||n in ut))return!1;if(Ae&&!Ce[t]&&C(pe,t));else if(Ee&&C(fe,t));else if(Se.attributeCheck instanceof Function&&Se.attributeCheck(t,e));else if(!je[t]||Ce[t]){if(!(_t(e)&&(ke.tagNameCheck instanceof RegExp&&C(ke.tagNameCheck,e)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(e))&&(ke.attributeNameCheck instanceof RegExp&&C(ke.attributeNameCheck,t)||ke.attributeNameCheck instanceof Function&&ke.attributeNameCheck(t,e))||"is"===t&&ke.allowCustomizedBuiltInElements&&(ke.tagNameCheck instanceof RegExp&&C(ke.tagNameCheck,n)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(n))))return!1}else if(Ge[t]);else if(C(ve,j(n,ge,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==w(n,"data:")||!We[e])if(Te&&!C(me,j(n,ge,"")));else if(n)return!1;return!0},_t=function(e){return"annotation-xml"!==e&&x(e,be)},Ct=function(e){jt(ce.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||yt(e))return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:je,forceKeepAttr:void 0};let r=t.length;for(;r--;){const s=t[r],{name:i,namespaceURI:a,value:l}=s,c=lt(i),u=l;let d="value"===i?u:k(u);if(o.attrName=c,o.attrValue=d,o.keepAttr=!0,o.forceKeepAttr=void 0,jt(ce.uponSanitizeAttribute,e,o),d=o.attrValue,!Be||"id"!==c&&"name"!==c||(gt(i,e),d="user-content-"+d),Re&&C(/((--!?|])>)|<\/(style|title|textarea)/i,d)){gt(i,e);continue}if("attributename"===c&&x(d,"href")){gt(i,e);continue}if(o.forceKeepAttr)continue;if(!o.keepAttr){gt(i,e);continue}if(!Oe&&C(/\/>/i,d)){gt(i,e);continue}Ne&&p([ue,de,he],e=>{d=j(d,e," ")});const h=lt(e.nodeName);if(kt(h,c,d)){if(ne&&"object"==typeof V&&"function"==typeof V.getAttributeType)if(a);else switch(V.getAttributeType(h,c)){case"TrustedHTML":d=ne.createHTML(d);break;case"TrustedScriptURL":d=ne.createScriptURL(d)}if(d!==u)try{a?e.setAttributeNS(a,i,d):e.setAttribute(i,d),yt(e)?mt(e):m(n.removed)}catch(t){gt(i,e)}}else gt(i,e)}jt(ce.afterSanitizeAttributes,e,null)},St=function e(t){let n=null;const o=vt(t);for(jt(ce.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)jt(ce.uponSanitizeShadowNode,n,null),wt(n),Ct(n),n.content instanceof a&&e(n.content);jt(ce.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=null,r=null,i=null,l=null;if(et=!e,et&&(e="\x3c!--\x3e"),"string"!=typeof e&&!xt(e)){if("function"!=typeof e.toString)throw S("toString is not a function");if("string"!=typeof(e=e.toString()))throw S("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Me||ht(t),n.removed=[],"string"==typeof e&&(ze=!1),ze){if(e.nodeName){const t=lt(e.nodeName);if(!ye[t]||_e[t])throw S("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof d)o=bt("\x3c!----\x3e"),r=o.ownerDocument.importNode(e,!0),1===r.nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?o=r:o.appendChild(r);else{if(!Pe&&!Ne&&!De&&-1===e.indexOf("<"))return ne&&Fe?ne.createHTML(e):e;if(o=bt(e),!o)return Pe?null:Fe?oe:""}o&&Le&&mt(o.firstChild);const c=vt(ze?e:o);for(;i=c.nextNode();)wt(i),Ct(i),i.content instanceof a&&St(i.content);if(ze)return e;if(Pe){if(Ie)for(l=ie.call(o.ownerDocument);o.firstChild;)l.appendChild(o.firstChild);else l=o;return(je.shadowroot||je.shadowrootmode)&&(l=le.call(s,l,!0)),l}let u=De?o.outerHTML:o.innerHTML;return De&&ye["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&C(X,o.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+o.ownerDocument.doctype.name+">\n"+u),Ne&&p([ue,de,he],e=>{u=j(u,e," ")}),ne&&Fe?ne.createHTML(u):u},n.setConfig=function(){ht(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Me=!0},n.clearConfig=function(){ct=null,Me=!1},n.isValidAttribute=function(e,t,n){ct||ht({});const o=lt(e),r=lt(t);return kt(o,r,n)},n.addHook=function(e,t){"function"==typeof t&&g(ce[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=f(ce[e],t);return-1===n?void 0:b(ce[e],n,1)[0]}return m(ce[e])},n.removeHooks=function(e){ce[e]=[]},n.removeAllHooks=function(){ce={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}(),oe=n(790);function re(e){const{innerHTML:t}=e,n=ne.sanitize(t).replace("class=","className=");return(0,oe.jsx)("div",{dangerouslySetInnerHTML:{__html:n}})}},9399:(e,t,n)=>{"use strict";var o=n(5264).CopyToClipboard;o.CopyToClipboard=o,e.exports=o},9439:(e,t,n)=>{"use strict";n.d(t,{h:()=>s,k:()=>r}),n(1609);var o=n(790);function r(e){if(!e.options)return void console.log("SelectCtrl called without props.options",e);const t={display:e.display?e.display:"block",maxWidth:e.width?e.width:"325px"};return(0,o.jsxs)("div",{style:t,children:[(0,o.jsx)("label",{style:{display:"block",fontSize:"11px",textTransform:"uppercase"},children:e.label}),(0,o.jsx)("select",{value:e.value,onChange:t=>e.onChange(t.target.value),children:e.options.map(e=>(0,o.jsx)("option",{value:e.value,children:e.label}))})]})}function s(e){const t={display:e.display?e.display:"block",maxWidth:e.maxWidth?e.maxWidth:"300px"};return(0,o.jsxs)("div",{style:t,children:[(0,o.jsx)("label",{style:{display:"block",fontSize:"11px",textTransform:"uppercase"},children:e.label}),(0,o.jsx)("input",{type:"number",value:e.value?e.value:0,onChange:t=>e.onChange(t.target.value)})]})}},9690:(e,t,n)=>{"use strict";n.d(t,{B:()=>s,t:()=>r});var o=console;function r(){return o}function s(e){o=e}},9692:(e,t,n)=>{"use strict";function o(e,t){return t&&t.hasOwnProperty("translations")&&t.translations[e]?t.translations[e]:e}n.d(t,{A:()=>o})}},o={};function r(e){var t=o[e];if(void 0!==t)return t.exports;var s=o[e]={exports:{}};return n[e](s,s.exports,r),s.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var s=Object.create(null);r.r(s);var i={};e=e||[null,t({}),t([]),t(t)];for(var a=2&o&&n;("object"==typeof a||"function"==typeof a)&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach(e=>i[e]=()=>n[e]);return i.default=()=>n,r.d(s,i),s},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e,t,n,o=r(1609),s=r.t(o,2),i=r.n(o),a=r(5795),l=r.n(a),c=r(5338),u=(r(376),r(5942)),d=r(9692),h=r(9439),p=r(6427),f=r(5556),m=function(){return m=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},m.apply(this,arguments)},g={onActivate:f.func,onAddUndo:f.func,onBeforeAddUndo:f.func,onBeforeExecCommand:f.func,onBeforeGetContent:f.func,onBeforeRenderUI:f.func,onBeforeSetContent:f.func,onBeforePaste:f.func,onBlur:f.func,onChange:f.func,onClearUndos:f.func,onClick:f.func,onContextMenu:f.func,onCommentChange:f.func,onCompositionEnd:f.func,onCompositionStart:f.func,onCompositionUpdate:f.func,onCopy:f.func,onCut:f.func,onDblclick:f.func,onDeactivate:f.func,onDirty:f.func,onDrag:f.func,onDragDrop:f.func,onDragEnd:f.func,onDragGesture:f.func,onDragOver:f.func,onDrop:f.func,onExecCommand:f.func,onFocus:f.func,onFocusIn:f.func,onFocusOut:f.func,onGetContent:f.func,onHide:f.func,onInit:f.func,onInput:f.func,onKeyDown:f.func,onKeyPress:f.func,onKeyUp:f.func,onLoadContent:f.func,onMouseDown:f.func,onMouseEnter:f.func,onMouseLeave:f.func,onMouseMove:f.func,onMouseOut:f.func,onMouseOver:f.func,onMouseUp:f.func,onNodeChange:f.func,onObjectResizeStart:f.func,onObjectResized:f.func,onObjectSelected:f.func,onPaste:f.func,onPostProcess:f.func,onPostRender:f.func,onPreProcess:f.func,onProgressState:f.func,onRedo:f.func,onRemove:f.func,onReset:f.func,onSaveContent:f.func,onSelectionChange:f.func,onSetAttrib:f.func,onSetContent:f.func,onShow:f.func,onSubmit:f.func,onUndo:f.func,onVisualAid:f.func,onSkinLoadError:f.func,onThemeLoadError:f.func,onModelLoadError:f.func,onPluginLoadError:f.func,onIconsLoadError:f.func,onLanguageLoadError:f.func,onScriptsLoad:f.func,onScriptsLoadError:f.func},b=m({apiKey:f.string,licenseKey:f.string,id:f.string,inline:f.bool,init:f.object,initialValue:f.string,onEditorChange:f.func,value:f.string,tagName:f.string,tabIndex:f.number,cloudChannel:f.string,plugins:f.oneOfType([f.string,f.array]),toolbar:f.oneOfType([f.string,f.array]),disabled:f.bool,textareaName:f.string,tinymceScriptSrc:f.oneOfType([f.string,f.arrayOf(f.string),f.arrayOf(f.shape({src:f.string,async:f.bool,defer:f.bool}))]),rollback:f.oneOfType([f.number,f.oneOf([!1])]),scriptLoading:f.shape({async:f.bool,defer:f.bool,delay:f.number})},g),v=function(e){return"function"==typeof e},y=function(e){return e in g},x=function(e){return e.substr(2)},j=function(e,t,n,o,r){return function(t,n,o,r,s,i,a){var l=Object.keys(s).filter(y),c=Object.keys(i).filter(y),u=l.filter(function(e){return void 0===i[e]}),d=c.filter(function(e){return void 0===s[e]});u.forEach(function(e){var t=x(e),n=a[t];o(t,n),delete a[t]}),d.forEach(function(o){var r=function(t,n){return function(o){var r;return null===(r=t(n))||void 0===r?void 0:r(o,e)}}(t,o),s=x(o);a[s]=r,n(s,r)})}(r,e.on.bind(e),e.off.bind(e),0,t,n,o)},w=0,k=function(e){var t=Date.now();return e+"_"+Math.floor(1e9*Math.random())+ ++w+String(t)},_=function(e){return null!==e&&("textarea"===e.tagName.toLowerCase()||"input"===e.tagName.toLowerCase())},C=function(e){return void 0===e||""===e?[]:Array.isArray(e)?e:e.split(" ")},S=function(e,t){void 0!==e&&(null!=e.mode&&"object"==typeof e.mode&&"function"==typeof e.mode.set?e.mode.set(t):e.setMode(t))},E=function(){return E=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},E.apply(this,arguments)},A=function(e,t,n){var o,r,s=e.createElement("script");s.referrerPolicy="origin",s.type="application/javascript",s.id=t.id,s.src=t.src,s.async=null!==(o=t.async)&&void 0!==o&&o,s.defer=null!==(r=t.defer)&&void 0!==r&&r;var i=function(){s.removeEventListener("load",i),s.removeEventListener("error",a),n(t.src)},a=function(e){s.removeEventListener("load",i),s.removeEventListener("error",a),n(t.src,e)};s.addEventListener("load",i),s.addEventListener("error",a),e.head&&e.head.appendChild(s)},T=(e=[],t=function(t){var n=e.find(function(e){return e.getDocument()===t});return void 0===n&&(n=function(e){var t={},n=function(e,n){var o=t[e];o.done=!0,o.error=n;for(var r=0,s=o.handlers;r<s.length;r++)(0,s[r])(e,n);o.handlers=[]};return{loadScripts:function(o,r,s){var i=function(e){return void 0!==s?s(e):console.error(e)};if(0!==o.length)for(var a=0,l=!1,c=function(e,t){l||(t?(l=!0,i(t)):++a===o.length&&r())},u=0,d=o;u<d.length;u++){var h=d[u],p=t[h.src];if(p)p.done?c(h.src,p.error):p.handlers.push(c);else{var f=k("tiny-");t[h.src]={id:f,src:h.src,done:!1,error:null,handlers:[c]},A(e,E({id:f},h),n)}}else i(new Error("At least one script must be provided"))},deleteScripts:function(){for(var n,o=0,r=Object.values(t);o<r.length;o++){var s=r[o],i=e.getElementById(s.id);null!=i&&"SCRIPT"===i.tagName&&(null===(n=i.parentNode)||void 0===n||n.removeChild(i))}t={}},getDocument:function(){return e}}}(t),e.push(n)),n},{loadList:function(e,n,o,r,s){var i=function(){return t(e).loadScripts(n,r,s)};o>0?setTimeout(i,o):i()},reinitialize:function(){for(var t=e.pop();null!=t;t=e.pop())t.deleteScripts()}}),O=function(e){var t=e;return t&&t.tinymce?t.tinymce:null},N=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),R=function(){return R=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},R.apply(this,arguments)},D=function(e){function t(t){var n,r,s,i=e.call(this,t)||this;return i.rollbackTimer=void 0,i.valueCursor=void 0,i.rollbackChange=function(){var e=i.editor,t=i.props.value;e&&t&&t!==i.currentContent&&e.undoManager.ignore(function(){if(e.setContent(t),i.valueCursor&&(!i.inline||e.hasFocus()))try{e.selection.moveToBookmark(i.valueCursor)}catch(e){}}),i.rollbackTimer=void 0},i.handleBeforeInput=function(e){if(void 0!==i.props.value&&i.props.value===i.currentContent&&i.editor&&(!i.inline||i.editor.hasFocus()))try{i.valueCursor=i.editor.selection.getBookmark(3)}catch(e){}},i.handleBeforeInputSpecial=function(e){"Enter"!==e.key&&"Backspace"!==e.key&&"Delete"!==e.key||i.handleBeforeInput(e)},i.handleEditorChange=function(e){var t=i.editor;if(t&&t.initialized){var n=t.getContent();void 0!==i.props.value&&i.props.value!==n&&!1!==i.props.rollback&&(i.rollbackTimer||(i.rollbackTimer=window.setTimeout(i.rollbackChange,"number"==typeof i.props.rollback?i.props.rollback:200))),n!==i.currentContent&&(i.currentContent=n,v(i.props.onEditorChange)&&i.props.onEditorChange(n,t))}},i.handleEditorChangeSpecial=function(e){"Backspace"!==e.key&&"Delete"!==e.key||i.handleEditorChange(e)},i.initialise=function(e){var t,n,o;void 0===e&&(e=0);var r=i.elementRef.current;if(r)if(function(e){if(!("isConnected"in Node.prototype)){for(var t=e,n=e.parentNode;null!=n;)n=(t=n).parentNode;return t===e.ownerDocument}return e.isConnected}(r)){var s=O(i.view);if(!s)throw new Error("tinymce should have been loaded into global scope");var a,l,c=R(R(R(R({},i.props.init),{selector:void 0,target:r,readonly:i.props.disabled,inline:i.inline,plugins:(a=null===(t=i.props.init)||void 0===t?void 0:t.plugins,l=i.props.plugins,C(a).concat(C(l))),toolbar:null!==(n=i.props.toolbar)&&void 0!==n?n:null===(o=i.props.init)||void 0===o?void 0:o.toolbar}),i.props.licenseKey?{license_key:i.props.licenseKey}:{}),{setup:function(e){i.editor=e,i.bindHandlers({}),i.inline&&!_(r)&&e.once("PostRender",function(t){e.setContent(i.getInitialValue(),{no_events:!0})}),i.props.init&&v(i.props.init.setup)&&i.props.init.setup(e)},init_instance_callback:function(e){var t,n,o=i.getInitialValue();i.currentContent=null!==(t=i.currentContent)&&void 0!==t?t:e.getContent(),i.currentContent!==o&&(i.currentContent=o,e.setContent(o),e.undoManager.clear(),e.undoManager.add(),e.setDirty(!1));var r=null!==(n=i.props.disabled)&&void 0!==n&&n;S(i.editor,r?"readonly":"design"),i.props.init&&v(i.props.init.init_instance_callback)&&i.props.init.init_instance_callback(e)}});i.inline||(r.style.visibility=""),_(r)&&(r.value=i.getInitialValue()),s.init(c)}else if(0===e)setTimeout(function(){return i.initialise(1)},1);else{if(!(e<100))throw new Error("tinymce can only be initialised when in a document");setTimeout(function(){return i.initialise(e+1)},100)}},i.id=i.props.id||k("tiny-react"),i.elementRef=o.createRef(),i.inline=null!==(s=null!==(n=i.props.inline)&&void 0!==n?n:null===(r=i.props.init)||void 0===r?void 0:r.inline)&&void 0!==s&&s,i.boundHandlers={},i}return N(t,e),Object.defineProperty(t.prototype,"view",{get:function(){var e,t;return null!==(t=null===(e=this.elementRef.current)||void 0===e?void 0:e.ownerDocument.defaultView)&&void 0!==t?t:window},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(e){var t,n,o=this;if(this.rollbackTimer&&(clearTimeout(this.rollbackTimer),this.rollbackTimer=void 0),this.editor&&(this.bindHandlers(e),this.editor.initialized)){if(this.currentContent=null!==(t=this.currentContent)&&void 0!==t?t:this.editor.getContent(),"string"==typeof this.props.initialValue&&this.props.initialValue!==e.initialValue)this.editor.setContent(this.props.initialValue),this.editor.undoManager.clear(),this.editor.undoManager.add(),this.editor.setDirty(!1);else if("string"==typeof this.props.value&&this.props.value!==this.currentContent){var r=this.editor;r.undoManager.transact(function(){var e;if(!o.inline||r.hasFocus())try{e=r.selection.getBookmark(3)}catch(e){}var t=o.valueCursor;if(r.setContent(o.props.value),!o.inline||r.hasFocus())for(var n=0,s=[e,t];n<s.length;n++){var i=s[n];if(i)try{r.selection.moveToBookmark(i),o.valueCursor=i;break}catch(e){}}})}if(this.props.disabled!==e.disabled){var s=null!==(n=this.props.disabled)&&void 0!==n&&n;S(this.editor,s?"readonly":"design")}}},t.prototype.componentDidMount=function(){var e,t,n,o,r,s=this;null!==O(this.view)?this.initialise():Array.isArray(this.props.tinymceScriptSrc)&&0===this.props.tinymceScriptSrc.length?null===(t=(e=this.props).onScriptsLoadError)||void 0===t||t.call(e,new Error("No `tinymce` global is present but the `tinymceScriptSrc` prop was an empty array.")):(null===(n=this.elementRef.current)||void 0===n?void 0:n.ownerDocument)&&T.loadList(this.elementRef.current.ownerDocument,this.getScriptSources(),null!==(r=null===(o=this.props.scriptLoading)||void 0===o?void 0:o.delay)&&void 0!==r?r:0,function(){var e,t;null===(t=(e=s.props).onScriptsLoad)||void 0===t||t.call(e),s.initialise()},function(e){var t,n;null===(n=(t=s.props).onScriptsLoadError)||void 0===n||n.call(t,e)})},t.prototype.componentWillUnmount=function(){var e=this,t=this.editor;t&&(t.off(this.changeEvents(),this.handleEditorChange),t.off(this.beforeInputEvent(),this.handleBeforeInput),t.off("keypress",this.handleEditorChangeSpecial),t.off("keydown",this.handleBeforeInputSpecial),t.off("NewBlock",this.handleEditorChange),Object.keys(this.boundHandlers).forEach(function(n){t.off(n,e.boundHandlers[n])}),this.boundHandlers={},t.remove(),this.editor=void 0)},t.prototype.render=function(){return this.inline?this.renderInline():this.renderIframe()},t.prototype.changeEvents=function(){var e,t,n;return(null===(n=null===(t=null===(e=O(this.view))||void 0===e?void 0:e.Env)||void 0===t?void 0:t.browser)||void 0===n?void 0:n.isIE())?"change keyup compositionend setcontent CommentChange":"change input compositionend setcontent CommentChange"},t.prototype.beforeInputEvent=function(){return window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges?"beforeinput SelectionChange":"SelectionChange"},t.prototype.renderInline=function(){var e=this.props.tagName,t=void 0===e?"div":e;return o.createElement(t,{ref:this.elementRef,id:this.id,tabIndex:this.props.tabIndex})},t.prototype.renderIframe=function(){return o.createElement("textarea",{ref:this.elementRef,style:{visibility:"hidden"},name:this.props.textareaName,id:this.id,tabIndex:this.props.tabIndex})},t.prototype.getScriptSources=function(){var e,t,n=null===(e=this.props.scriptLoading)||void 0===e?void 0:e.async,o=null===(t=this.props.scriptLoading)||void 0===t?void 0:t.defer;if(void 0!==this.props.tinymceScriptSrc)return"string"==typeof this.props.tinymceScriptSrc?[{src:this.props.tinymceScriptSrc,async:n,defer:o}]:this.props.tinymceScriptSrc.map(function(e){return"string"==typeof e?{src:e,async:n,defer:o}:e});var r=this.props.cloudChannel,s=this.props.apiKey?this.props.apiKey:"no-api-key";return[{src:"https://cdn.tiny.cloud/1/".concat(s,"/tinymce/").concat(r,"/tinymce.min.js"),async:n,defer:o}]},t.prototype.getInitialValue=function(){return"string"==typeof this.props.initialValue?this.props.initialValue:"string"==typeof this.props.value?this.props.value:""},t.prototype.bindHandlers=function(e){var t=this;if(void 0!==this.editor){j(this.editor,e,this.props,this.boundHandlers,function(e){return t.props[e]});var n=function(e){return void 0!==e.onEditorChange||void 0!==e.value},o=n(e),r=n(this.props);!o&&r?(this.editor.on(this.changeEvents(),this.handleEditorChange),this.editor.on(this.beforeInputEvent(),this.handleBeforeInput),this.editor.on("keydown",this.handleBeforeInputSpecial),this.editor.on("keyup",this.handleEditorChangeSpecial),this.editor.on("NewBlock",this.handleEditorChange)):o&&!r&&(this.editor.off(this.changeEvents(),this.handleEditorChange),this.editor.off(this.beforeInputEvent(),this.handleBeforeInput),this.editor.off("keydown",this.handleBeforeInputSpecial),this.editor.off("keyup",this.handleEditorChangeSpecial),this.editor.off("NewBlock",this.handleEditorChange))}},t.propTypes=b,t.defaultProps={cloudChannel:"7"},t}(o.Component),M=r(6606),L=r(790);function P(e){const[t,n]=(0,o.useState)([]),[r,s]=(0,o.useState)("Path Not Set"),[i,a]=(0,o.useState)(e.manual),[l,c]=(0,o.useState)(e.project?e.project:""),[u,d]=(0,o.useState)(e.title),[f,m]=(0,o.useState)(e.display_time),[g,b]=(0,o.useState)(e.maxtime),v=(0,o.useRef)(null),y=(0,M.p)();function x(){let t={role:"Speaker",ID:e.assignment.ID,roleindex:e.roleindex,blockindex:e.blockindex,manual:i,project:l,title:u,intro:v.current.getContent(),start:e.attrs.start,maxtime:g,display_time:f,count:e.attrs.count};e.updateAssignment(t)}return(0,o.useEffect)(()=>{fetch(y.url+"rsvptm/v1/paths_and_projects",{headers:{"X-WP-Nonce":y.nonce}}).then(e=>e.json()).then(e=>{e.paths&&n(e)},[]),e.project&&function(t){let n=t.replace(/([\s0-9]+)$/,""),o=n.replace(/ Level.+/,"");s(o),!e.manual&&n&&a(n)}(e.project)},[]),t&&void 0!==t.manuals?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("div",{children:(0,L.jsx)(h.k,{options:t.paths,value:r,label:"Path",onChange:e=>{s(e),x()}})}),(0,L.jsx)("div",{children:(0,L.jsx)(h.k,{options:t.manuals[r],value:i,label:"Level",onChange:e=>{a(e),x()}})}),(0,L.jsx)("div",{children:(0,L.jsx)(h.k,{options:t.projects[i]?t.projects[i]:[{value:"",label:"Set Path and Level to See Projects"}],value:l,label:"Project",onChange:e=>{c(e),function(e){let n=void 0===t.maxtime[e]?"7":t.maxtime[e];b(n),n=void 0===t.display_time[e]?"5 - 7 minutes":t.display_time[e],m(n)}(e)}})}),(0,L.jsxs)("div",{className:"tmflexrow",children:[(0,L.jsx)("div",{className:"tmflex50",children:(0,L.jsx)(p.TextControl,{label:"Display Time",onChange:e=>{m(e),x()},value:f})}),(0,L.jsx)("div",{className:"tmflex50",children:(0,L.jsx)(p.TextControl,{label:"Maximum Time Allowed",onChange:e=>{b(e),x()},value:g})})]}),(0,L.jsxs)("p",{children:[(0,L.jsx)("strong",{children:"Title"})," ",(0,L.jsx)(p.TextControl,{value:u,onChange:e=>{d(e)},onMouseLeave:()=>x()})]}),(0,L.jsxs)("p",{children:[(0,L.jsx)("strong",{children:"Intro"}),(0,L.jsx)(D,{onInit:(e,t)=>v.current=t,initialValue:e.intro,init:{height:100,menubar:!1,toolbar:"undo redo | bold italic | removeformat",content_style:"body { font-family:Helvetica,Arial,sans-serif; font-size:14px }"}})]}),(0,L.jsx)("p",{children:(0,L.jsx)("button",{className:"tmform",onClick:x,children:"Save"})})]}):(0,L.jsx)("p",{children:"Loading project choices"})}const I=window.wp.i18n;function F(e){console.log("OtherRoleTitle props",e);const[t,n]=(0,o.useState)(e.assignment.title);function r(){let n={...e.assignment,...e.attrs,roleindex:e.roleindex,blockindex:e.blockindex,title:t};e.updateAssignment(n)}return(0,M.p)(),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)("p",{children:[(0,L.jsx)("strong",{children:(0,I.__)("Note or Title","rsvpmaker-for-toastmasters")})," ",(0,L.jsx)(p.TextControl,{value:t,onChange:e=>{n(e)},onMouseLeave:()=>r()})]}),(0,L.jsx)("p",{children:(0,L.jsx)("button",{className:"tmform",onClick:r,children:(0,I.__)("Save","rsvpmaker-for-toastmasters")})})]})}var U=r(8662);function B(e){const t=(0,M.p)(),n=(0,o.useRef)(null),[r,s]=(0,o.useState)(0),[i,a]=(0,o.useState)("0"),[l,c]=(0,o.useState)(null);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(h.k,{label:"Member to Nominate",value:r,options:e.memberoptions,onChange:e=>{s(e)}}),(0,L.jsx)(D,{onInit:(e,t)=>n.current=t,initialValue:"I am nominating you for a role!",init:{height:100,menubar:!1,toolbar:"undo redo | bold italic | removeformat",content_style:"body { font-family:Helvetica,Arial,sans-serif; font-size:14px }"}}),(0,L.jsx)(p.RadioControl,{selected:i,label:"Send To",onChange:e=>a(e),options:[{label:"Member",value:"0"},{label:"Member + CC me",value:"1"},{label:"Me Only",value:"2"}]}),l&&(0,L.jsx)(L.Fragment,{children:(0,L.jsx)("div",{className:l.error?"tm-notification tm-notification-error suggestion-notification":"tm-notification tm-notification-success suggestion-notification",children:l.message})}),l&&l.rawHTML&&(0,L.jsx)("div",{className:"suggestion-preview",children:(0,L.jsx)(U.d,{innerHTML:l.rawHTML})}),(!l||l.error)&&(0,L.jsx)("p",{children:(0,L.jsx)("button",{className:"tmform",type:"primary",onClick:function(){if(r){if(n.current){let o=n.current.getContent();console.log(o+"from "+e.current_user_id+" to "+r+" for post "+e.post_id+" "+e.roletag);let s=t.url+"rsvptm/v1/tm_role?tm_ajax=role";const a=new FormData;a.append("role",e.roletag),a.append("user_id",r),a.append("editor_id",e.current_user_id),a.append("post_id",e.post_id),a.append("timelord",rsvpmaker_rest.timelord),a.append("suggest_note",o),a.append("ccme",i),fetch(s,{method:"POST",headers:{"X-WP-Nonce":t.nonce},body:a}).then(e=>e.json()).then(e=>{console.log(e),function(e,t=!1,n=""){c({message:e,error:t,rawHTML:n}),setTimeout(()=>{c(null)},15e3)}("Message sent",!1,e.content)})}}else c({message:"No recipient selected",error:!0})},children:"Send Suggestion"})})]})}var Q=r(5286),z=r(174),q=r(5148);const H=window.wp.element,V=(0,H.forwardRef)(function({icon:e,size:t=24,...n},o){return(0,H.cloneElement)(e,{width:t,height:t,...n,ref:o})}),W=window.wp.primitives,K=(0,o.createElement)(W.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,o.createElement)(W.Path,{d:"M10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6zM10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6z"})),G=(0,o.createElement)(W.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(W.Path,{d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21ZM15.5303 8.46967C15.8232 8.76256 15.8232 9.23744 15.5303 9.53033L13.0607 12L15.5303 14.4697C15.8232 14.7626 15.8232 15.2374 15.5303 15.5303C15.2374 15.8232 14.7626 15.8232 14.4697 15.5303L12 13.0607L9.53033 15.5303C9.23744 15.8232 8.76256 15.8232 8.46967 15.5303C8.17678 15.2374 8.17678 14.7626 8.46967 14.4697L10.9393 12L8.46967 9.53033C8.17678 9.23744 8.17678 8.76256 8.46967 8.46967C8.76256 8.17678 9.23744 8.17678 9.53033 8.46967L12 10.9393L14.4697 8.46967C14.7626 8.17678 15.2374 8.17678 15.5303 8.46967Z"})),Y=(0,o.createElement)(W.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(W.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),J=(0,o.createElement)(W.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(W.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})),$=(0,o.createElement)(W.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(W.Path,{d:"M14.103 7.128l2.26-2.26a4 4 0 00-5.207 4.804L5.828 15a2 2 0 102.828 2.828l5.329-5.328a4 4 0 004.804-5.208l-2.261 2.26-1.912-.512-.513-1.912zm-7.214 9.64a.5.5 0 11.707-.707.5.5 0 01-.707.707z"}));function X(e){const{agendadata:t,mode:n,showDetails:r,blockindex:s,setMode:i,setScrollTo:a,block:l,makeNotification:c,post_id:f,setEvaluate:m,setShowControls:g,data:b}=e,{assignments:v,attrs:y,attrs:{titlePrompt:x},memberoptions:j}=l,[w,k]=(0,o.useState)({item:null,mode:""}),_=(0,M.p)();if((0,o.useEffect)(()=>{_?.nonce&&(0,z.e)(_.nonce)},[_?.nonce]),!y||!y.role)return null;const C=(0,u.useQueryClient)(),{current_user_id:S,current_user_name:E,request_evaluation:A}=t,[T,O]=(0,o.useState)([].fill("",0,y.count)),{mutate:N}=(0,q.HZ)(c);if(!y.role)return null;function R(e){let n=!1;return t.permissions[e]&&(n=t.permissions[e]),n}let D="_role_"+y.role.replaceAll(/[^A-Za-z]/g,"_")+"_";const[I,U]=(0,o.useState)("");var H=y.start?parseInt(y.start):1;H||(H=1);let W=y.count?y.count:1,X=[],Z=[],ee=y.role,te=(0,d.A)(y.role,b);function ne(e,t=null,n=1,o=1){if(console.log("updateAssignment",e,t,n,o),Array.isArray(e)){const n=e.map(e=>({...e,post_id:f,count:o}));return re.mutate({assignments:n,blockindex:t,start:1})}e.post_id=f,oe.mutate(e)}const oe=(0,u.useMutation)(async e=>await z.A.post("json_assignment_post",e),{onMutate:async e=>{await C.cancelQueries(["blocks-data",f]);const t=C.getQueryData(["blocks-data",f]);return C.setQueryData(["blocks-data",f],t=>{const{blockindex:n,roleindex:o}=e;console.log("assignmentMutation setQueryData blockindex / roleindex",n,o);const{data:r}=t,{blocksdata:s}=r;return console.log("assignmentMutation setQueryData old blocksdata",s),console.log("blocksdata[blockindex]",s[n]),s[n].assignments[o]=e,{...t,data:{...r,blocksdata:s}}}),c((0,d.A)("Updating ...",b)),{previousData:t}},onSettled:(e,t,n,o)=>{C.invalidateQueries(["blocks-data",f])},onSuccess:(e,t,n,o)=>{e.data.taken?c("Role already taken: "+e.data.taken):c("Updated assignment: "+e.data.role,!0)},onError:(e,t,n)=>{console.log((0,d.A)("Mutate assignment error",b),e),C.setQueryData("blocks-data",n.previousData),c((0,d.A)("Error updating assignment ",b)+e.message)}}),re=(0,u.useMutation)(async e=>await z.A.post("json_multi_assignment_post",e),{onMutate:async e=>{await C.cancelQueries(["blocks-data",f]);const t=C.getQueryData(["blocks-data",f]);return C.setQueryData(["blocks-data",f],t=>{const{blockindex:n}=e,{data:o}=t,{blocksdata:r}=o;return r[n].assignments=e.assignments,{...t,data:{...o,blocksdata:r}}}),c((0,d.A)("Updating ...",b)),{previousValue:t}},onSettled:(e,t,n,o)=>{C.invalidateQueries(["blocks-data",f])},onSuccess:(e,t,n,o)=>{c((0,d.A)("Updated",e))},onError:(e,t,n)=>{c((0,d.A)("Error updating assignments ",b)+e.message),C.setQueryData("blocks-data",n.previousValue)}});function se(e,t){let n=v[e];n.role=y.role;let o=[];v.forEach((r,s)=>{r.role=y.role,s==t&&t<e?(o.push(n),o.push(r)):s==t&&t>e?(o.push(r),o.push(n)):s!=e&&o.push(r)}),ne(o,s,H,W),function(e){if(e){var t=document.getElementById(e);t&&t.scrollIntoView({behavior:"smooth"},!0)}}("block"+s)}function ie(){let e=[],t=[];v.forEach((n,o)=>{n.role=y.role,0!=n.ID&&"0"!=n.ID?e.push(n):t.push(n)}),t.forEach(t=>{e.push(t)}),ne(e,s,H,W)}function ae(e){let t=j.find(t=>{if(t.value==e)return t});return t?.value}function le(e){const{assignments:t,roleindex:n,filledslots:o,openslots:r,attrs:s,shownumber:i}=e;let a=!1;return o.length>0&&r.length>0&&o[o.length-1]>r[0]&&(a=!0),(0,L.jsxs)("p",{children:[(0,L.jsx)("span",{className:"moveup",children:t.length>1&&n>0&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("button",{className:"tmform",onClick:()=>{se(n,0)},children:(0,L.jsx)(Q.Ej,{type:s.role+" "+i})}),(0,L.jsx)("button",{className:"tmform",onClick:()=>{se(n,n-1)},children:(0,L.jsx)(Q.Up,{type:s.role+" "+i})})]})}),(0,L.jsx)("span",{className:"movedown",children:t.length>1&&n<t.length-1&&s.role.search("Backup")<0&&(0,L.jsx)("button",{className:"tmform",onClick:()=>{se(n,n+1)},children:(0,L.jsx)(Q.RU,{type:s.role+" "+i})})}),(0,L.jsx)("span",{className:"closegaps",children:a&&(0,L.jsx)("button",{className:"tmform",onClick:ie,children:(0,L.jsx)(Q.bm,{})})})]})}return(0,L.jsx)(L.Fragment,{children:v&&Array.isArray(v)&&v.map((t,o)=>{"0"==t.ID||0==t.ID?X.push(o):Z.push(o);let l=y.count&&y.count>1||H>1?"#"+(o+H):"";if(o==W)te=(0,d.A)("Backup ",b)+ee,l="";else if(o>W)return null;let c="role"+y.role.replaceAll(/[^A-z]/g,"")+o;if("assign"==n)return(0,L.jsx)("div",{id:c,className:"assignment",children:(0,L.jsx)("div",{className:"assignment-assigned",children:(0,L.jsx)(h.k,{label:te+" "+l,value:t.ID,options:j,onChange:e=>{ne("Speaker"==ee?{ID:e,name:ae(e),role:ee,roleindex:o,blockindex:s,start:H,count:W,manual:"",title:"",project:"",intro:"",maxtime:7,display_time:"5 - 7 minutes"}:{ID:e,name:ae(e),role:ee,roleindex:o,blockindex:s,start:H,count:W,display:"inline",width:""})}})})},c);let u=S==t.ID,f=0==t.ID||"0"==t.ID||""==t.ID;return(0,L.jsxs)("div",{id:c,children:[(0,L.jsxs)("div",{className:"roleheader",children:[(0,L.jsxs)("div",{className:"role-buttons",children:[f&&(0,L.jsxs)("button",{className:"agenda-tooltip",onClick:function(e){"Speaker"==ee&&ne({ID:S,name:E,role:ee,roleindex:o,blockindex:s,start:H,count:W,maxtime:7,display_time:"5 - 7 minutes",wasopen:!0}),ne({ID:S,name:E,role:ee,roleindex:o,blockindex:s,start:H,count:W,wasopen:!0})},children:[(0,L.jsx)("span",{class:"agenda-tooltip-text",children:(0,d.A)("Take Role",b)}),(0,L.jsx)(V,{icon:K})]}),u&&(0,L.jsxs)("button",{onClick:function(e){ne("Speaker"==ee?{ID:0,name:"",role:ee,blockindex:s,roleindex:o,start:H,count:W,intro:"",title:"",manual:"",project:"",maxtime:7,display_time:"5 - 7 minutes"}:{ID:0,name:"",role:ee,blockindex:s,roleindex:o,start:H,count:W})},className:"agenda-tooltip",children:[(0,L.jsx)("span",{class:"agenda-tooltip-text",children:(0,d.A)("Cancel",b)}),(0,L.jsx)(V,{icon:G})]}),(f||u)&&(0,L.jsxs)("button",{className:"agenda-tooltip",onClick:()=>{u&&ne("Speaker"==ee?{ID:0,name:"",role:ee,blockindex:s,roleindex:o,start:H,count:W,intro:"",title:"",manual:"",project:"",maxtime:7,display_time:"5 - 7 minutes"}:{ID:0,name:"",role:ee,blockindex:s,roleindex:o,start:H,count:W}),a(c),i("suggest")},children:[(0,L.jsx)("span",{class:"agenda-tooltip-text",children:(0,d.A)("Suggest",b)}),(0,L.jsx)(V,{icon:Y})]}),(R("edit_post")||R("organize_agenda")||R("edit_signups"))&&(0,L.jsxs)("button",{className:"agenda-tooltip",onClick:()=>{k({item:o,mode:"edit"})},children:[(0,L.jsx)("span",{class:"agenda-tooltip-text",children:(0,d.A)("Edit",b)}),(0,L.jsx)(V,{icon:J})]}),(R("edit_post")||R("organize_agenda"))&&(0,L.jsxs)("button",{className:"agenda-tooltip",onClick:()=>{g(s)},children:[(0,L.jsx)("span",{class:"agenda-tooltip-text",children:(0,d.A)("Organize",b)}),(0,L.jsx)(V,{icon:$})]})]}),(0,L.jsxs)("h3",{className:"role-label",children:[t.avatar&&(0,L.jsx)("div",{style:{float:"left",marginRight:"10px"},children:(0,L.jsx)("img",{src:t.avatar,className:"tm_avatar",alt:t.name})})," ",te," ",l," ",t.name]})]}),y.agenda_note&&(0,L.jsx)("p",{children:(0,L.jsx)("em",{children:y.agenda_note})}),(0,L.jsx)(L.Fragment,{children:"suggest"==n&&(u||f)&&(0,L.jsx)(B,{memberoptions:j,roletag:D+(o+1),post_id:e.post_id,current_user_id:S})}),(0,L.jsx)(L.Fragment,{children:("edit"==n||"edit"==w.mode&&w.item==o)&&(0,L.jsx)(h.k,{label:(0,d.A)("Select Member",b),value:t.ID,options:j,onChange:e=>{ne("Speaker"==ee?{ID:e,name:ae(e),role:ee,roleindex:o,blockindex:s,start:H,count:W,manual:"",title:"",project:"",intro:"",maxtime:7,display_time:"5 - 7 minutes"}:{ID:e,name:ae(e),role:ee,roleindex:o,blockindex:s,start:H,count:W})}})}),(0,L.jsx)(L.Fragment,{children:"Guest"==t.ID&&(0,L.jsxs)("div",{className:"tmflexrow",children:[(0,L.jsx)("div",{className:"tmflex30",children:(0,L.jsx)(p.TextControl,{label:(0,d.A)("Guest Name",b),value:T[o],onChange:e=>{let t=[...T];t[o]=e,O(t)}})}),(0,L.jsxs)("div",{className:"tmflex30",children:[(0,L.jsx)("br",{}),(0,L.jsx)("button",{className:"tmform",onClick:()=>{ne({ID:T[o],name:T[o]+" (guest)",role:ee,roleindex:o,blockindex:s,start:H,count:W});let e=[...T];e[o]="",O(e)},children:(0,d.A)("Add",b)})]})]})}),(0,L.jsx)(L.Fragment,{children:"suggest"!=n&&("edit"==n||"edit"==w.mode&&w.item==o||S==t.ID)&&(t.ID>0||"string"==typeof t.ID&&""!=t.ID)&&ee.includes("Speaker")&&0==ee.includes("Backup")&&r&&(0,L.jsx)(P,{attrs:y,assignment:t,project:t.project,title:t.title,intro:t.intro,manual:t.manual,maxtime:t.maxtime,display_time:t.display_time,updateAssignment:ne,roleindex:o,blockindex:s})}),(0,L.jsx)(L.Fragment,{children:x&&("edit"==n||"edit"==w.mode&&w.item==o||S==t.ID)&&r&&(0,L.jsx)(F,{role:ee,attrs:y,assignment:t,title:t.title,updateAssignment:ne,roleindex:o,blockindex:s})}),(0,L.jsx)(L.Fragment,{children:!("edit"!=n)&&v.length>1&&(0,L.jsx)(le,{assignments:v,roleindex:o,filledslots:Z,openslots:X,attrs:y,shownumber:l})}),t.ID>0&&"Speaker"==y.role&&(0,L.jsxs)("div",{className:"evaluation-request",children:[(0,L.jsx)("a",{href:t.evaluation_link,onClick:e=>{e.preventDefault(),m(t),i("evaluation")},children:(0,d.A)("Evaluation Form",b)})," ",(0,L.jsxs)("span",{style:{fontSize:"10px"},children:["(",(0,d.A)("copy-paste text below to share",b),")"]}),(0,L.jsx)("br",{}),(0,L.jsx)("textarea",{rows:"3",style:{fontSize:"8px"},value:(0,d.A)("Evaluation link for ",b)+t.name+"\n"+t.evaluation_link})]})]},c)})})}function Z(e){const{attrs:t,assignments:n,makeNotification:r,data:s}=e.block,[i,a]=(0,o.useState)(!1);if("Speaker"!=t.role)return null;const{time_allowed:l,count:c}=t,u=l?(0,d.A)(" out of ",s)+l+(0,d.A)(" allowed",s):"";let h=0;return Array.isArray(n)&&n.forEach((e,t)=>{e.ID&&t<c&&(h+=parseInt(e.maxtime))}),h?h>l?(i||(p=(0,d.A)("Speakers have reserved ",s)+h+(0,d.A)(" minutes",s)+u+(0,d.A)(". Meeting organizers may change the time allowed for different parts of the meeting on the Organize tab.",s),r&&(setTimeout(()=>{r(p)},1e3),a(!0))),(0,L.jsx)("div",{children:(0,L.jsxs)("p",{className:"speakertime speakertime-warning",children:[(0,d.A)("Speakers have reserved ",s),h,u]})})):(0,L.jsx)("div",{children:(0,L.jsxs)("p",{className:"speakertime",children:[(0,d.A)("Speakers have reserved ",s),h,u]})}):null;var p}var ee=r(1083);const te=()=>{const e=(0,M.p)();return ee.A.create({baseURL:"/wp-json/rsvpmaker/v1/",headers:{"Content-type":"application/json","X-WP-Nonce":e.nonce}})};function ne(e){console.log("downloaded rsvp data",e)}function oe(e){console.log("error downloading rsvp data",e)}async function re(e){return await te.post("json_meta?post_id="+e.post_id,e)}function se(e){const{data:t,user_can:n,setPostId:r,makeNotification:s}=e,[i,a]=(0,o.useState)(t.subscribers_can_organize_agenda),[l,c]=(0,o.useState)(t.subscribers_can_edit_signups),[d,f]=(0,o.useState)(t.newSignupDefault),[m,g]=(0,o.useState)(t.is_template?t.post_id:t.has_template),[b,v]=(0,o.useState)(0),y=(0,M.p)();(0,o.useEffect)(()=>{y?.nonce&&(0,z.e)(y.nonce)},[y?.nonce]);const{data:x,isLoading:j,isError:w}=(k=t.post_id,(0,u.useQuery)(["rsvp-meta",k],function(e){return te().get("json_meta?post_id="+k)},{enabled:!0,retry:2,onSuccess:ne,onError:oe,refetchInterval:5e4}));var k;if(w)return(0,L.jsx)("p",{children:"Error loading event metadata"});if(j)console.log("metadata is loading");else if(x.data){const e=x.data;console.log("metadata",e)}else s("error loading event metadata");const{mutate:_}=function(e,t){const n=(0,u.useQueryClient)();return(0,u.useMutation)(re,{onMutate:async o=>{await n.cancelQueries(["rsvp-meta",e]);const r=n.getQueryData(["rsvp-meta",e]);return n.setQueryData(["rsvp-meta",e],e=>{const{data:t}=e;return o.kv.forEach(e=>{t[e.key]=e.value}),{...e,data:t}}),t("Updating ..."),{previousValue:r}},onSettled:(o,r,s,i)=>{n.invalidateQueries(["rsvp-meta",e]),t("Updated")},onError:(t,o,r)=>{console.log("mutate rsvpmaker meta error",t),n.setQueryData(["rsvp-meta",e],r.previousValue)}})}(t.post_id,s);let C=t.upcoming.filter(e=>{if(e.label.indexOf("emplate")>0)return!0});C.push({value:0,label:"Choose Template"});const S=(0,u.useQueryClient)(),E=(0,u.useMutation)(async e=>await z.A.post("json_copy_post",e),{onSuccess:(e,t,n,o)=>{e.data.blockdata&&S.setQueryData(["blocks-data",e.data.post_id],t=>({...t,data:e.data})),S.invalidateQueries(["blocks-data",e.data.post_id])},onError:(e,t,n)=>{console.log("mutate template error",e),s("Error "+e.message)}}),A=(0,u.useMutation)(async e=>await z.A.post("json_agenda_permissions",e),{onSuccess:(e,t,n,o)=>{console.log("permissions update",e),s("Permissions update: "+e.data.status)},onError:(e,t,n)=>{s("Error "+e.message),console.log("mutate template error",e)}}),T=document.getElementById("loading-icon");return T&&(T.style="display: none"),(0,L.jsxs)("div",{children:[(0,L.jsx)("h2",{children:"Template Options and Settings"}),(0,L.jsxs)("p",{children:["Currently editing ",(0,L.jsx)("em",{children:function(){let e="an event without a template";return t.has_template?e="an event based on a template":t.is_template&&(e="a template"),e}()})]}),(0,L.jsx)(h.k,{label:"Edit Template",value:m,options:C,onChange:e=>g(parseInt(e))}),(0,L.jsx)("p",{children:(0,L.jsx)("button",{className:"tmform",onClick:()=>{s("Updating ..."),r(m)},children:"Edit"})}),(0,L.jsx)(L.Fragment,{children:t.has_template&&(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{children:(0,L.jsx)("button",{className:"tmform",onClick:()=>{let e={copyfrom:t.post_id,copyto:t.has_template,post_id:t.post_id};E.mutate(e),s("Template "+t.has_template+" updated.",!1,[{template_prompt:t.has_template}])},children:"Update Template"})}),(0,L.jsx)("p",{children:(0,L.jsx)("em",{children:"Click to apply changes you have made to this agenda document to the underlying template."})})]})}),(0,L.jsx)(L.Fragment,{children:t.is_template&&(0,L.jsxs)("p",{children:[(0,L.jsx)("a",{target:"_blank",href:"/wp-admin/edit.php?post_type=rsvpmaker&page=rsvpmaker_template_list&t="+t.post_id,children:"Create/Update"})," - copy content to new and existing events"]})}),(0,L.jsx)(L.Fragment,{children:t.has_template&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(h.k,{label:"Apply a Different Template",value:b,options:C,onChange:e=>v(e)}),(0,L.jsxs)("p",{children:[(0,L.jsx)("button",{className:"tmform",onClick:()=>{s("Updating ...");let e={copyfrom:b,copyto:t.post_id,post_id:t.post_id};E.mutate(e)},children:"Apply"})," ",(0,L.jsx)("em",{children:"Use a different template, such as one for a contest."})]})]})}),(0,L.jsx)(L.Fragment,{children:n("manage_options")&&(0,L.jsxs)("div",{className:"adminonly",children:[(0,L.jsx)("h3",{children:"Administrator Only Options"}),(0,L.jsx)(p.ToggleControl,{label:"All Members Can Edit Signups",help:1==l?"Allowed":"Prohibited",checked:l,onChange:()=>{let e=!l;c(e),A.mutate({key:"edit_signups",value:e})}}),(0,L.jsx)(p.ToggleControl,{label:"All Members Can Organize Agenda",help:1==i?"Allowed":"Prohibited",checked:i,onChange:()=>{let e=!i;a(e),A.mutate({key:"organize_agenda",value:e})}}),(0,L.jsx)("p",{children:(0,L.jsx)("em",{children:"You can decide whether in addition to signing up for roles, members are able to edit assignments for others or insert/delete/move roles and content blocks on the agenda."})})]})}),!t.is_template&&(0,L.jsx)("p",{children:(0,L.jsx)("a",{href:t.editor+"&tab=basics",target:"_blank",children:"Edit Date, Time, and RSVP settings"})}),t.is_template&&(0,L.jsx)("p",{children:(0,L.jsx)("a",{href:t.editor+"&tab=basics",target:"_blank",children:"Edit Template Schedule and RSVP settings"})}),(0,L.jsx)("p",{children:(0,L.jsx)("a",{href:t.editor,target:"_blank",children:"Open in WordPress Editor"})})]})}function ie(e){const t=(0,o.useRef)(null),{block:n,blockindex:r,replaceBlock:s,data:i}=e;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("h4",{children:(0,d.A)("Agenda Note",i)}),(0,L.jsx)(D,{onInit:(e,n)=>t.current=n,initialValue:n.innerHTML,init:{height:100,menubar:!1,toolbar:"undo redo | bold italic | removeformat",content_style:"body { font-family:Helvetica,Arial,sans-serif; font-size:14px }"}}),(0,L.jsx)("p",{children:(0,L.jsx)("button",{className:"tmform",onClick:function(){n.innerHTML=t.current.getContent(),s(r,n)},children:(0,d.A)("Update",i)})}),(0,L.jsx)("p",{children:(0,L.jsx)("em",{children:(0,d.A)('Agenda notes are the "stage directions" for your meeting. For elements like meeting theme that change from meeting to meeting, use an Editable Note instead.',i)})})]})}function ae(e){const t=(0,o.useRef)(null),{post_id:n,block:r,makeNotification:s,insertBlock:i,blockindex:a,setInsert:l}=e,[c,d]=(0,o.useState)(r.attrs),[h,f]=(0,o.useState)(!1),{mutate:m}=(0,q.cV)(n,s),g=(0,q._o)(n,a),b=(0,M.p)();(0,o.useEffect)(()=>{b?.nonce&&(0,z.e)(b.nonce)},[b?.nonce]);const v=(0,u.useQueryClient)(),y=(0,u.useMutation)(e=>{z.A.post("editable_note_json",e)},{onMutate:async e=>{await v.cancelQueries(["blocks-data",n]);const t=v.getQueryData(["blocks-data",n]);return v.setQueryData(["blocks-data",n],t=>{const{data:n}=t,{blocksdata:o}=n;return o[a].edithtml=e.note,{...t,data:{...n,blocksdata:o}}}),s("Updating ..."),f(!0),{previousData:t}},onError:(e,t,o)=>{s("Error updating editable note "+e.message),console.log("error updating editable note",e),v.setQueryData(["blocks-data",n],o)},onSettled:(e,t,n,o)=>{v.invalidateQueries(["blocks-data",n.post_id])},onSuccess:(e,t,n,o)=>{s("Updated")}});return h||!["edit","reorganize"].includes(e.mode)&&!i?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("h3",{children:c.editable}),(0,L.jsx)(U.d,{innerHTML:r.edithtml}),h&&("edit"==e.mode||i)&&(0,L.jsx)("p",{children:(0,L.jsx)("button",{onClick:()=>f(!1),children:"Edit"})})]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("h3",{children:c.editable}),(0,L.jsx)("p",{children:(0,L.jsx)(p.TextControl,{label:"heading",value:c.editable,onChange:e=>{d(t=>({...t,editable:e}))}})}),(0,L.jsx)(D,{onInit:(e,n)=>t.current=n,initialValue:r.edithtml,init:{height:100,menubar:!1,toolbar:"undo redo | bold italic | removeformat",content_style:"body { font-family:Helvetica,Arial,sans-serif; font-size:14px }"}}),(0,L.jsx)(L.Fragment,{children:i&&(0,L.jsx)("div",{className:"tmflexrow",children:(0,L.jsx)("div",{className:"tmflex30",children:(0,L.jsx)(p.__experimentalNumberControl,{label:"Time Allowed",value:c.time_allowed,onChange:e=>{d(t=>({...t,time_allowed:e}))}})})})}),(0,L.jsx)("p",{children:(0,L.jsx)("button",{className:"tmform",onClick:function(){if(i)d(e=>({...e,uid:Date.now()})),i(a,c,"wp4toastmasters/agendaedit","",t.current.getContent()),l("");else{const n=g("editable",c.editable);m(n);const o={note:t.current.getContent(),uid:c.uid,post_id:e.post_id,editable:c.editable};y.mutate(o)}},children:"Update"})}),(0,L.jsx)("p",{children:(0,L.jsx)("em",{children:"Editable notes are for content that changes from meeting to meeting, such as a meeting theme."})})]})}function le(e){const t=(0,o.useRef)(null),{block:n,blockindex:r,replaceBlock:s}=e;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("h4",{children:"Signup Form Note"}),(0,L.jsx)(D,{onInit:(e,n)=>t.current=n,initialValue:n.innerHTML,init:{height:100,menubar:!1,toolbar:"undo redo | bold italic | removeformat",content_style:"body { font-family:Helvetica,Arial,sans-serif; font-size:14px }"}}),(0,L.jsx)("p",{children:(0,L.jsx)("button",{className:"tmform",onClick:function(){n.innerHTML=t.current.getContent(),s(r,n)},children:"Update"})}),(0,L.jsx)("p",{children:(0,L.jsx)("em",{children:"Signup notes are instructions for the signup form. They are not included on the print, view, or email versions of the agenda."})})]})}function ce(e){const[t,n]=(0,o.useState)(!1),{blockindex:r,moveBlock:s,data:i}=e;return(0,L.jsxs)(L.Fragment,{children:[!t&&(0,L.jsx)("p",{children:(0,L.jsxs)("button",{className:"blockmove deletebutton",onClick:()=>{n(!0)},children:[(0,L.jsx)(Q.ep,{})," Delete"]})})," ",t&&(0,L.jsx)("p",{children:(0,L.jsxs)("button",{className:"blockmove",onClick:()=>{s(r,"delete",i)},children:[(0,L.jsx)(Q.ep,{})," Confirm Delete"]})})," "]})}function ue(e){const[t,n]=(0,o.useState)(null),[r,s]=(0,o.useState)([]),{blockindex:i,insertBlock:a,moveBlock:l,post_id:c,workingdata:d,makeNotification:f}=e,m=((0,u.useQueryClient)(),(0,M.p)());(0,o.useEffect)(()=>{m?.nonce&&(0,z.e)(m.nonce)},[m?.nonce]);const{isLoading:g,isSuccess:b,isError:v,data:y,error:x,refetch:j}=(0,u.useQuery)("rolelist",function(){return z.A.get("roles_list")},{enabled:!0,retry:2,onSuccess:function(e){s(e.data)},onError:function(e){console.log("inserter mutate error",e)}});if(v)return(0,L.jsx)("p",{children:"Error loading Inserter.js roledata"});const w=[{label:"Select Note or Other Block",value:""},{label:"Agenda Note (same week-to-week)",value:"wp4toastmasters/agendanoterich2"},{label:"Editable Note (changes week to week)",value:"wp4toastmasters/agendaedit"},{label:"Signup Note",value:"wp4toastmasters/signupnote"},{label:"Speaker/Evaluator Table",value:"wp4toastmasters/speaker-evaluator"},{label:"Track Absences",value:"wp4toastmasters/absences"}];function k(){const[e,t]=(0,o.useState)("");return(0,L.jsxs)("div",{className:"insert-selects",children:[(0,L.jsxs)("div",{children:[(0,L.jsx)(h.k,{label:"Insert Role",options:r,onChange:e=>{"custom"==e?t("custom"):_("wp4toastmasters/role","Speaker"==e?{role:"Speaker",time_allowed:7}:"Evaluator"==e?{role:"Evaluator",time_allowed:3}:{role:e,time_allowed:0})}}),e&&(0,L.jsxs)("div",{children:[(0,L.jsx)(p.TextControl,{label:"Custom Label",value:e,onChange:t})," ",(0,L.jsx)("button",{className:"blockmove",onClick:()=>_("wp4toastmasters/role",{role:"custom",custom_role:e,time_allowed:0}),children:"Add"})]})]}),(0,L.jsx)("div",{children:(0,L.jsx)(h.k,{label:"Insert Other",options:w,onChange:e=>{_(e)}})})]})}function _(e,t=null){if("wp4toastmasters/role"==e)a(i,t,e,"","",d),e="";else if("wp4toastmasters/agendaedit"==e)a(i,{time_allowed:0,uid:"note"+Date.now(),editable:"New editable note"},e,"",d),e="";else if("wp4toastmasters/agendanoterich2"==e){const t=prompt("Message for note?");a(i,{time_allowed:0,uid:"note"+Date.now()},e,'<p class="wp-block-wp4toastmasters-agendanoterich2">'+t+"</p>",d),e=""}else"wp4toastmasters/signupnote"==e?(a(i,{uid:"note"+Date.now()},e,'<p class="wp-block-wp4toastmasters-signupnote">new signup form note</p>',d),e=""):"wp4toastmasters/absences"==e?(a(i,{show_on_agenda:"1"},e,"",d),e=""):(a(i,{},e,d),e="");n(e)}return(0,L.jsx)(k,{})}function de(e){const{data:t,mode:n,post_id:r,makeNotification:s,ModeControl:i,showDetails:a,setMode:l,setScrollTo:c,setEvaluate:u,setPostId:d}=e,[f,m]=(0,o.useState)(!0),[g,b]=(0,o.useState)(-1),{mutate:v}=(0,q.cV)(r,s,ue),{mutate:y}=(0,q.tP)(r,t.has_template);if("reorganize"!=n)return null;function x(e){let t=0,n=e.count?e.count:1;return"Speaker"==e.role&&(t=7*n),"Evaluator"==e.role&&(t=3*n),t}function j(){let e=[];return t.blocksdata&&Array.isArray(t.blocksdata)&&t.blocksdata.map((t,n)=>{e.push(n)}),e}function w(e,n="up"){if(0==e&&"up"==n)return;let o=j(),r=parseInt(n),s=o.indexOf(e);if("up"==n?r=o[s-1]:"down"==n&&(r=o[s+2]),"delete"==n)t.blocksdata.splice(e,1);else{let n=t.blocksdata[e];t.blocksdata[e]={blockName:null},t.blocksdata.splice(r,0,n)}t.changed="blocks",v(t)}function k(e,n={},o="wp4toastmasters/role",r="",s=""){let i=[];Array.isArray(t.blocksdata)&&t.blocksdata.forEach((t,a)=>{i.push(t),a==e&&i.push({blockName:o,assignments:[],attrs:n,innerHTML:r,edithtml:s})}),t.blocksdata=i,v(t)}function _(e,n){let o=[];t.blocksdata.forEach((t,r)=>{r==e?o.push(n):o.push(t)}),t.blocksdata=o,v(t)}function C(e){let t=e.replaceAll(/<[^>]+>/g," ");return t=t.trim(),t.length>60&&(t=t.substring(0,60)+"..."),t}let S=new Date(t.datetime);const E=S.toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"});let A="";t.blocksdata&&Array.isArray(t.blocksdata)&&t.blocksdata.map((e,n)=>{t.blocksdata[n].datestring=S.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}),e?.attrs?.time_allowed&&(S.setMilliseconds(S.getMilliseconds()+6e4*parseInt(e.attrs.time_allowed)),e.attrs.padding_time&&S.setMilliseconds(S.getMilliseconds()+6e4*parseInt(e.attrs.padding_time)),A=S.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}),t.blocksdata[n].datestring=t.blocksdata[n].datestring.concat(" to "+A))}),j();let T,O=[{label:"Where to?",value:""},{label:"Move to Top",value:"top"}],N="";function R(){return(0,L.jsx)("button",{class:"tmsmallbutton",onClick:()=>{t.copyToTemplate=!0,v(t)},children:"Apply to All"})}return t.blocksdata&&Array.isArray(t.blocksdata)&&t.blocksdata.map((e,t)=>{if(!e.blockName)return null;N="After: "+e.blockName.replace(/^[^/]+\//,"").replace("agendanoterich2","agenda note"),e.attrs.role&&(N=N.concat(" "+e.attrs.role)),e.attrs.editable&&(N=N.concat(" "+e.attrs.editable)),e.innerHTML&&(N=N.concat(" "+C(e.innerHTML))),N.length>60&&(N=N.substring(0,60)+"..."),O.push({value:t,label:N})}),(0,L.jsxs)("div",{className:"agendawrapper",id:"agendawrapper"+r,children:[(0,L.jsx)(L.Fragment,{children:"rsvpmaker"!=wpt_rest.post_type&&(0,L.jsx)(h.k,{label:"Choose Event",value:r,options:t.upcoming,onChange:e=>{d(parseInt(e)),s("Date changed, please wait for the date to change ..."),queryClient.invalidateQueries(["blocks-data",r]),refetch()}})}),(0,L.jsxs)("h4",{children:[E," ",t.is_template&&(0,L.jsx)("span",{children:"(Template)"})," "]}),t.has_template&&(0,L.jsxs)("div",{children:[(0,L.jsxs)("p",{children:["By default, changes you make below will apply ",(0,L.jsx)("em",{children:"only"})," to a single meeting."]}),(0,L.jsxs)("p",{children:[(0,L.jsx)(R,{}),(0,L.jsx)("br",{}),(0,L.jsx)("em",{children:"Click to copy the agenda changes you have made to all upcoming meetings based on the same template. The template will also be updated."})]})]}),t.is_template&&(0,L.jsxs)("p",{children:[(0,L.jsx)("a",{target:"_blank",href:"/wp-admin/edit.php?post_type=rsvpmaker&page=rsvpmaker_template_list&t="+t.post_id,children:"Create/Update"})," - copy changes to new and existing events"]}),(0,L.jsx)(i,{note:"Based on time allotted, meeting will end at "+A,makeNotification:s,isTemplate:!1!==t.is_template,post_id:t.post_id}),t.blocksdata&&Array.isArray(t.blocksdata)&&t.blocksdata.map((e,o)=>e.blockName&&("speakers-evaluators"!=a||"wp4toastmasters/role"==e.blockName&&["Speaker","Evaluator"].includes(e.attrs.role))&&("timed"!=a||e.attrs.time_allowed)?(T=[],O.forEach(e=>{e.value!=o&&T.push(e)}),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)("div",{className:"reorgdrag",children:[(0,L.jsx)("div",{className:"reorgdragup",children:(0,L.jsx)("button",{className:"blockmove",onClick:()=>{w(o,"up")},children:(0,L.jsx)(Q.Up,{})})}),(0,L.jsxs)("div",{className:"reorgdragdown",children:[(0,L.jsx)("button",{className:"blockmove",onClick:()=>{w(o,"down")},children:(0,L.jsx)(Q.RU,{})})," "]}),(0,L.jsxs)("div",{className:"reorganize-drag",children:[(0,L.jsx)("div",{children:(0,L.jsx)("strong",{children:e.datestring})}),(0,L.jsxs)("h2",{children:[e.blockName.replace(/^[^/]+\//,"").replace("agendanoterich2","agenda note"),": ",e.attrs.role&&(0,L.jsx)("span",{children:e.attrs.role})," ",e.attrs.editable&&(0,L.jsx)("span",{children:e.attrs.editable})," ",e.innerHTML&&(0,L.jsx)("span",{children:C(e.innerHTML)})]})]}),a&&"wp4toastmasters/help"==e.blockName&&(0,L.jsxs)("p",{children:["See the knowledge base article ",(0,L.jsx)("a",{href:"https://www.wp4toastmasters.com/knowledge-base/organize-agenda-tool/",children:"Organize Agenda Tool"})," for video and written instructions."]}),a&&"wp4toastmasters/speaker-evaluator"==e.blockName&&(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{children:"Displays Speaker-Evaluator Matches in a table on the printable and email versions of the agenda."}),(0,L.jsx)(p.RadioControl,{label:"Columns",selected:e.attrs?.columns,options:[{label:"2 columns",value:"2"},{label:"Separate columns for Speaker, Path, Project, Title",value:"5"}],onChange:e=>{t.blocksdata[o].attrs.columns=e,v(t)}})]}),a&&"wp4toastmasters/role"==e.blockName&&(0,L.jsxs)("div",{children:[g==o&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(p.ToggleControl,{label:"Edit",checked:g==o,onChange:()=>{b(g==o?-1:o)}}),(0,L.jsx)(X,{makeNotification:s,showDetails:a,agendadata:t,post_id:r,blockindex:o,mode:"edit",block:e,setMode:l,setScrollTo:c,setEvaluate:u})]}),g!=o&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(p.ToggleControl,{label:"Edit",checked:g==o,onChange:()=>{b(g==o?-1:o)}}),e.assignments&&Array.isArray(e.assignments)&&e.assignments.map(e=>(0,L.jsx)("div",{children:e.name}))]}),(0,L.jsx)(Z,{block:e,makeNotification:s,data:t}),(0,L.jsxs)("div",{className:"tmflexrow",children:[(0,L.jsx)("div",{className:"tmflex30",children:(0,L.jsx)(h.h,{label:"Signup Slots",min:"1",value:e.attrs.count?e.attrs.count:1,onChange:n=>{var r,s;n=Math.abs(parseInt(n)),t.blocksdata[o].attrs.count=n,["Speaker","Evaluator"].includes(e.attrs.role)&&(t.blocksdata[o].attrs.time_allowed=x(e.attrs),t.blocksdata=(r=t.blocksdata,s=n,f?(r.forEach((e,t)=>{"Evaluator"==e.attrs.role&&(r[t].attrs.count=s,r[t].attrs.time_allowed=3*s)}),r):r)),v(t)}})}),(0,L.jsx)("div",{className:"tmflex30",children:(0,L.jsx)(h.h,{label:"Time Allowed",value:e.attrs?.time_allowed?e.attrs?.time_allowed:x(e.attrs),onChange:e=>{t.blocksdata[o].attrs.time_allowed=e,v(t)}})})," ","Speaker"==e.attrs.role&&(0,L.jsx)("div",{className:"tmflex30",children:(0,L.jsx)(h.h,{label:"Padding Time",min:"0",value:e.attrs.padding_time,onChange:e=>{t.blocksdata[o].attrs.padding_time=e,v(t)}})})]}),(0,L.jsx)(p.TextControl,{label:"Note About Role (optional)",value:e.attrs.agenda_note,onChange:e=>{t.blocksdata[o].attrs.agenda_note=e,v(t)}}),"Speaker"==e.attrs.role&&(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{children:(0,L.jsx)("em",{children:"Padding time is a little extra time for switching between and introducing speakers (not included in the time allowed for speeches)."})}),(0,L.jsx)("p",{children:(0,L.jsx)(p.ToggleControl,{label:"Sync Number of Speakers and Evaluators",help:1==f?"Number of evaluators will automatically changed with number of speakers":"Let me manage this manually",checked:f,onChange:()=>{m(!f)}})})]}),(0,L.jsx)("p",{children:(0,L.jsx)(p.ToggleControl,{label:"Backup",help:1==e.attrs.backup?"Editing":"Viewing",checked:e.attrs.backup,onChange:()=>{t.blocksdata[o].attrs.backup=!e.attrs.backup,v(t)}})}),(0,L.jsx)(Z,{block:e,makeNotification:s,data:t})]}),a&&"wp4toastmasters/absences"==e.blockName&&(0,L.jsx)("div",{children:(0,L.jsx)(p.ToggleControl,{label:"Show on Agenda",help:1==e.attrs.backup?"Show":"Hide",checked:e.attrs.show_on_agenda,onChange:()=>{t.blocksdata[o].attrs.show_on_agenda=!e.attrs.show_on_agenda,v(t)}})}),a&&"wp4toastmasters/agendaedit"==e.blockName&&(0,L.jsxs)("div",{children:[a&&g==o&&(0,L.jsxs)("div",{children:[(0,L.jsx)(p.ToggleControl,{label:"Edit",checked:g==o,onChange:()=>{b(g==o?-1:o)}})," ",(0,L.jsx)(ae,{makeNotification:s,mode:n,block:e,blockindex:o,uid:e.attrs.uid,post_id:r})]}),a&&g!=o&&(0,L.jsxs)("div",{children:[(0,L.jsx)(p.ToggleControl,{label:"Edit",checked:g==o,onChange:()=>{b(g==o?-1:o)}})," ",(0,L.jsx)(U.d,{innerHTML:e.attrs.edithtml})]}),(0,L.jsx)("div",{className:"tmflexrow",children:(0,L.jsx)("div",{className:"tmflex30",children:(0,L.jsx)(h.h,{label:"Time Allowed",value:e.attrs?.time_allowed?e.attrs?.time_allowed:0,onChange:e=>{t.blocksdata[o].attrs.time_allowed=e,v(t)}})})})]}),a&&"wp4toastmasters/agendanoterich2"==e.blockName&&(0,L.jsxs)("div",{children:[a&&g==o&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(p.ToggleControl,{label:"Edit",checked:g==o,onChange:()=>{b(g==o?-1:o)}}),(0,L.jsx)(ie,{makeNotification:s,blockindex:o,block:e,replaceBlock:_,data:t})]}),a&&g!=o&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(p.ToggleControl,{label:"Edit",checked:g==o,onChange:()=>{b(g==o?-1:o)}}),(0,L.jsx)(U.d,{innerHTML:e.innerHTML})]}),(0,L.jsx)("div",{className:"tmflexrow",children:(0,L.jsx)("div",{className:"tmflex30",children:(0,L.jsx)(h.h,{label:"Time Allowed",value:e.attrs?.time_allowed?e.attrs?.time_allowed:0,onChange:e=>{t.blocksdata[o].attrs.time_allowed=e,v(t)}})})})]}),a&&"wp4toastmasters/signupnote"==e.blockName&&(0,L.jsx)("div",{children:(0,L.jsx)(le,{blockindex:o,block:e,replaceBlock:_})}),a&&e.innerHTML&&!["wp4toastmasters/signupnote","wp4toastmasters/agendanoterich2"].includes(e.blockname)&&(0,L.jsx)(U.d,{innerHTML:e.innerHTML}),(0,L.jsx)("p",{children:(0,L.jsx)(h.k,{label:"Move",options:T,onChange:e=>function(e,n){console.log("selectMove "+e+" to "+n);const o=[];let r=t.blocksdata[e];console.log("drag source",e),console.log("drag destination",n),"top"==n&&(o.push(r),r=null),t.blocksdata.forEach((t,s)=>{s!=e?(o.push(t),s==n&&(console.log("selectMove insert "+s),o.push(r),r=null)):console.log("selectMove skip "+s)}),r&&o.push(r),v({...t,blocksdata:o})}(o,e)})}),a&&(0,L.jsx)(ce,{makeNotification:s,blockindex:o,moveBlock:w,post_id:r})]}),a&&(0,L.jsx)(ue,{makeNotification:s,blockindex:o,insertBlock:k,moveBlock:w,post_id:r})]})):null)]})}function he(e){const{data:t,post_id:n,makeNotification:r,block:s,blockindex:i,setMode:a,setShowControls:l}=e,[c,u]=(0,o.useState)(!0),[d,f]=(0,o.useState)(!1),{mutate:m}=(0,q.cV)(n,r,ue),{mutate:g}=(0,q.tP)(n,t.has_template);let b,v=[{label:"Where to?",value:""},{label:"Move to Top",value:"top"}],y="";function x(e){let t=0,n=e.count?e.count:1;return"Speaker"==e.role&&(t=7*n),"Evaluator"==e.role&&(t=3*n),t}function j(){let e=[];return t.blocksdata&&Array.isArray(t.blocksdata)&&t.blocksdata.map((t,n)=>{e.push(n)}),e}function w(e,n="up"){if(0==e&&"up"==n)return;let o=j(),r=parseInt(n),s=o.indexOf(e);if("up"==n?r=o[s-1]:"down"==n&&(r=o[s+2]),"delete"==n)t.blocksdata.splice(e,1);else{let n=t.blocksdata[e];t.blocksdata[e]={blockName:null},t.blocksdata.splice(r,0,n)}t.changed="blocks",m(t)}function k(){return(0,L.jsx)("button",{class:"tmsmallbutton",onClick:()=>{t.copyToTemplate=!0,m(t)},children:"Apply to All"})}t.blocksdata&&Array.isArray(t.blocksdata)&&t.blocksdata.map((e,t)=>{if(!e.blockName)return null;y="After: "+e.blockName.replace(/^[^/]+\//,"").replace("agendanoterich2","agenda note"),e.attrs.role&&(y=y.concat(" "+e.attrs.role)),e.attrs.editable&&(y=y.concat(" "+e.attrs.editable)),e.innerHTML&&(y=y.concat(" "+function(e){let t=e.replaceAll(/<[^>]+>/g," ");return t=t.trim(),t.length>60&&(t=t.substring(0,60)+"..."),t}(e.innerHTML))),y.length>60&&(y=y.substring(0,60)+"..."),v.push({value:t,label:y})}),b=[],v.forEach(e=>{e.value!=i&&b.push(e)}),j();let _=s.innerHTML?s.innerHTML.replace(/<[^>]+>/,"").trim():"";_.length>20&&(_=_.substring(0,20)+"...");let C=s.attrs.role?s.attrs.role:"";return C.length>12&&(C=C.substr(0,12)+"..."),(0,L.jsxs)("fieldset",{className:"reorgwidget",children:[(0,L.jsx)("legend",{children:"Organize"}),(0,L.jsxs)(L.Fragment,{children:["wp4toastmasters/role"==s.blockName&&(0,L.jsxs)("div",{children:[(0,L.jsxs)("p",{className:"tmflexrow",children:[(0,L.jsx)("div",{className:"tmflex30",children:(0,L.jsx)(h.h,{label:"Signup Slots ("+C+")",min:"1",value:s.attrs.count?s.attrs.count:1,onChange:e=>{var n,o;e=Math.abs(parseInt(e)),t.blocksdata[i].attrs.count=e,["Speaker","Evaluator"].includes(s.attrs.role)&&(t.blocksdata[i].attrs.time_allowed=x(s.attrs),t.blocksdata=(n=t.blocksdata,o=e,c?(n.forEach((e,t)=>{"Evaluator"==e.attrs.role&&(n[t].attrs.count=o,n[t].attrs.time_allowed=3*o)}),n):n)),m(t)}})}),(0,L.jsx)("div",{className:"tmflex30",children:(0,L.jsx)(h.h,{label:"Time Allowed ("+C+")",value:s.attrs?.time_allowed?s.attrs?.time_allowed:x(s.attrs),onChange:e=>{e=Math.abs(parseInt(e)),t.blocksdata[i].attrs.time_allowed=e,m(t)}})})," ","Speaker"==s.attrs.role&&(0,L.jsx)("div",{className:"tmflex30",children:(0,L.jsx)(h.h,{label:"Padding Time",min:"0",value:s.attrs.padding_time,onChange:e=>{e=Math.abs(parseInt(e)),t.blocksdata[i].attrs.padding_time=e,m(t)}})})]}),"Speaker"==s.attrs.role&&(0,L.jsx)("div",{children:(0,L.jsx)("p",{children:(0,L.jsx)(p.ToggleControl,{label:"Sync Number of Speakers and Evaluators",help:1==c?"Number of evaluators will automatically changed with number of speakers":"Let me manage this manually",checked:c,onChange:()=>{u(!c)}})})})]}),"wp4toastmasters/agendaedit"==s.blockName&&(0,L.jsx)("div",{children:(0,L.jsx)("p",{children:(0,L.jsx)(h.h,{label:"Time Allowed ("+s.attrs.editable+")",value:s.attrs?.time_allowed?s.attrs?.time_allowed:x(s.attrs),onChange:e=>{e=Math.abs(parseInt(e)),t.blocksdata[i].attrs.time_allowed=e,m(t)}})})}),"wp4toastmasters/agendanoterich2"==s.blockName&&(0,L.jsx)("div",{children:(0,L.jsx)("p",{children:(0,L.jsx)(h.h,{label:"Time Allowed ("+_+")",value:s.attrs?.time_allowed?s.attrs?.time_allowed:x(s.attrs),onChange:e=>{e=Math.abs(parseInt(e)),t.blocksdata[i].attrs.time_allowed=e,m(t)}})})}),(0,L.jsxs)("div",{className:"tmflexrow",children:[(0,L.jsx)("div",{children:(0,L.jsx)("button",{className:"blockmove",onClick:()=>{w(i,"up")},children:(0,L.jsx)(Q.Up,{})})}),(0,L.jsx)("div",{children:(0,L.jsx)("button",{className:"blockmove",onClick:()=>{w(i,"down")},children:(0,L.jsx)(Q.RU,{})})}),(0,L.jsx)("div",{children:(0,L.jsx)(h.k,{label:"Move",options:b,onChange:e=>function(e,n){console.log("selectMove "+e+" to "+n);const o=[];let r=t.blocksdata[e];console.log("drag source",e),console.log("drag destination",n),"top"==n&&(o.push(r),r=null),t.blocksdata.forEach((t,s)=>{s!=e?(o.push(t),s==n&&(console.log("selectMove insert "+s),o.push(r),r=null)):console.log("selectMove skip "+s)}),r&&o.push(r),m({...t,blocksdata:o})}(i,e)})})]}),(0,L.jsxs)("div",{children:[(0,L.jsx)(ce,{makeNotification:r,blockindex:i,moveBlock:w,post_id:n})," ",t.has_template&&(0,L.jsxs)(L.Fragment,{children:["Copy to template and future agendas: ",(0,L.jsx)(k,{})]})," "]}),(0,L.jsxs)("div",{children:[(0,L.jsx)(ue,{makeNotification:r,blockindex:i,insertBlock:function(e,n={},o="wp4toastmasters/role",r="",s=""){let i=[];Array.isArray(t.blocksdata)&&t.blocksdata.forEach((t,a)=>{i.push(t),a==e&&i.push({blockName:o,assignments:[],attrs:n,innerHTML:r,edithtml:s})}),t.blocksdata=i,m(t)},moveBlock:w,post_id:n})," "]}),(0,L.jsx)("div",{style:{marginTop:"10px"},children:(0,L.jsx)("button",{onClick:()=>l(null),children:"Done"})})]})]})}function pe(e){const{current_user_id:t,post_id:n,mode:r,makeNotification:s}=e,[i,a]=(0,o.useState)(0),[l,c]=(0,o.useState)(""),d=(0,M.p)();(0,o.useEffect)(()=>{d?.nonce&&(0,z.e)(d.nonce)},[d?.nonce]);const{isLoading:p,isFetching:f,isSuccess:m,isError:g,data:b,error:v,refetch:y}=(0,u.useQuery)(["absences-data",n],function(){return z.A.get("absences?post_id="+n)},{enabled:!0,retry:2,onSuccess:function(e){},onError:function(e,t,n){console.log("absences error",e)},refetchInterval:6e4});if(g)return(0,L.jsx)("p",{children:"Error loading absences"});const x=(0,u.useQueryClient)(),j=(0,u.useMutation)(async e=>await z.A.post("absences?post_id="+n+"&_locale=user",e),{onMutate:async e=>{await x.cancelQueries(["absences-data",n]);const t=x.getQueryData(["blocks-data",n]);return x.setQueryData(["absences-data",n],t=>{const{data:n}=t,{absences:o}=n;return"add"==e.operation?o.push({ID:e.ID,name:e.name}):"remove"==e.operation&&o.splice(e.index,1),{...t,data:{...n,absences:o}}}),s("Updating ..."),{previousData:t}},onSettled:(e,t,n,o)=>{x.invalidateQueries(["absences-data",n.post_id])},onSuccess:(e,t,n,o)=>{s("Updated")},onError:(e,t,n)=>{s("Error updating abscences "+e.message),console.log("mutate assignment error",e),x.setQueryData("absences-data",n.previousData)}});function w(e){let t=E.find(t=>{if(t.value==e)return t});return t?.label}function k(e,t,n){j.mutate({operation:"remove",index:t,ID:e,until:n})}function _(e){j.mutate({operation:"add",ID:e,name:w(e),until:l})}if(p)return(0,L.jsx)("div",{children:"Loading absences list ..."});const{absences:C,upcoming:S,memberlist:E}=b.data;let A=-1;return C&&Array.isArray(C)&&C.forEach((e,n)=>{e.ID==t&&(A=n)}),"edit"==r?(0,L.jsxs)("div",{className:"absence",children:[(0,L.jsx)("h3",{children:"Planned Absences"}),C.map((e,t)=>(0,L.jsxs)("p",{children:[(0,L.jsx)("button",{className:"tmform",onClick:()=>{k(e.ID,t,e.until)},children:"Remove"})," ",e.name," ",e.until&&""!=e.until&&(0,L.jsxs)("em",{children:["until ",new Date(e.until).toLocaleDateString()]})]})),(0,L.jsx)(h.k,{label:"Add Member to List",value:i,options:E,onChange:e=>{a(e)}}),(0,L.jsx)(h.k,{label:"One meeting or several?",options:S,value:l,onChange:c}),(0,L.jsx)("button",{className:"tmform",onClick:()=>{_(i)},children:"Add"})]}):(0,L.jsxs)("div",{className:"absence",children:[(0,L.jsx)("h3",{children:"Planned Absences"}),C.map(e=>(0,L.jsxs)("p",{children:[e.name," ",e.until&&""!=e.until&&(0,L.jsxs)("em",{children:["until ",new Date(e.until).toLocaleDateString()]})]})),A<0&&(0,L.jsx)(h.k,{label:"One meeting or several?",options:S,value:l,onChange:c}),(0,L.jsxs)("p",{children:[A>-1&&(0,L.jsx)("button",{className:"tmform",onClick:()=>{k(t,A)},children:"Remove Me"})," ",A<0&&(0,L.jsx)("button",{className:"tmform",onClick:()=>{_(t)},children:"Add Me"})]})]})}function fe(e){const{current_user_id:t,post_id:n,mode:r,makeNotification:s}=e,[i,a]=(0,o.useState)(0),l=(0,M.p)();(0,o.useEffect)(()=>{l?.nonce&&(0,z.e)(l.nonce)},[l?.nonce]);const c=(0,u.useQueryClient)(),{isLoading:d,isFetching:p,isSuccess:f,isError:m,data:g,error:b,refetch:v}=(0,u.useQuery)(["hybrid-data",n],function(){return z.A.get("hybrid?post_id="+n)},{enabled:!0,retry:2,onSuccess:function(e){console.log("hybrid data",e)},onError:function(e,t,n){console.log("hybrid error",e)},refetchInterval:6e4});if(m)return(0,L.jsx)("p",{children:__("Error loading Hybrid.js data","rsvpmaker-for-toastmasters")});const y=(0,u.useMutation)(async e=>await z.A.post("hybrid?post_id="+n,e),{onMutate:async e=>{await c.cancelQueries(["hybrid-data",n]);const t=c.getQueryData(["blocks-data",n]);return c.setQueryData(["hybrid-data",n],t=>{const{data:n}=t,{hybrid:o}=n;return"add"==e.operation?o.push({ID:e.ID,name:e.name}):"remove"==e.operation&&o.splice(e.index,1),{...t,data:{...n,hybrid:o}}}),s(__("Updating ...","rsvpmaker-for-toastmasters")),{previousData:t}},onSettled:(e,t,n,o)=>{c.invalidateQueries(["hybrid-data",n.post_id])},onSuccess:(e,t,n,o)=>{s(__("Updated","rsvpmaker-for-toastmasters"))},onError:(e,t,n)=>{s(__("update hybrid error","rsvpmaker-for-toastmasters")),console.log("mutate hybrid error",e),c.setQueryData("hybrid-data",n.previousData)}});if(d)return(0,L.jsx)("div",{children:__("Loading hybrid list ...","rsvpmaker-for-toastmasters")});const{hybrid:x,memberlist:j}=g.data;function w(e){if(!Array.isArray(j))return"User "+e;let t=j.find(t=>{if(t.value==e)return t});return t?.label}function k(e,t){y.mutate({operation:"remove",index:t,ID:e})}function _(e){y.mutate({operation:"add",ID:e,name:w(e)})}let C=-1;return Array.isArray(x)&&x.forEach((e,n)=>{e.ID==t&&(C=n)}),"edit"==r?(0,L.jsxs)("div",{className:"absence",children:[(0,L.jsx)("h3",{children:__("In Person Attendance","rsvpmaker-for-toastmasters")}),x.map((e,t)=>(0,L.jsxs)("p",{children:[(0,L.jsx)("button",{className:"tmform",onClick:()=>{k(e.ID,t,e.until)},children:__("Remove","rsvpmaker-for-toastmasters")})," ",e.name]})),(0,L.jsx)(h.k,{label:__("Add Member to List","rsvpmaker-for-toastmasters"),value:i,options:j,onChange:e=>{a(e)}}),(0,L.jsx)("button",{className:"tmform",onClick:()=>{_(i)},children:__("Add","rsvpmaker-for-toastmasters")})]}):(0,L.jsxs)("div",{className:"hybrid",children:[(0,L.jsx)("h3",{children:__("In Person Attendance","rsvpmaker-for-toastmasters")}),x.map(e=>(0,L.jsx)("p",{children:e.name})),(0,L.jsxs)("p",{children:[C>-1&&(0,L.jsx)("button",{className:"tmform",onClick:()=>{k(t,C)},children:__("Remove Me","rsvpmaker-for-toastmasters")}),C<0&&(0,L.jsx)("button",{className:"tmform",onClick:()=>{_(t)},children:__("Add Me","rsvpmaker-for-toastmasters")})]})]})}var me=r(9399);function ge({post_id:e}){const[t,n]=(0,o.useState)({}),{mutate:r}=(0,q.cl)(n),s={value:"",label:"Select Member"},[i,a]=(0,o.useState)(s),[l,c]=(0,o.useState)({key:"",label:"",options:[],signature:!1}),[u,f]=(0,o.useState)(!1),[m,g]=(0,o.useState)(!1),[b,v]=(0,o.useState)(!1),[y,x]=(0,o.useState)(""),[j,w]=(0,o.useState)(""),[k,_]=(0,o.useState)(""),[C,S]=(0,o.useState)(!1),[E,A]=(0,o.useState)(!1),[T,O]=(0,o.useState)(0),N={button:{minWidth:"120px",backgroundColor:"black",padding:"10px",borderRadius:"4px",marginRight:"10px"},plusbutton:{backgroundColor:"black",padding:"10px",borderRadius:"4px",marginRight:"10px"},minusbutton:{backgroundColor:"red",padding:"10px",borderRadius:"4px",marginRight:"10px"},buttonText:{color:"white"},h1:{fontSize:"30px",fontWeight:"bold"},h2:{fontSize:"25px"}};let R=localStorage.getItem("toastmastersVoting");R?console.log("stored_token",R):(R=(new Date).getTime()+Math.random(),localStorage.setItem("toastmastersVoting",R),console.log("new token",R)),(0,o.useEffect)(()=>{!function(e){if(e){var t=document.getElementById(e);t?t.scrollIntoView({behavior:"smooth"},!0):console.log("scroll to id could not find element "+e)}}("react-agenda")},[]);const{isLoading:D,isFetching:M,isSuccess:P,isError:I,data:F,error:B,refetch:Q}=(0,q.b0)(R,e,n);if(I)return(0,L.jsxs)("p",{children:["Error loading agenda data. Try ",(0,L.jsx)("a",{href:window.location.href,children:"reloading the page"}),". You can also ",(0,L.jsx)("a",{href:window.location.href.indexOf("?")>0?window.location.href+"&revert=1":window.location.href+"?revert=1",children:"use the old version of the signup form"}),"."]});if((D||M)&&!F)return console.log("isLoading",D),console.log("isFetching",M),(0,L.jsx)("p",{children:"Loading ..."});console.log("speaker results",t.speaker_results);const z=Object.keys(t.ballot);t.ballot,z.forEach(e=>{"Template"!=e&&(console.log("contest",e),console.log(t.ballot[e]))}),console.log("votingdata",t),console.log("ballot keys",Object.keys(t.ballot)),console.log("ballot entries",Object.entries(t.ballot));for(const[e,n]in Object.entries(t.ballot))console.log("ballot",e),console.log("ballot value",n);if(t.is_vote_counter&&"counting"==y)return(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{style:N.h1,children:"Vote Counter's Tool: Vote Count"}),(0,L.jsxs)("p",{children:[(0,L.jsx)("button",{style:N.button,onClick:()=>{x("")},children:(0,L.jsx)("span",{style:N.buttonText,children:"Ballot Setup"})}),"  ",(0,L.jsx)("button",{style:N.button,onClick:()=>{x("ballot")},children:(0,L.jsx)("span",{style:N.buttonText,children:"Ballot"})})," ",(0,L.jsx)("button",{style:N.button,onClick:()=>{Q()},children:(0,L.jsx)("span",{style:N.buttonText,children:"Refresh"})})]}),(0,L.jsx)(U.d,{innerHTML:t.votecount})]});if(t.is_vote_counter&&""==y)return(0,L.jsxs)("div",{children:[(0,L.jsxs)("p",{style:N.h1,children:[(0,d.A)("Vote Counter's Tool",t),": ",(0,d.A)("Ballot Setup",t)]}),(0,L.jsxs)("div",{style:{display:"flex",flex:1,flexDirection:"row"},children:[E?(0,L.jsx)("button",{style:N.button,children:(0,L.jsx)("span",{style:{color:"green",backgroundColor:"white",padding:"5px"},children:(0,d.A)("Copied!",t)})}):(0,L.jsx)(me.CopyToClipboard,{text:(0,d.A)('Please vote using the link below. For subsequent votes, click "Refresh" if the ballot of choices is not displayed')+"\n\n"+t.url,onCopy:()=>{A(!0),setTimeout(()=>{A(!1)},9e3)},children:(0,L.jsx)("button",{style:N.button,children:(0,L.jsx)("span",{style:N.buttonText,children:(0,d.A)("Copy Voting Link",t)})})}),(0,L.jsx)("button",{style:N.button,onClick:()=>{x("counting")},children:(0,L.jsx)("span",{style:N.buttonText,children:(0,d.A)("Vote Count",t)})})," ",(0,L.jsx)("button",{style:N.button,onClick:()=>{x("ballot")},children:(0,L.jsx)("span",{style:N.buttonText,children:"Ballot"})})," ",(0,L.jsx)("button",{style:N.button,onClick:()=>{Q()},children:(0,L.jsx)("span",{style:N.buttonText,children:"Refresh"})})]}),z.map((o,a)=>{if("Template"==o||"C"==o||"c"==o)return;const l=t.ballot[o];return(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{style:N.h2,children:o}),l.contestants.map((e,r)=>(0,L.jsxs)("p",{children:[(0,L.jsx)("button",{style:N.minusbutton,onClick:()=>{l.deleted.push(e),l.contestants.splice(r,1);const s={...t.ballot,c:l};s[o].status="draft",console.log("altered ballot",s[o]),n({...t,ballot:s})},children:(0,L.jsx)("span",{style:N.buttonText,children:"-"})})," ",e]},"contestant"+r)),l.new.length?(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{children:"Pending:"}),l.new.map((e,r)=>(0,L.jsxs)("p",{children:[(0,L.jsx)("button",{style:N.plusbutton,onClick:()=>{l.contestants.push(e),l.new.splice(r,1);const s={...t.ballot,c:l};s[o].status="draft",console.log("altered ballot",s[o]),n({...t,ballot:s})},children:(0,L.jsx)("span",{style:N.buttonText,children:"+"})})," ",e]},"pending"+r))]}):null,l.deleted.length?(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{children:"Deleted:"}),l.deleted.map((e,r)=>(0,L.jsxs)("p",{style:{textDecoration:"line-through"},children:[(0,L.jsx)("button",{style:N.plusbutton,onClick:()=>{l.contestants.push(e),l.deleted.splice(r,1);const s={...t.ballot,c:l};s[o].status="draft",console.log("altered ballot",s[o]),n({...t,ballot:s})},children:(0,L.jsx)("span",{style:N.buttonText,children:"+"})})," ",e]},"deleted"+r))]}):null,(0,L.jsx)("p",{children:(0,L.jsx)(h.k,{label:"Member to Add",value:i,options:[s,...t.memberlist],onChange:s=>{if(!s)return;console.log("add on select",s),l.contestants.push(s);const i={...t.ballot,c:l};i[o].status="draft",console.log("altered ballot",i[o]),n({...t,ballot:i}),r({ballot:i,post_id:e,identifier:R})}})}),(0,L.jsxs)("div",{style:{display:"flex",flex:1,flexDirection:"row"},children:[(0,L.jsx)("div",{children:(0,L.jsx)(p.TextControl,{label:"Type Choice to Add",value:j,onChange:e=>{w(e)}})}),(0,L.jsx)("div",{style:{padding:"20px"},children:(0,L.jsx)("button",{style:N.plusbutton,onClick:()=>{l.contestants.push(j),w("");const s={...t.ballot,c:l};s[o].status="draft",console.log("altered ballot",s[o]),n({...t,ballot:s}),r({ballot:s,post_id:e,identifier:R})},children:(0,L.jsx)("span",{style:N.buttonText,children:"+"})})})]}),(0,L.jsx)("p",{children:(0,L.jsx)(p.ToggleControl,{label:(0,d.A)("Require Signature",t),help:1==l.signature_required?(0,d.A)('Vote must be "signed" by a logged in member',t):(0,d.A)("Anonymous voting is allowed",t),checked:l.signature_required,onChange:()=>{const e={...l};e.signature_required=!l.signature_required,console.log("modified ballot",e);const r={...t.ballot};r[o]=e,console.log("modified ballots",r);const s={...t,ballot:r};console.log("modified voting data",s),n(s)}})}),"publish"==l.status?(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{children:(0,L.jsx)("button",{style:N.button,onClick:()=>{const n={...l,status:"draft"},s={...t.ballot};s[o]=n,console.log("ballot update for "+o,s),r({ballot:s,post_id:e,identifier:R})},children:(0,L.jsx)("span",{style:N.buttonText,children:"Unpublish"})})}),E?(0,L.jsx)("button",{style:N.button,children:(0,L.jsx)("span",{style:{color:"green",backgroundColor:"white",padding:"5px"},children:(0,d.A)("Copied!",t)})}):(0,L.jsx)(me.CopyToClipboard,{text:(0,d.A)('Please vote using the link below. For subsequent votes, click "Refresh" if the ballot of choices is not displayed')+"\n\n"+t.url,onCopy:()=>{A(!0),setTimeout(()=>{A(!1)},9e3)},children:(0,L.jsx)("button",{style:N.button,children:(0,L.jsx)("span",{style:N.buttonText,children:(0,d.A)("Copy Voting Link",t)})})})]}):(0,L.jsx)("p",{children:(0,L.jsx)("button",{style:N.button,onClick:()=>{const n={...l,status:"publish"},s={...t.ballot};s[o]=n,console.log("ballot update for "+o,s),r({ballot:s,post_id:e,identifier:R}),A(!1)},children:(0,L.jsx)("span",{style:N.buttonText,children:(0,d.A)("Publish",t)})})})]},"contest"+a)}),(0,L.jsx)("p",{style:N.h2,children:(0,d.A)("New Ballot",t)}),(0,L.jsx)("div",{children:(0,L.jsx)(p.TextControl,{label:"Contest or Question",value:k,onChange:e=>{_(e)}})}),(0,L.jsxs)("div",{style:{padding:"20px"},children:[(0,L.jsx)("p",{children:(0,L.jsx)(p.ToggleControl,{label:(0,d.A)("Include for Every Meeting",t),help:m?(0,d.A)("Included on ballot for every meeting",t):(0,d.A)("Only for this meeting",t),checked:m,onChange:()=>{g(e=>!e)}})}),(0,L.jsx)("p",{children:(0,L.jsx)(p.ToggleControl,{label:(0,d.A)("Require Signature",t),help:b?(0,d.A)('Vote must be "signed" by a logged in member',t):(0,d.A)("Anonymous voting is allowed",t),checked:b,onChange:()=>{v(e=>!e)}})}),(0,L.jsx)("p",{children:(0,L.jsx)(p.ToggleControl,{label:(0,d.A)("Make choices Yes/No/Abstain",t),help:u?(0,d.A)("Choices will default to Yes/No/Abstain",t):(0,d.A)("Choices to be entered",t),checked:u,onChange:()=>{f(e=>!e)}})}),(0,L.jsx)("button",{style:N.button,onClick:()=>{const e={...t.ballot};e[k]={...t.ballot.Template,signature_required:b,everyMeeting:m,contestants:u?["Yes","No","Abstain"]:[]},console.log("newBallotEntry",e),n({...t,ballot:e}),_("")},children:(0,L.jsx)("span",{style:N.buttonText,children:(0,d.A)("Add Ballot",t)})})]}),z.map((o,s)=>{if("Template"==o||"C"==o||"c"==o)return;const i=t.ballot[o];if("publish"!=i.status||i.signature_required)return;const a=[...t.added_votes];return(0,L.jsxs)("div",{children:[(0,L.jsxs)("p",{style:N.h2,children:[(0,d.A)("Add Votes",t),": ",o]}),(0,L.jsx)("p",{children:"If you received votes from outside of this app, you can add them here."}),i.contestants.map((s,i)=>{let l=a.find((e,t)=>{if(e.ballot==o&&e.contestant==s)return e.index=t,e});return l||(l={ballot:o,contestant:s,add:0,index:a.length},a.push(l),console.log("created addvote object",l)),(0,L.jsxs)("p",{children:[(0,L.jsx)("button",{style:N.plusbutton,onClick:()=>{console.log("add vote",s),S(!0),l.add++,console.log(l),a[l.index].add=l.add,console.log("added",a);const o={...t,added_votes:a};console.log("added update",o),n(o),r({added:a,post_id:e,identifier:R})},children:(0,L.jsx)("span",{style:N.buttonText,children:"+"})}),(0,L.jsx)("button",{style:N.minusbutton,onClick:()=>{console.log("add vote",s),S(!0),l.add>0&&l.add--,console.log(l),a[l.index].add=l.add,console.log("added",a);const o={...t,added_votes:a};console.log("added update",o),n(o),r({added:a,post_id:e,identifier:R})},children:(0,L.jsx)("span",{style:N.buttonText,children:"-"})}),s," +",l.add]},"addvotes"+i)})]},"contestadd"+s)}),t.open_club_ballots&&t.open_club_ballots.length?(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{style:N.h2,children:(0,d.A)("Close Ballots (Signed Votes)",t)}),(0,L.jsx)("p",{children:(0,d.A)("Once you have received the required number of votes, close the voting. Voting results will be saved as a club minutes document on the website.",t)}),(0,L.jsx)(h.k,{label:(0,d.A)("Select Ballot to Close",t),value:T,options:[{value:0,label:"Select Ballot to Close"},...t.open_club_ballots],onChange:e=>{O(e),console.log("setClose",T)}}),(0,L.jsx)("p",{children:(0,L.jsx)("button",{style:N.button,onClick:()=>{const o={...t,close_ballot:T};n(o),r({close_ballot:T,post_id:e,identifier:R}),O({value:0,label:"Select Ballot to Close"})},children:(0,L.jsx)("span",{style:N.buttonText,children:(0,d.A)("Close",t)})})})]}):null,(0,L.jsx)("p",{style:N.h2,children:(0,d.A)("Reset",t)}),(0,L.jsx)("p",{children:(0,L.jsx)("button",{style:N.button,onClick:()=>{r({reset:!0,post_id:e,identifier:R})},children:(0,L.jsx)("span",{style:N.buttonText,children:(0,d.A)("Reset Ballot",t)})})})]});let H=!1;return(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{style:N.h1,children:(0,d.A)("Voting",t)}),(0,L.jsx)("p",{children:(0,L.jsx)("button",{style:N.button,onClick:()=>{Q()},children:(0,L.jsx)("span",{style:N.buttonText,children:"Refresh"})})}),t.is_vote_counter?(0,L.jsxs)("p",{children:[(0,L.jsx)("button",{style:N.button,onClick:()=>{x("")},children:(0,L.jsx)("span",{style:N.buttonText,children:"Ballot Setup"})})," ",(0,L.jsx)("button",{style:N.button,onClick:()=>{x("counting")},children:(0,L.jsx)("span",{style:N.buttonText,children:"Vote Count"})})]}):null,z.map((n,o)=>{if("Template"==n)return;const s=t.ballot[n];return"publish"!=s.status?null:(H=!0,t.myvotes.includes(n)?(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{style:N.h2,children:n}),(0,L.jsx)("h3",{children:"✔ Voted"})]},"contest"+o):s.signature_required&&!t.authorized_user?(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{style:N.h2,children:n}),(0,L.jsx)("p",{style:{color:"red"},children:(0,d.A)("You must be logged in to vote on this question",t)}),(0,L.jsx)("p",{children:(0,L.jsx)("a",{href:t.login_url,children:(0,d.A)("Please login",t)})})]},"contest"+o):(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{style:N.h2,children:n}),s.contestants.length?(0,L.jsxs)("p",{children:[(0,d.A)("Vote for",t),":"]}):null,s.contestants.map((o,i)=>(0,L.jsx)("div",{children:(0,L.jsxs)("p",{children:[(0,L.jsx)("button",{style:{backgroundColor:"black",padding:"10px"},onClick:()=>{const i={vote:o,key:n,identifier:R,post_id:s.post_id?s.post_id:e,signature:s.signature_required?t.current_user_name:""};console.log("vote",i),r(i)},children:(0,L.jsxs)("span",{style:N.buttonText,children:["✔ ",(0,d.A)("Vote",t)]})})," ",o]})},"contestant"+i)),s.signature_required?(0,L.jsx)("p",{style:{style:"italic"},children:(0,d.A)("Vote will be recorded as signed by",t)+" "+t.current_user_name}):null]},"contest"+o))}),t.is_vote_counter||H?null:(0,L.jsxs)("div",{children:[(0,L.jsxs)("p",{children:['Current vote counter: "',t.vote_counter_name,'." No ballots have been created yet.']}),(0,L.jsx)("p",{style:N.h2,children:"Assume the role of Vote Counter?"}),(0,L.jsx)("p",{children:"If no Vote Counter is available, any member can assume the role."}),t.authorized_user?(0,L.jsx)("p",{children:(0,L.jsx)("button",{style:N.button,onClick:()=>{r({post_id:e,identifier:R,take_vote_counter:!0})},children:(0,L.jsx)("span",{style:N.buttonText,children:"Take Vote Counter Role"})})}):(0,L.jsx)("p",{children:(0,L.jsx)("a",{href:t.login_url,children:"Please login first"})})]}),t.is_vote_counter?(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{style:N.h2,children:"Back to Vote Counter Controls?"}),(0,L.jsx)("p",{children:(0,L.jsx)("button",{style:N.button,onClick:()=>{x("")},children:(0,L.jsx)("span",{style:N.buttonText,children:"Go Back"})})})]}):null]})}Error,s["useId".toString()],"undefined"!=typeof window?o.useLayoutEffect:o.useEffect,"undefined"==typeof window?o.useEffect:o.useLayoutEffect;const be=i().lazy(()=>Promise.resolve().then(r.bind(r,924)));function ve(e){let t=0;const n=(0,M.p)(),r=(0,M.p)();(0,o.useEffect)(()=>{r?.nonce&&(0,z.e)(r.nonce)},[r?.nonce]),"rsvpmaker"==n.post_type?t=n.post_id:(t=new URL(document.location).searchParams.get("post_id"),t||(t=0));const[s,i]=(0,o.useState)(t),[a,l]=(0,o.useState)(0),[c,u]=(0,o.useState)(e.mode_init?e.mode_init:"signup"),[p,f]=(0,o.useState)("all"),[m,g]=(0,o.useState)(-1),[b,v]=(0,o.useState)(!1),[y,x]=(0,o.useState)("react-agenda"),[j,w]=(0,o.useState)(null),[k,_]=(0,o.useState)(null),[C,S]=(0,o.useState)(e.evaluation);function E(e){if(e){var t=document.getElementById(e);t?t.scrollIntoView({behavior:"smooth"},!0):console.log("Scroll to ID could not find element "+e)}}function A(e,t=!1,n=null){k&&clearTimeout(k),w({message:e,prompt:t,otherproperties:n});let o=setTimeout(()=>{w(null)},25e3);_(o)}const{mutate:T}=(0,q.cV)(s,A,ue);(0,o.useEffect)(()=>{E(y),"react-agenda"!=y&&x("react-agenda")},[c]);try{const{isLoading:O,isFetching:N,isSuccess:R,isError:D,data:P,error:I,refetch:F}=(0,q.qL)(s);if(D)return(0,L.jsxs)("p",{children:["Error loading agenda data. Try ",(0,L.jsx)("a",{href:window.location.href,children:"reloading the page"}),". You can also",(0,L.jsx)("a",{href:window.location.href.indexOf("?")>0?window.location.href+"&revert=1":window.location.href+"?revert=1",children:"use the old version of the signup form"}),"."]});if(O)return(0,L.jsx)("p",{children:"Loading..."});if(!P.data.current_user_id)return(0,L.jsx)("p",{children:"You must be logged in as a member of this website to see the signup form."});if(P){const{permissions:Y}=P?.data}const B=P.data;function Q(e){const t=[];return e.isTemplate?(t.push({label:(0,d.A)("Organize",B),value:"reorganize"}),t.push({label:(0,d.A)("Template/Settings",B),value:"settings"})):(t.push({label:(0,d.A)("Sign Up",B),value:"signup"}),(H("edit_post")||H("organize_agenda")||H("edit_signups"))&&(t.push({label:(0,d.A)("Edit",B),value:"edit"}),t.push({label:(0,d.A)("Assign",B),value:"assign"})),t.push({label:(0,d.A)("Evaluation",B),value:"evaluation"}),t.push({label:(0,d.A)("Voting",B),value:"voting"}),(H("edit_post")||H("organize_agenda"))&&t.push({label:(0,d.A)("Organize",B),value:"reorganize"}),H("edit_post")&&t.push({label:(0,d.A)("Settings",B),value:"settings"})),(0,L.jsxs)("div",{id:"fixed-mode-control",children:[j&&j.message&&(0,L.jsx)("div",{className:"mode-control-notification",children:j.message}),(0,L.jsx)("div",{className:"mode-centered",children:t.map(e=>(0,L.jsx)("button",{className:c==e.value?"blackButton bottomButton":"bottomButton",onClick:()=>{u(e.value),x("react-agenda")},children:e.label},e.value))}),(0,L.jsx)("p",{className:"mode-help mode-centered",children:"signup"==c?(0,d.A)("Sign yourself up for roles and enter/update speech details.",B):"edit"==c?(0,d.A)("Assign others to roles and edit their speech details. Rearrange or delete assignments.",B):"assign"==c?(0,d.A)("Assign others to roles (grid view).",B):"suggest"==c?(0,d.A)("Nominate another member for a role -- they will get an email notification that makes it easy to say yes.",B):"evaluation"==c?(0,d.A)("Provide written speech feedback using digital versions of the evaluation forms.",B):"reorganize"==c?(0,d.A)("Rearrange roles and other elements on your agenda and adjust the timing.",B):"settings"==c?(0,d.A)("Update your standard meeting template or switch the template for the current meeting. Adjust event date and time. Update settings.",B):void 0})]})}function H(e){const t=P.data.permissions;let n=!1;return t[e]&&(n=t[e]),n}let W=new Date(B.datetime);const K={weekday:"long",year:"numeric",month:"long",day:"numeric"};let G="";return s||i(B.post_id),a||l(B.current_user_id),"settings"==c?(0,L.jsxs)("div",{className:"agendawrapper",children:[(0,L.jsx)(Q,{isTemplate:!1!==B.is_template,post_id:B.post_id}),(0,L.jsx)(se,{makeNotification:A,setPostId:i,user_can:H,data:B})]}):"evaluation"==c?(0,L.jsxs)("div",{className:"agendawrapper",children:[(0,L.jsx)(Q,{}),(0,L.jsx)(o.Suspense,{fallback:(0,L.jsx)("h1",{children:"Loading ..."}),children:(0,L.jsx)(be,{scrolltoId:E,makeNotification:A,data:B,evaluate:C,setEvaluate:S})})]}):"voting"==c?(0,L.jsxs)("div",{className:"agendawrapper",children:[(0,L.jsx)(Q,{}),(0,L.jsx)(o.Suspense,{fallback:(0,L.jsx)("h1",{children:"Loading ..."}),children:(0,L.jsx)(ge,{post_id:s,data:B})})]}):"reorganize"==c?(0,L.jsx)(o.Suspense,{fallback:(0,L.jsx)("h1",{children:"Loading ..."}),children:(0,L.jsx)(de,{data:B,mode:c,setMode:u,post_id:s,makeNotification:A,ModeControl:Q,showDetails:p,setshowDetails:f,setScrollTo:x,setEvaluate:S,setPostId:i})}):(0,L.jsxs)("div",{className:"agendawrapper",id:"agendawrapper"+s,children:["suggest"==c&&(0,L.jsxs)("p",{children:[(0,d.A)("See also the",B)," ",(0,L.jsx)("a",{href:B.admin_url+"admin.php?page=wpt_suggest_all_roles&meeting="+s,children:(0,d.A)("Suggest All Roles",B)})," ",(0,d.A)("tool for sending suggestions in a batch.",B)]}),(0,L.jsx)(L.Fragment,{children:"rsvpmaker"!=n.post_type&&(0,L.jsx)(h.k,{label:"Choose Event",value:s,options:B.upcoming,onChange:e=>{i(parseInt(e)),A((0,d.A)("Date changed, please wait for the date to change ...",B)),queryClient.invalidateQueries(["blocks-data",s]),F()}})}),(0,L.jsxs)("h4",{children:[W.toLocaleDateString("en-US",K)," ",B.is_template&&(0,L.jsxs)("span",{children:["(",(0,d.A)("Template",B),")"]})]}),(0,L.jsx)(Q,{makeNotification:A,isTemplate:!1!==B.is_template,post_id:B.post_id}),!Array.isArray(B.blocksdata)&&(0,L.jsxs)("p",{children:[(0,d.A)("Error loading agenda",B)," (",(0,L.jsx)("a",{href:window.location.href+"?revert=1",children:(0,d.A)("try alternate version",B)}),")."]}),"assign"==c&&(0,L.jsx)("div",{className:"assignment",note:"workaround for alignment issue"}),Array.isArray(B.blocksdata)&&B.blocksdata.map((e,t)=>{if(G=W.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}),e.rendered&&e.rendered.length>0)return(0,L.jsx)(U.d,{innerHTML:e.rendered});if(e?.attrs?.time_allowed&&(W.setMilliseconds(W.getMilliseconds()+6e4*parseInt(e.attrs.time_allowed)),e.attrs.padding_time&&W.setMilliseconds(W.getMilliseconds()+6e4*parseInt(e.attrs.padding_time)),G=G+" to "+W.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0})),!e.blockName||!e.attrs)return null;if("assign"==c)return"wp4toastmasters/role"==e.blockName?(0,L.jsx)(X,{makeNotification:A,showDetails:p,agendadata:B,post_id:s,blockindex:t,mode:c,block:e,setMode:u,setScrollTo:x,setEvaluate:S,data:B}):null;if("signup"==c){if("wp4toastmasters/role"==e.blockName){let n=H("edit_signups")&&m==t?"edit":"signup";return"speakers-evaluators"!=p||["Speaker","Evaluator"].includes(e.attrs.role)?(0,L.jsxs)("div",{id:"block"+t,className:"block",children:[(0,L.jsx)("div",{children:(0,L.jsx)("strong",{children:G})}),(0,L.jsx)(X,{makeNotification:A,showDetails:p,agendadata:B,post_id:s,blockindex:t,mode:n,block:e,setMode:u,setScrollTo:x,setEvaluate:S,setShowControls:g,data:B}),(0,L.jsx)(Z,{block:e,makeNotification:A,data:B}),m==t&&H("organize_agenda")&&(0,L.jsx)(he,{block:e,blockindex:t,data:B,post_id:s,makeNotification:A,setMode:u,setShowControls:g})]},"block"+t):null}if("speakers-evaluators"==p)return null;if(p&&"wp4toastmasters/agendaedit"==e.blockName){let n=H("edit_signups")&&m==t?"edit":"signup";return(0,L.jsxs)("div",{id:"block"+t,className:"block",children:[(0,L.jsx)("div",{children:(0,L.jsx)("strong",{children:G})}),(0,L.jsx)(ae,{makeNotification:A,mode:n,block:e,blockindex:t,uid:e.attrs.uid,post_id:s}),m==t&&H("organize_agenda")&&(0,L.jsx)(he,{block:e,blockindex:t,data:B,post_id:s,makeNotification:A,setMode:u,setShowControls:g}),m!=t&&H("organize_agenda")&&(0,L.jsxs)("button",{className:"agenda-tooltip",onClick:()=>{g(t)},children:[(0,L.jsx)("span",{className:"agenda-tooltip-text",children:(0,d.A)("Edit/Organize",B)}),(0,L.jsx)(V,{icon:J})]})]},"block"+t)}if(p&&"wp4toastmasters/agendanoterich2"==e.blockName){let n=H("edit_signups")&&m==t?"edit":"signup";return(0,L.jsxs)("div",{id:"block"+t,className:"block",children:[(0,L.jsx)("div",{children:(0,L.jsx)("strong",{children:G})}),("edit"!=n||!b)&&(0,L.jsx)(U.d,{innerHTML:e.innerHTML}),"edit"==n&&!b&&(0,L.jsx)("button",{className:"tmsmallbutton",onClick:()=>v(!0),children:(0,d.A)("Edit",B)}),"edit"==n&&b&&(0,L.jsx)(ie,{makeNotification:A,blockindex:t,block:e}),m==t&&H("organize_agenda")&&(0,L.jsx)(he,{block:e,blockindex:t,data:B,post_id:s,makeNotification:A,setMode:u,setShowControls:g}),m!=t&&H("organize_agenda")&&(0,L.jsxs)("button",{className:"agenda-tooltip",onClick:()=>{g(t)},children:[(0,L.jsx)("span",{className:"agenda-tooltip-text",children:(0,d.A)("Edit/Organize",B)}),(0,L.jsx)(V,{icon:J})]})]},"block"+t)}return p&&"wp4toastmasters/context"==e.blockName?(0,L.jsx)(L.Fragment,{children:e.innerBlocks.map(e=>(0,L.jsx)(U.d,{innerHTML:e.innerHTML}))}):p&&e.innerHTML?(0,L.jsx)("div",{id:"block"+t,className:"block",children:(0,L.jsx)(U.d,{innerHTML:e.innerHTML})},"block"+t):"wp4toastmasters/absences"==e.blockName?(0,L.jsx)(pe,{makeNotification:A,absences:B.absences,current_user_id:a,post_id:s,mode:c}):"wp4toastmasters/hybrid"==e.blockName?(0,L.jsx)(fe,{makeNotification:A,current_user_id:a,post_id:s,mode:c}):null}return"edit"==c?"wp4toastmasters/role"==e.blockName?(0,L.jsxs)("div",{id:"block"+t,className:"block",children:[(0,L.jsx)("div",{children:(0,L.jsx)("strong",{children:G})}),(0,L.jsx)(X,{makeNotification:A,showDetails:p,agendadata:B,post_id:s,blockindex:t,mode:c,block:e,setEvaluate:S,setMode:u,data:B}),(0,L.jsx)(Z,{block:e,makeNotification:A,data:B}),m==t&&H("organize_agenda")&&(0,L.jsx)(he,{block:e,blockindex:t,data:B,post_id:s,makeNotification:A,setMode:u,setShowControls:g})]},"block"+t):p&&"wp4toastmasters/agendaedit"==e.blockName?(0,L.jsxs)("div",{id:"block"+t,className:"block",children:[(0,L.jsx)("div",{children:(0,L.jsx)("strong",{children:G})}),(0,L.jsx)(ae,{makeNotification:A,mode:c,block:e,blockindex:t,uid:e.attrs.uid,post_id:s}),m==t&&H("organize_agenda")&&(0,L.jsx)(he,{block:e,blockindex:t,data:B,post_id:s,makeNotification:A,setMode:u,setShowControls:g}),m!=t&&H("organize_agenda")&&(0,L.jsxs)("button",{className:"agenda-tooltip",onClick:()=>{g(t)},children:[(0,L.jsx)("span",{className:"agenda-tooltip-text",children:(0,d.A)("Edit/Organize",B)}),(0,L.jsx)(V,{icon:J})]})]},"block"+t):p&&"wp4toastmasters/agendanoterich2"==e.blockName&&(H("edit_post")||H("organize_agenda"))?(0,L.jsxs)("div",{id:"block"+t,className:"block",children:[(0,L.jsx)("div",{children:(0,L.jsx)("strong",{children:G})}),(0,L.jsx)(ie,{makeNotification:A,blockindex:t,block:e,data:B}),m==t&&H("organize_agenda")&&(0,L.jsx)(he,{block:e,blockindex:t,data:B,post_id:s,makeNotification:A,setMode:u,setShowControls:g})]},"block"+t):p&&"wp4toastmasters/signupnote"==e.blockName&&(H("edit_post")||H("organize_agenda"))?(0,L.jsxs)("div",{id:"block"+t,className:"block",children:[(0,L.jsx)("div",{children:(0,L.jsx)("strong",{children:G})}),(0,L.jsx)(le,{blockindex:t,block:e})]},"block"+t):"wp4toastmasters/absences"==e.blockName?(0,L.jsx)(pe,{makeNotification:A,absences:B.absences,current_user_id:a,mode:c,post_id:s}):"wp4toastmasters/hybrid"==e.blockName?(0,L.jsx)(fe,{makeNotification:A,current_user_id:a,post_id:s,mode:c}):null:"suggest"==c&&"wp4toastmasters/role"==e.blockName?(0,L.jsxs)("div",{id:"block"+t,className:"block",children:[(0,L.jsx)("div",{children:(0,L.jsx)("strong",{children:G})}),(0,L.jsx)(X,{makeNotification:A,showDetails:p,agendadata:B,post_id:s,blockindex:t,mode:c,block:e,data:B}),(0,L.jsx)(Z,{block:e,makeNotification:A,data:B})]},"block"+t):null}),(0,L.jsx)("div",{children:(0,L.jsx)("button",{onClick:F,children:"Refresh"})})]})}catch($){return console.log("Error loading agenda",$),(0,L.jsxs)("p",{children:["Error loading agenda",(0,L.jsx)("a",{href:window.location.href+"?revert=1",children:"try alternate version"})]})}}var ye=r(924);function xe(e){const{member:t,project:n}=e,[r,s]=(0,o.useState)(0),[i,a]=(0,o.useState)(0),l=e.mode_init,[c,u]=(0,o.useState)("react-agenda"),[d,h]=(0,o.useState)(null),[p,f]=(0,o.useState)(null),[m,g]=(0,o.useState)(e.evaluation);if(t){console.log("member "+t);const{data:e,isLoading:o,isSuccess:r}=(0,q.sJ)(t,n)}function b(){const e="evaluation_admin"==l?{marginLeft:"200px;"}:{};return(0,L.jsxs)("div",{id:"fixed-mode-control",style:e,children:[d&&(0,L.jsxs)("div",{className:"tm-notification tm-notification-success suggestion-notification",children:[" ",(0,L.jsx)(U.d,{innerHTML:d.message})," ",d.prompt&&(0,L.jsx)(NextMeetingPrompt,{})," ",d.otherproperties&&d.otherproperties.map(e=>{if(e.template_prompt)return(0,L.jsxs)("div",{className:"next-meeting-prompt",children:[(0,L.jsx)("a",{target:"_blank",href:"/wp-admin/edit.php?post_type=rsvpmaker&page=rsvpmaker_template_list&t="+e.template_prompt,children:"Create/Update"})," - copy content to new and existing events"]})})," ",y&&(0,L.jsx)("em",{children:"Fetching fresh data ..."})]}),"evaluation_demo"==l&&(0,L.jsxs)("p",{style:{textAlign:"center"},children:["This tool works even better as part of a ",(0,L.jsx)("a",{href:"https://toastmost.org",children:"Toastmost.org"})," website! ",(0,L.jsx)("a",{href:"https://toastmost.org",children:"Learn more"})]})]})}const{isLoading:v,isFetching:y,isSuccess:x,isError:j,data:w,error:k,refetch:_}=(0,q.qL)(r);if(j)return(0,L.jsx)("p",{children:"Error loading evaluation data (EvalWrapper)"});if(v)return(0,L.jsx)("div",{children:"Loading ..."});const C=w.data;return(0,L.jsxs)("div",{className:"agendawrapper",children:[(0,L.jsx)(b,{}),(0,L.jsx)(ye.default,{mode:l,scrolltoId:function(e){if(e){var t=document.getElementById(e);t&&t.scrollIntoView({behavior:"smooth"},!0)}},makeNotification:function(e,t=!1,n=null){p&&clearTimeout(p),h({message:e,prompt:t,otherproperties:n});let o=setTimeout(()=>{h(null)},25e3);f(o)},data:C,evaluate:m,setEvaluate:g})]})}function je(e){const[t,n]=(0,o.useState)(0),[r,s]=(0,o.useState)(0),[i,a]=(0,o.useState)("settings"),[l,c]=(0,o.useState)("all"),[u,d]=(0,o.useState)("react-agenda"),[f,m]=(0,o.useState)(null),[g,b]=(0,o.useState)(null);function v(e,t=!1,n=null){g&&clearTimeout(g),m({message:e,prompt:t,otherproperties:n});let o=setTimeout(()=>{m(null)},25e3);b(o)}function y(){let e=A.upcoming.findIndex(e=>e.value==t);return A.upcoming[e+1]?(0,L.jsxs)("div",{className:"next-meeting-prompt",children:["Would you like to sign up for the ",(0,L.jsx)("a",{href:A.upcoming[e+1].permalink+"?newsignup",children:"Next meeting?"})]}):null}const{isLoading:x,isFetching:j,isSuccess:w,isError:k,data:_,error:C,refetch:S}=(0,q.qL)(t,i,!0);if(k)return(0,L.jsx)("p",{children:"Error loading ReorgWrapper.js data"});if((0,o.useEffect)(()=>{!function(e){if(e){var t=document.getElementById(e);t?t.scrollIntoView({behavior:"smooth"},!0):console.log("scroll to id could not find element "+e)}}(u),"react-agenda"!=u&&d("react-agenda")},[i]),_?.data){const e=_.data;e.has_template&&n(e.has_template);const{permissions:t}=_.data}function E(e){const{note:t}=e,n="reorganize"==i?[{value:"all",label:"Show All"},{value:"",label:"Outline View"},{value:"speakers-evaluators",label:"Speakers and Evaluators Only"},{value:"timed",label:"Timed Elements Only"}]:[{value:"all",label:"Show Details"},{value:"",label:"Outline View"},{value:"speakers-evaluators",label:"Speakers and Evaluators Only"}];return(0,L.jsxs)("div",{id:"fixed-mode-control",children:[t&&(0,L.jsx)("p",{className:"modenote",children:t}),f&&(0,L.jsxs)("div",{className:"tm-notification tm-notification-success suggestion-notification",children:[" ",(0,L.jsx)(U.d,{innerHTML:f.message})," ",f.prompt&&(0,L.jsx)(y,{})," ",f.otherproperties&&f.otherproperties.map(e=>{if(e.template_prompt)return(0,L.jsxs)("div",{className:"next-meeting-prompt",children:[(0,L.jsx)("a",{target:"_blank",href:"/wp-admin/edit.php?post_type=rsvpmaker&page=rsvpmaker_template_list&t="+e.template_prompt,children:"Create/Update"})," - copy content to new and existing events"]})})," ",j&&(0,L.jsx)("em",{children:"Fetching fresh data ..."})]}),["signup","edit","reorganize"].includes(i)&&(0,L.jsx)("div",{className:"showtoggle",children:(0,L.jsx)(h.k,{label:"View Options",options:n,value:l,onChange:e=>{console.log("setshowDetails",e),c(e)}})}),(0,L.jsx)(p.RadioControl,{className:"radio-mode",selected:i,label:"Mode",onChange:e=>{d("react-agenda"),a(e)},options:[{label:"Template/Settings",value:"settings"},{label:"Organize",value:"reorganize"},{label:"Preview Agenda",value:"preview-agenda"}]}),(0,L.jsx)("p",{className:"mode-help",children:"signup"==i?"Sign yourself up for roles and enter/update speech details":"edit"==i?"Assign others to roles and edit their speech details. Rearrange or delete assignments.":"suggest"==i?"Nominate another member for a role -- they will get an email notification that makes it easy to say yes":"evaluation"==i?"Provide written speech feedback using digital versions of the evaluation forms":"reorganize"==i?"Rearrange roles and other elements on your agenda and adjust the timing":"settings"==i?"Update your standard meeting template or switch the template for the current meeting. Adjust event date and time. Update settings.":void 0})]})}if(x)return(0,L.jsx)("p",{children:"Loading ..."});if(!_.data.current_user_id)return(0,L.jsx)("p",{children:"You must be logged in as a member of this website to see the signup form."});const A=_.data;return t||n(A.post_id),r||s(A.current_user_id),"settings"==i?(0,L.jsxs)("div",{className:"agendawrapper",children:[(0,L.jsx)(se,{makeNotification:v,setPostId:n,user_can:function(e){return!!_.data.permissions[e]&&_.data.permissions[e]},data:A}),(0,L.jsx)(E,{})]}):"reorganize"==i?(0,L.jsx)("div",{children:(0,L.jsx)(de,{data:A,mode:i,setMode:a,post_id:t,makeNotification:v,ModeControl:E,showDetails:l,setshowDetails:c,setScrollTo:d})}):(0,L.jsxs)("div",{className:"agenda-preview",children:[(0,L.jsx)("p",{children:(0,L.jsx)("em",{children:"Showing preview with ficticious date and members"})}),(0,L.jsx)("iframe",{src:A.agenda_preview,width:"800",height:"2000"}),(0,L.jsx)(E,{})]})}const we=new u.QueryClient;window.addEventListener("load",function(e){try{const e=document.getElementById("react-agenda");console.log("currentdoc",e);let t=e.getAttribute("mode");const n={ID:"",name:"",project:"",manual:"",title:""},o=e.getAttribute("evalme");if(console.log("mode_init",t),"meeting_vote"==t){console.log("load voting tool");const t=e.getAttribute("post_id"),n=document.getElementById("rsvpsection");return n&&n.remove(),void(0,c.H)(e).render((0,L.jsx)(i().StrictMode,{children:(0,L.jsx)(u.QueryClientProvider,{client:we,children:(0,L.jsx)(ge,{post_id:t})})}))}console.log("after voting tool"),o&&(n.ID=o,n.name=e.getAttribute("name"),n.project=e.getAttribute("project"),n.manual=e.getAttribute("manual"),n.title=e.getAttribute("title"),console.log("evaluation",n)),"evaluation_demo"==t||"evaluation_admin"==t||"evaluation_guest"==t?l().render((0,L.jsx)(i().StrictMode,{children:(0,L.jsx)(u.QueryClientProvider,{client:we,children:(0,L.jsx)(xe,{mode_init:t,evaluation:n})})}),document.getElementById("react-agenda")):"settings_admin"==t?l().render((0,L.jsx)(i().StrictMode,{children:(0,L.jsx)(u.QueryClientProvider,{client:we,children:(0,L.jsx)(je,{})})}),document.getElementById("react-agenda")):l().render((0,L.jsx)(i().StrictMode,{children:(0,L.jsx)(u.QueryClientProvider,{client:we,children:(0,L.jsx)(ve,{mode_init:t,evaluation:n})})}),document.getElementById("react-agenda"))}catch(e){console.log("no current doc found",e)}})})()})();
     1(()=>{var e,t,n={174:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,e:()=>r});const o=n(1083).A.create({baseURL:"/wp-json/rsvptm/v1/",headers:{"Content-type":"application/json"},validateStatus:function(e){return e<400}});function r(e){o.interceptors.request.use(t=>(t.headers["X-WP-Nonce"]=e,t))}const s=o},376:e=>{e.exports={ReactQueryDevtools:function(){return null},ReactQueryDevtoolsPanel:function(){return null}}},428:(e,t,n)=>{"use strict";n.d(t,{j:()=>r});var o=n(941),r=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,o.G6)(function(){t.notifyFn(e)})},t.batchCalls=function(e){var t=this;return function(){for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];t.schedule(function(){e.apply(void 0,o)})}},t.flush=function(){var e=this,t=this.queue;this.queue=[],t.length&&(0,o.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}())},790:e=>{"use strict";e.exports=window.ReactJSXRuntime},924:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>f});var o=n(1609),r=n(9692),s=n(6427),i=n(9439),a=n(8662),l=n(5148),c=n(6606),u=n(790);function d(e){const[t,n]=(0,o.useState)(""),[r,a]=(0,o.useState)([]),{project:l,manual:d,title:h,setEvaluate:p,setManual:f,setProject:m,setTitle:g,makeNotification:b}=e,v=(0,c.p)();return(0,o.useEffect)(()=>{fetch(v.url+"rsvptm/v1/paths_and_projects",{headers:{"X-WP-Nonce":v.nonce}}).then(e=>e.json()).then(e=>{e.paths&&a(e)},[]),e.project&&function(t){let o=t.replace(/([\s0-9]+)$/,""),r=o.replace(/ Level.+/,"");n(r),!e.manual&&o&&f(o)}(e.project)},[]),console.log("evaluation project chooser choices",r),r&&r.manuals&&void 0!==r.manuals?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{children:(0,u.jsx)(i.k,{source:"paths",options:r.paths,value:t,label:"Path",onChange:e=>n(e)})}),(0,u.jsx)("div",{children:(0,u.jsx)(i.k,{source:"manuals",options:r.manuals[t],value:d,label:"Level",onChange:e=>{f(e)}})}),(0,u.jsx)("div",{children:(0,u.jsx)(i.k,{source:"projects",options:r.projects[d]?r.projects[d]:[{value:"",label:"Set Path and Level to See Projects"}],value:l,label:"Project",onChange:e=>{m(e),p(t=>(t.manual=d,t.project=e,t)),b("Loading evaluation form ...")}})}),(0,u.jsxs)("p",{children:[(0,u.jsx)("strong",{children:"Title"})," ",(0,u.jsx)(s.TextControl,{value:h,onChange:e=>{g(e),p(t=>(t.title=e,t))}})]})]}):(0,u.jsx)("p",{children:"Loading project choices"})}function h(e){const{item:t,promptindex:n,note:r,response:i,setResponses:a,setNotes:l}=e,[c,d]=(0,o.useState)(i),[h,p]=(0,o.useState)(!0),f=(0,o.useRef)("");return(0,u.jsxs)("div",{children:[(0,u.jsxs)("p",{children:[(0,u.jsx)("strong",{children:t.prompt})," ",c]}),t.choices&&t.choices.length>0&&(0,u.jsx)("div",{children:(0,u.jsx)(s.RadioControl,{className:"radio-mode",options:t.choices,selected:c,onChange:e=>{d(e),a(t=>{let o=[...t];return o[n]=e,o})}})}),(0,u.jsx)("p",{children:(0,u.jsx)("textarea",{className:"evaluation-note",ref:f,onBlur:function(e){e.preventDefault(),l(e=>(e[n]=f.current.value,e)),p(!1)}})})]})}var p=n(5286);function f(e){const{makeNotification:t,data:n,evaluate:c,setEvaluate:f,scrolltoId:m,mode:g}=e,{isLoading:b,isError:v,isFetching:y,data:x}=(0,l.wM)(c.project,c.ID,function(e){e.data.second_language_requested>0?(console.log("adding second language prompts",e.data),B({prompts:e.data.form.concat(e.data.second_language),intro:e.data.intro,second_language_requested:!0})):(console.log("no second language prompts",e.data),B({prompts:e.data.form,intro:e.data.intro,second_language_requested:!1,second_language:e.data.second_language}))});if(v)return(0,u.jsx)("p",{children:(0,r.A)("Error loading evaluation data",n)});const[j,w]=(0,o.useState)("Path Not Set"),[k,_]=(0,o.useState)(c&&c.manual?c.manual:""),[C,S]=(0,o.useState)(c&&c.title?c.title:""),[E,A]=(0,o.useState)(c&&c.name?c.name:""),[T,O]=(0,o.useState)(n.current_user_name),[N,R]=(0,o.useState)(),[D,M]=(0,o.useState)(c&&c.project?c.project:""),[L,P]=(0,o.useState)([]),[I,F]=(0,o.useState)([]),[U,B]=(0,o.useState)({}),[Q,z]=(0,o.useState)(""),[q,H]=(0,o.useState)("");let V=-1==window.location.href.indexOf("?")?"?mode=evaluation":"&mode=evaluation",W=-1==window.location.href.indexOf("mode")?window.location.href+V:window.location.href;const{mutate:K}=(0,l.Nb)(n.post_id,z,t);if((0,o.useEffect)(()=>{m("react-agenda")},[Q,U]),b||y)return(0,u.jsx)("p",{children:(0,r.A)("Loading ...",n)});let G=[{value:"",label:"Choose Speaker"},{value:"guest",label:"Enter Guest Name"}];console.log("evaluation dashboard data",n.blocksdata),n.blocksdata&&n.blocksdata.forEach(e=>{e.attrs&&e.attrs.role&&"Speaker"==e.attrs.role&&e.assignments&&Array.isArray(e.assignments)&&(e.assignments.forEach(e=>{if(window.location.href.indexOf("speaker=")>0){const t=window.location.href.match(/speaker=([0-9]+)/),n=t&&t[1]?t[1]:"";if(e.ID!=n)return}if(""!=e.ID&&"0"!=e.ID&&0!=e.ID){let t=e.project_text?" / "+e.project_text:" / Speech Project Not Set";G.push({value:JSON.stringify(e),label:e.name+t})}}),c.ID>0&&G.push({value:JSON.stringify(c),label:c.name}),(window.location.href.indexOf("showprev")>0||window.location.href.indexOf("wp4t_evaluations")>0)&&Array.isArray(x.data.previous_speeches)&&x.data.previous_speeches.length&&(x.data.previous_speeches.forEach(e=>{G.push({value:JSON.stringify(e.value),label:e.label})}),G=G.concat(x.data.previous_speeches)),Array.isArray(e.memberoptions)&&e.memberoptions.length&&e.memberoptions.forEach(e=>{e.value>0&&G.push({value:JSON.stringify({ID:e.value,name:e.label,project:""}),label:e.label})}))}),G.length<4&&n.allmembers.forEach(e=>{G.push(e)}),console.log("evaluation assignment options",G);let Y=[];return console.log("evaluation tool mode",g),(0,u.jsxs)("div",{className:"eval",children:[(0,u.jsx)("h2",{children:(0,r.A)("Evaluation Tool",n)}),Q&&(0,u.jsxs)("div",{children:[(0,u.jsxs)("p",{children:[(0,u.jsx)("button",{onClick:function(){const e=new Blob([Q],{type:"text/html"}),t=new ClipboardItem({"text/html":e});navigator.clipboard.write([t])},children:(0,r.A)("Copy to Clipboard",n)})," ",(0,u.jsx)("em",{children:(0,r.A)("works in most browsers, but not Firefox",n)})]}),(0,u.jsx)("p",{children:(0,u.jsx)("a",{href:W,children:(0,r.A)("Reset",n)})}),(0,u.jsx)(a.d,{innerHTML:Q}),(0,u.jsx)("p",{children:(0,u.jsx)("a",{href:W,children:(0,r.A)("Reset",n)})})]}),(0,u.jsx)("h3",{children:(0,r.A)("Get Feedback",n)}),n.current_user_id&&(0,u.jsxs)("p",{children:[(0,r.A)("To request an evaluation, share this link",n),(0,u.jsx)("br",{}),(0,u.jsx)("a",{href:n.request_evaluation,children:n.request_evaluation})," ",n.request_evaluation.indexOf("admin")>0&&(0,u.jsxs)("span",{children:["(",(0,r.A)("login required",n),")"]}),(0,u.jsx)("br",{})]}),0==n.current_user_id&&(0,u.jsx)("p",{children:(0,r.A)("Toastmost users can request an evaluation from a fellow Toastmaster using this system.",n)}),(0,u.jsx)("div",{id:"YoodliPromo",children:(0,u.jsx)(p.dW,{})}),(0,u.jsx)("h3",{children:(0,r.A)("Give Feedback",n)}),(0,u.jsx)("p",{children:(0,r.A)("To give an evaluation, use the form below. When both the evaluator and the speaker have user accounts, the completed evaluation will be sent by email and archived on the member dashboard.",n)}),!E&&(!g||"evaluation_demo"!=g)&&(0,u.jsx)(i.k,{source:"Member or Guest",value:JSON.stringify(c),options:G,onChange:e=>{if("guest"==e)return void A("guest");const t=JSON.parse(e);S(t.title),M(t.project),f(t)}}),(E||g&&"evaluation_demo"==g)&&(0,u.jsx)(s.TextControl,{label:(0,r.A)("Speaker Name",n),value:E,onChange:e=>{e?(A(e),f(t=>(t.ID=e,t.name=e,t))):A(" ")}}),!n.current_user_name&&(0,u.jsx)(s.TextControl,{label:(0,r.A)("Evaluator Name",n),value:T,onChange:e=>{O(e)}}),"evaluation_guest"==g&&!n.is_user_logged_in&&(0,u.jsx)(s.TextControl,{label:(0,r.A)("Evaluator Email",n),value:N,onChange:e=>{R(e)}}),(0,u.jsx)(d,{manual:k,project:D,title:C,setManual:_,setProject:M,setTitle:S,setEvaluate:f,makeNotification:t}),(0,u.jsx)(a.d,{innerHTML:U.intro}),U.prompts.map((e,t)=>(L[t]||I[t]||Y.push(t),(0,u.jsx)("div",{children:(0,u.jsx)(h,{promptindex:t,response:L[t],note:I[t],setResponses:P,setNotes:F,item:e})}))),q&&U.second_language.map((e,t)=>{let n=t+U.prompts.length;return L[n]||I[n]||Y.push(n),(0,u.jsx)("div",{children:(0,u.jsx)(h,{promptindex:n,response:L[n],note:I[n],setResponses:P,setNotes:F,item:e})})}),Y.length>0&&(0,u.jsx)("p",{children:(0,u.jsxs)("em",{children:[Y.length," ",(0,r.A)("prompts have not been answered",n)]})}),U.second_language_requested&&(0,u.jsx)("p",{children:(0,u.jsx)("em",{children:(0,r.A)("The last four speaking-in-a-second-language prompts were requested by the speaker.",n)})}),!U.second_language_requested&&!q&&(0,u.jsxs)("p",{children:[(0,u.jsx)("input",{type:"checkbox",onClick:()=>{H(!0)}})," ",(0,r.A)("Add prompts for those speaking in a second language",n)]}),(0,u.jsx)("p",{children:(0,u.jsx)("button",{className:"tmform",onClick:function(){K({evaluate:c,form:U,responses:L,notes:I,evaluator_name:T,evaluator_email:N}),t("Saving ...")},children:(0,r.A)("Send",n)})})]})}n(5942)},941:(e,t,n)=>{"use strict";n.d(t,{BH:()=>y,Cp:()=>b,F$:()=>m,G6:()=>C,GR:()=>d,HN:()=>l,MK:()=>p,Od:()=>g,S$:()=>r,Zw:()=>i,b_:()=>h,f8:()=>x,gn:()=>a,j3:()=>c,jY:()=>S,lQ:()=>s,nJ:()=>f,vh:()=>u,yy:()=>_});var o=n(8168),r="undefined"==typeof window;function s(){}function i(e,t){return"function"==typeof e?e(t):e}function a(e){return"number"==typeof e&&e>=0&&e!==1/0}function l(e){return Array.isArray(e)?e:[e]}function c(e,t){return Math.max(e+(t||0)-Date.now(),0)}function u(e,t,n){return k(e)?"function"==typeof t?(0,o.A)({},n,{queryKey:e,queryFn:t}):(0,o.A)({},t,{queryKey:e}):e}function d(e,t,n){return k(e)?"function"==typeof t?(0,o.A)({},n,{mutationKey:e,mutationFn:t}):(0,o.A)({},t,{mutationKey:e}):"function"==typeof e?(0,o.A)({},t,{mutationFn:e}):(0,o.A)({},e)}function h(e,t,n){return k(e)?[(0,o.A)({},t,{queryKey:e}),n]:[e||{},t]}function p(e,t){var n=e.active,o=e.exact,r=e.fetching,s=e.inactive,i=e.predicate,a=e.queryKey,l=e.stale;if(k(a))if(o){if(t.queryHash!==m(a,t.options))return!1}else if(!b(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,s);if("none"===c)return!1;if("all"!==c){var u=t.isActive();if("active"===c&&!u)return!1;if("inactive"===c&&u)return!1}return!("boolean"==typeof l&&t.isStale()!==l||"boolean"==typeof r&&t.isFetching()!==r||i&&!i(t))}function f(e,t){var n=e.exact,o=e.fetching,r=e.predicate,s=e.mutationKey;if(k(s)){if(!t.options.mutationKey)return!1;if(n){if(g(t.options.mutationKey)!==g(s))return!1}else if(!b(t.options.mutationKey,s))return!1}return!("boolean"==typeof o&&"loading"===t.state.status!==o||r&&!r(t))}function m(e,t){return((null==t?void 0:t.queryKeyHashFn)||g)(e)}function g(e){return t=l(e),JSON.stringify(t,function(e,t){return j(t)?Object.keys(t).sort().reduce(function(e,n){return e[n]=t[n],e},{}):t});var t}function b(e,t){return v(l(e),l(t))}function v(e,t){return e===t||typeof e==typeof t&&!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some(function(n){return!v(e[n],t[n])})}function y(e,t){if(e===t)return e;var n=Array.isArray(e)&&Array.isArray(t);if(n||j(e)&&j(t)){for(var o=n?e.length:Object.keys(e).length,r=n?t:Object.keys(t),s=r.length,i=n?[]:{},a=0,l=0;l<s;l++){var c=n?l:r[l];i[c]=y(e[c],t[c]),i[c]===e[c]&&a++}return o===s&&a===o?e:i}return t}function x(e,t){if(e&&!t||t&&!e)return!1;for(var n in e)if(e[n]!==t[n])return!1;return!0}function j(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 k(e){return"string"==typeof e||Array.isArray(e)}function _(e){return new Promise(function(t){setTimeout(t,e)})}function C(e){Promise.resolve().then(e).catch(function(e){return setTimeout(function(){throw e})})}function S(){if("function"==typeof AbortController)return new AbortController}},1083:(e,t,n)=>{"use strict";n.d(t,{A:()=>yt});var o={};function r(e,t){return function(){return e.apply(t,arguments)}}n.r(o),n.d(o,{hasBrowserEnv:()=>pe,hasStandardBrowserEnv:()=>me,hasStandardBrowserWebWorkerEnv:()=>ge,navigator:()=>fe,origin:()=>be});const{toString:s}=Object.prototype,{getPrototypeOf:i}=Object,{iterator:a,toStringTag:l}=Symbol,c=(u=Object.create(null),e=>{const t=s.call(e);return u[t]||(u[t]=t.slice(8,-1).toLowerCase())});var u;const d=e=>(e=e.toLowerCase(),t=>c(t)===e),h=e=>t=>typeof t===e,{isArray:p}=Array,f=h("undefined");function m(e){return null!==e&&!f(e)&&null!==e.constructor&&!f(e.constructor)&&v(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const g=d("ArrayBuffer"),b=h("string"),v=h("function"),y=h("number"),x=e=>null!==e&&"object"==typeof e,j=e=>{if("object"!==c(e))return!1;const t=i(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||l in e||a in e)},w=d("Date"),k=d("File"),_=d("Blob"),C=d("FileList"),S=d("URLSearchParams"),[E,A,T,O]=["ReadableStream","Request","Response","Headers"].map(d);function N(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let o,r;if("object"!=typeof e&&(e=[e]),p(e))for(o=0,r=e.length;o<r;o++)t.call(null,e[o],o,e);else{if(m(e))return;const r=n?Object.getOwnPropertyNames(e):Object.keys(e),s=r.length;let i;for(o=0;o<s;o++)i=r[o],t.call(null,e[i],i,e)}}function R(e,t){if(m(e))return null;t=t.toLowerCase();const n=Object.keys(e);let o,r=n.length;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const D="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:globalThis,M=e=>!f(e)&&e!==D,L=(P="undefined"!=typeof Uint8Array&&i(Uint8Array),e=>P&&e instanceof P);var P;const I=d("HTMLFormElement"),F=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),U=d("RegExp"),B=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};N(n,(n,r)=>{let s;!1!==(s=t(n,r,e))&&(o[r]=s||n)}),Object.defineProperties(e,o)},Q=d("AsyncFunction"),z=(q="function"==typeof setImmediate,H=v(D.postMessage),q?setImmediate:H?(V=`axios@${Math.random()}`,W=[],D.addEventListener("message",({source:e,data:t})=>{e===D&&t===V&&W.length&&W.shift()()},!1),e=>{W.push(e),D.postMessage(V,"*")}):e=>setTimeout(e));var q,H,V,W;const K="undefined"!=typeof queueMicrotask?queueMicrotask.bind(D):"undefined"!=typeof process&&process.nextTick||z,G={isArray:p,isArrayBuffer:g,isBuffer:m,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||v(e.append)&&("formdata"===(t=c(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&&g(e.buffer),t},isString:b,isNumber:y,isBoolean:e=>!0===e||!1===e,isObject:x,isPlainObject:j,isEmptyObject:e=>{if(!x(e)||m(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:E,isRequest:A,isResponse:T,isHeaders:O,isUndefined:f,isDate:w,isFile:k,isBlob:_,isRegExp:U,isFunction:v,isStream:e=>x(e)&&v(e.pipe),isURLSearchParams:S,isTypedArray:L,isFileList:C,forEach:N,merge:function e(){const{caseless:t,skipUndefined:n}=M(this)&&this||{},o={},r=(r,s)=>{const i=t&&R(o,s)||s;j(o[i])&&j(r)?o[i]=e(o[i],r):j(r)?o[i]=e({},r):p(r)?o[i]=r.slice():n&&f(r)||(o[i]=r)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&N(arguments[e],r);return o},extend:(e,t,n,{allOwnKeys:o}={})=>(N(t,(t,o)=>{n&&v(t)?e[o]=r(t,n):e[o]=t},{allOwnKeys:o}),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,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,o)=>{let r,s,a;const l={};if(t=t||{},null==e)return t;do{for(r=Object.getOwnPropertyNames(e),s=r.length;s-- >0;)a=r[s],o&&!o(a,e,t)||l[a]||(t[a]=e[a],l[a]=!0);e=!1!==n&&i(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:c,kindOfTest:d,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const o=e.indexOf(t,n);return-1!==o&&o===n},toArray:e=>{if(!e)return null;if(p(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[a]).call(e);let o;for(;(o=n.next())&&!o.done;){const n=o.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const o=[];for(;null!==(n=e.exec(t));)o.push(n);return o},isHTMLForm:I,hasOwnProperty:F,hasOwnProp:F,reduceDescriptors:B,freezeMethods:e=>{B(e,(t,n)=>{if(v(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const o=e[n];v(o)&&(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={},o=e=>{e.forEach(e=>{n[e]=!0})};return p(e)?o(e):o(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)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:R,global:D,isContextDefined:M,isSpecCompliantForm:function(e){return!!(e&&v(e.append)&&"FormData"===e[l]&&e[a])},toJSONObject:e=>{const t=new Array(10),n=(e,o)=>{if(x(e)){if(t.indexOf(e)>=0)return;if(m(e))return e;if(!("toJSON"in e)){t[o]=e;const r=p(e)?[]:{};return N(e,(e,t)=>{const s=n(e,o+1);!f(s)&&(r[t]=s)}),t[o]=void 0,r}}return e};return n(e,0)},isAsyncFn:Q,isThenable:e=>e&&(x(e)||v(e))&&v(e.then)&&v(e.catch),setImmediate:z,asap:K,isIterable:e=>null!=e&&v(e[a])};function Y(e,t,n,o,r){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),o&&(this.request=o),r&&(this.response=r,this.status=r.status?r.status:null)}G.inherits(Y,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.status}}});const J=Y.prototype,$={};["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=>{$[e]={value:e}}),Object.defineProperties(Y,$),Object.defineProperty(J,"isAxiosError",{value:!0}),Y.from=(e,t,n,o,r,s)=>{const i=Object.create(J);G.toFlatObject(e,i,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const a=e&&e.message?e.message:"Error",l=null==t&&e?e.code:t;return Y.call(i,a,l,n,o,r),e&&null==i.cause&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",s&&Object.assign(i,s),i};const X=Y;function Z(e){return G.isPlainObject(e)||G.isArray(e)}function ee(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function te(e,t,n){return e?e.concat(t).map(function(e,t){return e=ee(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const ne=G.toFlatObject(G,{},null,function(e){return/^is[A-Z]/.test(e)}),oe=function(e,t,n){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const o=(n=G.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!G.isUndefined(t[e])})).metaTokens,r=n.visitor||c,s=n.dots,i=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&G.isSpecCompliantForm(t);if(!G.isFunction(r))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(G.isDate(e))return e.toISOString();if(G.isBoolean(e))return e.toString();if(!a&&G.isBlob(e))throw new X("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,r){let a=e;if(e&&!r&&"object"==typeof e)if(G.endsWith(n,"{}"))n=o?n:n.slice(0,-2),e=JSON.stringify(e);else if(G.isArray(e)&&function(e){return G.isArray(e)&&!e.some(Z)}(e)||(G.isFileList(e)||G.endsWith(n,"[]"))&&(a=G.toArray(e)))return n=ee(n),a.forEach(function(e,o){!G.isUndefined(e)&&null!==e&&t.append(!0===i?te([n],o,s):null===i?n:n+"[]",l(e))}),!1;return!!Z(e)||(t.append(te(r,n,s),l(e)),!1)}const u=[],d=Object.assign(ne,{defaultVisitor:c,convertValue:l,isVisitable:Z});if(!G.isObject(e))throw new TypeError("data must be an object");return function e(n,o){if(!G.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+o.join("."));u.push(n),G.forEach(n,function(n,s){!0===(!(G.isUndefined(n)||null===n)&&r.call(t,n,G.isString(s)?s.trim():s,o,d))&&e(n,o?o.concat(s):[s])}),u.pop()}}(e),t};function re(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function se(e,t){this._pairs=[],e&&oe(e,this,t)}const ie=se.prototype;ie.append=function(e,t){this._pairs.push([e,t])},ie.toString=function(e){const t=e?function(t){return e.call(this,t,re)}:re;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};const ae=se;function le(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ce(e,t,n){if(!t)return e;const o=n&&n.encode||le;G.isFunction(n)&&(n={serialize:n});const r=n&&n.serialize;let s;if(s=r?r(t,n):G.isURLSearchParams(t)?t.toString():new ae(t,n).toString(o),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}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)})}},de={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},he={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ae,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},pe="undefined"!=typeof window&&"undefined"!=typeof document,fe="object"==typeof navigator&&navigator||void 0,me=pe&&(!fe||["ReactNative","NativeScript","NS"].indexOf(fe.product)<0),ge="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,be=pe&&window.location.href||"http://localhost",ve={...o,...he},ye=function(e){function t(e,n,o,r){let s=e[r++];if("__proto__"===s)return!0;const i=Number.isFinite(+s),a=r>=e.length;return s=!s&&G.isArray(o)?o.length:s,a?(G.hasOwnProp(o,s)?o[s]=[o[s],n]:o[s]=n,!i):(o[s]&&G.isObject(o[s])||(o[s]=[]),t(e,n,o[s],r)&&G.isArray(o[s])&&(o[s]=function(e){const t={},n=Object.keys(e);let o;const r=n.length;let s;for(o=0;o<r;o++)s=n[o],t[s]=e[s];return t}(o[s])),!i)}if(G.isFormData(e)&&G.isFunction(e.entries)){const n={};return G.forEachEntry(e,(e,o)=>{t(function(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),o,n,0)}),n}return null},xe={transitional:de,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",o=n.indexOf("application/json")>-1,r=G.isObject(e);if(r&&G.isHTMLForm(e)&&(e=new FormData(e)),G.isFormData(e))return o?JSON.stringify(ye(e)):e;if(G.isArrayBuffer(e)||G.isBuffer(e)||G.isStream(e)||G.isFile(e)||G.isBlob(e)||G.isReadableStream(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 s;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return oe(e,new ve.classes.URLSearchParams,{visitor:function(e,t,n,o){return ve.isNode&&G.isBuffer(e)?(this.append(t,e.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((s=G.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return oe(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return r||o?(t.setContentType("application/json",!1),function(e){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||xe.transitional,n=t&&t.forcedJSONParsing,o="json"===this.responseType;if(G.isResponse(e)||G.isReadableStream(e))return e;if(e&&G.isString(e)&&(n&&!this.responseType||o)){const n=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw X.from(e,X.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:ve.classes.FormData,Blob:ve.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=>{xe.headers[e]={}});const je=xe,we=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"]),ke=Symbol("internals");function _e(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 Se(e,t,n,o,r){return G.isFunction(o)?o.call(this,t,n):(r&&(t=n),G.isString(t)?G.isString(o)?-1!==t.indexOf(o):G.isRegExp(o)?o.test(t):void 0:void 0)}class Ee{constructor(e){e&&this.set(e)}set(e,t,n){const o=this;function r(e,t,n){const r=_e(t);if(!r)throw new Error("header name must be a non-empty string");const s=G.findKey(o,r);(!s||void 0===o[s]||!0===n||void 0===n&&!1!==o[s])&&(o[s||t]=Ce(e))}const s=(e,t)=>G.forEach(e,(e,n)=>r(e,n,t));if(G.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(G.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let n,o,r;return e&&e.split("\n").forEach(function(e){r=e.indexOf(":"),n=e.substring(0,r).trim().toLowerCase(),o=e.substring(r+1).trim(),!n||t[n]&&we[n]||("set-cookie"===n?t[n]?t[n].push(o):t[n]=[o]:t[n]=t[n]?t[n]+", "+o:o)}),t})(e),t);else if(G.isObject(e)&&G.isIterable(e)){let n,o,r={};for(const t of e){if(!G.isArray(t))throw TypeError("Object iterator must return a key-value pair");r[o=t[0]]=(n=r[o])?G.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}s(r,t)}else null!=e&&r(t,e,n);return this}get(e,t){if(e=_e(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 o;for(;o=n.exec(e);)t[o[1]]=o[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=_e(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 o=!1;function r(e){if(e=_e(e)){const r=G.findKey(n,e);!r||t&&!Se(0,n[r],r,t)||(delete n[r],o=!0)}}return G.isArray(e)?e.forEach(r):r(e),o}clear(e){const t=Object.keys(this);let n=t.length,o=!1;for(;n--;){const r=t[n];e&&!Se(0,this[r],r,e,!0)||(delete this[r],o=!0)}return o}normalize(e){const t=this,n={};return G.forEach(this,(o,r)=>{const s=G.findKey(n,r);if(s)return t[s]=Ce(o),void delete t[r];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(r):String(r).trim();i!==r&&delete t[r],t[i]=Ce(o),n[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return G.forEach(this,(n,o)=>{null!=n&&!1!==n&&(t[o]=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")}getSetCookie(){return this.get("set-cookie")||[]}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[ke]=this[ke]={accessors:{}}).accessors,n=this.prototype;function o(e){const o=_e(e);t[o]||(function(e,t){const n=G.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(e,o+n,{value:function(e,n,r){return this[o].call(this,t,e,n,r)},configurable:!0})})}(n,e),t[o]=!0)}return G.isArray(e)?e.forEach(o):o(e),this}}Ee.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),G.reduceDescriptors(Ee.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),G.freezeMethods(Ee);const Ae=Ee;function Te(e,t){const n=this||je,o=t||n,r=Ae.from(o.headers);let s=o.data;return G.forEach(e,function(e){s=e.call(n,s,r.normalize(),t?t.status:void 0)}),r.normalize(),s}function Oe(e){return!(!e||!e.__CANCEL__)}function Ne(e,t,n){X.call(this,null==e?"canceled":e,X.ERR_CANCELED,t,n),this.name="CanceledError"}G.inherits(Ne,X,{__CANCEL__:!0});const Re=Ne;function De(e,t,n){const o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(new X("Request failed with status code "+n.status,[X.ERR_BAD_REQUEST,X.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Me=(e,t,n=3)=>{let o=0;const r=function(e,t){e=e||10;const n=new Array(e),o=new Array(e);let r,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=o[i];r||(r=l),n[s]=a,o[s]=l;let u=i,d=0;for(;u!==s;)d+=n[u++],u%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),l-r<t)return;const h=c&&l-c;return h?Math.round(1e3*d/h):void 0}}(50,250);return function(e,t){let n,o,r=0,s=1e3/t;const i=(t,s=Date.now())=>{r=s,n=null,o&&(clearTimeout(o),o=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-r;a>=s?i(e,t):(n=e,o||(o=setTimeout(()=>{o=null,i(n)},s-a)))},()=>n&&i(n)]}(n=>{const s=n.loaded,i=n.lengthComputable?n.total:void 0,a=s-o,l=r(a);o=s,e({loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:l||void 0,estimated:l&&i&&s<=i?(i-s)/l:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})},n)},Le=(e,t)=>{const n=null!=e;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},Pe=e=>(...t)=>G.asap(()=>e(...t)),Ie=ve.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,ve.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(ve.origin),ve.navigator&&/(msie|trident)/i.test(ve.navigator.userAgent)):()=>!0,Fe=ve.hasStandardBrowserEnv?{write(e,t,n,o,r,s,i){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];G.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),G.isString(o)&&a.push(`path=${o}`),G.isString(r)&&a.push(`domain=${r}`),!0===s&&a.push("secure"),G.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function Ue(e,t,n){let o=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(o||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Be=e=>e instanceof Ae?{...e}:e;function Qe(e,t){t=t||{};const n={};function o(e,t,n,o){return G.isPlainObject(e)&&G.isPlainObject(t)?G.merge.call({caseless:o},e,t):G.isPlainObject(t)?G.merge({},t):G.isArray(t)?t.slice():t}function r(e,t,n,r){return G.isUndefined(t)?G.isUndefined(e)?void 0:o(void 0,e,0,r):o(e,t,0,r)}function s(e,t){if(!G.isUndefined(t))return o(void 0,t)}function i(e,t){return G.isUndefined(t)?G.isUndefined(e)?void 0:o(void 0,e):o(void 0,t)}function a(n,r,s){return s in t?o(n,r):s in e?o(void 0,n):void 0}const l={url:s,method:s,data:s,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:a,headers:(e,t,n)=>r(Be(e),Be(t),0,!0)};return G.forEach(Object.keys({...e,...t}),function(o){const s=l[o]||r,i=s(e[o],t[o],o);G.isUndefined(i)&&s!==a||(n[o]=i)}),n}const ze=e=>{const t=Qe({},e);let{data:n,withXSRFToken:o,xsrfHeaderName:r,xsrfCookieName:s,headers:i,auth:a}=t;if(t.headers=i=Ae.from(i),t.url=ce(Ue(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),G.isFormData(n))if(ve.hasStandardBrowserEnv||ve.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(G.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&i.set(e,n)})}if(ve.hasStandardBrowserEnv&&(o&&G.isFunction(o)&&(o=o(t)),o||!1!==o&&Ie(t.url))){const e=r&&s&&Fe.read(s);e&&i.set(r,e)}return t},qe="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const o=ze(e);let r=o.data;const s=Ae.from(o.headers).normalize();let i,a,l,c,u,{responseType:d,onUploadProgress:h,onDownloadProgress:p}=o;function f(){c&&c(),u&&u(),o.cancelToken&&o.cancelToken.unsubscribe(i),o.signal&&o.signal.removeEventListener("abort",i)}let m=new XMLHttpRequest;function g(){if(!m)return;const o=Ae.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());De(function(e){t(e),f()},function(e){n(e),f()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:o,config:e,request:m}),m=null}m.open(o.method.toUpperCase(),o.url,!0),m.timeout=o.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new X("Request aborted",X.ECONNABORTED,e,m)),m=null)},m.onerror=function(t){const o=t&&t.message?t.message:"Network Error",r=new X(o,X.ERR_NETWORK,e,m);r.event=t||null,n(r),m=null},m.ontimeout=function(){let t=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const r=o.transitional||de;o.timeoutErrorMessage&&(t=o.timeoutErrorMessage),n(new X(t,r.clarifyTimeoutError?X.ETIMEDOUT:X.ECONNABORTED,e,m)),m=null},void 0===r&&s.setContentType(null),"setRequestHeader"in m&&G.forEach(s.toJSON(),function(e,t){m.setRequestHeader(t,e)}),G.isUndefined(o.withCredentials)||(m.withCredentials=!!o.withCredentials),d&&"json"!==d&&(m.responseType=o.responseType),p&&([l,u]=Me(p,!0),m.addEventListener("progress",l)),h&&m.upload&&([a,c]=Me(h),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",c)),(o.cancelToken||o.signal)&&(i=t=>{m&&(n(!t||t.type?new Re(null,e,m):t),m.abort(),m=null)},o.cancelToken&&o.cancelToken.subscribe(i),o.signal&&(o.signal.aborted?i():o.signal.addEventListener("abort",i)));const b=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(o.url);b&&-1===ve.protocols.indexOf(b)?n(new X("Unsupported protocol "+b+":",X.ERR_BAD_REQUEST,e)):m.send(r||null)})},He=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,o=new AbortController;const r=function(e){if(!n){n=!0,i();const t=e instanceof Error?e:this.reason;o.abort(t instanceof X?t:new Re(t instanceof Error?t.message:t))}};let s=t&&setTimeout(()=>{s=null,r(new X(`timeout ${t} of ms exceeded`,X.ETIMEDOUT))},t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(r):e.removeEventListener("abort",r)}),e=null)};e.forEach(e=>e.addEventListener("abort",r));const{signal:a}=o;return a.unsubscribe=()=>G.asap(i),a}},Ve=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let o,r=0;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},We=(e,t,n,o)=>{const r=async function*(e,t){for await(const n of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}}(e))yield*Ve(n,t)}(e,t);let s,i=0,a=e=>{s||(s=!0,o&&o(e))};return new ReadableStream({async pull(e){try{const{done:t,value:o}=await r.next();if(t)return a(),void e.close();let s=o.byteLength;if(n){let e=i+=s;n(e)}e.enqueue(new Uint8Array(o))}catch(e){throw a(e),e}},cancel:e=>(a(e),r.return())},{highWaterMark:2})},{isFunction:Ke}=G,Ge=(({Request:e,Response:t})=>({Request:e,Response:t}))(G.global),{ReadableStream:Ye,TextEncoder:Je}=G.global,$e=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Xe=e=>{e=G.merge.call({skipUndefined:!0},Ge,e);const{fetch:t,Request:n,Response:o}=e,r=t?Ke(t):"function"==typeof fetch,s=Ke(n),i=Ke(o);if(!r)return!1;const a=r&&Ke(Ye),l=r&&("function"==typeof Je?(c=new Je,e=>c.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var c;const u=s&&a&&$e(()=>{let e=!1;const t=new n(ve.origin,{body:new Ye,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=i&&a&&$e(()=>G.isReadableStream(new o("").body)),h={stream:d&&(e=>e.body)};r&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!h[e]&&(h[e]=(t,n)=>{let o=t&&t[e];if(o)return o.call(t);throw new X(`Response type '${e}' is not supported`,X.ERR_NOT_SUPPORT,n)})});return async e=>{let{url:r,method:i,data:a,signal:c,cancelToken:p,timeout:f,onDownloadProgress:m,onUploadProgress:g,responseType:b,headers:v,withCredentials:y="same-origin",fetchOptions:x}=ze(e),j=t||fetch;b=b?(b+"").toLowerCase():"text";let w=He([c,p&&p.toAbortSignal()],f),k=null;const _=w&&w.unsubscribe&&(()=>{w.unsubscribe()});let C;try{if(g&&u&&"get"!==i&&"head"!==i&&0!==(C=await(async(e,t)=>{const o=G.toFiniteNumber(e.getContentLength());return null==o?(async e=>{if(null==e)return 0;if(G.isBlob(e))return e.size;if(G.isSpecCompliantForm(e)){const t=new n(ve.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return G.isArrayBufferView(e)||G.isArrayBuffer(e)?e.byteLength:(G.isURLSearchParams(e)&&(e+=""),G.isString(e)?(await l(e)).byteLength:void 0)})(t):o})(v,a))){let e,t=new n(r,{method:"POST",body:a,duplex:"half"});if(G.isFormData(a)&&(e=t.headers.get("content-type"))&&v.setContentType(e),t.body){const[e,n]=Le(C,Me(Pe(g)));a=We(t.body,65536,e,n)}}G.isString(y)||(y=y?"include":"omit");const t=s&&"credentials"in n.prototype,c={...x,signal:w,method:i.toUpperCase(),headers:v.normalize().toJSON(),body:a,duplex:"half",credentials:t?y:void 0};k=s&&new n(r,c);let p=await(s?j(k,x):j(r,c));const f=d&&("stream"===b||"response"===b);if(d&&(m||f&&_)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=p[t]});const t=G.toFiniteNumber(p.headers.get("content-length")),[n,r]=m&&Le(t,Me(Pe(m),!0))||[];p=new o(We(p.body,65536,n,()=>{r&&r(),_&&_()}),e)}b=b||"text";let S=await h[G.findKey(h,b)||"text"](p,e);return!f&&_&&_(),await new Promise((t,n)=>{De(t,n,{data:S,headers:Ae.from(p.headers),status:p.status,statusText:p.statusText,config:e,request:k})})}catch(t){if(_&&_(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new X("Network Error",X.ERR_NETWORK,e,k),{cause:t.cause||t});throw X.from(t,t&&t.code,e,k)}}},Ze=new Map,et=e=>{let t=e&&e.env||{};const{fetch:n,Request:o,Response:r}=t,s=[o,r,n];let i,a,l=s.length,c=Ze;for(;l--;)i=s[l],a=c.get(i),void 0===a&&c.set(i,a=l?new Map:Xe(t)),c=a;return a},tt=(et(),{http:null,xhr:qe,fetch:{get:et}});G.forEach(tt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const nt=e=>`- ${e}`,ot=e=>G.isFunction(e)||null===e||!1===e,rt=function(e,t){e=G.isArray(e)?e:[e];const{length:n}=e;let o,r;const s={};for(let i=0;i<n;i++){let n;if(o=e[i],r=o,!ot(o)&&(r=tt[(n=String(o)).toLowerCase()],void 0===r))throw new X(`Unknown adapter '${n}'`);if(r&&(G.isFunction(r)||(r=r.get(t))))break;s[n||"#"+i]=r}if(!r){const e=Object.entries(s).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(nt).join("\n"):" "+nt(e[0]):"as no adapter specified";throw new X("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return r};function st(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Re(null,e)}function it(e){return st(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),rt(e.adapter||je.adapter,e)(e).then(function(t){return st(e),t.data=Te.call(e,e.transformResponse,t),t.headers=Ae.from(t.headers),t},function(t){return Oe(t)||(st(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 at="1.13.2",lt={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{lt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const ct={};lt.transitional=function(e,t,n){function o(e,t){return"[Axios v"+at+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,r,s)=>{if(!1===e)throw new X(o(r," has been removed"+(t?" in "+t:"")),X.ERR_DEPRECATED);return t&&!ct[r]&&(ct[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,s)}},lt.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const ut={assertOptions:function(e,t,n){if("object"!=typeof e)throw new X("options must be an object",X.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let r=o.length;for(;r-- >0;){const s=o[r],i=t[s];if(i){const t=e[s],n=void 0===t||i(t,s,e);if(!0!==n)throw new X("option "+s+" must be "+n,X.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new X("Unknown option "+s,X.ERR_BAD_OPTION)}},validators:lt},dt=ut.validators;class ht{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/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Qe(this.defaults,t);const{transitional:n,paramsSerializer:o,headers:r}=t;void 0!==n&&ut.assertOptions(n,{silentJSONParsing:dt.transitional(dt.boolean),forcedJSONParsing:dt.transitional(dt.boolean),clarifyTimeoutError:dt.transitional(dt.boolean)},!1),null!=o&&(G.isFunction(o)?t.paramsSerializer={serialize:o}:ut.assertOptions(o,{encode:dt.function,serialize:dt.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),ut.assertOptions(t,{baseUrl:dt.spelling("baseURL"),withXsrfToken:dt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=r&&G.merge(r.common,r[t.method]);r&&G.forEach(["delete","get","head","post","put","patch","common"],e=>{delete r[e]}),t.headers=Ae.concat(s,r);const i=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))});const l=[];let c;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let u,d=0;if(!a){const e=[it.bind(this),void 0];for(e.unshift(...i),e.push(...l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=i.length;let h=t;for(;d<u;){const e=i[d++],t=i[d++];try{h=e(h)}catch(e){t.call(this,e);break}}try{c=it.call(this,h)}catch(e){return Promise.reject(e)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return ce(Ue((e=Qe(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}G.forEach(["delete","get","head","options"],function(e){ht.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,o,r){return this.request(Qe(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:o}))}}ht.prototype[e]=t(),ht.prototype[e+"Form"]=t(!0)});const pt=ht;class ft{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 o=new Promise(e=>{n.subscribe(e),t=e}).then(e);return o.cancel=function(){n.unsubscribe(t)},o},e(function(e,o,r){n.reason||(n.reason=new Re(e,o,r),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)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new ft(function(t){e=t}),cancel:e}}}const mt=ft,gt={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(gt).forEach(([e,t])=>{gt[t]=e});const bt=gt,vt=function e(t){const n=new pt(t),o=r(pt.prototype.request,n);return G.extend(o,pt.prototype,n,{allOwnKeys:!0}),G.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return e(Qe(t,n))},o}(je);vt.Axios=pt,vt.CanceledError=Re,vt.CancelToken=mt,vt.isCancel=Oe,vt.VERSION=at,vt.toFormData=oe,vt.AxiosError=X,vt.Cancel=vt.CanceledError,vt.all=function(e){return Promise.all(e)},vt.spread=function(e){return function(t){return e.apply(null,t)}},vt.isAxiosError=function(e){return G.isObject(e)&&!0===e.isAxiosError},vt.mergeConfig=Qe,vt.AxiosHeaders=Ae,vt.formToJSON=e=>ye(G.isHTMLForm(e)?new FormData(e):e),vt.getAdapter=rt,vt.HttpStatusCode=bt,vt.default=vt;const yt=vt},1289:(e,t,n)=>{"use strict";n.d(t,{m:()=>i});var o=n(5540),r=n(3287),s=n(941),i=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!s.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,o.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}(r.Q))},1609:e=>{"use strict";e.exports=window.React},2532:(e,t,n)=>{"use strict";n.d(t,{QueryClientProvider:()=>f,useMutation:()=>w,useQuery:()=>D,useQueryClient:()=>p});var o=n(428),r=n(5795),s=n.n(r)().unstable_batchedUpdates;o.j.setBatchNotifyFunction(s);var i=n(9690),a=console;(0,i.B)(a);var l=n(1609),c=n.n(l),u=c().createContext(void 0),d=c().createContext(!1);function h(e){return e&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=u),window.ReactQueryClientContext):u}var p=function(){var e=c().useContext(h(c().useContext(d)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},f=function(e){var t=e.client,n=e.contextSharing,o=void 0!==n&&n,r=e.children;c().useEffect(function(){return t.mount(),function(){t.unmount()}},[t]);var s=h(o);return c().createElement(d.Provider,{value:o},c().createElement(s.Provider,{value:t},r))},m=n(8168),g=n(941),b=n(5540),v=n(3465),y=n(3287),x=function(e){function t(t,n){var o;return(o=e.call(this)||this).client=t,o.setOptions(n),o.bindMethods(),o.updateResult(),o}(0,b.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,m.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,v.$)(),t=(0,m.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;o.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}(y.Q);function j(e,t,n){return"function"==typeof t?t.apply(void 0,n):"boolean"==typeof t?t:!!e}function w(e,t,n){var r=c().useRef(!1),s=c().useState(0)[1],i=(0,g.GR)(e,t,n),a=p(),l=c().useRef();l.current?l.current.setOptions(i):l.current=new x(a,i);var u=l.current.getCurrentResult();c().useEffect(function(){r.current=!0;var e=l.current.subscribe(o.j.batchCalls(function(){r.current&&s(function(e){return e+1})}));return function(){r.current=!1,e()}},[]);var d=c().useCallback(function(e,t){l.current.mutate(e,t).catch(g.lQ)},[]);if(u.error&&j(void 0,l.current.options.useErrorBoundary,[u.error]))throw u.error;return(0,m.A)({},u,{mutate:d,mutateAsync:u.mutate})}var k=n(1289),_=n(6281),C=function(e){function t(t,n){var o;return(o=e.call(this)||this).client=t,o.options=n,o.trackedProps=[],o.selectError=null,o.bindMethods(),o.setOptions(n),o}(0,b.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),S(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())},n.onUnsubscribe=function(){this.listeners.length||this.destroy()},n.shouldFetchOnReconnect=function(){return E(this.currentQuery,this.options,this.options.refetchOnReconnect)},n.shouldFetchOnWindowFocus=function(){return E(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,o=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 r=this.hasListeners();r&&A(this.currentQuery,o,this.options,n)&&this.executeFetch(),this.updateResult(t),!r||this.currentQuery===o&&this.options.enabled===n.enabled&&this.options.staleTime===n.staleTime||this.updateStaleTimeout();var s=this.computeRefetchInterval();!r||this.currentQuery===o&&this.options.enabled===n.enabled&&s===this.currentRefetchInterval||this.updateRefetchInterval(s)},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,o={},r=function(e){n.trackedProps.includes(e)||n.trackedProps.push(e)};return Object.keys(e).forEach(function(t){Object.defineProperty(o,t,{configurable:!1,enumerable:!0,get:function(){return r(t),e[t]}})}),(t.useErrorBoundary||t.suspense)&&r("error"),o},n.getNextResult=function(e){var t=this;return new Promise(function(n,o){var r=t.subscribe(function(t){t.isFetching||(r(),t.isError&&(null==e?void 0:e.throwOnError)?o(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,m.A)({},e,{meta:{refetchPage:null==e?void 0:e.refetchPage}}))},n.fetchOptimistic=function(e){var t=this,n=this.client.defaultQueryObserverOptions(e),o=this.client.getQueryCache().build(this.client,n);return o.fetch().then(function(){return t.createResult(o,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(g.lQ)),t},n.updateStaleTimeout=function(){var e=this;if(this.clearStaleTimeout(),!g.S$&&!this.currentResult.isStale&&(0,g.gn)(this.options.staleTime)){var t=(0,g.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,!g.S$&&!1!==this.options.enabled&&(0,g.gn)(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval(function(){(t.options.refetchIntervalInBackground||k.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,o=this.currentQuery,r=this.options,s=this.currentResult,a=this.currentResultState,l=this.currentResultOptions,c=e!==o,u=c?e.state:this.currentQueryInitialState,d=c?this.currentResult:this.previousQueryResult,h=e.state,p=h.dataUpdatedAt,f=h.error,m=h.errorUpdatedAt,b=h.isFetching,v=h.status,y=!1,x=!1;if(t.optimisticResults){var j=this.hasListeners(),w=!j&&S(e,t),k=j&&A(e,o,t,r);(w||k)&&(b=!0,p||(v="loading"))}if(t.keepPreviousData&&!h.dataUpdateCount&&(null==d?void 0:d.isSuccess)&&"error"!==v)n=d.data,p=d.dataUpdatedAt,v=d.status,y=!0;else if(t.select&&void 0!==h.data)if(s&&h.data===(null==a?void 0:a.data)&&t.select===this.selectFn)n=this.selectResult;else try{this.selectFn=t.select,n=t.select(h.data),!1!==t.structuralSharing&&(n=(0,g.BH)(null==s?void 0:s.data,n)),this.selectResult=n,this.selectError=null}catch(e){(0,i.t)().error(e),this.selectError=e}else n=h.data;if(void 0!==t.placeholderData&&void 0===n&&("loading"===v||"idle"===v)){var _;if((null==s?void 0:s.isPlaceholderData)&&t.placeholderData===(null==l?void 0:l.placeholderData))_=s.data;else if(_="function"==typeof t.placeholderData?t.placeholderData():t.placeholderData,t.select&&void 0!==_)try{_=t.select(_),!1!==t.structuralSharing&&(_=(0,g.BH)(null==s?void 0:s.data,_)),this.selectError=null}catch(e){(0,i.t)().error(e),this.selectError=e}void 0!==_&&(v="success",n=_,x=!0)}return this.selectError&&(f=this.selectError,n=this.selectResult,m=Date.now(),v="error"),{status:v,isLoading:"loading"===v,isSuccess:"success"===v,isError:"error"===v,isIdle:"idle"===v,data:n,dataUpdatedAt:p,error:f,errorUpdatedAt:m,failureCount:h.fetchFailureCount,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&"loading"!==v,isLoadingError:"error"===v&&0===h.dataUpdatedAt,isPlaceholderData:x,isPreviousData:y,isRefetchError:"error"===v&&0!==h.dataUpdatedAt,isStale:T(e,t),refetch:this.refetch,remove:this.remove}},n.shouldNotifyListeners=function(e,t){if(!t)return!0;var n=this.options,o=n.notifyOnChangeProps,r=n.notifyOnChangePropsExclusions;if(!o&&!r)return!0;if("tracked"===o&&!this.trackedProps.length)return!0;var s="tracked"===o?this.trackedProps:o;return Object.keys(e).some(function(n){var o=n,i=e[o]!==t[o],a=null==s?void 0:s.some(function(e){return e===n}),l=null==r?void 0:r.some(function(e){return e===n});return i&&!l&&(!s||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,g.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,m.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,_.wm)(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()},n.notify=function(e){var t=this;o.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}(y.Q);function S(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&&E(e,t,t.refetchOnMount)}function E(e,t,n){if(!1!==t.enabled){var o="function"==typeof n?n(e):n;return"always"===o||!1!==o&&T(e,t)}return!1}function A(e,t,n,o){return!1!==n.enabled&&(e!==t||!1===o.enabled)&&(!n.suspense||"error"!==e.state.status)&&T(e,n)}function T(e,t){return e.isStaleByTime(t.staleTime)}var O,N=c().createContext((O=!1,{clearReset:function(){O=!1},reset:function(){O=!0},isReset:function(){return O}})),R=function(){return c().useContext(N)};function D(e,t,n){return function(e,t){var n=c().useRef(!1),r=c().useState(0)[1],s=p(),i=R(),a=s.defaultQueryObserverOptions(e);a.optimisticResults=!0,a.onError&&(a.onError=o.j.batchCalls(a.onError)),a.onSuccess&&(a.onSuccess=o.j.batchCalls(a.onSuccess)),a.onSettled&&(a.onSettled=o.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 l=c().useState(function(){return new t(s,a)})[0],u=l.getOptimisticResult(a);if(c().useEffect(function(){n.current=!0,i.clearReset();var e=l.subscribe(o.j.batchCalls(function(){n.current&&r(function(e){return e+1})}));return l.updateResult(),function(){n.current=!1,e()}},[i,l]),c().useEffect(function(){l.setOptions(a,{listeners:!1})},[a,l]),a.suspense&&u.isLoading)throw l.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(u.isError&&!i.isReset()&&!u.isFetching&&j(a.suspense,a.useErrorBoundary,[u.error,l.getCurrentQuery()]))throw u.error;return"tracked"===a.notifyOnChangeProps&&(u=l.trackResult(u,a)),u}((0,g.vh)(e,t,n),C)}},2694:(e,t,n)=>{"use strict";var o=n(6925);function r(){}function s(){}s.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,s,i){if(i!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:s,resetWarningCache:r};return n.PropTypes=n,n}},3287:(e,t,n)=>{"use strict";n.d(t,{Q:()=>o});var o=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}()},3465:(e,t,n)=>{"use strict";n.d(t,{$:()=>c,s:()=>l});var o=n(8168),r=n(9690),s=n(428),i=n(6281),a=n(941),l=function(){function e(e){this.options=(0,o.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,o=Promise.resolve();return n||(this.dispatch({type:"loading",variables:this.options.variables}),o=o.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})})),o.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,r.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,o.A)({},e,{failureCount:e.failureCount+1});case"pause":return(0,o.A)({},e,{isPaused:!0});case"continue":return(0,o.A)({},e,{isPaused:!1});case"loading":return(0,o.A)({},e,{context:t.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:t.variables});case"success":return(0,o.A)({},e,{data:t.data,error:null,status:"success",isPaused:!1});case"error":return(0,o.A)({},e,{data:void 0,error:t.error,failureCount:e.failureCount+1,isPaused:!1,status:"error"});case"setState":return(0,o.A)({},e,t.state);default:return e}}(this.state,e),s.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}}},4468:(e,t,n)=>{"use strict";n.d(t,{QueryClient:()=>o.E});var o=n(7098),r=n(6449);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}})},4622:(e,t,n)=>{"use strict";n.d(t,{t:()=>i});var o=n(5540),r=n(3287),s=n(941),i=new(function(e){function t(){var t;return(t=e.call(this)||this).setup=function(e){var t;if(!s.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,o.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}(r.Q))},5148:(e,t,n)=>{"use strict";n.d(t,{HZ:()=>g,Nb:()=>a,_o:()=>l,b0:()=>b,cV:()=>u,cl:()=>v,qL:()=>s,sJ:()=>i,tP:()=>h,wM:()=>m});var o=n(174),r=n(5942);function s(e,t="",n=!1){return(0,r.useQuery)(["blocks-data",e],function(r){return n=-1!=window.location.href.indexOf("wp-admin"),o.A.get("blocks_data/"+e+"?mode="+t+"&admin="+n+"&_locale=user")},{enabled:!0,retry:2,onSuccess:p,onError:f,refetchInterval:6e4,meta:t})}function i(e,t){return(0,r.useQuery)(["member-evaluation"],function(n){return o.A.get("member_evaluation?member="+e+"&project="+t+"&_locale=user")},{enabled:!0,retry:2,refetchInterval:!1})}function a(e,t,n){return(0,r.useMutation)(async function(t){return t.post_id=e,await o.A.post("evaluation?_locale=user",t)},{onSuccess:(e,o,r,s)=>{n(e.data.status),t(e.data.message)},onError:(e,t,o)=>{n("error posting evaluation"),console.log("error posting evaluation",e)}})}function l(e,t){const n=(0,r.useQueryClient)().getQueryData(["blocks-data",e]);return function(e,o){const r=n.data;return r.blocksdata[t].attrs[e]=o,r}}async function c(e){return await o.A.post("update_agenda?_locale=user",e)}function u(e,t=null,n=null){const o=(0,r.useQueryClient)();return(0,r.useMutation)(c,{onMutate:async r=>{await o.cancelQueries(["blocks-data",e]);const s=o.getQueryData(["blocks-data",e]);return o.setQueryData(["blocks-data",e],e=>{const{data:t}=e;return{...e,data:{...t,blocksdata:r.blocksdata}}}),t&&t("Updating ..."),n&&n.setInsert&&n.setInsert(""),{previousValue:s}},onSettled:(e,t,n,r)=>{o.invalidateQueries(["blocks-data",n.post_id])},onSuccess:(e,n,o,r)=>{t&&t("Updated")},onError:(e,n,r)=>{t&&t("Error "+e.message),console.log("updateAgenda error",e),o.setQueryData("blocks-data",r.previousValue)}})}async function d(e,t){return await o.A.post("update_agenda?_locale=user",{post_id:e,template_id:t})}function h(e,t){const n=(0,r.useQueryClient)();return(0,r.useMutation)(d,{onSuccess:(e,t,n,o)=>{makeNotification("Agenda Copied")},onError:(e,t,o)=>{makeNotification("Error "+e.message),console.log("updateAgenda error",e),n.setQueryData("blocks-data",o.previousValue)}})}function p(e){e.current_user_id&&(setCurrentUserId(e.current_user_id),setPostId(e.post_id))}function f(e){console.log("error downloading data",e)}function m(e,t,n){return(0,r.useQuery)(["evaluation",e],function(n){return o.A.get("evaluation/?project="+e+"&speaker="+t+"&_locale=user")},{enabled:!0,retry:2,onSuccess:n,onError:f,refetchInterval:!1,refetchOnWindowFocus:!1})}function g(e){return(0,r.useMutation)(async function(e){return await o.A.post("user_meta?_locale=user",e)},{onSuccess:(t,n,o,r)=>{e(t.data.status)},onError:(t,n,o)=>{e("error posting preference"),console.log("error posting preference",t)}})}function b(e,t=0,n){return(0,r.useQuery)(["voting",t],function(n){const r=(new Date).getTime();console.log("get","regularvoting/"+t+"?mobile="+e+"&ts="+r);const s=o.A.get("regularvoting/"+t+"?mobile="+e+"&ts="+r+"&_locale=user");return console.log("result",s),s},{enabled:!0,retry:2,onSuccess:e=>{n(e.data),console.log("voting data fetched",e)},onError:f,refetchInterval:6e4})}function v(e){return(0,r.useMutation)(async function(e){const t=(new Date).getTime();return console.log("voting postdata",e),await o.A.post("regularvoting/"+e.post_id+"?mobile="+e.identifier+"&ts="+t+"&_locale=user",e)},{onSuccess:(t,n,o,r)=>{e(t.data),console.log("data returned",t)},onError:(e,t,n)=>{console.log("error posting evaluation",e)}})}},5264:(e,t,n)=>{"use strict";function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.CopyToClipboard=void 0;var r=a(n(1609)),s=a(n(7965)),i=["text","onCopy","options","children"];function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach(function(t){f(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function d(e,t){return d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},d(e,t)}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(g,e);var t,n,a,l,m=(a=g,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=p(a);if(l){var n=p(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return h(e)}(this,e)});function g(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return f(h(e=m.call.apply(m,[this].concat(n))),"onClick",function(t){var n=e.props,o=n.text,i=n.onCopy,a=n.children,l=n.options,c=r.default.Children.only(a),u=(0,s.default)(o,l);i&&i(o,u),c&&c.props&&"function"==typeof c.props.onClick&&c.props.onClick(t)}),e}return t=g,(n=[{key:"render",value:function(){var e=this.props,t=(e.text,e.onCopy,e.options,e.children),n=function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},s=Object.keys(e);for(o=0;o<s.length;o++)n=s[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)n=s[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(e,i),o=r.default.Children.only(t);return r.default.cloneElement(o,c(c({},n),{},{onClick:this.onClick}))}}])&&u(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),g}(r.default.PureComponent);t.CopyToClipboard=m,f(m,"defaultProps",{onCopy:void 0,options:void 0})},5286:(e,t,n)=>{"use strict";n.d(t,{Ej:()=>s,RU:()=>i,Up:()=>r,bm:()=>l,dW:()=>c,ep:()=>a});var o=n(790);function r(e){const{type:t}=e;return(0,o.jsxs)("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",children:[(0,o.jsxs)("title",{children:["Move Up ",t]}),(0,o.jsx)("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 s(e){const{type:t}=e;return(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-arrow-up-circle-fill",viewBox:"0 0 16 16",children:[(0,o.jsxs)("title",{children:["Move to Top ",t]}),(0,o.jsx)("path",{d:"M16 8A8 8 0 1 0 0 8a8 8 0 0 0 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 i(e){const{type:t}=e;return(0,o.jsxs)("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",children:[(0,o.jsxs)("title",{children:["Move Down ",t]}),(0,o.jsx)("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 a(e){const{type:t}=e;return(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-trash",viewBox:"0 0 16 16",children:[(0,o.jsxs)("title",{children:["Delete ",t]}),(0,o.jsx)("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,o.jsx)("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 l(){return(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-chevron-bar-contract",viewBox:"0 0 16 16",children:[(0,o.jsx)("title",{children:"Close Gaps (Unassigned)"}),(0,o.jsx)("path",{"fill-rule":"evenodd",d:"M3.646 14.854a.5.5 0 0 0 .708 0L8 11.207l3.646 3.647a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 0 0 0 .708zm0-13.708a.5.5 0 0 1 .708 0L8 4.793l3.646-3.647a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 0-.708zM1 8a.5.5 0 0 1 .5-.5h13a.5.5 0 0 1 0 1h-13A.5.5 0 0 1 1 8z"})]})}function c(){return(0,o.jsxs)("div",{className:"yoodli-promo",children:[(0,o.jsx)("div",{children:(0,o.jsx)("a",{href:"https://toastmasters.yoodli.ai/",target:"_blank",children:(0,o.jsxs)("svg",{"data-bbox":"0 -30 826 263",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 790 220",height:"50",width:"150","data-type":"ugc","aria-hidden":"true","aria-labelledby":"svgcid--4ssaar9x3u6k",children:[(0,o.jsx)("path",{fill:"url(#YoodliTextLogo_svg__a)",d:"M149.194 82.786c-2.896-8.722-12.549-13.465-21.72-10.71-5.148 1.53-9.17 5.202-10.94 9.945 9.814 5.815 20.272 10.405 31.051 14.078 2.574-3.979 3.057-8.875 1.609-13.313z"}),(0,o.jsx)("path",{fill:"#6966FD",d:"M149.194 82.786c-2.896-8.722-12.549-13.465-21.72-10.71-5.148 1.53-9.17 5.202-10.94 9.945 9.814 5.815 20.272 10.405 31.051 14.078 2.574-3.979 3.057-8.875 1.609-13.313z"}),(0,o.jsx)("path",{fill:"url(#YoodliTextLogo_svg__b)",d:"M115.248 95.027c.16.612.482 1.224.804 1.836l-1.931 4.438 12.871 6.426c1.931.919 3.701 1.837 5.47 2.755l3.057-4.438c.483-.153.966-.153 1.287-.306 3.057-.918 5.631-2.601 7.723-4.743a174.996 174.996 0 0 1-29.925-13.772 14.536 14.536 0 0 0 .644 7.804z"}),(0,o.jsx)("path",{fill:"#6966FD",d:"M115.248 95.027c.16.612.482 1.224.804 1.836l-1.931 4.438 12.871 6.426c1.931.919 3.701 1.837 5.47 2.755l3.057-4.438c.483-.153.966-.153 1.287-.306 3.057-.918 5.631-2.601 7.723-4.743a174.996 174.996 0 0 1-29.925-13.772c-.483 2.602-.322 5.203.644 7.804z"}),(0,o.jsx)("path",{fill:"url(#YoodliTextLogo_svg__c)",d:"m111.224 105.892-8.527 20.045v.153l-38.934 74.518c-1.127 3.366-4.827 5.203-8.366 4.285l-.322-.153c-3.057-.766-4.827-3.673-4.023-6.427.161-.306.161-.612.322-.918l73.204-143.682c4.987-9.793.643-21.575-9.653-26.318-.644-.306-1.448-.612-2.092-.765l-.483-.153c-9.975-3.367-20.915.918-25.58 9.945l-39.579 77.12c-2.896 5.662-9.975 7.957-15.928 5.203-5.47-2.448-8.044-8.569-5.952-13.925.16-.459.321-.765.482-1.224l37.004-71.305c4.988-9.793.805-21.575-9.492-26.319-9.975-4.59-22.042-.918-27.35 8.416l-25.1 45.14c-1.93 3.52-.482 7.804 3.219 9.64 3.7 1.836 8.205.459 10.135-2.908l25.099-45.139c1.448-2.601 4.826-3.52 7.562-2.142 2.574 1.224 3.7 4.131 2.574 6.58l-.161.458-37.004 71.306c-6.758 12.547-1.61 28.155 11.744 34.581 13.193 6.427 29.604 1.53 36.361-11.17l.483-.918 39.578-77.273a5.732 5.732 0 0 1 6.918-2.754l.483.153c2.896.918 4.504 3.978 3.378 6.733 0 .153-.161.306-.321.459L37.699 190.662c-2.735 5.356-2.735 11.476-.161 16.832 2.413 5.202 7.24 9.181 13.032 10.711 2.091.612 4.344 1.071 6.757 1.071 8.849.153 16.732-4.897 20.111-12.7l38.774-74.213 12.227-17.903c-5.792-2.601-11.423-5.508-17.215-8.568z"}),(0,o.jsx)("path",{fill:"url(#YoodliTextLogo_svg__d)",d:"m111.224 105.892-8.527 20.045v.153l-39.095 74.518c-1.127 3.366-4.827 5.203-8.366 4.132l-.322-.154c-3.057-.765-4.827-3.672-4.022-6.426.16-.306.16-.612.321-.918l73.365-143.529c4.987-9.793.643-21.575-9.653-26.318-.644-.306-1.448-.612-2.092-.765l-.483-.153c-9.975-3.367-20.915.918-25.58 9.945l-39.579 77.12c-2.896 5.662-9.975 7.957-15.928 5.203-5.47-2.448-8.044-8.569-5.952-13.925.16-.459.321-.765.482-1.224l37.004-71.305c4.988-9.793.805-21.575-9.492-26.319-9.975-4.59-22.042-.918-27.35 8.416l-25.1 45.14c-1.93 3.52-.482 7.804 3.219 9.64 3.7 1.836 8.205.459 10.135-2.908l25.099-45.139c1.448-2.601 4.826-3.52 7.562-2.142 2.574 1.224 3.7 4.131 2.574 6.58 0 .152-.161.305-.161.458L12.279 97.323c-6.758 12.547-1.61 28.155 11.744 34.581 13.193 6.427 29.604 1.53 36.361-11.17l.483-.918 39.578-77.273a5.732 5.732 0 0 1 6.918-2.754l.483.153c2.896.918 4.504 3.978 3.378 6.733 0 .153-.161.306-.321.459L37.699 190.662c-2.735 5.356-2.735 11.476-.161 16.832 2.413 5.202 7.24 9.181 13.032 10.711 2.091.612 4.344 1.071 6.757 1.071 8.849.153 16.732-4.897 20.111-12.7l38.774-74.213 12.227-17.903c-5.792-2.601-11.584-5.661-17.215-8.568z"}),(0,o.jsx)("mask",{height:"189",width:"595",y:"0",x:"195",maskUnits:"userSpaceOnUse",id:"YoodliTextLogo_svg__e",fill:"none",children:(0,o.jsx)("path",{fill:"#fff",d:"M697.61 3.756c-9.042 48.156-17.755 95.374-26.632 142.749h-19.234c-.165-4.065-.494-7.974-.822-12.508-1.48 1.094-2.466 1.563-3.124 2.345-15.124 12.977-32.55 15.166-50.634 7.974-17.754-7.036-25.481-21.264-26.138-39.088-1.151-27.361 13.316-50.658 37.482-60.195 11.672-4.69 24.001-5.785 35.838-1.876 7.233 2.345 13.645 7.348 20.549 11.257 1.48-8.13 3.288-17.511 5.096-26.893 1.316-6.566 2.302-13.29 3.781-19.856.329-1.407 1.973-3.44 3.288-3.44 6.576-.625 13.152-.47 20.55-.47zm-38.633 86.463c-.493-12.509-2.795-23.297-15.289-28.3s-24.495-2.345-34.687 6.097c-11.672 10.007-15.618 22.828-14.138 37.525 2.466 24.078 24.823 27.674 40.441 20.795 16.44-7.036 22.358-20.951 23.673-36.117zM255.551 121.958c1.48-2.658 2.466-4.378 3.452-5.942 12.659-22.827 25.482-45.654 37.976-68.482 2.301-4.221 4.932-5.785 9.699-5.316 5.918.47 11.672.157 18.248.157-1.151 2.189-1.808 3.596-2.63 5.003-23.18 39.088-46.524 78.332-69.704 117.42-.329.469-.658.938-.822 1.407-7.891 15.792-20.221 24.079-39.455 21.89-5.26-.626-10.685-.157-16.439-.157l3.288-19.544c5.425 0 10.685-.156 15.946 0 6.083.469 11.836-2.501 14.96-7.505 5.096-7.348 8.384-14.384 5.918-24.078-7.069-29.238-12.823-58.788-19.234-88.182-.329-1.876-.658-3.909-1.151-6.254 7.398 0 14.303-.157 21.043.156 1.315 0 3.123 2.658 3.452 4.222 4.767 23.609 9.206 47.218 13.809 70.827.493 1.094.822 2.189 1.644 4.378zM380.162 40.968c33.537.156 54.908 23.765 50.305 54.254-4.439 28.612-20.385 45.811-48.003 51.596-27.783 5.785-52.935-5.629-60.662-28.612-9.535-27.987 4.11-71.453 51.456-76.77 2.63-.468 5.589-.468 6.904-.468zm-37.646 55.817c-.329 27.049 20.878 39.557 43.236 28.769 14.138-6.879 23.508-24.391 21.7-40.495-2.137-20.795-21.7-31.427-41.757-22.358-16.275 7.348-22.193 21.107-23.179 34.084zM444.935 101.319c.822-46.123 39.454-66.293 75.95-58.944 20.056 4.065 33.372 18.45 35.674 39.244 2.63 23.296-7.562 47.687-31.071 59.257-14.467 7.349-31.399 9.225-47.346 5.004-20.22-5.16-33.372-22.984-33.207-44.561zm88.609-13.133c.164-22.515-20.55-35.336-41.921-25.486-17.097 7.974-23.344 22.359-23.015 39.557.164 19.544 16.439 30.802 36.331 25.642 16.933-4.221 28.44-20.169 28.605-39.713zM716.844 146.505h-23.015c1.315-7.817 2.63-15.322 4.11-22.671 7.069-38.306 14.467-76.612 21.371-114.918.822-4.065 2.302-5.473 6.576-5.316 5.754.312 11.343 0 17.59 0-8.877 48-17.754 95.218-26.632 142.905zM739.695 146.505l19.07-103.974h23.344a19544.361 19544.361 0 0 0-19.399 103.974h-23.015zM790 12.668c-.164 7.818-6.905 14.072-15.124 14.072-7.891 0-13.152-5.004-13.152-12.196 0-7.974 6.905-14.54 15.289-14.54C783.917-.154 789.836 5.006 790 11.73v.938z"})}),(0,o.jsx)("g",{mask:"url(#YoodliTextLogo_svg__e)",children:(0,o.jsx)("path",{fill:"url(#YoodliTextLogo_svg__f)",d:"M826-30v263H176V-30h650z"})}),(0,o.jsxs)("defs",{fill:"none",children:[(0,o.jsxs)("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"96.099",x2:"133.267",y1:"71.293",x1:"133.267",id:"YoodliTextLogo_svg__a",children:[(0,o.jsx)("stop",{"stop-color":"#6966FD",offset:"0.573"}),(0,o.jsx)("stop",{"stop-color":"#1DA9E6",offset:"1"})]}),(0,o.jsxs)("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"110.482",x2:"129.325",y1:"87.223",x1:"129.325",id:"YoodliTextLogo_svg__b",children:[(0,o.jsx)("stop",{"stop-color":"#6966FD",offset:"0.573"}),(0,o.jsx)("stop",{"stop-color":"#1DA9E6",offset:"1"})]}),(0,o.jsxs)("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"219.279",x2:"64.22",y1:"4",x1:"64.22",id:"YoodliTextLogo_svg__c",children:[(0,o.jsx)("stop",{"stop-color":"#6966FD",offset:"0.573"}),(0,o.jsx)("stop",{"stop-color":"#1DA9E6",offset:"1"})]}),(0,o.jsxs)("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"219.279",x2:"64.22",y1:"4",x1:"64.22",id:"YoodliTextLogo_svg__d",children:[(0,o.jsx)("stop",{"stop-color":"#6966FD",offset:"0.443"}),(0,o.jsx)("stop",{"stop-color":"#1DA9E6",offset:"1"})]}),(0,o.jsxs)("linearGradient",{gradientUnits:"userSpaceOnUse",y2:"-278.934",x2:"596.064",y1:"342.833",x1:"-110.237",id:"YoodliTextLogo_svg__f",children:[(0,o.jsx)("stop",{"stop-color":"#1DA9E6"}),(0,o.jsx)("stop",{"stop-color":"#6966FE",offset:"0.823"})]})]})]})})}),(0,o.jsxs)("div",{children:["Get AI-powered coaching to prepare a speech or get feedback on a recording with ",(0,o.jsx)("a",{href:"https://toastmasters.yoodli.ai/",target:"_blank",children:"Yoodli, Toastmasters Edition"}),"."]})]})}},5338:(e,t,n)=>{"use strict";var o=n(5795);t.H=o.createRoot,o.hydrateRoot},5540:(e,t,n)=>{"use strict";function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,o(e,t)}n.d(t,{A:()=>r})},5556:(e,t,n)=>{e.exports=n(2694)()},5795:e=>{"use strict";e.exports=window.ReactDOM},5942:(e,t,n)=>{"use strict";n.d(t,{QueryClient:()=>o.QueryClient,QueryClientProvider:()=>r.QueryClientProvider,useMutation:()=>r.useMutation,useQuery:()=>r.useQuery,useQueryClient:()=>r.useQueryClient});var o=n(4468);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}});var r=n(2532)},6281:(e,t,n)=>{"use strict";n.d(t,{dd:()=>a,eJ:()=>u,wm:()=>c});var o=n(1289),r=n(4622),s=n(941);function i(e){return Math.min(1e3*Math.pow(2,e),3e4)}function a(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 c(e){return e instanceof l}var u=function(e){var t,n,c,u,d=this,h=!1;this.abort=e.abort,this.cancel=function(e){return null==t?void 0:t(e)},this.cancelRetry=function(){h=!0},this.continueRetry=function(){h=!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,u=t});var p=function(t){d.isResolved||(d.isResolved=!0,null==e.onSuccess||e.onSuccess(t),null==n||n(),c(t))},f=function(t){d.isResolved||(d.isResolved=!0,null==e.onError||e.onError(t),null==n||n(),u(t))};!function c(){if(!d.isResolved){var u;try{u=e.fn()}catch(e){u=Promise.reject(e)}t=function(e){if(!d.isResolved&&(f(new l(e)),null==d.abort||d.abort(),a(u)))try{u.cancel()}catch(e){}},d.isTransportCancelable=a(u),Promise.resolve(u).then(p).catch(function(t){var a,l;if(!d.isResolved){var u=null!=(a=e.retry)?a:3,p=null!=(l=e.retryDelay)?l:i,m="function"==typeof p?p(d.failureCount,t):p,g=!0===u||"number"==typeof u&&d.failureCount<u||"function"==typeof u&&u(d.failureCount,t);!h&&g?(d.failureCount++,null==e.onFail||e.onFail(d.failureCount,t),(0,s.yy)(m).then(function(){if(!o.m.isFocused()||!r.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(){h?f(t):c()})):f(t)}})}}()}},6426:e=>{e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],o=0;o<e.rangeCount;o++)n.push(e.getRangeAt(o));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach(function(t){e.addRange(t)}),t&&t.focus()}}},6427:e=>{"use strict";e.exports=window.wp.components},6449:()=>{},6606:(e,t,n)=>{"use strict";n.d(t,{p:()=>r});var o=n(7143);function r(){return(0,o.useSelect)(e=>{const t=e("rsvpmaker");return t?t.getSettings():(console.log("useRsvpmakerRest: rsvpmaker store not found"),{})})}},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},7098:(e,t,n)=>{"use strict";n.d(t,{E:()=>b});var o=n(8168),r=n(941),s=n(5540),i=n(428),a=n(9690),l=n(6281),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,o.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,r.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,o,s=this.state.data,i=(0,r.Zw)(e,s);return(null==(n=(o=this.options).isDataEqual)?void 0:n.call(o,s,i))?i=s:!1!==this.options.structuralSharing&&(i=(0,r.BH)(s,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(r.lQ).catch(r.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,r.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,o,s,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 c;return null==(c=this.retryer)||c.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){var u=this.observers.find(function(e){return e.options.queryFn});u&&this.setOptions(u.options)}var d=(0,r.HN)(this.queryKey),h=(0,r.jY)(),p={queryKey:d,pageParam:void 0,meta:this.meta};Object.defineProperty(p,"signal",{enumerable:!0,get:function(){if(h)return i.abortSignalConsumed=!0,h.signal}});var f,m,g={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(g)),this.revertState=this.state,this.state.isFetching&&this.state.fetchMeta===(null==(o=g.fetchOptions)?void 0:o.meta)||this.dispatch({type:"fetch",meta:null==(m=g.fetchOptions)?void 0:m.meta}),this.retryer=new l.eJ({fn:g.fetchFn,abort:null==h||null==(s=h.abort)?void 0:s.bind(h),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,a.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:g.options.retry,retryDelay:g.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,o=void 0!==t;return{data:t,dataUpdateCount:0,dataUpdatedAt:o?null!=n?n:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:o?"success":"idle"}},t.reducer=function(e,t){var n,r;switch(t.type){case"failed":return(0,o.A)({},e,{fetchFailureCount:e.fetchFailureCount+1});case"pause":return(0,o.A)({},e,{isPaused:!0});case"continue":return(0,o.A)({},e,{isPaused:!1});case"fetch":return(0,o.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,o.A)({},e,{data:t.data,dataUpdateCount:e.dataUpdateCount+1,dataUpdatedAt:null!=(r=t.dataUpdatedAt)?r:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var s=t.error;return(0,l.wm)(s)&&s.revert&&this.revertState?(0,o.A)({},this.revertState):(0,o.A)({},e,{error:s,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return(0,o.A)({},e,{isInvalidated:!0});case"setState":return(0,o.A)({},e,t.state);default:return e}},e}(),u=n(3287),d=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.queries=[],n.queriesMap={},n}(0,s.A)(t,e);var n=t.prototype;return n.build=function(e,t,n){var o,s=t.queryKey,i=null!=(o=t.queryHash)?o:(0,r.F$)(s,t),a=this.get(i);return a||(a=new c({cache:this,queryKey:s,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(s),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;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,r.b_)(e,t)[0];return void 0===n.exact&&(n.exact=!0),this.queries.find(function(e){return(0,r.MK)(n,e)})},n.findAll=function(e,t){var n=(0,r.b_)(e,t)[0];return Object.keys(n).length>0?this.queries.filter(function(e){return(0,r.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}(u.Q),h=n(3465),p=function(e){function t(t){var n;return(n=e.call(this)||this).config=t||{},n.mutations=[],n.mutationId=0,n}(0,s.A)(t,e);var n=t.prototype;return n.build=function(e,t,n){var o=new h.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(o),o},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,r.nJ)(e,t)})},n.findAll=function(e){return this.mutations.filter(function(t){return(0,r.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(r.lQ)})},Promise.resolve())})},t}(u.Q),f=n(1289),m=n(4622);function g(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}var b=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()&&m.t.isOnline()&&(e.mutationCache.onFocus(),e.queryCache.onFocus())}),this.unsubscribeOnline=m.t.subscribe(function(){f.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,r.b_)(e,t)[0];return n.fetching=!0,this.queryCache.findAll(n).length},t.isMutating=function(e){return this.mutationCache.findAll((0,o.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 o=(0,r.vh)(e),s=this.defaultQueryOptions(o);return this.queryCache.build(this,s).setData(t,n)},t.setQueriesData=function(e,t,n){var o=this;return i.j.batch(function(){return o.getQueryCache().findAll(e).map(function(e){var r=e.queryKey;return[r,o.setQueryData(r,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,r.b_)(e,t)[0],o=this.queryCache;i.j.batch(function(){o.findAll(n).forEach(function(e){o.remove(e)})})},t.resetQueries=function(e,t,n){var s=this,a=(0,r.b_)(e,t,n),l=a[0],c=a[1],u=this.queryCache,d=(0,o.A)({},l,{active:!0});return i.j.batch(function(){return u.findAll(l).forEach(function(e){e.reset()}),s.refetchQueries(d,c)})},t.cancelQueries=function(e,t,n){var o=this,s=(0,r.b_)(e,t,n),a=s[0],l=s[1],c=void 0===l?{}:l;void 0===c.revert&&(c.revert=!0);var u=i.j.batch(function(){return o.queryCache.findAll(a).map(function(e){return e.cancel(c)})});return Promise.all(u).then(r.lQ).catch(r.lQ)},t.invalidateQueries=function(e,t,n){var s,a,l,c=this,u=(0,r.b_)(e,t,n),d=u[0],h=u[1],p=(0,o.A)({},d,{active:null==(s=null!=(a=d.refetchActive)?a:d.active)||s,inactive:null!=(l=d.refetchInactive)&&l});return i.j.batch(function(){return c.queryCache.findAll(d).forEach(function(e){e.invalidate()}),c.refetchQueries(p,h)})},t.refetchQueries=function(e,t,n){var s=this,a=(0,r.b_)(e,t,n),l=a[0],c=a[1],u=i.j.batch(function(){return s.queryCache.findAll(l).map(function(e){return e.fetch(void 0,(0,o.A)({},c,{meta:{refetchPage:null==l?void 0:l.refetchPage}}))})}),d=Promise.all(u).then(r.lQ);return(null==c?void 0:c.throwOnError)||(d=d.catch(r.lQ)),d},t.fetchQuery=function(e,t,n){var o=(0,r.vh)(e,t,n),s=this.defaultQueryOptions(o);void 0===s.retry&&(s.retry=!1);var i=this.queryCache.build(this,s);return i.isStaleByTime(s.staleTime)?i.fetch(s):Promise.resolve(i.state.data)},t.prefetchQuery=function(e,t,n){return this.fetchQuery(e,t,n).then(r.lQ).catch(r.lQ)},t.fetchInfiniteQuery=function(e,t,n){var o=(0,r.vh)(e,t,n);return o.behavior={onFetch:function(e){e.fetchFn=function(){var t,n,o,s,i,a,c,u,d,h=null==(t=e.fetchOptions)||null==(n=t.meta)?void 0:n.refetchPage,p=null==(o=e.fetchOptions)||null==(s=o.meta)?void 0:s.fetchMore,f=null==p?void 0:p.pageParam,m="forward"===(null==p?void 0:p.direction),b="backward"===(null==p?void 0:p.direction),v=(null==(i=e.state.data)?void 0:i.pages)||[],y=(null==(a=e.state.data)?void 0:a.pageParams)||[],x=(0,r.jY)(),j=null==x?void 0:x.signal,w=y,k=!1,_=e.options.queryFn||function(){return Promise.reject("Missing queryFn")},C=function(e,t,n,o){return w=o?[t].concat(w):[].concat(w,[t]),o?[n].concat(e):[].concat(e,[n])},S=function(t,n,o,r){if(k)return Promise.reject("Cancelled");if(void 0===o&&!n&&t.length)return Promise.resolve(t);var s={queryKey:e.queryKey,signal:j,pageParam:o,meta:e.meta},i=_(s),a=Promise.resolve(i).then(function(e){return C(t,o,e,r)});return(0,l.dd)(i)&&(a.cancel=i.cancel),a};if(v.length)if(m){var E=void 0!==f,A=E?f:g(e.options,v);c=S(v,E,A)}else if(b){var T=void 0!==f,O=T?f:(u=e.options,d=v,null==u.getPreviousPageParam?void 0:u.getPreviousPageParam(d[0],d));c=S(v,T,O,!0)}else!function(){w=[];var t=void 0===e.options.getNextPageParam,n=!h||!v[0]||h(v[0],0,v);c=n?S([],t,y[0]):Promise.resolve(C([],y[0],v[0]));for(var o=function(n){c=c.then(function(o){if(!h||!v[n]||h(v[n],n,v)){var r=t?y[n]:g(e.options,o);return S(o,t,r)}return Promise.resolve(C(o,y[n],v[n]))})},r=1;r<v.length;r++)o(r)}();else c=S([]);var N=c.then(function(e){return{pages:e,pageParams:w}});return N.cancel=function(){k=!0,null==x||x.abort(),(0,l.dd)(c)&&c.cancel()},N}}},this.fetchQuery(o)},t.prefetchInfiniteQuery=function(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(r.lQ).catch(r.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(r.lQ).catch(r.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,r.Od)(e)===(0,r.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,r.Cp)(e,t.queryKey)}))?void 0:t.defaultOptions:void 0},t.setMutationDefaults=function(e,t){var n=this.mutationDefaults.find(function(t){return(0,r.Od)(e)===(0,r.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,r.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,o.A)({},this.defaultOptions.queries,this.getQueryDefaults(null==e?void 0:e.queryKey),e,{_defaulted:!0});return!t.queryHash&&t.queryKey&&(t.queryHash=(0,r.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,o.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}()},7143:e=>{"use strict";e.exports=window.wp.data},7965:(e,t,n)=>{"use strict";var o=n(6426),r={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,s,i,a,l,c,u=!1;t||(t={}),n=t.debug||!1;try{if(i=o(),a=document.createRange(),l=document.getSelection(),(c=document.createElement("span")).textContent=e,c.ariaHidden="true",c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",function(o){if(o.stopPropagation(),t.format)if(o.preventDefault(),void 0===o.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var s=r[t.format]||r.default;window.clipboardData.setData(s,e)}else o.clipboardData.clearData(),o.clipboardData.setData(t.format,e);t.onCopy&&(o.preventDefault(),t.onCopy(o.clipboardData))}),document.body.appendChild(c),a.selectNodeContents(c),l.addRange(a),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(o){n&&console.error("unable to copy using execCommand: ",o),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(o){n&&console.error("unable to copy using clipboardData: ",o),n&&console.error("falling back to prompt"),s=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(s,e)}}finally{l&&("function"==typeof l.removeRange?l.removeRange(a):l.removeAllRanges()),c&&document.body.removeChild(c),i()}return u}},8168:(e,t,n)=>{"use strict";function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},o.apply(null,arguments)}n.d(t,{A:()=>o})},8662:(e,t,n)=>{"use strict";n.d(t,{d:()=>re}),n(1609);const{entries:o,setPrototypeOf:r,isFrozen:s,getPrototypeOf:i,getOwnPropertyDescriptor:a}=Object;let{freeze:l,seal:c,create:u}=Object,{apply:d,construct:h}="undefined"!=typeof Reflect&&Reflect;l||(l=function(e){return e}),c||(c=function(e){return e}),d||(d=function(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];return e.apply(t,o)}),h||(h=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return new e(...n)});const p=A(Array.prototype.forEach),f=A(Array.prototype.lastIndexOf),m=A(Array.prototype.pop),g=A(Array.prototype.push),b=A(Array.prototype.splice),v=A(String.prototype.toLowerCase),y=A(String.prototype.toString),x=A(String.prototype.match),j=A(String.prototype.replace),w=A(String.prototype.indexOf),k=A(String.prototype.trim),_=A(Object.prototype.hasOwnProperty),C=A(RegExp.prototype.test),S=(E=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return h(E,t)});var E;function A(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return d(e,t,o)}}function T(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:v;r&&r(e,null);let o=t.length;for(;o--;){let r=t[o];if("string"==typeof r){const e=n(r);e!==r&&(s(t)||(t[o]=e),r=e)}e[r]=!0}return e}function O(e){for(let t=0;t<e.length;t++)_(e,t)||(e[t]=null);return e}function N(e){const t=u(null);for(const[n,r]of o(e))_(e,n)&&(Array.isArray(r)?t[n]=O(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=N(r):t[n]=r);return t}function R(e,t){for(;null!==e;){const n=a(e,t);if(n){if(n.get)return A(n.get);if("function"==typeof n.value)return A(n.value)}e=i(e)}return function(){return null}}const D=l(["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","search","section","select","shadow","slot","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"]),M=l(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),L=l(["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"]),P=l(["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"]),I=l(["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=l(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=l(["#text"]),B=l(["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","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","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","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Q=l(["accent-height","accumulate","additive","alignment-baseline","amplitude","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","exponent","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","intercept","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","mask-type","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","slope","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","tablevalues","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"]),z=l(["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"]),q=l(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),H=c(/\{\{[\w\W]*|[\w\W]*\}\}/gm),V=c(/<%[\w\W]*|[\w\W]*%>/gm),W=c(/\$\{[\w\W]*/gm),K=c(/^data-[\-\w.\u00B7-\uFFFF]+$/),G=c(/^aria-[\-\w]+$/),Y=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),J=c(/^(?:\w+script|data):/i),$=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),X=c(/^html$/i),Z=c(/^[a-z][.\w]*(-[.\w]+)+$/i);var ee=Object.freeze({__proto__:null,ARIA_ATTR:G,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:Z,DATA_ATTR:K,DOCTYPE_NAME:X,ERB_EXPR:V,IS_ALLOWED_URI:Y,IS_SCRIPT_OR_DATA:J,MUSTACHE_EXPR:H,TMPLIT_EXPR:W});const te=function(){return"undefined"==typeof window?null:window};var ne=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te();const n=t=>e(t);if(n.version="3.3.0",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const s=r,i=s.currentScript,{DocumentFragment:a,HTMLTemplateElement:c,Node:d,Element:h,NodeFilter:E,NamedNodeMap:A=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:O,DOMParser:H,trustedTypes:V}=t,W=h.prototype,K=R(W,"cloneNode"),G=R(W,"remove"),J=R(W,"nextSibling"),$=R(W,"childNodes"),Z=R(W,"parentNode");if("function"==typeof c){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let ne,oe="";const{implementation:re,createNodeIterator:se,createDocumentFragment:ie,getElementsByTagName:ae}=r,{importNode:le}=s;let ce={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof o&&"function"==typeof Z&&re&&void 0!==re.createHTMLDocument;const{MUSTACHE_EXPR:ue,ERB_EXPR:de,TMPLIT_EXPR:he,DATA_ATTR:pe,ARIA_ATTR:fe,IS_SCRIPT_OR_DATA:me,ATTR_WHITESPACE:ge,CUSTOM_ELEMENT:be}=ee;let{IS_ALLOWED_URI:ve}=ee,ye=null;const xe=T({},[...D,...M,...L,...I,...U]);let je=null;const we=T({},[...B,...Q,...z,...q]);let ke=Object.seal(u(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,Ce=null;const Se=Object.seal(u(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ee=!0,Ae=!0,Te=!1,Oe=!0,Ne=!1,Re=!0,De=!1,Me=!1,Le=!1,Pe=!1,Ie=!1,Fe=!1,Ue=!0,Be=!1,Qe=!0,ze=!1,qe={},He=null;const Ve=T({},["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 We=null;const Ke=T({},["audio","video","img","source","image","track"]);let Ge=null;const Ye=T({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Je="http://www.w3.org/1998/Math/MathML",$e="http://www.w3.org/2000/svg",Xe="http://www.w3.org/1999/xhtml";let Ze=Xe,et=!1,tt=null;const nt=T({},[Je,$e,Xe],y);let ot=T({},["mi","mo","mn","ms","mtext"]),rt=T({},["annotation-xml"]);const st=T({},["title","style","font","a","script"]);let it=null;const at=["application/xhtml+xml","text/html"];let lt=null,ct=null;const ut=r.createElement("form"),dt=function(e){return e instanceof RegExp||e instanceof Function},ht=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ct||ct!==e){if(e&&"object"==typeof e||(e={}),e=N(e),it=-1===at.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,lt="application/xhtml+xml"===it?y:v,ye=_(e,"ALLOWED_TAGS")?T({},e.ALLOWED_TAGS,lt):xe,je=_(e,"ALLOWED_ATTR")?T({},e.ALLOWED_ATTR,lt):we,tt=_(e,"ALLOWED_NAMESPACES")?T({},e.ALLOWED_NAMESPACES,y):nt,Ge=_(e,"ADD_URI_SAFE_ATTR")?T(N(Ye),e.ADD_URI_SAFE_ATTR,lt):Ye,We=_(e,"ADD_DATA_URI_TAGS")?T(N(Ke),e.ADD_DATA_URI_TAGS,lt):Ke,He=_(e,"FORBID_CONTENTS")?T({},e.FORBID_CONTENTS,lt):Ve,_e=_(e,"FORBID_TAGS")?T({},e.FORBID_TAGS,lt):N({}),Ce=_(e,"FORBID_ATTR")?T({},e.FORBID_ATTR,lt):N({}),qe=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,Ee=!1!==e.ALLOW_ARIA_ATTR,Ae=!1!==e.ALLOW_DATA_ATTR,Te=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Oe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ne=e.SAFE_FOR_TEMPLATES||!1,Re=!1!==e.SAFE_FOR_XML,De=e.WHOLE_DOCUMENT||!1,Pe=e.RETURN_DOM||!1,Ie=e.RETURN_DOM_FRAGMENT||!1,Fe=e.RETURN_TRUSTED_TYPE||!1,Le=e.FORCE_BODY||!1,Ue=!1!==e.SANITIZE_DOM,Be=e.SANITIZE_NAMED_PROPS||!1,Qe=!1!==e.KEEP_CONTENT,ze=e.IN_PLACE||!1,ve=e.ALLOWED_URI_REGEXP||Y,Ze=e.NAMESPACE||Xe,ot=e.MATHML_TEXT_INTEGRATION_POINTS||ot,rt=e.HTML_INTEGRATION_POINTS||rt,ke=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&dt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ke.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&dt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ke.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ke.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ne&&(Ae=!1),Ie&&(Pe=!0),qe&&(ye=T({},U),je=[],!0===qe.html&&(T(ye,D),T(je,B)),!0===qe.svg&&(T(ye,M),T(je,Q),T(je,q)),!0===qe.svgFilters&&(T(ye,L),T(je,Q),T(je,q)),!0===qe.mathMl&&(T(ye,I),T(je,z),T(je,q))),e.ADD_TAGS&&("function"==typeof e.ADD_TAGS?Se.tagCheck=e.ADD_TAGS:(ye===xe&&(ye=N(ye)),T(ye,e.ADD_TAGS,lt))),e.ADD_ATTR&&("function"==typeof e.ADD_ATTR?Se.attributeCheck=e.ADD_ATTR:(je===we&&(je=N(je)),T(je,e.ADD_ATTR,lt))),e.ADD_URI_SAFE_ATTR&&T(Ge,e.ADD_URI_SAFE_ATTR,lt),e.FORBID_CONTENTS&&(He===Ve&&(He=N(He)),T(He,e.FORBID_CONTENTS,lt)),Qe&&(ye["#text"]=!0),De&&T(ye,["html","head","body"]),ye.table&&(T(ye,["tbody"]),delete _e.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw S('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ne=e.TRUSTED_TYPES_POLICY,oe=ne.createHTML("")}else void 0===ne&&(ne=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(V,i)),null!==ne&&"string"==typeof oe&&(oe=ne.createHTML(""));l&&l(e),ct=e}},pt=T({},[...M,...L,...P]),ft=T({},[...I,...F]),mt=function(e){g(n.removed,{element:e});try{Z(e).removeChild(e)}catch(t){G(e)}},gt=function(e,t){try{g(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){g(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Pe||Ie)try{mt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},bt=function(e){let t=null,n=null;if(Le)e="<remove></remove>"+e;else{const t=x(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===it&&Ze===Xe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=ne?ne.createHTML(e):e;if(Ze===Xe)try{t=(new H).parseFromString(o,it)}catch(e){}if(!t||!t.documentElement){t=re.createDocument(Ze,"template",null);try{t.documentElement.innerHTML=et?oe:o}catch(e){}}const s=t.body||t.documentElement;return e&&n&&s.insertBefore(r.createTextNode(n),s.childNodes[0]||null),Ze===Xe?ae.call(t,De?"html":"body")[0]:De?t.documentElement:s},vt=function(e){return se.call(e.ownerDocument||e,e,E.SHOW_ELEMENT|E.SHOW_COMMENT|E.SHOW_TEXT|E.SHOW_PROCESSING_INSTRUCTION|E.SHOW_CDATA_SECTION,null)},yt=function(e){return e instanceof O&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof A)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},xt=function(e){return"function"==typeof d&&e instanceof d};function jt(e,t,o){p(e,e=>{e.call(n,t,o,ct)})}const wt=function(e){let t=null;if(jt(ce.beforeSanitizeElements,e,null),yt(e))return mt(e),!0;const o=lt(e.nodeName);if(jt(ce.uponSanitizeElement,e,{tagName:o,allowedTags:ye}),Re&&e.hasChildNodes()&&!xt(e.firstElementChild)&&C(/<[/\w!]/g,e.innerHTML)&&C(/<[/\w!]/g,e.textContent))return mt(e),!0;if(7===e.nodeType)return mt(e),!0;if(Re&&8===e.nodeType&&C(/<[/\w]/g,e.data))return mt(e),!0;if(!(Se.tagCheck instanceof Function&&Se.tagCheck(o))&&(!ye[o]||_e[o])){if(!_e[o]&&_t(o)){if(ke.tagNameCheck instanceof RegExp&&C(ke.tagNameCheck,o))return!1;if(ke.tagNameCheck instanceof Function&&ke.tagNameCheck(o))return!1}if(Qe&&!He[o]){const t=Z(e)||e.parentNode,n=$(e)||e.childNodes;if(n&&t)for(let o=n.length-1;o>=0;--o){const r=K(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,J(e))}}return mt(e),!0}return e instanceof h&&!function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:Ze,tagName:"template"});const n=v(e.tagName),o=v(t.tagName);return!!tt[e.namespaceURI]&&(e.namespaceURI===$e?t.namespaceURI===Xe?"svg"===n:t.namespaceURI===Je?"svg"===n&&("annotation-xml"===o||ot[o]):Boolean(pt[n]):e.namespaceURI===Je?t.namespaceURI===Xe?"math"===n:t.namespaceURI===$e?"math"===n&&rt[o]:Boolean(ft[n]):e.namespaceURI===Xe?!(t.namespaceURI===$e&&!rt[o])&&!(t.namespaceURI===Je&&!ot[o])&&!ft[n]&&(st[n]||!pt[n]):!("application/xhtml+xml"!==it||!tt[e.namespaceURI]))}(e)?(mt(e),!0):"noscript"!==o&&"noembed"!==o&&"noframes"!==o||!C(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ne&&3===e.nodeType&&(t=e.textContent,p([ue,de,he],e=>{t=j(t,e," ")}),e.textContent!==t&&(g(n.removed,{element:e.cloneNode()}),e.textContent=t)),jt(ce.afterSanitizeElements,e,null),!1):(mt(e),!0)},kt=function(e,t,n){if(Ue&&("id"===t||"name"===t)&&(n in r||n in ut))return!1;if(Ae&&!Ce[t]&&C(pe,t));else if(Ee&&C(fe,t));else if(Se.attributeCheck instanceof Function&&Se.attributeCheck(t,e));else if(!je[t]||Ce[t]){if(!(_t(e)&&(ke.tagNameCheck instanceof RegExp&&C(ke.tagNameCheck,e)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(e))&&(ke.attributeNameCheck instanceof RegExp&&C(ke.attributeNameCheck,t)||ke.attributeNameCheck instanceof Function&&ke.attributeNameCheck(t,e))||"is"===t&&ke.allowCustomizedBuiltInElements&&(ke.tagNameCheck instanceof RegExp&&C(ke.tagNameCheck,n)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(n))))return!1}else if(Ge[t]);else if(C(ve,j(n,ge,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==w(n,"data:")||!We[e])if(Te&&!C(me,j(n,ge,"")));else if(n)return!1;return!0},_t=function(e){return"annotation-xml"!==e&&x(e,be)},Ct=function(e){jt(ce.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||yt(e))return;const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:je,forceKeepAttr:void 0};let r=t.length;for(;r--;){const s=t[r],{name:i,namespaceURI:a,value:l}=s,c=lt(i),u=l;let d="value"===i?u:k(u);if(o.attrName=c,o.attrValue=d,o.keepAttr=!0,o.forceKeepAttr=void 0,jt(ce.uponSanitizeAttribute,e,o),d=o.attrValue,!Be||"id"!==c&&"name"!==c||(gt(i,e),d="user-content-"+d),Re&&C(/((--!?|])>)|<\/(style|title|textarea)/i,d)){gt(i,e);continue}if("attributename"===c&&x(d,"href")){gt(i,e);continue}if(o.forceKeepAttr)continue;if(!o.keepAttr){gt(i,e);continue}if(!Oe&&C(/\/>/i,d)){gt(i,e);continue}Ne&&p([ue,de,he],e=>{d=j(d,e," ")});const h=lt(e.nodeName);if(kt(h,c,d)){if(ne&&"object"==typeof V&&"function"==typeof V.getAttributeType)if(a);else switch(V.getAttributeType(h,c)){case"TrustedHTML":d=ne.createHTML(d);break;case"TrustedScriptURL":d=ne.createScriptURL(d)}if(d!==u)try{a?e.setAttributeNS(a,i,d):e.setAttribute(i,d),yt(e)?mt(e):m(n.removed)}catch(t){gt(i,e)}}else gt(i,e)}jt(ce.afterSanitizeAttributes,e,null)},St=function e(t){let n=null;const o=vt(t);for(jt(ce.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)jt(ce.uponSanitizeShadowNode,n,null),wt(n),Ct(n),n.content instanceof a&&e(n.content);jt(ce.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=null,r=null,i=null,l=null;if(et=!e,et&&(e="\x3c!--\x3e"),"string"!=typeof e&&!xt(e)){if("function"!=typeof e.toString)throw S("toString is not a function");if("string"!=typeof(e=e.toString()))throw S("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Me||ht(t),n.removed=[],"string"==typeof e&&(ze=!1),ze){if(e.nodeName){const t=lt(e.nodeName);if(!ye[t]||_e[t])throw S("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof d)o=bt("\x3c!----\x3e"),r=o.ownerDocument.importNode(e,!0),1===r.nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?o=r:o.appendChild(r);else{if(!Pe&&!Ne&&!De&&-1===e.indexOf("<"))return ne&&Fe?ne.createHTML(e):e;if(o=bt(e),!o)return Pe?null:Fe?oe:""}o&&Le&&mt(o.firstChild);const c=vt(ze?e:o);for(;i=c.nextNode();)wt(i),Ct(i),i.content instanceof a&&St(i.content);if(ze)return e;if(Pe){if(Ie)for(l=ie.call(o.ownerDocument);o.firstChild;)l.appendChild(o.firstChild);else l=o;return(je.shadowroot||je.shadowrootmode)&&(l=le.call(s,l,!0)),l}let u=De?o.outerHTML:o.innerHTML;return De&&ye["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&C(X,o.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+o.ownerDocument.doctype.name+">\n"+u),Ne&&p([ue,de,he],e=>{u=j(u,e," ")}),ne&&Fe?ne.createHTML(u):u},n.setConfig=function(){ht(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Me=!0},n.clearConfig=function(){ct=null,Me=!1},n.isValidAttribute=function(e,t,n){ct||ht({});const o=lt(e),r=lt(t);return kt(o,r,n)},n.addHook=function(e,t){"function"==typeof t&&g(ce[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=f(ce[e],t);return-1===n?void 0:b(ce[e],n,1)[0]}return m(ce[e])},n.removeHooks=function(e){ce[e]=[]},n.removeAllHooks=function(){ce={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}(),oe=n(790);function re(e){const{innerHTML:t}=e,n=ne.sanitize(t).replace("class=","className=");return(0,oe.jsx)("div",{dangerouslySetInnerHTML:{__html:n}})}},9399:(e,t,n)=>{"use strict";var o=n(5264).CopyToClipboard;o.CopyToClipboard=o,e.exports=o},9439:(e,t,n)=>{"use strict";n.d(t,{h:()=>s,k:()=>r}),n(1609);var o=n(790);function r(e){if(!e.options)return void console.log("SelectCtrl called without props.options",e);const t={display:e.display?e.display:"block",maxWidth:e.width?e.width:"325px"};return(0,o.jsxs)("div",{style:t,children:[(0,o.jsx)("label",{style:{display:"block",fontSize:"11px",textTransform:"uppercase"},children:e.label}),(0,o.jsx)("select",{value:e.value,onChange:t=>e.onChange(t.target.value),children:e.options.map(e=>(0,o.jsx)("option",{value:e.value,children:e.label}))})]})}function s(e){const t={display:e.display?e.display:"block",maxWidth:e.maxWidth?e.maxWidth:"300px"};return(0,o.jsxs)("div",{style:t,children:[(0,o.jsx)("label",{style:{display:"block",fontSize:"11px",textTransform:"uppercase"},children:e.label}),(0,o.jsx)("input",{type:"number",value:e.value?e.value:0,onChange:t=>e.onChange(t.target.value)})]})}},9690:(e,t,n)=>{"use strict";n.d(t,{B:()=>s,t:()=>r});var o=console;function r(){return o}function s(e){o=e}},9692:(e,t,n)=>{"use strict";function o(e,t){return t&&t.hasOwnProperty("translations")&&t.translations[e]?t.translations[e]:e}n.d(t,{A:()=>o})}},o={};function r(e){var t=o[e];if(void 0!==t)return t.exports;var s=o[e]={exports:{}};return n[e](s,s.exports,r),s.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var s=Object.create(null);r.r(s);var i={};e=e||[null,t({}),t([]),t(t)];for(var a=2&o&&n;("object"==typeof a||"function"==typeof a)&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach(e=>i[e]=()=>n[e]);return i.default=()=>n,r.d(s,i),s},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e,t,n,o=r(1609),s=r.t(o,2),i=r.n(o),a=r(5795),l=r.n(a),c=r(5338),u=(r(376),r(5942)),d=r(9692),h=r(9439),p=r(6427),f=r(5556),m=function(){return m=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},m.apply(this,arguments)},g={onActivate:f.func,onAddUndo:f.func,onBeforeAddUndo:f.func,onBeforeExecCommand:f.func,onBeforeGetContent:f.func,onBeforeRenderUI:f.func,onBeforeSetContent:f.func,onBeforePaste:f.func,onBlur:f.func,onChange:f.func,onClearUndos:f.func,onClick:f.func,onContextMenu:f.func,onCommentChange:f.func,onCompositionEnd:f.func,onCompositionStart:f.func,onCompositionUpdate:f.func,onCopy:f.func,onCut:f.func,onDblclick:f.func,onDeactivate:f.func,onDirty:f.func,onDrag:f.func,onDragDrop:f.func,onDragEnd:f.func,onDragGesture:f.func,onDragOver:f.func,onDrop:f.func,onExecCommand:f.func,onFocus:f.func,onFocusIn:f.func,onFocusOut:f.func,onGetContent:f.func,onHide:f.func,onInit:f.func,onInput:f.func,onKeyDown:f.func,onKeyPress:f.func,onKeyUp:f.func,onLoadContent:f.func,onMouseDown:f.func,onMouseEnter:f.func,onMouseLeave:f.func,onMouseMove:f.func,onMouseOut:f.func,onMouseOver:f.func,onMouseUp:f.func,onNodeChange:f.func,onObjectResizeStart:f.func,onObjectResized:f.func,onObjectSelected:f.func,onPaste:f.func,onPostProcess:f.func,onPostRender:f.func,onPreProcess:f.func,onProgressState:f.func,onRedo:f.func,onRemove:f.func,onReset:f.func,onSaveContent:f.func,onSelectionChange:f.func,onSetAttrib:f.func,onSetContent:f.func,onShow:f.func,onSubmit:f.func,onUndo:f.func,onVisualAid:f.func,onSkinLoadError:f.func,onThemeLoadError:f.func,onModelLoadError:f.func,onPluginLoadError:f.func,onIconsLoadError:f.func,onLanguageLoadError:f.func,onScriptsLoad:f.func,onScriptsLoadError:f.func},b=m({apiKey:f.string,licenseKey:f.string,id:f.string,inline:f.bool,init:f.object,initialValue:f.string,onEditorChange:f.func,value:f.string,tagName:f.string,tabIndex:f.number,cloudChannel:f.string,plugins:f.oneOfType([f.string,f.array]),toolbar:f.oneOfType([f.string,f.array]),disabled:f.bool,textareaName:f.string,tinymceScriptSrc:f.oneOfType([f.string,f.arrayOf(f.string),f.arrayOf(f.shape({src:f.string,async:f.bool,defer:f.bool}))]),rollback:f.oneOfType([f.number,f.oneOf([!1])]),scriptLoading:f.shape({async:f.bool,defer:f.bool,delay:f.number})},g),v=function(e){return"function"==typeof e},y=function(e){return e in g},x=function(e){return e.substr(2)},j=function(e,t,n,o,r){return function(t,n,o,r,s,i,a){var l=Object.keys(s).filter(y),c=Object.keys(i).filter(y),u=l.filter(function(e){return void 0===i[e]}),d=c.filter(function(e){return void 0===s[e]});u.forEach(function(e){var t=x(e),n=a[t];o(t,n),delete a[t]}),d.forEach(function(o){var r=function(t,n){return function(o){var r;return null===(r=t(n))||void 0===r?void 0:r(o,e)}}(t,o),s=x(o);a[s]=r,n(s,r)})}(r,e.on.bind(e),e.off.bind(e),0,t,n,o)},w=0,k=function(e){var t=Date.now();return e+"_"+Math.floor(1e9*Math.random())+ ++w+String(t)},_=function(e){return null!==e&&("textarea"===e.tagName.toLowerCase()||"input"===e.tagName.toLowerCase())},C=function(e){return void 0===e||""===e?[]:Array.isArray(e)?e:e.split(" ")},S=function(e,t){void 0!==e&&(null!=e.mode&&"object"==typeof e.mode&&"function"==typeof e.mode.set?e.mode.set(t):e.setMode(t))},E=function(){return E=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},E.apply(this,arguments)},A=function(e,t,n){var o,r,s=e.createElement("script");s.referrerPolicy="origin",s.type="application/javascript",s.id=t.id,s.src=t.src,s.async=null!==(o=t.async)&&void 0!==o&&o,s.defer=null!==(r=t.defer)&&void 0!==r&&r;var i=function(){s.removeEventListener("load",i),s.removeEventListener("error",a),n(t.src)},a=function(e){s.removeEventListener("load",i),s.removeEventListener("error",a),n(t.src,e)};s.addEventListener("load",i),s.addEventListener("error",a),e.head&&e.head.appendChild(s)},T=(e=[],t=function(t){var n=e.find(function(e){return e.getDocument()===t});return void 0===n&&(n=function(e){var t={},n=function(e,n){var o=t[e];o.done=!0,o.error=n;for(var r=0,s=o.handlers;r<s.length;r++)(0,s[r])(e,n);o.handlers=[]};return{loadScripts:function(o,r,s){var i=function(e){return void 0!==s?s(e):console.error(e)};if(0!==o.length)for(var a=0,l=!1,c=function(e,t){l||(t?(l=!0,i(t)):++a===o.length&&r())},u=0,d=o;u<d.length;u++){var h=d[u],p=t[h.src];if(p)p.done?c(h.src,p.error):p.handlers.push(c);else{var f=k("tiny-");t[h.src]={id:f,src:h.src,done:!1,error:null,handlers:[c]},A(e,E({id:f},h),n)}}else i(new Error("At least one script must be provided"))},deleteScripts:function(){for(var n,o=0,r=Object.values(t);o<r.length;o++){var s=r[o],i=e.getElementById(s.id);null!=i&&"SCRIPT"===i.tagName&&(null===(n=i.parentNode)||void 0===n||n.removeChild(i))}t={}},getDocument:function(){return e}}}(t),e.push(n)),n},{loadList:function(e,n,o,r,s){var i=function(){return t(e).loadScripts(n,r,s)};o>0?setTimeout(i,o):i()},reinitialize:function(){for(var t=e.pop();null!=t;t=e.pop())t.deleteScripts()}}),O=function(e){var t=e;return t&&t.tinymce?t.tinymce:null},N=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),R=function(){return R=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},R.apply(this,arguments)},D=function(e){function t(t){var n,r,s,i=e.call(this,t)||this;return i.rollbackTimer=void 0,i.valueCursor=void 0,i.rollbackChange=function(){var e=i.editor,t=i.props.value;e&&t&&t!==i.currentContent&&e.undoManager.ignore(function(){if(e.setContent(t),i.valueCursor&&(!i.inline||e.hasFocus()))try{e.selection.moveToBookmark(i.valueCursor)}catch(e){}}),i.rollbackTimer=void 0},i.handleBeforeInput=function(e){if(void 0!==i.props.value&&i.props.value===i.currentContent&&i.editor&&(!i.inline||i.editor.hasFocus()))try{i.valueCursor=i.editor.selection.getBookmark(3)}catch(e){}},i.handleBeforeInputSpecial=function(e){"Enter"!==e.key&&"Backspace"!==e.key&&"Delete"!==e.key||i.handleBeforeInput(e)},i.handleEditorChange=function(e){var t=i.editor;if(t&&t.initialized){var n=t.getContent();void 0!==i.props.value&&i.props.value!==n&&!1!==i.props.rollback&&(i.rollbackTimer||(i.rollbackTimer=window.setTimeout(i.rollbackChange,"number"==typeof i.props.rollback?i.props.rollback:200))),n!==i.currentContent&&(i.currentContent=n,v(i.props.onEditorChange)&&i.props.onEditorChange(n,t))}},i.handleEditorChangeSpecial=function(e){"Backspace"!==e.key&&"Delete"!==e.key||i.handleEditorChange(e)},i.initialise=function(e){var t,n,o;void 0===e&&(e=0);var r=i.elementRef.current;if(r)if(function(e){if(!("isConnected"in Node.prototype)){for(var t=e,n=e.parentNode;null!=n;)n=(t=n).parentNode;return t===e.ownerDocument}return e.isConnected}(r)){var s=O(i.view);if(!s)throw new Error("tinymce should have been loaded into global scope");var a,l,c=R(R(R(R({},i.props.init),{selector:void 0,target:r,readonly:i.props.disabled,inline:i.inline,plugins:(a=null===(t=i.props.init)||void 0===t?void 0:t.plugins,l=i.props.plugins,C(a).concat(C(l))),toolbar:null!==(n=i.props.toolbar)&&void 0!==n?n:null===(o=i.props.init)||void 0===o?void 0:o.toolbar}),i.props.licenseKey?{license_key:i.props.licenseKey}:{}),{setup:function(e){i.editor=e,i.bindHandlers({}),i.inline&&!_(r)&&e.once("PostRender",function(t){e.setContent(i.getInitialValue(),{no_events:!0})}),i.props.init&&v(i.props.init.setup)&&i.props.init.setup(e)},init_instance_callback:function(e){var t,n,o=i.getInitialValue();i.currentContent=null!==(t=i.currentContent)&&void 0!==t?t:e.getContent(),i.currentContent!==o&&(i.currentContent=o,e.setContent(o),e.undoManager.clear(),e.undoManager.add(),e.setDirty(!1));var r=null!==(n=i.props.disabled)&&void 0!==n&&n;S(i.editor,r?"readonly":"design"),i.props.init&&v(i.props.init.init_instance_callback)&&i.props.init.init_instance_callback(e)}});i.inline||(r.style.visibility=""),_(r)&&(r.value=i.getInitialValue()),s.init(c)}else if(0===e)setTimeout(function(){return i.initialise(1)},1);else{if(!(e<100))throw new Error("tinymce can only be initialised when in a document");setTimeout(function(){return i.initialise(e+1)},100)}},i.id=i.props.id||k("tiny-react"),i.elementRef=o.createRef(),i.inline=null!==(s=null!==(n=i.props.inline)&&void 0!==n?n:null===(r=i.props.init)||void 0===r?void 0:r.inline)&&void 0!==s&&s,i.boundHandlers={},i}return N(t,e),Object.defineProperty(t.prototype,"view",{get:function(){var e,t;return null!==(t=null===(e=this.elementRef.current)||void 0===e?void 0:e.ownerDocument.defaultView)&&void 0!==t?t:window},enumerable:!1,configurable:!0}),t.prototype.componentDidUpdate=function(e){var t,n,o=this;if(this.rollbackTimer&&(clearTimeout(this.rollbackTimer),this.rollbackTimer=void 0),this.editor&&(this.bindHandlers(e),this.editor.initialized)){if(this.currentContent=null!==(t=this.currentContent)&&void 0!==t?t:this.editor.getContent(),"string"==typeof this.props.initialValue&&this.props.initialValue!==e.initialValue)this.editor.setContent(this.props.initialValue),this.editor.undoManager.clear(),this.editor.undoManager.add(),this.editor.setDirty(!1);else if("string"==typeof this.props.value&&this.props.value!==this.currentContent){var r=this.editor;r.undoManager.transact(function(){var e;if(!o.inline||r.hasFocus())try{e=r.selection.getBookmark(3)}catch(e){}var t=o.valueCursor;if(r.setContent(o.props.value),!o.inline||r.hasFocus())for(var n=0,s=[e,t];n<s.length;n++){var i=s[n];if(i)try{r.selection.moveToBookmark(i),o.valueCursor=i;break}catch(e){}}})}if(this.props.disabled!==e.disabled){var s=null!==(n=this.props.disabled)&&void 0!==n&&n;S(this.editor,s?"readonly":"design")}}},t.prototype.componentDidMount=function(){var e,t,n,o,r,s=this;null!==O(this.view)?this.initialise():Array.isArray(this.props.tinymceScriptSrc)&&0===this.props.tinymceScriptSrc.length?null===(t=(e=this.props).onScriptsLoadError)||void 0===t||t.call(e,new Error("No `tinymce` global is present but the `tinymceScriptSrc` prop was an empty array.")):(null===(n=this.elementRef.current)||void 0===n?void 0:n.ownerDocument)&&T.loadList(this.elementRef.current.ownerDocument,this.getScriptSources(),null!==(r=null===(o=this.props.scriptLoading)||void 0===o?void 0:o.delay)&&void 0!==r?r:0,function(){var e,t;null===(t=(e=s.props).onScriptsLoad)||void 0===t||t.call(e),s.initialise()},function(e){var t,n;null===(n=(t=s.props).onScriptsLoadError)||void 0===n||n.call(t,e)})},t.prototype.componentWillUnmount=function(){var e=this,t=this.editor;t&&(t.off(this.changeEvents(),this.handleEditorChange),t.off(this.beforeInputEvent(),this.handleBeforeInput),t.off("keypress",this.handleEditorChangeSpecial),t.off("keydown",this.handleBeforeInputSpecial),t.off("NewBlock",this.handleEditorChange),Object.keys(this.boundHandlers).forEach(function(n){t.off(n,e.boundHandlers[n])}),this.boundHandlers={},t.remove(),this.editor=void 0)},t.prototype.render=function(){return this.inline?this.renderInline():this.renderIframe()},t.prototype.changeEvents=function(){var e,t,n;return(null===(n=null===(t=null===(e=O(this.view))||void 0===e?void 0:e.Env)||void 0===t?void 0:t.browser)||void 0===n?void 0:n.isIE())?"change keyup compositionend setcontent CommentChange":"change input compositionend setcontent CommentChange"},t.prototype.beforeInputEvent=function(){return window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges?"beforeinput SelectionChange":"SelectionChange"},t.prototype.renderInline=function(){var e=this.props.tagName,t=void 0===e?"div":e;return o.createElement(t,{ref:this.elementRef,id:this.id,tabIndex:this.props.tabIndex})},t.prototype.renderIframe=function(){return o.createElement("textarea",{ref:this.elementRef,style:{visibility:"hidden"},name:this.props.textareaName,id:this.id,tabIndex:this.props.tabIndex})},t.prototype.getScriptSources=function(){var e,t,n=null===(e=this.props.scriptLoading)||void 0===e?void 0:e.async,o=null===(t=this.props.scriptLoading)||void 0===t?void 0:t.defer;if(void 0!==this.props.tinymceScriptSrc)return"string"==typeof this.props.tinymceScriptSrc?[{src:this.props.tinymceScriptSrc,async:n,defer:o}]:this.props.tinymceScriptSrc.map(function(e){return"string"==typeof e?{src:e,async:n,defer:o}:e});var r=this.props.cloudChannel,s=this.props.apiKey?this.props.apiKey:"no-api-key";return[{src:"https://cdn.tiny.cloud/1/".concat(s,"/tinymce/").concat(r,"/tinymce.min.js"),async:n,defer:o}]},t.prototype.getInitialValue=function(){return"string"==typeof this.props.initialValue?this.props.initialValue:"string"==typeof this.props.value?this.props.value:""},t.prototype.bindHandlers=function(e){var t=this;if(void 0!==this.editor){j(this.editor,e,this.props,this.boundHandlers,function(e){return t.props[e]});var n=function(e){return void 0!==e.onEditorChange||void 0!==e.value},o=n(e),r=n(this.props);!o&&r?(this.editor.on(this.changeEvents(),this.handleEditorChange),this.editor.on(this.beforeInputEvent(),this.handleBeforeInput),this.editor.on("keydown",this.handleBeforeInputSpecial),this.editor.on("keyup",this.handleEditorChangeSpecial),this.editor.on("NewBlock",this.handleEditorChange)):o&&!r&&(this.editor.off(this.changeEvents(),this.handleEditorChange),this.editor.off(this.beforeInputEvent(),this.handleBeforeInput),this.editor.off("keydown",this.handleBeforeInputSpecial),this.editor.off("keyup",this.handleEditorChangeSpecial),this.editor.off("NewBlock",this.handleEditorChange))}},t.propTypes=b,t.defaultProps={cloudChannel:"7"},t}(o.Component),M=r(6606),L=r(790);function P(e){const[t,n]=(0,o.useState)([]),[r,s]=(0,o.useState)("Path Not Set"),[i,a]=(0,o.useState)(e.manual),[l,c]=(0,o.useState)(e.project?e.project:""),[u,d]=(0,o.useState)(e.title),[f,m]=(0,o.useState)(e.display_time),[g,b]=(0,o.useState)(e.maxtime),v=(0,o.useRef)(null),y=(0,M.p)();function x(t){let n=t.replace(/([\s0-9]+)$/,""),o=n.replace(/ Level.+/,"");s(o),!e.manual&&n&&a(n)}function j(){let t={role:"Speaker",ID:e.assignment.ID,roleindex:e.roleindex,blockindex:e.blockindex,manual:i,project:l,title:u,intro:v.current.getContent(),start:e.attrs.start,maxtime:g,display_time:f,count:e.attrs.count};e.updateAssignment(t)}return(0,o.useEffect)(()=>{fetch(y.url+"rsvptm/v1/paths_and_projects",{headers:{"X-WP-Nonce":y.nonce}}).then(e=>e.json()).then(e=>{e.paths&&n(e)}),e.project&&x(e.project)},[]),(0,o.useEffect)(()=>{a(e.manual?e.manual:""),c(e.project?e.project:""),d(e.title?e.title:""),m(e.display_time?e.display_time:"5 - 7 minutes"),b(e.maxtime?e.maxtime:7),e.project?x(e.project):s("Path Not Set")},[e.assignment?.ID,e.manual,e.project,e.title,e.display_time,e.maxtime]),t&&void 0!==t.manuals?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("div",{children:(0,L.jsx)(h.k,{options:t.paths,value:r,label:"Path",onChange:e=>{s(e),j()}})}),(0,L.jsx)("div",{children:(0,L.jsx)(h.k,{options:t.manuals[r],value:i,label:"Level",onChange:e=>{a(e),j()}})}),(0,L.jsx)("div",{children:(0,L.jsx)(h.k,{options:t.projects[i]?t.projects[i]:[{value:"",label:"Set Path and Level to See Projects"}],value:l,label:"Project",onChange:e=>{c(e),function(e){let n=void 0===t.maxtime[e]?"7":t.maxtime[e];b(n),n=void 0===t.display_time[e]?"5 - 7 minutes":t.display_time[e],m(n)}(e)}})}),(0,L.jsxs)("div",{className:"tmflexrow",children:[(0,L.jsx)("div",{className:"tmflex50",children:(0,L.jsx)(p.TextControl,{label:"Display Time",onChange:e=>{m(e),j()},value:f})}),(0,L.jsx)("div",{className:"tmflex50",children:(0,L.jsx)(p.TextControl,{label:"Maximum Time Allowed",onChange:e=>{b(e),j()},value:g})})]}),(0,L.jsxs)("p",{children:[(0,L.jsx)("strong",{children:"Title"})," ",(0,L.jsx)(p.TextControl,{value:u,onChange:e=>{d(e)},onMouseLeave:()=>j()})]}),(0,L.jsxs)("p",{children:[(0,L.jsx)("strong",{children:"Intro"}),(0,L.jsx)(D,{onInit:(e,t)=>v.current=t,initialValue:e.intro,init:{height:100,menubar:!1,toolbar:"undo redo | bold italic | removeformat",content_style:"body { font-family:Helvetica,Arial,sans-serif; font-size:14px }"}})]}),(0,L.jsx)("p",{children:(0,L.jsx)("button",{className:"tmform",onClick:j,children:"Save"})})]}):(0,L.jsx)("p",{children:"Loading project choices"})}const I=window.wp.i18n;function F(e){console.log("OtherRoleTitle props",e);const[t,n]=(0,o.useState)(e.assignment.title);function r(){let n={...e.assignment,...e.attrs,roleindex:e.roleindex,blockindex:e.blockindex,title:t};e.updateAssignment(n)}return(0,M.p)(),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)("p",{children:[(0,L.jsx)("strong",{children:(0,I.__)("Note or Title","rsvpmaker-for-toastmasters")})," ",(0,L.jsx)(p.TextControl,{value:t,onChange:e=>{n(e)},onMouseLeave:()=>r()})]}),(0,L.jsx)("p",{children:(0,L.jsx)("button",{className:"tmform",onClick:r,children:(0,I.__)("Save","rsvpmaker-for-toastmasters")})})]})}var U=r(8662);function B(e){const t=(0,M.p)(),n=(0,o.useRef)(null),[r,s]=(0,o.useState)(0),[i,a]=(0,o.useState)("0"),[l,c]=(0,o.useState)(null);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(h.k,{label:"Member to Nominate",value:r,options:e.memberoptions,onChange:e=>{s(e)}}),(0,L.jsx)(D,{onInit:(e,t)=>n.current=t,initialValue:"I am nominating you for a role!",init:{height:100,menubar:!1,toolbar:"undo redo | bold italic | removeformat",content_style:"body { font-family:Helvetica,Arial,sans-serif; font-size:14px }"}}),(0,L.jsx)(p.RadioControl,{selected:i,label:"Send To",onChange:e=>a(e),options:[{label:"Member",value:"0"},{label:"Member + CC me",value:"1"},{label:"Me Only",value:"2"}]}),l&&(0,L.jsx)(L.Fragment,{children:(0,L.jsx)("div",{className:l.error?"tm-notification tm-notification-error suggestion-notification":"tm-notification tm-notification-success suggestion-notification",children:l.message})}),l&&l.rawHTML&&(0,L.jsx)("div",{className:"suggestion-preview",children:(0,L.jsx)(U.d,{innerHTML:l.rawHTML})}),(!l||l.error)&&(0,L.jsx)("p",{children:(0,L.jsx)("button",{className:"tmform",type:"primary",onClick:function(){if(r){if(n.current){let o=n.current.getContent();console.log(o+"from "+e.current_user_id+" to "+r+" for post "+e.post_id+" "+e.roletag);let s=t.url+"rsvptm/v1/tm_role?tm_ajax=role";const a=new FormData;a.append("role",e.roletag),a.append("user_id",r),a.append("editor_id",e.current_user_id),a.append("post_id",e.post_id),a.append("timelord",rsvpmaker_rest.timelord),a.append("suggest_note",o),a.append("ccme",i),fetch(s,{method:"POST",headers:{"X-WP-Nonce":t.nonce},body:a}).then(e=>e.json()).then(e=>{console.log(e),function(e,t=!1,n=""){c({message:e,error:t,rawHTML:n}),setTimeout(()=>{c(null)},15e3)}("Message sent",!1,e.content)})}}else c({message:"No recipient selected",error:!0})},children:"Send Suggestion"})})]})}var Q=r(5286),z=r(174),q=r(5148);const H=window.wp.element,V=(0,H.forwardRef)(function({icon:e,size:t=24,...n},o){return(0,H.cloneElement)(e,{width:t,height:t,...n,ref:o})}),W=window.wp.primitives,K=(0,o.createElement)(W.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},(0,o.createElement)(W.Path,{d:"M10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6zM10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6z"})),G=(0,o.createElement)(W.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)(W.Path,{d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21ZM15.5303 8.46967C15.8232 8.76256 15.8232 9.23744 15.5303 9.53033L13.0607 12L15.5303 14.4697C15.8232 14.7626 15.8232 15.2374 15.5303 15.5303C15.2374 15.8232 14.7626 15.8232 14.4697 15.5303L12 13.0607L9.53033 15.5303C9.23744 15.8232 8.76256 15.8232 8.46967 15.5303C8.17678 15.2374 8.17678 14.7626 8.46967 14.4697L10.9393 12L8.46967 9.53033C8.17678 9.23744 8.17678 8.76256 8.46967 8.46967C8.76256 8.17678 9.23744 8.17678 9.53033 8.46967L12 10.9393L14.4697 8.46967C14.7626 8.17678 15.2374 8.17678 15.5303 8.46967Z"})),Y=(0,o.createElement)(W.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(W.Path,{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),J=(0,o.createElement)(W.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(W.Path,{d:"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z"})),$=(0,o.createElement)(W.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,o.createElement)(W.Path,{d:"M14.103 7.128l2.26-2.26a4 4 0 00-5.207 4.804L5.828 15a2 2 0 102.828 2.828l5.329-5.328a4 4 0 004.804-5.208l-2.261 2.26-1.912-.512-.513-1.912zm-7.214 9.64a.5.5 0 11.707-.707.5.5 0 01-.707.707z"}));function X(e){const{agendadata:t,mode:n,showDetails:r,blockindex:s,setMode:i,setScrollTo:a,block:l,makeNotification:c,post_id:f,setEvaluate:m,setShowControls:g,data:b}=e,{assignments:v,attrs:y,attrs:{titlePrompt:x},memberoptions:j}=l,[w,k]=(0,o.useState)({item:null,mode:""}),_=(0,M.p)();if((0,o.useEffect)(()=>{_?.nonce&&(0,z.e)(_.nonce)},[_?.nonce]),!y||!y.role)return null;const C=(0,u.useQueryClient)(),{current_user_id:S,current_user_name:E,request_evaluation:A}=t,[T,O]=(0,o.useState)([].fill("",0,y.count)),{mutate:N}=(0,q.HZ)(c);if(!y.role)return null;function R(e){let n=!1;return t.permissions[e]&&(n=t.permissions[e]),n}let D="_role_"+y.role.replaceAll(/[^A-Za-z]/g,"_")+"_";const[I,U]=(0,o.useState)("");var H=y.start?parseInt(y.start):1;H||(H=1);let W=y.count?y.count:1,X=[],Z=[],ee=y.role,te=(0,d.A)(y.role,b);function ne(e,t=null,n=1,o=1){if(console.log("updateAssignment",e,t,n,o),Array.isArray(e)){const n=e.map(e=>({...e,post_id:f,count:o}));return re.mutate({assignments:n,blockindex:t,start:1})}e.post_id=f,oe.mutate(e)}const oe=(0,u.useMutation)(async e=>await z.A.post("json_assignment_post",e),{onMutate:async e=>{await C.cancelQueries(["blocks-data",f]);const t=C.getQueryData(["blocks-data",f]);return C.setQueryData(["blocks-data",f],t=>{if(!t?.data?.blocksdata)return t;const{blockindex:n,roleindex:o}=e;console.log("assignmentMutation setQueryData blockindex / roleindex",n,o);const{data:r}=t,s=r.blocksdata.map((t,r)=>{if(r!==n)return t;const s=Array.isArray(t.assignments)?[...t.assignments]:[];return s[o]=e,{...t,assignments:s}});return{...t,data:{...r,blocksdata:s}}}),c((0,d.A)("Updating ...",b)),{previousData:t}},onSettled:(e,t,n,o)=>{C.invalidateQueries(["blocks-data",f])},onSuccess:(e,t,n,o)=>{e.data.taken?c("Role already taken: "+e.data.taken):c("Updated assignment: "+e.data.role,!0)},onError:(e,t,n)=>{console.log((0,d.A)("Mutate assignment error",b),e),C.setQueryData(["blocks-data",f],n.previousData),c((0,d.A)("Error updating assignment ",b)+e.message)}}),re=(0,u.useMutation)(async e=>await z.A.post("json_multi_assignment_post",e),{onMutate:async e=>{await C.cancelQueries(["blocks-data",f]);const t=C.getQueryData(["blocks-data",f]);return C.setQueryData(["blocks-data",f],t=>{if(!t?.data?.blocksdata)return t;const{blockindex:n}=e,{data:o}=t,r=o.blocksdata.map((t,o)=>o!==n?t:{...t,assignments:[...e.assignments]});return{...t,data:{...o,blocksdata:r}}}),c((0,d.A)("Updating ...",b)),{previousValue:t}},onSettled:(e,t,n,o)=>{C.invalidateQueries(["blocks-data",f])},onSuccess:(e,t,n,o)=>{c((0,d.A)("Updated",e))},onError:(e,t,n)=>{c((0,d.A)("Error updating assignments ",b)+e.message),C.setQueryData(["blocks-data",f],n.previousValue)}});function se(e,t){let n=v[e];n.role=y.role;let o=[];v.forEach((r,s)=>{r.role=y.role,s==t&&t<e?(o.push(n),o.push(r)):s==t&&t>e?(o.push(r),o.push(n)):s!=e&&o.push(r)}),ne(o,s,H,W),function(e){if(e){var t=document.getElementById(e);t&&t.scrollIntoView({behavior:"smooth"},!0)}}("block"+s)}function ie(){let e=[],t=[];v.forEach((n,o)=>{n.role=y.role,0!=n.ID&&"0"!=n.ID?e.push(n):t.push(n)}),t.forEach(t=>{e.push(t)}),ne(e,s,H,W)}function ae(e){let t=j.find(t=>{if(t.value==e)return t});return t?.value}function le(e){const{assignments:t,roleindex:n,filledslots:o,openslots:r,attrs:s,shownumber:i}=e;let a=!1;return o.length>0&&r.length>0&&o[o.length-1]>r[0]&&(a=!0),(0,L.jsxs)("p",{children:[(0,L.jsx)("span",{className:"moveup",children:t.length>1&&n>0&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("button",{className:"tmform",onClick:()=>{se(n,0)},children:(0,L.jsx)(Q.Ej,{type:s.role+" "+i})}),(0,L.jsx)("button",{className:"tmform",onClick:()=>{se(n,n-1)},children:(0,L.jsx)(Q.Up,{type:s.role+" "+i})})]})}),(0,L.jsx)("span",{className:"movedown",children:t.length>1&&n<t.length-1&&s.role.search("Backup")<0&&(0,L.jsx)("button",{className:"tmform",onClick:()=>{se(n,n+1)},children:(0,L.jsx)(Q.RU,{type:s.role+" "+i})})}),(0,L.jsx)("span",{className:"closegaps",children:a&&(0,L.jsx)("button",{className:"tmform",onClick:ie,children:(0,L.jsx)(Q.bm,{})})})]})}return(0,L.jsx)(L.Fragment,{children:v&&Array.isArray(v)&&v.map((t,o)=>{"0"==t.ID||0==t.ID?X.push(o):Z.push(o);let l=y.count&&y.count>1||H>1?"#"+(o+H):"";if(o==W)te=(0,d.A)("Backup ",b)+ee,l="";else if(o>W)return null;let c="role"+y.role.replaceAll(/[^A-z]/g,"")+o;if("assign"==n)return(0,L.jsx)("div",{id:c,className:"assignment",children:(0,L.jsx)("div",{className:"assignment-assigned",children:(0,L.jsx)(h.k,{label:te+" "+l,value:t.ID,options:j,onChange:e=>{ne("Speaker"==ee?{ID:e,name:ae(e),role:ee,roleindex:o,blockindex:s,start:H,count:W,manual:"",title:"",project:"",intro:"",maxtime:7,display_time:"5 - 7 minutes"}:{ID:e,name:ae(e),role:ee,roleindex:o,blockindex:s,start:H,count:W,display:"inline",width:""})}})})},c);let u=S==t.ID,f=0==t.ID||"0"==t.ID||""==t.ID;return(0,L.jsxs)("div",{id:c,children:[(0,L.jsxs)("div",{className:"roleheader",children:[(0,L.jsxs)("div",{className:"role-buttons",children:[f&&(0,L.jsxs)("button",{className:"agenda-tooltip",onClick:function(e){"Speaker"==ee&&ne({ID:S,name:E,role:ee,roleindex:o,blockindex:s,start:H,count:W,maxtime:7,display_time:"5 - 7 minutes",wasopen:!0}),ne({ID:S,name:E,role:ee,roleindex:o,blockindex:s,start:H,count:W,wasopen:!0})},children:[(0,L.jsx)("span",{class:"agenda-tooltip-text",children:(0,d.A)("Take Role",b)}),(0,L.jsx)(V,{icon:K})]}),u&&(0,L.jsxs)("button",{onClick:function(e){ne("Speaker"==ee?{ID:0,name:"",role:ee,blockindex:s,roleindex:o,start:H,count:W,intro:"",title:"",manual:"",project:"",maxtime:7,display_time:"5 - 7 minutes"}:{ID:0,name:"",role:ee,blockindex:s,roleindex:o,start:H,count:W})},className:"agenda-tooltip",children:[(0,L.jsx)("span",{class:"agenda-tooltip-text",children:(0,d.A)("Cancel",b)}),(0,L.jsx)(V,{icon:G})]}),(f||u)&&(0,L.jsxs)("button",{className:"agenda-tooltip",onClick:()=>{u&&ne("Speaker"==ee?{ID:0,name:"",role:ee,blockindex:s,roleindex:o,start:H,count:W,intro:"",title:"",manual:"",project:"",maxtime:7,display_time:"5 - 7 minutes"}:{ID:0,name:"",role:ee,blockindex:s,roleindex:o,start:H,count:W}),a(c),i("suggest")},children:[(0,L.jsx)("span",{class:"agenda-tooltip-text",children:(0,d.A)("Suggest",b)}),(0,L.jsx)(V,{icon:Y})]}),(R("edit_post")||R("organize_agenda")||R("edit_signups"))&&(0,L.jsxs)("button",{className:"agenda-tooltip",onClick:()=>{k({item:o,mode:"edit"})},children:[(0,L.jsx)("span",{class:"agenda-tooltip-text",children:(0,d.A)("Edit",b)}),(0,L.jsx)(V,{icon:J})]}),(R("edit_post")||R("organize_agenda"))&&(0,L.jsxs)("button",{className:"agenda-tooltip",onClick:()=>{g(s)},children:[(0,L.jsx)("span",{class:"agenda-tooltip-text",children:(0,d.A)("Organize",b)}),(0,L.jsx)(V,{icon:$})]})]}),(0,L.jsxs)("h3",{className:"role-label",children:[t.avatar&&(0,L.jsx)("div",{style:{float:"left",marginRight:"10px"},children:(0,L.jsx)("img",{src:t.avatar,className:"tm_avatar",alt:t.name})})," ",te," ",l," ",t.name]})]}),y.agenda_note&&(0,L.jsx)("p",{children:(0,L.jsx)("em",{children:y.agenda_note})}),(0,L.jsx)(L.Fragment,{children:"suggest"==n&&(u||f)&&(0,L.jsx)(B,{memberoptions:j,roletag:D+(o+1),post_id:e.post_id,current_user_id:S})}),(0,L.jsx)(L.Fragment,{children:("edit"==n||"edit"==w.mode&&w.item==o)&&(0,L.jsx)(h.k,{label:(0,d.A)("Select Member",b),value:t.ID,options:j,onChange:e=>{ne("Speaker"==ee?{ID:e,name:ae(e),role:ee,roleindex:o,blockindex:s,start:H,count:W,manual:"",title:"",project:"",intro:"",maxtime:7,display_time:"5 - 7 minutes"}:{ID:e,name:ae(e),role:ee,roleindex:o,blockindex:s,start:H,count:W})}})}),(0,L.jsx)(L.Fragment,{children:"Guest"==t.ID&&(0,L.jsxs)("div",{className:"tmflexrow",children:[(0,L.jsx)("div",{className:"tmflex30",children:(0,L.jsx)(p.TextControl,{label:(0,d.A)("Guest Name",b),value:T[o],onChange:e=>{let t=[...T];t[o]=e,O(t)}})}),(0,L.jsxs)("div",{className:"tmflex30",children:[(0,L.jsx)("br",{}),(0,L.jsx)("button",{className:"tmform",onClick:()=>{ne({ID:T[o],name:T[o]+" (guest)",role:ee,roleindex:o,blockindex:s,start:H,count:W});let e=[...T];e[o]="",O(e)},children:(0,d.A)("Add",b)})]})]})}),(0,L.jsx)(L.Fragment,{children:"suggest"!=n&&("edit"==n||"edit"==w.mode&&w.item==o||S==t.ID)&&(t.ID>0||"string"==typeof t.ID&&""!=t.ID)&&ee.includes("Speaker")&&0==ee.includes("Backup")&&r&&(0,L.jsx)(P,{attrs:y,assignment:t,project:t.project,title:t.title,intro:t.intro,manual:t.manual,maxtime:t.maxtime,display_time:t.display_time,updateAssignment:ne,roleindex:o,blockindex:s},"projectchooser-"+s+"-"+o+"-"+t.ID)}),(0,L.jsx)(L.Fragment,{children:x&&("edit"==n||"edit"==w.mode&&w.item==o||S==t.ID)&&r&&(0,L.jsx)(F,{role:ee,attrs:y,assignment:t,title:t.title,updateAssignment:ne,roleindex:o,blockindex:s})}),(0,L.jsx)(L.Fragment,{children:!("edit"!=n)&&v.length>1&&(0,L.jsx)(le,{assignments:v,roleindex:o,filledslots:Z,openslots:X,attrs:y,shownumber:l})}),t.ID>0&&"Speaker"==y.role&&(0,L.jsxs)("div",{className:"evaluation-request",children:[(0,L.jsx)("a",{href:t.evaluation_link,onClick:e=>{e.preventDefault(),m(t),i("evaluation")},children:(0,d.A)("Evaluation Form",b)})," ",(0,L.jsxs)("span",{style:{fontSize:"10px"},children:["(",(0,d.A)("copy-paste text below to share",b),")"]}),(0,L.jsx)("br",{}),(0,L.jsx)("textarea",{rows:"3",style:{fontSize:"8px"},value:(0,d.A)("Evaluation link for ",b)+t.name+"\n"+t.evaluation_link})]})]},c)})})}function Z(e){const{attrs:t,assignments:n,makeNotification:r,data:s}=e.block,[i,a]=(0,o.useState)(!1);if("Speaker"!=t.role)return null;const{time_allowed:l,count:c}=t,u=l?(0,d.A)(" out of ",s)+l+(0,d.A)(" allowed",s):"";let h=0;return Array.isArray(n)&&n.forEach((e,t)=>{e.ID&&t<c&&(h+=parseInt(e.maxtime))}),h?h>l?(i||(p=(0,d.A)("Speakers have reserved ",s)+h+(0,d.A)(" minutes",s)+u+(0,d.A)(". Meeting organizers may change the time allowed for different parts of the meeting on the Organize tab.",s),r&&(setTimeout(()=>{r(p)},1e3),a(!0))),(0,L.jsx)("div",{children:(0,L.jsxs)("p",{className:"speakertime speakertime-warning",children:[(0,d.A)("Speakers have reserved ",s),h,u]})})):(0,L.jsx)("div",{children:(0,L.jsxs)("p",{className:"speakertime",children:[(0,d.A)("Speakers have reserved ",s),h,u]})}):null;var p}var ee=r(1083);const te=()=>{const e=(0,M.p)();return ee.A.create({baseURL:"/wp-json/rsvpmaker/v1/",headers:{"Content-type":"application/json","X-WP-Nonce":e.nonce}})};function ne(e){console.log("downloaded rsvp data",e)}function oe(e){console.log("error downloading rsvp data",e)}async function re(e){return await te.post("json_meta?post_id="+e.post_id,e)}function se(e){const{data:t,user_can:n,setPostId:r,makeNotification:s}=e,[i,a]=(0,o.useState)(t.subscribers_can_organize_agenda),[l,c]=(0,o.useState)(t.subscribers_can_edit_signups),[d,f]=(0,o.useState)(t.newSignupDefault),[m,g]=(0,o.useState)(t.is_template?t.post_id:t.has_template),[b,v]=(0,o.useState)(0),y=(0,M.p)();(0,o.useEffect)(()=>{y?.nonce&&(0,z.e)(y.nonce)},[y?.nonce]);const{data:x,isLoading:j,isError:w}=(k=t.post_id,(0,u.useQuery)(["rsvp-meta",k],function(e){return te().get("json_meta?post_id="+k)},{enabled:!0,retry:2,onSuccess:ne,onError:oe,refetchInterval:5e4}));var k;if(w)return(0,L.jsx)("p",{children:"Error loading event metadata"});if(j)console.log("metadata is loading");else if(x.data){const e=x.data;console.log("metadata",e)}else s("error loading event metadata");const{mutate:_}=function(e,t){const n=(0,u.useQueryClient)();return(0,u.useMutation)(re,{onMutate:async o=>{await n.cancelQueries(["rsvp-meta",e]);const r=n.getQueryData(["rsvp-meta",e]);return n.setQueryData(["rsvp-meta",e],e=>{const{data:t}=e;return o.kv.forEach(e=>{t[e.key]=e.value}),{...e,data:t}}),t("Updating ..."),{previousValue:r}},onSettled:(o,r,s,i)=>{n.invalidateQueries(["rsvp-meta",e]),t("Updated")},onError:(t,o,r)=>{console.log("mutate rsvpmaker meta error",t),n.setQueryData(["rsvp-meta",e],r.previousValue)}})}(t.post_id,s);let C=t.upcoming.filter(e=>{if(e.label.indexOf("emplate")>0)return!0});C.push({value:0,label:"Choose Template"});const S=(0,u.useQueryClient)(),E=(0,u.useMutation)(async e=>await z.A.post("json_copy_post",e),{onSuccess:(e,t,n,o)=>{e.data.blockdata&&S.setQueryData(["blocks-data",e.data.post_id],t=>({...t,data:e.data})),S.invalidateQueries(["blocks-data",e.data.post_id])},onError:(e,t,n)=>{console.log("mutate template error",e),s("Error "+e.message)}}),A=(0,u.useMutation)(async e=>await z.A.post("json_agenda_permissions",e),{onSuccess:(e,t,n,o)=>{console.log("permissions update",e),s("Permissions update: "+e.data.status)},onError:(e,t,n)=>{s("Error "+e.message),console.log("mutate template error",e)}}),T=document.getElementById("loading-icon");return T&&(T.style="display: none"),(0,L.jsxs)("div",{children:[(0,L.jsx)("h2",{children:"Template Options and Settings"}),(0,L.jsxs)("p",{children:["Currently editing ",(0,L.jsx)("em",{children:function(){let e="an event without a template";return t.has_template?e="an event based on a template":t.is_template&&(e="a template"),e}()})]}),(0,L.jsx)(h.k,{label:"Edit Template",value:m,options:C,onChange:e=>g(parseInt(e))}),(0,L.jsx)("p",{children:(0,L.jsx)("button",{className:"tmform",onClick:()=>{s("Updating ..."),r(m)},children:"Edit"})}),(0,L.jsx)(L.Fragment,{children:t.has_template&&(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{children:(0,L.jsx)("button",{className:"tmform",onClick:()=>{let e={copyfrom:t.post_id,copyto:t.has_template,post_id:t.post_id};E.mutate(e),s("Template "+t.has_template+" updated.",!1,[{template_prompt:t.has_template}])},children:"Update Template"})}),(0,L.jsx)("p",{children:(0,L.jsx)("em",{children:"Click to apply changes you have made to this agenda document to the underlying template."})})]})}),(0,L.jsx)(L.Fragment,{children:t.is_template&&(0,L.jsxs)("p",{children:[(0,L.jsx)("a",{target:"_blank",href:"/wp-admin/edit.php?post_type=rsvpmaker&page=rsvpmaker_template_list&t="+t.post_id,children:"Create/Update"})," - copy content to new and existing events"]})}),(0,L.jsx)(L.Fragment,{children:t.has_template&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(h.k,{label:"Apply a Different Template",value:b,options:C,onChange:e=>v(e)}),(0,L.jsxs)("p",{children:[(0,L.jsx)("button",{className:"tmform",onClick:()=>{s("Updating ...");let e={copyfrom:b,copyto:t.post_id,post_id:t.post_id};E.mutate(e)},children:"Apply"})," ",(0,L.jsx)("em",{children:"Use a different template, such as one for a contest."})]})]})}),(0,L.jsx)(L.Fragment,{children:n("manage_options")&&(0,L.jsxs)("div",{className:"adminonly",children:[(0,L.jsx)("h3",{children:"Administrator Only Options"}),(0,L.jsx)(p.ToggleControl,{label:"All Members Can Edit Signups",help:1==l?"Allowed":"Prohibited",checked:l,onChange:()=>{let e=!l;c(e),A.mutate({key:"edit_signups",value:e})}}),(0,L.jsx)(p.ToggleControl,{label:"All Members Can Organize Agenda",help:1==i?"Allowed":"Prohibited",checked:i,onChange:()=>{let e=!i;a(e),A.mutate({key:"organize_agenda",value:e})}}),(0,L.jsx)("p",{children:(0,L.jsx)("em",{children:"You can decide whether in addition to signing up for roles, members are able to edit assignments for others or insert/delete/move roles and content blocks on the agenda."})})]})}),!t.is_template&&(0,L.jsx)("p",{children:(0,L.jsx)("a",{href:t.editor+"&tab=basics",target:"_blank",children:"Edit Date, Time, and RSVP settings"})}),t.is_template&&(0,L.jsx)("p",{children:(0,L.jsx)("a",{href:t.editor+"&tab=basics",target:"_blank",children:"Edit Template Schedule and RSVP settings"})}),(0,L.jsx)("p",{children:(0,L.jsx)("a",{href:t.editor,target:"_blank",children:"Open in WordPress Editor"})})]})}function ie(e){const t=(0,o.useRef)(null),{block:n,blockindex:r,replaceBlock:s,data:i}=e;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("h4",{children:(0,d.A)("Agenda Note",i)}),(0,L.jsx)(D,{onInit:(e,n)=>t.current=n,initialValue:n.innerHTML,init:{height:100,menubar:!1,toolbar:"undo redo | bold italic | removeformat",content_style:"body { font-family:Helvetica,Arial,sans-serif; font-size:14px }"}}),(0,L.jsx)("p",{children:(0,L.jsx)("button",{className:"tmform",onClick:function(){n.innerHTML=t.current.getContent(),s(r,n)},children:(0,d.A)("Update",i)})}),(0,L.jsx)("p",{children:(0,L.jsx)("em",{children:(0,d.A)('Agenda notes are the "stage directions" for your meeting. For elements like meeting theme that change from meeting to meeting, use an Editable Note instead.',i)})})]})}function ae(e){const t=(0,o.useRef)(null),{post_id:n,block:r,makeNotification:s,insertBlock:i,blockindex:a,setInsert:l}=e,[c,d]=(0,o.useState)(r.attrs),[h,f]=(0,o.useState)(!1),{mutate:m}=(0,q.cV)(n,s),g=(0,q._o)(n,a),b=(0,M.p)();(0,o.useEffect)(()=>{b?.nonce&&(0,z.e)(b.nonce)},[b?.nonce]);const v=(0,u.useQueryClient)(),y=(0,u.useMutation)(e=>{z.A.post("editable_note_json",e)},{onMutate:async e=>{await v.cancelQueries(["blocks-data",n]);const t=v.getQueryData(["blocks-data",n]);return v.setQueryData(["blocks-data",n],t=>{const{data:n}=t,{blocksdata:o}=n;return o[a].edithtml=e.note,{...t,data:{...n,blocksdata:o}}}),s("Updating ..."),f(!0),{previousData:t}},onError:(e,t,o)=>{s("Error updating editable note "+e.message),console.log("error updating editable note",e),v.setQueryData(["blocks-data",n],o)},onSettled:(e,t,n,o)=>{v.invalidateQueries(["blocks-data",n.post_id])},onSuccess:(e,t,n,o)=>{s("Updated")}});return h||!["edit","reorganize"].includes(e.mode)&&!i?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("h3",{children:c.editable}),(0,L.jsx)(U.d,{innerHTML:r.edithtml}),h&&("edit"==e.mode||i)&&(0,L.jsx)("p",{children:(0,L.jsx)("button",{onClick:()=>f(!1),children:"Edit"})})]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("h3",{children:c.editable}),(0,L.jsx)("p",{children:(0,L.jsx)(p.TextControl,{label:"heading",value:c.editable,onChange:e=>{d(t=>({...t,editable:e}))}})}),(0,L.jsx)(D,{onInit:(e,n)=>t.current=n,initialValue:r.edithtml,init:{height:100,menubar:!1,toolbar:"undo redo | bold italic | removeformat",content_style:"body { font-family:Helvetica,Arial,sans-serif; font-size:14px }"}}),(0,L.jsx)(L.Fragment,{children:i&&(0,L.jsx)("div",{className:"tmflexrow",children:(0,L.jsx)("div",{className:"tmflex30",children:(0,L.jsx)(p.__experimentalNumberControl,{label:"Time Allowed",value:c.time_allowed,onChange:e=>{d(t=>({...t,time_allowed:e}))}})})})}),(0,L.jsx)("p",{children:(0,L.jsx)("button",{className:"tmform",onClick:function(){if(i)d(e=>({...e,uid:Date.now()})),i(a,c,"wp4toastmasters/agendaedit","",t.current.getContent()),l("");else{const n=g("editable",c.editable);m(n);const o={note:t.current.getContent(),uid:c.uid,post_id:e.post_id,editable:c.editable};y.mutate(o)}},children:"Update"})}),(0,L.jsx)("p",{children:(0,L.jsx)("em",{children:"Editable notes are for content that changes from meeting to meeting, such as a meeting theme."})})]})}function le(e){const t=(0,o.useRef)(null),{block:n,blockindex:r,replaceBlock:s}=e;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("h4",{children:"Signup Form Note"}),(0,L.jsx)(D,{onInit:(e,n)=>t.current=n,initialValue:n.innerHTML,init:{height:100,menubar:!1,toolbar:"undo redo | bold italic | removeformat",content_style:"body { font-family:Helvetica,Arial,sans-serif; font-size:14px }"}}),(0,L.jsx)("p",{children:(0,L.jsx)("button",{className:"tmform",onClick:function(){n.innerHTML=t.current.getContent(),s(r,n)},children:"Update"})}),(0,L.jsx)("p",{children:(0,L.jsx)("em",{children:"Signup notes are instructions for the signup form. They are not included on the print, view, or email versions of the agenda."})})]})}function ce(e){const[t,n]=(0,o.useState)(!1),{blockindex:r,moveBlock:s,data:i}=e;return(0,L.jsxs)(L.Fragment,{children:[!t&&(0,L.jsx)("p",{children:(0,L.jsxs)("button",{className:"blockmove deletebutton",onClick:()=>{n(!0)},children:[(0,L.jsx)(Q.ep,{})," Delete"]})})," ",t&&(0,L.jsx)("p",{children:(0,L.jsxs)("button",{className:"blockmove",onClick:()=>{s(r,"delete",i)},children:[(0,L.jsx)(Q.ep,{})," Confirm Delete"]})})," "]})}function ue(e){const[t,n]=(0,o.useState)(null),[r,s]=(0,o.useState)([]),{blockindex:i,insertBlock:a,moveBlock:l,post_id:c,workingdata:d,makeNotification:f}=e,m=((0,u.useQueryClient)(),(0,M.p)());(0,o.useEffect)(()=>{m?.nonce&&(0,z.e)(m.nonce)},[m?.nonce]);const{isLoading:g,isSuccess:b,isError:v,data:y,error:x,refetch:j}=(0,u.useQuery)("rolelist",function(){return z.A.get("roles_list")},{enabled:!0,retry:2,onSuccess:function(e){s(e.data)},onError:function(e){console.log("inserter mutate error",e)}});if(v)return(0,L.jsx)("p",{children:"Error loading Inserter.js roledata"});const w=[{label:"Select Note or Other Block",value:""},{label:"Agenda Note (same week-to-week)",value:"wp4toastmasters/agendanoterich2"},{label:"Editable Note (changes week to week)",value:"wp4toastmasters/agendaedit"},{label:"Signup Note",value:"wp4toastmasters/signupnote"},{label:"Speaker/Evaluator Table",value:"wp4toastmasters/speaker-evaluator"},{label:"Track Absences",value:"wp4toastmasters/absences"}];function k(){const[e,t]=(0,o.useState)("");return(0,L.jsxs)("div",{className:"insert-selects",children:[(0,L.jsxs)("div",{children:[(0,L.jsx)(h.k,{label:"Insert Role",options:r,onChange:e=>{"custom"==e?t("custom"):_("wp4toastmasters/role","Speaker"==e?{role:"Speaker",time_allowed:7}:"Evaluator"==e?{role:"Evaluator",time_allowed:3}:{role:e,time_allowed:0})}}),e&&(0,L.jsxs)("div",{children:[(0,L.jsx)(p.TextControl,{label:"Custom Label",value:e,onChange:t})," ",(0,L.jsx)("button",{className:"blockmove",onClick:()=>_("wp4toastmasters/role",{role:"custom",custom_role:e,time_allowed:0}),children:"Add"})]})]}),(0,L.jsx)("div",{children:(0,L.jsx)(h.k,{label:"Insert Other",options:w,onChange:e=>{_(e)}})})]})}function _(e,t=null){if("wp4toastmasters/role"==e)a(i,t,e,"","",d),e="";else if("wp4toastmasters/agendaedit"==e)a(i,{time_allowed:0,uid:"note"+Date.now(),editable:"New editable note"},e,"",d),e="";else if("wp4toastmasters/agendanoterich2"==e){const t=prompt("Message for note?");a(i,{time_allowed:0,uid:"note"+Date.now()},e,'<p class="wp-block-wp4toastmasters-agendanoterich2">'+t+"</p>",d),e=""}else"wp4toastmasters/signupnote"==e?(a(i,{uid:"note"+Date.now()},e,'<p class="wp-block-wp4toastmasters-signupnote">new signup form note</p>',d),e=""):"wp4toastmasters/absences"==e?(a(i,{show_on_agenda:"1"},e,"",d),e=""):(a(i,{},e,d),e="");n(e)}return(0,L.jsx)(k,{})}function de(e){const{data:t,mode:n,post_id:r,makeNotification:s,ModeControl:i,showDetails:a,setMode:l,setScrollTo:c,setEvaluate:u,setPostId:d}=e,[f,m]=(0,o.useState)(!0),[g,b]=(0,o.useState)(-1),{mutate:v}=(0,q.cV)(r,s,ue),{mutate:y}=(0,q.tP)(r,t.has_template);if("reorganize"!=n)return null;function x(e){let t=0,n=e.count?e.count:1;return"Speaker"==e.role&&(t=7*n),"Evaluator"==e.role&&(t=3*n),t}function j(){let e=[];return t.blocksdata&&Array.isArray(t.blocksdata)&&t.blocksdata.map((t,n)=>{e.push(n)}),e}function w(e,n="up"){if(0==e&&"up"==n)return;let o=j(),r=parseInt(n),s=o.indexOf(e);if("up"==n?r=o[s-1]:"down"==n&&(r=o[s+2]),"delete"==n)t.blocksdata.splice(e,1);else{let n=t.blocksdata[e];t.blocksdata[e]={blockName:null},t.blocksdata.splice(r,0,n)}t.changed="blocks",v(t)}function k(e,n={},o="wp4toastmasters/role",r="",s=""){let i=[];Array.isArray(t.blocksdata)&&t.blocksdata.forEach((t,a)=>{i.push(t),a==e&&i.push({blockName:o,assignments:[],attrs:n,innerHTML:r,edithtml:s})}),t.blocksdata=i,v(t)}function _(e,n){let o=[];t.blocksdata.forEach((t,r)=>{r==e?o.push(n):o.push(t)}),t.blocksdata=o,v(t)}function C(e){let t=e.replaceAll(/<[^>]+>/g," ");return t=t.trim(),t.length>60&&(t=t.substring(0,60)+"..."),t}let S=new Date(t.datetime);const E=S.toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"});let A="";t.blocksdata&&Array.isArray(t.blocksdata)&&t.blocksdata.map((e,n)=>{t.blocksdata[n].datestring=S.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}),e?.attrs?.time_allowed&&(S.setMilliseconds(S.getMilliseconds()+6e4*parseInt(e.attrs.time_allowed)),e.attrs.padding_time&&S.setMilliseconds(S.getMilliseconds()+6e4*parseInt(e.attrs.padding_time)),A=S.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}),t.blocksdata[n].datestring=t.blocksdata[n].datestring.concat(" to "+A))}),j();let T,O=[{label:"Where to?",value:""},{label:"Move to Top",value:"top"}],N="";function R(){return(0,L.jsx)("button",{class:"tmsmallbutton",onClick:()=>{t.copyToTemplate=!0,v(t)},children:"Apply to All"})}return t.blocksdata&&Array.isArray(t.blocksdata)&&t.blocksdata.map((e,t)=>{if(!e.blockName)return null;N="After: "+e.blockName.replace(/^[^/]+\//,"").replace("agendanoterich2","agenda note"),e.attrs.role&&(N=N.concat(" "+e.attrs.role)),e.attrs.editable&&(N=N.concat(" "+e.attrs.editable)),e.innerHTML&&(N=N.concat(" "+C(e.innerHTML))),N.length>60&&(N=N.substring(0,60)+"..."),O.push({value:t,label:N})}),(0,L.jsxs)("div",{className:"agendawrapper",id:"agendawrapper"+r,children:[(0,L.jsx)(L.Fragment,{children:"rsvpmaker"!=wpt_rest.post_type&&(0,L.jsx)(h.k,{label:"Choose Event",value:r,options:t.upcoming,onChange:e=>{d(parseInt(e)),s("Date changed, please wait for the date to change ..."),queryClient.invalidateQueries(["blocks-data",r]),refetch()}})}),(0,L.jsxs)("h4",{children:[E," ",t.is_template&&(0,L.jsx)("span",{children:"(Template)"})," "]}),t.has_template&&(0,L.jsxs)("div",{children:[(0,L.jsxs)("p",{children:["By default, changes you make below will apply ",(0,L.jsx)("em",{children:"only"})," to a single meeting."]}),(0,L.jsxs)("p",{children:[(0,L.jsx)(R,{}),(0,L.jsx)("br",{}),(0,L.jsx)("em",{children:"Click to copy the agenda changes you have made to all upcoming meetings based on the same template. The template will also be updated."})]})]}),t.is_template&&(0,L.jsxs)("p",{children:[(0,L.jsx)("a",{target:"_blank",href:"/wp-admin/edit.php?post_type=rsvpmaker&page=rsvpmaker_template_list&t="+t.post_id,children:"Create/Update"})," - copy changes to new and existing events"]}),(0,L.jsx)(i,{note:"Based on time allotted, meeting will end at "+A,makeNotification:s,isTemplate:!1!==t.is_template,post_id:t.post_id}),t.blocksdata&&Array.isArray(t.blocksdata)&&t.blocksdata.map((e,o)=>e.blockName&&("speakers-evaluators"!=a||"wp4toastmasters/role"==e.blockName&&["Speaker","Evaluator"].includes(e.attrs.role))&&("timed"!=a||e.attrs.time_allowed)?(T=[],O.forEach(e=>{e.value!=o&&T.push(e)}),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)("div",{className:"reorgdrag",children:[(0,L.jsx)("div",{className:"reorgdragup",children:(0,L.jsx)("button",{className:"blockmove",onClick:()=>{w(o,"up")},children:(0,L.jsx)(Q.Up,{})})}),(0,L.jsxs)("div",{className:"reorgdragdown",children:[(0,L.jsx)("button",{className:"blockmove",onClick:()=>{w(o,"down")},children:(0,L.jsx)(Q.RU,{})})," "]}),(0,L.jsxs)("div",{className:"reorganize-drag",children:[(0,L.jsx)("div",{children:(0,L.jsx)("strong",{children:e.datestring})}),(0,L.jsxs)("h2",{children:[e.blockName.replace(/^[^/]+\//,"").replace("agendanoterich2","agenda note"),": ",e.attrs.role&&(0,L.jsx)("span",{children:e.attrs.role})," ",e.attrs.editable&&(0,L.jsx)("span",{children:e.attrs.editable})," ",e.innerHTML&&(0,L.jsx)("span",{children:C(e.innerHTML)})]})]}),a&&"wp4toastmasters/help"==e.blockName&&(0,L.jsxs)("p",{children:["See the knowledge base article ",(0,L.jsx)("a",{href:"https://www.wp4toastmasters.com/knowledge-base/organize-agenda-tool/",children:"Organize Agenda Tool"})," for video and written instructions."]}),a&&"wp4toastmasters/speaker-evaluator"==e.blockName&&(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{children:"Displays Speaker-Evaluator Matches in a table on the printable and email versions of the agenda."}),(0,L.jsx)(p.RadioControl,{label:"Columns",selected:e.attrs?.columns,options:[{label:"2 columns",value:"2"},{label:"Separate columns for Speaker, Path, Project, Title",value:"5"}],onChange:e=>{t.blocksdata[o].attrs.columns=e,v(t)}})]}),a&&"wp4toastmasters/role"==e.blockName&&(0,L.jsxs)("div",{children:[g==o&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(p.ToggleControl,{label:"Edit",checked:g==o,onChange:()=>{b(g==o?-1:o)}}),(0,L.jsx)(X,{makeNotification:s,showDetails:a,agendadata:t,post_id:r,blockindex:o,mode:"edit",block:e,setMode:l,setScrollTo:c,setEvaluate:u})]}),g!=o&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(p.ToggleControl,{label:"Edit",checked:g==o,onChange:()=>{b(g==o?-1:o)}}),e.assignments&&Array.isArray(e.assignments)&&e.assignments.map(e=>(0,L.jsx)("div",{children:e.name}))]}),(0,L.jsx)(Z,{block:e,makeNotification:s,data:t}),(0,L.jsxs)("div",{className:"tmflexrow",children:[(0,L.jsx)("div",{className:"tmflex30",children:(0,L.jsx)(h.h,{label:"Signup Slots",min:"1",value:e.attrs.count?e.attrs.count:1,onChange:n=>{var r,s;n=Math.abs(parseInt(n)),t.blocksdata[o].attrs.count=n,["Speaker","Evaluator"].includes(e.attrs.role)&&(t.blocksdata[o].attrs.time_allowed=x(e.attrs),t.blocksdata=(r=t.blocksdata,s=n,f?(r.forEach((e,t)=>{"Evaluator"==e.attrs.role&&(r[t].attrs.count=s,r[t].attrs.time_allowed=3*s)}),r):r)),v(t)}})}),(0,L.jsx)("div",{className:"tmflex30",children:(0,L.jsx)(h.h,{label:"Time Allowed",value:e.attrs?.time_allowed?e.attrs?.time_allowed:x(e.attrs),onChange:e=>{t.blocksdata[o].attrs.time_allowed=e,v(t)}})})," ","Speaker"==e.attrs.role&&(0,L.jsx)("div",{className:"tmflex30",children:(0,L.jsx)(h.h,{label:"Padding Time",min:"0",value:e.attrs.padding_time,onChange:e=>{t.blocksdata[o].attrs.padding_time=e,v(t)}})})]}),(0,L.jsx)(p.TextControl,{label:"Note About Role (optional)",value:e.attrs.agenda_note,onChange:e=>{t.blocksdata[o].attrs.agenda_note=e,v(t)}}),"Speaker"==e.attrs.role&&(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{children:(0,L.jsx)("em",{children:"Padding time is a little extra time for switching between and introducing speakers (not included in the time allowed for speeches)."})}),(0,L.jsx)("p",{children:(0,L.jsx)(p.ToggleControl,{label:"Sync Number of Speakers and Evaluators",help:1==f?"Number of evaluators will automatically changed with number of speakers":"Let me manage this manually",checked:f,onChange:()=>{m(!f)}})})]}),(0,L.jsx)("p",{children:(0,L.jsx)(p.ToggleControl,{label:"Backup",help:1==e.attrs.backup?"Editing":"Viewing",checked:e.attrs.backup,onChange:()=>{t.blocksdata[o].attrs.backup=!e.attrs.backup,v(t)}})}),(0,L.jsx)(Z,{block:e,makeNotification:s,data:t})]}),a&&"wp4toastmasters/absences"==e.blockName&&(0,L.jsx)("div",{children:(0,L.jsx)(p.ToggleControl,{label:"Show on Agenda",help:1==e.attrs.backup?"Show":"Hide",checked:e.attrs.show_on_agenda,onChange:()=>{t.blocksdata[o].attrs.show_on_agenda=!e.attrs.show_on_agenda,v(t)}})}),a&&"wp4toastmasters/agendaedit"==e.blockName&&(0,L.jsxs)("div",{children:[a&&g==o&&(0,L.jsxs)("div",{children:[(0,L.jsx)(p.ToggleControl,{label:"Edit",checked:g==o,onChange:()=>{b(g==o?-1:o)}})," ",(0,L.jsx)(ae,{makeNotification:s,mode:n,block:e,blockindex:o,uid:e.attrs.uid,post_id:r})]}),a&&g!=o&&(0,L.jsxs)("div",{children:[(0,L.jsx)(p.ToggleControl,{label:"Edit",checked:g==o,onChange:()=>{b(g==o?-1:o)}})," ",(0,L.jsx)(U.d,{innerHTML:e.attrs.edithtml})]}),(0,L.jsx)("div",{className:"tmflexrow",children:(0,L.jsx)("div",{className:"tmflex30",children:(0,L.jsx)(h.h,{label:"Time Allowed",value:e.attrs?.time_allowed?e.attrs?.time_allowed:0,onChange:e=>{t.blocksdata[o].attrs.time_allowed=e,v(t)}})})})]}),a&&"wp4toastmasters/agendanoterich2"==e.blockName&&(0,L.jsxs)("div",{children:[a&&g==o&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(p.ToggleControl,{label:"Edit",checked:g==o,onChange:()=>{b(g==o?-1:o)}}),(0,L.jsx)(ie,{makeNotification:s,blockindex:o,block:e,replaceBlock:_,data:t})]}),a&&g!=o&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(p.ToggleControl,{label:"Edit",checked:g==o,onChange:()=>{b(g==o?-1:o)}}),(0,L.jsx)(U.d,{innerHTML:e.innerHTML})]}),(0,L.jsx)("div",{className:"tmflexrow",children:(0,L.jsx)("div",{className:"tmflex30",children:(0,L.jsx)(h.h,{label:"Time Allowed",value:e.attrs?.time_allowed?e.attrs?.time_allowed:0,onChange:e=>{t.blocksdata[o].attrs.time_allowed=e,v(t)}})})})]}),a&&"wp4toastmasters/signupnote"==e.blockName&&(0,L.jsx)("div",{children:(0,L.jsx)(le,{blockindex:o,block:e,replaceBlock:_})}),a&&e.innerHTML&&!["wp4toastmasters/signupnote","wp4toastmasters/agendanoterich2"].includes(e.blockname)&&(0,L.jsx)(U.d,{innerHTML:e.innerHTML}),(0,L.jsx)("p",{children:(0,L.jsx)(h.k,{label:"Move",options:T,onChange:e=>function(e,n){console.log("selectMove "+e+" to "+n);const o=[];let r=t.blocksdata[e];console.log("drag source",e),console.log("drag destination",n),"top"==n&&(o.push(r),r=null),t.blocksdata.forEach((t,s)=>{s!=e?(o.push(t),s==n&&(console.log("selectMove insert "+s),o.push(r),r=null)):console.log("selectMove skip "+s)}),r&&o.push(r),v({...t,blocksdata:o})}(o,e)})}),a&&(0,L.jsx)(ce,{makeNotification:s,blockindex:o,moveBlock:w,post_id:r})]}),a&&(0,L.jsx)(ue,{makeNotification:s,blockindex:o,insertBlock:k,moveBlock:w,post_id:r})]})):null)]})}function he(e){const{data:t,post_id:n,makeNotification:r,block:s,blockindex:i,setMode:a,setShowControls:l}=e,[c,u]=(0,o.useState)(!0),[d,f]=(0,o.useState)(!1),{mutate:m}=(0,q.cV)(n,r,ue),{mutate:g}=(0,q.tP)(n,t.has_template);let b,v=[{label:"Where to?",value:""},{label:"Move to Top",value:"top"}],y="";function x(e){let t=0,n=e.count?e.count:1;return"Speaker"==e.role&&(t=7*n),"Evaluator"==e.role&&(t=3*n),t}function j(){let e=[];return t.blocksdata&&Array.isArray(t.blocksdata)&&t.blocksdata.map((t,n)=>{e.push(n)}),e}function w(e,n="up"){if(0==e&&"up"==n)return;let o=j(),r=parseInt(n),s=o.indexOf(e);if("up"==n?r=o[s-1]:"down"==n&&(r=o[s+2]),"delete"==n)t.blocksdata.splice(e,1);else{let n=t.blocksdata[e];t.blocksdata[e]={blockName:null},t.blocksdata.splice(r,0,n)}t.changed="blocks",m(t)}function k(){return(0,L.jsx)("button",{class:"tmsmallbutton",onClick:()=>{t.copyToTemplate=!0,m(t)},children:"Apply to All"})}t.blocksdata&&Array.isArray(t.blocksdata)&&t.blocksdata.map((e,t)=>{if(!e.blockName)return null;y="After: "+e.blockName.replace(/^[^/]+\//,"").replace("agendanoterich2","agenda note"),e.attrs.role&&(y=y.concat(" "+e.attrs.role)),e.attrs.editable&&(y=y.concat(" "+e.attrs.editable)),e.innerHTML&&(y=y.concat(" "+function(e){let t=e.replaceAll(/<[^>]+>/g," ");return t=t.trim(),t.length>60&&(t=t.substring(0,60)+"..."),t}(e.innerHTML))),y.length>60&&(y=y.substring(0,60)+"..."),v.push({value:t,label:y})}),b=[],v.forEach(e=>{e.value!=i&&b.push(e)}),j();let _=s.innerHTML?s.innerHTML.replace(/<[^>]+>/,"").trim():"";_.length>20&&(_=_.substring(0,20)+"...");let C=s.attrs.role?s.attrs.role:"";return C.length>12&&(C=C.substr(0,12)+"..."),(0,L.jsxs)("fieldset",{className:"reorgwidget",children:[(0,L.jsx)("legend",{children:"Organize"}),(0,L.jsxs)(L.Fragment,{children:["wp4toastmasters/role"==s.blockName&&(0,L.jsxs)("div",{children:[(0,L.jsxs)("p",{className:"tmflexrow",children:[(0,L.jsx)("div",{className:"tmflex30",children:(0,L.jsx)(h.h,{label:"Signup Slots ("+C+")",min:"1",value:s.attrs.count?s.attrs.count:1,onChange:e=>{var n,o;e=Math.abs(parseInt(e)),t.blocksdata[i].attrs.count=e,["Speaker","Evaluator"].includes(s.attrs.role)&&(t.blocksdata[i].attrs.time_allowed=x(s.attrs),t.blocksdata=(n=t.blocksdata,o=e,c?(n.forEach((e,t)=>{"Evaluator"==e.attrs.role&&(n[t].attrs.count=o,n[t].attrs.time_allowed=3*o)}),n):n)),m(t)}})}),(0,L.jsx)("div",{className:"tmflex30",children:(0,L.jsx)(h.h,{label:"Time Allowed ("+C+")",value:s.attrs?.time_allowed?s.attrs?.time_allowed:x(s.attrs),onChange:e=>{e=Math.abs(parseInt(e)),t.blocksdata[i].attrs.time_allowed=e,m(t)}})})," ","Speaker"==s.attrs.role&&(0,L.jsx)("div",{className:"tmflex30",children:(0,L.jsx)(h.h,{label:"Padding Time",min:"0",value:s.attrs.padding_time,onChange:e=>{e=Math.abs(parseInt(e)),t.blocksdata[i].attrs.padding_time=e,m(t)}})})]}),"Speaker"==s.attrs.role&&(0,L.jsx)("div",{children:(0,L.jsx)("p",{children:(0,L.jsx)(p.ToggleControl,{label:"Sync Number of Speakers and Evaluators",help:1==c?"Number of evaluators will automatically changed with number of speakers":"Let me manage this manually",checked:c,onChange:()=>{u(!c)}})})})]}),"wp4toastmasters/agendaedit"==s.blockName&&(0,L.jsx)("div",{children:(0,L.jsx)("p",{children:(0,L.jsx)(h.h,{label:"Time Allowed ("+s.attrs.editable+")",value:s.attrs?.time_allowed?s.attrs?.time_allowed:x(s.attrs),onChange:e=>{e=Math.abs(parseInt(e)),t.blocksdata[i].attrs.time_allowed=e,m(t)}})})}),"wp4toastmasters/agendanoterich2"==s.blockName&&(0,L.jsx)("div",{children:(0,L.jsx)("p",{children:(0,L.jsx)(h.h,{label:"Time Allowed ("+_+")",value:s.attrs?.time_allowed?s.attrs?.time_allowed:x(s.attrs),onChange:e=>{e=Math.abs(parseInt(e)),t.blocksdata[i].attrs.time_allowed=e,m(t)}})})}),(0,L.jsxs)("div",{className:"tmflexrow",children:[(0,L.jsx)("div",{children:(0,L.jsx)("button",{className:"blockmove",onClick:()=>{w(i,"up")},children:(0,L.jsx)(Q.Up,{})})}),(0,L.jsx)("div",{children:(0,L.jsx)("button",{className:"blockmove",onClick:()=>{w(i,"down")},children:(0,L.jsx)(Q.RU,{})})}),(0,L.jsx)("div",{children:(0,L.jsx)(h.k,{label:"Move",options:b,onChange:e=>function(e,n){console.log("selectMove "+e+" to "+n);const o=[];let r=t.blocksdata[e];console.log("drag source",e),console.log("drag destination",n),"top"==n&&(o.push(r),r=null),t.blocksdata.forEach((t,s)=>{s!=e?(o.push(t),s==n&&(console.log("selectMove insert "+s),o.push(r),r=null)):console.log("selectMove skip "+s)}),r&&o.push(r),m({...t,blocksdata:o})}(i,e)})})]}),(0,L.jsxs)("div",{children:[(0,L.jsx)(ce,{makeNotification:r,blockindex:i,moveBlock:w,post_id:n})," ",t.has_template&&(0,L.jsxs)(L.Fragment,{children:["Copy to template and future agendas: ",(0,L.jsx)(k,{})]})," "]}),(0,L.jsxs)("div",{children:[(0,L.jsx)(ue,{makeNotification:r,blockindex:i,insertBlock:function(e,n={},o="wp4toastmasters/role",r="",s=""){let i=[];Array.isArray(t.blocksdata)&&t.blocksdata.forEach((t,a)=>{i.push(t),a==e&&i.push({blockName:o,assignments:[],attrs:n,innerHTML:r,edithtml:s})}),t.blocksdata=i,m(t)},moveBlock:w,post_id:n})," "]}),(0,L.jsx)("div",{style:{marginTop:"10px"},children:(0,L.jsx)("button",{onClick:()=>l(null),children:"Done"})})]})]})}function pe(e){const{current_user_id:t,post_id:n,mode:r,makeNotification:s}=e,[i,a]=(0,o.useState)(0),[l,c]=(0,o.useState)(""),d=(0,M.p)();(0,o.useEffect)(()=>{d?.nonce&&(0,z.e)(d.nonce)},[d?.nonce]);const{isLoading:p,isFetching:f,isSuccess:m,isError:g,data:b,error:v,refetch:y}=(0,u.useQuery)(["absences-data",n],function(){return z.A.get("absences?post_id="+n)},{enabled:!0,retry:2,onSuccess:function(e){},onError:function(e,t,n){console.log("absences error",e)},refetchInterval:6e4});if(g)return(0,L.jsx)("p",{children:"Error loading absences"});const x=(0,u.useQueryClient)(),j=(0,u.useMutation)(async e=>await z.A.post("absences?post_id="+n+"&_locale=user",e),{onMutate:async e=>{await x.cancelQueries(["absences-data",n]);const t=x.getQueryData(["blocks-data",n]);return x.setQueryData(["absences-data",n],t=>{const{data:n}=t,{absences:o}=n;return"add"==e.operation?o.push({ID:e.ID,name:e.name}):"remove"==e.operation&&o.splice(e.index,1),{...t,data:{...n,absences:o}}}),s("Updating ..."),{previousData:t}},onSettled:(e,t,n,o)=>{x.invalidateQueries(["absences-data",n.post_id])},onSuccess:(e,t,n,o)=>{s("Updated")},onError:(e,t,n)=>{s("Error updating abscences "+e.message),console.log("mutate assignment error",e),x.setQueryData("absences-data",n.previousData)}});function w(e){let t=E.find(t=>{if(t.value==e)return t});return t?.label}function k(e,t,n){j.mutate({operation:"remove",index:t,ID:e,until:n})}function _(e){j.mutate({operation:"add",ID:e,name:w(e),until:l})}if(p)return(0,L.jsx)("div",{children:"Loading absences list ..."});const{absences:C,upcoming:S,memberlist:E}=b.data;let A=-1;return C&&Array.isArray(C)&&C.forEach((e,n)=>{e.ID==t&&(A=n)}),"edit"==r?(0,L.jsxs)("div",{className:"absence",children:[(0,L.jsx)("h3",{children:"Planned Absences"}),C.map((e,t)=>(0,L.jsxs)("p",{children:[(0,L.jsx)("button",{className:"tmform",onClick:()=>{k(e.ID,t,e.until)},children:"Remove"})," ",e.name," ",e.until&&""!=e.until&&(0,L.jsxs)("em",{children:["until ",new Date(e.until).toLocaleDateString()]})]})),(0,L.jsx)(h.k,{label:"Add Member to List",value:i,options:E,onChange:e=>{a(e)}}),(0,L.jsx)(h.k,{label:"One meeting or several?",options:S,value:l,onChange:c}),(0,L.jsx)("button",{className:"tmform",onClick:()=>{_(i)},children:"Add"})]}):(0,L.jsxs)("div",{className:"absence",children:[(0,L.jsx)("h3",{children:"Planned Absences"}),C.map(e=>(0,L.jsxs)("p",{children:[e.name," ",e.until&&""!=e.until&&(0,L.jsxs)("em",{children:["until ",new Date(e.until).toLocaleDateString()]})]})),A<0&&(0,L.jsx)(h.k,{label:"One meeting or several?",options:S,value:l,onChange:c}),(0,L.jsxs)("p",{children:[A>-1&&(0,L.jsx)("button",{className:"tmform",onClick:()=>{k(t,A)},children:"Remove Me"})," ",A<0&&(0,L.jsx)("button",{className:"tmform",onClick:()=>{_(t)},children:"Add Me"})]})]})}function fe(e){const{current_user_id:t,post_id:n,mode:r,makeNotification:s}=e,[i,a]=(0,o.useState)(0),l=(0,M.p)();(0,o.useEffect)(()=>{l?.nonce&&(0,z.e)(l.nonce)},[l?.nonce]);const c=(0,u.useQueryClient)(),{isLoading:d,isFetching:p,isSuccess:f,isError:m,data:g,error:b,refetch:v}=(0,u.useQuery)(["hybrid-data",n],function(){return z.A.get("hybrid?post_id="+n)},{enabled:!0,retry:2,onSuccess:function(e){console.log("hybrid data",e)},onError:function(e,t,n){console.log("hybrid error",e)},refetchInterval:6e4});if(m)return(0,L.jsx)("p",{children:__("Error loading Hybrid.js data","rsvpmaker-for-toastmasters")});const y=(0,u.useMutation)(async e=>await z.A.post("hybrid?post_id="+n,e),{onMutate:async e=>{await c.cancelQueries(["hybrid-data",n]);const t=c.getQueryData(["blocks-data",n]);return c.setQueryData(["hybrid-data",n],t=>{const{data:n}=t,{hybrid:o}=n;return"add"==e.operation?o.push({ID:e.ID,name:e.name}):"remove"==e.operation&&o.splice(e.index,1),{...t,data:{...n,hybrid:o}}}),s(__("Updating ...","rsvpmaker-for-toastmasters")),{previousData:t}},onSettled:(e,t,n,o)=>{c.invalidateQueries(["hybrid-data",n.post_id])},onSuccess:(e,t,n,o)=>{s(__("Updated","rsvpmaker-for-toastmasters"))},onError:(e,t,n)=>{s(__("update hybrid error","rsvpmaker-for-toastmasters")),console.log("mutate hybrid error",e),c.setQueryData("hybrid-data",n.previousData)}});if(d)return(0,L.jsx)("div",{children:__("Loading hybrid list ...","rsvpmaker-for-toastmasters")});const{hybrid:x,memberlist:j}=g.data;function w(e){if(!Array.isArray(j))return"User "+e;let t=j.find(t=>{if(t.value==e)return t});return t?.label}function k(e,t){y.mutate({operation:"remove",index:t,ID:e})}function _(e){y.mutate({operation:"add",ID:e,name:w(e)})}let C=-1;return Array.isArray(x)&&x.forEach((e,n)=>{e.ID==t&&(C=n)}),"edit"==r?(0,L.jsxs)("div",{className:"absence",children:[(0,L.jsx)("h3",{children:__("In Person Attendance","rsvpmaker-for-toastmasters")}),x.map((e,t)=>(0,L.jsxs)("p",{children:[(0,L.jsx)("button",{className:"tmform",onClick:()=>{k(e.ID,t,e.until)},children:__("Remove","rsvpmaker-for-toastmasters")})," ",e.name]})),(0,L.jsx)(h.k,{label:__("Add Member to List","rsvpmaker-for-toastmasters"),value:i,options:j,onChange:e=>{a(e)}}),(0,L.jsx)("button",{className:"tmform",onClick:()=>{_(i)},children:__("Add","rsvpmaker-for-toastmasters")})]}):(0,L.jsxs)("div",{className:"hybrid",children:[(0,L.jsx)("h3",{children:__("In Person Attendance","rsvpmaker-for-toastmasters")}),x.map(e=>(0,L.jsx)("p",{children:e.name})),(0,L.jsxs)("p",{children:[C>-1&&(0,L.jsx)("button",{className:"tmform",onClick:()=>{k(t,C)},children:__("Remove Me","rsvpmaker-for-toastmasters")}),C<0&&(0,L.jsx)("button",{className:"tmform",onClick:()=>{_(t)},children:__("Add Me","rsvpmaker-for-toastmasters")})]})]})}var me=r(9399);function ge({post_id:e}){const[t,n]=(0,o.useState)({}),{mutate:r}=(0,q.cl)(n),s={value:"",label:"Select Member"},[i,a]=(0,o.useState)(s),[l,c]=(0,o.useState)({key:"",label:"",options:[],signature:!1}),[u,f]=(0,o.useState)(!1),[m,g]=(0,o.useState)(!1),[b,v]=(0,o.useState)(!1),[y,x]=(0,o.useState)(""),[j,w]=(0,o.useState)(""),[k,_]=(0,o.useState)(""),[C,S]=(0,o.useState)(!1),[E,A]=(0,o.useState)(!1),[T,O]=(0,o.useState)(0),N={button:{minWidth:"120px",backgroundColor:"black",padding:"10px",borderRadius:"4px",marginRight:"10px"},plusbutton:{backgroundColor:"black",padding:"10px",borderRadius:"4px",marginRight:"10px"},minusbutton:{backgroundColor:"red",padding:"10px",borderRadius:"4px",marginRight:"10px"},buttonText:{color:"white"},h1:{fontSize:"30px",fontWeight:"bold"},h2:{fontSize:"25px"}};let R=localStorage.getItem("toastmastersVoting");R?console.log("stored_token",R):(R=(new Date).getTime()+Math.random(),localStorage.setItem("toastmastersVoting",R),console.log("new token",R)),(0,o.useEffect)(()=>{!function(e){if(e){var t=document.getElementById(e);t?t.scrollIntoView({behavior:"smooth"},!0):console.log("scroll to id could not find element "+e)}}("react-agenda")},[]);const{isLoading:D,isFetching:M,isSuccess:P,isError:I,data:F,error:B,refetch:Q}=(0,q.b0)(R,e,n);if(I)return(0,L.jsxs)("p",{children:["Error loading agenda data. Try ",(0,L.jsx)("a",{href:window.location.href,children:"reloading the page"}),". You can also ",(0,L.jsx)("a",{href:window.location.href.indexOf("?")>0?window.location.href+"&revert=1":window.location.href+"?revert=1",children:"use the old version of the signup form"}),"."]});if((D||M)&&!F)return console.log("isLoading",D),console.log("isFetching",M),(0,L.jsx)("p",{children:"Loading ..."});console.log("speaker results",t.speaker_results);const z=Object.keys(t.ballot);t.ballot,z.forEach(e=>{"Template"!=e&&(console.log("contest",e),console.log(t.ballot[e]))}),console.log("votingdata",t),console.log("ballot keys",Object.keys(t.ballot)),console.log("ballot entries",Object.entries(t.ballot));for(const[e,n]in Object.entries(t.ballot))console.log("ballot",e),console.log("ballot value",n);if(t.is_vote_counter&&"counting"==y)return(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{style:N.h1,children:"Vote Counter's Tool: Vote Count"}),(0,L.jsxs)("p",{children:[(0,L.jsx)("button",{style:N.button,onClick:()=>{x("")},children:(0,L.jsx)("span",{style:N.buttonText,children:"Ballot Setup"})}),"  ",(0,L.jsx)("button",{style:N.button,onClick:()=>{x("ballot")},children:(0,L.jsx)("span",{style:N.buttonText,children:"Ballot"})})," ",(0,L.jsx)("button",{style:N.button,onClick:()=>{Q()},children:(0,L.jsx)("span",{style:N.buttonText,children:"Refresh"})})]}),(0,L.jsx)(U.d,{innerHTML:t.votecount})]});if(t.is_vote_counter&&""==y)return(0,L.jsxs)("div",{children:[(0,L.jsxs)("p",{style:N.h1,children:[(0,d.A)("Vote Counter's Tool",t),": ",(0,d.A)("Ballot Setup",t)]}),(0,L.jsxs)("div",{style:{display:"flex",flex:1,flexDirection:"row"},children:[E?(0,L.jsx)("button",{style:N.button,children:(0,L.jsx)("span",{style:{color:"green",backgroundColor:"white",padding:"5px"},children:(0,d.A)("Copied!",t)})}):(0,L.jsx)(me.CopyToClipboard,{text:(0,d.A)('Please vote using the link below. For subsequent votes, click "Refresh" if the ballot of choices is not displayed')+"\n\n"+t.url,onCopy:()=>{A(!0),setTimeout(()=>{A(!1)},9e3)},children:(0,L.jsx)("button",{style:N.button,children:(0,L.jsx)("span",{style:N.buttonText,children:(0,d.A)("Copy Voting Link",t)})})}),(0,L.jsx)("button",{style:N.button,onClick:()=>{x("counting")},children:(0,L.jsx)("span",{style:N.buttonText,children:(0,d.A)("Vote Count",t)})})," ",(0,L.jsx)("button",{style:N.button,onClick:()=>{x("ballot")},children:(0,L.jsx)("span",{style:N.buttonText,children:"Ballot"})})," ",(0,L.jsx)("button",{style:N.button,onClick:()=>{Q()},children:(0,L.jsx)("span",{style:N.buttonText,children:"Refresh"})})]}),z.map((o,a)=>{if("Template"==o||"C"==o||"c"==o)return;const l=t.ballot[o];return(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{style:N.h2,children:o}),l.contestants.map((e,r)=>(0,L.jsxs)("p",{children:[(0,L.jsx)("button",{style:N.minusbutton,onClick:()=>{l.deleted.push(e),l.contestants.splice(r,1);const s={...t.ballot,c:l};s[o].status="draft",console.log("altered ballot",s[o]),n({...t,ballot:s})},children:(0,L.jsx)("span",{style:N.buttonText,children:"-"})})," ",e]},"contestant"+r)),l.new.length?(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{children:"Pending:"}),l.new.map((e,r)=>(0,L.jsxs)("p",{children:[(0,L.jsx)("button",{style:N.plusbutton,onClick:()=>{l.contestants.push(e),l.new.splice(r,1);const s={...t.ballot,c:l};s[o].status="draft",console.log("altered ballot",s[o]),n({...t,ballot:s})},children:(0,L.jsx)("span",{style:N.buttonText,children:"+"})})," ",e]},"pending"+r))]}):null,l.deleted.length?(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{children:"Deleted:"}),l.deleted.map((e,r)=>(0,L.jsxs)("p",{style:{textDecoration:"line-through"},children:[(0,L.jsx)("button",{style:N.plusbutton,onClick:()=>{l.contestants.push(e),l.deleted.splice(r,1);const s={...t.ballot,c:l};s[o].status="draft",console.log("altered ballot",s[o]),n({...t,ballot:s})},children:(0,L.jsx)("span",{style:N.buttonText,children:"+"})})," ",e]},"deleted"+r))]}):null,(0,L.jsx)("p",{children:(0,L.jsx)(h.k,{label:"Member to Add",value:i,options:[s,...t.memberlist],onChange:s=>{if(!s)return;console.log("add on select",s),l.contestants.push(s);const i={...t.ballot,c:l};i[o].status="draft",console.log("altered ballot",i[o]),n({...t,ballot:i}),r({ballot:i,post_id:e,identifier:R})}})}),(0,L.jsxs)("div",{style:{display:"flex",flex:1,flexDirection:"row"},children:[(0,L.jsx)("div",{children:(0,L.jsx)(p.TextControl,{label:"Type Choice to Add",value:j,onChange:e=>{w(e)}})}),(0,L.jsx)("div",{style:{padding:"20px"},children:(0,L.jsx)("button",{style:N.plusbutton,onClick:()=>{l.contestants.push(j),w("");const s={...t.ballot,c:l};s[o].status="draft",console.log("altered ballot",s[o]),n({...t,ballot:s}),r({ballot:s,post_id:e,identifier:R})},children:(0,L.jsx)("span",{style:N.buttonText,children:"+"})})})]}),(0,L.jsx)("p",{children:(0,L.jsx)(p.ToggleControl,{label:(0,d.A)("Require Signature",t),help:1==l.signature_required?(0,d.A)('Vote must be "signed" by a logged in member',t):(0,d.A)("Anonymous voting is allowed",t),checked:l.signature_required,onChange:()=>{const e={...l};e.signature_required=!l.signature_required,console.log("modified ballot",e);const r={...t.ballot};r[o]=e,console.log("modified ballots",r);const s={...t,ballot:r};console.log("modified voting data",s),n(s)}})}),"publish"==l.status?(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{children:(0,L.jsx)("button",{style:N.button,onClick:()=>{const n={...l,status:"draft"},s={...t.ballot};s[o]=n,console.log("ballot update for "+o,s),r({ballot:s,post_id:e,identifier:R})},children:(0,L.jsx)("span",{style:N.buttonText,children:"Unpublish"})})}),E?(0,L.jsx)("button",{style:N.button,children:(0,L.jsx)("span",{style:{color:"green",backgroundColor:"white",padding:"5px"},children:(0,d.A)("Copied!",t)})}):(0,L.jsx)(me.CopyToClipboard,{text:(0,d.A)('Please vote using the link below. For subsequent votes, click "Refresh" if the ballot of choices is not displayed')+"\n\n"+t.url,onCopy:()=>{A(!0),setTimeout(()=>{A(!1)},9e3)},children:(0,L.jsx)("button",{style:N.button,children:(0,L.jsx)("span",{style:N.buttonText,children:(0,d.A)("Copy Voting Link",t)})})})]}):(0,L.jsx)("p",{children:(0,L.jsx)("button",{style:N.button,onClick:()=>{const n={...l,status:"publish"},s={...t.ballot};s[o]=n,console.log("ballot update for "+o,s),r({ballot:s,post_id:e,identifier:R}),A(!1)},children:(0,L.jsx)("span",{style:N.buttonText,children:(0,d.A)("Publish",t)})})})]},"contest"+a)}),(0,L.jsx)("p",{style:N.h2,children:(0,d.A)("New Ballot",t)}),(0,L.jsx)("div",{children:(0,L.jsx)(p.TextControl,{label:"Contest or Question",value:k,onChange:e=>{_(e)}})}),(0,L.jsxs)("div",{style:{padding:"20px"},children:[(0,L.jsx)("p",{children:(0,L.jsx)(p.ToggleControl,{label:(0,d.A)("Include for Every Meeting",t),help:m?(0,d.A)("Included on ballot for every meeting",t):(0,d.A)("Only for this meeting",t),checked:m,onChange:()=>{g(e=>!e)}})}),(0,L.jsx)("p",{children:(0,L.jsx)(p.ToggleControl,{label:(0,d.A)("Require Signature",t),help:b?(0,d.A)('Vote must be "signed" by a logged in member',t):(0,d.A)("Anonymous voting is allowed",t),checked:b,onChange:()=>{v(e=>!e)}})}),(0,L.jsx)("p",{children:(0,L.jsx)(p.ToggleControl,{label:(0,d.A)("Make choices Yes/No/Abstain",t),help:u?(0,d.A)("Choices will default to Yes/No/Abstain",t):(0,d.A)("Choices to be entered",t),checked:u,onChange:()=>{f(e=>!e)}})}),(0,L.jsx)("button",{style:N.button,onClick:()=>{const e={...t.ballot};e[k]={...t.ballot.Template,signature_required:b,everyMeeting:m,contestants:u?["Yes","No","Abstain"]:[]},console.log("newBallotEntry",e),n({...t,ballot:e}),_("")},children:(0,L.jsx)("span",{style:N.buttonText,children:(0,d.A)("Add Ballot",t)})})]}),z.map((o,s)=>{if("Template"==o||"C"==o||"c"==o)return;const i=t.ballot[o];if("publish"!=i.status||i.signature_required)return;const a=[...t.added_votes];return(0,L.jsxs)("div",{children:[(0,L.jsxs)("p",{style:N.h2,children:[(0,d.A)("Add Votes",t),": ",o]}),(0,L.jsx)("p",{children:"If you received votes from outside of this app, you can add them here."}),i.contestants.map((s,i)=>{let l=a.find((e,t)=>{if(e.ballot==o&&e.contestant==s)return e.index=t,e});return l||(l={ballot:o,contestant:s,add:0,index:a.length},a.push(l),console.log("created addvote object",l)),(0,L.jsxs)("p",{children:[(0,L.jsx)("button",{style:N.plusbutton,onClick:()=>{console.log("add vote",s),S(!0),l.add++,console.log(l),a[l.index].add=l.add,console.log("added",a);const o={...t,added_votes:a};console.log("added update",o),n(o),r({added:a,post_id:e,identifier:R})},children:(0,L.jsx)("span",{style:N.buttonText,children:"+"})}),(0,L.jsx)("button",{style:N.minusbutton,onClick:()=>{console.log("add vote",s),S(!0),l.add>0&&l.add--,console.log(l),a[l.index].add=l.add,console.log("added",a);const o={...t,added_votes:a};console.log("added update",o),n(o),r({added:a,post_id:e,identifier:R})},children:(0,L.jsx)("span",{style:N.buttonText,children:"-"})}),s," +",l.add]},"addvotes"+i)})]},"contestadd"+s)}),t.open_club_ballots&&t.open_club_ballots.length?(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{style:N.h2,children:(0,d.A)("Close Ballots (Signed Votes)",t)}),(0,L.jsx)("p",{children:(0,d.A)("Once you have received the required number of votes, close the voting. Voting results will be saved as a club minutes document on the website.",t)}),(0,L.jsx)(h.k,{label:(0,d.A)("Select Ballot to Close",t),value:T,options:[{value:0,label:"Select Ballot to Close"},...t.open_club_ballots],onChange:e=>{O(e),console.log("setClose",T)}}),(0,L.jsx)("p",{children:(0,L.jsx)("button",{style:N.button,onClick:()=>{const o={...t,close_ballot:T};n(o),r({close_ballot:T,post_id:e,identifier:R}),O({value:0,label:"Select Ballot to Close"})},children:(0,L.jsx)("span",{style:N.buttonText,children:(0,d.A)("Close",t)})})})]}):null,(0,L.jsx)("p",{style:N.h2,children:(0,d.A)("Reset",t)}),(0,L.jsx)("p",{children:(0,L.jsx)("button",{style:N.button,onClick:()=>{r({reset:!0,post_id:e,identifier:R})},children:(0,L.jsx)("span",{style:N.buttonText,children:(0,d.A)("Reset Ballot",t)})})})]});let H=!1;return(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{style:N.h1,children:(0,d.A)("Voting",t)}),(0,L.jsx)("p",{children:(0,L.jsx)("button",{style:N.button,onClick:()=>{Q()},children:(0,L.jsx)("span",{style:N.buttonText,children:"Refresh"})})}),t.is_vote_counter?(0,L.jsxs)("p",{children:[(0,L.jsx)("button",{style:N.button,onClick:()=>{x("")},children:(0,L.jsx)("span",{style:N.buttonText,children:"Ballot Setup"})})," ",(0,L.jsx)("button",{style:N.button,onClick:()=>{x("counting")},children:(0,L.jsx)("span",{style:N.buttonText,children:"Vote Count"})})]}):null,z.map((n,o)=>{if("Template"==n)return;const s=t.ballot[n];return"publish"!=s.status?null:(H=!0,t.myvotes.includes(n)?(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{style:N.h2,children:n}),(0,L.jsx)("h3",{children:"✔ Voted"})]},"contest"+o):s.signature_required&&!t.authorized_user?(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{style:N.h2,children:n}),(0,L.jsx)("p",{style:{color:"red"},children:(0,d.A)("You must be logged in to vote on this question",t)}),(0,L.jsx)("p",{children:(0,L.jsx)("a",{href:t.login_url,children:(0,d.A)("Please login",t)})})]},"contest"+o):(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{style:N.h2,children:n}),s.contestants.length?(0,L.jsxs)("p",{children:[(0,d.A)("Vote for",t),":"]}):null,s.contestants.map((o,i)=>(0,L.jsx)("div",{children:(0,L.jsxs)("p",{children:[(0,L.jsx)("button",{style:{backgroundColor:"black",padding:"10px"},onClick:()=>{const i={vote:o,key:n,identifier:R,post_id:s.post_id?s.post_id:e,signature:s.signature_required?t.current_user_name:""};console.log("vote",i),r(i)},children:(0,L.jsxs)("span",{style:N.buttonText,children:["✔ ",(0,d.A)("Vote",t)]})})," ",o]})},"contestant"+i)),s.signature_required?(0,L.jsx)("p",{style:{style:"italic"},children:(0,d.A)("Vote will be recorded as signed by",t)+" "+t.current_user_name}):null]},"contest"+o))}),t.is_vote_counter||H?null:(0,L.jsxs)("div",{children:[(0,L.jsxs)("p",{children:['Current vote counter: "',t.vote_counter_name,'." No ballots have been created yet.']}),(0,L.jsx)("p",{style:N.h2,children:"Assume the role of Vote Counter?"}),(0,L.jsx)("p",{children:"If no Vote Counter is available, any member can assume the role."}),t.authorized_user?(0,L.jsx)("p",{children:(0,L.jsx)("button",{style:N.button,onClick:()=>{r({post_id:e,identifier:R,take_vote_counter:!0})},children:(0,L.jsx)("span",{style:N.buttonText,children:"Take Vote Counter Role"})})}):(0,L.jsx)("p",{children:(0,L.jsx)("a",{href:t.login_url,children:"Please login first"})})]}),t.is_vote_counter?(0,L.jsxs)("div",{children:[(0,L.jsx)("p",{style:N.h2,children:"Back to Vote Counter Controls?"}),(0,L.jsx)("p",{children:(0,L.jsx)("button",{style:N.button,onClick:()=>{x("")},children:(0,L.jsx)("span",{style:N.buttonText,children:"Go Back"})})})]}):null]})}Error,s["useId".toString()],"undefined"!=typeof window?o.useLayoutEffect:o.useEffect,"undefined"==typeof window?o.useEffect:o.useLayoutEffect;const be=i().lazy(()=>Promise.resolve().then(r.bind(r,924)));function ve(e){let t=0;const n=(0,M.p)(),r=(0,M.p)();(0,o.useEffect)(()=>{r?.nonce&&(0,z.e)(r.nonce)},[r?.nonce]),"rsvpmaker"==n.post_type?t=n.post_id:(t=new URL(document.location).searchParams.get("post_id"),t||(t=0));const[s,i]=(0,o.useState)(t),[a,l]=(0,o.useState)(0),[c,u]=(0,o.useState)(e.mode_init?e.mode_init:"signup"),[p,f]=(0,o.useState)("all"),[m,g]=(0,o.useState)(-1),[b,v]=(0,o.useState)(!1),[y,x]=(0,o.useState)("react-agenda"),[j,w]=(0,o.useState)(null),[k,_]=(0,o.useState)(null),[C,S]=(0,o.useState)(e.evaluation);function E(e){if(e){var t=document.getElementById(e);t?t.scrollIntoView({behavior:"smooth"},!0):console.log("Scroll to ID could not find element "+e)}}function A(e,t=!1,n=null){k&&clearTimeout(k),w({message:e,prompt:t,otherproperties:n});let o=setTimeout(()=>{w(null)},25e3);_(o)}const{mutate:T}=(0,q.cV)(s,A,ue);(0,o.useEffect)(()=>{E(y),"react-agenda"!=y&&x("react-agenda")},[c]);try{const{isLoading:O,isFetching:N,isSuccess:R,isError:D,data:P,error:I,refetch:F}=(0,q.qL)(s);if(D)return(0,L.jsxs)("p",{children:["Error loading agenda data. Try ",(0,L.jsx)("a",{href:window.location.href,children:"reloading the page"}),". You can also",(0,L.jsx)("a",{href:window.location.href.indexOf("?")>0?window.location.href+"&revert=1":window.location.href+"?revert=1",children:"use the old version of the signup form"}),"."]});if(O)return(0,L.jsx)("p",{children:"Loading..."});if(!P.data.current_user_id)return(0,L.jsx)("p",{children:"You must be logged in as a member of this website to see the signup form."});if(P){const{permissions:Y}=P?.data}const B=P.data;function Q(e){const t=[];return e.isTemplate?(t.push({label:(0,d.A)("Organize",B),value:"reorganize"}),t.push({label:(0,d.A)("Template/Settings",B),value:"settings"})):(t.push({label:(0,d.A)("Sign Up",B),value:"signup"}),(H("edit_post")||H("organize_agenda")||H("edit_signups"))&&(t.push({label:(0,d.A)("Edit",B),value:"edit"}),t.push({label:(0,d.A)("Assign",B),value:"assign"})),t.push({label:(0,d.A)("Evaluation",B),value:"evaluation"}),t.push({label:(0,d.A)("Voting",B),value:"voting"}),(H("edit_post")||H("organize_agenda"))&&t.push({label:(0,d.A)("Organize",B),value:"reorganize"}),H("edit_post")&&t.push({label:(0,d.A)("Settings",B),value:"settings"})),(0,L.jsxs)("div",{id:"fixed-mode-control",children:[j&&j.message&&(0,L.jsx)("div",{className:"mode-control-notification",children:j.message}),(0,L.jsx)("div",{className:"mode-centered",children:t.map(e=>(0,L.jsx)("button",{className:c==e.value?"blackButton bottomButton":"bottomButton",onClick:()=>{u(e.value),x("react-agenda")},children:e.label},e.value))}),(0,L.jsx)("p",{className:"mode-help mode-centered",children:"signup"==c?(0,d.A)("Sign yourself up for roles and enter/update speech details.",B):"edit"==c?(0,d.A)("Assign others to roles and edit their speech details. Rearrange or delete assignments.",B):"assign"==c?(0,d.A)("Assign others to roles (grid view).",B):"suggest"==c?(0,d.A)("Nominate another member for a role -- they will get an email notification that makes it easy to say yes.",B):"evaluation"==c?(0,d.A)("Provide written speech feedback using digital versions of the evaluation forms.",B):"reorganize"==c?(0,d.A)("Rearrange roles and other elements on your agenda and adjust the timing.",B):"settings"==c?(0,d.A)("Update your standard meeting template or switch the template for the current meeting. Adjust event date and time. Update settings.",B):void 0})]})}function H(e){const t=P.data.permissions;let n=!1;return t[e]&&(n=t[e]),n}let W=new Date(B.datetime);const K={weekday:"long",year:"numeric",month:"long",day:"numeric"};let G="";return s||i(B.post_id),a||l(B.current_user_id),"settings"==c?(0,L.jsxs)("div",{className:"agendawrapper",children:[(0,L.jsx)(Q,{isTemplate:!1!==B.is_template,post_id:B.post_id}),(0,L.jsx)(se,{makeNotification:A,setPostId:i,user_can:H,data:B})]}):"evaluation"==c?(0,L.jsxs)("div",{className:"agendawrapper",children:[(0,L.jsx)(Q,{}),(0,L.jsx)(o.Suspense,{fallback:(0,L.jsx)("h1",{children:"Loading ..."}),children:(0,L.jsx)(be,{scrolltoId:E,makeNotification:A,data:B,evaluate:C,setEvaluate:S})})]}):"voting"==c?(0,L.jsxs)("div",{className:"agendawrapper",children:[(0,L.jsx)(Q,{}),(0,L.jsx)(o.Suspense,{fallback:(0,L.jsx)("h1",{children:"Loading ..."}),children:(0,L.jsx)(ge,{post_id:s,data:B})})]}):"reorganize"==c?(0,L.jsx)(o.Suspense,{fallback:(0,L.jsx)("h1",{children:"Loading ..."}),children:(0,L.jsx)(de,{data:B,mode:c,setMode:u,post_id:s,makeNotification:A,ModeControl:Q,showDetails:p,setshowDetails:f,setScrollTo:x,setEvaluate:S,setPostId:i})}):(0,L.jsxs)("div",{className:"agendawrapper",id:"agendawrapper"+s,children:["suggest"==c&&(0,L.jsxs)("p",{children:[(0,d.A)("See also the",B)," ",(0,L.jsx)("a",{href:B.admin_url+"admin.php?page=wpt_suggest_all_roles&meeting="+s,children:(0,d.A)("Suggest All Roles",B)})," ",(0,d.A)("tool for sending suggestions in a batch.",B)]}),(0,L.jsx)(L.Fragment,{children:"rsvpmaker"!=n.post_type&&(0,L.jsx)(h.k,{label:"Choose Event",value:s,options:B.upcoming,onChange:e=>{i(parseInt(e)),A((0,d.A)("Date changed, please wait for the date to change ...",B)),queryClient.invalidateQueries(["blocks-data",s]),F()}})}),(0,L.jsxs)("h4",{children:[W.toLocaleDateString("en-US",K)," ",B.is_template&&(0,L.jsxs)("span",{children:["(",(0,d.A)("Template",B),")"]})]}),(0,L.jsx)(Q,{makeNotification:A,isTemplate:!1!==B.is_template,post_id:B.post_id}),!Array.isArray(B.blocksdata)&&(0,L.jsxs)("p",{children:[(0,d.A)("Error loading agenda",B)," (",(0,L.jsx)("a",{href:window.location.href+"?revert=1",children:(0,d.A)("try alternate version",B)}),")."]}),"assign"==c&&(0,L.jsx)("div",{className:"assignment",note:"workaround for alignment issue"}),Array.isArray(B.blocksdata)&&B.blocksdata.map((e,t)=>{if(G=W.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}),e.rendered&&e.rendered.length>0)return(0,L.jsx)(U.d,{innerHTML:e.rendered});if(e?.attrs?.time_allowed&&(W.setMilliseconds(W.getMilliseconds()+6e4*parseInt(e.attrs.time_allowed)),e.attrs.padding_time&&W.setMilliseconds(W.getMilliseconds()+6e4*parseInt(e.attrs.padding_time)),G=G+" to "+W.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0})),!e.blockName||!e.attrs)return null;if("assign"==c)return"wp4toastmasters/role"==e.blockName?(0,L.jsx)(X,{makeNotification:A,showDetails:p,agendadata:B,post_id:s,blockindex:t,mode:c,block:e,setMode:u,setScrollTo:x,setEvaluate:S,data:B}):null;if("signup"==c){if("wp4toastmasters/role"==e.blockName){let n=H("edit_signups")&&m==t?"edit":"signup";return"speakers-evaluators"!=p||["Speaker","Evaluator"].includes(e.attrs.role)?(0,L.jsxs)("div",{id:"block"+t,className:"block",children:[(0,L.jsx)("div",{children:(0,L.jsx)("strong",{children:G})}),(0,L.jsx)(X,{makeNotification:A,showDetails:p,agendadata:B,post_id:s,blockindex:t,mode:n,block:e,setMode:u,setScrollTo:x,setEvaluate:S,setShowControls:g,data:B}),(0,L.jsx)(Z,{block:e,makeNotification:A,data:B}),m==t&&H("organize_agenda")&&(0,L.jsx)(he,{block:e,blockindex:t,data:B,post_id:s,makeNotification:A,setMode:u,setShowControls:g})]},"block"+t):null}if("speakers-evaluators"==p)return null;if(p&&"wp4toastmasters/agendaedit"==e.blockName){let n=H("edit_signups")&&m==t?"edit":"signup";return(0,L.jsxs)("div",{id:"block"+t,className:"block",children:[(0,L.jsx)("div",{children:(0,L.jsx)("strong",{children:G})}),(0,L.jsx)(ae,{makeNotification:A,mode:n,block:e,blockindex:t,uid:e.attrs.uid,post_id:s}),m==t&&H("organize_agenda")&&(0,L.jsx)(he,{block:e,blockindex:t,data:B,post_id:s,makeNotification:A,setMode:u,setShowControls:g}),m!=t&&H("organize_agenda")&&(0,L.jsxs)("button",{className:"agenda-tooltip",onClick:()=>{g(t)},children:[(0,L.jsx)("span",{className:"agenda-tooltip-text",children:(0,d.A)("Edit/Organize",B)}),(0,L.jsx)(V,{icon:J})]})]},"block"+t)}if(p&&"wp4toastmasters/agendanoterich2"==e.blockName){let n=H("edit_signups")&&m==t?"edit":"signup";return(0,L.jsxs)("div",{id:"block"+t,className:"block",children:[(0,L.jsx)("div",{children:(0,L.jsx)("strong",{children:G})}),("edit"!=n||!b)&&(0,L.jsx)(U.d,{innerHTML:e.innerHTML}),"edit"==n&&!b&&(0,L.jsx)("button",{className:"tmsmallbutton",onClick:()=>v(!0),children:(0,d.A)("Edit",B)}),"edit"==n&&b&&(0,L.jsx)(ie,{makeNotification:A,blockindex:t,block:e}),m==t&&H("organize_agenda")&&(0,L.jsx)(he,{block:e,blockindex:t,data:B,post_id:s,makeNotification:A,setMode:u,setShowControls:g}),m!=t&&H("organize_agenda")&&(0,L.jsxs)("button",{className:"agenda-tooltip",onClick:()=>{g(t)},children:[(0,L.jsx)("span",{className:"agenda-tooltip-text",children:(0,d.A)("Edit/Organize",B)}),(0,L.jsx)(V,{icon:J})]})]},"block"+t)}return p&&"wp4toastmasters/context"==e.blockName?(0,L.jsx)(L.Fragment,{children:e.innerBlocks.map(e=>(0,L.jsx)(U.d,{innerHTML:e.innerHTML}))}):p&&e.innerHTML?(0,L.jsx)("div",{id:"block"+t,className:"block",children:(0,L.jsx)(U.d,{innerHTML:e.innerHTML})},"block"+t):"wp4toastmasters/absences"==e.blockName?(0,L.jsx)(pe,{makeNotification:A,absences:B.absences,current_user_id:a,post_id:s,mode:c}):"wp4toastmasters/hybrid"==e.blockName?(0,L.jsx)(fe,{makeNotification:A,current_user_id:a,post_id:s,mode:c}):null}return"edit"==c?"wp4toastmasters/role"==e.blockName?(0,L.jsxs)("div",{id:"block"+t,className:"block",children:[(0,L.jsx)("div",{children:(0,L.jsx)("strong",{children:G})}),(0,L.jsx)(X,{makeNotification:A,showDetails:p,agendadata:B,post_id:s,blockindex:t,mode:c,block:e,setEvaluate:S,setMode:u,data:B}),(0,L.jsx)(Z,{block:e,makeNotification:A,data:B}),m==t&&H("organize_agenda")&&(0,L.jsx)(he,{block:e,blockindex:t,data:B,post_id:s,makeNotification:A,setMode:u,setShowControls:g})]},"block"+t):p&&"wp4toastmasters/agendaedit"==e.blockName?(0,L.jsxs)("div",{id:"block"+t,className:"block",children:[(0,L.jsx)("div",{children:(0,L.jsx)("strong",{children:G})}),(0,L.jsx)(ae,{makeNotification:A,mode:c,block:e,blockindex:t,uid:e.attrs.uid,post_id:s}),m==t&&H("organize_agenda")&&(0,L.jsx)(he,{block:e,blockindex:t,data:B,post_id:s,makeNotification:A,setMode:u,setShowControls:g}),m!=t&&H("organize_agenda")&&(0,L.jsxs)("button",{className:"agenda-tooltip",onClick:()=>{g(t)},children:[(0,L.jsx)("span",{className:"agenda-tooltip-text",children:(0,d.A)("Edit/Organize",B)}),(0,L.jsx)(V,{icon:J})]})]},"block"+t):p&&"wp4toastmasters/agendanoterich2"==e.blockName&&(H("edit_post")||H("organize_agenda"))?(0,L.jsxs)("div",{id:"block"+t,className:"block",children:[(0,L.jsx)("div",{children:(0,L.jsx)("strong",{children:G})}),(0,L.jsx)(ie,{makeNotification:A,blockindex:t,block:e,data:B}),m==t&&H("organize_agenda")&&(0,L.jsx)(he,{block:e,blockindex:t,data:B,post_id:s,makeNotification:A,setMode:u,setShowControls:g})]},"block"+t):p&&"wp4toastmasters/signupnote"==e.blockName&&(H("edit_post")||H("organize_agenda"))?(0,L.jsxs)("div",{id:"block"+t,className:"block",children:[(0,L.jsx)("div",{children:(0,L.jsx)("strong",{children:G})}),(0,L.jsx)(le,{blockindex:t,block:e})]},"block"+t):"wp4toastmasters/absences"==e.blockName?(0,L.jsx)(pe,{makeNotification:A,absences:B.absences,current_user_id:a,mode:c,post_id:s}):"wp4toastmasters/hybrid"==e.blockName?(0,L.jsx)(fe,{makeNotification:A,current_user_id:a,post_id:s,mode:c}):null:"suggest"==c&&"wp4toastmasters/role"==e.blockName?(0,L.jsxs)("div",{id:"block"+t,className:"block",children:[(0,L.jsx)("div",{children:(0,L.jsx)("strong",{children:G})}),(0,L.jsx)(X,{makeNotification:A,showDetails:p,agendadata:B,post_id:s,blockindex:t,mode:c,block:e,data:B}),(0,L.jsx)(Z,{block:e,makeNotification:A,data:B})]},"block"+t):null}),(0,L.jsx)("div",{children:(0,L.jsx)("button",{onClick:F,children:"Refresh"})})]})}catch($){return console.log("Error loading agenda",$),(0,L.jsxs)("p",{children:["Error loading agenda",(0,L.jsx)("a",{href:window.location.href+"?revert=1",children:"try alternate version"})]})}}var ye=r(924);function xe(e){const{member:t,project:n}=e,[r,s]=(0,o.useState)(0),[i,a]=(0,o.useState)(0),l=e.mode_init,[c,u]=(0,o.useState)("react-agenda"),[d,h]=(0,o.useState)(null),[p,f]=(0,o.useState)(null),[m,g]=(0,o.useState)(e.evaluation);if(t){console.log("member "+t);const{data:e,isLoading:o,isSuccess:r}=(0,q.sJ)(t,n)}function b(){const e="evaluation_admin"==l?{marginLeft:"200px;"}:{};return(0,L.jsxs)("div",{id:"fixed-mode-control",style:e,children:[d&&(0,L.jsxs)("div",{className:"tm-notification tm-notification-success suggestion-notification",children:[" ",(0,L.jsx)(U.d,{innerHTML:d.message})," ",d.prompt&&(0,L.jsx)(NextMeetingPrompt,{})," ",d.otherproperties&&d.otherproperties.map(e=>{if(e.template_prompt)return(0,L.jsxs)("div",{className:"next-meeting-prompt",children:[(0,L.jsx)("a",{target:"_blank",href:"/wp-admin/edit.php?post_type=rsvpmaker&page=rsvpmaker_template_list&t="+e.template_prompt,children:"Create/Update"})," - copy content to new and existing events"]})})," ",y&&(0,L.jsx)("em",{children:"Fetching fresh data ..."})]}),"evaluation_demo"==l&&(0,L.jsxs)("p",{style:{textAlign:"center"},children:["This tool works even better as part of a ",(0,L.jsx)("a",{href:"https://toastmost.org",children:"Toastmost.org"})," website! ",(0,L.jsx)("a",{href:"https://toastmost.org",children:"Learn more"})]})]})}const{isLoading:v,isFetching:y,isSuccess:x,isError:j,data:w,error:k,refetch:_}=(0,q.qL)(r);if(j)return(0,L.jsx)("p",{children:"Error loading evaluation data (EvalWrapper)"});if(v)return(0,L.jsx)("div",{children:"Loading ..."});const C=w.data;return(0,L.jsxs)("div",{className:"agendawrapper",children:[(0,L.jsx)(b,{}),(0,L.jsx)(ye.default,{mode:l,scrolltoId:function(e){if(e){var t=document.getElementById(e);t&&t.scrollIntoView({behavior:"smooth"},!0)}},makeNotification:function(e,t=!1,n=null){p&&clearTimeout(p),h({message:e,prompt:t,otherproperties:n});let o=setTimeout(()=>{h(null)},25e3);f(o)},data:C,evaluate:m,setEvaluate:g})]})}function je(e){const[t,n]=(0,o.useState)(0),[r,s]=(0,o.useState)(0),[i,a]=(0,o.useState)("settings"),[l,c]=(0,o.useState)("all"),[u,d]=(0,o.useState)("react-agenda"),[f,m]=(0,o.useState)(null),[g,b]=(0,o.useState)(null);function v(e,t=!1,n=null){g&&clearTimeout(g),m({message:e,prompt:t,otherproperties:n});let o=setTimeout(()=>{m(null)},25e3);b(o)}function y(){let e=A.upcoming.findIndex(e=>e.value==t);return A.upcoming[e+1]?(0,L.jsxs)("div",{className:"next-meeting-prompt",children:["Would you like to sign up for the ",(0,L.jsx)("a",{href:A.upcoming[e+1].permalink+"?newsignup",children:"Next meeting?"})]}):null}const{isLoading:x,isFetching:j,isSuccess:w,isError:k,data:_,error:C,refetch:S}=(0,q.qL)(t,i,!0);if(k)return(0,L.jsx)("p",{children:"Error loading ReorgWrapper.js data"});if((0,o.useEffect)(()=>{!function(e){if(e){var t=document.getElementById(e);t?t.scrollIntoView({behavior:"smooth"},!0):console.log("scroll to id could not find element "+e)}}(u),"react-agenda"!=u&&d("react-agenda")},[i]),_?.data){const e=_.data;e.has_template&&n(e.has_template);const{permissions:t}=_.data}function E(e){const{note:t}=e,n="reorganize"==i?[{value:"all",label:"Show All"},{value:"",label:"Outline View"},{value:"speakers-evaluators",label:"Speakers and Evaluators Only"},{value:"timed",label:"Timed Elements Only"}]:[{value:"all",label:"Show Details"},{value:"",label:"Outline View"},{value:"speakers-evaluators",label:"Speakers and Evaluators Only"}];return(0,L.jsxs)("div",{id:"fixed-mode-control",children:[t&&(0,L.jsx)("p",{className:"modenote",children:t}),f&&(0,L.jsxs)("div",{className:"tm-notification tm-notification-success suggestion-notification",children:[" ",(0,L.jsx)(U.d,{innerHTML:f.message})," ",f.prompt&&(0,L.jsx)(y,{})," ",f.otherproperties&&f.otherproperties.map(e=>{if(e.template_prompt)return(0,L.jsxs)("div",{className:"next-meeting-prompt",children:[(0,L.jsx)("a",{target:"_blank",href:"/wp-admin/edit.php?post_type=rsvpmaker&page=rsvpmaker_template_list&t="+e.template_prompt,children:"Create/Update"})," - copy content to new and existing events"]})})," ",j&&(0,L.jsx)("em",{children:"Fetching fresh data ..."})]}),["signup","edit","reorganize"].includes(i)&&(0,L.jsx)("div",{className:"showtoggle",children:(0,L.jsx)(h.k,{label:"View Options",options:n,value:l,onChange:e=>{console.log("setshowDetails",e),c(e)}})}),(0,L.jsx)(p.RadioControl,{className:"radio-mode",selected:i,label:"Mode",onChange:e=>{d("react-agenda"),a(e)},options:[{label:"Template/Settings",value:"settings"},{label:"Organize",value:"reorganize"},{label:"Preview Agenda",value:"preview-agenda"}]}),(0,L.jsx)("p",{className:"mode-help",children:"signup"==i?"Sign yourself up for roles and enter/update speech details":"edit"==i?"Assign others to roles and edit their speech details. Rearrange or delete assignments.":"suggest"==i?"Nominate another member for a role -- they will get an email notification that makes it easy to say yes":"evaluation"==i?"Provide written speech feedback using digital versions of the evaluation forms":"reorganize"==i?"Rearrange roles and other elements on your agenda and adjust the timing":"settings"==i?"Update your standard meeting template or switch the template for the current meeting. Adjust event date and time. Update settings.":void 0})]})}if(x)return(0,L.jsx)("p",{children:"Loading ..."});if(!_.data.current_user_id)return(0,L.jsx)("p",{children:"You must be logged in as a member of this website to see the signup form."});const A=_.data;return t||n(A.post_id),r||s(A.current_user_id),"settings"==i?(0,L.jsxs)("div",{className:"agendawrapper",children:[(0,L.jsx)(se,{makeNotification:v,setPostId:n,user_can:function(e){return!!_.data.permissions[e]&&_.data.permissions[e]},data:A}),(0,L.jsx)(E,{})]}):"reorganize"==i?(0,L.jsx)("div",{children:(0,L.jsx)(de,{data:A,mode:i,setMode:a,post_id:t,makeNotification:v,ModeControl:E,showDetails:l,setshowDetails:c,setScrollTo:d})}):(0,L.jsxs)("div",{className:"agenda-preview",children:[(0,L.jsx)("p",{children:(0,L.jsx)("em",{children:"Showing preview with ficticious date and members"})}),(0,L.jsx)("iframe",{src:A.agenda_preview,width:"800",height:"2000"}),(0,L.jsx)(E,{})]})}const we=new u.QueryClient;window.addEventListener("load",function(e){try{const e=document.getElementById("react-agenda");console.log("currentdoc",e);let t=e.getAttribute("mode");const n={ID:"",name:"",project:"",manual:"",title:""},o=e.getAttribute("evalme");if(console.log("mode_init",t),"meeting_vote"==t){console.log("load voting tool");const t=e.getAttribute("post_id"),n=document.getElementById("rsvpsection");return n&&n.remove(),void(0,c.H)(e).render((0,L.jsx)(i().StrictMode,{children:(0,L.jsx)(u.QueryClientProvider,{client:we,children:(0,L.jsx)(ge,{post_id:t})})}))}console.log("after voting tool"),o&&(n.ID=o,n.name=e.getAttribute("name"),n.project=e.getAttribute("project"),n.manual=e.getAttribute("manual"),n.title=e.getAttribute("title"),console.log("evaluation",n)),"evaluation_demo"==t||"evaluation_admin"==t||"evaluation_guest"==t?l().render((0,L.jsx)(i().StrictMode,{children:(0,L.jsx)(u.QueryClientProvider,{client:we,children:(0,L.jsx)(xe,{mode_init:t,evaluation:n})})}),document.getElementById("react-agenda")):"settings_admin"==t?l().render((0,L.jsx)(i().StrictMode,{children:(0,L.jsx)(u.QueryClientProvider,{client:we,children:(0,L.jsx)(je,{})})}),document.getElementById("react-agenda")):l().render((0,L.jsx)(i().StrictMode,{children:(0,L.jsx)(u.QueryClientProvider,{client:we,children:(0,L.jsx)(ve,{mode_init:t,evaluation:n})})}),document.getElementById("react-agenda"))}catch(e){console.log("no current doc found",e)}})})()})();
  • rsvpmaker-for-toastmasters/trunk/agenda/src/ProjectChooser.js

    r3475088 r3482534  
    4141            }
    4242
    43         },[]);
     43        });
    4444
    4545
     
    5454
    5555    },[]);
     56
     57    useEffect(() => {
     58        setManual(props.manual ? props.manual : '');
     59        setProject(props.project ? props.project : '');
     60        setTitle(props.title ? props.title : '');
     61        setDisplayTime(props.display_time ? props.display_time : '5 - 7 minutes');
     62        setMaxTime(props.maxtime ? props.maxtime : 7);
     63        if (props.project) {
     64            startFromProject(props.project);
     65        } else {
     66            setPath('Path Not Set');
     67        }
     68    }, [props.assignment?.ID, props.manual, props.project, props.title, props.display_time, props.maxtime]);
    5669
    5770
  • rsvpmaker-for-toastmasters/trunk/agenda/src/RoleBlock.js

    r3477187 r3482534  
    7878                const previousData = queryClient.getQueryData(['blocks-data', post_id]);
    7979                queryClient.setQueryData(['blocks-data', post_id], (oldQueryData) => {
     80                    if (!oldQueryData?.data?.blocksdata)
     81                        return oldQueryData;
    8082                    const { blockindex, roleindex } = assignment;
    8183                    console.log('assignmentMutation setQueryData blockindex / roleindex', blockindex, roleindex);
    8284                    const { data } = oldQueryData;
    83                     const { blocksdata } = data;
    84                     console.log('assignmentMutation setQueryData old blocksdata', blocksdata);
    85                     console.log('blocksdata[blockindex]', blocksdata[blockindex]);
    86                     blocksdata[blockindex].assignments[roleindex] = assignment;
     85                    const blocksdata = data.blocksdata.map((block, bi) => {
     86                        if (bi !== blockindex)
     87                            return block;
     88                        const nextAssignments = Array.isArray(block.assignments) ? [...block.assignments] : [];
     89                        nextAssignments[roleindex] = assignment;
     90                        return { ...block, assignments: nextAssignments };
     91                    });
    8792                    const newdata = {
    8893                        ...oldQueryData, data: { ...data, blocksdata: blocksdata }
     
    104109            onError: (err, variables, context) => {
    105110                console.log(mytranslate('Mutate assignment error', data), err);
    106                 queryClient.setQueryData("blocks-data", context.previousData);
     111                queryClient.setQueryData(['blocks-data', post_id], context.previousData);
    107112                makeNotification(mytranslate('Error updating assignment ', data) + err.message);
    108113            },
     
    117122                const previousValue = queryClient.getQueryData(['blocks-data', post_id]);
    118123                queryClient.setQueryData(['blocks-data', post_id], (oldQueryData) => {
     124                    if (!oldQueryData?.data?.blocksdata)
     125                        return oldQueryData;
    119126                    const { blockindex } = multi;
    120127                    const { data } = oldQueryData;
    121                     const { blocksdata } = data;
    122                     blocksdata[blockindex].assignments = multi.assignments;
     128                    const blocksdata = data.blocksdata.map((block, bi) => {
     129                        if (bi !== blockindex)
     130                            return block;
     131                        return { ...block, assignments: [...multi.assignments] };
     132                    });
    123133                    const newdata = {
    124134                        ...oldQueryData, data: { ...data, blocksdata: blocksdata }
     
    137147            onError: (err, variables, context) => {
    138148                makeNotification(mytranslate('Error updating assignments ', data) + err.message);
    139                 queryClient.setQueryData("blocks-data", context.previousValue);
     149                queryClient.setQueryData(['blocks-data', post_id], context.previousValue);
    140150            },
    141151        }
     
    302312                        }); let newguests = [...guests]; newguests[roleindex] = ''; setGuests(newguests);
    303313                    }} >{mytranslate('Add', data)}</button></div></div>}</>
    304                     <>{'suggest' != mode && ('edit' == mode || (itemMode.mode == 'edit' && itemMode.item == roleindex) || (current_user_id == assignment.ID)) && ((assignment.ID > 0) || (typeof assignment.ID == 'string' && assignment.ID != '')) && role.includes('Speaker') && (role.includes('Backup') == false) && showDetails && <ProjectChooser attrs={attrs} assignment={assignment} project={assignment.project} title={assignment.title} intro={assignment.intro} manual={assignment.manual} maxtime={assignment.maxtime} display_time={assignment.display_time} updateAssignment={updateAssignment} roleindex={roleindex} blockindex={blockindex} />}</>
     314                    <>{'suggest' != mode && ('edit' == mode || (itemMode.mode == 'edit' && itemMode.item == roleindex) || (current_user_id == assignment.ID)) && ((assignment.ID > 0) || (typeof assignment.ID == 'string' && assignment.ID != '')) && role.includes('Speaker') && (role.includes('Backup') == false) && showDetails && <ProjectChooser key={'projectchooser-' + blockindex + '-' + roleindex + '-' + assignment.ID} attrs={attrs} assignment={assignment} project={assignment.project} title={assignment.title} intro={assignment.intro} manual={assignment.manual} maxtime={assignment.maxtime} display_time={assignment.display_time} updateAssignment={updateAssignment} roleindex={roleindex} blockindex={blockindex} />}</>
    305315                    <>{titlePrompt && ('edit' == mode || (itemMode.mode == 'edit' && itemMode.item == roleindex) || (current_user_id == assignment.ID)) && showDetails && <OtherRoleTitle role={role} attrs={attrs} assignment={assignment} title={assignment.title} updateAssignment={updateAssignment} roleindex={roleindex} blockindex={blockindex} />}</>
    306316                    <>{!!('edit' == mode) && assignments.length > 1 && <MoveButtons assignments={assignments} roleindex={roleindex} filledslots={filledslots} openslots={openslots} attrs={attrs} shownumber={shownumber} />}</>
  • rsvpmaker-for-toastmasters/trunk/api.php

    r3477187 r3482534  
    20252025        $post_id = $meeting->ID;
    20262026        $agenda['post_id'] = $post_id;
    2027         $agenda['title'] = rsvpmaker_date('M j',$meeting->ts_start) .' '.$meeting->post_title;
     2027        $title = strlen($meeting->post_title) > 30 ? substr($meeting->post_title,0,27).'...' : $meeting->post_title;
     2028        $agenda['title'] = rsvpmaker_date('M j',$meeting->ts_start) .' '.$title;
    20282029        $agenda['intros'] = speech_intros($post_id);
    20292030        $agenda['html'] = tm_agenda_content($post_id);
  • rsvpmaker-for-toastmasters/trunk/readme.txt

    r3482289 r3482534  
    66Requires at least: 5.0
    77Tested up to: 7.0
    8 Stable tag: 6.6.4
     8Stable tag: 6.6.5
    99License: GPLv2
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
  • rsvpmaker-for-toastmasters/trunk/rsvpmaker-for-toastmasters.php

    r3482289 r3482534  
    99Text Domain: rsvpmaker-for-toastmasters
    1010Domain Path: /translations
    11 Version: 6.6.4
     11Version: 6.6.5
    1212License: GPLv2
    1313*/
Note: See TracChangeset for help on using the changeset viewer.