function wa(t,e){return function(){return t.apply(e,arguments)}}const{toString:Ad}=Object.prototype,{getPrototypeOf:Ci}=Object,ar=(t=>e=>{const n=Ad.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ne=t=>(t=t.toLowerCase(),e=>ar(e)===t),lr=t=>e=>typeof e===t,{isArray:Ht}=Array,nn=lr("undefined");function Id(t){return t!==null&&!nn(t)&&t.constructor!==null&&!nn(t.constructor)&&_e(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Ca=Ne("ArrayBuffer");function Sd(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Ca(t.buffer),e}const Dd=lr("string"),_e=lr("function"),Oa=lr("number"),cr=t=>t!==null&&typeof t=="object",wd=t=>t===!0||t===!1,Pn=t=>{if(ar(t)!=="object")return!1;const e=Ci(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Cd=Ne("Date"),Od=Ne("File"),Md=Ne("Blob"),Nd=Ne("FileList"),xd=t=>cr(t)&&_e(t.pipe),Pd=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||_e(t.append)&&((e=ar(t))==="formdata"||e==="object"&&_e(t.toString)&&t.toString()==="[object FormData]"))},Ld=Ne("URLSearchParams"),[kd,Bd,Fd,Gd]=["ReadableStream","Request","Response","Headers"].map(Ne),Ud=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function cn(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),Ht(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{const s=n?Object.getOwnPropertyNames(t):Object.keys(t),o=s.length;let a;for(r=0;r<o;r++)a=s[r],e.call(null,t[a],a,t)}}function Ma(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,i;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const ut=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Na=t=>!nn(t)&&t!==ut;function Kr(){const{caseless:t}=Na(this)&&this||{},e={},n=(r,i)=>{const s=t&&Ma(e,i)||i;Pn(e[s])&&Pn(r)?e[s]=Kr(e[s],r):Pn(r)?e[s]=Kr({},r):Ht(r)?e[s]=r.slice():e[s]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&cn(arguments[r],n);return e}const Hd=(t,e,n,{allOwnKeys:r}={})=>(cn(e,(i,s)=>{n&&_e(i)?t[s]=wa(i,n):t[s]=i},{allOwnKeys:r}),t),Vd=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),zd=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Wd=(t,e,n,r)=>{let i,s,o;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),s=i.length;s-- >0;)o=i[s],(!r||r(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=n!==!1&&Ci(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},jd=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},qd=t=>{if(!t)return null;if(Ht(t))return t;let e=t.length;if(!Oa(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},$d=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Ci(Uint8Array)),Yd=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const s=i.value;e.call(t,s[0],s[1])}},Qd=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Zd=Ne("HTMLFormElement"),Xd=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),gs=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Kd=Ne("RegExp"),xa=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};cn(n,(i,s)=>{let o;(o=e(i,s,t))!==!1&&(r[s]=o||i)}),Object.defineProperties(t,r)},Jd=t=>{xa(t,(e,n)=>{if(_e(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(_e(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},eu=(t,e)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return Ht(t)?r(t):r(String(t).split(e)),n},tu=()=>{},nu=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,Ir="abcdefghijklmnopqrstuvwxyz",ms="0123456789",Pa={DIGIT:ms,ALPHA:Ir,ALPHA_DIGIT:Ir+Ir.toUpperCase()+ms},ru=(t=16,e=Pa.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function iu(t){return!!(t&&_e(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const su=t=>{const e=new Array(10),n=(r,i)=>{if(cr(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const s=Ht(r)?[]:{};return cn(r,(o,a)=>{const l=n(o,i+1);!nn(l)&&(s[a]=l)}),e[i]=void 0,s}}return r};return n(t,0)},ou=Ne("AsyncFunction"),au=t=>t&&(cr(t)||_e(t))&&_e(t.then)&&_e(t.catch),La=((t,e)=>t?setImmediate:e?((n,r)=>(ut.addEventListener("message",({source:i,data:s})=>{i===ut&&s===n&&r.length&&r.shift()()},!1),i=>{r.push(i),ut.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",_e(ut.postMessage)),lu=typeof queueMicrotask<"u"?queueMicrotask.bind(ut):typeof process<"u"&&process.nextTick||La,R={isArray:Ht,isArrayBuffer:Ca,isBuffer:Id,isFormData:Pd,isArrayBufferView:Sd,isString:Dd,isNumber:Oa,isBoolean:wd,isObject:cr,isPlainObject:Pn,isReadableStream:kd,isRequest:Bd,isResponse:Fd,isHeaders:Gd,isUndefined:nn,isDate:Cd,isFile:Od,isBlob:Md,isRegExp:Kd,isFunction:_e,isStream:xd,isURLSearchParams:Ld,isTypedArray:$d,isFileList:Nd,forEach:cn,merge:Kr,extend:Hd,trim:Ud,stripBOM:Vd,inherits:zd,toFlatObject:Wd,kindOf:ar,kindOfTest:Ne,endsWith:jd,toArray:qd,forEachEntry:Yd,matchAll:Qd,isHTMLForm:Zd,hasOwnProperty:gs,hasOwnProp:gs,reduceDescriptors:xa,freezeMethods:Jd,toObjectSet:eu,toCamelCase:Xd,noop:tu,toFiniteNumber:nu,findKey:Ma,global:ut,isContextDefined:Na,ALPHABET:Pa,generateString:ru,isSpecCompliantForm:iu,toJSONObject:su,isAsyncFn:ou,isThenable:au,setImmediate:La,asap:lu};function V(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}R.inherits(V,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:R.toJSONObject(this.config),code:this.code,status:this.status}}});const ka=V.prototype,Ba={};["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(t=>{Ba[t]={value:t}});Object.defineProperties(V,Ba);Object.defineProperty(ka,"isAxiosError",{value:!0});V.from=(t,e,n,r,i,s)=>{const o=Object.create(ka);return R.toFlatObject(t,o,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),V.call(o,t.message,e,n,r,i),o.cause=t,o.name=t.name,s&&Object.assign(o,s),o};const cu=null;function Jr(t){return R.isPlainObject(t)||R.isArray(t)}function Fa(t){return R.endsWith(t,"[]")?t.slice(0,-2):t}function Es(t,e,n){return t?t.concat(e).map(function(i,s){return i=Fa(i),!n&&s?"["+i+"]":i}).join(n?".":""):e}function du(t){return R.isArray(t)&&!t.some(Jr)}const uu=R.toFlatObject(R,{},null,function(e){return/^is[A-Z]/.test(e)});function dr(t,e,n){if(!R.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=R.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,m){return!R.isUndefined(m[g])});const r=n.metaTokens,i=n.visitor||c,s=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&R.isSpecCompliantForm(e);if(!R.isFunction(i))throw new TypeError("visitor must be a function");function d(h){if(h===null)return"";if(R.isDate(h))return h.toISOString();if(!l&&R.isBlob(h))throw new V("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(h)||R.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function c(h,g,m){let v=h;if(h&&!m&&typeof h=="object"){if(R.endsWith(g,"{}"))g=r?g:g.slice(0,-2),h=JSON.stringify(h);else if(R.isArray(h)&&du(h)||(R.isFileList(h)||R.endsWith(g,"[]"))&&(v=R.toArray(h)))return g=Fa(g),v.forEach(function(_,b){!(R.isUndefined(_)||_===null)&&e.append(o===!0?Es([g],b,s):o===null?g:g+"[]",d(_))}),!1}return Jr(h)?!0:(e.append(Es(m,g,s),d(h)),!1)}const u=[],p=Object.assign(uu,{defaultVisitor:c,convertValue:d,isVisitable:Jr});function f(h,g){if(!R.isUndefined(h)){if(u.indexOf(h)!==-1)throw Error("Circular reference detected in "+g.join("."));u.push(h),R.forEach(h,function(v,y){(!(R.isUndefined(v)||v===null)&&i.call(e,v,R.isString(y)?y.trim():y,g,p))===!0&&f(v,g?g.concat(y):[y])}),u.pop()}}if(!R.isObject(t))throw new TypeError("data must be an object");return f(t),e}function ys(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function Oi(t,e){this._pairs=[],t&&dr(t,this,e)}const Ga=Oi.prototype;Ga.append=function(e,n){this._pairs.push([e,n])};Ga.toString=function(e){const n=e?function(r){return e.call(this,r,ys)}:ys;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function fu(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ua(t,e,n){if(!e)return t;const r=n&&n.encode||fu;R.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(e,n):s=R.isURLSearchParams(e)?e.toString():new Oi(e,n).toString(r),s){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class vs{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){R.forEach(this.handlers,function(r){r!==null&&e(r)})}}const Ha={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},hu=typeof URLSearchParams<"u"?URLSearchParams:Oi,pu=typeof FormData<"u"?FormData:null,gu=typeof Blob<"u"?Blob:null,mu={isBrowser:!0,classes:{URLSearchParams:hu,FormData:pu,Blob:gu},protocols:["http","https","file","blob","url","data"]},Mi=typeof window<"u"&&typeof document<"u",ei=typeof navigator=="object"&&navigator||void 0,Eu=Mi&&(!ei||["ReactNative","NativeScript","NS"].indexOf(ei.product)<0),yu=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",vu=Mi&&window.location.href||"http://localhost",_u=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Mi,hasStandardBrowserEnv:Eu,hasStandardBrowserWebWorkerEnv:yu,navigator:ei,origin:vu},Symbol.toStringTag,{value:"Module"})),le={..._u,...mu};function bu(t,e){return dr(t,new le.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,s){return le.isNode&&R.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function Tu(t){return R.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Ru(t){const e={},n=Object.keys(t);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],e[s]=t[s];return e}function Va(t){function e(n,r,i,s){let o=n[s++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=s>=n.length;return o=!o&&R.isArray(i)?i.length:o,l?(R.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!a):((!i[o]||!R.isObject(i[o]))&&(i[o]=[]),e(n,r,i[o],s)&&R.isArray(i[o])&&(i[o]=Ru(i[o])),!a)}if(R.isFormData(t)&&R.isFunction(t.entries)){const n={};return R.forEachEntry(t,(r,i)=>{e(Tu(r),i,n,0)}),n}return null}function Au(t,e,n){if(R.isString(t))try{return(e||JSON.parse)(t),R.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const dn={transitional:Ha,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=R.isObject(e);if(s&&R.isHTMLForm(e)&&(e=new FormData(e)),R.isFormData(e))return i?JSON.stringify(Va(e)):e;if(R.isArrayBuffer(e)||R.isBuffer(e)||R.isStream(e)||R.isFile(e)||R.isBlob(e)||R.isReadableStream(e))return e;if(R.isArrayBufferView(e))return e.buffer;if(R.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return bu(e,this.formSerializer).toString();if((a=R.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return dr(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),Au(e)):e}],transformResponse:[function(e){const n=this.transitional||dn.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(R.isResponse(e)||R.isReadableStream(e))return e;if(e&&R.isString(e)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?V.from(a,V.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:le.classes.FormData,Blob:le.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};R.forEach(["delete","get","head","post","put","patch"],t=>{dn.headers[t]={}});const Iu=R.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"]),Su=t=>{const e={};let n,r,i;return t&&t.split(`
`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||e[n]&&Iu[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},_s=Symbol("internals");function qt(t){return t&&String(t).trim().toLowerCase()}function Ln(t){return t===!1||t==null?t:R.isArray(t)?t.map(Ln):String(t)}function Du(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const wu=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Sr(t,e,n,r,i){if(R.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!R.isString(e)){if(R.isString(r))return e.indexOf(r)!==-1;if(R.isRegExp(r))return r.test(e)}}function Cu(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Ou(t,e){const n=R.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,s,o){return this[r].call(this,e,i,s,o)},configurable:!0})})}let ye=class{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function s(a,l,d){const c=qt(l);if(!c)throw new Error("header name must be a non-empty string");const u=R.findKey(i,c);(!u||i[u]===void 0||d===!0||d===void 0&&i[u]!==!1)&&(i[u||l]=Ln(a))}const o=(a,l)=>R.forEach(a,(d,c)=>s(d,c,l));if(R.isPlainObject(e)||e instanceof this.constructor)o(e,n);else if(R.isString(e)&&(e=e.trim())&&!wu(e))o(Su(e),n);else if(R.isHeaders(e))for(const[a,l]of e.entries())s(l,a,r);else e!=null&&s(n,e,r);return this}get(e,n){if(e=qt(e),e){const r=R.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return Du(i);if(R.isFunction(n))return n.call(this,i,r);if(R.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=qt(e),e){const r=R.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||Sr(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function s(o){if(o=qt(o),o){const a=R.findKey(r,o);a&&(!n||Sr(r,r[a],a,n))&&(delete r[a],i=!0)}}return R.isArray(e)?e.forEach(s):s(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!e||Sr(this,this[s],s,e,!0))&&(delete this[s],i=!0)}return i}normalize(e){const n=this,r={};return R.forEach(this,(i,s)=>{const o=R.findKey(r,s);if(o){n[o]=Ln(i),delete n[s];return}const a=e?Cu(s):String(s).trim();a!==s&&delete n[s],n[a]=Ln(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return R.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&R.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[_s]=this[_s]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=qt(o);r[a]||(Ou(i,o),r[a]=!0)}return R.isArray(e)?e.forEach(s):s(e),this}};ye.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);R.reduceDescriptors(ye.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});R.freezeMethods(ye);function Dr(t,e){const n=this||dn,r=e||n,i=ye.from(r.headers);let s=r.data;return R.forEach(t,function(a){s=a.call(n,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function za(t){return!!(t&&t.__CANCEL__)}function Vt(t,e,n){V.call(this,t??"canceled",V.ERR_CANCELED,e,n),this.name="CanceledError"}R.inherits(Vt,V,{__CANCEL__:!0});function Wa(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new V("Request failed with status code "+n.status,[V.ERR_BAD_REQUEST,V.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Mu(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Nu(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,s=0,o;return e=e!==void 0?e:1e3,function(l){const d=Date.now(),c=r[s];o||(o=d),n[i]=l,r[i]=d;let u=s,p=0;for(;u!==i;)p+=n[u++],u=u%t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),d-o<e)return;const f=c&&d-c;return f?Math.round(p*1e3/f):void 0}}function xu(t,e){let n=0,r=1e3/e,i,s;const o=(d,c=Date.now())=>{n=c,i=null,s&&(clearTimeout(s),s=null),t.apply(null,d)};return[(...d)=>{const c=Date.now(),u=c-n;u>=r?o(d,c):(i=d,s||(s=setTimeout(()=>{s=null,o(i)},r-u)))},()=>i&&o(i)]}const zn=(t,e,n=3)=>{let r=0;const i=Nu(50,250);return xu(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,l=o-r,d=i(l),c=o<=a;r=o;const u={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:d||void 0,estimated:d&&a&&c?(a-o)/d:void 0,event:s,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(u)},n)},bs=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Ts=t=>(...e)=>R.asap(()=>t(...e)),Pu=le.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,le.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(le.origin),le.navigator&&/(msie|trident)/i.test(le.navigator.userAgent)):()=>!0,Lu=le.hasStandardBrowserEnv?{write(t,e,n,r,i,s){const o=[t+"="+encodeURIComponent(e)];R.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),R.isString(r)&&o.push("path="+r),R.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ku(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Bu(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function ja(t,e){return t&&!ku(e)?Bu(t,e):e}const Rs=t=>t instanceof ye?{...t}:t;function bt(t,e){e=e||{};const n={};function r(d,c,u,p){return R.isPlainObject(d)&&R.isPlainObject(c)?R.merge.call({caseless:p},d,c):R.isPlainObject(c)?R.merge({},c):R.isArray(c)?c.slice():c}function i(d,c,u,p){if(R.isUndefined(c)){if(!R.isUndefined(d))return r(void 0,d,u,p)}else return r(d,c,u,p)}function s(d,c){if(!R.isUndefined(c))return r(void 0,c)}function o(d,c){if(R.isUndefined(c)){if(!R.isUndefined(d))return r(void 0,d)}else return r(void 0,c)}function a(d,c,u){if(u in e)return r(d,c);if(u in t)return r(void 0,d)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(d,c,u)=>i(Rs(d),Rs(c),u,!0)};return R.forEach(Object.keys(Object.assign({},t,e)),function(c){const u=l[c]||i,p=u(t[c],e[c],c);R.isUndefined(p)&&u!==a||(n[c]=p)}),n}const qa=t=>{const e=bt({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=e;e.headers=o=ye.from(o),e.url=Ua(ja(e.baseURL,e.url),t.params,t.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(R.isFormData(n)){if(le.hasStandardBrowserEnv||le.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[d,...c]=l?l.split(";").map(u=>u.trim()).filter(Boolean):[];o.setContentType([d||"multipart/form-data",...c].join("; "))}}if(le.hasStandardBrowserEnv&&(r&&R.isFunction(r)&&(r=r(e)),r||r!==!1&&Pu(e.url))){const d=i&&s&&Lu.read(s);d&&o.set(i,d)}return e},Fu=typeof XMLHttpRequest<"u",Gu=Fu&&function(t){return new Promise(function(n,r){const i=qa(t);let s=i.data;const o=ye.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:d}=i,c,u,p,f,h;function g(){f&&f(),h&&h(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let m=new XMLHttpRequest;m.open(i.method.toUpperCase(),i.url,!0),m.timeout=i.timeout;function v(){if(!m)return;const _=ye.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),A={data:!a||a==="text"||a==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:_,config:t,request:m};Wa(function(M){n(M),g()},function(M){r(M),g()},A),m=null}"onloadend"in m?m.onloadend=v:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(v)},m.onabort=function(){m&&(r(new V("Request aborted",V.ECONNABORTED,t,m)),m=null)},m.onerror=function(){r(new V("Network Error",V.ERR_NETWORK,t,m)),m=null},m.ontimeout=function(){let b=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const A=i.transitional||Ha;i.timeoutErrorMessage&&(b=i.timeoutErrorMessage),r(new V(b,A.clarifyTimeoutError?V.ETIMEDOUT:V.ECONNABORTED,t,m)),m=null},s===void 0&&o.setContentType(null),"setRequestHeader"in m&&R.forEach(o.toJSON(),function(b,A){m.setRequestHeader(A,b)}),R.isUndefined(i.withCredentials)||(m.withCredentials=!!i.withCredentials),a&&a!=="json"&&(m.responseType=i.responseType),d&&([p,h]=zn(d,!0),m.addEventListener("progress",p)),l&&m.upload&&([u,f]=zn(l),m.upload.addEventListener("progress",u),m.upload.addEventListener("loadend",f)),(i.cancelToken||i.signal)&&(c=_=>{m&&(r(!_||_.type?new Vt(null,t,m):_),m.abort(),m=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const y=Mu(i.url);if(y&&le.protocols.indexOf(y)===-1){r(new V("Unsupported protocol "+y+":",V.ERR_BAD_REQUEST,t));return}m.send(s||null)})},Uu=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,i;const s=function(d){if(!i){i=!0,a();const c=d instanceof Error?d:this.reason;r.abort(c instanceof V?c:new Vt(c instanceof Error?c.message:c))}};let o=e&&setTimeout(()=>{o=null,s(new V(`timeout ${e} of ms exceeded`,V.ETIMEDOUT))},e);const a=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),t=null)};t.forEach(d=>d.addEventListener("abort",s));const{signal:l}=r;return l.unsubscribe=()=>R.asap(a),l}},Hu=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let r=0,i;for(;r<n;)i=r+e,yield t.slice(r,i),r=i},Vu=async function*(t,e){for await(const n of zu(t))yield*Hu(n,e)},zu=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},As=(t,e,n,r)=>{const i=Vu(t,e);let s=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:d,value:c}=await i.next();if(d){a(),l.close();return}let u=c.byteLength;if(n){let p=s+=u;n(p)}l.enqueue(new Uint8Array(c))}catch(d){throw a(d),d}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},ur=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",$a=ur&&typeof ReadableStream=="function",Wu=ur&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Ya=(t,...e)=>{try{return!!t(...e)}catch{return!1}},ju=$a&&Ya(()=>{let t=!1;const e=new Request(le.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Is=64*1024,ti=$a&&Ya(()=>R.isReadableStream(new Response("").body)),Wn={stream:ti&&(t=>t.body)};ur&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Wn[e]&&(Wn[e]=R.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new V(`Response type '${e}' is not supported`,V.ERR_NOT_SUPPORT,r)})})})(new Response);const qu=async t=>{if(t==null)return 0;if(R.isBlob(t))return t.size;if(R.isSpecCompliantForm(t))return(await new Request(le.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(R.isArrayBufferView(t)||R.isArrayBuffer(t))return t.byteLength;if(R.isURLSearchParams(t)&&(t=t+""),R.isString(t))return(await Wu(t)).byteLength},$u=async(t,e)=>{const n=R.toFiniteNumber(t.getContentLength());return n??qu(e)},Yu=ur&&(async t=>{let{url:e,method:n,data:r,signal:i,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:l,responseType:d,headers:c,withCredentials:u="same-origin",fetchOptions:p}=qa(t);d=d?(d+"").toLowerCase():"text";let f=Uu([i,s&&s.toAbortSignal()],o),h;const g=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let m;try{if(l&&ju&&n!=="get"&&n!=="head"&&(m=await $u(c,r))!==0){let A=new Request(e,{method:"POST",body:r,duplex:"half"}),S;if(R.isFormData(r)&&(S=A.headers.get("content-type"))&&c.setContentType(S),A.body){const[M,I]=bs(m,zn(Ts(l)));r=As(A.body,Is,M,I)}}R.isString(u)||(u=u?"include":"omit");const v="credentials"in Request.prototype;h=new Request(e,{...p,signal:f,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:v?u:void 0});let y=await fetch(h);const _=ti&&(d==="stream"||d==="response");if(ti&&(a||_&&g)){const A={};["status","statusText","headers"].forEach(N=>{A[N]=y[N]});const S=R.toFiniteNumber(y.headers.get("content-length")),[M,I]=a&&bs(S,zn(Ts(a),!0))||[];y=new Response(As(y.body,Is,M,()=>{I&&I(),g&&g()}),A)}d=d||"text";let b=await Wn[R.findKey(Wn,d)||"text"](y,t);return!_&&g&&g(),await new Promise((A,S)=>{Wa(A,S,{data:b,headers:ye.from(y.headers),status:y.status,statusText:y.statusText,config:t,request:h})})}catch(v){throw g&&g(),v&&v.name==="TypeError"&&/fetch/i.test(v.message)?Object.assign(new V("Network Error",V.ERR_NETWORK,t,h),{cause:v.cause||v}):V.from(v,v&&v.code,t,h)}}),ni={http:cu,xhr:Gu,fetch:Yu};R.forEach(ni,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Ss=t=>`- ${t}`,Qu=t=>R.isFunction(t)||t===null||t===!1,Qa={getAdapter:t=>{t=R.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let s=0;s<e;s++){n=t[s];let o;if(r=n,!Qu(n)&&(r=ni[(o=String(n)).toLowerCase()],r===void 0))throw new V(`Unknown adapter '${o}'`);if(r)break;i[o||"#"+s]=r}if(!r){const s=Object.entries(i).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=e?s.length>1?`since :
`+s.map(Ss).join(`
`):" "+Ss(s[0]):"as no adapter specified";throw new V("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:ni};function wr(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Vt(null,t)}function Ds(t){return wr(t),t.headers=ye.from(t.headers),t.data=Dr.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Qa.getAdapter(t.adapter||dn.adapter)(t).then(function(r){return wr(t),r.data=Dr.call(t,t.transformResponse,r),r.headers=ye.from(r.headers),r},function(r){return za(r)||(wr(t),r&&r.response&&(r.response.data=Dr.call(t,t.transformResponse,r.response),r.response.headers=ye.from(r.response.headers))),Promise.reject(r)})}const Za="1.7.9",fr={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{fr[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const ws={};fr.transitional=function(e,n,r){function i(s,o){return"[Axios v"+Za+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,a)=>{if(e===!1)throw new V(i(o," has been removed"+(n?" in "+n:"")),V.ERR_DEPRECATED);return n&&!ws[o]&&(ws[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,o,a):!0}};fr.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function Zu(t,e,n){if(typeof t!="object")throw new V("options must be an object",V.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const s=r[i],o=e[s];if(o){const a=t[s],l=a===void 0||o(a,s,t);if(l!==!0)throw new V("option "+s+" must be "+l,V.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new V("Unknown option "+s,V.ERR_BAD_OPTION)}}const kn={assertOptions:Zu,validators:fr},Pe=kn.validators;let gt=class{constructor(e){this.defaults=e,this.interceptors={request:new vs,response:new vs}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+s):r.stack=s}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=bt(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&kn.assertOptions(r,{silentJSONParsing:Pe.transitional(Pe.boolean),forcedJSONParsing:Pe.transitional(Pe.boolean),clarifyTimeoutError:Pe.transitional(Pe.boolean)},!1),i!=null&&(R.isFunction(i)?n.paramsSerializer={serialize:i}:kn.assertOptions(i,{encode:Pe.function,serialize:Pe.function},!0)),kn.assertOptions(n,{baseUrl:Pe.spelling("baseURL"),withXsrfToken:Pe.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&R.merge(s.common,s[n.method]);s&&R.forEach(["delete","get","head","post","put","patch","common"],h=>{delete s[h]}),n.headers=ye.concat(o,s);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const d=[];this.interceptors.response.forEach(function(g){d.push(g.fulfilled,g.rejected)});let c,u=0,p;if(!l){const h=[Ds.bind(this),void 0];for(h.unshift.apply(h,a),h.push.apply(h,d),p=h.length,c=Promise.resolve(n);u<p;)c=c.then(h[u++],h[u++]);return c}p=a.length;let f=n;for(u=0;u<p;){const h=a[u++],g=a[u++];try{f=h(f)}catch(m){g.call(this,m);break}}try{c=Ds.call(this,f)}catch(h){return Promise.reject(h)}for(u=0,p=d.length;u<p;)c=c.then(d[u++],d[u++]);return c}getUri(e){e=bt(this.defaults,e);const n=ja(e.baseURL,e.url);return Ua(n,e.params,e.paramsSerializer)}};R.forEach(["delete","get","head","options"],function(e){gt.prototype[e]=function(n,r){return this.request(bt(r||{},{method:e,url:n,data:(r||{}).data}))}});R.forEach(["post","put","patch"],function(e){function n(r){return function(s,o,a){return this.request(bt(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}gt.prototype[e]=n(),gt.prototype[e+"Form"]=n(!0)});let Xu=class Xa{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},e(function(s,o,a){r.reason||(r.reason=new Vt(s,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Xa(function(i){e=i}),cancel:e}}};function Ku(t){return function(n){return t.apply(null,n)}}function Ju(t){return R.isObject(t)&&t.isAxiosError===!0}const ri={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ri).forEach(([t,e])=>{ri[e]=t});function Ka(t){const e=new gt(t),n=wa(gt.prototype.request,e);return R.extend(n,gt.prototype,e,{allOwnKeys:!0}),R.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return Ka(bt(t,i))},n}const ee=Ka(dn);ee.Axios=gt;ee.CanceledError=Vt;ee.CancelToken=Xu;ee.isCancel=za;ee.VERSION=Za;ee.toFormData=dr;ee.AxiosError=V;ee.Cancel=ee.CanceledError;ee.all=function(e){return Promise.all(e)};ee.spread=Ku;ee.isAxiosError=Ju;ee.mergeConfig=bt;ee.AxiosHeaders=ye;ee.formToJSON=t=>Va(R.isHTMLForm(t)?new FormData(t):t);ee.getAdapter=Qa.getAdapter;ee.HttpStatusCode=ri;ee.default=ee;const{Axios:gR,AxiosError:mR,CanceledError:ER,isCancel:yR,CancelToken:vR,VERSION:_R,all:bR,Cancel:TR,isAxiosError:RR,spread:AR,toFormData:IR,AxiosHeaders:SR,HttpStatusCode:DR,formToJSON:wR,getAdapter:CR,mergeConfig:OR}=ee;window.axios=ee;window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";/*!
 * FilePond 4.32.5
 * Licensed under MIT, https://opensource.org/licenses/MIT/
 * Please visit https://pqina.nl/filepond/ for details.
 */const ef=t=>t instanceof HTMLElement,tf=(t,e=[],n=[])=>{const r={...t},i=[],s=[],o=()=>({...r}),a=()=>{const h=[...i];return i.length=0,h},l=()=>{const h=[...s];s.length=0,h.forEach(({type:g,data:m})=>{d(g,m)})},d=(h,g,m)=>{if(m&&!document.hidden){s.push({type:h,data:g});return}f[h]&&f[h](g),i.push({type:h,data:g})},c=(h,...g)=>p[h]?p[h](...g):null,u={getState:o,processActionQueue:a,processDispatchQueue:l,dispatch:d,query:c};let p={};e.forEach(h=>{p={...h(r),...p}});let f={};return n.forEach(h=>{f={...h(d,c,r),...f}}),u},nf=(t,e,n)=>{if(typeof n=="function"){t[e]=n;return}Object.defineProperty(t,e,{...n})},K=(t,e)=>{for(const n in t)t.hasOwnProperty(n)&&e(n,t[n])},et=t=>{const e={};return K(t,n=>{nf(e,n,t[n])}),e},re=(t,e,n=null)=>{if(n===null)return t.getAttribute(e)||t.hasAttribute(e);t.setAttribute(e,n)},rf="http://www.w3.org/2000/svg",sf=["svg","path"],Cs=t=>sf.includes(t),jn=(t,e,n={})=>{typeof e=="object"&&(n=e,e=null);const r=Cs(t)?document.createElementNS(rf,t):document.createElement(t);return e&&(Cs(t)?re(r,"class",e):r.className=e),K(n,(i,s)=>{re(r,i,s)}),r},of=t=>(e,n)=>{typeof n<"u"&&t.children[n]?t.insertBefore(e,t.children[n]):t.appendChild(e)},af=(t,e)=>(n,r)=>(typeof r<"u"?e.splice(r,0,n):e.push(n),n),lf=(t,e)=>n=>(e.splice(e.indexOf(n),1),n.element.parentNode&&t.removeChild(n.element),n),cf=typeof window<"u"&&typeof window.document<"u",Ja=()=>cf,df=Ja()?jn("svg"):{},uf="children"in df?t=>t.children.length:t=>t.childNodes.length,el=(t,e,n,r)=>{const i=n[0]||t.left,s=n[1]||t.top,o=i+t.width,a=s+t.height*(r[1]||1),l={element:{...t},inner:{left:t.left,top:t.top,right:t.right,bottom:t.bottom},outer:{left:i,top:s,right:o,bottom:a}};return e.filter(d=>!d.isRectIgnored()).map(d=>d.rect).forEach(d=>{Os(l.inner,{...d.inner}),Os(l.outer,{...d.outer})}),Ms(l.inner),l.outer.bottom+=l.element.marginBottom,l.outer.right+=l.element.marginRight,Ms(l.outer),l},Os=(t,e)=>{e.top+=t.top,e.right+=t.left,e.bottom+=t.top,e.left+=t.left,e.bottom>t.bottom&&(t.bottom=e.bottom),e.right>t.right&&(t.right=e.right)},Ms=t=>{t.width=t.right-t.left,t.height=t.bottom-t.top},ft=t=>typeof t=="number",ff=(t,e,n,r=.001)=>Math.abs(t-e)<r&&Math.abs(n)<r,hf=({stiffness:t=.5,damping:e=.75,mass:n=10}={})=>{let r=null,i=null,s=0,o=!1;const d=et({interpolate:(c,u)=>{if(o)return;if(!(ft(r)&&ft(i))){o=!0,s=0;return}const p=-(i-r)*t;s+=p/n,i+=s,s*=e,ff(i,r,s)||u?(i=r,s=0,o=!0,d.onupdate(i),d.oncomplete(i)):d.onupdate(i)},target:{set:c=>{if(ft(c)&&!ft(i)&&(i=c),r===null&&(r=c,i=c),r=c,i===r||typeof r>"u"){o=!0,s=0,d.onupdate(i),d.oncomplete(i);return}o=!1},get:()=>r},resting:{get:()=>o},onupdate:c=>{},oncomplete:c=>{}});return d},pf=t=>t<.5?2*t*t:-1+(4-2*t)*t,gf=({duration:t=500,easing:e=pf,delay:n=0}={})=>{let r=null,i,s,o=!0,a=!1,l=null;const c=et({interpolate:(u,p)=>{o||l===null||(r===null&&(r=u),!(u-r<n)&&(i=u-r-n,i>=t||p?(i=1,s=a?0:1,c.onupdate(s*l),c.oncomplete(s*l),o=!0):(s=i/t,c.onupdate((i>=0?e(a?1-s:s):0)*l))))},target:{get:()=>a?0:l,set:u=>{if(l===null){l=u,c.onupdate(u),c.oncomplete(u);return}u<l?(l=1,a=!0):(a=!1,l=u),o=!1,r=null}},resting:{get:()=>o},onupdate:u=>{},oncomplete:u=>{}});return c},Ns={spring:hf,tween:gf},mf=(t,e,n)=>{const r=t[e]&&typeof t[e][n]=="object"?t[e][n]:t[e]||t,i=typeof r=="string"?r:r.type,s=typeof r=="object"?{...r}:{};return Ns[i]?Ns[i](s):null},Ni=(t,e,n,r=!1)=>{e=Array.isArray(e)?e:[e],e.forEach(i=>{t.forEach(s=>{let o=s,a=()=>n[s],l=d=>n[s]=d;typeof s=="object"&&(o=s.key,a=s.getter||a,l=s.setter||l),!(i[o]&&!r)&&(i[o]={get:a,set:l})})})},Ef=({mixinConfig:t,viewProps:e,viewInternalAPI:n,viewExternalAPI:r})=>{const i={...e},s=[];return K(t,(o,a)=>{const l=mf(a);if(!l)return;l.onupdate=c=>{e[o]=c},l.target=i[o],Ni([{key:o,setter:c=>{l.target!==c&&(l.target=c)},getter:()=>e[o]}],[n,r],e,!0),s.push(l)}),{write:o=>{let a=document.hidden,l=!0;return s.forEach(d=>{d.resting||(l=!1),d.interpolate(o,a)}),l},destroy:()=>{}}},yf=t=>(e,n)=>{t.addEventListener(e,n)},vf=t=>(e,n)=>{t.removeEventListener(e,n)},_f=({mixinConfig:t,viewProps:e,viewInternalAPI:n,viewExternalAPI:r,viewState:i,view:s})=>{const o=[],a=yf(s.element),l=vf(s.element);return r.on=(d,c)=>{o.push({type:d,fn:c}),a(d,c)},r.off=(d,c)=>{o.splice(o.findIndex(u=>u.type===d&&u.fn===c),1),l(d,c)},{write:()=>!0,destroy:()=>{o.forEach(d=>{l(d.type,d.fn)})}}},bf=({mixinConfig:t,viewProps:e,viewExternalAPI:n})=>{Ni(t,n,e)},de=t=>t!=null,Tf={opacity:1,scaleX:1,scaleY:1,translateX:0,translateY:0,rotateX:0,rotateY:0,rotateZ:0,originX:0,originY:0},Rf=({mixinConfig:t,viewProps:e,viewInternalAPI:n,viewExternalAPI:r,view:i})=>{const s={...e},o={};Ni(t,[n,r],e);const a=()=>[e.translateX||0,e.translateY||0],l=()=>[e.scaleX||0,e.scaleY||0],d=()=>i.rect?el(i.rect,i.childViews,a(),l()):null;return n.rect={get:d},r.rect={get:d},t.forEach(c=>{e[c]=typeof s[c]>"u"?Tf[c]:s[c]}),{write:()=>{if(Af(o,e))return If(i.element,e),Object.assign(o,{...e}),!0},destroy:()=>{}}},Af=(t,e)=>{if(Object.keys(t).length!==Object.keys(e).length)return!0;for(const n in e)if(e[n]!==t[n])return!0;return!1},If=(t,{opacity:e,perspective:n,translateX:r,translateY:i,scaleX:s,scaleY:o,rotateX:a,rotateY:l,rotateZ:d,originX:c,originY:u,width:p,height:f})=>{let h="",g="";(de(c)||de(u))&&(g+=`transform-origin: ${c||0}px ${u||0}px;`),de(n)&&(h+=`perspective(${n}px) `),(de(r)||de(i))&&(h+=`translate3d(${r||0}px, ${i||0}px, 0) `),(de(s)||de(o))&&(h+=`scale3d(${de(s)?s:1}, ${de(o)?o:1}, 1) `),de(d)&&(h+=`rotateZ(${d}rad) `),de(a)&&(h+=`rotateX(${a}rad) `),de(l)&&(h+=`rotateY(${l}rad) `),h.length&&(g+=`transform:${h};`),de(e)&&(g+=`opacity:${e};`,e===0&&(g+="visibility:hidden;"),e<1&&(g+="pointer-events:none;")),de(f)&&(g+=`height:${f}px;`),de(p)&&(g+=`width:${p}px;`);const m=t.elementCurrentStyle||"";(g.length!==m.length||g!==m)&&(t.style.cssText=g,t.elementCurrentStyle=g)},Sf={styles:Rf,listeners:_f,animations:Ef,apis:bf},xs=(t={},e={},n={})=>(e.layoutCalculated||(t.paddingTop=parseInt(n.paddingTop,10)||0,t.marginTop=parseInt(n.marginTop,10)||0,t.marginRight=parseInt(n.marginRight,10)||0,t.marginBottom=parseInt(n.marginBottom,10)||0,t.marginLeft=parseInt(n.marginLeft,10)||0,e.layoutCalculated=!0),t.left=e.offsetLeft||0,t.top=e.offsetTop||0,t.width=e.offsetWidth||0,t.height=e.offsetHeight||0,t.right=t.left+t.width,t.bottom=t.top+t.height,t.scrollTop=e.scrollTop,t.hidden=e.offsetParent===null,t),ne=({tag:t="div",name:e=null,attributes:n={},read:r=()=>{},write:i=()=>{},create:s=()=>{},destroy:o=()=>{},filterFrameActionsForChild:a=(f,h)=>h,didCreateView:l=()=>{},didWriteView:d=()=>{},ignoreRect:c=!1,ignoreRectUpdate:u=!1,mixins:p=[]}={})=>(f,h={})=>{const g=jn(t,`filepond--${e}`,n),m=window.getComputedStyle(g,null),v=xs();let y=null,_=!1;const b=[],A=[],S={},M={},I=[i],N=[r],G=[o],x=()=>g,P=()=>b.concat(),$=()=>S,O=W=>(ae,Ge)=>ae(W,Ge),z=()=>y||(y=el(v,b,[0,0],[1,1]),y),w=()=>m,C=()=>{y=null,b.forEach(Ge=>Ge._read()),!(u&&v.width&&v.height)&&xs(v,g,m);const ae={root:De,props:h,rect:v};N.forEach(Ge=>Ge(ae))},L=(W,ae,Ge)=>{let Dt=ae.length===0;return I.forEach(pe=>{pe({props:h,root:De,actions:ae,timestamp:W,shouldOptimize:Ge})===!1&&(Dt=!1)}),A.forEach(pe=>{pe.write(W)===!1&&(Dt=!1)}),b.filter(pe=>!!pe.element.parentNode).forEach(pe=>{pe._write(W,a(pe,ae),Ge)||(Dt=!1)}),b.forEach((pe,mn)=>{pe.element.parentNode||(De.appendChild(pe.element,mn),pe._read(),pe._write(W,a(pe,ae),Ge),Dt=!1)}),_=Dt,d({props:h,root:De,actions:ae,timestamp:W}),Dt},k=()=>{A.forEach(W=>W.destroy()),G.forEach(W=>{W({root:De,props:h})}),b.forEach(W=>W._destroy())},Z={element:{get:x},style:{get:w},childViews:{get:P}},U={...Z,rect:{get:z},ref:{get:$},is:W=>e===W,appendChild:of(g),createChildView:O(f),linkView:W=>(b.push(W),W),unlinkView:W=>{b.splice(b.indexOf(W),1)},appendChildView:af(g,b),removeChildView:lf(g,b),registerWriter:W=>I.push(W),registerReader:W=>N.push(W),registerDestroyer:W=>G.push(W),invalidateLayout:()=>g.layoutCalculated=!1,dispatch:f.dispatch,query:f.query},at={element:{get:x},childViews:{get:P},rect:{get:z},resting:{get:()=>_},isRectIgnored:()=>c,_read:C,_write:L,_destroy:k},jt={...Z,rect:{get:()=>v}};Object.keys(p).sort((W,ae)=>W==="styles"?1:ae==="styles"?-1:0).forEach(W=>{const ae=Sf[W]({mixinConfig:p[W],viewProps:h,viewState:M,viewInternalAPI:U,viewExternalAPI:at,view:et(jt)});ae&&A.push(ae)});const De=et(U);s({root:De,props:h});const Ar=uf(g);return b.forEach((W,ae)=>{De.appendChild(W.element,Ar+ae)}),l(De),et(at)},Df=(t,e,n=60)=>{const r="__framePainter";if(window[r]){window[r].readers.push(t),window[r].writers.push(e);return}window[r]={readers:[t],writers:[e]};const i=window[r],s=1e3/n;let o=null,a=null,l=null,d=null;const c=()=>{document.hidden?(l=()=>window.setTimeout(()=>u(performance.now()),s),d=()=>window.clearTimeout(a)):(l=()=>window.requestAnimationFrame(u),d=()=>window.cancelAnimationFrame(a))};document.addEventListener("visibilitychange",()=>{d&&d(),c(),u(performance.now())});const u=p=>{a=l(u),o||(o=p);const f=p-o;f<=s||(o=p-f%s,i.readers.forEach(h=>h()),i.writers.forEach(h=>h(p)))};return c(),u(performance.now()),{pause:()=>{d(a)}}},he=(t,e)=>({root:n,props:r,actions:i=[],timestamp:s,shouldOptimize:o})=>{i.filter(a=>t[a.type]).forEach(a=>t[a.type]({root:n,props:r,action:a.data,timestamp:s,shouldOptimize:o})),e&&e({root:n,props:r,actions:i,timestamp:s,shouldOptimize:o})},Ps=(t,e)=>e.parentNode.insertBefore(t,e),Ls=(t,e)=>e.parentNode.insertBefore(t,e.nextSibling),hr=t=>Array.isArray(t),We=t=>t==null,wf=t=>t.trim(),pr=t=>""+t,Cf=(t,e=",")=>We(t)?[]:hr(t)?t:pr(t).split(e).map(wf).filter(n=>n.length),tl=t=>typeof t=="boolean",nl=t=>tl(t)?t:t==="true",fe=t=>typeof t=="string",rl=t=>ft(t)?t:fe(t)?pr(t).replace(/[a-z]+/gi,""):0,Bn=t=>parseInt(rl(t),10),ks=t=>parseFloat(rl(t)),zt=t=>ft(t)&&isFinite(t)&&Math.floor(t)===t,Bs=(t,e=1e3)=>{if(zt(t))return t;let n=pr(t).trim();return/MB$/i.test(n)?(n=n.replace(/MB$i/,"").trim(),Bn(n)*e*e):/KB/i.test(n)?(n=n.replace(/KB$i/,"").trim(),Bn(n)*e):Bn(n)},ht=t=>typeof t=="function",Of=t=>{let e=self,n=t.split("."),r=null;for(;r=n.shift();)if(e=e[r],!e)return null;return e},Fs={process:"POST",patch:"PATCH",revert:"DELETE",fetch:"GET",restore:"GET",load:"GET"},Mf=t=>{const e={};return e.url=fe(t)?t:t.url||"",e.timeout=t.timeout?parseInt(t.timeout,10):0,e.headers=t.headers?t.headers:{},K(Fs,n=>{e[n]=Nf(n,t[n],Fs[n],e.timeout,e.headers)}),e.process=t.process||fe(t)||t.url?e.process:null,e.remove=t.remove||null,delete e.headers,e},Nf=(t,e,n,r,i)=>{if(e===null)return null;if(typeof e=="function")return e;const s={url:n==="GET"||n==="PATCH"?`?${t}=`:"",method:n,headers:i,withCredentials:!1,timeout:r,onload:null,ondata:null,onerror:null};if(fe(e))return s.url=e,s;if(Object.assign(s,e),fe(s.headers)){const o=s.headers.split(/:(.+)/);s.headers={header:o[0],value:o[1]}}return s.withCredentials=nl(s.withCredentials),s},xf=t=>Mf(t),Pf=t=>t===null,se=t=>typeof t=="object"&&t!==null,Lf=t=>se(t)&&fe(t.url)&&se(t.process)&&se(t.revert)&&se(t.restore)&&se(t.fetch),ii=t=>hr(t)?"array":Pf(t)?"null":zt(t)?"int":/^[0-9]+ ?(?:GB|MB|KB)$/gi.test(t)?"bytes":Lf(t)?"api":typeof t,kf=t=>t.replace(/{\s*'/g,'{"').replace(/'\s*}/g,'"}').replace(/'\s*:/g,'":').replace(/:\s*'/g,':"').replace(/,\s*'/g,',"').replace(/'\s*,/g,'",'),Bf={array:Cf,boolean:nl,int:t=>ii(t)==="bytes"?Bs(t):Bn(t),number:ks,float:ks,bytes:Bs,string:t=>ht(t)?t:pr(t),function:t=>Of(t),serverapi:xf,object:t=>{try{return JSON.parse(kf(t))}catch{return null}}},Ff=(t,e)=>Bf[e](t),il=(t,e,n)=>{if(t===e)return t;let r=ii(t);if(r!==n){const i=Ff(t,n);if(r=ii(i),i===null)throw`Trying to assign value with incorrect type to "${option}", allowed type: "${n}"`;t=i}return t},Gf=(t,e)=>{let n=t;return{enumerable:!0,get:()=>n,set:r=>{n=il(r,t,e)}}},Uf=t=>{const e={};return K(t,n=>{const r=t[n];e[n]=Gf(r[0],r[1])}),et(e)},Hf=t=>({items:[],listUpdateTimeout:null,itemUpdateTimeout:null,processingQueue:[],options:Uf(t)}),gr=(t,e="-")=>t.split(/(?=[A-Z])/).map(n=>n.toLowerCase()).join(e),Vf=(t,e)=>{const n={};return K(e,r=>{n[r]={get:()=>t.getState().options[r],set:i=>{t.dispatch(`SET_${gr(r,"_").toUpperCase()}`,{value:i})}}}),n},zf=t=>(e,n,r)=>{const i={};return K(t,s=>{const o=gr(s,"_").toUpperCase();i[`SET_${o}`]=a=>{try{r.options[s]=a.value}catch{}e(`DID_SET_${o}`,{value:r.options[s]})}}),i},Wf=t=>e=>{const n={};return K(t,r=>{n[`GET_${gr(r,"_").toUpperCase()}`]=i=>e.options[r]}),n},Ie={API:1,DROP:2,BROWSE:3,PASTE:4,NONE:5},xi=()=>Math.random().toString(36).substring(2,11),Pi=(t,e)=>t.splice(e,1),jf=(t,e)=>{e?t():document.hidden?Promise.resolve(1).then(t):setTimeout(t,0)},mr=()=>{const t=[],e=(r,i)=>{Pi(t,t.findIndex(s=>s.event===r&&(s.cb===i||!i)))},n=(r,i,s)=>{t.filter(o=>o.event===r).map(o=>o.cb).forEach(o=>jf(()=>o(...i),s))};return{fireSync:(r,...i)=>{n(r,i,!0)},fire:(r,...i)=>{n(r,i,!1)},on:(r,i)=>{t.push({event:r,cb:i})},onOnce:(r,i)=>{t.push({event:r,cb:(...s)=>{e(r,i),i(...s)}})},off:e}},sl=(t,e,n)=>{Object.getOwnPropertyNames(t).filter(r=>!n.includes(r)).forEach(r=>Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r)))},qf=["fire","process","revert","load","on","off","onOnce","retryLoad","extend","archive","archived","release","released","requestProcessing","freeze"],ge=t=>{const e={};return sl(t,e,qf),e},$f=t=>{t.forEach((e,n)=>{e.released&&Pi(t,n)})},H={INIT:1,IDLE:2,PROCESSING_QUEUED:9,PROCESSING:3,PROCESSING_COMPLETE:5,PROCESSING_ERROR:6,PROCESSING_REVERT_ERROR:10,LOADING:7,LOAD_ERROR:8},ie={INPUT:1,LIMBO:2,LOCAL:3},ol=t=>/[^0-9]+/.exec(t),al=()=>ol(1.1.toLocaleString())[0],Yf=()=>{const t=al(),e=1e3.toLocaleString();return e!=="1000"?ol(e)[0]:t==="."?",":"."},D={BOOLEAN:"boolean",INT:"int",NUMBER:"number",STRING:"string",ARRAY:"array",OBJECT:"object",FUNCTION:"function",ACTION:"action",SERVER_API:"serverapi",REGEX:"regex"},Li=[],we=(t,e,n)=>new Promise((r,i)=>{const s=Li.filter(a=>a.key===t).map(a=>a.cb);if(s.length===0){r(e);return}const o=s.shift();s.reduce((a,l)=>a.then(d=>l(d,n)),o(e,n)).then(a=>r(a)).catch(a=>i(a))}),Rt=(t,e,n)=>Li.filter(r=>r.key===t).map(r=>r.cb(e,n)),Qf=(t,e)=>Li.push({key:t,cb:e}),Zf=t=>Object.assign(Ct,t),qn=()=>({...Ct}),Xf=t=>{K(t,(e,n)=>{Ct[e]&&(Ct[e][0]=il(n,Ct[e][0],Ct[e][1]))})},Ct={id:[null,D.STRING],name:["filepond",D.STRING],disabled:[!1,D.BOOLEAN],className:[null,D.STRING],required:[!1,D.BOOLEAN],captureMethod:[null,D.STRING],allowSyncAcceptAttribute:[!0,D.BOOLEAN],allowDrop:[!0,D.BOOLEAN],allowBrowse:[!0,D.BOOLEAN],allowPaste:[!0,D.BOOLEAN],allowMultiple:[!1,D.BOOLEAN],allowReplace:[!0,D.BOOLEAN],allowRevert:[!0,D.BOOLEAN],allowRemove:[!0,D.BOOLEAN],allowProcess:[!0,D.BOOLEAN],allowReorder:[!1,D.BOOLEAN],allowDirectoriesOnly:[!1,D.BOOLEAN],storeAsFile:[!1,D.BOOLEAN],forceRevert:[!1,D.BOOLEAN],maxFiles:[null,D.INT],checkValidity:[!1,D.BOOLEAN],itemInsertLocationFreedom:[!0,D.BOOLEAN],itemInsertLocation:["before",D.STRING],itemInsertInterval:[75,D.INT],dropOnPage:[!1,D.BOOLEAN],dropOnElement:[!0,D.BOOLEAN],dropValidation:[!1,D.BOOLEAN],ignoredFiles:[[".ds_store","thumbs.db","desktop.ini"],D.ARRAY],instantUpload:[!0,D.BOOLEAN],maxParallelUploads:[2,D.INT],allowMinimumUploadDuration:[!0,D.BOOLEAN],chunkUploads:[!1,D.BOOLEAN],chunkForce:[!1,D.BOOLEAN],chunkSize:[5e6,D.INT],chunkRetryDelays:[[500,1e3,3e3],D.ARRAY],server:[null,D.SERVER_API],fileSizeBase:[1e3,D.INT],labelFileSizeBytes:["bytes",D.STRING],labelFileSizeKilobytes:["KB",D.STRING],labelFileSizeMegabytes:["MB",D.STRING],labelFileSizeGigabytes:["GB",D.STRING],labelDecimalSeparator:[al(),D.STRING],labelThousandsSeparator:[Yf(),D.STRING],labelIdle:['Drag & Drop your files or <span class="filepond--label-action">Browse</span>',D.STRING],labelInvalidField:["Field contains invalid files",D.STRING],labelFileWaitingForSize:["Waiting for size",D.STRING],labelFileSizeNotAvailable:["Size not available",D.STRING],labelFileCountSingular:["file in list",D.STRING],labelFileCountPlural:["files in list",D.STRING],labelFileLoading:["Loading",D.STRING],labelFileAdded:["Added",D.STRING],labelFileLoadError:["Error during load",D.STRING],labelFileRemoved:["Removed",D.STRING],labelFileRemoveError:["Error during remove",D.STRING],labelFileProcessing:["Uploading",D.STRING],labelFileProcessingComplete:["Upload complete",D.STRING],labelFileProcessingAborted:["Upload cancelled",D.STRING],labelFileProcessingError:["Error during upload",D.STRING],labelFileProcessingRevertError:["Error during revert",D.STRING],labelTapToCancel:["tap to cancel",D.STRING],labelTapToRetry:["tap to retry",D.STRING],labelTapToUndo:["tap to undo",D.STRING],labelButtonRemoveItem:["Remove",D.STRING],labelButtonAbortItemLoad:["Abort",D.STRING],labelButtonRetryItemLoad:["Retry",D.STRING],labelButtonAbortItemProcessing:["Cancel",D.STRING],labelButtonUndoItemProcessing:["Undo",D.STRING],labelButtonRetryItemProcessing:["Retry",D.STRING],labelButtonProcessItem:["Upload",D.STRING],iconRemove:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M11.586 13l-2.293 2.293a1 1 0 0 0 1.414 1.414L13 14.414l2.293 2.293a1 1 0 0 0 1.414-1.414L14.414 13l2.293-2.293a1 1 0 0 0-1.414-1.414L13 11.586l-2.293-2.293a1 1 0 0 0-1.414 1.414L11.586 13z" fill="currentColor" fill-rule="nonzero"/></svg>',D.STRING],iconProcess:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M14 10.414v3.585a1 1 0 0 1-2 0v-3.585l-1.293 1.293a1 1 0 0 1-1.414-1.415l3-3a1 1 0 0 1 1.414 0l3 3a1 1 0 0 1-1.414 1.415L14 10.414zM9 18a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2H9z" fill="currentColor" fill-rule="evenodd"/></svg>',D.STRING],iconRetry:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M10.81 9.185l-.038.02A4.997 4.997 0 0 0 8 13.683a5 5 0 0 0 5 5 5 5 0 0 0 5-5 1 1 0 0 1 2 0A7 7 0 1 1 9.722 7.496l-.842-.21a.999.999 0 1 1 .484-1.94l3.23.806c.535.133.86.675.73 1.21l-.804 3.233a.997.997 0 0 1-1.21.73.997.997 0 0 1-.73-1.21l.23-.928v-.002z" fill="currentColor" fill-rule="nonzero"/></svg>',D.STRING],iconUndo:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M9.185 10.81l.02-.038A4.997 4.997 0 0 1 13.683 8a5 5 0 0 1 5 5 5 5 0 0 1-5 5 1 1 0 0 0 0 2A7 7 0 1 0 7.496 9.722l-.21-.842a.999.999 0 1 0-1.94.484l.806 3.23c.133.535.675.86 1.21.73l3.233-.803a.997.997 0 0 0 .73-1.21.997.997 0 0 0-1.21-.73l-.928.23-.002-.001z" fill="currentColor" fill-rule="nonzero"/></svg>',D.STRING],iconDone:['<svg width="26" height="26" viewBox="0 0 26 26" xmlns="http://www.w3.org/2000/svg"><path d="M18.293 9.293a1 1 0 0 1 1.414 1.414l-7.002 7a1 1 0 0 1-1.414 0l-3.998-4a1 1 0 1 1 1.414-1.414L12 15.586l6.294-6.293z" fill="currentColor" fill-rule="nonzero"/></svg>',D.STRING],oninit:[null,D.FUNCTION],onwarning:[null,D.FUNCTION],onerror:[null,D.FUNCTION],onactivatefile:[null,D.FUNCTION],oninitfile:[null,D.FUNCTION],onaddfilestart:[null,D.FUNCTION],onaddfileprogress:[null,D.FUNCTION],onaddfile:[null,D.FUNCTION],onprocessfilestart:[null,D.FUNCTION],onprocessfileprogress:[null,D.FUNCTION],onprocessfileabort:[null,D.FUNCTION],onprocessfilerevert:[null,D.FUNCTION],onprocessfile:[null,D.FUNCTION],onprocessfiles:[null,D.FUNCTION],onremovefile:[null,D.FUNCTION],onpreparefile:[null,D.FUNCTION],onupdatefiles:[null,D.FUNCTION],onreorderfiles:[null,D.FUNCTION],beforeDropFile:[null,D.FUNCTION],beforeAddFile:[null,D.FUNCTION],beforeRemoveFile:[null,D.FUNCTION],beforePrepareFile:[null,D.FUNCTION],stylePanelLayout:[null,D.STRING],stylePanelAspectRatio:[null,D.STRING],styleItemPanelAspectRatio:[null,D.STRING],styleButtonRemoveItemPosition:["left",D.STRING],styleButtonProcessItemPosition:["right",D.STRING],styleLoadIndicatorPosition:["right",D.STRING],styleProgressIndicatorPosition:["right",D.STRING],styleButtonRemoveItemAlign:[!1,D.BOOLEAN],files:[[],D.ARRAY],credits:[["https://pqina.nl/","Powered by PQINA"],D.ARRAY]},pt=(t,e)=>We(e)?t[0]||null:zt(e)?t[e]||null:(typeof e=="object"&&(e=e.id),t.find(n=>n.id===e)||null),ll=t=>{if(We(t))return t;if(/:/.test(t)){const e=t.split(":");return e[1]/e[0]}return parseFloat(t)},Ce=t=>t.filter(e=>!e.archived),Kf={EMPTY:0,IDLE:1,ERROR:2,BUSY:3,READY:4};let En=null;const Jf=()=>{if(En===null)try{const t=new DataTransfer;t.items.add(new File(["hello world"],"This_Works.txt"));const e=document.createElement("input");e.setAttribute("type","file"),e.files=t.files,En=e.files.length===1}catch{En=!1}return En},eh=[H.LOAD_ERROR,H.PROCESSING_ERROR,H.PROCESSING_REVERT_ERROR],th=[H.LOADING,H.PROCESSING,H.PROCESSING_QUEUED,H.INIT],nh=[H.PROCESSING_COMPLETE],rh=t=>eh.includes(t.status),ih=t=>th.includes(t.status),sh=t=>nh.includes(t.status),Gs=t=>se(t.options.server)&&(se(t.options.server.process)||ht(t.options.server.process)),oh=t=>({GET_STATUS:()=>{const e=Ce(t.items),{EMPTY:n,ERROR:r,BUSY:i,IDLE:s,READY:o}=Kf;return e.length===0?n:e.some(rh)?r:e.some(ih)?i:e.some(sh)?o:s},GET_ITEM:e=>pt(t.items,e),GET_ACTIVE_ITEM:e=>pt(Ce(t.items),e),GET_ACTIVE_ITEMS:()=>Ce(t.items),GET_ITEMS:()=>t.items,GET_ITEM_NAME:e=>{const n=pt(t.items,e);return n?n.filename:null},GET_ITEM_SIZE:e=>{const n=pt(t.items,e);return n?n.fileSize:null},GET_STYLES:()=>Object.keys(t.options).filter(e=>/^style/.test(e)).map(e=>({name:e,value:t.options[e]})),GET_PANEL_ASPECT_RATIO:()=>/circle/.test(t.options.stylePanelLayout)?1:ll(t.options.stylePanelAspectRatio),GET_ITEM_PANEL_ASPECT_RATIO:()=>t.options.styleItemPanelAspectRatio,GET_ITEMS_BY_STATUS:e=>Ce(t.items).filter(n=>n.status===e),GET_TOTAL_ITEMS:()=>Ce(t.items).length,SHOULD_UPDATE_FILE_INPUT:()=>t.options.storeAsFile&&Jf()&&!Gs(t),IS_ASYNC:()=>Gs(t),GET_FILE_SIZE_LABELS:e=>({labelBytes:e("GET_LABEL_FILE_SIZE_BYTES")||void 0,labelKilobytes:e("GET_LABEL_FILE_SIZE_KILOBYTES")||void 0,labelMegabytes:e("GET_LABEL_FILE_SIZE_MEGABYTES")||void 0,labelGigabytes:e("GET_LABEL_FILE_SIZE_GIGABYTES")||void 0})}),ah=t=>{const e=Ce(t.items).length;if(!t.options.allowMultiple)return e===0;const n=t.options.maxFiles;return n===null||e<n},cl=(t,e,n)=>Math.max(Math.min(n,t),e),lh=(t,e,n)=>t.splice(e,0,n),ch=(t,e,n)=>We(e)?null:typeof n>"u"?(t.push(e),e):(n=cl(n,0,t.length),lh(t,n,e),e),si=t=>/^\s*data:([a-z]+\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s]*)\s*$/i.test(t),un=t=>`${t}`.split("/").pop().split("?").shift(),Er=t=>t.split(".").pop(),dh=t=>{if(typeof t!="string")return"";const e=t.split("/").pop();return/svg/.test(e)?"svg":/zip|compressed/.test(e)?"zip":/plain/.test(e)?"txt":/msword/.test(e)?"doc":/[a-z]+/.test(e)?e==="jpeg"?"jpg":e:""},$t=(t,e="")=>(e+t).slice(-e.length),dl=(t=new Date)=>`${t.getFullYear()}-${$t(t.getMonth()+1,"00")}-${$t(t.getDate(),"00")}_${$t(t.getHours(),"00")}-${$t(t.getMinutes(),"00")}-${$t(t.getSeconds(),"00")}`,kt=(t,e,n=null,r=null)=>{const i=typeof n=="string"?t.slice(0,t.size,n):t.slice(0,t.size,t.type);return i.lastModifiedDate=new Date,t._relativePath&&(i._relativePath=t._relativePath),fe(e)||(e=dl()),e&&r===null&&Er(e)?i.name=e:(r=r||dh(i.type),i.name=e+(r?"."+r:"")),i},uh=()=>window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,ul=(t,e)=>{const n=uh();if(n){const r=new n;return r.append(t),r.getBlob(e)}return new Blob([t],{type:e})},fh=(t,e)=>{const n=new ArrayBuffer(t.length),r=new Uint8Array(n);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return ul(n,e)},fl=t=>(/^data:(.+);/.exec(t)||[])[1]||null,hh=t=>t.split(",")[1].replace(/\s/g,""),ph=t=>atob(hh(t)),gh=t=>{const e=fl(t),n=ph(t);return fh(n,e)},mh=(t,e,n)=>kt(gh(t),e,null,n),Eh=t=>{if(!/^content-disposition:/i.test(t))return null;const e=t.split(/filename=|filename\*=.+''/).splice(1).map(n=>n.trim().replace(/^["']|[;"']{0,2}$/g,"")).filter(n=>n.length);return e.length?decodeURI(e[e.length-1]):null},yh=t=>{if(/content-length:/i.test(t)){const e=t.match(/[0-9]+/)[0];return e?parseInt(e,10):null}return null},vh=t=>/x-content-transfer-id:/i.test(t)&&(t.split(":")[1]||"").trim()||null,ki=t=>{const e={source:null,name:null,size:null},n=t.split(`
`);for(let r of n){const i=Eh(r);if(i){e.name=i;continue}const s=yh(r);if(s){e.size=s;continue}const o=vh(r);if(o){e.source=o;continue}}return e},_h=t=>{const e={source:null,complete:!1,progress:0,size:null,timestamp:null,duration:0,request:null},n=()=>e.progress,r=()=>{e.request&&e.request.abort&&e.request.abort()},i=()=>{const a=e.source;o.fire("init",a),a instanceof File?o.fire("load",a):a instanceof Blob?o.fire("load",kt(a,a.name)):si(a)?o.fire("load",mh(a)):s(a)},s=a=>{if(!t){o.fire("error",{type:"error",body:"Can't load URL",code:400});return}e.timestamp=Date.now(),e.request=t(a,l=>{e.duration=Date.now()-e.timestamp,e.complete=!0,l instanceof Blob&&(l=kt(l,l.name||un(a))),o.fire("load",l instanceof Blob?l:l?l.body:null)},l=>{o.fire("error",typeof l=="string"?{type:"error",code:0,body:l}:l)},(l,d,c)=>{if(c&&(e.size=c),e.duration=Date.now()-e.timestamp,!l){e.progress=null;return}e.progress=d/c,o.fire("progress",e.progress)},()=>{o.fire("abort")},l=>{const d=ki(typeof l=="string"?l:l.headers);o.fire("meta",{size:e.size||d.size,filename:d.name,source:d.source})})},o={...mr(),setSource:a=>e.source=a,getProgress:n,abort:r,load:i};return o},Us=t=>/GET|HEAD/.test(t),mt=(t,e,n)=>{const r={onheaders:()=>{},onprogress:()=>{},onload:()=>{},ontimeout:()=>{},onerror:()=>{},onabort:()=>{},abort:()=>{i=!0,o.abort()}};let i=!1,s=!1;n={method:"POST",headers:{},withCredentials:!1,...n},e=encodeURI(e),Us(n.method)&&t&&(e=`${e}${encodeURIComponent(typeof t=="string"?t:JSON.stringify(t))}`);const o=new XMLHttpRequest,a=Us(n.method)?o:o.upload;return a.onprogress=l=>{i||r.onprogress(l.lengthComputable,l.loaded,l.total)},o.onreadystatechange=()=>{o.readyState<2||o.readyState===4&&o.status===0||s||(s=!0,r.onheaders(o))},o.onload=()=>{o.status>=200&&o.status<300?r.onload(o):r.onerror(o)},o.onerror=()=>r.onerror(o),o.onabort=()=>{i=!0,r.onabort()},o.ontimeout=()=>r.ontimeout(o),o.open(n.method,e,!0),zt(n.timeout)&&(o.timeout=n.timeout),Object.keys(n.headers).forEach(l=>{const d=unescape(encodeURIComponent(n.headers[l]));o.setRequestHeader(l,d)}),n.responseType&&(o.responseType=n.responseType),n.withCredentials&&(o.withCredentials=!0),o.send(t),r},J=(t,e,n,r)=>({type:t,code:e,body:n,headers:r}),Et=t=>e=>{t(J("error",0,"Timeout",e.getAllResponseHeaders()))},Hs=t=>/\?/.test(t),Xt=(...t)=>{let e="";return t.forEach(n=>{e+=Hs(e)&&Hs(n)?n.replace(/\?/,"&"):n}),e},Cr=(t="",e)=>{if(typeof e=="function")return e;if(!e||!fe(e.url))return null;const n=e.onload||(i=>i),r=e.onerror||(i=>null);return(i,s,o,a,l,d)=>{const c=mt(i,Xt(t,e.url),{...e,responseType:"blob"});return c.onload=u=>{const p=u.getAllResponseHeaders(),f=ki(p).name||un(i);s(J("load",u.status,e.method==="HEAD"?null:kt(n(u.response),f),p))},c.onerror=u=>{o(J("error",u.status,r(u.response)||u.statusText,u.getAllResponseHeaders()))},c.onheaders=u=>{d(J("headers",u.status,null,u.getAllResponseHeaders()))},c.ontimeout=Et(o),c.onprogress=a,c.onabort=l,c}},Te={QUEUED:0,COMPLETE:1,PROCESSING:2,ERROR:3,WAITING:4},bh=(t,e,n,r,i,s,o,a,l,d,c)=>{const u=[],{chunkTransferId:p,chunkServer:f,chunkSize:h,chunkRetryDelays:g}=c,m={serverId:p,aborted:!1},v=e.ondata||(O=>O),y=e.onload||((O,z)=>z==="HEAD"?O.getResponseHeader("Upload-Offset"):O.response),_=e.onerror||(O=>null),b=O=>{const z=new FormData;se(i)&&z.append(n,JSON.stringify(i));const w=typeof e.headers=="function"?e.headers(r,i):{...e.headers,"Upload-Length":r.size},C={...e,headers:w},L=mt(v(z),Xt(t,e.url),C);L.onload=k=>O(y(k,C.method)),L.onerror=k=>o(J("error",k.status,_(k.response)||k.statusText,k.getAllResponseHeaders())),L.ontimeout=Et(o)},A=O=>{const z=Xt(t,f.url,m.serverId),C={headers:typeof e.headers=="function"?e.headers(m.serverId):{...e.headers},method:"HEAD"},L=mt(null,z,C);L.onload=k=>O(y(k,C.method)),L.onerror=k=>o(J("error",k.status,_(k.response)||k.statusText,k.getAllResponseHeaders())),L.ontimeout=Et(o)},S=Math.floor(r.size/h);for(let O=0;O<=S;O++){const z=O*h,w=r.slice(z,z+h,"application/offset+octet-stream");u[O]={index:O,size:w.size,offset:z,data:w,file:r,progress:0,retries:[...g],status:Te.QUEUED,error:null,request:null,timeout:null}}const M=()=>s(m.serverId),I=O=>O.status===Te.QUEUED||O.status===Te.ERROR,N=O=>{if(m.aborted)return;if(O=O||u.find(I),!O){u.every(U=>U.status===Te.COMPLETE)&&M();return}O.status=Te.PROCESSING,O.progress=null;const z=f.ondata||(U=>U),w=f.onerror||(U=>null),C=f.onload||(()=>{}),L=Xt(t,f.url,m.serverId),k=typeof f.headers=="function"?f.headers(O):{...f.headers,"Content-Type":"application/offset+octet-stream","Upload-Offset":O.offset,"Upload-Length":r.size,"Upload-Name":r.name},Z=O.request=mt(z(O.data),L,{...f,headers:k});Z.onload=U=>{C(U,O.index,u.length),O.status=Te.COMPLETE,O.request=null,P()},Z.onprogress=(U,at,jt)=>{O.progress=U?at:null,x()},Z.onerror=U=>{O.status=Te.ERROR,O.request=null,O.error=w(U.response)||U.statusText,G(O)||o(J("error",U.status,w(U.response)||U.statusText,U.getAllResponseHeaders()))},Z.ontimeout=U=>{O.status=Te.ERROR,O.request=null,G(O)||Et(o)(U)},Z.onabort=()=>{O.status=Te.QUEUED,O.request=null,l()}},G=O=>O.retries.length===0?!1:(O.status=Te.WAITING,clearTimeout(O.timeout),O.timeout=setTimeout(()=>{N(O)},O.retries.shift()),!0),x=()=>{const O=u.reduce((w,C)=>w===null||C.progress===null?null:w+C.progress,0);if(O===null)return a(!1,0,0);const z=u.reduce((w,C)=>w+C.size,0);a(!0,O,z)},P=()=>{u.filter(z=>z.status===Te.PROCESSING).length>=1||N()},$=()=>{u.forEach(O=>{clearTimeout(O.timeout),O.request&&O.request.abort()})};return m.serverId?A(O=>{m.aborted||(u.filter(z=>z.offset<O).forEach(z=>{z.status=Te.COMPLETE,z.progress=z.size}),P())}):b(O=>{m.aborted||(d(O),m.serverId=O,P())}),{abort:()=>{m.aborted=!0,$()}}},Th=(t,e,n,r)=>(i,s,o,a,l,d,c)=>{if(!i)return;const u=r.chunkUploads,p=u&&i.size>r.chunkSize,f=u&&(p||r.chunkForce);if(i instanceof Blob&&f)return bh(t,e,n,i,s,o,a,l,d,c,r);const h=e.ondata||(A=>A),g=e.onload||(A=>A),m=e.onerror||(A=>null),v=typeof e.headers=="function"?e.headers(i,s)||{}:{...e.headers},y={...e,headers:v};var _=new FormData;se(s)&&_.append(n,JSON.stringify(s)),(i instanceof Blob?[{name:null,file:i}]:i).forEach(A=>{_.append(n,A.file,A.name===null?A.file.name:`${A.name}${A.file.name}`)});const b=mt(h(_),Xt(t,e.url),y);return b.onload=A=>{o(J("load",A.status,g(A.response),A.getAllResponseHeaders()))},b.onerror=A=>{a(J("error",A.status,m(A.response)||A.statusText,A.getAllResponseHeaders()))},b.ontimeout=Et(a),b.onprogress=l,b.onabort=d,b},Rh=(t="",e,n,r)=>typeof e=="function"?(...i)=>e(n,...i,r):!e||!fe(e.url)?null:Th(t,e,n,r),Yt=(t="",e)=>{if(typeof e=="function")return e;if(!e||!fe(e.url))return(i,s)=>s();const n=e.onload||(i=>i),r=e.onerror||(i=>null);return(i,s,o)=>{const a=mt(i,t+e.url,e);return a.onload=l=>{s(J("load",l.status,n(l.response),l.getAllResponseHeaders()))},a.onerror=l=>{o(J("error",l.status,r(l.response)||l.statusText,l.getAllResponseHeaders()))},a.ontimeout=Et(o),a}},hl=(t=0,e=1)=>t+Math.random()*(e-t),Ah=(t,e=1e3,n=0,r=25,i=250)=>{let s=null;const o=Date.now(),a=()=>{let l=Date.now()-o,d=hl(r,i);l+d>e&&(d=l+d-e);let c=l/e;if(c>=1||document.hidden){t(1);return}t(c),s=setTimeout(a,d)};return e>0&&a(),{clear:()=>{clearTimeout(s)}}},Ih=(t,e)=>{const n={complete:!1,perceivedProgress:0,perceivedPerformanceUpdater:null,progress:null,timestamp:null,perceivedDuration:0,duration:0,request:null,response:null},{allowMinimumUploadDuration:r}=e,i=(c,u)=>{const p=()=>{n.duration===0||n.progress===null||d.fire("progress",d.getProgress())},f=()=>{n.complete=!0,d.fire("load-perceived",n.response.body)};d.fire("start"),n.timestamp=Date.now(),n.perceivedPerformanceUpdater=Ah(h=>{n.perceivedProgress=h,n.perceivedDuration=Date.now()-n.timestamp,p(),n.response&&n.perceivedProgress===1&&!n.complete&&f()},r?hl(750,1500):0),n.request=t(c,u,h=>{n.response=se(h)?h:{type:"load",code:200,body:`${h}`,headers:{}},n.duration=Date.now()-n.timestamp,n.progress=1,d.fire("load",n.response.body),(!r||r&&n.perceivedProgress===1)&&f()},h=>{n.perceivedPerformanceUpdater.clear(),d.fire("error",se(h)?h:{type:"error",code:0,body:`${h}`})},(h,g,m)=>{n.duration=Date.now()-n.timestamp,n.progress=h?g/m:null,p()},()=>{n.perceivedPerformanceUpdater.clear(),d.fire("abort",n.response?n.response.body:null)},h=>{d.fire("transfer",h)})},s=()=>{n.request&&(n.perceivedPerformanceUpdater.clear(),n.request.abort&&n.request.abort(),n.complete=!0)},o=()=>{s(),n.complete=!1,n.perceivedProgress=0,n.progress=0,n.timestamp=null,n.perceivedDuration=0,n.duration=0,n.request=null,n.response=null},a=r?()=>n.progress?Math.min(n.progress,n.perceivedProgress):null:()=>n.progress||null,l=r?()=>Math.min(n.duration,n.perceivedDuration):()=>n.duration,d={...mr(),process:i,abort:s,getProgress:a,getDuration:l,reset:o};return d},pl=t=>t.substring(0,t.lastIndexOf("."))||t,Sh=t=>{let e=[t.name,t.size,t.type];return t instanceof Blob||si(t)?e[0]=t.name||dl():si(t)?(e[1]=t.length,e[2]=fl(t)):fe(t)&&(e[0]=un(t),e[1]=0,e[2]="application/octet-stream"),{name:e[0],size:e[1],type:e[2]}},yt=t=>!!(t instanceof File||t instanceof Blob&&t.name),gl=t=>{if(!se(t))return t;const e=hr(t)?[]:{};for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n];e[n]=r&&se(r)?gl(r):r}return e},Dh=(t=null,e=null,n=null)=>{const r=xi(),i={archived:!1,frozen:!1,released:!1,source:null,file:n,serverFileReference:e,transferId:null,processingAborted:!1,status:e?H.PROCESSING_COMPLETE:H.INIT,activeLoader:null,activeProcessor:null};let s=null;const o={},a=I=>i.status=I,l=(I,...N)=>{i.released||i.frozen||S.fire(I,...N)},d=()=>Er(i.file.name),c=()=>i.file.type,u=()=>i.file.size,p=()=>i.file,f=(I,N,G)=>{if(i.source=I,S.fireSync("init"),i.file){S.fireSync("load-skip");return}i.file=Sh(I),N.on("init",()=>{l("load-init")}),N.on("meta",x=>{i.file.size=x.size,i.file.filename=x.filename,x.source&&(t=ie.LIMBO,i.serverFileReference=x.source,i.status=H.PROCESSING_COMPLETE),l("load-meta")}),N.on("progress",x=>{a(H.LOADING),l("load-progress",x)}),N.on("error",x=>{a(H.LOAD_ERROR),l("load-request-error",x)}),N.on("abort",()=>{a(H.INIT),l("load-abort")}),N.on("load",x=>{i.activeLoader=null;const P=O=>{i.file=yt(O)?O:i.file,t===ie.LIMBO&&i.serverFileReference?a(H.PROCESSING_COMPLETE):a(H.IDLE),l("load")},$=O=>{i.file=x,l("load-meta"),a(H.LOAD_ERROR),l("load-file-error",O)};if(i.serverFileReference){P(x);return}G(x,P,$)}),N.setSource(I),i.activeLoader=N,N.load()},h=()=>{i.activeLoader&&i.activeLoader.load()},g=()=>{if(i.activeLoader){i.activeLoader.abort();return}a(H.INIT),l("load-abort")},m=(I,N)=>{if(i.processingAborted){i.processingAborted=!1;return}if(a(H.PROCESSING),s=null,!(i.file instanceof Blob)){S.on("load",()=>{m(I,N)});return}I.on("load",P=>{i.transferId=null,i.serverFileReference=P}),I.on("transfer",P=>{i.transferId=P}),I.on("load-perceived",P=>{i.activeProcessor=null,i.transferId=null,i.serverFileReference=P,a(H.PROCESSING_COMPLETE),l("process-complete",P)}),I.on("start",()=>{l("process-start")}),I.on("error",P=>{i.activeProcessor=null,a(H.PROCESSING_ERROR),l("process-error",P)}),I.on("abort",P=>{i.activeProcessor=null,i.serverFileReference=P,a(H.IDLE),l("process-abort"),s&&s()}),I.on("progress",P=>{l("process-progress",P)});const G=P=>{i.archived||I.process(P,{...o})},x=console.error;N(i.file,G,x),i.activeProcessor=I},v=()=>{i.processingAborted=!1,a(H.PROCESSING_QUEUED)},y=()=>new Promise(I=>{if(!i.activeProcessor){i.processingAborted=!0,a(H.IDLE),l("process-abort"),I();return}s=()=>{I()},i.activeProcessor.abort()}),_=(I,N)=>new Promise((G,x)=>{const P=i.serverFileReference!==null?i.serverFileReference:i.transferId;if(P===null){G();return}I(P,()=>{i.serverFileReference=null,i.transferId=null,G()},$=>{if(!N){G();return}a(H.PROCESSING_REVERT_ERROR),l("process-revert-error"),x($)}),a(H.IDLE),l("process-revert")}),b=(I,N,G)=>{const x=I.split("."),P=x[0],$=x.pop();let O=o;x.forEach(z=>O=O[z]),JSON.stringify(O[$])!==JSON.stringify(N)&&(O[$]=N,l("metadata-update",{key:P,value:o[P],silent:G}))},S={id:{get:()=>r},origin:{get:()=>t,set:I=>t=I},serverId:{get:()=>i.serverFileReference},transferId:{get:()=>i.transferId},status:{get:()=>i.status},filename:{get:()=>i.file.name},filenameWithoutExtension:{get:()=>pl(i.file.name)},fileExtension:{get:d},fileType:{get:c},fileSize:{get:u},file:{get:p},relativePath:{get:()=>i.file._relativePath},source:{get:()=>i.source},getMetadata:I=>gl(I?o[I]:o),setMetadata:(I,N,G)=>{if(se(I)){const x=I;return Object.keys(x).forEach(P=>{b(P,x[P],N)}),I}return b(I,N,G),N},extend:(I,N)=>M[I]=N,abortLoad:g,retryLoad:h,requestProcessing:v,abortProcessing:y,load:f,process:m,revert:_,...mr(),freeze:()=>i.frozen=!0,release:()=>i.released=!0,released:{get:()=>i.released},archive:()=>i.archived=!0,archived:{get:()=>i.archived},setFile:I=>i.file=I},M=et(S);return M},wh=(t,e)=>We(e)?0:fe(e)?t.findIndex(n=>n.id===e):-1,Vs=(t,e)=>{const n=wh(t,e);if(!(n<0))return t[n]||null},zs=(t,e,n,r,i,s)=>{const o=mt(null,t,{method:"GET",responseType:"blob"});return o.onload=a=>{const l=a.getAllResponseHeaders(),d=ki(l).name||un(t);e(J("load",a.status,kt(a.response,d),l))},o.onerror=a=>{n(J("error",a.status,a.statusText,a.getAllResponseHeaders()))},o.onheaders=a=>{s(J("headers",a.status,null,a.getAllResponseHeaders()))},o.ontimeout=Et(n),o.onprogress=r,o.onabort=i,o},Ws=t=>(t.indexOf("//")===0&&(t=location.protocol+t),t.toLowerCase().replace("blob:","").replace(/([a-z])?:\/\//,"$1").split("/")[0]),Ch=t=>(t.indexOf(":")>-1||t.indexOf("//")>-1)&&Ws(location.href)!==Ws(t),yn=t=>(...e)=>ht(t)?t(...e):t,Oh=t=>!yt(t.file),Or=(t,e)=>{clearTimeout(e.listUpdateTimeout),e.listUpdateTimeout=setTimeout(()=>{t("DID_UPDATE_ITEMS",{items:Ce(e.items)})},0)},js=(t,...e)=>new Promise(n=>{if(!t)return n(!0);const r=t(...e);if(r==null)return n(!0);if(typeof r=="boolean")return n(r);typeof r.then=="function"&&r.then(n)}),Mr=(t,e)=>{t.items.sort((n,r)=>e(ge(n),ge(r)))},Re=(t,e)=>({query:n,success:r=()=>{},failure:i=()=>{},...s}={})=>{const o=pt(t.items,n);if(!o){i({error:J("error",0,"Item not found"),file:null});return}e(o,r,i,s||{})},Mh=(t,e,n)=>({ABORT_ALL:()=>{Ce(n.items).forEach(r=>{r.freeze(),r.abortLoad(),r.abortProcessing()})},DID_SET_FILES:({value:r=[]})=>{const i=r.map(o=>({source:o.source?o.source:o,options:o.options}));let s=Ce(n.items);s.forEach(o=>{i.find(a=>a.source===o.source||a.source===o.file)||t("REMOVE_ITEM",{query:o,remove:!1})}),s=Ce(n.items),i.forEach((o,a)=>{s.find(l=>l.source===o.source||l.file===o.source)||t("ADD_ITEM",{...o,interactionMethod:Ie.NONE,index:a})})},DID_UPDATE_ITEM_METADATA:({id:r,action:i,change:s})=>{s.silent||(clearTimeout(n.itemUpdateTimeout),n.itemUpdateTimeout=setTimeout(()=>{const o=Vs(n.items,r);if(!e("IS_ASYNC")){we("SHOULD_PREPARE_OUTPUT",!1,{item:o,query:e,action:i,change:s}).then(c=>{const u=e("GET_BEFORE_PREPARE_FILE");u&&(c=u(o,c)),c&&t("REQUEST_PREPARE_OUTPUT",{query:r,item:o,success:p=>{t("DID_PREPARE_OUTPUT",{id:r,file:p})}},!0)});return}o.origin===ie.LOCAL&&t("DID_LOAD_ITEM",{id:o.id,error:null,serverFileReference:o.source});const a=()=>{setTimeout(()=>{t("REQUEST_ITEM_PROCESSING",{query:r})},32)},l=c=>{o.revert(Yt(n.options.server.url,n.options.server.revert),e("GET_FORCE_REVERT")).then(c?a:()=>{}).catch(()=>{})},d=c=>{o.abortProcessing().then(c?a:()=>{})};if(o.status===H.PROCESSING_COMPLETE)return l(n.options.instantUpload);if(o.status===H.PROCESSING)return d(n.options.instantUpload);n.options.instantUpload&&a()},0))},MOVE_ITEM:({query:r,index:i})=>{const s=pt(n.items,r);if(!s)return;const o=n.items.indexOf(s);i=cl(i,0,n.items.length-1),o!==i&&n.items.splice(i,0,n.items.splice(o,1)[0])},SORT:({compare:r})=>{Mr(n,r),t("DID_SORT_ITEMS",{items:e("GET_ACTIVE_ITEMS")})},ADD_ITEMS:({items:r,index:i,interactionMethod:s,success:o=()=>{},failure:a=()=>{}})=>{let l=i;if(i===-1||typeof i>"u"){const f=e("GET_ITEM_INSERT_LOCATION"),h=e("GET_TOTAL_ITEMS");l=f==="before"?0:h}const d=e("GET_IGNORED_FILES"),c=f=>yt(f)?!d.includes(f.name.toLowerCase()):!We(f),p=r.filter(c).map(f=>new Promise((h,g)=>{t("ADD_ITEM",{interactionMethod:s,source:f.source||f,success:h,failure:g,index:l++,options:f.options||{}})}));Promise.all(p).then(o).catch(a)},ADD_ITEM:({source:r,index:i=-1,interactionMethod:s,success:o=()=>{},failure:a=()=>{},options:l={}})=>{if(We(r)){a({error:J("error",0,"No source"),file:null});return}if(yt(r)&&n.options.ignoredFiles.includes(r.name.toLowerCase()))return;if(!ah(n)){if(n.options.allowMultiple||!n.options.allowMultiple&&!n.options.allowReplace){const y=J("warning",0,"Max files");t("DID_THROW_MAX_FILES",{source:r,error:y}),a({error:y,file:null});return}const v=Ce(n.items)[0];if(v.status===H.PROCESSING_COMPLETE||v.status===H.PROCESSING_REVERT_ERROR){const y=e("GET_FORCE_REVERT");if(v.revert(Yt(n.options.server.url,n.options.server.revert),y).then(()=>{y&&t("ADD_ITEM",{source:r,index:i,interactionMethod:s,success:o,failure:a,options:l})}).catch(()=>{}),y)return}t("REMOVE_ITEM",{query:v.id})}const d=l.type==="local"?ie.LOCAL:l.type==="limbo"?ie.LIMBO:ie.INPUT,c=Dh(d,d===ie.INPUT?null:r,l.file);Object.keys(l.metadata||{}).forEach(v=>{c.setMetadata(v,l.metadata[v])}),Rt("DID_CREATE_ITEM",c,{query:e,dispatch:t});const u=e("GET_ITEM_INSERT_LOCATION");n.options.itemInsertLocationFreedom||(i=u==="before"?-1:n.items.length),ch(n.items,c,i),ht(u)&&r&&Mr(n,u);const p=c.id;c.on("init",()=>{t("DID_INIT_ITEM",{id:p})}),c.on("load-init",()=>{t("DID_START_ITEM_LOAD",{id:p})}),c.on("load-meta",()=>{t("DID_UPDATE_ITEM_META",{id:p})}),c.on("load-progress",v=>{t("DID_UPDATE_ITEM_LOAD_PROGRESS",{id:p,progress:v})}),c.on("load-request-error",v=>{const y=yn(n.options.labelFileLoadError)(v);if(v.code>=400&&v.code<500){t("DID_THROW_ITEM_INVALID",{id:p,error:v,status:{main:y,sub:`${v.code} (${v.body})`}}),a({error:v,file:ge(c)});return}t("DID_THROW_ITEM_LOAD_ERROR",{id:p,error:v,status:{main:y,sub:n.options.labelTapToRetry}})}),c.on("load-file-error",v=>{t("DID_THROW_ITEM_INVALID",{id:p,error:v.status,status:v.status}),a({error:v.status,file:ge(c)})}),c.on("load-abort",()=>{t("REMOVE_ITEM",{query:p})}),c.on("load-skip",()=>{c.on("metadata-update",v=>{yt(c.file)&&t("DID_UPDATE_ITEM_METADATA",{id:p,change:v})}),t("COMPLETE_LOAD_ITEM",{query:p,item:c,data:{source:r,success:o}})}),c.on("load",()=>{const v=y=>{if(!y){t("REMOVE_ITEM",{query:p});return}c.on("metadata-update",_=>{t("DID_UPDATE_ITEM_METADATA",{id:p,change:_})}),we("SHOULD_PREPARE_OUTPUT",!1,{item:c,query:e}).then(_=>{const b=e("GET_BEFORE_PREPARE_FILE");b&&(_=b(c,_));const A=()=>{t("COMPLETE_LOAD_ITEM",{query:p,item:c,data:{source:r,success:o}}),Or(t,n)};if(_){t("REQUEST_PREPARE_OUTPUT",{query:p,item:c,success:S=>{t("DID_PREPARE_OUTPUT",{id:p,file:S}),A()}},!0);return}A()})};we("DID_LOAD_ITEM",c,{query:e,dispatch:t}).then(()=>{js(e("GET_BEFORE_ADD_FILE"),ge(c)).then(v)}).catch(y=>{if(!y||!y.error||!y.status)return v(!1);t("DID_THROW_ITEM_INVALID",{id:p,error:y.error,status:y.status})})}),c.on("process-start",()=>{t("DID_START_ITEM_PROCESSING",{id:p})}),c.on("process-progress",v=>{t("DID_UPDATE_ITEM_PROCESS_PROGRESS",{id:p,progress:v})}),c.on("process-error",v=>{t("DID_THROW_ITEM_PROCESSING_ERROR",{id:p,error:v,status:{main:yn(n.options.labelFileProcessingError)(v),sub:n.options.labelTapToRetry}})}),c.on("process-revert-error",v=>{t("DID_THROW_ITEM_PROCESSING_REVERT_ERROR",{id:p,error:v,status:{main:yn(n.options.labelFileProcessingRevertError)(v),sub:n.options.labelTapToRetry}})}),c.on("process-complete",v=>{t("DID_COMPLETE_ITEM_PROCESSING",{id:p,error:null,serverFileReference:v}),t("DID_DEFINE_VALUE",{id:p,value:v})}),c.on("process-abort",()=>{t("DID_ABORT_ITEM_PROCESSING",{id:p})}),c.on("process-revert",()=>{t("DID_REVERT_ITEM_PROCESSING",{id:p}),t("DID_DEFINE_VALUE",{id:p,value:null})}),t("DID_ADD_ITEM",{id:p,index:i,interactionMethod:s}),Or(t,n);const{url:f,load:h,restore:g,fetch:m}=n.options.server||{};c.load(r,_h(d===ie.INPUT?fe(r)&&Ch(r)&&m?Cr(f,m):zs:d===ie.LIMBO?Cr(f,g):Cr(f,h)),(v,y,_)=>{we("LOAD_FILE",v,{query:e}).then(y).catch(_)})},REQUEST_PREPARE_OUTPUT:({item:r,success:i,failure:s=()=>{}})=>{const o={error:J("error",0,"Item not found"),file:null};if(r.archived)return s(o);we("PREPARE_OUTPUT",r.file,{query:e,item:r}).then(a=>{we("COMPLETE_PREPARE_OUTPUT",a,{query:e,item:r}).then(l=>{if(r.archived)return s(o);i(l)})})},COMPLETE_LOAD_ITEM:({item:r,data:i})=>{const{success:s,source:o}=i,a=e("GET_ITEM_INSERT_LOCATION");if(ht(a)&&o&&Mr(n,a),t("DID_LOAD_ITEM",{id:r.id,error:null,serverFileReference:r.origin===ie.INPUT?null:o}),s(ge(r)),r.origin===ie.LOCAL){t("DID_LOAD_LOCAL_ITEM",{id:r.id});return}if(r.origin===ie.LIMBO){t("DID_COMPLETE_ITEM_PROCESSING",{id:r.id,error:null,serverFileReference:o}),t("DID_DEFINE_VALUE",{id:r.id,value:r.serverId||o});return}e("IS_ASYNC")&&n.options.instantUpload&&t("REQUEST_ITEM_PROCESSING",{query:r.id})},RETRY_ITEM_LOAD:Re(n,r=>{r.retryLoad()}),REQUEST_ITEM_PREPARE:Re(n,(r,i,s)=>{t("REQUEST_PREPARE_OUTPUT",{query:r.id,item:r,success:o=>{t("DID_PREPARE_OUTPUT",{id:r.id,file:o}),i({file:r,output:o})},failure:s},!0)}),REQUEST_ITEM_PROCESSING:Re(n,(r,i,s)=>{if(!(r.status===H.IDLE||r.status===H.PROCESSING_ERROR)){const a=()=>t("REQUEST_ITEM_PROCESSING",{query:r,success:i,failure:s}),l=()=>document.hidden?a():setTimeout(a,32);r.status===H.PROCESSING_COMPLETE||r.status===H.PROCESSING_REVERT_ERROR?r.revert(Yt(n.options.server.url,n.options.server.revert),e("GET_FORCE_REVERT")).then(l).catch(()=>{}):r.status===H.PROCESSING&&r.abortProcessing().then(l);return}r.status!==H.PROCESSING_QUEUED&&(r.requestProcessing(),t("DID_REQUEST_ITEM_PROCESSING",{id:r.id}),t("PROCESS_ITEM",{query:r,success:i,failure:s},!0))}),PROCESS_ITEM:Re(n,(r,i,s)=>{const o=e("GET_MAX_PARALLEL_UPLOADS");if(e("GET_ITEMS_BY_STATUS",H.PROCESSING).length===o){n.processingQueue.push({id:r.id,success:i,failure:s});return}if(r.status===H.PROCESSING)return;const l=()=>{const c=n.processingQueue.shift();if(!c)return;const{id:u,success:p,failure:f}=c,h=pt(n.items,u);if(!h||h.archived){l();return}t("PROCESS_ITEM",{query:u,success:p,failure:f},!0)};r.onOnce("process-complete",()=>{i(ge(r)),l();const c=n.options.server;if(n.options.instantUpload&&r.origin===ie.LOCAL&&ht(c.remove)){const f=()=>{};r.origin=ie.LIMBO,n.options.server.remove(r.source,f,f)}e("GET_ITEMS_BY_STATUS",H.PROCESSING_COMPLETE).length===n.items.length&&t("DID_COMPLETE_ITEM_PROCESSING_ALL")}),r.onOnce("process-error",c=>{s({error:c,file:ge(r)}),l()});const d=n.options;r.process(Ih(Rh(d.server.url,d.server.process,d.name,{chunkTransferId:r.transferId,chunkServer:d.server.patch,chunkUploads:d.chunkUploads,chunkForce:d.chunkForce,chunkSize:d.chunkSize,chunkRetryDelays:d.chunkRetryDelays}),{allowMinimumUploadDuration:e("GET_ALLOW_MINIMUM_UPLOAD_DURATION")}),(c,u,p)=>{we("PREPARE_OUTPUT",c,{query:e,item:r}).then(f=>{t("DID_PREPARE_OUTPUT",{id:r.id,file:f}),u(f)}).catch(p)})}),RETRY_ITEM_PROCESSING:Re(n,r=>{t("REQUEST_ITEM_PROCESSING",{query:r})}),REQUEST_REMOVE_ITEM:Re(n,r=>{js(e("GET_BEFORE_REMOVE_FILE"),ge(r)).then(i=>{i&&t("REMOVE_ITEM",{query:r})})}),RELEASE_ITEM:Re(n,r=>{r.release()}),REMOVE_ITEM:Re(n,(r,i,s,o)=>{const a=()=>{const d=r.id;Vs(n.items,d).archive(),t("DID_REMOVE_ITEM",{error:null,id:d,item:r}),Or(t,n),i(ge(r))},l=n.options.server;r.origin===ie.LOCAL&&l&&ht(l.remove)&&o.remove!==!1?(t("DID_START_ITEM_REMOVE",{id:r.id}),l.remove(r.source,()=>a(),d=>{t("DID_THROW_ITEM_REMOVE_ERROR",{id:r.id,error:J("error",0,d,null),status:{main:yn(n.options.labelFileRemoveError)(d),sub:n.options.labelTapToRetry}})})):((o.revert&&r.origin!==ie.LOCAL&&r.serverId!==null||n.options.chunkUploads&&r.file.size>n.options.chunkSize||n.options.chunkUploads&&n.options.chunkForce)&&r.revert(Yt(n.options.server.url,n.options.server.revert),e("GET_FORCE_REVERT")),a())}),ABORT_ITEM_LOAD:Re(n,r=>{r.abortLoad()}),ABORT_ITEM_PROCESSING:Re(n,r=>{if(r.serverId){t("REVERT_ITEM_PROCESSING",{id:r.id});return}r.abortProcessing().then(()=>{n.options.instantUpload&&t("REMOVE_ITEM",{query:r.id})})}),REQUEST_REVERT_ITEM_PROCESSING:Re(n,r=>{if(!n.options.instantUpload){t("REVERT_ITEM_PROCESSING",{query:r});return}const i=a=>{a&&t("REVERT_ITEM_PROCESSING",{query:r})},s=e("GET_BEFORE_REMOVE_FILE");if(!s)return i(!0);const o=s(ge(r));if(o==null)return i(!0);if(typeof o=="boolean")return i(o);typeof o.then=="function"&&o.then(i)}),REVERT_ITEM_PROCESSING:Re(n,r=>{r.revert(Yt(n.options.server.url,n.options.server.revert),e("GET_FORCE_REVERT")).then(()=>{(n.options.instantUpload||Oh(r))&&t("REMOVE_ITEM",{query:r.id})}).catch(()=>{})}),SET_OPTIONS:({options:r})=>{const i=Object.keys(r),s=Nh.filter(a=>i.includes(a));[...s,...Object.keys(r).filter(a=>!s.includes(a))].forEach(a=>{t(`SET_${gr(a,"_").toUpperCase()}`,{value:r[a]})})}}),Nh=["server"],Bi=t=>t,je=t=>document.createElement(t),te=(t,e)=>{let n=t.childNodes[0];n?e!==n.nodeValue&&(n.nodeValue=e):(n=document.createTextNode(e),t.appendChild(n))},qs=(t,e,n,r)=>{const i=(r%360-90)*Math.PI/180;return{x:t+n*Math.cos(i),y:e+n*Math.sin(i)}},xh=(t,e,n,r,i,s)=>{const o=qs(t,e,n,i),a=qs(t,e,n,r);return["M",o.x,o.y,"A",n,n,0,s,0,a.x,a.y].join(" ")},Ph=(t,e,n,r,i)=>{let s=1;return i>r&&i-r<=.5&&(s=0),r>i&&r-i>=.5&&(s=0),xh(t,e,n,Math.min(.9999,r)*360,Math.min(.9999,i)*360,s)},Lh=({root:t,props:e})=>{e.spin=!1,e.progress=0,e.opacity=0;const n=jn("svg");t.ref.path=jn("path",{"stroke-width":2,"stroke-linecap":"round"}),n.appendChild(t.ref.path),t.ref.svg=n,t.appendChild(n)},kh=({root:t,props:e})=>{if(e.opacity===0)return;e.align&&(t.element.dataset.align=e.align);const n=parseInt(re(t.ref.path,"stroke-width"),10),r=t.rect.element.width*.5;let i=0,s=0;e.spin?(i=0,s=.5):(i=0,s=e.progress);const o=Ph(r,r,r-n,i,s);re(t.ref.path,"d",o),re(t.ref.path,"stroke-opacity",e.spin||e.progress>0?1:0)},$s=ne({tag:"div",name:"progress-indicator",ignoreRectUpdate:!0,ignoreRect:!0,create:Lh,write:kh,mixins:{apis:["progress","spin","align"],styles:["opacity"],animations:{opacity:{type:"tween",duration:500},progress:{type:"spring",stiffness:.95,damping:.65,mass:10}}}}),Bh=({root:t,props:e})=>{t.element.innerHTML=(e.icon||"")+`<span>${e.label}</span>`,e.isDisabled=!1},Fh=({root:t,props:e})=>{const{isDisabled:n}=e,r=t.query("GET_DISABLED")||e.opacity===0;r&&!n?(e.isDisabled=!0,re(t.element,"disabled","disabled")):!r&&n&&(e.isDisabled=!1,t.element.removeAttribute("disabled"))},ml=ne({tag:"button",attributes:{type:"button"},ignoreRect:!0,ignoreRectUpdate:!0,name:"file-action-button",mixins:{apis:["label"],styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}},listeners:!0},create:Bh,write:Fh}),El=(t,e=".",n=1e3,r={})=>{const{labelBytes:i="bytes",labelKilobytes:s="KB",labelMegabytes:o="MB",labelGigabytes:a="GB"}=r;t=Math.round(Math.abs(t));const l=n,d=n*n,c=n*n*n;return t<l?`${t} ${i}`:t<d?`${Math.floor(t/l)} ${s}`:t<c?`${Ys(t/d,1,e)} ${o}`:`${Ys(t/c,2,e)} ${a}`},Ys=(t,e,n)=>t.toFixed(e).split(".").filter(r=>r!=="0").join(n),Gh=({root:t,props:e})=>{const n=je("span");n.className="filepond--file-info-main",re(n,"aria-hidden","true"),t.appendChild(n),t.ref.fileName=n;const r=je("span");r.className="filepond--file-info-sub",t.appendChild(r),t.ref.fileSize=r,te(r,t.query("GET_LABEL_FILE_WAITING_FOR_SIZE")),te(n,Bi(t.query("GET_ITEM_NAME",e.id)))},oi=({root:t,props:e})=>{te(t.ref.fileSize,El(t.query("GET_ITEM_SIZE",e.id),".",t.query("GET_FILE_SIZE_BASE"),t.query("GET_FILE_SIZE_LABELS",t.query))),te(t.ref.fileName,Bi(t.query("GET_ITEM_NAME",e.id)))},Qs=({root:t,props:e})=>{if(zt(t.query("GET_ITEM_SIZE",e.id))){oi({root:t,props:e});return}te(t.ref.fileSize,t.query("GET_LABEL_FILE_SIZE_NOT_AVAILABLE"))},Uh=ne({name:"file-info",ignoreRect:!0,ignoreRectUpdate:!0,write:he({DID_LOAD_ITEM:oi,DID_UPDATE_ITEM_META:oi,DID_THROW_ITEM_LOAD_ERROR:Qs,DID_THROW_ITEM_INVALID:Qs}),didCreateView:t=>{Rt("CREATE_VIEW",{...t,view:t})},create:Gh,mixins:{styles:["translateX","translateY"],animations:{translateX:"spring",translateY:"spring"}}}),yl=t=>Math.round(t*100),Hh=({root:t})=>{const e=je("span");e.className="filepond--file-status-main",t.appendChild(e),t.ref.main=e;const n=je("span");n.className="filepond--file-status-sub",t.appendChild(n),t.ref.sub=n,vl({root:t,action:{progress:null}})},vl=({root:t,action:e})=>{const n=e.progress===null?t.query("GET_LABEL_FILE_LOADING"):`${t.query("GET_LABEL_FILE_LOADING")} ${yl(e.progress)}%`;te(t.ref.main,n),te(t.ref.sub,t.query("GET_LABEL_TAP_TO_CANCEL"))},Vh=({root:t,action:e})=>{const n=e.progress===null?t.query("GET_LABEL_FILE_PROCESSING"):`${t.query("GET_LABEL_FILE_PROCESSING")} ${yl(e.progress)}%`;te(t.ref.main,n),te(t.ref.sub,t.query("GET_LABEL_TAP_TO_CANCEL"))},zh=({root:t})=>{te(t.ref.main,t.query("GET_LABEL_FILE_PROCESSING")),te(t.ref.sub,t.query("GET_LABEL_TAP_TO_CANCEL"))},Wh=({root:t})=>{te(t.ref.main,t.query("GET_LABEL_FILE_PROCESSING_ABORTED")),te(t.ref.sub,t.query("GET_LABEL_TAP_TO_RETRY"))},jh=({root:t})=>{te(t.ref.main,t.query("GET_LABEL_FILE_PROCESSING_COMPLETE")),te(t.ref.sub,t.query("GET_LABEL_TAP_TO_UNDO"))},Zs=({root:t})=>{te(t.ref.main,""),te(t.ref.sub,"")},Qt=({root:t,action:e})=>{te(t.ref.main,e.status.main),te(t.ref.sub,e.status.sub)},qh=ne({name:"file-status",ignoreRect:!0,ignoreRectUpdate:!0,write:he({DID_LOAD_ITEM:Zs,DID_REVERT_ITEM_PROCESSING:Zs,DID_REQUEST_ITEM_PROCESSING:zh,DID_ABORT_ITEM_PROCESSING:Wh,DID_COMPLETE_ITEM_PROCESSING:jh,DID_UPDATE_ITEM_PROCESS_PROGRESS:Vh,DID_UPDATE_ITEM_LOAD_PROGRESS:vl,DID_THROW_ITEM_LOAD_ERROR:Qt,DID_THROW_ITEM_INVALID:Qt,DID_THROW_ITEM_PROCESSING_ERROR:Qt,DID_THROW_ITEM_PROCESSING_REVERT_ERROR:Qt,DID_THROW_ITEM_REMOVE_ERROR:Qt}),didCreateView:t=>{Rt("CREATE_VIEW",{...t,view:t})},create:Hh,mixins:{styles:["translateX","translateY","opacity"],animations:{opacity:{type:"tween",duration:250},translateX:"spring",translateY:"spring"}}}),ai={AbortItemLoad:{label:"GET_LABEL_BUTTON_ABORT_ITEM_LOAD",action:"ABORT_ITEM_LOAD",className:"filepond--action-abort-item-load",align:"LOAD_INDICATOR_POSITION"},RetryItemLoad:{label:"GET_LABEL_BUTTON_RETRY_ITEM_LOAD",action:"RETRY_ITEM_LOAD",icon:"GET_ICON_RETRY",className:"filepond--action-retry-item-load",align:"BUTTON_PROCESS_ITEM_POSITION"},RemoveItem:{label:"GET_LABEL_BUTTON_REMOVE_ITEM",action:"REQUEST_REMOVE_ITEM",icon:"GET_ICON_REMOVE",className:"filepond--action-remove-item",align:"BUTTON_REMOVE_ITEM_POSITION"},ProcessItem:{label:"GET_LABEL_BUTTON_PROCESS_ITEM",action:"REQUEST_ITEM_PROCESSING",icon:"GET_ICON_PROCESS",className:"filepond--action-process-item",align:"BUTTON_PROCESS_ITEM_POSITION"},AbortItemProcessing:{label:"GET_LABEL_BUTTON_ABORT_ITEM_PROCESSING",action:"ABORT_ITEM_PROCESSING",className:"filepond--action-abort-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"},RetryItemProcessing:{label:"GET_LABEL_BUTTON_RETRY_ITEM_PROCESSING",action:"RETRY_ITEM_PROCESSING",icon:"GET_ICON_RETRY",className:"filepond--action-retry-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"},RevertItemProcessing:{label:"GET_LABEL_BUTTON_UNDO_ITEM_PROCESSING",action:"REQUEST_REVERT_ITEM_PROCESSING",icon:"GET_ICON_UNDO",className:"filepond--action-revert-item-processing",align:"BUTTON_PROCESS_ITEM_POSITION"}},li=[];K(ai,t=>{li.push(t)});const ve=t=>{if(ci(t)==="right")return 0;const e=t.ref.buttonRemoveItem.rect.element;return e.hidden?null:e.width+e.left},$h=t=>t.ref.buttonAbortItemLoad.rect.element.width,vn=t=>Math.floor(t.ref.buttonRemoveItem.rect.element.height/4),Yh=t=>Math.floor(t.ref.buttonRemoveItem.rect.element.left/2),Qh=t=>t.query("GET_STYLE_LOAD_INDICATOR_POSITION"),Zh=t=>t.query("GET_STYLE_PROGRESS_INDICATOR_POSITION"),ci=t=>t.query("GET_STYLE_BUTTON_REMOVE_ITEM_POSITION"),Xh={buttonAbortItemLoad:{opacity:0},buttonRetryItemLoad:{opacity:0},buttonRemoveItem:{opacity:0},buttonProcessItem:{opacity:0},buttonAbortItemProcessing:{opacity:0},buttonRetryItemProcessing:{opacity:0},buttonRevertItemProcessing:{opacity:0},loadProgressIndicator:{opacity:0,align:Qh},processProgressIndicator:{opacity:0,align:Zh},processingCompleteIndicator:{opacity:0,scaleX:.75,scaleY:.75},info:{translateX:0,translateY:0,opacity:0},status:{translateX:0,translateY:0,opacity:0}},Xs={buttonRemoveItem:{opacity:1},buttonProcessItem:{opacity:1},info:{translateX:ve},status:{translateX:ve}},Nr={buttonAbortItemProcessing:{opacity:1},processProgressIndicator:{opacity:1},status:{opacity:1}},Ot={DID_THROW_ITEM_INVALID:{buttonRemoveItem:{opacity:1},info:{translateX:ve},status:{translateX:ve,opacity:1}},DID_START_ITEM_LOAD:{buttonAbortItemLoad:{opacity:1},loadProgressIndicator:{opacity:1},status:{opacity:1}},DID_THROW_ITEM_LOAD_ERROR:{buttonRetryItemLoad:{opacity:1},buttonRemoveItem:{opacity:1},info:{translateX:ve},status:{opacity:1}},DID_START_ITEM_REMOVE:{processProgressIndicator:{opacity:1,align:ci},info:{translateX:ve},status:{opacity:0}},DID_THROW_ITEM_REMOVE_ERROR:{processProgressIndicator:{opacity:0,align:ci},buttonRemoveItem:{opacity:1},info:{translateX:ve},status:{opacity:1,translateX:ve}},DID_LOAD_ITEM:Xs,DID_LOAD_LOCAL_ITEM:{buttonRemoveItem:{opacity:1},info:{translateX:ve},status:{translateX:ve}},DID_START_ITEM_PROCESSING:Nr,DID_REQUEST_ITEM_PROCESSING:Nr,DID_UPDATE_ITEM_PROCESS_PROGRESS:Nr,DID_COMPLETE_ITEM_PROCESSING:{buttonRevertItemProcessing:{opacity:1},info:{opacity:1},status:{opacity:1}},DID_THROW_ITEM_PROCESSING_ERROR:{buttonRemoveItem:{opacity:1},buttonRetryItemProcessing:{opacity:1},status:{opacity:1},info:{translateX:ve}},DID_THROW_ITEM_PROCESSING_REVERT_ERROR:{buttonRevertItemProcessing:{opacity:1},status:{opacity:1},info:{opacity:1}},DID_ABORT_ITEM_PROCESSING:{buttonRemoveItem:{opacity:1},buttonProcessItem:{opacity:1},info:{translateX:ve},status:{opacity:1}},DID_REVERT_ITEM_PROCESSING:Xs},Kh=ne({create:({root:t})=>{t.element.innerHTML=t.query("GET_ICON_DONE")},name:"processing-complete-indicator",ignoreRect:!0,mixins:{styles:["scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",opacity:{type:"tween",duration:250}}}}),Jh=({root:t,props:e})=>{const n=Object.keys(ai).reduce((h,g)=>(h[g]={...ai[g]},h),{}),{id:r}=e,i=t.query("GET_ALLOW_REVERT"),s=t.query("GET_ALLOW_REMOVE"),o=t.query("GET_ALLOW_PROCESS"),a=t.query("GET_INSTANT_UPLOAD"),l=t.query("IS_ASYNC"),d=t.query("GET_STYLE_BUTTON_REMOVE_ITEM_ALIGN");let c;l?o&&!i?c=h=>!/RevertItemProcessing/.test(h):!o&&i?c=h=>!/ProcessItem|RetryItemProcessing|AbortItemProcessing/.test(h):!o&&!i&&(c=h=>!/Process/.test(h)):c=h=>!/Process/.test(h);const u=c?li.filter(c):li.concat();if(a&&i&&(n.RevertItemProcessing.label="GET_LABEL_BUTTON_REMOVE_ITEM",n.RevertItemProcessing.icon="GET_ICON_REMOVE"),l&&!i){const h=Ot.DID_COMPLETE_ITEM_PROCESSING;h.info.translateX=Yh,h.info.translateY=vn,h.status.translateY=vn,h.processingCompleteIndicator={opacity:1,scaleX:1,scaleY:1}}if(l&&!o&&(["DID_START_ITEM_PROCESSING","DID_REQUEST_ITEM_PROCESSING","DID_UPDATE_ITEM_PROCESS_PROGRESS","DID_THROW_ITEM_PROCESSING_ERROR"].forEach(h=>{Ot[h].status.translateY=vn}),Ot.DID_THROW_ITEM_PROCESSING_ERROR.status.translateX=$h),d&&i){n.RevertItemProcessing.align="BUTTON_REMOVE_ITEM_POSITION";const h=Ot.DID_COMPLETE_ITEM_PROCESSING;h.info.translateX=ve,h.status.translateY=vn,h.processingCompleteIndicator={opacity:1,scaleX:1,scaleY:1}}s||(n.RemoveItem.disabled=!0),K(n,(h,g)=>{const m=t.createChildView(ml,{label:t.query(g.label),icon:t.query(g.icon),opacity:0});u.includes(h)&&t.appendChildView(m),g.disabled&&(m.element.setAttribute("disabled","disabled"),m.element.setAttribute("hidden","hidden")),m.element.dataset.align=t.query(`GET_STYLE_${g.align}`),m.element.classList.add(g.className),m.on("click",v=>{v.stopPropagation(),!g.disabled&&t.dispatch(g.action,{query:r})}),t.ref[`button${h}`]=m}),t.ref.processingCompleteIndicator=t.appendChildView(t.createChildView(Kh)),t.ref.processingCompleteIndicator.element.dataset.align=t.query("GET_STYLE_BUTTON_PROCESS_ITEM_POSITION"),t.ref.info=t.appendChildView(t.createChildView(Uh,{id:r})),t.ref.status=t.appendChildView(t.createChildView(qh,{id:r}));const p=t.appendChildView(t.createChildView($s,{opacity:0,align:t.query("GET_STYLE_LOAD_INDICATOR_POSITION")}));p.element.classList.add("filepond--load-indicator"),t.ref.loadProgressIndicator=p;const f=t.appendChildView(t.createChildView($s,{opacity:0,align:t.query("GET_STYLE_PROGRESS_INDICATOR_POSITION")}));f.element.classList.add("filepond--process-indicator"),t.ref.processProgressIndicator=f,t.ref.activeStyles=[]},ep=({root:t,actions:e,props:n})=>{tp({root:t,actions:e,props:n});let r=e.concat().filter(i=>/^DID_/.test(i.type)).reverse().find(i=>Ot[i.type]);if(r){t.ref.activeStyles=[];const i=Ot[r.type];K(Xh,(s,o)=>{const a=t.ref[s];K(o,(l,d)=>{const c=i[s]&&typeof i[s][l]<"u"?i[s][l]:d;t.ref.activeStyles.push({control:a,key:l,value:c})})})}t.ref.activeStyles.forEach(({control:i,key:s,value:o})=>{i[s]=typeof o=="function"?o(t):o})},tp=he({DID_SET_LABEL_BUTTON_ABORT_ITEM_PROCESSING:({root:t,action:e})=>{t.ref.buttonAbortItemProcessing.label=e.value},DID_SET_LABEL_BUTTON_ABORT_ITEM_LOAD:({root:t,action:e})=>{t.ref.buttonAbortItemLoad.label=e.value},DID_SET_LABEL_BUTTON_ABORT_ITEM_REMOVAL:({root:t,action:e})=>{t.ref.buttonAbortItemRemoval.label=e.value},DID_REQUEST_ITEM_PROCESSING:({root:t})=>{t.ref.processProgressIndicator.spin=!0,t.ref.processProgressIndicator.progress=0},DID_START_ITEM_LOAD:({root:t})=>{t.ref.loadProgressIndicator.spin=!0,t.ref.loadProgressIndicator.progress=0},DID_START_ITEM_REMOVE:({root:t})=>{t.ref.processProgressIndicator.spin=!0,t.ref.processProgressIndicator.progress=0},DID_UPDATE_ITEM_LOAD_PROGRESS:({root:t,action:e})=>{t.ref.loadProgressIndicator.spin=!1,t.ref.loadProgressIndicator.progress=e.progress},DID_UPDATE_ITEM_PROCESS_PROGRESS:({root:t,action:e})=>{t.ref.processProgressIndicator.spin=!1,t.ref.processProgressIndicator.progress=e.progress}}),np=ne({create:Jh,write:ep,didCreateView:t=>{Rt("CREATE_VIEW",{...t,view:t})},name:"file"}),rp=({root:t,props:e})=>{t.ref.fileName=je("legend"),t.appendChild(t.ref.fileName),t.ref.file=t.appendChildView(t.createChildView(np,{id:e.id})),t.ref.data=!1},ip=({root:t,props:e})=>{te(t.ref.fileName,Bi(t.query("GET_ITEM_NAME",e.id)))},sp=ne({create:rp,ignoreRect:!0,write:he({DID_LOAD_ITEM:ip}),didCreateView:t=>{Rt("CREATE_VIEW",{...t,view:t})},tag:"fieldset",name:"file-wrapper"}),Ks={type:"spring",damping:.6,mass:7},op=({root:t,props:e})=>{[{name:"top"},{name:"center",props:{translateY:null,scaleY:null},mixins:{animations:{scaleY:Ks},styles:["translateY","scaleY"]}},{name:"bottom",props:{translateY:null},mixins:{animations:{translateY:Ks},styles:["translateY"]}}].forEach(n=>{ap(t,n,e.name)}),t.element.classList.add(`filepond--${e.name}`),t.ref.scalable=null},ap=(t,e,n)=>{const r=ne({name:`panel-${e.name} filepond--${n}`,mixins:e.mixins,ignoreRectUpdate:!0}),i=t.createChildView(r,e.props);t.ref[e.name]=t.appendChildView(i)},lp=({root:t,props:e})=>{if((t.ref.scalable===null||e.scalable!==t.ref.scalable)&&(t.ref.scalable=tl(e.scalable)?e.scalable:!0,t.element.dataset.scalable=t.ref.scalable),!e.height)return;const n=t.ref.top.rect.element,r=t.ref.bottom.rect.element,i=Math.max(n.height+r.height,e.height);t.ref.center.translateY=n.height,t.ref.center.scaleY=(i-n.height-r.height)/100,t.ref.bottom.translateY=i-r.height},_l=ne({name:"panel",read:({root:t,props:e})=>e.heightCurrent=t.ref.bottom.translateY,write:lp,create:op,ignoreRect:!0,mixins:{apis:["height","heightCurrent","scalable"]}}),cp=t=>{const e=t.map(r=>r.id);let n;return{setIndex:r=>{n=r},getIndex:()=>n,getItemIndex:r=>e.indexOf(r.id)}},Js={type:"spring",stiffness:.75,damping:.45,mass:10},eo="spring",to={DID_START_ITEM_LOAD:"busy",DID_UPDATE_ITEM_LOAD_PROGRESS:"loading",DID_THROW_ITEM_INVALID:"load-invalid",DID_THROW_ITEM_LOAD_ERROR:"load-error",DID_LOAD_ITEM:"idle",DID_THROW_ITEM_REMOVE_ERROR:"remove-error",DID_START_ITEM_REMOVE:"busy",DID_START_ITEM_PROCESSING:"busy processing",DID_REQUEST_ITEM_PROCESSING:"busy processing",DID_UPDATE_ITEM_PROCESS_PROGRESS:"processing",DID_COMPLETE_ITEM_PROCESSING:"processing-complete",DID_THROW_ITEM_PROCESSING_ERROR:"processing-error",DID_THROW_ITEM_PROCESSING_REVERT_ERROR:"processing-revert-error",DID_ABORT_ITEM_PROCESSING:"cancelled",DID_REVERT_ITEM_PROCESSING:"idle"},dp=({root:t,props:e})=>{if(t.ref.handleClick=r=>t.dispatch("DID_ACTIVATE_ITEM",{id:e.id}),t.element.id=`filepond--item-${e.id}`,t.element.addEventListener("click",t.ref.handleClick),t.ref.container=t.appendChildView(t.createChildView(sp,{id:e.id})),t.ref.panel=t.appendChildView(t.createChildView(_l,{name:"item-panel"})),t.ref.panel.height=null,e.markedForRemoval=!1,!t.query("GET_ALLOW_REORDER"))return;t.element.dataset.dragState="idle";const n=r=>{if(!r.isPrimary)return;let i=!1;const s={x:r.pageX,y:r.pageY};e.dragOrigin={x:t.translateX,y:t.translateY},e.dragCenter={x:r.offsetX,y:r.offsetY};const o=cp(t.query("GET_ACTIVE_ITEMS"));t.dispatch("DID_GRAB_ITEM",{id:e.id,dragState:o});const a=u=>{if(!u.isPrimary)return;u.stopPropagation(),u.preventDefault(),e.dragOffset={x:u.pageX-s.x,y:u.pageY-s.y},e.dragOffset.x*e.dragOffset.x+e.dragOffset.y*e.dragOffset.y>16&&!i&&(i=!0,t.element.removeEventListener("click",t.ref.handleClick)),t.dispatch("DID_DRAG_ITEM",{id:e.id,dragState:o})},l=u=>{u.isPrimary&&(e.dragOffset={x:u.pageX-s.x,y:u.pageY-s.y},c())},d=()=>{c()},c=()=>{document.removeEventListener("pointercancel",d),document.removeEventListener("pointermove",a),document.removeEventListener("pointerup",l),t.dispatch("DID_DROP_ITEM",{id:e.id,dragState:o}),i&&setTimeout(()=>t.element.addEventListener("click",t.ref.handleClick),0)};document.addEventListener("pointercancel",d),document.addEventListener("pointermove",a),document.addEventListener("pointerup",l)};t.element.addEventListener("pointerdown",n)},up=he({DID_UPDATE_PANEL_HEIGHT:({root:t,action:e})=>{t.height=e.height}}),fp=he({DID_GRAB_ITEM:({root:t,props:e})=>{e.dragOrigin={x:t.translateX,y:t.translateY}},DID_DRAG_ITEM:({root:t})=>{t.element.dataset.dragState="drag"},DID_DROP_ITEM:({root:t,props:e})=>{e.dragOffset=null,e.dragOrigin=null,t.element.dataset.dragState="drop"}},({root:t,actions:e,props:n,shouldOptimize:r})=>{t.element.dataset.dragState==="drop"&&t.scaleX<=1&&(t.element.dataset.dragState="idle");let i=e.concat().filter(o=>/^DID_/.test(o.type)).reverse().find(o=>to[o.type]);i&&i.type!==n.currentState&&(n.currentState=i.type,t.element.dataset.filepondItemState=to[n.currentState]||"");const s=t.query("GET_ITEM_PANEL_ASPECT_RATIO")||t.query("GET_PANEL_ASPECT_RATIO");s?r||(t.height=t.rect.element.width*s):(up({root:t,actions:e,props:n}),!t.height&&t.ref.container.rect.element.height>0&&(t.height=t.ref.container.rect.element.height)),r&&(t.ref.panel.height=null),t.ref.panel.height=t.height}),hp=ne({create:dp,write:fp,destroy:({root:t,props:e})=>{t.element.removeEventListener("click",t.ref.handleClick),t.dispatch("RELEASE_ITEM",{query:e.id})},tag:"li",name:"item",mixins:{apis:["id","interactionMethod","markedForRemoval","spawnDate","dragCenter","dragOrigin","dragOffset"],styles:["translateX","translateY","scaleX","scaleY","opacity","height"],animations:{scaleX:eo,scaleY:eo,translateX:Js,translateY:Js,opacity:{type:"tween",duration:150}}}});var Fi=(t,e)=>Math.max(1,Math.floor((t+1)/e));const Gi=(t,e,n)=>{if(!n)return;const r=t.rect.element.width,i=e.length;let s=null;if(i===0||n.top<e[0].rect.element.top)return-1;const a=e[0].rect.element,l=a.marginLeft+a.marginRight,d=a.width+l,c=Fi(r,d);if(c===1){for(let f=0;f<i;f++){const h=e[f],g=h.rect.outer.top+h.rect.element.height*.5;if(n.top<g)return f}return i}const u=a.marginTop+a.marginBottom,p=a.height+u;for(let f=0;f<i;f++){const h=f%c,g=Math.floor(f/c),m=h*d,v=g*p,y=v-a.marginTop,_=m+d,b=v+p+a.marginBottom;if(n.top<b&&n.top>y){if(n.left<_)return f;f!==i-1?s=f:s=null}}return s!==null?s:i},_n={height:0,width:0,get getHeight(){return this.height},set setHeight(t){(this.height===0||t===0)&&(this.height=t)},get getWidth(){return this.width},set setWidth(t){(this.width===0||t===0)&&(this.width=t)}},pp=({root:t})=>{re(t.element,"role","list"),t.ref.lastItemSpanwDate=Date.now()},gp=({root:t,action:e})=>{const{id:n,index:r,interactionMethod:i}=e;t.ref.addIndex=r;const s=Date.now();let o=s,a=1;if(i!==Ie.NONE){a=0;const l=t.query("GET_ITEM_INSERT_INTERVAL"),d=s-t.ref.lastItemSpanwDate;o=d<l?s+(l-d):s}t.ref.lastItemSpanwDate=o,t.appendChildView(t.createChildView(hp,{spawnDate:o,id:n,opacity:a,interactionMethod:i}),r)},no=(t,e,n,r=0,i=1)=>{t.dragOffset?(t.translateX=null,t.translateY=null,t.translateX=t.dragOrigin.x+t.dragOffset.x,t.translateY=t.dragOrigin.y+t.dragOffset.y,t.scaleX=1.025,t.scaleY=1.025):(t.translateX=e,t.translateY=n,Date.now()>t.spawnDate&&(t.opacity===0&&mp(t,e,n,r,i),t.scaleX=1,t.scaleY=1,t.opacity=1))},mp=(t,e,n,r,i)=>{t.interactionMethod===Ie.NONE?(t.translateX=null,t.translateX=e,t.translateY=null,t.translateY=n):t.interactionMethod===Ie.DROP?(t.translateX=null,t.translateX=e-r*20,t.translateY=null,t.translateY=n-i*10,t.scaleX=.8,t.scaleY=.8):t.interactionMethod===Ie.BROWSE?(t.translateY=null,t.translateY=n-30):t.interactionMethod===Ie.API&&(t.translateX=null,t.translateX=e-30,t.translateY=null)},Ep=({root:t,action:e})=>{const{id:n}=e,r=t.childViews.find(i=>i.id===n);r&&(r.scaleX=.9,r.scaleY=.9,r.opacity=0,r.markedForRemoval=!0)},xr=t=>t.rect.element.height+t.rect.element.marginBottom*.5+t.rect.element.marginTop*.5,yp=t=>t.rect.element.width+t.rect.element.marginLeft*.5+t.rect.element.marginRight*.5,vp=({root:t,action:e})=>{const{id:n,dragState:r}=e,i=t.query("GET_ITEM",{id:n}),s=t.childViews.find(m=>m.id===n),o=t.childViews.length,a=r.getItemIndex(i);if(!s)return;const l={x:s.dragOrigin.x+s.dragOffset.x+s.dragCenter.x,y:s.dragOrigin.y+s.dragOffset.y+s.dragCenter.y},d=xr(s),c=yp(s);let u=Math.floor(t.rect.outer.width/c);u>o&&(u=o);const p=Math.floor(o/u+1);_n.setHeight=d*p,_n.setWidth=c*u;var f={y:Math.floor(l.y/d),x:Math.floor(l.x/c),getGridIndex:function(){return l.y>_n.getHeight||l.y<0||l.x>_n.getWidth||l.x<0?a:this.y*u+this.x},getColIndex:function(){const v=t.query("GET_ACTIVE_ITEMS"),y=t.childViews.filter(x=>x.rect.element.height),_=v.map(x=>y.find(P=>P.id===x.id)),b=_.findIndex(x=>x===s),A=xr(s),S=_.length;let M=S,I=0,N=0,G=0;for(let x=0;x<S;x++)if(I=xr(_[x]),G=N,N=G+I,l.y<N){if(b>x){if(l.y<G+A){M=x;break}continue}M=x;break}return M}};const h=u>1?f.getGridIndex():f.getColIndex();t.dispatch("MOVE_ITEM",{query:s,index:h});const g=r.getIndex();if(g===void 0||g!==h){if(r.setIndex(h),g===void 0)return;t.dispatch("DID_REORDER_ITEMS",{items:t.query("GET_ACTIVE_ITEMS"),origin:a,target:h})}},_p=he({DID_ADD_ITEM:gp,DID_REMOVE_ITEM:Ep,DID_DRAG_ITEM:vp}),bp=({root:t,props:e,actions:n,shouldOptimize:r})=>{_p({root:t,props:e,actions:n});const{dragCoordinates:i}=e,s=t.rect.element.width,o=t.childViews.filter(_=>_.rect.element.height),a=t.query("GET_ACTIVE_ITEMS").map(_=>o.find(b=>b.id===_.id)).filter(_=>_),l=i?Gi(t,a,i):null,d=t.ref.addIndex||null;t.ref.addIndex=null;let c=0,u=0,p=0;if(a.length===0)return;const f=a[0].rect.element,h=f.marginTop+f.marginBottom,g=f.marginLeft+f.marginRight,m=f.width+g,v=f.height+h,y=Fi(s,m);if(y===1){let _=0,b=0;a.forEach((A,S)=>{if(l){let N=S-l;N===-2?b=-h*.25:N===-1?b=-h*.75:N===0?b=h*.75:N===1?b=h*.25:b=0}r&&(A.translateX=null,A.translateY=null),A.markedForRemoval||no(A,0,_+b);let I=(A.rect.element.height+h)*(A.markedForRemoval?A.opacity:1);_+=I})}else{let _=0,b=0;a.forEach((A,S)=>{S===l&&(c=1),S===d&&(p+=1),A.markedForRemoval&&A.opacity<.5&&(u-=1);const M=S+p+c+u,I=M%y,N=Math.floor(M/y),G=I*m,x=N*v,P=Math.sign(G-_),$=Math.sign(x-b);_=G,b=x,!A.markedForRemoval&&(r&&(A.translateX=null,A.translateY=null),no(A,G,x,P,$))})}},Tp=(t,e)=>e.filter(n=>n.data&&n.data.id?t.id===n.data.id:!0),Rp=ne({create:pp,write:bp,tag:"ul",name:"list",didWriteView:({root:t})=>{t.childViews.filter(e=>e.markedForRemoval&&e.opacity===0&&e.resting).forEach(e=>{e._destroy(),t.removeChildView(e)})},filterFrameActionsForChild:Tp,mixins:{apis:["dragCoordinates"]}}),Ap=({root:t,props:e})=>{t.ref.list=t.appendChildView(t.createChildView(Rp)),e.dragCoordinates=null,e.overflowing=!1},Ip=({root:t,props:e,action:n})=>{t.query("GET_ITEM_INSERT_LOCATION_FREEDOM")&&(e.dragCoordinates={left:n.position.scopeLeft-t.ref.list.rect.element.left,top:n.position.scopeTop-(t.rect.outer.top+t.rect.element.marginTop+t.rect.element.scrollTop)})},Sp=({props:t})=>{t.dragCoordinates=null},Dp=he({DID_DRAG:Ip,DID_END_DRAG:Sp}),wp=({root:t,props:e,actions:n})=>{if(Dp({root:t,props:e,actions:n}),t.ref.list.dragCoordinates=e.dragCoordinates,e.overflowing&&!e.overflow&&(e.overflowing=!1,t.element.dataset.state="",t.height=null),e.overflow){const r=Math.round(e.overflow);r!==t.height&&(e.overflowing=!0,t.element.dataset.state="overflow",t.height=r)}},Cp=ne({create:Ap,write:wp,name:"list-scroller",mixins:{apis:["overflow","dragCoordinates"],styles:["height","translateY"],animations:{translateY:"spring"}}}),Oe=(t,e,n,r="")=>{n?re(t,e,r):t.removeAttribute(e)},Op=t=>{if(!(!t||t.value==="")){try{t.value=""}catch{}if(t.value){const e=je("form"),n=t.parentNode,r=t.nextSibling;e.appendChild(t),e.reset(),r?n.insertBefore(t,r):n.appendChild(t)}}},Mp=({root:t,props:e})=>{t.element.id=`filepond--browser-${e.id}`,re(t.element,"name",t.query("GET_NAME")),re(t.element,"aria-controls",`filepond--assistant-${e.id}`),re(t.element,"aria-labelledby",`filepond--drop-label-${e.id}`),bl({root:t,action:{value:t.query("GET_ACCEPTED_FILE_TYPES")}}),Tl({root:t,action:{value:t.query("GET_ALLOW_MULTIPLE")}}),Rl({root:t,action:{value:t.query("GET_ALLOW_DIRECTORIES_ONLY")}}),di({root:t}),Al({root:t,action:{value:t.query("GET_REQUIRED")}}),Il({root:t,action:{value:t.query("GET_CAPTURE_METHOD")}}),t.ref.handleChange=n=>{if(!t.element.value)return;const r=Array.from(t.element.files).map(i=>(i._relativePath=i.webkitRelativePath,i));setTimeout(()=>{e.onload(r),Op(t.element)},250)},t.element.addEventListener("change",t.ref.handleChange)},bl=({root:t,action:e})=>{t.query("GET_ALLOW_SYNC_ACCEPT_ATTRIBUTE")&&Oe(t.element,"accept",!!e.value,e.value?e.value.join(","):"")},Tl=({root:t,action:e})=>{Oe(t.element,"multiple",e.value)},Rl=({root:t,action:e})=>{Oe(t.element,"webkitdirectory",e.value)},di=({root:t})=>{const e=t.query("GET_DISABLED"),n=t.query("GET_ALLOW_BROWSE"),r=e||!n;Oe(t.element,"disabled",r)},Al=({root:t,action:e})=>{e.value?t.query("GET_TOTAL_ITEMS")===0&&Oe(t.element,"required",!0):Oe(t.element,"required",!1)},Il=({root:t,action:e})=>{Oe(t.element,"capture",!!e.value,e.value===!0?"":e.value)},ro=({root:t})=>{const{element:e}=t;t.query("GET_TOTAL_ITEMS")>0?(Oe(e,"required",!1),Oe(e,"name",!1)):(Oe(e,"name",!0,t.query("GET_NAME")),t.query("GET_CHECK_VALIDITY")&&e.setCustomValidity(""),t.query("GET_REQUIRED")&&Oe(e,"required",!0))},Np=({root:t})=>{t.query("GET_CHECK_VALIDITY")&&t.element.setCustomValidity(t.query("GET_LABEL_INVALID_FIELD"))},xp=ne({tag:"input",name:"browser",ignoreRect:!0,ignoreRectUpdate:!0,attributes:{type:"file"},create:Mp,destroy:({root:t})=>{t.element.removeEventListener("change",t.ref.handleChange)},write:he({DID_LOAD_ITEM:ro,DID_REMOVE_ITEM:ro,DID_THROW_ITEM_INVALID:Np,DID_SET_DISABLED:di,DID_SET_ALLOW_BROWSE:di,DID_SET_ALLOW_DIRECTORIES_ONLY:Rl,DID_SET_ALLOW_MULTIPLE:Tl,DID_SET_ACCEPTED_FILE_TYPES:bl,DID_SET_CAPTURE_METHOD:Il,DID_SET_REQUIRED:Al})}),io={ENTER:13,SPACE:32},Pp=({root:t,props:e})=>{const n=je("label");re(n,"for",`filepond--browser-${e.id}`),re(n,"id",`filepond--drop-label-${e.id}`),t.ref.handleKeyDown=r=>{(r.keyCode===io.ENTER||r.keyCode===io.SPACE)&&(r.preventDefault(),t.ref.label.click())},t.ref.handleClick=r=>{r.target===n||n.contains(r.target)||t.ref.label.click()},n.addEventListener("keydown",t.ref.handleKeyDown),t.element.addEventListener("click",t.ref.handleClick),Sl(n,e.caption),t.appendChild(n),t.ref.label=n},Sl=(t,e)=>{t.innerHTML=e;const n=t.querySelector(".filepond--label-action");return n&&re(n,"tabindex","0"),e},Lp=ne({name:"drop-label",ignoreRect:!0,create:Pp,destroy:({root:t})=>{t.ref.label.addEventListener("keydown",t.ref.handleKeyDown),t.element.removeEventListener("click",t.ref.handleClick)},write:he({DID_SET_LABEL_IDLE:({root:t,action:e})=>{Sl(t.ref.label,e.value)}}),mixins:{styles:["opacity","translateX","translateY"],animations:{opacity:{type:"tween",duration:150},translateX:"spring",translateY:"spring"}}}),kp=ne({name:"drip-blob",ignoreRect:!0,mixins:{styles:["translateX","translateY","scaleX","scaleY","opacity"],animations:{scaleX:"spring",scaleY:"spring",translateX:"spring",translateY:"spring",opacity:{type:"tween",duration:250}}}}),Bp=({root:t})=>{const e=t.rect.element.width*.5,n=t.rect.element.height*.5;t.ref.blob=t.appendChildView(t.createChildView(kp,{opacity:0,scaleX:2.5,scaleY:2.5,translateX:e,translateY:n}))},Fp=({root:t,action:e})=>{if(!t.ref.blob){Bp({root:t});return}t.ref.blob.translateX=e.position.scopeLeft,t.ref.blob.translateY=e.position.scopeTop,t.ref.blob.scaleX=1,t.ref.blob.scaleY=1,t.ref.blob.opacity=1},Gp=({root:t})=>{t.ref.blob&&(t.ref.blob.opacity=0)},Up=({root:t})=>{t.ref.blob&&(t.ref.blob.scaleX=2.5,t.ref.blob.scaleY=2.5,t.ref.blob.opacity=0)},Hp=({root:t,props:e,actions:n})=>{Vp({root:t,props:e,actions:n});const{blob:r}=t.ref;n.length===0&&r&&r.opacity===0&&(t.removeChildView(r),t.ref.blob=null)},Vp=he({DID_DRAG:Fp,DID_DROP:Up,DID_END_DRAG:Gp}),zp=ne({ignoreRect:!0,ignoreRectUpdate:!0,name:"drip",write:Hp}),Dl=(t,e)=>{try{const n=new DataTransfer;e.forEach(r=>{r instanceof File?n.items.add(r):n.items.add(new File([r],r.name,{type:r.type}))}),t.files=n.files}catch{return!1}return!0},Wp=({root:t})=>{t.ref.fields={};const e=document.createElement("legend");e.textContent="Files",t.element.appendChild(e)},yr=(t,e)=>t.ref.fields[e],Ui=t=>{t.query("GET_ACTIVE_ITEMS").forEach(e=>{t.ref.fields[e.id]&&t.element.appendChild(t.ref.fields[e.id])})},so=({root:t})=>Ui(t),jp=({root:t,action:e})=>{const i=!(t.query("GET_ITEM",e.id).origin===ie.LOCAL)&&t.query("SHOULD_UPDATE_FILE_INPUT"),s=je("input");s.type=i?"file":"hidden",s.name=t.query("GET_NAME"),t.ref.fields[e.id]=s,Ui(t)},qp=({root:t,action:e})=>{const n=yr(t,e.id);if(!n||(e.serverFileReference!==null&&(n.value=e.serverFileReference),!t.query("SHOULD_UPDATE_FILE_INPUT")))return;const r=t.query("GET_ITEM",e.id);Dl(n,[r.file])},$p=({root:t,action:e})=>{t.query("SHOULD_UPDATE_FILE_INPUT")&&setTimeout(()=>{const n=yr(t,e.id);n&&Dl(n,[e.file])},0)},Yp=({root:t})=>{t.element.disabled=t.query("GET_DISABLED")},Qp=({root:t,action:e})=>{const n=yr(t,e.id);n&&(n.parentNode&&n.parentNode.removeChild(n),delete t.ref.fields[e.id])},Zp=({root:t,action:e})=>{const n=yr(t,e.id);n&&(e.value===null?n.removeAttribute("value"):n.type!="file"&&(n.value=e.value),Ui(t))},Xp=he({DID_SET_DISABLED:Yp,DID_ADD_ITEM:jp,DID_LOAD_ITEM:qp,DID_REMOVE_ITEM:Qp,DID_DEFINE_VALUE:Zp,DID_PREPARE_OUTPUT:$p,DID_REORDER_ITEMS:so,DID_SORT_ITEMS:so}),Kp=ne({tag:"fieldset",name:"data",create:Wp,write:Xp,ignoreRect:!0}),Jp=t=>"getRootNode"in t?t.getRootNode():document,eg=["jpg","jpeg","png","gif","bmp","webp","svg","tiff"],tg=["css","csv","html","txt"],ng={zip:"zip|compressed",epub:"application/epub+zip"},wl=(t="")=>(t=t.toLowerCase(),eg.includes(t)?"image/"+(t==="jpg"?"jpeg":t==="svg"?"svg+xml":t):tg.includes(t)?"text/"+t:ng[t]||""),Hi=t=>new Promise((e,n)=>{const r=dg(t);if(r.length&&!rg(t))return e(r);ig(t).then(e)}),rg=t=>t.files?t.files.length>0:!1,ig=t=>new Promise((e,n)=>{const r=(t.items?Array.from(t.items):[]).filter(i=>sg(i)).map(i=>og(i));if(!r.length){e(t.files?Array.from(t.files):[]);return}Promise.all(r).then(i=>{const s=[];i.forEach(o=>{s.push.apply(s,o)}),e(s.filter(o=>o).map(o=>(o._relativePath||(o._relativePath=o.webkitRelativePath),o)))}).catch(console.error)}),sg=t=>{if(Cl(t)){const e=Vi(t);if(e)return e.isFile||e.isDirectory}return t.kind==="file"},og=t=>new Promise((e,n)=>{if(cg(t)){ag(Vi(t)).then(e).catch(n);return}e([t.getAsFile()])}),ag=t=>new Promise((e,n)=>{const r=[];let i=0,s=0;const o=()=>{s===0&&i===0&&e(r)},a=l=>{i++;const d=l.createReader(),c=()=>{d.readEntries(u=>{if(u.length===0){i--,o();return}u.forEach(p=>{p.isDirectory?a(p):(s++,p.file(f=>{const h=lg(f);p.fullPath&&(h._relativePath=p.fullPath),r.push(h),s--,o()}))}),c()},n)};c()};a(t)}),lg=t=>{if(t.type.length)return t;const e=t.lastModifiedDate,n=t.name,r=wl(Er(t.name));return r.length&&(t=t.slice(0,t.size,r),t.name=n,t.lastModifiedDate=e),t},cg=t=>Cl(t)&&(Vi(t)||{}).isDirectory,Cl=t=>"webkitGetAsEntry"in t,Vi=t=>t.webkitGetAsEntry(),dg=t=>{let e=[];try{if(e=fg(t),e.length)return e;e=ug(t)}catch{}return e},ug=t=>{let e=t.getData("url");return typeof e=="string"&&e.length?[e]:[]},fg=t=>{let e=t.getData("text/html");if(typeof e=="string"&&e.length){const n=e.match(/src\s*=\s*"(.+?)"/);if(n)return[n[1]]}return[]},$n=[],vt=t=>({pageLeft:t.pageX,pageTop:t.pageY,scopeLeft:t.offsetX||t.layerX,scopeTop:t.offsetY||t.layerY}),hg=(t,e,n)=>{const r=pg(e),i={element:t,filterElement:n,state:null,ondrop:()=>{},onenter:()=>{},ondrag:()=>{},onexit:()=>{},onload:()=>{},allowdrop:()=>{}};return i.destroy=r.addListener(i),i},pg=t=>{const e=$n.find(r=>r.element===t);if(e)return e;const n=gg(t);return $n.push(n),n},gg=t=>{const e=[],n={dragenter:Eg,dragover:yg,dragleave:_g,drop:vg},r={};K(n,(s,o)=>{r[s]=o(t,e),t.addEventListener(s,r[s],!1)});const i={element:t,addListener:s=>(e.push(s),()=>{e.splice(e.indexOf(s),1),e.length===0&&($n.splice($n.indexOf(i),1),K(n,o=>{t.removeEventListener(o,r[o],!1)}))})};return i},mg=(t,e)=>("elementFromPoint"in t||(t=document),t.elementFromPoint(e.x,e.y)),zi=(t,e)=>{const n=Jp(e),r=mg(n,{x:t.pageX-window.pageXOffset,y:t.pageY-window.pageYOffset});return r===e||e.contains(r)};let Ol=null;const bn=(t,e)=>{try{t.dropEffect=e}catch{}},Eg=(t,e)=>n=>{n.preventDefault(),Ol=n.target,e.forEach(r=>{const{element:i,onenter:s}=r;zi(n,i)&&(r.state="enter",s(vt(n)))})},yg=(t,e)=>n=>{n.preventDefault();const r=n.dataTransfer;Hi(r).then(i=>{let s=!1;e.some(o=>{const{filterElement:a,element:l,onenter:d,onexit:c,ondrag:u,allowdrop:p}=o;bn(r,"copy");const f=p(i);if(!f){bn(r,"none");return}if(zi(n,l)){if(s=!0,o.state===null){o.state="enter",d(vt(n));return}if(o.state="over",a&&!f){bn(r,"none");return}u(vt(n))}else a&&!s&&bn(r,"none"),o.state&&(o.state=null,c(vt(n)))})})},vg=(t,e)=>n=>{n.preventDefault();const r=n.dataTransfer;Hi(r).then(i=>{e.forEach(s=>{const{filterElement:o,element:a,ondrop:l,onexit:d,allowdrop:c}=s;if(s.state=null,!(o&&!zi(n,a))){if(!c(i))return d(vt(n));l(vt(n),i)}})})},_g=(t,e)=>n=>{Ol===n.target&&e.forEach(r=>{const{onexit:i}=r;r.state=null,i(vt(n))})},bg=(t,e,n)=>{t.classList.add("filepond--hopper");const{catchesDropsOnPage:r,requiresDropOnElement:i,filterItems:s=c=>c}=n,o=hg(t,r?document.documentElement:t,i);let a="",l="";o.allowdrop=c=>e(s(c)),o.ondrop=(c,u)=>{const p=s(u);if(!e(p)){d.ondragend(c);return}l="drag-drop",d.onload(p,c)},o.ondrag=c=>{d.ondrag(c)},o.onenter=c=>{l="drag-over",d.ondragstart(c)},o.onexit=c=>{l="drag-exit",d.ondragend(c)};const d={updateHopperState:()=>{a!==l&&(t.dataset.hopperState=l,a=l)},onload:()=>{},ondragstart:()=>{},ondrag:()=>{},ondragend:()=>{},destroy:()=>{o.destroy()}};return d};let ui=!1;const Nt=[],Ml=t=>{const e=document.activeElement;if(e&&(/textarea|input/i.test(e.nodeName)||e.getAttribute("contenteditable")==="true")){let r=!1,i=e;for(;i!==document.body;){if(i.classList.contains("filepond--root")){r=!0;break}i=i.parentNode}if(!r)return}Hi(t.clipboardData).then(r=>{r.length&&Nt.forEach(i=>i(r))})},Tg=t=>{Nt.includes(t)||(Nt.push(t),!ui&&(ui=!0,document.addEventListener("paste",Ml)))},Rg=t=>{Pi(Nt,Nt.indexOf(t)),Nt.length===0&&(document.removeEventListener("paste",Ml),ui=!1)},Ag=()=>{const t=n=>{e.onload(n)},e={destroy:()=>{Rg(t)},onload:()=>{}};return Tg(t),e},Ig=({root:t,props:e})=>{t.element.id=`filepond--assistant-${e.id}`,re(t.element,"role","alert"),re(t.element,"aria-live","polite"),re(t.element,"aria-relevant","additions")};let oo=null,ao=null;const Pr=[],vr=(t,e)=>{t.element.textContent=e},Sg=t=>{t.element.textContent=""},Nl=(t,e,n)=>{const r=t.query("GET_TOTAL_ITEMS");vr(t,`${n} ${e}, ${r} ${r===1?t.query("GET_LABEL_FILE_COUNT_SINGULAR"):t.query("GET_LABEL_FILE_COUNT_PLURAL")}`),clearTimeout(ao),ao=setTimeout(()=>{Sg(t)},1500)},xl=t=>t.element.parentNode.contains(document.activeElement),Dg=({root:t,action:e})=>{if(!xl(t))return;t.element.textContent="";const n=t.query("GET_ITEM",e.id);Pr.push(n.filename),clearTimeout(oo),oo=setTimeout(()=>{Nl(t,Pr.join(", "),t.query("GET_LABEL_FILE_ADDED")),Pr.length=0},750)},wg=({root:t,action:e})=>{if(!xl(t))return;const n=e.item;Nl(t,n.filename,t.query("GET_LABEL_FILE_REMOVED"))},Cg=({root:t,action:e})=>{const r=t.query("GET_ITEM",e.id).filename,i=t.query("GET_LABEL_FILE_PROCESSING_COMPLETE");vr(t,`${r} ${i}`)},lo=({root:t,action:e})=>{const r=t.query("GET_ITEM",e.id).filename,i=t.query("GET_LABEL_FILE_PROCESSING_ABORTED");vr(t,`${r} ${i}`)},Tn=({root:t,action:e})=>{const r=t.query("GET_ITEM",e.id).filename;vr(t,`${e.status.main} ${r} ${e.status.sub}`)},Og=ne({create:Ig,ignoreRect:!0,ignoreRectUpdate:!0,write:he({DID_LOAD_ITEM:Dg,DID_REMOVE_ITEM:wg,DID_COMPLETE_ITEM_PROCESSING:Cg,DID_ABORT_ITEM_PROCESSING:lo,DID_REVERT_ITEM_PROCESSING:lo,DID_THROW_ITEM_REMOVE_ERROR:Tn,DID_THROW_ITEM_LOAD_ERROR:Tn,DID_THROW_ITEM_INVALID:Tn,DID_THROW_ITEM_PROCESSING_ERROR:Tn}),tag:"span",name:"assistant"}),Pl=(t,e="-")=>t.replace(new RegExp(`${e}.`,"g"),n=>n.charAt(1).toUpperCase()),Ll=(t,e=16,n=!0)=>{let r=Date.now(),i=null;return(...s)=>{clearTimeout(i);const o=Date.now()-r,a=()=>{r=Date.now(),t(...s)};o<e?n||(i=setTimeout(a,e-o)):a()}},Mg=1e6,Yn=t=>t.preventDefault(),Ng=({root:t,props:e})=>{const n=t.query("GET_ID");n&&(t.element.id=n);const r=t.query("GET_CLASS_NAME");r&&r.split(" ").filter(l=>l.length).forEach(l=>{t.element.classList.add(l)}),t.ref.label=t.appendChildView(t.createChildView(Lp,{...e,translateY:null,caption:t.query("GET_LABEL_IDLE")})),t.ref.list=t.appendChildView(t.createChildView(Cp,{translateY:null})),t.ref.panel=t.appendChildView(t.createChildView(_l,{name:"panel-root"})),t.ref.assistant=t.appendChildView(t.createChildView(Og,{...e})),t.ref.data=t.appendChildView(t.createChildView(Kp,{...e})),t.ref.measure=je("div"),t.ref.measure.style.height="100%",t.element.appendChild(t.ref.measure),t.ref.bounds=null,t.query("GET_STYLES").filter(l=>!We(l.value)).map(({name:l,value:d})=>{t.element.dataset[l]=d}),t.ref.widthPrevious=null,t.ref.widthUpdated=Ll(()=>{t.ref.updateHistory=[],t.dispatch("DID_RESIZE_ROOT")},250),t.ref.previousAspectRatio=null,t.ref.updateHistory=[];const i=window.matchMedia("(pointer: fine) and (hover: hover)").matches,s="PointerEvent"in window;t.query("GET_ALLOW_REORDER")&&s&&!i&&(t.element.addEventListener("touchmove",Yn,{passive:!1}),t.element.addEventListener("gesturestart",Yn));const o=t.query("GET_CREDITS");if(o.length===2){const l=document.createElement("a");l.className="filepond--credits",l.href=o[0],l.tabIndex=-1,l.target="_blank",l.rel="noopener noreferrer nofollow",l.textContent=o[1],t.element.appendChild(l),t.ref.credits=l}},xg=({root:t,props:e,actions:n})=>{if(Fg({root:t,props:e,actions:n}),n.filter(S=>/^DID_SET_STYLE_/.test(S.type)).filter(S=>!We(S.data.value)).map(({type:S,data:M})=>{const I=Pl(S.substring(8).toLowerCase(),"_");t.element.dataset[I]=M.value,t.invalidateLayout()}),t.rect.element.hidden)return;t.rect.element.width!==t.ref.widthPrevious&&(t.ref.widthPrevious=t.rect.element.width,t.ref.widthUpdated());let r=t.ref.bounds;r||(r=t.ref.bounds=kg(t),t.element.removeChild(t.ref.measure),t.ref.measure=null);const{hopper:i,label:s,list:o,panel:a}=t.ref;i&&i.updateHopperState();const l=t.query("GET_PANEL_ASPECT_RATIO"),d=t.query("GET_ALLOW_MULTIPLE"),c=t.query("GET_TOTAL_ITEMS"),u=d?t.query("GET_MAX_FILES")||Mg:1,p=c===u,f=n.find(S=>S.type==="DID_ADD_ITEM");if(p&&f){const S=f.data.interactionMethod;s.opacity=0,d?s.translateY=-40:S===Ie.API?s.translateX=40:S===Ie.BROWSE?s.translateY=40:s.translateY=30}else p||(s.opacity=1,s.translateX=0,s.translateY=0);const h=Pg(t),g=Lg(t),m=s.rect.element.height,v=!d||p?0:m,y=p?o.rect.element.marginTop:0,_=c===0?0:o.rect.element.marginBottom,b=v+y+g.visual+_,A=v+y+g.bounds+_;if(o.translateY=Math.max(0,v-o.rect.element.marginTop)-h.top,l){const S=t.rect.element.width,M=S*l;l!==t.ref.previousAspectRatio&&(t.ref.previousAspectRatio=l,t.ref.updateHistory=[]);const I=t.ref.updateHistory;I.push(S);const N=2;if(I.length>N*2){const x=I.length,P=x-10;let $=0;for(let O=x;O>=P;O--)if(I[O]===I[O-2]&&$++,$>=N)return}a.scalable=!1,a.height=M;const G=M-v-(_-h.bottom)-(p?y:0);g.visual>G?o.overflow=G:o.overflow=null,t.height=M}else if(r.fixedHeight){a.scalable=!1;const S=r.fixedHeight-v-(_-h.bottom)-(p?y:0);g.visual>S?o.overflow=S:o.overflow=null}else if(r.cappedHeight){const S=b>=r.cappedHeight,M=Math.min(r.cappedHeight,b);a.scalable=!0,a.height=S?M:M-h.top-h.bottom;const I=M-v-(_-h.bottom)-(p?y:0);b>r.cappedHeight&&g.visual>I?o.overflow=I:o.overflow=null,t.height=Math.min(r.cappedHeight,A-h.top-h.bottom)}else{const S=c>0?h.top+h.bottom:0;a.scalable=!0,a.height=Math.max(m,b-S),t.height=Math.max(m,A-S)}t.ref.credits&&a.heightCurrent&&(t.ref.credits.style.transform=`translateY(${a.heightCurrent}px)`)},Pg=t=>{const e=t.ref.list.childViews[0].childViews[0];return e?{top:e.rect.element.marginTop,bottom:e.rect.element.marginBottom}:{top:0,bottom:0}},Lg=t=>{let e=0,n=0;const r=t.ref.list,i=r.childViews[0],s=i.childViews.filter(y=>y.rect.element.height),o=t.query("GET_ACTIVE_ITEMS").map(y=>s.find(_=>_.id===y.id)).filter(y=>y);if(o.length===0)return{visual:e,bounds:n};const a=i.rect.element.width,l=Gi(i,o,r.dragCoordinates),d=o[0].rect.element,c=d.marginTop+d.marginBottom,u=d.marginLeft+d.marginRight,p=d.width+u,f=d.height+c,h=typeof l<"u"&&l>=0?1:0,g=o.find(y=>y.markedForRemoval&&y.opacity<.45)?-1:0,m=o.length+h+g,v=Fi(a,p);return v===1?o.forEach(y=>{const _=y.rect.element.height+c;n+=_,e+=_*y.opacity}):(n=Math.ceil(m/v)*f,e=n),{visual:e,bounds:n}},kg=t=>{const e=t.ref.measureHeight||null;return{cappedHeight:parseInt(t.style.maxHeight,10)||null,fixedHeight:e===0?null:e}},Wi=(t,e)=>{const n=t.query("GET_ALLOW_REPLACE"),r=t.query("GET_ALLOW_MULTIPLE"),i=t.query("GET_TOTAL_ITEMS");let s=t.query("GET_MAX_FILES");const o=e.length;return!r&&o>1?(t.dispatch("DID_THROW_MAX_FILES",{source:e,error:J("warning",0,"Max files")}),!0):(s=r?s:1,!r&&n?!1:zt(s)&&i+o>s?(t.dispatch("DID_THROW_MAX_FILES",{source:e,error:J("warning",0,"Max files")}),!0):!1)},Bg=(t,e,n)=>{const r=t.childViews[0];return Gi(r,e,{left:n.scopeLeft-r.rect.element.left,top:n.scopeTop-(t.rect.outer.top+t.rect.element.marginTop+t.rect.element.scrollTop)})},co=t=>{const e=t.query("GET_ALLOW_DROP"),n=t.query("GET_DISABLED"),r=e&&!n;if(r&&!t.ref.hopper){const i=bg(t.element,s=>{const o=t.query("GET_BEFORE_DROP_FILE")||(()=>!0);return t.query("GET_DROP_VALIDATION")?s.every(l=>Rt("ALLOW_HOPPER_ITEM",l,{query:t.query}).every(d=>d===!0)&&o(l)):!0},{filterItems:s=>{const o=t.query("GET_IGNORED_FILES");return s.filter(a=>yt(a)?!o.includes(a.name.toLowerCase()):!0)},catchesDropsOnPage:t.query("GET_DROP_ON_PAGE"),requiresDropOnElement:t.query("GET_DROP_ON_ELEMENT")});i.onload=(s,o)=>{const l=t.ref.list.childViews[0].childViews.filter(c=>c.rect.element.height),d=t.query("GET_ACTIVE_ITEMS").map(c=>l.find(u=>u.id===c.id)).filter(c=>c);we("ADD_ITEMS",s,{dispatch:t.dispatch}).then(c=>{if(Wi(t,c))return!1;t.dispatch("ADD_ITEMS",{items:c,index:Bg(t.ref.list,d,o),interactionMethod:Ie.DROP})}),t.dispatch("DID_DROP",{position:o}),t.dispatch("DID_END_DRAG",{position:o})},i.ondragstart=s=>{t.dispatch("DID_START_DRAG",{position:s})},i.ondrag=Ll(s=>{t.dispatch("DID_DRAG",{position:s})}),i.ondragend=s=>{t.dispatch("DID_END_DRAG",{position:s})},t.ref.hopper=i,t.ref.drip=t.appendChildView(t.createChildView(zp))}else!r&&t.ref.hopper&&(t.ref.hopper.destroy(),t.ref.hopper=null,t.removeChildView(t.ref.drip))},uo=(t,e)=>{const n=t.query("GET_ALLOW_BROWSE"),r=t.query("GET_DISABLED"),i=n&&!r;i&&!t.ref.browser?t.ref.browser=t.appendChildView(t.createChildView(xp,{...e,onload:s=>{we("ADD_ITEMS",s,{dispatch:t.dispatch}).then(o=>{if(Wi(t,o))return!1;t.dispatch("ADD_ITEMS",{items:o,index:-1,interactionMethod:Ie.BROWSE})})}}),0):!i&&t.ref.browser&&(t.removeChildView(t.ref.browser),t.ref.browser=null)},fo=t=>{const e=t.query("GET_ALLOW_PASTE"),n=t.query("GET_DISABLED"),r=e&&!n;r&&!t.ref.paster?(t.ref.paster=Ag(),t.ref.paster.onload=i=>{we("ADD_ITEMS",i,{dispatch:t.dispatch}).then(s=>{if(Wi(t,s))return!1;t.dispatch("ADD_ITEMS",{items:s,index:-1,interactionMethod:Ie.PASTE})})}):!r&&t.ref.paster&&(t.ref.paster.destroy(),t.ref.paster=null)},Fg=he({DID_SET_ALLOW_BROWSE:({root:t,props:e})=>{uo(t,e)},DID_SET_ALLOW_DROP:({root:t})=>{co(t)},DID_SET_ALLOW_PASTE:({root:t})=>{fo(t)},DID_SET_DISABLED:({root:t,props:e})=>{co(t),fo(t),uo(t,e),t.query("GET_DISABLED")?t.element.dataset.disabled="disabled":t.element.removeAttribute("data-disabled")}}),Gg=ne({name:"root",read:({root:t})=>{t.ref.measure&&(t.ref.measureHeight=t.ref.measure.offsetHeight)},create:Ng,write:xg,destroy:({root:t})=>{t.ref.paster&&t.ref.paster.destroy(),t.ref.hopper&&t.ref.hopper.destroy(),t.element.removeEventListener("touchmove",Yn),t.element.removeEventListener("gesturestart",Yn)},mixins:{styles:["height"]}}),Ug=(t={})=>{let e=null;const n=qn(),r=tf(Hf(n),[oh,Wf(n)],[Mh,zf(n)]);r.dispatch("SET_OPTIONS",{options:t});const i=()=>{document.hidden||r.dispatch("KICK")};document.addEventListener("visibilitychange",i);let s=null,o=!1,a=!1,l=null,d=null;const c=()=>{o||(o=!0),clearTimeout(s),s=setTimeout(()=>{o=!1,l=null,d=null,a&&(a=!1,r.dispatch("DID_STOP_RESIZE"))},500)};window.addEventListener("resize",c);const u=Gg(r,{id:xi()});let p=!1,f=!1;const h={_read:()=>{o&&(d=window.innerWidth,l||(l=d),!a&&d!==l&&(r.dispatch("DID_START_RESIZE"),a=!0)),f&&p&&(p=u.element.offsetParent===null),!p&&(u._read(),f=u.rect.element.hidden)},_write:w=>{const C=r.processActionQueue().filter(L=>!/^SET_/.test(L.type));p&&!C.length||(y(C),p=u._write(w,C,a),$f(r.query("GET_ITEMS")),p&&r.processDispatchQueue())}},g=w=>C=>{const L={type:w};if(!C)return L;if(C.hasOwnProperty("error")&&(L.error=C.error?{...C.error}:null),C.status&&(L.status={...C.status}),C.file&&(L.output=C.file),C.source)L.file=C.source;else if(C.item||C.id){const k=C.item?C.item:r.query("GET_ITEM",C.id);L.file=k?ge(k):null}return C.items&&(L.items=C.items.map(ge)),/progress/.test(w)&&(L.progress=C.progress),C.hasOwnProperty("origin")&&C.hasOwnProperty("target")&&(L.origin=C.origin,L.target=C.target),L},m={DID_DESTROY:g("destroy"),DID_INIT:g("init"),DID_THROW_MAX_FILES:g("warning"),DID_INIT_ITEM:g("initfile"),DID_START_ITEM_LOAD:g("addfilestart"),DID_UPDATE_ITEM_LOAD_PROGRESS:g("addfileprogress"),DID_LOAD_ITEM:g("addfile"),DID_THROW_ITEM_INVALID:[g("error"),g("addfile")],DID_THROW_ITEM_LOAD_ERROR:[g("error"),g("addfile")],DID_THROW_ITEM_REMOVE_ERROR:[g("error"),g("removefile")],DID_PREPARE_OUTPUT:g("preparefile"),DID_START_ITEM_PROCESSING:g("processfilestart"),DID_UPDATE_ITEM_PROCESS_PROGRESS:g("processfileprogress"),DID_ABORT_ITEM_PROCESSING:g("processfileabort"),DID_COMPLETE_ITEM_PROCESSING:g("processfile"),DID_COMPLETE_ITEM_PROCESSING_ALL:g("processfiles"),DID_REVERT_ITEM_PROCESSING:g("processfilerevert"),DID_THROW_ITEM_PROCESSING_ERROR:[g("error"),g("processfile")],DID_REMOVE_ITEM:g("removefile"),DID_UPDATE_ITEMS:g("updatefiles"),DID_ACTIVATE_ITEM:g("activatefile"),DID_REORDER_ITEMS:g("reorderfiles")},v=w=>{const C={pond:z,...w};delete C.type,u.element.dispatchEvent(new CustomEvent(`FilePond:${w.type}`,{detail:C,bubbles:!0,cancelable:!0,composed:!0}));const L=[];w.hasOwnProperty("error")&&L.push(w.error),w.hasOwnProperty("file")&&L.push(w.file);const k=["type","error","file"];Object.keys(w).filter(U=>!k.includes(U)).forEach(U=>L.push(w[U])),z.fire(w.type,...L);const Z=r.query(`GET_ON${w.type.toUpperCase()}`);Z&&Z(...L)},y=w=>{w.length&&w.filter(C=>m[C.type]).forEach(C=>{const L=m[C.type];(Array.isArray(L)?L:[L]).forEach(k=>{C.type==="DID_INIT_ITEM"?v(k(C.data)):setTimeout(()=>{v(k(C.data))},0)})})},_=w=>r.dispatch("SET_OPTIONS",{options:w}),b=w=>r.query("GET_ACTIVE_ITEM",w),A=w=>new Promise((C,L)=>{r.dispatch("REQUEST_ITEM_PREPARE",{query:w,success:k=>{C(k)},failure:k=>{L(k)}})}),S=(w,C={})=>new Promise((L,k)=>{N([{source:w,options:C}],{index:C.index}).then(Z=>L(Z&&Z[0])).catch(k)}),M=w=>w.file&&w.id,I=(w,C)=>(typeof w=="object"&&!M(w)&&!C&&(C=w,w=void 0),r.dispatch("REMOVE_ITEM",{...C,query:w}),r.query("GET_ACTIVE_ITEM",w)===null),N=(...w)=>new Promise((C,L)=>{const k=[],Z={};if(hr(w[0]))k.push.apply(k,w[0]),Object.assign(Z,w[1]||{});else{const U=w[w.length-1];typeof U=="object"&&!(U instanceof Blob)&&Object.assign(Z,w.pop()),k.push(...w)}r.dispatch("ADD_ITEMS",{items:k,index:Z.index,interactionMethod:Ie.API,success:C,failure:L})}),G=()=>r.query("GET_ACTIVE_ITEMS"),x=w=>new Promise((C,L)=>{r.dispatch("REQUEST_ITEM_PROCESSING",{query:w,success:k=>{C(k)},failure:k=>{L(k)}})}),P=(...w)=>{const C=Array.isArray(w[0])?w[0]:w,L=C.length?C:G();return Promise.all(L.map(A))},$=(...w)=>{const C=Array.isArray(w[0])?w[0]:w;if(!C.length){const L=G().filter(k=>!(k.status===H.IDLE&&k.origin===ie.LOCAL)&&k.status!==H.PROCESSING&&k.status!==H.PROCESSING_COMPLETE&&k.status!==H.PROCESSING_REVERT_ERROR);return Promise.all(L.map(x))}return Promise.all(C.map(x))},O=(...w)=>{const C=Array.isArray(w[0])?w[0]:w;let L;typeof C[C.length-1]=="object"?L=C.pop():Array.isArray(w[0])&&(L=w[1]);const k=G();return C.length?C.map(U=>ft(U)?k[U]?k[U].id:null:U).filter(U=>U).map(U=>I(U,L)):Promise.all(k.map(U=>I(U,L)))},z={...mr(),...h,...Vf(r,n),setOptions:_,addFile:S,addFiles:N,getFile:b,processFile:x,prepareFile:A,removeFile:I,moveFile:(w,C)=>r.dispatch("MOVE_ITEM",{query:w,index:C}),getFiles:G,processFiles:$,removeFiles:O,prepareFiles:P,sort:w=>r.dispatch("SORT",{compare:w}),browse:()=>{var w=u.element.querySelector("input[type=file]");w&&w.click()},destroy:()=>{z.fire("destroy",u.element),r.dispatch("ABORT_ALL"),u._destroy(),window.removeEventListener("resize",c),document.removeEventListener("visibilitychange",i),r.dispatch("DID_DESTROY")},insertBefore:w=>Ps(u.element,w),insertAfter:w=>Ls(u.element,w),appendTo:w=>w.appendChild(u.element),replaceElement:w=>{Ps(u.element,w),w.parentNode.removeChild(w),e=w},restoreElement:()=>{e&&(Ls(e,u.element),u.element.parentNode.removeChild(u.element),e=null)},isAttachedTo:w=>u.element===w||e===w,element:{get:()=>u.element},status:{get:()=>r.query("GET_STATUS")}};return r.dispatch("DID_INIT"),et(z)},kl=(t={})=>{const e={};return K(qn(),(r,i)=>{e[r]=i[0]}),Ug({...e,...t})},Hg=t=>t.charAt(0).toLowerCase()+t.slice(1),Vg=t=>Pl(t.replace(/^data-/,"")),Bl=(t,e)=>{K(e,(n,r)=>{K(t,(i,s)=>{const o=new RegExp(n);if(!o.test(i)||(delete t[i],r===!1))return;if(fe(r)){t[r]=s;return}const l=r.group;se(r)&&!t[l]&&(t[l]={}),t[l][Hg(i.replace(o,""))]=s}),r.mapping&&Bl(t[r.group],r.mapping)})},zg=(t,e={})=>{const n=[];K(t.attributes,i=>{n.push(t.attributes[i])});const r=n.filter(i=>i.name).reduce((i,s)=>{const o=re(t,s.name);return i[Vg(s.name)]=o===s.name?!0:o,i},{});return Bl(r,e),r},Wg=(t,e={})=>{const n={"^class$":"className","^multiple$":"allowMultiple","^capture$":"captureMethod","^webkitdirectory$":"allowDirectoriesOnly","^server":{group:"server",mapping:{"^process":{group:"process"},"^revert":{group:"revert"},"^fetch":{group:"fetch"},"^restore":{group:"restore"},"^load":{group:"load"}}},"^type$":!1,"^files$":!1};Rt("SET_ATTRIBUTE_TO_OPTION_MAP",n);const r={...e},i=zg(t.nodeName==="FIELDSET"?t.querySelector("input[type=file]"):t,n);Object.keys(i).forEach(o=>{se(i[o])?(se(r[o])||(r[o]={}),Object.assign(r[o],i[o])):r[o]=i[o]}),r.files=(e.files||[]).concat(Array.from(t.querySelectorAll("input:not([type=file])")).map(o=>({source:o.value,options:{type:o.dataset.type}})));const s=kl(r);return t.files&&Array.from(t.files).forEach(o=>{s.addFile(o)}),s.replaceElement(t),s},jg=(...t)=>ef(t[0])?Wg(...t):kl(...t),qg=["fire","_read","_write"],ho=t=>{const e={};return sl(t,e,qg),e},$g=(t,e)=>t.replace(/(?:{([a-zA-Z]+)})/g,(n,r)=>e[r]),Yg=t=>{const e=new Blob(["(",t.toString(),")()"],{type:"application/javascript"}),n=URL.createObjectURL(e),r=new Worker(n);return{transfer:(i,s)=>{},post:(i,s,o)=>{const a=xi();r.onmessage=l=>{l.data.id===a&&s(l.data.message)},r.postMessage({id:a,message:i},o)},terminate:()=>{r.terminate(),URL.revokeObjectURL(n)}}},Qg=t=>new Promise((e,n)=>{const r=new Image;r.onload=()=>{e(r)},r.onerror=i=>{n(i)},r.src=t}),Fl=(t,e)=>{const n=t.slice(0,t.size,t.type);return n.lastModifiedDate=t.lastModifiedDate,n.name=e,n},Zg=t=>Fl(t,t.name),po=[],Xg=t=>{if(po.includes(t))return;po.push(t);const e=t({addFilter:Qf,utils:{Type:D,forin:K,isString:fe,isFile:yt,toNaturalFileSize:El,replaceInString:$g,getExtensionFromFilename:Er,getFilenameWithoutExtension:pl,guesstimateMimeType:wl,getFileFromBlob:kt,getFilenameFromURL:un,createRoute:he,createWorker:Yg,createView:ne,createItemAPI:ge,loadImage:Qg,copyFile:Zg,renameFile:Fl,createBlob:ul,applyFilterChain:we,text:te,getNumericAspectRatioFromString:ll},views:{fileActionButton:ml}});Zf(e.options)},Kg=()=>Object.prototype.toString.call(window.operamini)==="[object OperaMini]",Jg=()=>"Promise"in window,em=()=>"slice"in Blob.prototype,tm=()=>"URL"in window&&"createObjectURL"in window.URL,nm=()=>"visibilityState"in document,rm=()=>"performance"in window,im=()=>"supports"in(window.CSS||{}),sm=()=>/MSIE|Trident/.test(window.navigator.userAgent),go=(()=>{const t=Ja()&&!Kg()&&nm()&&Jg()&&em()&&tm()&&rm()&&(im()||sm());return()=>t})(),Ze={apps:[]},om="filepond",At=()=>{};let mo={},Lr=At,kr=At,Eo=At,yo=At,fi=At,vo=At,hi=At;if(go()){Df(()=>{Ze.apps.forEach(n=>n._read())},n=>{Ze.apps.forEach(r=>r._write(n))});const t=()=>{document.dispatchEvent(new CustomEvent("FilePond:loaded",{detail:{supported:go,create:Lr,destroy:kr,parse:Eo,find:yo,registerPlugin:fi,setOptions:hi}})),document.removeEventListener("DOMContentLoaded",t)};document.readyState!=="loading"?setTimeout(()=>t(),0):document.addEventListener("DOMContentLoaded",t);const e=()=>K(qn(),(n,r)=>{mo[n]=r[1]});mo={},e(),Lr=(...n)=>{const r=jg(...n);return r.on("destroy",kr),Ze.apps.push(r),ho(r)},kr=n=>{const r=Ze.apps.findIndex(i=>i.isAttachedTo(n));return r>=0?(Ze.apps.splice(r,1)[0].restoreElement(),!0):!1},Eo=n=>Array.from(n.querySelectorAll(`.${om}`)).filter(s=>!Ze.apps.find(o=>o.isAttachedTo(s))).map(s=>Lr(s)),yo=n=>{const r=Ze.apps.find(i=>i.isAttachedTo(n));return r?ho(r):null},fi=(...n)=>{n.forEach(Xg),e()},vo=()=>{const n={};return K(qn(),(r,i)=>{n[r]=i[0]}),n},hi=n=>(se(n)&&(Ze.apps.forEach(r=>{r.setOptions(n)}),Xf(n)),vo())}/*!
 * FilePondPluginFileValidateSize 2.2.8
 * Licensed under MIT, https://opensource.org/licenses/MIT/
 * Please visit https://pqina.nl/filepond/ for details.
 */const Gl=({addFilter:t,utils:e})=>{const{Type:n,replaceInString:r,toNaturalFileSize:i}=e;return t("ALLOW_HOPPER_ITEM",(s,{query:o})=>{if(!o("GET_ALLOW_FILE_SIZE_VALIDATION"))return!0;const a=o("GET_MAX_FILE_SIZE");if(a!==null&&s.size>a)return!1;const l=o("GET_MIN_FILE_SIZE");return!(l!==null&&s.size<l)}),t("LOAD_FILE",(s,{query:o})=>new Promise((a,l)=>{if(!o("GET_ALLOW_FILE_SIZE_VALIDATION"))return a(s);const d=o("GET_FILE_VALIDATE_SIZE_FILTER");if(d&&!d(s))return a(s);const c=o("GET_MAX_FILE_SIZE");if(c!==null&&s.size>c){l({status:{main:o("GET_LABEL_MAX_FILE_SIZE_EXCEEDED"),sub:r(o("GET_LABEL_MAX_FILE_SIZE"),{filesize:i(c,".",o("GET_FILE_SIZE_BASE"),o("GET_FILE_SIZE_LABELS",o))})}});return}const u=o("GET_MIN_FILE_SIZE");if(u!==null&&s.size<u){l({status:{main:o("GET_LABEL_MIN_FILE_SIZE_EXCEEDED"),sub:r(o("GET_LABEL_MIN_FILE_SIZE"),{filesize:i(u,".",o("GET_FILE_SIZE_BASE"),o("GET_FILE_SIZE_LABELS",o))})}});return}const p=o("GET_MAX_TOTAL_FILE_SIZE");if(p!==null&&o("GET_ACTIVE_ITEMS").reduce((h,g)=>h+g.fileSize,0)>p){l({status:{main:o("GET_LABEL_MAX_TOTAL_FILE_SIZE_EXCEEDED"),sub:r(o("GET_LABEL_MAX_TOTAL_FILE_SIZE"),{filesize:i(p,".",o("GET_FILE_SIZE_BASE"),o("GET_FILE_SIZE_LABELS",o))})}});return}a(s)})),{options:{allowFileSizeValidation:[!0,n.BOOLEAN],maxFileSize:[null,n.INT],minFileSize:[null,n.INT],maxTotalFileSize:[null,n.INT],fileValidateSizeFilter:[null,n.FUNCTION],labelMinFileSizeExceeded:["File is too small",n.STRING],labelMinFileSize:["Minimum file size is {filesize}",n.STRING],labelMaxFileSizeExceeded:["File is too large",n.STRING],labelMaxFileSize:["Maximum file size is {filesize}",n.STRING],labelMaxTotalFileSizeExceeded:["Maximum total size exceeded",n.STRING],labelMaxTotalFileSize:["Maximum total file size is {filesize}",n.STRING]}}},am=typeof window<"u"&&typeof window.document<"u";am&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:Gl}));/*!
 * FilePondPluginFileValidateType 1.2.9
 * Licensed under MIT, https://opensource.org/licenses/MIT/
 * Please visit https://pqina.nl/filepond/ for details.
 */const Ul=({addFilter:t,utils:e})=>{const{Type:n,isString:r,replaceInString:i,guesstimateMimeType:s,getExtensionFromFilename:o,getFilenameFromURL:a}=e,l=(f,h)=>{const g=(/^[^/]+/.exec(f)||[]).pop(),m=h.slice(0,-2);return g===m},d=(f,h)=>f.some(g=>/\*$/.test(g)?l(h,g):g===h),c=f=>{let h="";if(r(f)){const g=a(f),m=o(g);m&&(h=s(m))}else h=f.type;return h},u=(f,h,g)=>{if(h.length===0)return!0;const m=c(f);return g?new Promise((v,y)=>{g(f,m).then(_=>{d(h,_)?v():y()}).catch(y)}):d(h,m)},p=f=>h=>f[h]===null?!1:f[h]||h;return t("SET_ATTRIBUTE_TO_OPTION_MAP",f=>Object.assign(f,{accept:"acceptedFileTypes"})),t("ALLOW_HOPPER_ITEM",(f,{query:h})=>h("GET_ALLOW_FILE_TYPE_VALIDATION")?u(f,h("GET_ACCEPTED_FILE_TYPES")):!0),t("LOAD_FILE",(f,{query:h})=>new Promise((g,m)=>{if(!h("GET_ALLOW_FILE_TYPE_VALIDATION")){g(f);return}const v=h("GET_ACCEPTED_FILE_TYPES"),y=h("GET_FILE_VALIDATE_TYPE_DETECT_TYPE"),_=u(f,v,y),b=()=>{const A=v.map(p(h("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES_MAP"))).filter(M=>M!==!1),S=A.filter((M,I)=>A.indexOf(M)===I);m({status:{main:h("GET_LABEL_FILE_TYPE_NOT_ALLOWED"),sub:i(h("GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES"),{allTypes:S.join(", "),allButLastType:S.slice(0,-1).join(", "),lastType:S[S.length-1]})}})};if(typeof _=="boolean")return _?g(f):b();_.then(()=>{g(f)}).catch(b)})),{options:{allowFileTypeValidation:[!0,n.BOOLEAN],acceptedFileTypes:[[],n.ARRAY],labelFileTypeNotAllowed:["File is of invalid type",n.STRING],fileValidateTypeLabelExpectedTypes:["Expects {allButLastType} or {lastType}",n.STRING],fileValidateTypeLabelExpectedTypesMap:[{},n.OBJECT],fileValidateTypeDetectType:[null,n.FUNCTION]}}},lm=typeof window<"u"&&typeof window.document<"u";lm&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:Ul}));/*!
 * FilePondPluginImagePreview 4.6.12
 * Licensed under MIT, https://opensource.org/licenses/MIT/
 * Please visit https://pqina.nl/filepond/ for details.
 */const cm=t=>/^image/.test(t.type),_o=(t,e)=>rn(t.x*e,t.y*e),bo=(t,e)=>rn(t.x+e.x,t.y+e.y),dm=t=>{const e=Math.sqrt(t.x*t.x+t.y*t.y);return e===0?{x:0,y:0}:rn(t.x/e,t.y/e)},Rn=(t,e,n)=>{const r=Math.cos(e),i=Math.sin(e),s=rn(t.x-n.x,t.y-n.y);return rn(n.x+r*s.x-i*s.y,n.y+i*s.x+r*s.y)},rn=(t=0,e=0)=>({x:t,y:e}),me=(t,e,n=1,r)=>{if(typeof t=="string")return parseFloat(t)*n;if(typeof t=="number")return t*(r?e[r]:Math.min(e.width,e.height))},um=(t,e,n)=>{const r=t.borderStyle||t.lineStyle||"solid",i=t.backgroundColor||t.fontColor||"transparent",s=t.borderColor||t.lineColor||"transparent",o=me(t.borderWidth||t.lineWidth,e,n),a=t.lineCap||"round",l=t.lineJoin||"round",d=typeof r=="string"?"":r.map(u=>me(u,e,n)).join(","),c=t.opacity||1;return{"stroke-linecap":a,"stroke-linejoin":l,"stroke-width":o||0,"stroke-dasharray":d,stroke:s,fill:i,opacity:c}},Ae=t=>t!=null,fm=(t,e,n=1)=>{let r=me(t.x,e,n,"width")||me(t.left,e,n,"width"),i=me(t.y,e,n,"height")||me(t.top,e,n,"height"),s=me(t.width,e,n,"width"),o=me(t.height,e,n,"height"),a=me(t.right,e,n,"width"),l=me(t.bottom,e,n,"height");return Ae(i)||(Ae(o)&&Ae(l)?i=e.height-o-l:i=l),Ae(r)||(Ae(s)&&Ae(a)?r=e.width-s-a:r=a),Ae(s)||(Ae(r)&&Ae(a)?s=e.width-r-a:s=0),Ae(o)||(Ae(i)&&Ae(l)?o=e.height-i-l:o=0),{x:r||0,y:i||0,width:s||0,height:o||0}},hm=t=>t.map((e,n)=>`${n===0?"M":"L"} ${e.x} ${e.y}`).join(" "),Be=(t,e)=>Object.keys(e).forEach(n=>t.setAttribute(n,e[n])),pm="http://www.w3.org/2000/svg",Mt=(t,e)=>{const n=document.createElementNS(pm,t);return e&&Be(n,e),n},gm=t=>Be(t,{...t.rect,...t.styles}),mm=t=>{const e=t.rect.x+t.rect.width*.5,n=t.rect.y+t.rect.height*.5,r=t.rect.width*.5,i=t.rect.height*.5;return Be(t,{cx:e,cy:n,rx:r,ry:i,...t.styles})},Em={contain:"xMidYMid meet",cover:"xMidYMid slice"},ym=(t,e)=>{Be(t,{...t.rect,...t.styles,preserveAspectRatio:Em[e.fit]||"none"})},vm={left:"start",center:"middle",right:"end"},_m=(t,e,n,r)=>{const i=me(e.fontSize,n,r),s=e.fontFamily||"sans-serif",o=e.fontWeight||"normal",a=vm[e.textAlign]||"start";Be(t,{...t.rect,...t.styles,"stroke-width":0,"font-weight":o,"font-size":i,"font-family":s,"text-anchor":a}),t.text!==e.text&&(t.text=e.text,t.textContent=e.text.length?e.text:" ")},bm=(t,e,n,r)=>{Be(t,{...t.rect,...t.styles,fill:"none"});const i=t.childNodes[0],s=t.childNodes[1],o=t.childNodes[2],a=t.rect,l={x:t.rect.x+t.rect.width,y:t.rect.y+t.rect.height};if(Be(i,{x1:a.x,y1:a.y,x2:l.x,y2:l.y}),!e.lineDecoration)return;s.style.display="none",o.style.display="none";const d=dm({x:l.x-a.x,y:l.y-a.y}),c=me(.05,n,r);if(e.lineDecoration.indexOf("arrow-begin")!==-1){const u=_o(d,c),p=bo(a,u),f=Rn(a,2,p),h=Rn(a,-2,p);Be(s,{style:"display:block;",d:`M${f.x},${f.y} L${a.x},${a.y} L${h.x},${h.y}`})}if(e.lineDecoration.indexOf("arrow-end")!==-1){const u=_o(d,-c),p=bo(l,u),f=Rn(l,2,p),h=Rn(l,-2,p);Be(o,{style:"display:block;",d:`M${f.x},${f.y} L${l.x},${l.y} L${h.x},${h.y}`})}},Tm=(t,e,n,r)=>{Be(t,{...t.styles,fill:"none",d:hm(e.points.map(i=>({x:me(i.x,n,r,"width"),y:me(i.y,n,r,"height")})))})},An=t=>e=>Mt(t,{id:e.id}),Rm=t=>{const e=Mt("image",{id:t.id,"stroke-linecap":"round","stroke-linejoin":"round",opacity:"0"});return e.onload=()=>{e.setAttribute("opacity",t.opacity||1)},e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",t.src),e},Am=t=>{const e=Mt("g",{id:t.id,"stroke-linecap":"round","stroke-linejoin":"round"}),n=Mt("line");e.appendChild(n);const r=Mt("path");e.appendChild(r);const i=Mt("path");return e.appendChild(i),e},Im={image:Rm,rect:An("rect"),ellipse:An("ellipse"),text:An("text"),path:An("path"),line:Am},Sm={rect:gm,ellipse:mm,image:ym,text:_m,path:Tm,line:bm},Dm=(t,e)=>Im[t](e),wm=(t,e,n,r,i)=>{e!=="path"&&(t.rect=fm(n,r,i)),t.styles=um(n,r,i),Sm[e](t,n,r,i)},Cm=["x","y","left","top","right","bottom","width","height"],Om=t=>typeof t=="string"&&/%/.test(t)?parseFloat(t)/100:t,Mm=t=>{const[e,n]=t,r=n.points?{}:Cm.reduce((i,s)=>(i[s]=Om(n[s]),i),{});return[e,{zIndex:0,...n,...r}]},Nm=(t,e)=>t[1].zIndex>e[1].zIndex?1:t[1].zIndex<e[1].zIndex?-1:0,xm=t=>t.utils.createView({name:"image-preview-markup",tag:"svg",ignoreRect:!0,mixins:{apis:["width","height","crop","markup","resize","dirty"]},write:({root:e,props:n})=>{if(!n.dirty)return;const{crop:r,resize:i,markup:s}=n,o=n.width,a=n.height;let l=r.width,d=r.height;if(i){const{size:f}=i;let h=f&&f.width,g=f&&f.height;const m=i.mode,v=i.upscale;h&&!g&&(g=h),g&&!h&&(h=g);const y=l<h&&d<g;if(!y||y&&v){let _=h/l,b=g/d;if(m==="force")l=h,d=g;else{let A;m==="cover"?A=Math.max(_,b):m==="contain"&&(A=Math.min(_,b)),l=l*A,d=d*A}}}const c={width:o,height:a};e.element.setAttribute("width",c.width),e.element.setAttribute("height",c.height);const u=Math.min(o/l,a/d);e.element.innerHTML="";const p=e.query("GET_IMAGE_PREVIEW_MARKUP_FILTER");s.filter(p).map(Mm).sort(Nm).forEach(f=>{const[h,g]=f,m=Dm(h,g);wm(m,h,g,c,u),e.element.appendChild(m)})}}),Kt=(t,e)=>({x:t,y:e}),Pm=(t,e)=>t.x*e.x+t.y*e.y,To=(t,e)=>Kt(t.x-e.x,t.y-e.y),Lm=(t,e)=>Pm(To(t,e),To(t,e)),Ro=(t,e)=>Math.sqrt(Lm(t,e)),Ao=(t,e)=>{const n=t,r=1.5707963267948966,i=e,s=1.5707963267948966-e,o=Math.sin(r),a=Math.sin(i),l=Math.sin(s),d=Math.cos(s),c=n/o,u=c*a,p=c*l;return Kt(d*u,d*p)},km=(t,e)=>{const n=t.width,r=t.height,i=Ao(n,e),s=Ao(r,e),o=Kt(t.x+Math.abs(i.x),t.y-Math.abs(i.y)),a=Kt(t.x+t.width+Math.abs(s.y),t.y+Math.abs(s.x)),l=Kt(t.x-Math.abs(s.y),t.y+t.height-Math.abs(s.x));return{width:Ro(o,a),height:Ro(o,l)}},Bm=(t,e,n=1)=>{const r=t.height/t.width;let i=1,s=e,o=1,a=r;a>s&&(a=s,o=a/r);const l=Math.max(i/o,s/a),d=t.width/(n*l*o),c=d*e;return{width:d,height:c}},Hl=(t,e,n,r)=>{const i=r.x>.5?1-r.x:r.x,s=r.y>.5?1-r.y:r.y,o=i*2*t.width,a=s*2*t.height,l=km(e,n);return Math.max(l.width/o,l.height/a)},Vl=(t,e)=>{let n=t.width,r=n*e;r>t.height&&(r=t.height,n=r/e);const i=(t.width-n)*.5,s=(t.height-r)*.5;return{x:i,y:s,width:n,height:r}},Fm=(t,e={})=>{let{zoom:n,rotation:r,center:i,aspectRatio:s}=e;s||(s=t.height/t.width);const o=Bm(t,s,n),a={width:o.width,height:o.height},l=typeof e.scaleToFit>"u"||e.scaleToFit,d=Hl(t,Vl(a,s),r,l?i:{x:.5,y:.5}),c=n*d;return{widthFloat:o.width/c,heightFloat:o.height/c,width:Math.round(o.width/c),height:Math.round(o.height/c)}},Le={type:"spring",stiffness:.5,damping:.45,mass:10},Gm=t=>t.utils.createView({name:"image-bitmap",ignoreRect:!0,mixins:{styles:["scaleX","scaleY"]},create:({root:e,props:n})=>{e.appendChild(n.image)}}),Um=t=>t.utils.createView({name:"image-canvas-wrapper",tag:"div",ignoreRect:!0,mixins:{apis:["crop","width","height"],styles:["originX","originY","translateX","translateY","scaleX","scaleY","rotateZ"],animations:{originX:Le,originY:Le,scaleX:Le,scaleY:Le,translateX:Le,translateY:Le,rotateZ:Le}},create:({root:e,props:n})=>{n.width=n.image.width,n.height=n.image.height,e.ref.bitmap=e.appendChildView(e.createChildView(Gm(t),{image:n.image}))},write:({root:e,props:n})=>{const{flip:r}=n.crop,{bitmap:i}=e.ref;i.scaleX=r.horizontal?-1:1,i.scaleY=r.vertical?-1:1}}),Hm=t=>t.utils.createView({name:"image-clip",tag:"div",ignoreRect:!0,mixins:{apis:["crop","markup","resize","width","height","dirty","background"],styles:["width","height","opacity"],animations:{opacity:{type:"tween",duration:250}}},didWriteView:function({root:e,props:n}){n.background&&(e.element.style.backgroundColor=n.background)},create:({root:e,props:n})=>{e.ref.image=e.appendChildView(e.createChildView(Um(t),Object.assign({},n))),e.ref.createMarkup=()=>{e.ref.markup||(e.ref.markup=e.appendChildView(e.createChildView(xm(t),Object.assign({},n))))},e.ref.destroyMarkup=()=>{e.ref.markup&&(e.removeChildView(e.ref.markup),e.ref.markup=null)};const r=e.query("GET_IMAGE_PREVIEW_TRANSPARENCY_INDICATOR");r!==null&&(r==="grid"?e.element.dataset.transparencyIndicator=r:e.element.dataset.transparencyIndicator="color")},write:({root:e,props:n,shouldOptimize:r})=>{const{crop:i,markup:s,resize:o,dirty:a,width:l,height:d}=n;e.ref.image.crop=i;const c={width:l,height:d,center:{x:l*.5,y:d*.5}},u={width:e.ref.image.width,height:e.ref.image.height},p={x:i.center.x*u.width,y:i.center.y*u.height},f={x:c.center.x-u.width*i.center.x,y:c.center.y-u.height*i.center.y},h=Math.PI*2+i.rotation%(Math.PI*2),g=i.aspectRatio||u.height/u.width,m=typeof i.scaleToFit>"u"||i.scaleToFit,v=Hl(u,Vl(c,g),h,m?i.center:{x:.5,y:.5}),y=i.zoom*v;s&&s.length?(e.ref.createMarkup(),e.ref.markup.width=l,e.ref.markup.height=d,e.ref.markup.resize=o,e.ref.markup.dirty=a,e.ref.markup.markup=s,e.ref.markup.crop=Fm(u,i)):e.ref.markup&&e.ref.destroyMarkup();const _=e.ref.image;if(r){_.originX=null,_.originY=null,_.translateX=null,_.translateY=null,_.rotateZ=null,_.scaleX=null,_.scaleY=null;return}_.originX=p.x,_.originY=p.y,_.translateX=f.x,_.translateY=f.y,_.rotateZ=h,_.scaleX=y,_.scaleY=y}}),Vm=t=>t.utils.createView({name:"image-preview",tag:"div",ignoreRect:!0,mixins:{apis:["image","crop","markup","resize","dirty","background"],styles:["translateY","scaleX","scaleY","opacity"],animations:{scaleX:Le,scaleY:Le,translateY:Le,opacity:{type:"tween",duration:400}}},create:({root:e,props:n})=>{e.ref.clip=e.appendChildView(e.createChildView(Hm(t),{id:n.id,image:n.image,crop:n.crop,markup:n.markup,resize:n.resize,dirty:n.dirty,background:n.background}))},write:({root:e,props:n,shouldOptimize:r})=>{const{clip:i}=e.ref,{image:s,crop:o,markup:a,resize:l,dirty:d}=n;if(i.crop=o,i.markup=a,i.resize=l,i.dirty=d,i.opacity=r?0:1,r||e.rect.element.hidden)return;const c=s.height/s.width;let u=o.aspectRatio||c;const p=e.rect.inner.width,f=e.rect.inner.height;let h=e.query("GET_IMAGE_PREVIEW_HEIGHT");const g=e.query("GET_IMAGE_PREVIEW_MIN_HEIGHT"),m=e.query("GET_IMAGE_PREVIEW_MAX_HEIGHT"),v=e.query("GET_PANEL_ASPECT_RATIO"),y=e.query("GET_ALLOW_MULTIPLE");v&&!y&&(h=p*v,u=v);let _=h!==null?h:Math.max(g,Math.min(p*u,m)),b=_/u;b>p&&(b=p,_=b*u),_>f&&(_=f,b=f/u),i.width=b,i.height=_}});let zm=`<svg width="500" height="200" viewBox="0 0 500 200" preserveAspectRatio="none">
    <defs>
        <radialGradient id="gradient-__UID__" cx=".5" cy="1.25" r="1.15">
            <stop offset='50%' stop-color='#000000'/>
            <stop offset='56%' stop-color='#0a0a0a'/>
            <stop offset='63%' stop-color='#262626'/>
            <stop offset='69%' stop-color='#4f4f4f'/>
            <stop offset='75%' stop-color='#808080'/>
            <stop offset='81%' stop-color='#b1b1b1'/>
            <stop offset='88%' stop-color='#dadada'/>
            <stop offset='94%' stop-color='#f6f6f6'/>
            <stop offset='100%' stop-color='#ffffff'/>
        </radialGradient>
        <mask id="mask-__UID__">
            <rect x="0" y="0" width="500" height="200" fill="url(#gradient-__UID__)"></rect>
        </mask>
    </defs>
    <rect x="0" width="500" height="200" fill="currentColor" mask="url(#mask-__UID__)"></rect>
</svg>`,Io=0;const Wm=t=>t.utils.createView({name:"image-preview-overlay",tag:"div",ignoreRect:!0,create:({root:e,props:n})=>{let r=zm;if(document.querySelector("base")){const i=new URL(window.location.href.replace(window.location.hash,"")).href;r=r.replace(/url\(\#/g,"url("+i+"#")}Io++,e.element.classList.add(`filepond--image-preview-overlay-${n.status}`),e.element.innerHTML=r.replace(/__UID__/g,Io)},mixins:{styles:["opacity"],animations:{opacity:{type:"spring",mass:25}}}}),jm=function(){self.onmessage=t=>{createImageBitmap(t.data.message.file).then(e=>{self.postMessage({id:t.data.id,message:e},[e])})}},qm=function(){self.onmessage=t=>{const e=t.data.message.imageData,n=t.data.message.colorMatrix,r=e.data,i=r.length,s=n[0],o=n[1],a=n[2],l=n[3],d=n[4],c=n[5],u=n[6],p=n[7],f=n[8],h=n[9],g=n[10],m=n[11],v=n[12],y=n[13],_=n[14],b=n[15],A=n[16],S=n[17],M=n[18],I=n[19];let N=0,G=0,x=0,P=0,$=0;for(;N<i;N+=4)G=r[N]/255,x=r[N+1]/255,P=r[N+2]/255,$=r[N+3]/255,r[N]=Math.max(0,Math.min((G*s+x*o+P*a+$*l+d)*255,255)),r[N+1]=Math.max(0,Math.min((G*c+x*u+P*p+$*f+h)*255,255)),r[N+2]=Math.max(0,Math.min((G*g+x*m+P*v+$*y+_)*255,255)),r[N+3]=Math.max(0,Math.min((G*b+x*A+P*S+$*M+I)*255,255));self.postMessage({id:t.data.id,message:e},[e.data.buffer])}},$m=(t,e)=>{let n=new Image;n.onload=()=>{const r=n.naturalWidth,i=n.naturalHeight;n=null,e(r,i)},n.src=t},Ym={1:()=>[1,0,0,1,0,0],2:t=>[-1,0,0,1,t,0],3:(t,e)=>[-1,0,0,-1,t,e],4:(t,e)=>[1,0,0,-1,0,e],5:()=>[0,1,1,0,0,0],6:(t,e)=>[0,1,-1,0,e,0],7:(t,e)=>[0,-1,-1,0,e,t],8:t=>[0,-1,1,0,0,t]},Qm=(t,e,n,r)=>{r!==-1&&t.transform.apply(t,Ym[r](e,n))},Zm=(t,e,n,r)=>{e=Math.round(e),n=Math.round(n);const i=document.createElement("canvas");i.width=e,i.height=n;const s=i.getContext("2d");return r>=5&&r<=8&&([e,n]=[n,e]),Qm(s,e,n,r),s.drawImage(t,0,0,e,n),i},zl=t=>/^image/.test(t.type)&&!/svg/.test(t.type),Xm=10,Km=10,Jm=t=>{const e=Math.min(Xm/t.width,Km/t.height),n=document.createElement("canvas"),r=n.getContext("2d"),i=n.width=Math.ceil(t.width*e),s=n.height=Math.ceil(t.height*e);r.drawImage(t,0,0,i,s);let o=null;try{o=r.getImageData(0,0,i,s).data}catch{return null}const a=o.length;let l=0,d=0,c=0,u=0;for(;u<a;u+=4)l+=o[u]*o[u],d+=o[u+1]*o[u+1],c+=o[u+2]*o[u+2];return l=Br(l,a),d=Br(d,a),c=Br(c,a),{r:l,g:d,b:c}},Br=(t,e)=>Math.floor(Math.sqrt(t/(e/4))),eE=(t,e)=>(e=e||document.createElement("canvas"),e.width=t.width,e.height=t.height,e.getContext("2d").drawImage(t,0,0),e),tE=t=>{let e;try{e=new ImageData(t.width,t.height)}catch{e=document.createElement("canvas").getContext("2d").createImageData(t.width,t.height)}return e.data.set(new Uint8ClampedArray(t.data)),e},nE=t=>new Promise((e,n)=>{const r=new Image;r.crossOrigin="Anonymous",r.onload=()=>{e(r)},r.onerror=i=>{n(i)},r.src=t}),rE=t=>{const e=Wm(t),n=Vm(t),{createWorker:r}=t.utils,i=(y,_,b)=>new Promise(A=>{y.ref.imageData||(y.ref.imageData=b.getContext("2d").getImageData(0,0,b.width,b.height));const S=tE(y.ref.imageData);if(!_||_.length!==20)return b.getContext("2d").putImageData(S,0,0),A();const M=r(qm);M.post({imageData:S,colorMatrix:_},I=>{b.getContext("2d").putImageData(I,0,0),M.terminate(),A()},[S.data.buffer])}),s=(y,_)=>{y.removeChildView(_),_.image.width=1,_.image.height=1,_._destroy()},o=({root:y})=>{const _=y.ref.images.shift();return _.opacity=0,_.translateY=-15,y.ref.imageViewBin.push(_),_},a=({root:y,props:_,image:b})=>{const A=_.id,S=y.query("GET_ITEM",{id:A});if(!S)return;const M=S.getMetadata("crop")||{center:{x:.5,y:.5},flip:{horizontal:!1,vertical:!1},zoom:1,rotation:0,aspectRatio:null},I=y.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR");let N,G,x=!1;y.query("GET_IMAGE_PREVIEW_MARKUP_SHOW")&&(N=S.getMetadata("markup")||[],G=S.getMetadata("resize"),x=!0);const P=y.appendChildView(y.createChildView(n,{id:A,image:b,crop:M,resize:G,markup:N,dirty:x,background:I,opacity:0,scaleX:1.15,scaleY:1.15,translateY:15}),y.childViews.length);y.ref.images.push(P),P.opacity=1,P.scaleX=1,P.scaleY=1,P.translateY=0,setTimeout(()=>{y.dispatch("DID_IMAGE_PREVIEW_SHOW",{id:A})},250)},l=({root:y,props:_})=>{const b=y.query("GET_ITEM",{id:_.id});if(!b)return;const A=y.ref.images[y.ref.images.length-1];A.crop=b.getMetadata("crop"),A.background=y.query("GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR"),y.query("GET_IMAGE_PREVIEW_MARKUP_SHOW")&&(A.dirty=!0,A.resize=b.getMetadata("resize"),A.markup=b.getMetadata("markup"))},d=({root:y,props:_,action:b})=>{if(!/crop|filter|markup|resize/.test(b.change.key)||!y.ref.images.length)return;const A=y.query("GET_ITEM",{id:_.id});if(A){if(/filter/.test(b.change.key)){const S=y.ref.images[y.ref.images.length-1];i(y,b.change.value,S.image);return}if(/crop|markup|resize/.test(b.change.key)){const S=A.getMetadata("crop"),M=y.ref.images[y.ref.images.length-1];if(S&&S.aspectRatio&&M.crop&&M.crop.aspectRatio&&Math.abs(S.aspectRatio-M.crop.aspectRatio)>1e-5){const I=o({root:y});a({root:y,props:_,image:eE(I.image)})}else l({root:y,props:_})}}},c=y=>{const b=window.navigator.userAgent.match(/Firefox\/([0-9]+)\./),A=b?parseInt(b[1]):null;return A!==null&&A<=58?!1:"createImageBitmap"in window&&zl(y)},u=({root:y,props:_})=>{const{id:b}=_,A=y.query("GET_ITEM",b);if(!A)return;const S=URL.createObjectURL(A.file);$m(S,(M,I)=>{y.dispatch("DID_IMAGE_PREVIEW_CALCULATE_SIZE",{id:b,width:M,height:I})})},p=({root:y,props:_})=>{const{id:b}=_,A=y.query("GET_ITEM",b);if(!A)return;const S=URL.createObjectURL(A.file),M=()=>{nE(S).then(I)},I=N=>{URL.revokeObjectURL(S);const x=(A.getMetadata("exif")||{}).orientation||-1;let{width:P,height:$}=N;if(!P||!$)return;x>=5&&x<=8&&([P,$]=[$,P]);const O=Math.max(1,window.devicePixelRatio*.75),w=y.query("GET_IMAGE_PREVIEW_ZOOM_FACTOR")*O,C=$/P,L=y.rect.element.width,k=y.rect.element.height;let Z=L,U=Z*C;C>1?(Z=Math.min(P,L*w),U=Z*C):(U=Math.min($,k*w),Z=U/C);const at=Zm(N,Z,U,x),jt=()=>{const Ar=y.query("GET_IMAGE_PREVIEW_CALCULATE_AVERAGE_IMAGE_COLOR")?Jm(data):null;A.setMetadata("color",Ar,!0),"close"in N&&N.close(),y.ref.overlayShadow.opacity=1,a({root:y,props:_,image:at})},De=A.getMetadata("filter");De?i(y,De,at).then(jt):jt()};if(c(A.file)){const N=r(jm);N.post({file:A.file},G=>{if(N.terminate(),!G){M();return}I(G)})}else M()},f=({root:y})=>{const _=y.ref.images[y.ref.images.length-1];_.translateY=0,_.scaleX=1,_.scaleY=1,_.opacity=1},h=({root:y})=>{y.ref.overlayShadow.opacity=1,y.ref.overlayError.opacity=0,y.ref.overlaySuccess.opacity=0},g=({root:y})=>{y.ref.overlayShadow.opacity=.25,y.ref.overlayError.opacity=1},m=({root:y})=>{y.ref.overlayShadow.opacity=.25,y.ref.overlaySuccess.opacity=1},v=({root:y})=>{y.ref.images=[],y.ref.imageData=null,y.ref.imageViewBin=[],y.ref.overlayShadow=y.appendChildView(y.createChildView(e,{opacity:0,status:"idle"})),y.ref.overlaySuccess=y.appendChildView(y.createChildView(e,{opacity:0,status:"success"})),y.ref.overlayError=y.appendChildView(y.createChildView(e,{opacity:0,status:"failure"}))};return t.utils.createView({name:"image-preview-wrapper",create:v,styles:["height"],apis:["height"],destroy:({root:y})=>{y.ref.images.forEach(_=>{_.image.width=1,_.image.height=1})},didWriteView:({root:y})=>{y.ref.images.forEach(_=>{_.dirty=!1})},write:t.utils.createRoute({DID_IMAGE_PREVIEW_DRAW:f,DID_IMAGE_PREVIEW_CONTAINER_CREATE:u,DID_FINISH_CALCULATE_PREVIEWSIZE:p,DID_UPDATE_ITEM_METADATA:d,DID_THROW_ITEM_LOAD_ERROR:g,DID_THROW_ITEM_PROCESSING_ERROR:g,DID_THROW_ITEM_INVALID:g,DID_COMPLETE_ITEM_PROCESSING:m,DID_START_ITEM_PROCESSING:h,DID_REVERT_ITEM_PROCESSING:h},({root:y})=>{const _=y.ref.imageViewBin.filter(b=>b.opacity===0);y.ref.imageViewBin=y.ref.imageViewBin.filter(b=>b.opacity>0),_.forEach(b=>s(y,b)),_.length=0})})},Wl=t=>{const{addFilter:e,utils:n}=t,{Type:r,createRoute:i,isFile:s}=n,o=rE(t);return e("CREATE_VIEW",a=>{const{is:l,view:d,query:c}=a;if(!l("file")||!c("GET_ALLOW_IMAGE_PREVIEW"))return;const u=({root:m,props:v})=>{const{id:y}=v,_=c("GET_ITEM",y);if(!_||!s(_.file)||_.archived)return;const b=_.file;if(!cm(b)||!c("GET_IMAGE_PREVIEW_FILTER_ITEM")(_))return;const A="createImageBitmap"in(window||{}),S=c("GET_IMAGE_PREVIEW_MAX_FILE_SIZE");if(!A&&S&&b.size>S)return;m.ref.imagePreview=d.appendChildView(d.createChildView(o,{id:y}));const M=m.query("GET_IMAGE_PREVIEW_HEIGHT");M&&m.dispatch("DID_UPDATE_PANEL_HEIGHT",{id:_.id,height:M});const I=!A&&b.size>c("GET_IMAGE_PREVIEW_MAX_INSTANT_PREVIEW_FILE_SIZE");m.dispatch("DID_IMAGE_PREVIEW_CONTAINER_CREATE",{id:y},I)},p=(m,v)=>{if(!m.ref.imagePreview)return;let{id:y}=v;const _=m.query("GET_ITEM",{id:y});if(!_)return;const b=m.query("GET_PANEL_ASPECT_RATIO"),A=m.query("GET_ITEM_PANEL_ASPECT_RATIO"),S=m.query("GET_IMAGE_PREVIEW_HEIGHT");if(b||A||S)return;let{imageWidth:M,imageHeight:I}=m.ref;if(!M||!I)return;const N=m.query("GET_IMAGE_PREVIEW_MIN_HEIGHT"),G=m.query("GET_IMAGE_PREVIEW_MAX_HEIGHT"),P=(_.getMetadata("exif")||{}).orientation||-1;if(P>=5&&P<=8&&([M,I]=[I,M]),!zl(_.file)||m.query("GET_IMAGE_PREVIEW_UPSCALE")){const L=2048/M;M*=L,I*=L}const $=I/M,O=(_.getMetadata("crop")||{}).aspectRatio||$;let z=Math.max(N,Math.min(I,G));const w=m.rect.element.width,C=Math.min(w*O,z);m.dispatch("DID_UPDATE_PANEL_HEIGHT",{id:_.id,height:C})},f=({root:m})=>{m.ref.shouldRescale=!0},h=({root:m,action:v})=>{v.change.key==="crop"&&(m.ref.shouldRescale=!0)},g=({root:m,action:v})=>{m.ref.imageWidth=v.width,m.ref.imageHeight=v.height,m.ref.shouldRescale=!0,m.ref.shouldDrawPreview=!0,m.dispatch("KICK")};d.registerWriter(i({DID_RESIZE_ROOT:f,DID_STOP_RESIZE:f,DID_LOAD_ITEM:u,DID_IMAGE_PREVIEW_CALCULATE_SIZE:g,DID_UPDATE_ITEM_METADATA:h},({root:m,props:v})=>{m.ref.imagePreview&&(m.rect.element.hidden||(m.ref.shouldRescale&&(p(m,v),m.ref.shouldRescale=!1),m.ref.shouldDrawPreview&&(requestAnimationFrame(()=>{requestAnimationFrame(()=>{m.dispatch("DID_FINISH_CALCULATE_PREVIEWSIZE",{id:v.id})})}),m.ref.shouldDrawPreview=!1)))}))}),{options:{allowImagePreview:[!0,r.BOOLEAN],imagePreviewFilterItem:[()=>!0,r.FUNCTION],imagePreviewHeight:[null,r.INT],imagePreviewMinHeight:[44,r.INT],imagePreviewMaxHeight:[256,r.INT],imagePreviewMaxFileSize:[null,r.INT],imagePreviewZoomFactor:[2,r.INT],imagePreviewUpscale:[!1,r.BOOLEAN],imagePreviewMaxInstantPreviewFileSize:[1e6,r.INT],imagePreviewTransparencyIndicator:[null,r.STRING],imagePreviewCalculateAverageImageColor:[!1,r.BOOLEAN],imagePreviewMarkupShow:[!0,r.BOOLEAN],imagePreviewMarkupFilter:[()=>!0,r.FUNCTION]}}},iE=typeof window<"u"&&typeof window.document<"u";iE&&document.dispatchEvent(new CustomEvent("FilePond:pluginloaded",{detail:Wl}));var _r,F,jl,ql,Bt,dt,So,$l,Yl,Qn={},Ql=[],sE=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Xe(t,e){for(var n in e)t[n]=e[n];return t}function Zl(t){var e=t.parentNode;e&&e.removeChild(t)}function E(t,e,n){var r,i,s,o={};for(s in e)s=="key"?r=e[s]:s=="ref"?i=e[s]:o[s]=e[s];if(arguments.length>2&&(o.children=arguments.length>3?_r.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(s in t.defaultProps)o[s]===void 0&&(o[s]=t.defaultProps[s]);return Fn(t,o,r,i,null)}function Fn(t,e,n,r,i){var s={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++jl};return i==null&&F.vnode!=null&&F.vnode(s),s}function ue(){return{current:null}}function Y(t){return t.children}function oE(t,e,n,r,i){var s;for(s in n)s==="children"||s==="key"||s in e||Zn(t,s,null,n[s],r);for(s in e)i&&typeof e[s]!="function"||s==="children"||s==="key"||s==="value"||s==="checked"||n[s]===e[s]||Zn(t,s,e[s],n[s],r)}function Do(t,e,n){e[0]==="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||sE.test(e)?n:n+"px"}function Zn(t,e,n,r,i){var s;e:if(e==="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||Do(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||Do(t.style,e,n[e])}else if(e[0]==="o"&&e[1]==="n")s=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?r||t.addEventListener(e,s?Co:wo,s):t.removeEventListener(e,s?Co:wo,s);else if(e!=="dangerouslySetInnerHTML"){if(i)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e.indexOf("-")==-1?t.removeAttribute(e):t.setAttribute(e,n))}}function wo(t){Bt=!0;try{return this.l[t.type+!1](F.event?F.event(t):t)}finally{Bt=!1}}function Co(t){Bt=!0;try{return this.l[t.type+!0](F.event?F.event(t):t)}finally{Bt=!1}}function be(t,e){this.props=t,this.context=e}function sn(t,e){if(e==null)return t.__?sn(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?sn(t):null}function Xl(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return Xl(t)}}function aE(t){Bt?setTimeout(t):$l(t)}function pi(t){(!t.__d&&(t.__d=!0)&&dt.push(t)&&!Xn.__r++||So!==F.debounceRendering)&&((So=F.debounceRendering)||aE)(Xn)}function Xn(){var t,e,n,r,i,s,o,a;for(dt.sort(function(l,d){return l.__v.__b-d.__v.__b});t=dt.shift();)t.__d&&(e=dt.length,r=void 0,i=void 0,o=(s=(n=t).__v).__e,(a=n.__P)&&(r=[],(i=Xe({},s)).__v=s.__v+1,ji(a,s,i,n.__n,a.ownerSVGElement!==void 0,s.__h!=null?[o]:null,r,o??sn(s),s.__h),nc(r,s),s.__e!=o&&Xl(s)),dt.length>e&&dt.sort(function(l,d){return l.__v.__b-d.__v.__b}));Xn.__r=0}function Kl(t,e,n,r,i,s,o,a,l,d){var c,u,p,f,h,g,m,v=r&&r.__k||Ql,y=v.length;for(n.__k=[],c=0;c<e.length;c++)if((f=n.__k[c]=(f=e[c])==null||typeof f=="boolean"?null:typeof f=="string"||typeof f=="number"||typeof f=="bigint"?Fn(null,f,null,null,f):Array.isArray(f)?Fn(Y,{children:f},null,null,null):f.__b>0?Fn(f.type,f.props,f.key,f.ref?f.ref:null,f.__v):f)!=null){if(f.__=n,f.__b=n.__b+1,(p=v[c])===null||p&&f.key==p.key&&f.type===p.type)v[c]=void 0;else for(u=0;u<y;u++){if((p=v[u])&&f.key==p.key&&f.type===p.type){v[u]=void 0;break}p=null}ji(t,f,p=p||Qn,i,s,o,a,l,d),h=f.__e,(u=f.ref)&&p.ref!=u&&(m||(m=[]),p.ref&&m.push(p.ref,null,f),m.push(u,f.__c||h,f)),h!=null?(g==null&&(g=h),typeof f.type=="function"&&f.__k===p.__k?f.__d=l=Jl(f,l,t):l=ec(t,f,p,v,h,l),typeof n.type=="function"&&(n.__d=l)):l&&p.__e==l&&l.parentNode!=t&&(l=sn(p))}for(n.__e=g,c=y;c--;)v[c]!=null&&(typeof n.type=="function"&&v[c].__e!=null&&v[c].__e==n.__d&&(n.__d=tc(r).nextSibling),ic(v[c],v[c]));if(m)for(c=0;c<m.length;c++)rc(m[c],m[++c],m[++c])}function Jl(t,e,n){for(var r,i=t.__k,s=0;i&&s<i.length;s++)(r=i[s])&&(r.__=t,e=typeof r.type=="function"?Jl(r,e,n):ec(n,r,r,i,r.__e,e));return e}function Kn(t,e){return e=e||[],t==null||typeof t=="boolean"||(Array.isArray(t)?t.some(function(n){Kn(n,e)}):e.push(t)),e}function ec(t,e,n,r,i,s){var o,a,l;if(e.__d!==void 0)o=e.__d,e.__d=void 0;else if(n==null||i!=s||i.parentNode==null)e:if(s==null||s.parentNode!==t)t.appendChild(i),o=null;else{for(a=s,l=0;(a=a.nextSibling)&&l<r.length;l+=1)if(a==i)break e;t.insertBefore(i,s),o=s}return o!==void 0?o:i.nextSibling}function tc(t){var e,n,r;if(t.type==null||typeof t.type=="string")return t.__e;if(t.__k){for(e=t.__k.length-1;e>=0;e--)if((n=t.__k[e])&&(r=tc(n)))return r}return null}function ji(t,e,n,r,i,s,o,a,l){var d,c,u,p,f,h,g,m,v,y,_,b,A,S,M,I=e.type;if(e.constructor!==void 0)return null;n.__h!=null&&(l=n.__h,a=e.__e=n.__e,e.__h=null,s=[a]),(d=F.__b)&&d(e);try{e:if(typeof I=="function"){if(m=e.props,v=(d=I.contextType)&&r[d.__c],y=d?v?v.props.value:d.__:r,n.__c?g=(c=e.__c=n.__c).__=c.__E:("prototype"in I&&I.prototype.render?e.__c=c=new I(m,y):(e.__c=c=new be(m,y),c.constructor=I,c.render=cE),v&&v.sub(c),c.props=m,c.state||(c.state={}),c.context=y,c.__n=r,u=c.__d=!0,c.__h=[],c._sb=[]),c.__s==null&&(c.__s=c.state),I.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=Xe({},c.__s)),Xe(c.__s,I.getDerivedStateFromProps(m,c.__s))),p=c.props,f=c.state,c.__v=e,u)I.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(I.getDerivedStateFromProps==null&&m!==p&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(m,y),!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(m,c.__s,y)===!1||e.__v===n.__v){for(e.__v!==n.__v&&(c.props=m,c.state=c.__s,c.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach(function(N){N&&(N.__=e)}),_=0;_<c._sb.length;_++)c.__h.push(c._sb[_]);c._sb=[],c.__h.length&&o.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(m,c.__s,y),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(p,f,h)})}if(c.context=y,c.props=m,c.__P=t,b=F.__r,A=0,"prototype"in I&&I.prototype.render){for(c.state=c.__s,c.__d=!1,b&&b(e),d=c.render(c.props,c.state,c.context),S=0;S<c._sb.length;S++)c.__h.push(c._sb[S]);c._sb=[]}else do c.__d=!1,b&&b(e),d=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++A<25);c.state=c.__s,c.getChildContext!=null&&(r=Xe(Xe({},r),c.getChildContext())),u||c.getSnapshotBeforeUpdate==null||(h=c.getSnapshotBeforeUpdate(p,f)),M=d!=null&&d.type===Y&&d.key==null?d.props.children:d,Kl(t,Array.isArray(M)?M:[M],e,n,r,i,s,o,a,l),c.base=e.__e,e.__h=null,c.__h.length&&o.push(c),g&&(c.__E=c.__=null),c.__e=!1}else s==null&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=lE(n.__e,e,n,r,i,s,o,l);(d=F.diffed)&&d(e)}catch(N){e.__v=null,(l||s!=null)&&(e.__e=a,e.__h=!!l,s[s.indexOf(a)]=null),F.__e(N,e,n)}}function nc(t,e){F.__c&&F.__c(e,t),t.some(function(n){try{t=n.__h,n.__h=[],t.some(function(r){r.call(n)})}catch(r){F.__e(r,n.__v)}})}function lE(t,e,n,r,i,s,o,a){var l,d,c,u=n.props,p=e.props,f=e.type,h=0;if(f==="svg"&&(i=!0),s!=null){for(;h<s.length;h++)if((l=s[h])&&"setAttribute"in l==!!f&&(f?l.localName===f:l.nodeType===3)){t=l,s[h]=null;break}}if(t==null){if(f===null)return document.createTextNode(p);t=i?document.createElementNS("http://www.w3.org/2000/svg",f):document.createElement(f,p.is&&p),s=null,a=!1}if(f===null)u===p||a&&t.data===p||(t.data=p);else{if(s=s&&_r.call(t.childNodes),d=(u=n.props||Qn).dangerouslySetInnerHTML,c=p.dangerouslySetInnerHTML,!a){if(s!=null)for(u={},h=0;h<t.attributes.length;h++)u[t.attributes[h].name]=t.attributes[h].value;(c||d)&&(c&&(d&&c.__html==d.__html||c.__html===t.innerHTML)||(t.innerHTML=c&&c.__html||""))}if(oE(t,p,u,i,a),c)e.__k=[];else if(h=e.props.children,Kl(t,Array.isArray(h)?h:[h],e,n,r,i&&f!=="foreignObject",s,o,s?s[0]:n.__k&&sn(n,0),a),s!=null)for(h=s.length;h--;)s[h]!=null&&Zl(s[h]);a||("value"in p&&(h=p.value)!==void 0&&(h!==t.value||f==="progress"&&!h||f==="option"&&h!==u.value)&&Zn(t,"value",h,u.value,!1),"checked"in p&&(h=p.checked)!==void 0&&h!==t.checked&&Zn(t,"checked",h,u.checked,!1))}return t}function rc(t,e,n){try{typeof t=="function"?t(e):t.current=e}catch(r){F.__e(r,n)}}function ic(t,e,n){var r,i;if(F.unmount&&F.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||rc(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){F.__e(s,e)}r.base=r.__P=null,t.__c=void 0}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&ic(r[i],e,n||typeof t.type!="function");n||t.__e==null||Zl(t.__e),t.__=t.__e=t.__d=void 0}function cE(t,e,n){return this.constructor(t,n)}function on(t,e,n){var r,i,s;F.__&&F.__(t,e),i=(r=!1)?null:e.__k,s=[],ji(e,t=e.__k=E(Y,null,[t]),i||Qn,Qn,e.ownerSVGElement!==void 0,i?null:e.firstChild?_r.call(e.childNodes):null,s,i?i.__e:e.firstChild,r),nc(s,t)}function dE(t,e){var n={__c:e="__cC"+Yl++,__:t,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,s;return this.getChildContext||(i=[],(s={})[e]=this,this.getChildContext=function(){return s},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&i.some(function(a){a.__e=!0,pi(a)})},this.sub=function(o){i.push(o);var a=o.componentWillUnmount;o.componentWillUnmount=function(){i.splice(i.indexOf(o),1),a&&a.call(o)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}_r=Ql.slice,F={__e:function(t,e,n,r){for(var i,s,o;e=e.__;)if((i=e.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(t)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),o=i.__d),o)return i.__E=i}catch(a){t=a}throw t}},jl=0,ql=function(t){return t!=null&&t.constructor===void 0},Bt=!1,be.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Xe({},this.state),typeof t=="function"&&(t=t(Xe({},n),this.props)),t&&Xe(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),pi(this))},be.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),pi(this))},be.prototype.render=Y,dt=[],$l=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Xn.__r=0,Yl=0;var ke,Fr,Oo,sc=[],Gr=[],Mo=F.__b,No=F.__r,xo=F.diffed,Po=F.__c,Lo=F.unmount;function uE(){for(var t;t=sc.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Gn),t.__H.__h.forEach(gi),t.__H.__h=[]}catch(e){t.__H.__h=[],F.__e(e,t.__v)}}F.__b=function(t){ke=null,Mo&&Mo(t)},F.__r=function(t){No&&No(t);var e=(ke=t.__c).__H;e&&(Fr===ke?(e.__h=[],ke.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Gr,n.__N=n.i=void 0})):(e.__h.forEach(Gn),e.__h.forEach(gi),e.__h=[])),Fr=ke},F.diffed=function(t){xo&&xo(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(sc.push(e)!==1&&Oo===F.requestAnimationFrame||((Oo=F.requestAnimationFrame)||fE)(uE)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Gr&&(n.__=n.__V),n.i=void 0,n.__V=Gr})),Fr=ke=null},F.__c=function(t,e){e.some(function(n){try{n.__h.forEach(Gn),n.__h=n.__h.filter(function(r){return!r.__||gi(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],F.__e(r,n.__v)}}),Po&&Po(t,e)},F.unmount=function(t){Lo&&Lo(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Gn(r)}catch(i){e=i}}),n.__H=void 0,e&&F.__e(e,n.__v))};var ko=typeof requestAnimationFrame=="function";function fE(t){var e,n=function(){clearTimeout(r),ko&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);ko&&(e=requestAnimationFrame(n))}function Gn(t){var e=ke,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),ke=e}function gi(t){var e=ke;t.__c=t.__(),ke=e}function hE(t,e){for(var n in e)t[n]=e[n];return t}function Bo(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function Fo(t){this.props=t}(Fo.prototype=new be).isPureReactComponent=!0,Fo.prototype.shouldComponentUpdate=function(t,e){return Bo(this.props,t)||Bo(this.state,e)};var Go=F.__b;F.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Go&&Go(t)};var pE=F.__e;F.__e=function(t,e,n,r){if(t.then){for(var i,s=e;s=s.__;)if((i=s.__c)&&i.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e)}pE(t,e,n,r)};var Uo=F.unmount;function oc(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),t.__c.__H=null),(t=hE({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return oc(r,e,n)})),t}function ac(t,e,n){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return ac(r,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=n)),t}function Ur(){this.__u=0,this.t=null,this.__b=null}function lc(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function In(){this.u=null,this.o=null}F.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&t.__h===!0&&(t.type=null),Uo&&Uo(t)},(Ur.prototype=new be).__c=function(t,e){var n=e.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=lc(r.__v),s=!1,o=function(){s||(s=!0,n.__R=null,i?i(a):a())};n.__R=o;var a=function(){if(!--r.__u){if(r.state.__a){var d=r.state.__a;r.__v.__k[0]=ac(d,d.__c.__P,d.__c.__O)}var c;for(r.setState({__a:r.__b=null});c=r.t.pop();)c.forceUpdate()}},l=e.__h===!0;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(o,o)},Ur.prototype.componentWillUnmount=function(){this.t=[]},Ur.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=oc(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&E(Y,null,t.fallback);return i&&(i.__h=null),[E(Y,null,e.__a?null:t.children),i]};var Ho=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.u=n=n[2]}};function gE(t){return this.getChildContext=function(){return t.context},t.children}function mE(t){var e=this,n=t.i;e.componentWillUnmount=function(){on(null,e.l),e.l=null,e.i=null},e.i&&e.i!==n&&e.componentWillUnmount(),t.__v?(e.l||(e.i=n,e.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),e.i.appendChild(r)},insertBefore:function(r,i){this.childNodes.push(r),e.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),e.i.removeChild(r)}}),on(E(gE,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}function EE(t,e){var n=E(mE,{__v:t,i:e});return n.containerInfo=e,n}(In.prototype=new be).__a=function(t){var e=this,n=lc(e.__v),r=e.o.get(t);return r[0]++,function(i){var s=function(){e.props.revealOrder?(r.push(i),Ho(e,t,r)):i()};n?n(s):s()}},In.prototype.render=function(t){this.u=null,this.o=new Map;var e=Kn(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},In.prototype.componentDidUpdate=In.prototype.componentDidMount=function(){var t=this;this.o.forEach(function(e,n){Ho(t,n,e)})};var yE=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,vE=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,_E=typeof document<"u",bE=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(t)};be.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(be.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var Vo=F.event;function TE(){}function RE(){return this.cancelBubble}function AE(){return this.defaultPrevented}F.event=function(t){return Vo&&(t=Vo(t)),t.persist=TE,t.isPropagationStopped=RE,t.isDefaultPrevented=AE,t.nativeEvent=t};var zo={configurable:!0,get:function(){return this.class}},Wo=F.vnode;F.vnode=function(t){var e=t.type,n=t.props,r=n;if(typeof e=="string"){var i=e.indexOf("-")===-1;for(var s in r={},n){var o=n[s];_E&&s==="children"&&e==="noscript"||s==="value"&&"defaultValue"in n&&o==null||(s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&o===!0?o="":/ondoubleclick/i.test(s)?s="ondblclick":/^onchange(textarea|input)/i.test(s+e)&&!bE(n.type)?s="oninput":/^onfocus$/i.test(s)?s="onfocusin":/^onblur$/i.test(s)?s="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(s)?s=s.toLowerCase():i&&vE.test(s)?s=s.replace(/[A-Z0-9]/g,"-$&").toLowerCase():o===null&&(o=void 0),/^oninput$/i.test(s)&&(s=s.toLowerCase(),r[s]&&(s="oninputCapture")),r[s]=o)}e=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=Kn(n.children).forEach(function(a){a.props.selected=r.value.indexOf(a.props.value)!=-1})),e=="select"&&r.defaultValue!=null&&(r.value=Kn(n.children).forEach(function(a){a.props.selected=r.multiple?r.defaultValue.indexOf(a.props.value)!=-1:r.defaultValue==a.props.value})),t.props=r,n.class!=n.className&&(zo.enumerable="className"in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",zo))}t.$$typeof=yE,Wo&&Wo(t)};var jo=F.__r;F.__r=function(t){jo&&jo(t),t.__c};const cc=[],mi=new Map;function br(t){cc.push(t),mi.forEach(e=>{uc(e,t)})}function IE(t){t.isConnected&&t.getRootNode&&dc(t.getRootNode())}function dc(t){let e=mi.get(t);if(!e||!e.isConnected){if(e=t.querySelector("style[data-fullcalendar]"),!e){e=document.createElement("style"),e.setAttribute("data-fullcalendar","");const n=DE();n&&(e.nonce=n);const r=t===document?document.head:t,i=t===document?r.querySelector("script,link[rel=stylesheet],link[as=style],style"):r.firstChild;r.insertBefore(e,i)}mi.set(t,e),SE(e)}}function SE(t){for(const e of cc)uc(t,e)}function uc(t,e){const{sheet:n}=t,r=n.cssRules.length;e.split("}").forEach((i,s)=>{i=i.trim(),i&&n.insertRule(i+"}",r+s)})}let Hr;function DE(){return Hr===void 0&&(Hr=wE()),Hr}function wE(){const t=document.querySelector('meta[name="csp-nonce"]');if(t&&t.hasAttribute("content"))return t.getAttribute("content");const e=document.querySelector("script[nonce]");return e&&e.nonce||""}typeof document<"u"&&dc(document);var CE=':root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:"";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:"";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}';br(CE);class qi{constructor(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),e==null?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))}pause(e=""){let{pauseDepths:n}=this;n[e]=(n[e]||0)+1,this.clearTimeout()}resume(e="",n){let{pauseDepths:r}=this;e in r&&(n?delete r[e]:(r[e]-=1,r[e]<=0&&delete r[e]),this.tryDrain())}isPaused(){return Object.keys(this.pauseDepths).length}tryDrain(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}}clear(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}}clearTimeout(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)}drained(){this.drainedOption&&this.drainedOption()}}function OE(t){t.parentNode&&t.parentNode.removeChild(t)}function Ue(t,e){if(t.closest)return t.closest(e);if(!document.documentElement.contains(t))return null;do{if(ME(t,e))return t;t=t.parentElement||t.parentNode}while(t!==null&&t.nodeType===1);return null}function ME(t,e){return(t.matches||t.matchesSelector||t.msMatchesSelector).call(t,e)}function NE(t,e){let n=t instanceof HTMLElement?[t]:t,r=[];for(let i=0;i<n.length;i+=1){let s=n[i].querySelectorAll(e);for(let o=0;o<s.length;o+=1)r.push(s[o])}return r}const xE=/(top|left|right|bottom|width|height)$/i;function PE(t,e){for(let n in e)fc(t,n,e[n])}function fc(t,e,n){n==null?t.style[e]="":typeof n=="number"&&xE.test(e)?t.style[e]=`${n}px`:t.style[e]=n}function LE(t){var e,n;return(n=(e=t.composedPath)===null||e===void 0?void 0:e.call(t)[0])!==null&&n!==void 0?n:t.target}let qo=0;function tt(){return qo+=1,"fc-dom-"+qo}function kE(t,e){return n=>{let r=Ue(n.target,t);r&&e.call(r,n,r)}}function hc(t,e,n,r){let i=kE(n,r);return t.addEventListener(e,i),()=>{t.removeEventListener(e,i)}}function BE(t,e,n,r){let i;return hc(t,"mouseover",e,(s,o)=>{if(o!==i){i=o,n(s,o);let a=l=>{i=null,r(l,o),o.removeEventListener("mouseleave",a)};o.addEventListener("mouseleave",a)}})}function pc(t){return Object.assign({onClick:t},gc(t))}function gc(t){return{tabIndex:0,onKeyDown(e){(e.key==="Enter"||e.key===" ")&&(t(e),e.preventDefault())}}}let $o=0;function It(){return $o+=1,String($o)}function FE(t){let e=[],n=[],r,i;for(typeof t=="string"?n=t.split(/\s*,\s*/):typeof t=="function"?n=[t]:Array.isArray(t)&&(n=t),r=0;r<n.length;r+=1)i=n[r],typeof i=="string"?e.push(i.charAt(0)==="-"?{field:i.substring(1),order:-1}:{field:i,order:1}):typeof i=="function"&&e.push({func:i});return e}function GE(t,e,n){let r,i;for(r=0;r<n.length;r+=1)if(i=UE(t,e,n[r]),i)return i;return 0}function UE(t,e,n){return n.func?n.func(t,e):HE(t[n.field],e[n.field])*(n.order||1)}function HE(t,e){return!t&&!e?0:e==null?-1:t==null?1:typeof t=="string"||typeof e=="string"?String(t).localeCompare(String(e)):t-e}function xt(t,e){let n=String(t);return"000".substr(0,e-n.length)+n}function Jt(t,e,n){return typeof t=="function"?t(...e):typeof t=="string"?e.reduce((r,i,s)=>r.replace("$"+s,i||""),t):n}function Un(t){return t%1===0}function VE(t){let e=t.querySelector(".fc-scrollgrid-shrink-frame"),n=t.querySelector(".fc-scrollgrid-shrink-cushion");if(!e)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!n)throw new Error("needs fc-scrollgrid-shrink-cushion className");return t.getBoundingClientRect().width-e.getBoundingClientRect().width+n.getBoundingClientRect().width}const Yo=["years","months","days","milliseconds"],zE=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function j(t,e){return typeof t=="string"?WE(t):typeof t=="object"&&t?Qo(t):typeof t=="number"?Qo({[e||"milliseconds"]:t}):null}function WE(t){let e=zE.exec(t);if(e){let n=e[1]?-1:1;return{years:0,months:0,days:n*(e[2]?parseInt(e[2],10):0),milliseconds:n*((e[3]?parseInt(e[3],10):0)*60*60*1e3+(e[4]?parseInt(e[4],10):0)*60*1e3+(e[5]?parseInt(e[5],10):0)*1e3+(e[6]?parseInt(e[6],10):0))}}return null}function Qo(t){let e={years:t.years||t.year||0,months:t.months||t.month||0,days:t.days||t.day||0,milliseconds:(t.hours||t.hour||0)*60*60*1e3+(t.minutes||t.minute||0)*60*1e3+(t.seconds||t.second||0)*1e3+(t.milliseconds||t.millisecond||t.ms||0)},n=t.weeks||t.week;return n&&(e.days+=n*7,e.specifiedWeeks=!0),e}function jE(t,e){return t.years===e.years&&t.months===e.months&&t.days===e.days&&t.milliseconds===e.milliseconds}function Ei(t,e){return{years:t.years+e.years,months:t.months+e.months,days:t.days+e.days,milliseconds:t.milliseconds+e.milliseconds}}function qE(t,e){return{years:t.years-e.years,months:t.months-e.months,days:t.days-e.days,milliseconds:t.milliseconds-e.milliseconds}}function $E(t,e){return{years:t.years*e,months:t.months*e,days:t.days*e,milliseconds:t.milliseconds*e}}function YE(t){return Pt(t)/365}function QE(t){return Pt(t)/30}function Pt(t){return Me(t)/864e5}function Me(t){return t.years*(365*864e5)+t.months*(30*864e5)+t.days*864e5+t.milliseconds}function $i(t,e){let n=null;for(let r=0;r<Yo.length;r+=1){let i=Yo[r];if(e[i]){let s=t[i]/e[i];if(!Un(s)||n!==null&&n!==s)return null;n=s}else if(t[i])return null}return n}function yi(t){let e=t.milliseconds;if(e){if(e%1e3!==0)return{unit:"millisecond",value:e};if(e%(1e3*60)!==0)return{unit:"second",value:e/1e3};if(e%(1e3*60*60)!==0)return{unit:"minute",value:e/(1e3*60)};if(e)return{unit:"hour",value:e/(1e3*60*60)}}return t.days?t.specifiedWeeks&&t.days%7===0?{unit:"week",value:t.days/7}:{unit:"day",value:t.days}:t.months?{unit:"month",value:t.months}:t.years?{unit:"year",value:t.years}:{unit:"millisecond",value:0}}function nt(t,e,n){if(t===e)return!0;let r=t.length,i;if(r!==e.length)return!1;for(i=0;i<r;i+=1)if(!(n?n(t[i],e[i]):t[i]===e[i]))return!1;return!0}const ZE=["sun","mon","tue","wed","thu","fri","sat"];function Zo(t,e){let n=Ke(t);return n[2]+=e*7,Ee(n)}function oe(t,e){let n=Ke(t);return n[2]+=e,Ee(n)}function rt(t,e){let n=Ke(t);return n[6]+=e,Ee(n)}function XE(t,e){return st(t,e)/7}function st(t,e){return(e.valueOf()-t.valueOf())/(1e3*60*60*24)}function KE(t,e){return(e.valueOf()-t.valueOf())/(1e3*60*60)}function JE(t,e){return(e.valueOf()-t.valueOf())/(1e3*60)}function ey(t,e){return(e.valueOf()-t.valueOf())/1e3}function ty(t,e){let n=Q(t),r=Q(e);return{years:0,months:0,days:Math.round(st(n,r)),milliseconds:e.valueOf()-r.valueOf()-(t.valueOf()-n.valueOf())}}function ny(t,e){let n=Jn(t,e);return n!==null&&n%7===0?n/7:null}function Jn(t,e){return Je(t)===Je(e)?Math.round(st(t,e)):null}function Q(t){return Ee([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()])}function ry(t){return Ee([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours()])}function iy(t){return Ee([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes()])}function sy(t){return Ee([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds()])}function oy(t,e,n){let r=t.getUTCFullYear(),i=Vr(t,r,e,n);if(i<1)return Vr(t,r-1,e,n);let s=Vr(t,r+1,e,n);return s>=1?Math.min(i,s):i}function Vr(t,e,n,r){let i=Ee([e,0,1+ay(e,n,r)]),s=Q(t),o=Math.round(st(i,s));return Math.floor(o/7)+1}function ay(t,e,n){let r=7+e-n;return-((7+Ee([t,0,r]).getUTCDay()-e)%7)+r-1}function Xo(t){return[t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()]}function Ko(t){return new Date(t[0],t[1]||0,t[2]==null?1:t[2],t[3]||0,t[4]||0,t[5]||0)}function Ke(t){return[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()]}function Ee(t){return t.length===1&&(t=t.concat([0])),new Date(Date.UTC(...t))}function mc(t){return!isNaN(t.valueOf())}function Je(t){return t.getUTCHours()*1e3*60*60+t.getUTCMinutes()*1e3*60+t.getUTCSeconds()*1e3+t.getUTCMilliseconds()}function Ec(t,e,n=!1){let r=t.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(e==null?r=r.replace("Z",""):e!==0&&(r=r.replace("Z",Yi(e,!0)))),r}function fn(t){return t.toISOString().replace(/T.*$/,"")}function ly(t){return t.toISOString().match(/^\d{4}-\d{2}/)[0]}function cy(t){return xt(t.getUTCHours(),2)+":"+xt(t.getUTCMinutes(),2)+":"+xt(t.getUTCSeconds(),2)}function Yi(t,e=!1){let n=t<0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),s=Math.round(r%60);return e?`${n+xt(i,2)}:${xt(s,2)}`:`GMT${n}${i}${s?`:${xt(s,2)}`:""}`}function B(t,e,n){let r,i;return function(...s){if(!r)i=t.apply(this,s);else if(!nt(r,s)){let o=t.apply(this,s);(!e||!e(o,i))&&(i=o)}return r=s,i}}function Hn(t,e,n){let r,i;return s=>(r?Fe(r,s)||(i=t.call(this,s)):i=t.call(this,s),r=s,i)}const Jo={week:3,separator:0,omitZeroMinute:0,meridiem:0,omitCommas:0},er={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},Sn=/\s*([ap])\.?m\.?/i,dy=/,/g,uy=/\s+/g,fy=/\u200e/g,hy=/UTC|GMT/;class py{constructor(e){let n={},r={},i=0;for(let s in e)s in Jo?(r[s]=e[s],i=Math.max(Jo[s],i)):(n[s]=e[s],s in er&&(i=Math.max(er[s],i)));this.standardDateProps=n,this.extendedSettings=r,this.severity=i,this.buildFormattingFunc=B(ea)}format(e,n){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,n)(e)}formatRange(e,n,r,i){let{standardDateProps:s,extendedSettings:o}=this,a=_y(e.marker,n.marker,r.calendarSystem);if(!a)return this.format(e,r);let l=a;l>1&&(s.year==="numeric"||s.year==="2-digit")&&(s.month==="numeric"||s.month==="2-digit")&&(s.day==="numeric"||s.day==="2-digit")&&(l=1);let d=this.format(e,r),c=this.format(n,r);if(d===c)return d;let u=by(s,l),p=ea(u,o,r),f=p(e),h=p(n),g=Ty(d,f,c,h),m=o.separator||i||r.defaultSeparator||"";return g?g.before+f+m+h+g.after:d+m+c}getLargestUnit(){switch(this.severity){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";case 2:return"day";default:return"time"}}}function ea(t,e,n){let r=Object.keys(t).length;return r===1&&t.timeZoneName==="short"?i=>Yi(i.timeZoneOffset):r===0&&e.week?i=>vy(n.computeWeekNumber(i.marker),n.weekText,n.weekTextLong,n.locale,e.week):gy(t,e,n)}function gy(t,e,n){t=Object.assign({},t),e=Object.assign({},e),my(t,e),t.timeZone="UTC";let r=new Intl.DateTimeFormat(n.locale.codes,t),i;if(e.omitZeroMinute){let s=Object.assign({},t);delete s.minute,i=new Intl.DateTimeFormat(n.locale.codes,s)}return s=>{let{marker:o}=s,a;i&&!o.getUTCMinutes()?a=i:a=r;let l=a.format(o);return Ey(l,s,t,e,n)}}function my(t,e){t.timeZoneName&&(t.hour||(t.hour="2-digit"),t.minute||(t.minute="2-digit")),t.timeZoneName==="long"&&(t.timeZoneName="short"),e.omitZeroMinute&&(t.second||t.millisecond)&&delete e.omitZeroMinute}function Ey(t,e,n,r,i){return t=t.replace(fy,""),n.timeZoneName==="short"&&(t=yy(t,i.timeZone==="UTC"||e.timeZoneOffset==null?"UTC":Yi(e.timeZoneOffset))),r.omitCommas&&(t=t.replace(dy,"").trim()),r.omitZeroMinute&&(t=t.replace(":00","")),r.meridiem===!1?t=t.replace(Sn,"").trim():r.meridiem==="narrow"?t=t.replace(Sn,(s,o)=>o.toLocaleLowerCase()):r.meridiem==="short"?t=t.replace(Sn,(s,o)=>`${o.toLocaleLowerCase()}m`):r.meridiem==="lowercase"&&(t=t.replace(Sn,s=>s.toLocaleLowerCase())),t=t.replace(uy," "),t=t.trim(),t}function yy(t,e){let n=!1;return t=t.replace(hy,()=>(n=!0,e)),n||(t+=` ${e}`),t}function vy(t,e,n,r,i){let s=[];return i==="long"?s.push(n):(i==="short"||i==="narrow")&&s.push(e),(i==="long"||i==="short")&&s.push(" "),s.push(r.simpleNumberFormat.format(t)),r.options.direction==="rtl"&&s.reverse(),s.join("")}function _y(t,e,n){return n.getMarkerYear(t)!==n.getMarkerYear(e)?5:n.getMarkerMonth(t)!==n.getMarkerMonth(e)?4:n.getMarkerDay(t)!==n.getMarkerDay(e)?2:Je(t)!==Je(e)?1:0}function by(t,e){let n={};for(let r in t)(!(r in er)||er[r]<=e)&&(n[r]=t[r]);return n}function Ty(t,e,n,r){let i=0;for(;i<t.length;){let s=t.indexOf(e,i);if(s===-1)break;let o=t.substr(0,s);i=s+e.length;let a=t.substr(i),l=0;for(;l<n.length;){let d=n.indexOf(r,l);if(d===-1)break;let c=n.substr(0,d);l=d+r.length;let u=n.substr(l);if(o===c&&a===u)return{before:o,after:a}}}return null}function ta(t,e){let n=e.markerToArray(t.marker);return{marker:t.marker,timeZoneOffset:t.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function tr(t,e,n,r){let i=ta(t,n.calendarSystem),s=e?ta(e,n.calendarSystem):null;return{date:i,start:i,end:s,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}class Ry{constructor(e){this.cmdStr=e}format(e,n,r){return n.cmdFormatter(this.cmdStr,tr(e,null,n,r))}formatRange(e,n,r,i){return r.cmdFormatter(this.cmdStr,tr(e,n,r,i))}}class Ay{constructor(e){this.func=e}format(e,n,r){return this.func(tr(e,null,n,r))}formatRange(e,n,r,i){return this.func(tr(e,n,r,i))}}function X(t){return typeof t=="object"&&t?new py(t):typeof t=="string"?new Ry(t):typeof t=="function"?new Ay(t):null}const na={navLinkDayClick:T,navLinkWeekClick:T,duration:j,bootstrapFontAwesome:T,buttonIcons:T,customButtons:T,defaultAllDayEventDuration:j,defaultTimedEventDuration:j,nextDayThreshold:j,scrollTime:j,scrollTimeReset:Boolean,slotMinTime:j,slotMaxTime:j,dayPopoverFormat:X,slotDuration:j,snapDuration:j,headerToolbar:T,footerToolbar:T,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:X,dayHeaderClassNames:T,dayHeaderContent:T,dayHeaderDidMount:T,dayHeaderWillUnmount:T,dayCellClassNames:T,dayCellContent:T,dayCellDidMount:T,dayCellWillUnmount:T,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:T,weekNumbers:Boolean,weekNumberClassNames:T,weekNumberContent:T,weekNumberDidMount:T,weekNumberWillUnmount:T,editable:Boolean,viewClassNames:T,viewDidMount:T,viewWillUnmount:T,nowIndicator:Boolean,nowIndicatorClassNames:T,nowIndicatorContent:T,nowIndicatorDidMount:T,nowIndicatorWillUnmount:T,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:T,locale:T,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:T,eventOrder:FE,eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:T,contentHeight:T,direction:String,weekNumberFormat:X,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:T,initialDate:T,now:T,eventDataTransform:T,stickyHeaderDates:T,stickyFooterScrollbar:T,viewHeight:T,defaultAllDay:Boolean,eventSourceFailure:T,eventSourceSuccess:T,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:T,eventConstraint:T,eventAllow:T,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:T,eventContent:T,eventDidMount:T,eventWillUnmount:T,selectConstraint:T,selectOverlap:T,selectAllow:T,droppable:Boolean,unselectCancel:String,slotLabelFormat:T,slotLaneClassNames:T,slotLaneContent:T,slotLaneDidMount:T,slotLaneWillUnmount:T,slotLabelClassNames:T,slotLabelContent:T,slotLabelDidMount:T,slotLabelWillUnmount:T,dayMaxEvents:T,dayMaxEventRows:T,dayMinWidth:Number,slotLabelInterval:j,allDayText:String,allDayClassNames:T,allDayContent:T,allDayDidMount:T,allDayWillUnmount:T,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:X,rerenderDelay:Number,moreLinkText:T,moreLinkHint:T,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:T,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:j,hiddenDays:T,fixedWeekCount:Boolean,validRange:T,visibleRange:T,titleFormat:T,eventInteractive:Boolean,noEventsText:String,viewHint:T,navLinkHint:T,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:T,moreLinkClassNames:T,moreLinkContent:T,moreLinkDidMount:T,moreLinkWillUnmount:T,monthStartFormat:X,handleCustomRendering:T,customRenderingMetaMap:T,customRenderingReplaces:Boolean},en={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" – ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",dayHeaders:!0,initialView:"",aspectRatio:1.35,headerToolbar:{start:"title",center:"",end:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,nowIndicator:!1,scrollTime:"06:00:00",scrollTimeReset:!0,slotMinTime:"00:00:00",slotMaxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30,monthStartFormat:{month:"long",day:"numeric"}},ra={datesSet:T,eventsSet:T,eventAdd:T,eventChange:T,eventRemove:T,windowResize:T,eventClick:T,eventMouseEnter:T,eventMouseLeave:T,select:T,unselect:T,loading:T,_unmount:T,_beforeprint:T,_afterprint:T,_noEventDrop:T,_noEventResize:T,_resize:T,_scrollRequest:T},ia={buttonText:T,buttonHints:T,views:T,plugins:T,initialEvents:T,events:T,eventSources:T},lt={headerToolbar:ct,footerToolbar:ct,buttonText:ct,buttonHints:ct,buttonIcons:ct,dateIncrement:ct,plugins:Dn,events:Dn,eventSources:Dn,resources:Dn};function ct(t,e){return typeof t=="object"&&typeof e=="object"&&t&&e?Fe(t,e):t===e}function Dn(t,e){return Array.isArray(t)&&Array.isArray(e)?nt(t,e):t===e}const Iy={type:String,component:T,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:T,usesMinMaxTime:Boolean,classNames:T,content:T,didMount:T,willUnmount:T};function zr(t){return Zi(t,lt)}function Qi(t,e){let n={},r={};for(let i in e)i in t&&(n[i]=e[i](t[i]));for(let i in t)i in e||(r[i]=t[i]);return{refined:n,extra:r}}function T(t){return t}const{hasOwnProperty:nr}=Object.prototype;function Zi(t,e){let n={};if(e){for(let r in e)if(e[r]===ct){let i=[];for(let s=t.length-1;s>=0;s-=1){let o=t[s][r];if(typeof o=="object"&&o)i.unshift(o);else if(o!==void 0){n[r]=o;break}}i.length&&(n[r]=Zi(i))}}for(let r=t.length-1;r>=0;r-=1){let i=t[r];for(let s in i)s in n||(n[s]=i[s])}return n}function Ft(t,e){let n={};for(let r in t)e(t[r],r)&&(n[r]=t[r]);return n}function Tt(t,e){let n={};for(let r in t)n[r]=e(t[r],r);return n}function yc(t){let e={};for(let n of t)e[n]=!0;return e}function Xi(t){let e=[];for(let n in t)e.push(t[n]);return e}function Fe(t,e){if(t===e)return!0;for(let n in t)if(nr.call(t,n)&&!(n in e))return!1;for(let n in e)if(nr.call(e,n)&&t[n]!==e[n])return!1;return!0}const Sy=/^on[A-Z]/;function Dy(t,e){const n=vi(t,e);for(let r of n)if(!Sy.test(r))return!1;return!0}function vi(t,e){let n=[];for(let r in t)nr.call(t,r)&&(r in e||n.push(r));for(let r in e)nr.call(e,r)&&t[r]!==e[r]&&n.push(r);return n}function Wr(t,e,n={}){if(t===e)return!0;for(let r in e)if(!(r in t&&wy(t[r],e[r],n[r])))return!1;for(let r in t)if(!(r in e))return!1;return!0}function wy(t,e,n){return t===e||n===!0?!0:n?n(t,e):!1}function Cy(t,e=0,n,r=1){let i=[];n==null&&(n=Object.keys(t).length);for(let s=e;s<n;s+=r){let o=t[s];o!==void 0&&i.push(o)}return i}let vc={};function Oy(t,e){vc[t]=e}function My(t){return new vc[t]}class Ny{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return Ee(e)}markerToArray(e){return Ke(e)}}Oy("gregory",Ny);const xy=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function Py(t){let e=xy.exec(t);if(e){let n=new Date(Date.UTC(Number(e[1]),e[3]?Number(e[3])-1:0,Number(e[5]||1),Number(e[7]||0),Number(e[8]||0),Number(e[10]||0),e[12]?+`0.${e[12]}`*1e3:0));if(mc(n)){let r=null;return e[13]&&(r=(e[15]==="-"?-1:1)*(Number(e[16]||0)*60+Number(e[18]||0))),{marker:n,isTimeUnspecified:!e[6],timeZoneOffset:r}}}return null}class Ly{constructor(e){let n=this.timeZone=e.timeZone,r=n!=="local"&&n!=="UTC";e.namedTimeZoneImpl&&r&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(n)),this.canComputeOffset=!!(!r||this.namedTimeZoneImpl),this.calendarSystem=My(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,e.weekNumberCalculation==="ISO"&&(this.weekDow=1,this.weekDoy=4),typeof e.firstDay=="number"&&(this.weekDow=e.firstDay),typeof e.weekNumberCalculation=="function"&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=e.weekText!=null?e.weekText:e.locale.options.weekText,this.weekTextLong=(e.weekTextLong!=null?e.weekTextLong:e.locale.options.weekTextLong)||this.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}createMarker(e){let n=this.createMarkerMeta(e);return n===null?null:n.marker}createNowMarker(){return this.canComputeOffset?this.timestampToMarker(new Date().valueOf()):Ee(Xo(new Date))}createMarkerMeta(e){if(typeof e=="string")return this.parse(e);let n=null;return typeof e=="number"?n=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(n=this.timestampToMarker(e))):Array.isArray(e)&&(n=Ee(e)),n===null||!mc(n)?null:{marker:n,isTimeUnspecified:!1,forcedTzo:null}}parse(e){let n=Py(e);if(n===null)return null;let{marker:r}=n,i=null;return n.timeZoneOffset!==null&&(this.canComputeOffset?r=this.timestampToMarker(r.valueOf()-n.timeZoneOffset*60*1e3):i=n.timeZoneOffset),{marker:r,isTimeUnspecified:n.isTimeUnspecified,forcedTzo:i}}getYear(e){return this.calendarSystem.getMarkerYear(e)}getMonth(e){return this.calendarSystem.getMarkerMonth(e)}getDay(e){return this.calendarSystem.getMarkerDay(e)}add(e,n){let r=this.calendarSystem.markerToArray(e);return r[0]+=n.years,r[1]+=n.months,r[2]+=n.days,r[6]+=n.milliseconds,this.calendarSystem.arrayToMarker(r)}subtract(e,n){let r=this.calendarSystem.markerToArray(e);return r[0]-=n.years,r[1]-=n.months,r[2]-=n.days,r[6]-=n.milliseconds,this.calendarSystem.arrayToMarker(r)}addYears(e,n){let r=this.calendarSystem.markerToArray(e);return r[0]+=n,this.calendarSystem.arrayToMarker(r)}addMonths(e,n){let r=this.calendarSystem.markerToArray(e);return r[1]+=n,this.calendarSystem.arrayToMarker(r)}diffWholeYears(e,n){let{calendarSystem:r}=this;return Je(e)===Je(n)&&r.getMarkerDay(e)===r.getMarkerDay(n)&&r.getMarkerMonth(e)===r.getMarkerMonth(n)?r.getMarkerYear(n)-r.getMarkerYear(e):null}diffWholeMonths(e,n){let{calendarSystem:r}=this;return Je(e)===Je(n)&&r.getMarkerDay(e)===r.getMarkerDay(n)?r.getMarkerMonth(n)-r.getMarkerMonth(e)+(r.getMarkerYear(n)-r.getMarkerYear(e))*12:null}greatestWholeUnit(e,n){let r=this.diffWholeYears(e,n);return r!==null?{unit:"year",value:r}:(r=this.diffWholeMonths(e,n),r!==null?{unit:"month",value:r}:(r=ny(e,n),r!==null?{unit:"week",value:r}:(r=Jn(e,n),r!==null?{unit:"day",value:r}:(r=KE(e,n),Un(r)?{unit:"hour",value:r}:(r=JE(e,n),Un(r)?{unit:"minute",value:r}:(r=ey(e,n),Un(r)?{unit:"second",value:r}:{unit:"millisecond",value:n.valueOf()-e.valueOf()}))))))}countDurationsBetween(e,n,r){let i;return r.years&&(i=this.diffWholeYears(e,n),i!==null)?i/YE(r):r.months&&(i=this.diffWholeMonths(e,n),i!==null)?i/QE(r):r.days&&(i=Jn(e,n),i!==null)?i/Pt(r):(n.valueOf()-e.valueOf())/Me(r)}startOf(e,n){return n==="year"?this.startOfYear(e):n==="month"?this.startOfMonth(e):n==="week"?this.startOfWeek(e):n==="day"?Q(e):n==="hour"?ry(e):n==="minute"?iy(e):n==="second"?sy(e):null}startOfYear(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])}startOfMonth(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])}startOfWeek(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):oy(e,this.weekDow,this.weekDoy)}format(e,n,r={}){return n.format({marker:e,timeZoneOffset:r.forcedTzo!=null?r.forcedTzo:this.offsetForMarker(e)},this)}formatRange(e,n,r,i={}){return i.isEndExclusive&&(n=rt(n,-1)),r.formatRange({marker:e,timeZoneOffset:i.forcedStartTzo!=null?i.forcedStartTzo:this.offsetForMarker(e)},{marker:n,timeZoneOffset:i.forcedEndTzo!=null?i.forcedEndTzo:this.offsetForMarker(n)},this,i.defaultSeparator)}formatIso(e,n={}){let r=null;return n.omitTimeZoneOffset||(n.forcedTzo!=null?r=n.forcedTzo:r=this.offsetForMarker(e)),Ec(e,r,n.omitTime)}timestampToMarker(e){return this.timeZone==="local"?Ee(Xo(new Date(e))):this.timeZone==="UTC"||!this.namedTimeZoneImpl?new Date(e):Ee(this.namedTimeZoneImpl.timestampToArray(e))}offsetForMarker(e){return this.timeZone==="local"?-Ko(Ke(e)).getTimezoneOffset():this.timeZone==="UTC"?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(Ke(e)):null}toDate(e,n){return this.timeZone==="local"?Ko(Ke(e)):this.timeZone==="UTC"?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-this.namedTimeZoneImpl.offsetForArray(Ke(e))*1e3*60):new Date(e.valueOf()-(n||0))}}class hn{constructor(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}setIconOverride(e){let n,r;if(typeof e=="object"&&e){n=Object.assign({},this.iconClasses);for(r in e)n[r]=this.applyIconOverridePrefix(e[r]);this.iconClasses=n}else e===!1&&(this.iconClasses={})}applyIconOverridePrefix(e){let n=this.iconOverridePrefix;return n&&e.indexOf(n)!==0&&(e=n+e),e}getClass(e){return this.classes[e]||""}getIconClass(e,n){let r;return n&&this.rtlIconClasses?r=this.rtlIconClasses[e]||this.iconClasses[e]:r=this.iconClasses[e],r?`${this.baseIconClass} ${r}`:""}getCustomButtonIconClass(e){let n;return this.iconOverrideCustomButtonOption&&(n=e[this.iconOverrideCustomButtonOption],n)?`${this.baseIconClass} ${this.applyIconOverridePrefix(n)}`:""}}hn.prototype.classes={};hn.prototype.iconClasses={};hn.prototype.baseIconClass="";hn.prototype.iconOverridePrefix="";function rr(t){t();let e=F.debounceRendering,n=[];function r(i){n.push(i)}for(F.debounceRendering=r,on(E(ky,{}),document.createElement("div"));n.length;)n.shift()();F.debounceRendering=e}class ky extends be{render(){return E("div",{})}componentDidMount(){this.setState({})}}function _c(t){let e=dE(t),n=e.Provider;return e.Provider=function(){let r=!this.getChildContext,i=n.apply(this,arguments);if(r){let s=[];this.shouldComponentUpdate=o=>{this.props.value!==o.value&&s.forEach(a=>{a.context=o.value,a.forceUpdate()})},this.sub=o=>{s.push(o);let a=o.componentWillUnmount;o.componentWillUnmount=()=>{s.splice(s.indexOf(o),1),a&&a.call(o)}}}return i},e}class By{constructor(e,n,r,i){this.execFunc=e,this.emitter=n,this.scrollTime=r,this.scrollTimeReset=i,this.handleScrollRequest=s=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},s),this.drain()},n.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}detach(){this.emitter.off("_scrollRequest",this.handleScrollRequest)}update(e){e&&this.scrollTimeReset?this.fireInitialScroll():this.drain()}fireInitialScroll(){this.handleScrollRequest({time:this.scrollTime})}drain(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)}}const Ye=_c({});function Fy(t,e,n,r,i,s,o,a,l,d,c,u,p){return{dateEnv:i,options:n,pluginHooks:o,emitter:d,dispatch:a,getCurrentData:l,calendarApi:c,viewSpec:t,viewApi:e,dateProfileGenerator:r,theme:s,isRtl:n.direction==="rtl",addResizeHandler(f){d.on("_resize",f)},removeResizeHandler(f){d.off("_resize",f)},createScrollResponder(f){return new By(f,d,j(n.scrollTime),n.scrollTimeReset)},registerInteractiveComponent:u,unregisterInteractiveComponent:p}}class St extends be{shouldComponentUpdate(e,n){return this.debug&&console.log(vi(e,this.props),vi(n,this.state)),!Wr(this.props,e,this.propEquality)||!Wr(this.state,n,this.stateEquality)}safeSetState(e){Wr(this.state,Object.assign(Object.assign({},this.state),e),this.stateEquality)||this.setState(e)}}St.addPropsEquality=Gy;St.addStateEquality=Uy;St.contextType=Ye;St.prototype.propEquality={};St.prototype.stateEquality={};class q extends St{}q.contextType=Ye;function Gy(t){let e=Object.create(this.prototype.propEquality);Object.assign(e,t),this.prototype.propEquality=e}function Uy(t){let e=Object.create(this.prototype.stateEquality);Object.assign(e,t),this.prototype.stateEquality=e}function qe(t,e){typeof t=="function"?t(e):t&&(t.current=e)}class Ki extends q{constructor(){super(...arguments),this.id=It(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{const{options:n}=this.context,{generatorName:r}=this.props;(!n.customRenderingReplaces||!_i(r,n))&&this.updateElRef(e)},this.updateElRef=e=>{this.props.elRef&&qe(this.props.elRef,e)}}render(){const{props:e,context:n}=this,{options:r}=n,{customGenerator:i,defaultGenerator:s,renderProps:o}=e,a=bc(e,[],this.handleEl);let l=!1,d,c=[],u;if(i!=null){const p=typeof i=="function"?i(o,E):i;if(p===!0)l=!0;else{const f=p&&typeof p=="object";f&&"html"in p?a.dangerouslySetInnerHTML={__html:p.html}:f&&"domNodes"in p?c=Array.prototype.slice.call(p.domNodes):(f?ql(p):typeof p!="function")?d=p:u=p}}else l=!_i(e.generatorName,r);return l&&s&&(d=s(o)),this.queuedDomNodes=c,this.currentGeneratorMeta=u,E(e.elTag,a,d)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(e){var n;const{props:r,context:i}=this,{handleCustomRendering:s,customRenderingMetaMap:o}=i.options;if(s){const a=(n=this.currentGeneratorMeta)!==null&&n!==void 0?n:o==null?void 0:o[r.generatorName];a&&s(Object.assign(Object.assign({id:this.id,isActive:e,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:a},r),{elClasses:(r.elClasses||[]).filter(Hy)}))}}applyQueueudDomNodes(){const{queuedDomNodes:e,currentDomNodes:n}=this,r=this.base;if(!nt(e,n)){n.forEach(OE);for(let i of e)r.appendChild(i);this.currentDomNodes=e}}}Ki.addPropsEquality({elClasses:nt,elStyle:Fe,elAttrs:Dy,renderProps:Fe});function _i(t,e){var n;return!!(e.handleCustomRendering&&t&&(!((n=e.customRenderingMetaMap)===null||n===void 0)&&n[t]))}function bc(t,e,n){const r=Object.assign(Object.assign({},t.elAttrs),{ref:n});return(t.elClasses||e)&&(r.className=(t.elClasses||[]).concat(e||[]).concat(r.className||[]).filter(Boolean).join(" ")),t.elStyle&&(r.style=t.elStyle),r}function Hy(t){return!!t}const Tc=_c(0);class ce extends be{constructor(){super(...arguments),this.InnerContent=Vy.bind(void 0,this),this.handleEl=e=>{this.el=e,this.props.elRef&&(qe(this.props.elRef,e),e&&this.didMountMisfire&&this.componentDidMount())}}render(){const{props:e}=this,n=zy(e.classNameGenerator,e.renderProps);if(e.children){const r=bc(e,n,this.handleEl),i=e.children(this.InnerContent,e.renderProps,r);return e.elTag?E(e.elTag,r,i):i}else return E(Ki,Object.assign(Object.assign({},e),{elRef:this.handleEl,elTag:e.elTag||"div",elClasses:(e.elClasses||[]).concat(n),renderId:this.context}))}componentDidMount(){var e,n;this.el?(n=(e=this.props).didMount)===null||n===void 0||n.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el})):this.didMountMisfire=!0}componentWillUnmount(){var e,n;(n=(e=this.props).willUnmount)===null||n===void 0||n.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el}))}}ce.contextType=Tc;function Vy(t,e){const n=t.props;return E(Ki,Object.assign({renderProps:n.renderProps,generatorName:n.generatorName,customGenerator:n.customGenerator,defaultGenerator:n.defaultGenerator,renderId:t.context},e))}function zy(t,e){const n=typeof t=="function"?t(e):t||[];return typeof n=="string"?[n]:n}class an extends q{render(){let{props:e,context:n}=this,{options:r}=n,i={view:n.viewApi};return E(ce,Object.assign({},e,{elTag:e.elTag||"div",elClasses:[...Rc(e.viewSpec),...e.elClasses||[]],renderProps:i,classNameGenerator:r.viewClassNames,generatorName:void 0,didMount:r.viewDidMount,willUnmount:r.viewWillUnmount}),()=>e.children)}}function Rc(t){return[`fc-${t.type}-view`,"fc-view"]}function Wy(t,e){let n=null,r=null;return t.start&&(n=e.createMarker(t.start)),t.end&&(r=e.createMarker(t.end)),!n&&!r||n&&r&&r<n?null:{start:n,end:r}}function sa(t,e){let n=[],{start:r}=e,i,s;for(t.sort(jy),i=0;i<t.length;i+=1)s=t[i],s.start>r&&n.push({start:r,end:s.start}),s.end>r&&(r=s.end);return r<e.end&&n.push({start:r,end:e.end}),n}function jy(t,e){return t.start.valueOf()-e.start.valueOf()}function it(t,e){let{start:n,end:r}=t,i=null;return e.start!==null&&(n===null?n=e.start:n=new Date(Math.max(n.valueOf(),e.start.valueOf()))),e.end!=null&&(r===null?r=e.end:r=new Date(Math.min(r.valueOf(),e.end.valueOf()))),(n===null||r===null||n<r)&&(i={start:n,end:r}),i}function qy(t,e){return(t.end===null||e.start===null||t.end>e.start)&&(t.start===null||e.end===null||t.start<e.end)}function Ve(t,e){return(t.start===null||e>=t.start)&&(t.end===null||e<t.end)}function $y(t,e){return e.start!=null&&t<e.start?e.start:e.end!=null&&t>=e.end?new Date(e.end.valueOf()-1):t}function Ac(t){let e=Math.floor(st(t.start,t.end))||1,n=Q(t.start),r=oe(n,e);return{start:n,end:r}}function Ji(t,e=j(0)){let n=null,r=null;if(t.end){r=Q(t.end);let i=t.end.valueOf()-r.valueOf();i&&i>=Me(e)&&(r=oe(r,1))}return t.start&&(n=Q(t.start),r&&r<=n&&(r=oe(n,1))),{start:n,end:r}}function Yy(t){let e=Ji(t);return st(e.start,e.end)>1}function wn(t,e,n,r){return r==="year"?j(n.diffWholeYears(t,e),"year"):r==="month"?j(n.diffWholeMonths(t,e),"month"):ty(t,e)}function Qy(t,e){switch(e.type){case"CHANGE_DATE":return e.dateMarker;default:return t}}function Zy(t,e){let n=t.initialDate;return n!=null?e.createMarker(n):pn(t.now,e)}function pn(t,e){return typeof t=="function"&&(t=t()),t==null?e.createNowMarker():e.createMarker(t)}class Ic{constructor(e){this.props=e,this.nowDate=pn(e.nowInput,e.dateEnv),this.initHiddenDays()}buildPrev(e,n,r){let{dateEnv:i}=this.props,s=i.subtract(i.startOf(n,e.currentRangeUnit),e.dateIncrement);return this.build(s,-1,r)}buildNext(e,n,r){let{dateEnv:i}=this.props,s=i.add(i.startOf(n,e.currentRangeUnit),e.dateIncrement);return this.build(s,1,r)}build(e,n,r=!0){let{props:i}=this,s,o,a,l,d,c;return s=this.buildValidRange(),s=this.trimHiddenDays(s),r&&(e=$y(e,s)),o=this.buildCurrentRangeInfo(e,n),a=/^(year|month|week|day)$/.test(o.unit),l=this.buildRenderRange(this.trimHiddenDays(o.range),o.unit,a),l=this.trimHiddenDays(l),d=l,i.showNonCurrentDates||(d=it(d,o.range)),d=this.adjustActiveRange(d),d=it(d,s),c=qy(o.range,s),Ve(l,e)||(e=l.start),{currentDate:e,validRange:s,currentRange:o.range,currentRangeUnit:o.unit,isRangeAllDay:a,activeRange:d,renderRange:l,slotMinTime:i.slotMinTime,slotMaxTime:i.slotMaxTime,isValid:c,dateIncrement:this.buildDateIncrement(o.duration)}}buildValidRange(){let e=this.props.validRangeInput,n=typeof e=="function"?e.call(this.props.calendarApi,this.nowDate):e;return this.refineRange(n)||{start:null,end:null}}buildCurrentRangeInfo(e,n){let{props:r}=this,i=null,s=null,o=null,a;return r.duration?(i=r.duration,s=r.durationUnit,o=this.buildRangeFromDuration(e,n,i,s)):(a=this.props.dayCount)?(s="day",o=this.buildRangeFromDayCount(e,n,a)):(o=this.buildCustomVisibleRange(e))?s=r.dateEnv.greatestWholeUnit(o.start,o.end).unit:(i=this.getFallbackDuration(),s=yi(i).unit,o=this.buildRangeFromDuration(e,n,i,s)),{duration:i,unit:s,range:o}}getFallbackDuration(){return j({day:1})}adjustActiveRange(e){let{dateEnv:n,usesMinMaxTime:r,slotMinTime:i,slotMaxTime:s}=this.props,{start:o,end:a}=e;return r&&(Pt(i)<0&&(o=Q(o),o=n.add(o,i)),Pt(s)>1&&(a=Q(a),a=oe(a,-1),a=n.add(a,s))),{start:o,end:a}}buildRangeFromDuration(e,n,r,i){let{dateEnv:s,dateAlignment:o}=this.props,a,l,d;if(!o){let{dateIncrement:u}=this.props;u&&Me(u)<Me(r)?o=yi(u).unit:o=i}Pt(r)<=1&&this.isHiddenDay(a)&&(a=this.skipHiddenDays(a,n),a=Q(a));function c(){a=s.startOf(e,o),l=s.add(a,r),d={start:a,end:l}}return c(),this.trimHiddenDays(d)||(e=this.skipHiddenDays(e,n),c()),d}buildRangeFromDayCount(e,n,r){let{dateEnv:i,dateAlignment:s}=this.props,o=0,a=e,l;s&&(a=i.startOf(a,s)),a=Q(a),a=this.skipHiddenDays(a,n),l=a;do l=oe(l,1),this.isHiddenDay(l)||(o+=1);while(o<r);return{start:a,end:l}}buildCustomVisibleRange(e){let{props:n}=this,r=n.visibleRangeInput,i=typeof r=="function"?r.call(n.calendarApi,n.dateEnv.toDate(e)):r,s=this.refineRange(i);return s&&(s.start==null||s.end==null)?null:s}buildRenderRange(e,n,r){return e}buildDateIncrement(e){let{dateIncrement:n}=this.props,r;return n||((r=this.props.dateAlignment)?j(1,r):e||j({days:1}))}refineRange(e){if(e){let n=Wy(e,this.props.dateEnv);return n&&(n=Ji(n)),n}return null}initHiddenDays(){let e=this.props.hiddenDays||[],n=[],r=0,i;for(this.props.weekends===!1&&e.push(0,6),i=0;i<7;i+=1)(n[i]=e.indexOf(i)!==-1)||(r+=1);if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n}trimHiddenDays(e){let{start:n,end:r}=e;return n&&(n=this.skipHiddenDays(n)),r&&(r=this.skipHiddenDays(r,-1,!0)),n==null||r==null||n<r?{start:n,end:r}:null}isHiddenDay(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]}skipHiddenDays(e,n=1,r=!1){for(;this.isHiddenDayHash[(e.getUTCDay()+(r?n:0)+7)%7];)e=oe(e,n);return e}}function es(t,e,n,r){return{instanceId:It(),defId:t,range:e,forcedStartTzo:n??null,forcedEndTzo:r??null}}function Xy(t,e,n,r){for(let i=0;i<r.length;i+=1){let s=r[i].parse(t,n);if(s){let{allDay:o}=t;return o==null&&(o=e,o==null&&(o=s.allDayGuess,o==null&&(o=!1))),{allDay:o,duration:s.duration,typeData:s.typeData,typeId:i}}}return null}function gn(t,e,n){let{dateEnv:r,pluginHooks:i,options:s}=n,{defs:o,instances:a}=t;a=Ft(a,l=>!o[l.defId].recurringDef);for(let l in o){let d=o[l];if(d.recurringDef){let{duration:c}=d.recurringDef;c||(c=d.allDay?s.defaultAllDayEventDuration:s.defaultTimedEventDuration);let u=Ky(d,c,e,r,i.recurringTypes);for(let p of u){let f=es(l,{start:p,end:r.add(p,c)});a[f.instanceId]=f}}}return{defs:o,instances:a}}function Ky(t,e,n,r,i){let o=i[t.recurringDef.typeId].expand(t.recurringDef.typeData,{start:r.subtract(n.start,e),end:n.end},r);return t.allDay&&(o=o.map(Q)),o}const Vn={id:String,groupId:String,title:String,url:String,interactive:Boolean},Sc={start:T,end:T,date:T,allDay:Boolean},Jy=Object.assign(Object.assign(Object.assign({},Vn),Sc),{extendedProps:T});function Dc(t,e,n,r,i=ts(n),s,o){let{refined:a,extra:l}=wc(t,n,i),d=tv(e,n),c=Xy(a,d,n.dateEnv,n.pluginHooks.recurringTypes);if(c){let p=bi(a,l,e?e.sourceId:"",c.allDay,!!c.duration,n,s);return p.recurringDef={typeId:c.typeId,typeData:c.typeData,duration:c.duration},{def:p,instance:null}}let u=ev(a,d,n,r);if(u){let p=bi(a,l,e?e.sourceId:"",u.allDay,u.hasEnd,n,s),f=es(p.defId,u.range,u.forcedStartTzo,u.forcedEndTzo);return o&&p.publicId&&o[p.publicId]&&(f.instanceId=o[p.publicId]),{def:p,instance:f}}return null}function wc(t,e,n=ts(e)){return Qi(t,n)}function ts(t){return Object.assign(Object.assign(Object.assign({},ir),Jy),t.pluginHooks.eventRefiners)}function bi(t,e,n,r,i,s,o){let a={title:t.title||"",groupId:t.groupId||"",publicId:t.id||"",url:t.url||"",recurringDef:null,defId:(o&&t.id?o[t.id]:"")||It(),sourceId:n,allDay:r,hasEnd:i,interactive:t.interactive,ui:sr(t,s),extendedProps:Object.assign(Object.assign({},t.extendedProps||{}),e)};for(let l of s.pluginHooks.eventDefMemberAdders)Object.assign(a,l(t));return Object.freeze(a.ui.classNames),Object.freeze(a.extendedProps),a}function ev(t,e,n,r){let{allDay:i}=t,s,o=null,a=!1,l,d=null,c=t.start!=null?t.start:t.date;if(s=n.dateEnv.createMarkerMeta(c),s)o=s.marker;else if(!r)return null;return t.end!=null&&(l=n.dateEnv.createMarkerMeta(t.end)),i==null&&(e!=null?i=e:i=(!s||s.isTimeUnspecified)&&(!l||l.isTimeUnspecified)),i&&o&&(o=Q(o)),l&&(d=l.marker,i&&(d=Q(d)),o&&d<=o&&(d=null)),d?a=!0:r||(a=n.options.forceEventDuration||!1,d=n.dateEnv.add(o,i?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:i,hasEnd:a,range:{start:o,end:d},forcedStartTzo:s?s.forcedTzo:null,forcedEndTzo:l?l.forcedTzo:null}}function tv(t,e){let n=null;return t&&(n=t.defaultAllDay),n==null&&(n=e.options.defaultAllDay),n}function ln(t,e,n,r,i,s){let o=$e(),a=ts(n);for(let l of t){let d=Dc(l,e,n,r,a,i,s);d&&Ti(d,o)}return o}function Ti(t,e=$e()){return e.defs[t.def.defId]=t.def,t.instance&&(e.instances[t.instance.instanceId]=t.instance),e}function nv(t,e){let n=t.instances[e];if(n){let r=t.defs[n.defId],i=rs(t,s=>rv(r,s));return i.defs[r.defId]=r,i.instances[n.instanceId]=n,i}return $e()}function rv(t,e){return!!(t.groupId&&t.groupId===e.groupId)}function $e(){return{defs:{},instances:{}}}function ns(t,e){return{defs:Object.assign(Object.assign({},t.defs),e.defs),instances:Object.assign(Object.assign({},t.instances),e.instances)}}function rs(t,e){let n=Ft(t.defs,e),r=Ft(t.instances,i=>n[i.defId]);return{defs:n,instances:r}}function iv(t,e){let{defs:n,instances:r}=t,i={},s={};for(let o in n)e.defs[o]||(i[o]=n[o]);for(let o in r)!e.instances[o]&&i[r[o].defId]&&(s[o]=r[o]);return{defs:i,instances:s}}function sv(t,e){return Array.isArray(t)?ln(t,null,e,!0):typeof t=="object"&&t?ln([t],null,e,!0):t!=null?String(t):null}function oa(t){return Array.isArray(t)?t:typeof t=="string"?t.split(/\s+/):[]}const ir={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:T,overlap:T,allow:T,className:oa,classNames:oa,color:String,backgroundColor:String,borderColor:String,textColor:String},ov={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function sr(t,e){let n=sv(t.constraint,e);return{display:t.display||null,startEditable:t.startEditable!=null?t.startEditable:t.editable,durationEditable:t.durationEditable!=null?t.durationEditable:t.editable,constraints:n!=null?[n]:[],overlap:t.overlap!=null?t.overlap:null,allows:t.allow!=null?[t.allow]:[],backgroundColor:t.backgroundColor||t.color||"",borderColor:t.borderColor||t.color||"",textColor:t.textColor||"",classNames:(t.className||[]).concat(t.classNames||[])}}function Cc(t){return t.reduce(av,ov)}function av(t,e){return{display:e.display!=null?e.display:t.display,startEditable:e.startEditable!=null?e.startEditable:t.startEditable,durationEditable:e.durationEditable!=null?e.durationEditable:t.durationEditable,constraints:t.constraints.concat(e.constraints),overlap:typeof e.overlap=="boolean"?e.overlap:t.overlap,allows:t.allows.concat(e.allows),backgroundColor:e.backgroundColor||t.backgroundColor,borderColor:e.borderColor||t.borderColor,textColor:e.textColor||t.textColor,classNames:t.classNames.concat(e.classNames)}}const lv={id:String,defaultAllDay:Boolean,url:String,format:String,events:T,eventDataTransform:T,success:T,failure:T};function Oc(t,e,n=Mc(e)){let r;if(typeof t=="string"?r={url:t}:typeof t=="function"||Array.isArray(t)?r={events:t}:typeof t=="object"&&t&&(r=t),r){let{refined:i,extra:s}=Qi(r,n),o=cv(i,e);if(o)return{_raw:t,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||"",sourceId:It(),sourceDefId:o.sourceDefId,meta:o.meta,ui:sr(i,e),extendedProps:s}}return null}function Mc(t){return Object.assign(Object.assign(Object.assign({},ir),lv),t.pluginHooks.eventSourceRefiners)}function cv(t,e){let n=e.pluginHooks.eventSourceDefs;for(let r=n.length-1;r>=0;r-=1){let s=n[r].parseMeta(t);if(s)return{sourceDefId:r,meta:s}}return null}function dv(t,e,n,r,i){switch(e.type){case"RECEIVE_EVENTS":return uv(t,n[e.sourceId],e.fetchId,e.fetchRange,e.rawEvents,i);case"RESET_RAW_EVENTS":return fv(t,n[e.sourceId],e.rawEvents,r.activeRange,i);case"ADD_EVENTS":return hv(t,e.eventStore,r?r.activeRange:null,i);case"RESET_EVENTS":return e.eventStore;case"MERGE_EVENTS":return ns(t,e.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?gn(t,r.activeRange,i):t;case"REMOVE_EVENTS":return iv(t,e.eventStore);case"REMOVE_EVENT_SOURCE":return xc(t,e.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return rs(t,s=>!s.sourceId);case"REMOVE_ALL_EVENTS":return $e();default:return t}}function uv(t,e,n,r,i,s){if(e&&n===e.latestFetchId){let o=ln(Nc(i,e,s),e,s);return r&&(o=gn(o,r,s)),ns(xc(t,e.sourceId),o)}return t}function fv(t,e,n,r,i){const{defIdMap:s,instanceIdMap:o}=pv(t);let a=ln(Nc(n,e,i),e,i,!1,s,o);return gn(a,r,i)}function Nc(t,e,n){let r=n.options.eventDataTransform,i=e?e.eventDataTransform:null;return i&&(t=aa(t,i)),r&&(t=aa(t,r)),t}function aa(t,e){let n;if(!e)n=t;else{n=[];for(let r of t){let i=e(r);i?n.push(i):i==null&&n.push(r)}}return n}function hv(t,e,n,r){return n&&(e=gn(e,n,r)),ns(t,e)}function la(t,e,n){let{defs:r}=t,i=Tt(t.instances,s=>r[s.defId].allDay?s:Object.assign(Object.assign({},s),{range:{start:n.createMarker(e.toDate(s.range.start,s.forcedStartTzo)),end:n.createMarker(e.toDate(s.range.end,s.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:s.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:s.forcedEndTzo}));return{defs:r,instances:i}}function xc(t,e){return rs(t,n=>n.sourceId!==e)}function pv(t){const{defs:e,instances:n}=t,r={},i={};for(let s in e){const o=e[s],{publicId:a}=o;a&&(r[a]=s)}for(let s in n){const o=n[s],a=e[o.defId],{publicId:l}=a;l&&(i[l]=s)}return{defIdMap:r,instanceIdMap:i}}class gv{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,n){mv(this.handlers,e,n)}off(e,n){Ev(this.handlers,e,n)}trigger(e,...n){let r=this.handlers[e]||[],i=this.options&&this.options[e],s=[].concat(i||[],r);for(let o of s)o.apply(this.thisContext,n)}hasHandlers(e){return!!(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])}}function mv(t,e,n){(t[e]||(t[e]=[])).push(n)}function Ev(t,e,n){n?t[e]&&(t[e]=t[e].filter(r=>r!==n)):delete t[e]}const yv={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function vv(t,e){return ln(_v(t),null,e)}function _v(t){let e;return t===!0?e=[{}]:Array.isArray(t)?e=t.filter(n=>n.daysOfWeek):typeof t=="object"&&t?e=[t]:e=[],e=e.map(n=>Object.assign(Object.assign({},yv),n)),e}function bv(t,e,n){n.emitter.trigger("select",Object.assign(Object.assign({},Rv(t,n)),{jsEvent:null,view:n.viewApi||n.calendarApi.view}))}function Tv(t,e){e.emitter.trigger("unselect",{jsEvent:t?t.origEvent:null,view:e.viewApi||e.calendarApi.view})}function Rv(t,e){let n={};for(let r of e.pluginHooks.dateSpanTransforms)Object.assign(n,r(t,e));return Object.assign(n,kv(t,e.dateEnv)),n}function ca(t,e,n){let{dateEnv:r,options:i}=n,s=e;return t?(s=Q(s),s=r.add(s,i.defaultAllDayEventDuration)):s=r.add(s,i.defaultTimedEventDuration),s}function Av(t,e,n,r){let i=Lc(t.defs,e),s=$e();for(let o in t.defs){let a=t.defs[o];s.defs[o]=Iv(a,i[o],n,r)}for(let o in t.instances){let a=t.instances[o],l=s.defs[a.defId];s.instances[o]=Sv(a,l,i[a.defId],n,r)}return s}function Iv(t,e,n,r){let i=n.standardProps||{};i.hasEnd==null&&e.durationEditable&&(n.startDelta||n.endDelta)&&(i.hasEnd=!0);let s=Object.assign(Object.assign(Object.assign({},t),i),{ui:Object.assign(Object.assign({},t.ui),i.ui)});n.extendedProps&&(s.extendedProps=Object.assign(Object.assign({},s.extendedProps),n.extendedProps));for(let o of r.pluginHooks.eventDefMutationAppliers)o(s,n,r);return!s.hasEnd&&r.options.forceEventDuration&&(s.hasEnd=!0),s}function Sv(t,e,n,r,i){let{dateEnv:s}=i,o=r.standardProps&&r.standardProps.allDay===!0,a=r.standardProps&&r.standardProps.hasEnd===!1,l=Object.assign({},t);return o&&(l.range=Ac(l.range)),r.datesDelta&&n.startEditable&&(l.range={start:s.add(l.range.start,r.datesDelta),end:s.add(l.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(l.range={start:s.add(l.range.start,r.startDelta),end:l.range.end}),r.endDelta&&n.durationEditable&&(l.range={start:l.range.start,end:s.add(l.range.end,r.endDelta)}),a&&(l.range={start:l.range.start,end:ca(e.allDay,l.range.start,i)}),e.allDay&&(l.range={start:Q(l.range.start),end:Q(l.range.end)}),l.range.end<l.range.start&&(l.range.end=ca(e.allDay,l.range.start,i)),l}class wt{constructor(e,n){this.context=e,this.internalEventSource=n}remove(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})}refetch(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})}get id(){return this.internalEventSource.publicId}get url(){return this.internalEventSource.meta.url}get format(){return this.internalEventSource.meta.format}}class Se{constructor(e,n,r){this._context=e,this._def=n,this._instance=r||null}setProp(e,n){if(e in Sc)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if(e==="id")n=Vn[e](n),this.mutate({standardProps:{publicId:n}});else if(e in Vn)n=Vn[e](n),this.mutate({standardProps:{[e]:n}});else if(e in ir){let r=ir[e](n);e==="color"?r={backgroundColor:n,borderColor:n}:e==="editable"?r={startEditable:n,durationEditable:n}:r={[e]:n},this.mutate({standardProps:{ui:r}})}else console.warn(`Could not set prop '${e}'. Use setExtendedProp instead.`)}setExtendedProp(e,n){this.mutate({extendedProps:{[e]:n}})}setStart(e,n={}){let{dateEnv:r}=this._context,i=r.createMarker(e);if(i&&this._instance){let s=this._instance.range,o=wn(s.start,i,r,n.granularity);n.maintainDuration?this.mutate({datesDelta:o}):this.mutate({startDelta:o})}}setEnd(e,n={}){let{dateEnv:r}=this._context,i;if(!(e!=null&&(i=r.createMarker(e),!i))&&this._instance)if(i){let s=wn(this._instance.range.end,i,r,n.granularity);this.mutate({endDelta:s})}else this.mutate({standardProps:{hasEnd:!1}})}setDates(e,n,r={}){let{dateEnv:i}=this._context,s={allDay:r.allDay},o=i.createMarker(e),a;if(o&&!(n!=null&&(a=i.createMarker(n),!a))&&this._instance){let l=this._instance.range;r.allDay===!0&&(l=Ac(l));let d=wn(l.start,o,i,r.granularity);if(a){let c=wn(l.end,a,i,r.granularity);jE(d,c)?this.mutate({datesDelta:d,standardProps:s}):this.mutate({startDelta:d,endDelta:c,standardProps:s})}else s.hasEnd=!1,this.mutate({datesDelta:d,standardProps:s})}}moveStart(e){let n=j(e);n&&this.mutate({startDelta:n})}moveEnd(e){let n=j(e);n&&this.mutate({endDelta:n})}moveDates(e){let n=j(e);n&&this.mutate({datesDelta:n})}setAllDay(e,n={}){let r={allDay:e},{maintainDuration:i}=n;i==null&&(i=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(r.hasEnd=i),this.mutate({standardProps:r})}formatRange(e){let{dateEnv:n}=this._context,r=this._instance,i=X(e);return this._def.hasEnd?n.formatRange(r.range.start,r.range.end,i,{forcedStartTzo:r.forcedStartTzo,forcedEndTzo:r.forcedEndTzo}):n.format(r.range.start,i,{forcedTzo:r.forcedStartTzo})}mutate(e){let n=this._instance;if(n){let r=this._def,i=this._context,{eventStore:s}=i.getCurrentData(),o=nv(s,n.instanceId);o=Av(o,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},e,i);let l=new Se(i,r,n);this._def=o.defs[r.defId],this._instance=o.instances[n.instanceId],i.dispatch({type:"MERGE_EVENTS",eventStore:o}),i.emitter.trigger("eventChange",{oldEvent:l,event:this,relatedEvents:is(o,i,n),revert(){i.dispatch({type:"RESET_EVENTS",eventStore:s})}})}}remove(){let e=this._context,n=Pc(this);e.dispatch({type:"REMOVE_EVENTS",eventStore:n}),e.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert(){e.dispatch({type:"MERGE_EVENTS",eventStore:n})}})}get source(){let{sourceId:e}=this._def;return e?new wt(this._context,this._context.getCurrentData().eventSources[e]):null}get start(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null}get end(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null}get startStr(){let e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):""}get endStr(){let e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):""}get id(){return this._def.publicId}get groupId(){return this._def.groupId}get allDay(){return this._def.allDay}get title(){return this._def.title}get url(){return this._def.url}get display(){return this._def.ui.display||"auto"}get startEditable(){return this._def.ui.startEditable}get durationEditable(){return this._def.ui.durationEditable}get constraint(){return this._def.ui.constraints[0]||null}get overlap(){return this._def.ui.overlap}get allow(){return this._def.ui.allows[0]||null}get backgroundColor(){return this._def.ui.backgroundColor}get borderColor(){return this._def.ui.borderColor}get textColor(){return this._def.ui.textColor}get classNames(){return this._def.ui.classNames}get extendedProps(){return this._def.extendedProps}toPlainObject(e={}){let n=this._def,{ui:r}=n,{startStr:i,endStr:s}=this,o={allDay:n.allDay};return n.title&&(o.title=n.title),i&&(o.start=i),s&&(o.end=s),n.publicId&&(o.id=n.publicId),n.groupId&&(o.groupId=n.groupId),n.url&&(o.url=n.url),r.display&&r.display!=="auto"&&(o.display=r.display),e.collapseColor&&r.backgroundColor&&r.backgroundColor===r.borderColor?o.color=r.backgroundColor:(r.backgroundColor&&(o.backgroundColor=r.backgroundColor),r.borderColor&&(o.borderColor=r.borderColor)),r.textColor&&(o.textColor=r.textColor),r.classNames.length&&(o.classNames=r.classNames),Object.keys(n.extendedProps).length&&(e.collapseExtendedProps?Object.assign(o,n.extendedProps):o.extendedProps=n.extendedProps),o}toJSON(){return this.toPlainObject()}}function Pc(t){let e=t._def,n=t._instance;return{defs:{[e.defId]:e},instances:n?{[n.instanceId]:n}:{}}}function is(t,e,n){let{defs:r,instances:i}=t,s=[],o=n?n.instanceId:"";for(let a in i){let l=i[a],d=r[l.defId];l.instanceId!==o&&s.push(new Se(e,d,l))}return s}function Ri(t,e,n,r){let i={},s={},o={},a=[],l=[],d=Lc(t.defs,e);for(let c in t.defs){let u=t.defs[c];d[u.defId].display==="inverse-background"&&(u.groupId?(i[u.groupId]=[],o[u.groupId]||(o[u.groupId]=u)):s[c]=[])}for(let c in t.instances){let u=t.instances[c],p=t.defs[u.defId],f=d[p.defId],h=u.range,g=!p.allDay&&r?Ji(h,r):h,m=it(g,n);m&&(f.display==="inverse-background"?p.groupId?i[p.groupId].push(m):s[u.defId].push(m):f.display!=="none"&&(f.display==="background"?a:l).push({def:p,ui:f,instance:u,range:m,isStart:g.start&&g.start.valueOf()===m.start.valueOf(),isEnd:g.end&&g.end.valueOf()===m.end.valueOf()}))}for(let c in i){let u=i[c],p=sa(u,n);for(let f of p){let h=o[c],g=d[h.defId];a.push({def:h,ui:g,instance:null,range:f,isStart:!1,isEnd:!1})}}for(let c in s){let u=s[c],p=sa(u,n);for(let f of p)a.push({def:t.defs[c],ui:d[c],instance:null,range:f,isStart:!1,isEnd:!1})}return{bg:a,fg:l}}function Dv(t){return t.ui.display==="background"||t.ui.display==="inverse-background"}function da(t,e){t.fcSeg=e}function Ai(t){return t.fcSeg||t.parentNode.fcSeg||null}function Lc(t,e){return Tt(t,n=>kc(n,e))}function kc(t,e){let n=[];return e[""]&&n.push(e[""]),e[t.defId]&&n.push(e[t.defId]),n.push(t.ui),Cc(n)}function ss(t,e){let n=t.map(wv);return n.sort((r,i)=>GE(r,i,e)),n.map(r=>r._seg)}function wv(t){let{eventRange:e}=t,n=e.def,r=e.instance?e.instance.range:e.range,i=r.start?r.start.valueOf():0,s=r.end?r.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},n.extendedProps),n),{id:n.publicId,start:i,end:s,duration:s-i,allDay:Number(n.allDay),_seg:t})}function Cv(t,e){let{pluginHooks:n}=e,r=n.isDraggableTransformers,{def:i,ui:s}=t.eventRange,o=s.startEditable;for(let a of r)o=a(o,i,s,e);return o}function Ov(t,e){return t.isStart&&t.eventRange.ui.durationEditable&&e.options.eventResizableFromStart}function Mv(t,e){return t.isEnd&&t.eventRange.ui.durationEditable}function tn(t,e,n,r,i,s,o){let{dateEnv:a,options:l}=n,{displayEventTime:d,displayEventEnd:c}=l,u=t.eventRange.def,p=t.eventRange.instance;d==null&&(d=r!==!1),c==null&&(c=i!==!1);let f=p.range.start,h=p.range.end,g=s||t.start||t.eventRange.range.start,m=o||t.end||t.eventRange.range.end,v=Q(f).valueOf()===Q(g).valueOf(),y=Q(rt(h,-1)).valueOf()===Q(rt(m,-1)).valueOf();return d&&!u.allDay&&(v||y)?(g=v?f:g,m=y?h:m,c&&u.hasEnd?a.formatRange(g,m,e,{forcedStartTzo:s?null:p.forcedStartTzo,forcedEndTzo:o?null:p.forcedEndTzo}):a.format(g,e,{forcedTzo:s?null:p.forcedStartTzo})):""}function ze(t,e,n){let r=t.eventRange.range;return{isPast:r.end<=(n||e.start),isFuture:r.start>=(n||e.end),isToday:e&&Ve(e,r.start)}}function Nv(t){let e=["fc-event"];return t.isMirror&&e.push("fc-event-mirror"),t.isDraggable&&e.push("fc-event-draggable"),(t.isStartResizable||t.isEndResizable)&&e.push("fc-event-resizable"),t.isDragging&&e.push("fc-event-dragging"),t.isResizing&&e.push("fc-event-resizing"),t.isSelected&&e.push("fc-event-selected"),t.isStart&&e.push("fc-event-start"),t.isEnd&&e.push("fc-event-end"),t.isPast&&e.push("fc-event-past"),t.isToday&&e.push("fc-event-today"),t.isFuture&&e.push("fc-event-future"),e}function Bc(t){return t.instance?t.instance.instanceId:`${t.def.defId}:${t.range.start.toISOString()}`}function os(t,e){let{def:n,instance:r}=t.eventRange,{url:i}=n;if(i)return{href:i};let{emitter:s,options:o}=e,{eventInteractive:a}=o;return a==null&&(a=n.interactive,a==null&&(a=!!s.hasHandlers("eventClick"))),a?gc(l=>{s.trigger("eventClick",{el:l.target,event:new Se(e,n,r),jsEvent:l,view:e.viewApi})}):{}}const xv={start:T,end:T,allDay:Boolean};function Pv(t,e,n){let r=Lv(t,e),{range:i}=r;if(!i.start)return null;if(!i.end){if(n==null)return null;i.end=e.add(i.start,n)}return r}function Lv(t,e){let{refined:n,extra:r}=Qi(t,xv),i=n.start?e.createMarkerMeta(n.start):null,s=n.end?e.createMarkerMeta(n.end):null,{allDay:o}=n;return o==null&&(o=i&&i.isTimeUnspecified&&(!s||s.isTimeUnspecified)),Object.assign({range:{start:i?i.marker:null,end:s?s.marker:null},allDay:o},r)}function kv(t,e){return Object.assign(Object.assign({},Gc(t.range,e,t.allDay)),{allDay:t.allDay})}function Fc(t,e,n){return Object.assign(Object.assign({},Gc(t,e,n)),{timeZone:e.timeZone})}function Gc(t,e,n){return{start:e.toDate(t.start),end:e.toDate(t.end),startStr:e.formatIso(t.start,{omitTime:n}),endStr:e.formatIso(t.end,{omitTime:n})}}function Bv(t,e,n){let r=wc({editable:!1},n),i=bi(r.refined,r.extra,"",t.allDay,!0,n);return{def:i,ui:kc(i,e),instance:es(i.defId,t.range),range:t.range,isStart:!0,isEnd:!0}}function Fv(t,e,n){let r=!1,i=function(a){r||(r=!0,e(a))},s=function(a){r||(r=!0,n(a))},o=t(i,s);o&&typeof o.then=="function"&&o.then(i,s)}class ua extends Error{constructor(e,n){super(e),this.response=n}}function Gv(t,e,n){t=t.toUpperCase();const r={method:t};return t==="GET"?e+=(e.indexOf("?")===-1?"?":"&")+new URLSearchParams(n):(r.body=new URLSearchParams(n),r.headers={"Content-Type":"application/x-www-form-urlencoded"}),fetch(e,r).then(i=>{if(i.ok)return i.json().then(s=>[s,i],()=>{throw new ua("Failure parsing JSON",i)});throw new ua("Request failed",i)})}let jr;function Uc(){return jr==null&&(jr=Uv()),jr}function Uv(){if(typeof document>"u")return!0;let t=document.createElement("div");t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.innerHTML="<table><tr><td><div></div></td></tr></table>",t.querySelector("table").style.height="100px",t.querySelector("div").style.height="100%",document.body.appendChild(t);let n=t.querySelector("div").offsetHeight>0;return document.body.removeChild(t),n}class Hv extends q{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{rr(()=>{this.setState({forPrint:!0})})},this.handleAfterPrint=()=>{rr(()=>{this.setState({forPrint:!1})})}}render(){let{props:e}=this,{options:n}=e,{forPrint:r}=this.state,i=r||n.height==="auto"||n.contentHeight==="auto",s=!i&&n.height!=null?n.height:"",o=["fc",r?"fc-media-print":"fc-media-screen",`fc-direction-${n.direction}`,e.theme.getClass("root")];return Uc()||o.push("fc-liquid-hack"),e.children(o,s,i,r)}componentDidMount(){let{emitter:e}=this.props;e.on("_beforeprint",this.handleBeforePrint),e.on("_afterprint",this.handleAfterPrint)}componentWillUnmount(){let{emitter:e}=this.props;e.off("_beforeprint",this.handleBeforePrint),e.off("_afterprint",this.handleAfterPrint)}}class Hc{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}}function Vv(t,e){return{component:t,el:e.el,useEventCenter:e.useEventCenter!=null?e.useEventCenter:!0,isHitComboAllowed:e.isHitComboAllowed||null}}const fa={};class zv{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(e){this.currentDataManager.dispatch(e)}get view(){return this.getCurrentData().viewApi}batchRendering(e){e()}updateSize(){this.trigger("_resize",!0)}setOption(e,n){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:n})}getOption(e){return this.currentDataManager.currentCalendarOptionsInput[e]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(e,n){let{currentDataManager:r}=this;r.currentCalendarOptionsRefiners[e]?r.emitter.on(e,n):console.warn(`Unknown listener name '${e}'`)}off(e,n){this.currentDataManager.emitter.off(e,n)}trigger(e,...n){this.currentDataManager.emitter.trigger(e,...n)}changeView(e,n){this.batchRendering(()=>{if(this.unselect(),n)if(n.start&&n.end)this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e}),this.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:n});else{let{dateEnv:r}=this.getCurrentData();this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:r.createMarker(n)})}else this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})})}zoomTo(e,n){let r=this.getCurrentData(),i;n=n||"day",i=r.viewSpecs[n]||this.getUnitViewSpec(n),this.unselect(),i?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:i.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})}getUnitViewSpec(e){let{viewSpecs:n,toolbarConfig:r}=this.getCurrentData(),i=[].concat(r.header?r.header.viewsWithButtons:[],r.footer?r.footer.viewsWithButtons:[]),s,o;for(let a in n)i.push(a);for(s=0;s<i.length;s+=1)if(o=n[i[s]],o&&o.singleUnit===e)return o;return null}prev(){this.unselect(),this.dispatch({type:"PREV"})}next(){this.unselect(),this.dispatch({type:"NEXT"})}prevYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,-1)})}nextYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,1)})}today(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:pn(e.calendarOptions.now,e.dateEnv)})}gotoDate(e){let n=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:n.dateEnv.createMarker(e)})}incrementDate(e){let n=this.getCurrentData(),r=j(e);r&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:n.dateEnv.add(n.currentDate,r)}))}getDate(){let e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)}formatDate(e,n){let{dateEnv:r}=this.getCurrentData();return r.format(r.createMarker(e),X(n))}formatRange(e,n,r){let{dateEnv:i}=this.getCurrentData();return i.formatRange(i.createMarker(e),i.createMarker(n),X(r),r)}formatIso(e,n){let{dateEnv:r}=this.getCurrentData();return r.formatIso(r.createMarker(e),{omitTime:n})}select(e,n){let r;n==null?e.start!=null?r=e:r={start:e,end:null}:r={start:e,end:n};let i=this.getCurrentData(),s=Pv(r,i.dateEnv,j({days:1}));s&&(this.dispatch({type:"SELECT_DATES",selection:s}),bv(s,null,i))}unselect(e){let n=this.getCurrentData();n.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),Tv(e,n))}addEvent(e,n){if(e instanceof Se){let o=e._def,a=e._instance;return this.getCurrentData().eventStore.defs[o.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:Ti({def:o,instance:a})}),this.triggerEventAdd(e)),e}let r=this.getCurrentData(),i;if(n instanceof wt)i=n.internalEventSource;else if(typeof n=="boolean")n&&([i]=Xi(r.eventSources));else if(n!=null){let o=this.getEventSourceById(n);if(!o)return console.warn(`Could not find an event source with ID "${n}"`),null;i=o.internalEventSource}let s=Dc(e,i,r,!1);if(s){let o=new Se(r,s.def,s.def.recurringDef?null:s.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:Ti(s)}),this.triggerEventAdd(o),o}return null}triggerEventAdd(e){let{emitter:n}=this.getCurrentData();n.trigger("eventAdd",{event:e,relatedEvents:[],revert:()=>{this.dispatch({type:"REMOVE_EVENTS",eventStore:Pc(e)})}})}getEventById(e){let n=this.getCurrentData(),{defs:r,instances:i}=n.eventStore;e=String(e);for(let s in r){let o=r[s];if(o.publicId===e){if(o.recurringDef)return new Se(n,o,null);for(let a in i){let l=i[a];if(l.defId===o.defId)return new Se(n,o,l)}}}return null}getEvents(){let e=this.getCurrentData();return is(e.eventStore,e)}removeAllEvents(){this.dispatch({type:"REMOVE_ALL_EVENTS"})}getEventSources(){let e=this.getCurrentData(),n=e.eventSources,r=[];for(let i in n)r.push(new wt(e,n[i]));return r}getEventSourceById(e){let n=this.getCurrentData(),r=n.eventSources;e=String(e);for(let i in r)if(r[i].publicId===e)return new wt(n,r[i]);return null}addEventSource(e){let n=this.getCurrentData();if(e instanceof wt)return n.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;let r=Oc(e,n);return r?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[r]}),new wt(n,r)):null}removeAllEventSources(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})}refetchEvents(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})}scrollToTime(e){let n=j(e);n&&this.trigger("_scrollRequest",{time:n})}}function Wv(t,e){let n={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)};return n.left<n.right&&n.top<n.bottom?n:!1}const qr=$e();class jv{constructor(){this.getKeysForEventDefs=B(this._getKeysForEventDefs),this.splitDateSelection=B(this._splitDateSpan),this.splitEventStore=B(this._splitEventStore),this.splitIndividualUi=B(this._splitIndividualUi),this.splitEventDrag=B(this._splitInteraction),this.splitEventResize=B(this._splitInteraction),this.eventUiBuilders={}}splitProps(e){let n=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),i=this.splitDateSelection(e.dateSelection),s=this.splitIndividualUi(e.eventUiBases,r),o=this.splitEventStore(e.eventStore,r),a=this.splitEventDrag(e.eventDrag),l=this.splitEventResize(e.eventResize),d={};this.eventUiBuilders=Tt(n,(c,u)=>this.eventUiBuilders[u]||B(qv));for(let c in n){let u=n[c],p=o[c]||qr,f=this.eventUiBuilders[c];d[c]={businessHours:u.businessHours||e.businessHours,dateSelection:i[c]||null,eventStore:p,eventUiBases:f(e.eventUiBases[""],u.ui,s[c]),eventSelection:p.instances[e.eventSelection]?e.eventSelection:"",eventDrag:a[c]||null,eventResize:l[c]||null}}return d}_splitDateSpan(e){let n={};if(e){let r=this.getKeysForDateSpan(e);for(let i of r)n[i]=e}return n}_getKeysForEventDefs(e){return Tt(e.defs,n=>this.getKeysForEventDef(n))}_splitEventStore(e,n){let{defs:r,instances:i}=e,s={};for(let o in r)for(let a of n[o])s[a]||(s[a]=$e()),s[a].defs[o]=r[o];for(let o in i){let a=i[o];for(let l of n[a.defId])s[l]&&(s[l].instances[o]=a)}return s}_splitIndividualUi(e,n){let r={};for(let i in e)if(i)for(let s of n[i])r[s]||(r[s]={}),r[s][i]=e[i];return r}_splitInteraction(e){let n={};if(e){let r=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),i=this._getKeysForEventDefs(e.mutatedEvents),s=this._splitEventStore(e.mutatedEvents,i),o=a=>{n[a]||(n[a]={affectedEvents:r[a]||qr,mutatedEvents:s[a]||qr,isEvent:e.isEvent})};for(let a in r)o(a);for(let a in s)o(a)}return n}}function qv(t,e,n){let r=[];t&&r.push(t),e&&r.push(e);let i={"":Cc(r)};return n&&Object.assign(i,n),i}function as(t,e,n,r){return{dow:t.getUTCDay(),isDisabled:!!(r&&!Ve(r.activeRange,t)),isOther:!!(r&&!Ve(r.currentRange,t)),isToday:!!(e&&Ve(e,t)),isPast:!!(n?t<n:e&&t<e.start),isFuture:!!(n?t>n:e&&t>=e.end)}}function Tr(t,e){let n=["fc-day",`fc-day-${ZE[t.dow]}`];return t.isDisabled?n.push("fc-day-disabled"):(t.isToday&&(n.push("fc-day-today"),n.push(e.getClass("today"))),t.isPast&&n.push("fc-day-past"),t.isFuture&&n.push("fc-day-future"),t.isOther&&n.push("fc-day-other")),n}const $v=X({year:"numeric",month:"long",day:"numeric"}),Yv=X({week:"long"});function Gt(t,e,n="day",r=!0){const{dateEnv:i,options:s,calendarApi:o}=t;let a=i.format(e,n==="week"?Yv:$v);if(s.navLinks){let l=i.toDate(e);const d=c=>{let u=n==="day"?s.navLinkDayClick:n==="week"?s.navLinkWeekClick:null;typeof u=="function"?u.call(o,i.toDate(e),c):(typeof u=="string"&&(n=u),o.zoomTo(e,n))};return Object.assign({title:Jt(s.navLinkHint,[a,l],a),"data-navlink":""},r?pc(d):{onClick:d})}return{"aria-label":a}}let $r;function Qv(){return $r||($r=Zv()),$r}function Zv(){let t=document.createElement("div");t.style.overflow="scroll",t.style.position="absolute",t.style.top="-9999px",t.style.left="-9999px",document.body.appendChild(t);let e=Xv(t);return document.body.removeChild(t),e}function Xv(t){return{x:t.offsetHeight-t.clientHeight,y:t.offsetWidth-t.clientWidth}}function Kv(t){let e=Jv(t),n=t.getBoundingClientRect();for(let r of e){let i=Wv(n,r.getBoundingClientRect());if(i)n=i;else return null}return n}function Jv(t){let e=[];for(;t instanceof HTMLElement;){let n=window.getComputedStyle(t);if(n.position==="fixed")break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&e.push(t),t=t.parentNode}return e}class Ut{constructor(e,n,r,i){this.els=n;let s=this.originClientRect=e.getBoundingClientRect();r&&this.buildElHorizontals(s.left),i&&this.buildElVerticals(s.top)}buildElHorizontals(e){let n=[],r=[];for(let i of this.els){let s=i.getBoundingClientRect();n.push(s.left-e),r.push(s.right-e)}this.lefts=n,this.rights=r}buildElVerticals(e){let n=[],r=[];for(let i of this.els){let s=i.getBoundingClientRect();n.push(s.top-e),r.push(s.bottom-e)}this.tops=n,this.bottoms=r}leftToIndex(e){let{lefts:n,rights:r}=this,i=n.length,s;for(s=0;s<i;s+=1)if(e>=n[s]&&e<r[s])return s}topToIndex(e){let{tops:n,bottoms:r}=this,i=n.length,s;for(s=0;s<i;s+=1)if(e>=n[s]&&e<r[s])return s}getWidth(e){return this.rights[e]-this.lefts[e]}getHeight(e){return this.bottoms[e]-this.tops[e]}similarTo(e){return Cn(this.tops||[],e.tops||[])&&Cn(this.bottoms||[],e.bottoms||[])&&Cn(this.lefts||[],e.lefts||[])&&Cn(this.rights||[],e.rights||[])}}function Cn(t,e){const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(Math.round(t[r])!==Math.round(e[r]))return!1;return!0}class xe extends q{constructor(){super(...arguments),this.uid=It()}prepareHits(){}queryHit(e,n,r,i){return null}isValidSegDownEl(e){return!this.props.eventDrag&&!this.props.eventResize&&!Ue(e,".fc-event-mirror")}isValidDateDownEl(e){return!Ue(e,".fc-event:not(.fc-bg-event)")&&!Ue(e,".fc-more-link")&&!Ue(e,"a[data-navlink]")&&!Ue(e,".fc-popover")}}class Vc{constructor(e=n=>n.thickness||1){this.getEntryThickness=e,this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}addSegs(e){let n=[];for(let r of e)this.insertEntry(r,n);return n}insertEntry(e,n){let r=this.findInsertion(e);this.isInsertionValid(r,e)?this.insertEntryAt(e,r):this.handleInvalidInsertion(r,e,n)}isInsertionValid(e,n){return(this.maxCoord===-1||e.levelCoord+this.getEntryThickness(n)<=this.maxCoord)&&(this.maxStackCnt===-1||e.stackCnt<this.maxStackCnt)}handleInvalidInsertion(e,n,r){if(this.allowReslicing&&e.touchingEntry){const i=Object.assign(Object.assign({},n),{span:ls(n.span,e.touchingEntry.span)});r.push(i),this.splitEntry(n,e.touchingEntry,r)}else r.push(n)}splitEntry(e,n,r){let i=e.span,s=n.span;i.start<s.start&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:i.start,end:s.start}},r),i.end>s.end&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:s.end,end:i.end}},r)}insertEntryAt(e,n){let{entriesByLevel:r,levelCoords:i}=this;n.lateral===-1?(Yr(i,n.level,n.levelCoord),Yr(r,n.level,[e])):Yr(r[n.level],n.lateral,e),this.stackCnts[_t(e)]=n.stackCnt}findInsertion(e){let{levelCoords:n,entriesByLevel:r,strictOrder:i,stackCnts:s}=this,o=n.length,a=0,l=-1,d=-1,c=null,u=0;for(let h=0;h<o;h+=1){const g=n[h];if(!i&&g>=a+this.getEntryThickness(e))break;let m=r[h],v,y=Si(m,e.span.start,Ii),_=y[0]+y[1];for(;(v=m[_])&&v.span.start<e.span.end;){let b=g+this.getEntryThickness(v);b>a&&(a=b,c=v,l=h,d=_),b===a&&(u=Math.max(u,s[_t(v)]+1)),_+=1}}let p=0;if(c)for(p=l+1;p<o&&n[p]<a;)p+=1;let f=-1;return p<o&&n[p]===a&&(f=Si(r[p],e.span.end,Ii)[0]),{touchingLevel:l,touchingLateral:d,touchingEntry:c,stackCnt:u,levelCoord:a,level:p,lateral:f}}toRects(){let{entriesByLevel:e,levelCoords:n}=this,r=e.length,i=[];for(let s=0;s<r;s+=1){let o=e[s],a=n[s];for(let l of o)i.push(Object.assign(Object.assign({},l),{thickness:this.getEntryThickness(l),levelCoord:a}))}return i}}function Ii(t){return t.span.end}function _t(t){return t.index+":"+t.span.start}function e_(t){let e=[];for(let n of t){let r=[],i={span:n.span,entries:[n]};for(let s of e)ls(s.span,i.span)?i={entries:s.entries.concat(i.entries),span:t_(s.span,i.span)}:r.push(s);r.push(i),e=r}return e}function t_(t,e){return{start:Math.min(t.start,e.start),end:Math.max(t.end,e.end)}}function ls(t,e){let n=Math.max(t.start,e.start),r=Math.min(t.end,e.end);return n<r?{start:n,end:r}:null}function Yr(t,e,n){t.splice(e,0,n)}function Si(t,e,n){let r=0,i=t.length;if(!i||e<n(t[r]))return[0,0];if(e>n(t[i-1]))return[i,0];for(;r<i;){let s=Math.floor(r+(i-r)/2),o=n(t[s]);if(e<o)i=s;else if(e>o)r=s+1;else return[s,1]}return[r,0]}function n_(t,e){return!t||e>10?X({weekday:"short"}):e>1?X({weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}):X({weekday:"long"})}const zc="fc-col-header-cell";function Wc(t){return t.text}class r_ extends q{render(){let{dateEnv:e,options:n,theme:r,viewApi:i}=this.context,{props:s}=this,{date:o,dateProfile:a}=s,l=as(o,s.todayRange,null,a),d=[zc].concat(Tr(l,r)),c=e.format(o,s.dayHeaderFormat),u=!l.isDisabled&&s.colCnt>1?Gt(this.context,o):{},p=Object.assign(Object.assign(Object.assign({date:e.toDate(o),view:i},s.extraRenderProps),{text:c}),l);return E(ce,{elTag:"th",elClasses:d,elAttrs:Object.assign({role:"columnheader",colSpan:s.colSpan,"data-date":l.isDisabled?void 0:fn(o)},s.extraDataAttrs),renderProps:p,generatorName:"dayHeaderContent",customGenerator:n.dayHeaderContent,defaultGenerator:Wc,classNameGenerator:n.dayHeaderClassNames,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},f=>E("div",{className:"fc-scrollgrid-sync-inner"},!l.isDisabled&&E(f,{elTag:"a",elAttrs:u,elClasses:["fc-col-header-cell-cushion",s.isSticky&&"fc-sticky"]})))}}const i_=X({weekday:"long"});class s_ extends q{render(){let{props:e}=this,{dateEnv:n,theme:r,viewApi:i,options:s}=this.context,o=oe(new Date(2592e5),e.dow),a={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},l=n.format(o,e.dayHeaderFormat),d=Object.assign(Object.assign(Object.assign(Object.assign({date:o},a),{view:i}),e.extraRenderProps),{text:l});return E(ce,{elTag:"th",elClasses:[zc,...Tr(a,r),...e.extraClassNames||[]],elAttrs:Object.assign({role:"columnheader",colSpan:e.colSpan},e.extraDataAttrs),renderProps:d,generatorName:"dayHeaderContent",customGenerator:s.dayHeaderContent,defaultGenerator:Wc,classNameGenerator:s.dayHeaderClassNames,didMount:s.dayHeaderDidMount,willUnmount:s.dayHeaderWillUnmount},c=>E("div",{className:"fc-scrollgrid-sync-inner"},E(c,{elTag:"a",elClasses:["fc-col-header-cell-cushion",e.isSticky&&"fc-sticky"],elAttrs:{"aria-label":n.format(o,i_)}})))}}class Wt extends be{constructor(e,n){super(e,n),this.initialNowDate=pn(n.options.now,n.dateEnv),this.initialNowQueriedMs=new Date().valueOf(),this.state=this.computeTiming().currentState}render(){let{props:e,state:n}=this;return e.children(n.nowDate,n.todayRange)}componentDidMount(){this.setTimeout()}componentDidUpdate(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())}componentWillUnmount(){this.clearTimeout()}computeTiming(){let{props:e,context:n}=this,r=rt(this.initialNowDate,new Date().valueOf()-this.initialNowQueriedMs),i=n.dateEnv.startOf(r,e.unit),s=n.dateEnv.add(i,j(1,e.unit)),o=s.valueOf()-r.valueOf();return o=Math.min(1e3*60*60*24,o),{currentState:{nowDate:i,todayRange:ha(i)},nextState:{nowDate:s,todayRange:ha(s)},waitMs:o}}setTimeout(){let{nextState:e,waitMs:n}=this.computeTiming();this.timeoutId=setTimeout(()=>{this.setState(e,()=>{this.setTimeout()})},n)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}}Wt.contextType=Ye;function ha(t){let e=Q(t),n=oe(e,1);return{start:e,end:n}}class jc extends q{constructor(){super(...arguments),this.createDayHeaderFormatter=B(o_)}render(){let{context:e}=this,{dates:n,dateProfile:r,datesRepDistinctDays:i,renderIntro:s}=this.props,o=this.createDayHeaderFormatter(e.options.dayHeaderFormat,i,n.length);return E(Wt,{unit:"day"},(a,l)=>E("tr",{role:"row"},s&&s("day"),n.map(d=>i?E(r_,{key:d.toISOString(),date:d,dateProfile:r,todayRange:l,colCnt:n.length,dayHeaderFormat:o}):E(s_,{key:d.getUTCDay(),dow:d.getUTCDay(),dayHeaderFormat:o}))))}}function o_(t,e,n){return t||n_(e,n)}class qc{constructor(e,n){let r=e.start,{end:i}=e,s=[],o=[],a=-1;for(;r<i;)n.isHiddenDay(r)?s.push(a+.5):(a+=1,s.push(a),o.push(r)),r=oe(r,1);this.dates=o,this.indices=s,this.cnt=o.length}sliceRange(e){let n=this.getDateDayIndex(e.start),r=this.getDateDayIndex(oe(e.end,-1)),i=Math.max(0,n),s=Math.min(this.cnt-1,r);return i=Math.ceil(i),s=Math.floor(s),i<=s?{firstIndex:i,lastIndex:s,isStart:n===i,isEnd:r===s}:null}getDateDayIndex(e){let{indices:n}=this,r=Math.floor(st(this.dates[0],e));return r<0?n[0]-1:r>=n.length?n[n.length-1]+1:n[r]}}class $c{constructor(e,n){let{dates:r}=e,i,s,o;if(n){for(s=r[0].getUTCDay(),i=1;i<r.length&&r[i].getUTCDay()!==s;i+=1);o=Math.ceil(r.length/i)}else o=1,i=r.length;this.rowCnt=o,this.colCnt=i,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let e=[];for(let n=0;n<this.rowCnt;n+=1){let r=[];for(let i=0;i<this.colCnt;i+=1)r.push(this.buildCell(n,i));e.push(r)}return e}buildCell(e,n){let r=this.daySeries.dates[e*this.colCnt+n];return{key:r.toISOString(),date:r}}buildHeaderDates(){let e=[];for(let n=0;n<this.colCnt;n+=1)e.push(this.cells[0][n].date);return e}sliceRange(e){let{colCnt:n}=this,r=this.daySeries.sliceRange(e),i=[];if(r){let{firstIndex:s,lastIndex:o}=r,a=s;for(;a<=o;){let l=Math.floor(a/n),d=Math.min((l+1)*n,o+1);i.push({row:l,firstCol:a%n,lastCol:(d-1)%n,isStart:r.isStart&&a===s,isEnd:r.isEnd&&d-1===o}),a=d}}return i}}class Yc{constructor(){this.sliceBusinessHours=B(this._sliceBusinessHours),this.sliceDateSelection=B(this._sliceDateSpan),this.sliceEventStore=B(this._sliceEventStore),this.sliceEventDrag=B(this._sliceInteraction),this.sliceEventResize=B(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(e,n,r,i,...s){let{eventUiBases:o}=e,a=this.sliceEventStore(e.eventStore,o,n,r,...s);return{dateSelectionSegs:this.sliceDateSelection(e.dateSelection,n,r,o,i,...s),businessHourSegs:this.sliceBusinessHours(e.businessHours,n,r,i,...s),fgEventSegs:a.fg,bgEventSegs:a.bg,eventDrag:this.sliceEventDrag(e.eventDrag,o,n,r,...s),eventResize:this.sliceEventResize(e.eventResize,o,n,r,...s),eventSelection:e.eventSelection}}sliceNowDate(e,n,r,i,...s){return this._sliceDateSpan({range:{start:e,end:rt(e,1)},allDay:!1},n,r,{},i,...s)}_sliceBusinessHours(e,n,r,i,...s){return e?this._sliceEventStore(gn(e,On(n,!!r),i),{},n,r,...s).bg:[]}_sliceEventStore(e,n,r,i,...s){if(e){let o=Ri(e,n,On(r,!!i),i);return{bg:this.sliceEventRanges(o.bg,s),fg:this.sliceEventRanges(o.fg,s)}}return{bg:[],fg:[]}}_sliceInteraction(e,n,r,i,...s){if(!e)return null;let o=Ri(e.mutatedEvents,n,On(r,!!i),i);return{segs:this.sliceEventRanges(o.fg,s),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}}_sliceDateSpan(e,n,r,i,s,...o){if(!e)return[];let a=On(n,!!r),l=it(e.range,a);if(l){e=Object.assign(Object.assign({},e),{range:l});let d=Bv(e,i,s),c=this.sliceRange(e.range,...o);for(let u of c)u.eventRange=d;return c}return[]}sliceEventRanges(e,n){let r=[];for(let i of e)r.push(...this.sliceEventRange(i,n));return r}sliceEventRange(e,n){let r=e.range;this.forceDayIfListItem&&e.ui.display==="list-item"&&(r={start:r.start,end:oe(r.start,1)});let i=this.sliceRange(r,...n);for(let s of i)s.eventRange=e,s.isStart=e.isStart&&s.isStart,s.isEnd=e.isEnd&&s.isEnd;return i}}function On(t,e){let n=t.activeRange;return e?n:{start:rt(n.start,t.slotMinTime.milliseconds),end:rt(n.end,t.slotMaxTime.milliseconds-864e5)}}const Mn=/^(visible|hidden)$/;class Qc extends q{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,qe(this.props.elRef,e)}}render(){let{props:e}=this,{liquid:n,liquidIsAbsolute:r}=e,i=n&&r,s=["fc-scroller"];return n&&(r?s.push("fc-scroller-liquid-absolute"):s.push("fc-scroller-liquid")),E("div",{ref:this.handleEl,className:s.join(" "),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:i&&-(e.overcomeLeft||0)||"",right:i&&-(e.overcomeRight||0)||"",bottom:i&&-(e.overcomeBottom||0)||"",marginLeft:!i&&-(e.overcomeLeft||0)||"",marginRight:!i&&-(e.overcomeRight||0)||"",marginBottom:!i&&-(e.overcomeBottom||0)||"",maxHeight:e.maxHeight||""}},e.children)}needsXScrolling(){if(Mn.test(this.props.overflowX))return!1;let{el:e}=this,n=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:r}=e;for(let i=0;i<r.length;i+=1)if(r[i].getBoundingClientRect().width>n)return!0;return!1}needsYScrolling(){if(Mn.test(this.props.overflowY))return!1;let{el:e}=this,n=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:r}=e;for(let i=0;i<r.length;i+=1)if(r[i].getBoundingClientRect().height>n)return!0;return!1}getXScrollbarWidth(){return Mn.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return Mn.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}}class He{constructor(e){this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(n,r)=>{let{depths:i,currentMap:s}=this,o=!1,a=!1;n!==null?(o=r in s,s[r]=n,i[r]=(i[r]||0)+1,a=!0):(i[r]-=1,i[r]||(delete s[r],delete this.callbackMap[r],o=!0)),this.masterCallback&&(o&&this.masterCallback(null,String(r)),a&&this.masterCallback(n,String(r)))}}createRef(e){let n=this.callbackMap[e];return n||(n=this.callbackMap[e]=r=>{this.handleValue(r,String(e))}),n}collect(e,n,r){return Cy(this.currentMap,e,n,r)}getAll(){return Xi(this.currentMap)}}function a_(t){let e=NE(t,".fc-scrollgrid-shrink"),n=0;for(let r of e)n=Math.max(n,VE(r));return Math.ceil(n)}function Zc(t,e){return t.liquid&&e.liquid}function l_(t,e){return e.maxHeight!=null||Zc(t,e)}function c_(t,e,n,r){let{expandRows:i}=n;return typeof e.content=="function"?e.content(n):E("table",{role:"presentation",className:[e.tableClassName,t.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:i?n.clientHeight:""}},n.tableColGroupNode,E(r?"thead":"tbody",{role:"presentation"},typeof e.rowContent=="function"?e.rowContent(n):e.rowContent))}function d_(t,e){return nt(t,e,Fe)}function u_(t,e){let n=[];for(let r of t){let i=r.span||1;for(let s=0;s<i;s+=1)n.push(E("col",{style:{width:r.width==="shrink"?f_(e):r.width||"",minWidth:r.minWidth||""}}))}return E("colgroup",{},...n)}function f_(t){return t??4}function h_(t){for(let e of t)if(e.width==="shrink")return!0;return!1}function p_(t,e){let n=["fc-scrollgrid",e.theme.getClass("table")];return t&&n.push("fc-scrollgrid-liquid"),n}function g_(t,e){let n=["fc-scrollgrid-section",`fc-scrollgrid-section-${t.type}`,t.className];return e&&t.liquid&&t.maxHeight==null&&n.push("fc-scrollgrid-section-liquid"),t.isSticky&&n.push("fc-scrollgrid-section-sticky"),n}function Di(t){return E("div",{className:"fc-scrollgrid-sticky-shim",style:{width:t.clientWidth,minWidth:t.tableMinWidth}})}function or(t){let{stickyHeaderDates:e}=t;return(e==null||e==="auto")&&(e=t.height==="auto"||t.viewHeight==="auto"),e}function Xc(t){let{stickyFooterScrollbar:e}=t;return(e==null||e==="auto")&&(e=t.height==="auto"||t.viewHeight==="auto"),e}class cs extends q{constructor(){super(...arguments),this.processCols=B(e=>e,d_),this.renderMicroColGroup=B(u_),this.scrollerRefs=new He,this.scrollerElRefs=new He(this._handleScrollerEl.bind(this)),this.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},this.handleSizing=()=>{this.safeSetState(Object.assign({shrinkWidth:this.computeShrinkWidth()},this.computeScrollerDims()))}}render(){let{props:e,state:n,context:r}=this,i=e.sections||[],s=this.processCols(e.cols),o=this.renderMicroColGroup(s,n.shrinkWidth),a=p_(e.liquid,r);e.collapsibleWidth&&a.push("fc-scrollgrid-collapsible");let l=i.length,d=0,c,u=[],p=[],f=[];for(;d<l&&(c=i[d]).type==="header";)u.push(this.renderSection(c,o,!0)),d+=1;for(;d<l&&(c=i[d]).type==="body";)p.push(this.renderSection(c,o,!1)),d+=1;for(;d<l&&(c=i[d]).type==="footer";)f.push(this.renderSection(c,o,!0)),d+=1;let h=!Uc();const g={role:"rowgroup"};return E("table",{role:"grid",className:a.join(" "),style:{height:e.height}},!!(!h&&u.length)&&E("thead",g,...u),!!(!h&&p.length)&&E("tbody",g,...p),!!(!h&&f.length)&&E("tfoot",g,...f),h&&E("tbody",g,...u,...p,...f))}renderSection(e,n,r){return"outerContent"in e?E(Y,{key:e.key},e.outerContent):E("tr",{key:e.key,role:"presentation",className:g_(e,this.props.liquid).join(" ")},this.renderChunkTd(e,n,e.chunk,r))}renderChunkTd(e,n,r,i){if("outerContent"in r)return r.outerContent;let{props:s}=this,{forceYScrollbars:o,scrollerClientWidths:a,scrollerClientHeights:l}=this.state,d=l_(s,e),c=Zc(s,e),u=s.liquid?o?"scroll":d?"auto":"hidden":"visible",p=e.key,f=c_(e,r,{tableColGroupNode:n,tableMinWidth:"",clientWidth:!s.collapsibleWidth&&a[p]!==void 0?a[p]:null,clientHeight:l[p]!==void 0?l[p]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:()=>{}},i);return E(i?"th":"td",{ref:r.elRef,role:"presentation"},E("div",{className:`fc-scroller-harness${c?" fc-scroller-harness-liquid":""}`},E(Qc,{ref:this.scrollerRefs.createRef(p),elRef:this.scrollerElRefs.createRef(p),overflowY:u,overflowX:s.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:c,liquidIsAbsolute:!0},f)))}_handleScrollerEl(e,n){let r=m_(this.props.sections,n);r&&qe(r.chunk.scrollerElRef,e)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return h_(this.props.cols)?a_(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let e=Qv(),{scrollerRefs:n,scrollerElRefs:r}=this,i=!1,s={},o={};for(let a in n.currentMap){let l=n.currentMap[a];if(l&&l.needsYScrolling()){i=!0;break}}for(let a of this.props.sections){let l=a.key,d=r.currentMap[l];if(d){let c=d.parentNode;s[l]=Math.floor(c.getBoundingClientRect().width-(i?e.y:0)),o[l]=Math.floor(c.getBoundingClientRect().height)}}return{forceYScrollbars:i,scrollerClientWidths:s,scrollerClientHeights:o}}}cs.addStateEquality({scrollerClientWidths:Fe,scrollerClientHeights:Fe});function m_(t,e){for(let n of t)if(n.key===e)return n;return null}class Rr extends q{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,e&&da(e,this.props.seg)}}render(){const{props:e,context:n}=this,{options:r}=n,{seg:i}=e,{eventRange:s}=i,{ui:o}=s,a={event:new Se(n,s.def,s.instance),view:n.viewApi,timeText:e.timeText,textColor:o.textColor,backgroundColor:o.backgroundColor,borderColor:o.borderColor,isDraggable:!e.disableDragging&&Cv(i,n),isStartResizable:!e.disableResizing&&Ov(i,n),isEndResizable:!e.disableResizing&&Mv(i),isMirror:!!(e.isDragging||e.isResizing||e.isDateSelecting),isStart:!!i.isStart,isEnd:!!i.isEnd,isPast:!!e.isPast,isFuture:!!e.isFuture,isToday:!!e.isToday,isSelected:!!e.isSelected,isDragging:!!e.isDragging,isResizing:!!e.isResizing};return E(ce,Object.assign({},e,{elRef:this.handleEl,elClasses:[...Nv(a),...i.eventRange.ui.classNames,...e.elClasses||[]],renderProps:a,generatorName:"eventContent",customGenerator:r.eventContent,defaultGenerator:e.defaultGenerator,classNameGenerator:r.eventClassNames,didMount:r.eventDidMount,willUnmount:r.eventWillUnmount}))}componentDidUpdate(e){this.el&&this.props.seg!==e.seg&&da(this.el,this.props.seg)}}class Kc extends q{render(){let{props:e,context:n}=this,{options:r}=n,{seg:i}=e,{ui:s}=i.eventRange,o=r.eventTimeFormat||e.defaultTimeFormat,a=tn(i,o,n,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return E(Rr,Object.assign({},e,{elTag:"a",elStyle:{borderColor:s.borderColor,backgroundColor:s.backgroundColor},elAttrs:os(i,n),defaultGenerator:E_,timeText:a}),(l,d)=>E(Y,null,E(l,{elTag:"div",elClasses:["fc-event-main"],elStyle:{color:d.textColor}}),!!d.isStartResizable&&E("div",{className:"fc-event-resizer fc-event-resizer-start"}),!!d.isEndResizable&&E("div",{className:"fc-event-resizer fc-event-resizer-end"})))}}function E_(t){return E("div",{className:"fc-event-main-frame"},t.timeText&&E("div",{className:"fc-event-time"},t.timeText),E("div",{className:"fc-event-title-container"},E("div",{className:"fc-event-title fc-sticky"},t.event.title||E(Y,null," "))))}const ds=t=>E(Ye.Consumer,null,e=>{let{options:n}=e,r={isAxis:t.isAxis,date:e.dateEnv.toDate(t.date),view:e.viewApi};return E(ce,Object.assign({},t,{elTag:t.elTag||"div",renderProps:r,generatorName:"nowIndicatorContent",customGenerator:n.nowIndicatorContent,classNameGenerator:n.nowIndicatorClassNames,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount}))}),y_=X({day:"numeric"});class us extends q{constructor(){super(...arguments),this.refineRenderProps=Hn(v_)}render(){let{props:e,context:n}=this,{options:r}=n,i=this.refineRenderProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,isMonthStart:e.isMonthStart||!1,showDayNumber:e.showDayNumber,extraRenderProps:e.extraRenderProps,viewApi:n.viewApi,dateEnv:n.dateEnv,monthStartFormat:r.monthStartFormat});return E(ce,Object.assign({},e,{elClasses:[...Tr(i,n.theme),...e.elClasses||[]],elAttrs:Object.assign(Object.assign({},e.elAttrs),i.isDisabled?{}:{"data-date":fn(e.date)}),renderProps:i,generatorName:"dayCellContent",customGenerator:r.dayCellContent,defaultGenerator:e.defaultGenerator,classNameGenerator:i.isDisabled?void 0:r.dayCellClassNames,didMount:r.dayCellDidMount,willUnmount:r.dayCellWillUnmount}))}}function fs(t){return!!(t.dayCellContent||_i("dayCellContent",t))}function v_(t){let{date:e,dateEnv:n,dateProfile:r,isMonthStart:i}=t,s=as(e,t.todayRange,null,r),o=t.showDayNumber?n.format(e,i?t.monthStartFormat:y_):"";return Object.assign(Object.assign(Object.assign({date:n.toDate(e),view:t.viewApi},s),{isMonthStart:i,dayNumberText:o}),t.extraRenderProps)}class Jc extends q{render(){let{props:e}=this,{seg:n}=e;return E(Rr,{elTag:"div",elClasses:["fc-bg-event"],elStyle:{backgroundColor:n.eventRange.ui.backgroundColor},defaultGenerator:__,seg:n,timeText:"",isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,disableDragging:!0,disableResizing:!0})}}function __(t){let{title:e}=t.event;return e&&E("div",{className:"fc-event-title"},t.event.title)}function ed(t){return E("div",{className:`fc-${t}`})}const td=t=>E(Ye.Consumer,null,e=>{let{dateEnv:n,options:r}=e,{date:i}=t,s=r.weekNumberFormat||t.defaultFormat,o=n.computeWeekNumber(i),a=n.format(i,s);return E(ce,Object.assign({},t,{renderProps:{num:o,text:a,date:i},generatorName:"weekNumberContent",customGenerator:r.weekNumberContent,defaultGenerator:b_,classNameGenerator:r.weekNumberClassNames,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount}))});function b_(t){return t.text}const Qr=10;class T_ extends q{constructor(){super(...arguments),this.state={titleId:tt()},this.handleRootEl=e=>{this.rootEl=e,this.props.elRef&&qe(this.props.elRef,e)},this.handleDocumentMouseDown=e=>{const n=LE(e);this.rootEl.contains(n)||this.handleCloseClick()},this.handleDocumentKeyDown=e=>{e.key==="Escape"&&this.handleCloseClick()},this.handleCloseClick=()=>{let{onClose:e}=this.props;e&&e()}}render(){let{theme:e,options:n}=this.context,{props:r,state:i}=this,s=["fc-popover",e.getClass("popover")].concat(r.extraClassNames||[]);return EE(E("div",Object.assign({},r.extraAttrs,{id:r.id,className:s.join(" "),"aria-labelledby":i.titleId,ref:this.handleRootEl}),E("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},E("span",{className:"fc-popover-title",id:i.titleId},r.title),E("span",{className:"fc-popover-close "+e.getIconClass("close"),title:n.closeHint,onClick:this.handleCloseClick})),E("div",{className:"fc-popover-body "+e.getClass("popoverContent")},r.children)),r.parentEl)}componentDidMount(){document.addEventListener("mousedown",this.handleDocumentMouseDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.updateSize()}componentWillUnmount(){document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("keydown",this.handleDocumentKeyDown)}updateSize(){let{isRtl:e}=this.context,{alignmentEl:n,alignGridTop:r}=this.props,{rootEl:i}=this,s=Kv(n);if(s){let o=i.getBoundingClientRect(),a=r?Ue(n,".fc-scrollgrid").getBoundingClientRect().top:s.top,l=e?s.right-o.width:s.left;a=Math.max(a,Qr),l=Math.min(l,document.documentElement.clientWidth-Qr-o.width),l=Math.max(l,Qr);let d=i.offsetParent.getBoundingClientRect();PE(i,{top:a-d.top,left:l-d.left})}}}class R_ extends xe{constructor(){super(...arguments),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)}}render(){let{options:e,dateEnv:n}=this.context,{props:r}=this,{startDate:i,todayRange:s,dateProfile:o}=r,a=n.format(i,e.dayPopoverFormat);return E(us,{elRef:this.handleRootEl,date:i,dateProfile:o,todayRange:s},(l,d,c)=>E(T_,{elRef:c.ref,id:r.id,title:a,extraClassNames:["fc-more-popover"].concat(c.className||[]),extraAttrs:c,parentEl:r.parentEl,alignmentEl:r.alignmentEl,alignGridTop:r.alignGridTop,onClose:r.onClose},fs(e)&&E(l,{elTag:"div",elClasses:["fc-more-popover-misc"]}),r.children))}queryHit(e,n,r,i){let{rootEl:s,props:o}=this;return e>=0&&e<r&&n>=0&&n<i?{dateProfile:o.dateProfile,dateSpan:Object.assign({allDay:!o.forceTimed,range:{start:o.startDate,end:o.endDate}},o.extraDateSpan),dayEl:s,rect:{left:0,top:0,right:r,bottom:i},layer:1}:null}}class nd extends q{constructor(){super(...arguments),this.state={isPopoverOpen:!1,popoverId:tt()},this.handleLinkEl=e=>{this.linkEl=e,this.props.elRef&&qe(this.props.elRef,e)},this.handleClick=e=>{let{props:n,context:r}=this,{moreLinkClick:i}=r.options,s=pa(n).start;function o(a){let{def:l,instance:d,range:c}=a.eventRange;return{event:new Se(r,l,d),start:r.dateEnv.toDate(c.start),end:r.dateEnv.toDate(c.end),isStart:a.isStart,isEnd:a.isEnd}}typeof i=="function"&&(i=i({date:s,allDay:!!n.allDayDate,allSegs:n.allSegs.map(o),hiddenSegs:n.hiddenSegs.map(o),jsEvent:e,view:r.viewApi})),!i||i==="popover"?this.setState({isPopoverOpen:!0}):typeof i=="string"&&r.calendarApi.zoomTo(s,i)},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:n}=this;return E(Ye.Consumer,null,r=>{let{viewApi:i,options:s,calendarApi:o}=r,{moreLinkText:a}=s,{moreCnt:l}=e,d=pa(e),c=typeof a=="function"?a.call(o,l):`+${l} ${a}`,u=Jt(s.moreLinkHint,[l],c),p={num:l,shortText:`+${l}`,text:c,view:i};return E(Y,null,!!e.moreCnt&&E(ce,{elTag:e.elTag||"a",elRef:this.handleLinkEl,elClasses:[...e.elClasses||[],"fc-more-link"],elStyle:e.elStyle,elAttrs:Object.assign(Object.assign(Object.assign({},e.elAttrs),pc(this.handleClick)),{title:u,"aria-expanded":n.isPopoverOpen,"aria-controls":n.isPopoverOpen?n.popoverId:""}),renderProps:p,generatorName:"moreLinkContent",customGenerator:s.moreLinkContent,defaultGenerator:e.defaultGenerator||A_,classNameGenerator:s.moreLinkClassNames,didMount:s.moreLinkDidMount,willUnmount:s.moreLinkWillUnmount},e.children),n.isPopoverOpen&&E(R_,{id:n.popoverId,startDate:d.start,endDate:d.end,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:e.extraDateSpan,parentEl:this.parentEl,alignmentEl:e.alignmentElRef?e.alignmentElRef.current:this.linkEl,alignGridTop:e.alignGridTop,forceTimed:e.forceTimed,onClose:this.handlePopoverClose},e.popoverContent()))})}componentDidMount(){this.updateParentEl()}componentDidUpdate(){this.updateParentEl()}updateParentEl(){this.linkEl&&(this.parentEl=Ue(this.linkEl,".fc-view-harness"))}}function A_(t){return t.text}function pa(t){if(t.allDayDate)return{start:t.allDayDate,end:oe(t.allDayDate,1)};let{hiddenSegs:e}=t;return{start:rd(e),end:S_(e)}}function rd(t){return t.reduce(I_).eventRange.range.start}function I_(t,e){return t.eventRange.range.start<e.eventRange.range.start?t:e}function S_(t){return t.reduce(D_).eventRange.range.end}function D_(t,e){return t.eventRange.range.end>e.eventRange.range.end?t:e}const w_=[],id={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},sd=Object.assign(Object.assign({},id),{buttonHints:{prev:"Previous $0",next:"Next $0",today(t,e){return e==="day"?"Today":`This ${t}`}},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint(t){return`Show ${t} more event${t===1?"":"s"}`}});function C_(t){let e=t.length>0?t[0].code:"en",n=w_.concat(t),r={en:sd};for(let i of n)r[i.code]=i;return{map:r,defaultCode:e}}function od(t,e){return typeof t=="object"&&!Array.isArray(t)?ad(t.code,[t.code],t):O_(t,e)}function O_(t,e){let n=[].concat(t||[]),r=M_(n,e)||sd;return ad(t,n,r)}function M_(t,e){for(let n=0;n<t.length;n+=1){let r=t[n].toLocaleLowerCase().split("-");for(let i=r.length;i>0;i-=1){let s=r.slice(0,i).join("-");if(e[s])return e[s]}}return null}function ad(t,e,n){let r=Zi([id,n],["buttonText"]);delete r.code;let{week:i}=r;return delete r.week,{codeArg:t,codes:e,week:i,simpleNumberFormat:new Intl.NumberFormat(t),options:r}}function Qe(t){return{id:It(),name:t.name,premiumReleaseDate:t.premiumReleaseDate?new Date(t.premiumReleaseDate):void 0,deps:t.deps||[],reducers:t.reducers||[],isLoadingFuncs:t.isLoadingFuncs||[],contextInit:[].concat(t.contextInit||[]),eventRefiners:t.eventRefiners||{},eventDefMemberAdders:t.eventDefMemberAdders||[],eventSourceRefiners:t.eventSourceRefiners||{},isDraggableTransformers:t.isDraggableTransformers||[],eventDragMutationMassagers:t.eventDragMutationMassagers||[],eventDefMutationAppliers:t.eventDefMutationAppliers||[],dateSelectionTransformers:t.dateSelectionTransformers||[],datePointTransforms:t.datePointTransforms||[],dateSpanTransforms:t.dateSpanTransforms||[],views:t.views||{},viewPropsTransformers:t.viewPropsTransformers||[],isPropsValid:t.isPropsValid||null,externalDefTransforms:t.externalDefTransforms||[],viewContainerAppends:t.viewContainerAppends||[],eventDropTransformers:t.eventDropTransformers||[],componentInteractions:t.componentInteractions||[],calendarInteractions:t.calendarInteractions||[],themeClasses:t.themeClasses||{},eventSourceDefs:t.eventSourceDefs||[],cmdFormatter:t.cmdFormatter,recurringTypes:t.recurringTypes||[],namedTimeZonedImpl:t.namedTimeZonedImpl,initialView:t.initialView||"",elementDraggingImpl:t.elementDraggingImpl,optionChangeHandlers:t.optionChangeHandlers||{},scrollGridImpl:t.scrollGridImpl||null,listenerRefiners:t.listenerRefiners||{},optionRefiners:t.optionRefiners||{},propSetHandlers:t.propSetHandlers||{}}}function N_(t,e){let n={},r={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function i(s){for(let o of s){const a=o.name,l=n[a];l===void 0?(n[a]=o.id,i(o.deps),r=P_(r,o)):l!==o.id&&console.warn(`Duplicate plugin '${a}'`)}}return t&&i(t),i(e),r}function x_(){let t=[],e=[],n;return(r,i)=>((!n||!nt(r,t)||!nt(i,e))&&(n=N_(r,i)),t=r,e=i,n)}function P_(t,e){return{premiumReleaseDate:L_(t.premiumReleaseDate,e.premiumReleaseDate),reducers:t.reducers.concat(e.reducers),isLoadingFuncs:t.isLoadingFuncs.concat(e.isLoadingFuncs),contextInit:t.contextInit.concat(e.contextInit),eventRefiners:Object.assign(Object.assign({},t.eventRefiners),e.eventRefiners),eventDefMemberAdders:t.eventDefMemberAdders.concat(e.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},t.eventSourceRefiners),e.eventSourceRefiners),isDraggableTransformers:t.isDraggableTransformers.concat(e.isDraggableTransformers),eventDragMutationMassagers:t.eventDragMutationMassagers.concat(e.eventDragMutationMassagers),eventDefMutationAppliers:t.eventDefMutationAppliers.concat(e.eventDefMutationAppliers),dateSelectionTransformers:t.dateSelectionTransformers.concat(e.dateSelectionTransformers),datePointTransforms:t.datePointTransforms.concat(e.datePointTransforms),dateSpanTransforms:t.dateSpanTransforms.concat(e.dateSpanTransforms),views:Object.assign(Object.assign({},t.views),e.views),viewPropsTransformers:t.viewPropsTransformers.concat(e.viewPropsTransformers),isPropsValid:e.isPropsValid||t.isPropsValid,externalDefTransforms:t.externalDefTransforms.concat(e.externalDefTransforms),viewContainerAppends:t.viewContainerAppends.concat(e.viewContainerAppends),eventDropTransformers:t.eventDropTransformers.concat(e.eventDropTransformers),calendarInteractions:t.calendarInteractions.concat(e.calendarInteractions),componentInteractions:t.componentInteractions.concat(e.componentInteractions),themeClasses:Object.assign(Object.assign({},t.themeClasses),e.themeClasses),eventSourceDefs:t.eventSourceDefs.concat(e.eventSourceDefs),cmdFormatter:e.cmdFormatter||t.cmdFormatter,recurringTypes:t.recurringTypes.concat(e.recurringTypes),namedTimeZonedImpl:e.namedTimeZonedImpl||t.namedTimeZonedImpl,initialView:t.initialView||e.initialView,elementDraggingImpl:t.elementDraggingImpl||e.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},t.optionChangeHandlers),e.optionChangeHandlers),scrollGridImpl:e.scrollGridImpl||t.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},t.listenerRefiners),e.listenerRefiners),optionRefiners:Object.assign(Object.assign({},t.optionRefiners),e.optionRefiners),propSetHandlers:Object.assign(Object.assign({},t.propSetHandlers),e.propSetHandlers)}}function L_(t,e){return t===void 0?e:e===void 0?t:new Date(Math.max(t.valueOf(),e.valueOf()))}class ot extends hn{}ot.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"};ot.prototype.baseIconClass="fc-icon";ot.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"};ot.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"};ot.prototype.iconOverrideOption="buttonIcons";ot.prototype.iconOverrideCustomButtonOption="icon";ot.prototype.iconOverridePrefix="fc-icon-";function k_(t,e){let n={},r;for(r in t)wi(r,n,t,e);for(r in e)wi(r,n,t,e);return n}function wi(t,e,n,r){if(e[t])return e[t];let i=B_(t,e,n,r);return i&&(e[t]=i),i}function B_(t,e,n,r){let i=n[t],s=r[t],o=c=>i&&i[c]!==null?i[c]:s&&s[c]!==null?s[c]:null,a=o("component"),l=o("superType"),d=null;if(l){if(l===t)throw new Error("Can't have a custom view type that references itself");d=wi(l,e,n,r)}return!a&&d&&(a=d.component),a?{type:t,component:a,defaults:Object.assign(Object.assign({},d?d.defaults:{}),i?i.rawOptions:{}),overrides:Object.assign(Object.assign({},d?d.overrides:{}),s?s.rawOptions:{})}:null}function ga(t){return Tt(t,F_)}function F_(t){let e=typeof t=="function"?{component:t}:t,{component:n}=e;return e.content?n=ma(e):n&&!(n.prototype instanceof q)&&(n=ma(Object.assign(Object.assign({},e),{content:n}))),{superType:e.type,component:n,rawOptions:e}}function ma(t){return e=>E(Ye.Consumer,null,n=>E(ce,{elTag:"div",elClasses:Rc(n.viewSpec),renderProps:Object.assign(Object.assign({},e),{nextDayThreshold:n.options.nextDayThreshold}),generatorName:void 0,customGenerator:t.content,classNameGenerator:t.classNames,didMount:t.didMount,willUnmount:t.willUnmount}))}function G_(t,e,n,r){let i=ga(t),s=ga(e.views),o=k_(i,s);return Tt(o,a=>U_(a,s,e,n,r))}function U_(t,e,n,r,i){let s=t.overrides.duration||t.defaults.duration||r.duration||n.duration,o=null,a="",l="",d={};if(s&&(o=H_(s),o)){let p=yi(o);a=p.unit,p.value===1&&(l=a,d=e[a]?e[a].rawOptions:{})}let c=p=>{let f=p.buttonText||{},h=t.defaults.buttonTextKey;return h!=null&&f[h]!=null?f[h]:f[t.type]!=null?f[t.type]:f[l]!=null?f[l]:null},u=p=>{let f=p.buttonHints||{},h=t.defaults.buttonTextKey;return h!=null&&f[h]!=null?f[h]:f[t.type]!=null?f[t.type]:f[l]!=null?f[l]:null};return{type:t.type,component:t.component,duration:o,durationUnit:a,singleUnit:l,optionDefaults:t.defaults,optionOverrides:Object.assign(Object.assign({},d),t.overrides),buttonTextOverride:c(r)||c(n)||t.overrides.buttonText,buttonTextDefault:c(i)||t.defaults.buttonText||c(en)||t.type,buttonTitleOverride:u(r)||u(n)||t.overrides.buttonHint,buttonTitleDefault:u(i)||t.defaults.buttonHint||u(en)}}let Ea={};function H_(t){let e=JSON.stringify(t),n=Ea[e];return n===void 0&&(n=j(t),Ea[e]=n),n}function V_(t,e){switch(e.type){case"CHANGE_VIEW_TYPE":t=e.viewType}return t}function z_(t,e){switch(e.type){case"SET_OPTION":return Object.assign(Object.assign({},t),{[e.optionName]:e.rawOptionValue});default:return t}}function W_(t,e,n,r){let i;switch(e.type){case"CHANGE_VIEW_TYPE":return r.build(e.dateMarker||n);case"CHANGE_DATE":return r.build(e.dateMarker);case"PREV":if(i=r.buildPrev(t,n),i.isValid)return i;break;case"NEXT":if(i=r.buildNext(t,n),i.isValid)return i;break}return t}function j_(t,e,n){let r=e?e.activeRange:null;return cd({},K_(t,n),r,n)}function q_(t,e,n,r){let i=n?n.activeRange:null;switch(e.type){case"ADD_EVENT_SOURCES":return cd(t,e.sources,i,r);case"REMOVE_EVENT_SOURCE":return Y_(t,e.sourceId);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?dd(t,i,r):t;case"FETCH_EVENT_SOURCES":return hs(t,e.sourceIds?yc(e.sourceIds):ud(t,r),i,e.isRefetch||!1,r);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return X_(t,e.sourceId,e.fetchId,e.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return t}}function $_(t,e,n){let r=e?e.activeRange:null;return hs(t,ud(t,n),r,!0,n)}function ld(t){for(let e in t)if(t[e].isFetching)return!0;return!1}function cd(t,e,n,r){let i={};for(let s of e)i[s.sourceId]=s;return n&&(i=dd(i,n,r)),Object.assign(Object.assign({},t),i)}function Y_(t,e){return Ft(t,n=>n.sourceId!==e)}function dd(t,e,n){return hs(t,Ft(t,r=>Q_(r,e,n)),e,!1,n)}function Q_(t,e,n){return fd(t,n)?!n.options.lazyFetching||!t.fetchRange||t.isFetching||e.start<t.fetchRange.start||e.end>t.fetchRange.end:!t.latestFetchId}function hs(t,e,n,r,i){let s={};for(let o in t){let a=t[o];e[o]?s[o]=Z_(a,n,r,i):s[o]=a}return s}function Z_(t,e,n,r){let{options:i,calendarApi:s}=r,o=r.pluginHooks.eventSourceDefs[t.sourceDefId],a=It();return o.fetch({eventSource:t,range:e,isRefetch:n,context:r},l=>{let{rawEvents:d}=l;i.eventSourceSuccess&&(d=i.eventSourceSuccess.call(s,d,l.response)||d),t.success&&(d=t.success.call(s,d,l.response)||d),r.dispatch({type:"RECEIVE_EVENTS",sourceId:t.sourceId,fetchId:a,fetchRange:e,rawEvents:d})},l=>{let d=!1;i.eventSourceFailure&&(i.eventSourceFailure.call(s,l),d=!0),t.failure&&(t.failure(l),d=!0),d||console.warn(l.message,l),r.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:t.sourceId,fetchId:a,fetchRange:e,error:l})}),Object.assign(Object.assign({},t),{isFetching:!0,latestFetchId:a})}function X_(t,e,n,r){let i=t[e];return i&&n===i.latestFetchId?Object.assign(Object.assign({},t),{[e]:Object.assign(Object.assign({},i),{isFetching:!1,fetchRange:r})}):t}function ud(t,e){return Ft(t,n=>fd(n,e))}function K_(t,e){let n=Mc(e),r=[].concat(t.eventSources||[]),i=[];t.initialEvents&&r.unshift(t.initialEvents),t.events&&r.unshift(t.events);for(let s of r){let o=Oc(s,e,n);o&&i.push(o)}return i}function fd(t,e){return!e.pluginHooks.eventSourceDefs[t.sourceDefId].ignoreRange}function J_(t,e){switch(e.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return e.selection;default:return t}}function eb(t,e){switch(e.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return e.eventInstanceId;default:return t}}function tb(t,e){let n;switch(e.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return n=e.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return t}}function nb(t,e){let n;switch(e.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return n=e.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return t}}function rb(t,e,n,r,i){let s=t.headerToolbar?ya(t.headerToolbar,t,e,n,r,i):null,o=t.footerToolbar?ya(t.footerToolbar,t,e,n,r,i):null;return{header:s,footer:o}}function ya(t,e,n,r,i,s){let o={},a=[],l=!1;for(let d in t){let c=t[d],u=ib(c,e,n,r,i,s);o[d]=u.widgets,a.push(...u.viewsWithButtons),l=l||u.hasTitle}return{sectionWidgets:o,viewsWithButtons:a,hasTitle:l}}function ib(t,e,n,r,i,s){let o=e.direction==="rtl",a=e.customButtons||{},l=n.buttonText||{},d=e.buttonText||{},c=n.buttonHints||{},u=e.buttonHints||{},p=t?t.split(" "):[],f=[],h=!1;return{widgets:p.map(m=>m.split(",").map(v=>{if(v==="title")return h=!0,{buttonName:v};let y,_,b,A,S,M;if(y=a[v])b=I=>{y.click&&y.click.call(I.target,I,I.target)},(A=r.getCustomButtonIconClass(y))||(A=r.getIconClass(v,o))||(S=y.text),M=y.hint||y.text;else if(_=i[v]){f.push(v),b=()=>{s.changeView(v)},(S=_.buttonTextOverride)||(A=r.getIconClass(v,o))||(S=_.buttonTextDefault);let I=_.buttonTextOverride||_.buttonTextDefault;M=Jt(_.buttonTitleOverride||_.buttonTitleDefault||e.viewHint,[I,v],I)}else if(s[v])if(b=()=>{s[v]()},(S=l[v])||(A=r.getIconClass(v,o))||(S=d[v]),v==="prevYear"||v==="nextYear"){let I=v==="prevYear"?"prev":"next";M=Jt(c[I]||u[I],[d.year||"year","year"],d[v])}else M=I=>Jt(c[v]||u[v],[d[I]||I,I],d[v]);return{buttonName:v,buttonClick:b,buttonIcon:A,buttonText:S,buttonHint:M}})),viewsWithButtons:f,hasTitle:h}}class sb{constructor(e,n,r){this.type=e,this.getCurrentData=n,this.dateEnv=r}get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(e){return this.getCurrentData().options[e]}}let ob={ignoreRange:!0,parseMeta(t){return Array.isArray(t.events)?t.events:null},fetch(t,e){e({rawEvents:t.eventSource.meta})}};const ab=Qe({name:"array-event-source",eventSourceDefs:[ob]});let lb={parseMeta(t){return typeof t.events=="function"?t.events:null},fetch(t,e,n){const{dateEnv:r}=t.context,i=t.eventSource.meta;Fv(i.bind(null,Fc(t.range,r)),s=>e({rawEvents:s}),n)}};const cb=Qe({name:"func-event-source",eventSourceDefs:[lb]}),db={method:String,extraParams:T,startParam:String,endParam:String,timeZoneParam:String};let ub={parseMeta(t){return t.url&&(t.format==="json"||!t.format)?{url:t.url,format:"json",method:(t.method||"GET").toUpperCase(),extraParams:t.extraParams,startParam:t.startParam,endParam:t.endParam,timeZoneParam:t.timeZoneParam}:null},fetch(t,e,n){const{meta:r}=t.eventSource,i=hb(r,t.range,t.context);Gv(r.method,r.url,i).then(([s,o])=>{e({rawEvents:s,response:o})},n)}};const fb=Qe({name:"json-event-source",eventSourceRefiners:db,eventSourceDefs:[ub]});function hb(t,e,n){let{dateEnv:r,options:i}=n,s,o,a,l,d={};return s=t.startParam,s==null&&(s=i.startParam),o=t.endParam,o==null&&(o=i.endParam),a=t.timeZoneParam,a==null&&(a=i.timeZoneParam),typeof t.extraParams=="function"?l=t.extraParams():l=t.extraParams||{},Object.assign(d,l),d[s]=r.formatIso(e.start),d[o]=r.formatIso(e.end),r.timeZone!=="local"&&(d[a]=r.timeZone),d}const pb={daysOfWeek:T,startTime:j,endTime:j,duration:j,startRecur:T,endRecur:T};let gb={parse(t,e){if(t.daysOfWeek||t.startTime||t.endTime||t.startRecur||t.endRecur){let n={daysOfWeek:t.daysOfWeek||null,startTime:t.startTime||null,endTime:t.endTime||null,startRecur:t.startRecur?e.createMarker(t.startRecur):null,endRecur:t.endRecur?e.createMarker(t.endRecur):null},r;return t.duration&&(r=t.duration),!r&&t.startTime&&t.endTime&&(r=qE(t.endTime,t.startTime)),{allDayGuess:!t.startTime&&!t.endTime,duration:r,typeData:n}}return null},expand(t,e,n){let r=it(e,{start:t.startRecur,end:t.endRecur});return r?Eb(t.daysOfWeek,t.startTime,r,n):[]}};const mb=Qe({name:"simple-recurring-event",recurringTypes:[gb],eventRefiners:pb});function Eb(t,e,n,r){let i=t?yc(t):null,s=Q(n.start),o=n.end,a=[];for(;s<o;){let l;(!i||i[s.getUTCDay()])&&(e?l=r.add(s,e):l=s,a.push(l)),s=oe(s,1)}return a}const yb=Qe({name:"change-handler",optionChangeHandlers:{events(t,e){va([t],e)},eventSources:va}});function va(t,e){let n=Xi(e.getCurrentData().eventSources);if(n.length===1&&t.length===1&&Array.isArray(n[0]._raw)&&Array.isArray(t[0])){e.dispatch({type:"RESET_RAW_EVENTS",sourceId:n[0].sourceId,rawEvents:t[0]});return}let r=[];for(let i of t){let s=!1;for(let o=0;o<n.length;o+=1)if(n[o]._raw===i){n.splice(o,1),s=!0;break}s||r.push(i)}for(let i of n)e.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:i.sourceId});for(let i of r)e.calendarApi.addEventSource(i)}function vb(t,e){e.emitter.trigger("datesSet",Object.assign(Object.assign({},Fc(t.activeRange,e.dateEnv)),{view:e.viewApi}))}function _b(t,e){let{emitter:n}=e;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",is(t,e))}const bb=[ab,cb,fb,mb,yb,Qe({name:"misc",isLoadingFuncs:[t=>ld(t.eventSources)],propSetHandlers:{dateProfile:vb,eventStore:_b}})];class Tb{constructor(e,n){this.runTaskOption=e,this.drainedOption=n,this.queue=[],this.delayedRunner=new qi(this.drain.bind(this))}request(e,n){this.queue.push(e),this.delayedRunner.request(n)}pause(e){this.delayedRunner.pause(e)}resume(e,n){this.delayedRunner.resume(e,n)}drain(){let{queue:e}=this;for(;e.length;){let n=[],r;for(;r=e.shift();)this.runTask(r),n.push(r);this.drained(n)}}runTask(e){this.runTaskOption&&this.runTaskOption(e)}drained(e){this.drainedOption&&this.drainedOption(e)}}function Rb(t,e,n){let r;return/^(year|month)$/.test(t.currentRangeUnit)?r=t.currentRange:r=t.activeRange,n.formatRange(r.start,r.end,X(e.titleFormat||Ab(t)),{isEndExclusive:t.isRangeAllDay,defaultSeparator:e.titleRangeSeparator})}function Ab(t){let{currentRangeUnit:e}=t;if(e==="year")return{year:"numeric"};if(e==="month")return{year:"numeric",month:"long"};let n=Jn(t.currentRange.start,t.currentRange.end);return n!==null&&n>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}class Ib{constructor(e){this.computeCurrentViewData=B(this._computeCurrentViewData),this.organizeRawLocales=B(C_),this.buildLocale=B(od),this.buildPluginHooks=x_(),this.buildDateEnv=B(Sb),this.buildTheme=B(Db),this.parseToolbars=B(rb),this.buildViewSpecs=B(G_),this.buildDateProfileGenerator=Hn(wb),this.buildViewApi=B(Cb),this.buildViewUiProps=Hn(Nb),this.buildEventUiBySource=B(Ob,Fe),this.buildEventUiBases=B(Mb),this.parseContextBusinessHours=Hn(xb),this.buildTitle=B(Rb),this.emitter=new gv,this.actionRunner=new Tb(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.dispatch=p=>{this.actionRunner.request(p)},this.props=e,this.actionRunner.pause();let n={},r=this.computeOptionsData(e.optionOverrides,n,e.calendarApi),i=r.calendarOptions.initialView||r.pluginHooks.initialView,s=this.computeCurrentViewData(i,r,e.optionOverrides,n);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(s.options);let o=Zy(r.calendarOptions,r.dateEnv),a=s.dateProfileGenerator.build(o);Ve(a.activeRange,o)||(o=a.currentRange.start);let l={dateEnv:r.dateEnv,options:r.calendarOptions,pluginHooks:r.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData};for(let p of r.pluginHooks.contextInit)p(l);let d=j_(r.calendarOptions,a,l),c={dynamicOptionOverrides:n,currentViewType:i,currentDate:o,dateProfile:a,businessHours:this.parseContextBusinessHours(l),eventSources:d,eventUiBases:{},eventStore:$e(),renderableEventStore:$e(),dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(l).selectionConfig},u=Object.assign(Object.assign({},l),c);for(let p of r.pluginHooks.reducers)Object.assign(c,p(null,null,u));Zr(c,l)&&this.emitter.trigger("loading",!0),this.state=c,this.updateData(),this.actionRunner.resume()}resetOptions(e,n){let{props:r}=this;n===void 0?r.optionOverrides=e:(r.optionOverrides=Object.assign(Object.assign({},r.optionOverrides||{}),e),this.optionsForRefining.push(...n)),(n===void 0||n.length)&&this.actionRunner.request({type:"NOTHING"})}_handleAction(e){let{props:n,state:r,emitter:i}=this,s=z_(r.dynamicOptionOverrides,e),o=this.computeOptionsData(n.optionOverrides,s,n.calendarApi),a=V_(r.currentViewType,e),l=this.computeCurrentViewData(a,o,n.optionOverrides,s);n.calendarApi.currentDataManager=this,i.setThisContext(n.calendarApi),i.setOptions(l.options);let d={dateEnv:o.dateEnv,options:o.calendarOptions,pluginHooks:o.pluginHooks,calendarApi:n.calendarApi,dispatch:this.dispatch,emitter:i,getCurrentData:this.getCurrentData},{currentDate:c,dateProfile:u}=r;this.data&&this.data.dateProfileGenerator!==l.dateProfileGenerator&&(u=l.dateProfileGenerator.build(c)),c=Qy(c,e),u=W_(u,e,c,l.dateProfileGenerator),(e.type==="PREV"||e.type==="NEXT"||!Ve(u.currentRange,c))&&(c=u.currentRange.start);let p=q_(r.eventSources,e,u,d),f=dv(r.eventStore,e,p,u,d),g=ld(p)&&!l.options.progressiveEventRendering&&r.renderableEventStore||f,{eventUiSingleBase:m,selectionConfig:v}=this.buildViewUiProps(d),y=this.buildEventUiBySource(p),_=this.buildEventUiBases(g.defs,m,y),b={dynamicOptionOverrides:s,currentViewType:a,currentDate:c,dateProfile:u,eventSources:p,eventStore:f,renderableEventStore:g,selectionConfig:v,eventUiBases:_,businessHours:this.parseContextBusinessHours(d),dateSelection:J_(r.dateSelection,e),eventSelection:eb(r.eventSelection,e),eventDrag:tb(r.eventDrag,e),eventResize:nb(r.eventResize,e)},A=Object.assign(Object.assign({},d),b);for(let I of o.pluginHooks.reducers)Object.assign(b,I(r,e,A));let S=Zr(r,d),M=Zr(b,d);!S&&M?i.trigger("loading",!0):S&&!M&&i.trigger("loading",!1),this.state=b,n.onAction&&n.onAction(e)}updateData(){let{props:e,state:n}=this,r=this.data,i=this.computeOptionsData(e.optionOverrides,n.dynamicOptionOverrides,e.calendarApi),s=this.computeCurrentViewData(n.currentViewType,i,e.optionOverrides,n.dynamicOptionOverrides),o=this.data=Object.assign(Object.assign(Object.assign({viewTitle:this.buildTitle(n.dateProfile,s.options,i.dateEnv),calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},i),s),n),a=i.pluginHooks.optionChangeHandlers,l=r&&r.calendarOptions,d=i.calendarOptions;if(l&&l!==d){l.timeZone!==d.timeZone&&(n.eventSources=o.eventSources=$_(o.eventSources,n.dateProfile,o),n.eventStore=o.eventStore=la(o.eventStore,r.dateEnv,o.dateEnv),n.renderableEventStore=o.renderableEventStore=la(o.renderableEventStore,r.dateEnv,o.dateEnv));for(let c in a)(this.optionsForHandling.indexOf(c)!==-1||l[c]!==d[c])&&a[c](d[c],o)}this.optionsForHandling=[],e.onData&&e.onData(o)}computeOptionsData(e,n,r){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&n===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:i,pluginHooks:s,localeDefaults:o,availableLocaleData:a,extra:l}=this.processRawCalendarOptions(e,n);_a(l);let d=this.buildDateEnv(i.timeZone,i.locale,i.weekNumberCalculation,i.firstDay,i.weekText,s,a,i.defaultRangeSeparator),c=this.buildViewSpecs(s.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,o),u=this.buildTheme(i,s),p=this.parseToolbars(i,this.stableOptionOverrides,u,c,r);return this.stableCalendarOptionsData={calendarOptions:i,pluginHooks:s,dateEnv:d,viewSpecs:c,theme:u,toolbarConfig:p,localeDefaults:o,availableRawLocales:a.map}}processRawCalendarOptions(e,n){let{locales:r,locale:i}=zr([en,e,n]),s=this.organizeRawLocales(r),o=s.map,a=this.buildLocale(i||s.defaultCode,o).options,l=this.buildPluginHooks(e.plugins||[],bb),d=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},na),ra),ia),l.listenerRefiners),l.optionRefiners),c={},u=zr([en,a,e,n]),p={},f=this.currentCalendarOptionsInput,h=this.currentCalendarOptionsRefined,g=!1;for(let m in u)this.optionsForRefining.indexOf(m)===-1&&(u[m]===f[m]||lt[m]&&m in f&&lt[m](f[m],u[m]))?p[m]=h[m]:d[m]?(p[m]=d[m](u[m]),g=!0):c[m]=f[m];return g&&(this.currentCalendarOptionsInput=u,this.currentCalendarOptionsRefined=p,this.stableOptionOverrides=e,this.stableDynamicOptionOverrides=n),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:l,availableLocaleData:s,localeDefaults:a,extra:c}}_computeCurrentViewData(e,n,r,i){let s=n.viewSpecs[e];if(!s)throw new Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:o,extra:a}=this.processRawViewOptions(s,n.pluginHooks,n.localeDefaults,r,i);_a(a);let l=this.buildDateProfileGenerator({dateProfileGeneratorClass:s.optionDefaults.dateProfileGeneratorClass,duration:s.duration,durationUnit:s.durationUnit,usesMinMaxTime:s.optionDefaults.usesMinMaxTime,dateEnv:n.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:o.slotMinTime,slotMaxTime:o.slotMaxTime,showNonCurrentDates:o.showNonCurrentDates,dayCount:o.dayCount,dateAlignment:o.dateAlignment,dateIncrement:o.dateIncrement,hiddenDays:o.hiddenDays,weekends:o.weekends,nowInput:o.now,validRangeInput:o.validRange,visibleRangeInput:o.visibleRange,fixedWeekCount:o.fixedWeekCount}),d=this.buildViewApi(e,this.getCurrentData,n.dateEnv);return{viewSpec:s,options:o,dateProfileGenerator:l,viewApi:d}}processRawViewOptions(e,n,r,i,s){let o=zr([en,e.optionDefaults,r,i,e.optionOverrides,s]),a=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},na),ra),ia),Iy),n.listenerRefiners),n.optionRefiners),l={},d=this.currentViewOptionsInput,c=this.currentViewOptionsRefined,u=!1,p={};for(let f in o)o[f]===d[f]||lt[f]&&lt[f](o[f],d[f])?l[f]=c[f]:(o[f]===this.currentCalendarOptionsInput[f]||lt[f]&&lt[f](o[f],this.currentCalendarOptionsInput[f])?f in this.currentCalendarOptionsRefined&&(l[f]=this.currentCalendarOptionsRefined[f]):a[f]?l[f]=a[f](o[f]):p[f]=o[f],u=!0);return u&&(this.currentViewOptionsInput=o,this.currentViewOptionsRefined=l),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:p}}}function Sb(t,e,n,r,i,s,o,a){let l=od(e||o.defaultCode,o.map);return new Ly({calendarSystem:"gregory",timeZone:t,namedTimeZoneImpl:s.namedTimeZonedImpl,locale:l,weekNumberCalculation:n,firstDay:r,weekText:i,cmdFormatter:s.cmdFormatter,defaultSeparator:a})}function Db(t,e){let n=e.themeClasses[t.themeSystem]||ot;return new n(t)}function wb(t){let e=t.dateProfileGeneratorClass||Ic;return new e(t)}function Cb(t,e,n){return new sb(t,e,n)}function Ob(t){return Tt(t,e=>e.ui)}function Mb(t,e,n){let r={"":e};for(let i in t){let s=t[i];s.sourceId&&n[s.sourceId]&&(r[i]=n[s.sourceId])}return r}function Nb(t){let{options:e}=t;return{eventUiSingleBase:sr({display:e.eventDisplay,editable:e.editable,startEditable:e.eventStartEditable,durationEditable:e.eventDurationEditable,constraint:e.eventConstraint,overlap:typeof e.eventOverlap=="boolean"?e.eventOverlap:void 0,allow:e.eventAllow,backgroundColor:e.eventBackgroundColor,borderColor:e.eventBorderColor,textColor:e.eventTextColor,color:e.eventColor},t),selectionConfig:sr({constraint:e.selectConstraint,overlap:typeof e.selectOverlap=="boolean"?e.selectOverlap:void 0,allow:e.selectAllow},t)}}function Zr(t,e){for(let n of e.pluginHooks.isLoadingFuncs)if(n(t))return!0;return!1}function xb(t){return vv(t.options.businessHours,t)}function _a(t,e){for(let n in t)console.warn(`Unknown option '${n}'`)}class Pb extends q{render(){let e=this.props.widgetGroups.map(n=>this.renderWidgetGroup(n));return E("div",{className:"fc-toolbar-chunk"},...e)}renderWidgetGroup(e){let{props:n}=this,{theme:r}=this.context,i=[],s=!0;for(let o of e){let{buttonName:a,buttonClick:l,buttonText:d,buttonIcon:c,buttonHint:u}=o;if(a==="title")s=!1,i.push(E("h2",{className:"fc-toolbar-title",id:n.titleId},n.title));else{let p=a===n.activeButton,f=!n.isTodayEnabled&&a==="today"||!n.isPrevEnabled&&a==="prev"||!n.isNextEnabled&&a==="next",h=[`fc-${a}-button`,r.getClass("button")];p&&h.push(r.getClass("buttonActive")),i.push(E("button",{type:"button",title:typeof u=="function"?u(n.navUnit):u,disabled:f,"aria-pressed":p,className:h.join(" "),onClick:l},d||(c?E("span",{className:c,role:"img"}):"")))}}if(i.length>1){let o=s&&r.getClass("buttonGroup")||"";return E("div",{className:o},...i)}return i[0]}}class ba extends q{render(){let{model:e,extraClassName:n}=this.props,r=!1,i,s,o=e.sectionWidgets,a=o.center;return o.left?(r=!0,i=o.left):i=o.start,o.right?(r=!0,s=o.right):s=o.end,E("div",{className:[n||"","fc-toolbar",r?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",i||[]),this.renderSection("center",a||[]),this.renderSection("end",s||[]))}renderSection(e,n){let{props:r}=this;return E(Pb,{key:e,widgetGroups:n,title:r.title,navUnit:r.navUnit,activeButton:r.activeButton,isTodayEnabled:r.isTodayEnabled,isPrevEnabled:r.isPrevEnabled,isNextEnabled:r.isNextEnabled,titleId:r.titleId})}}class Lb extends q{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=e=>{this.el=e,qe(this.props.elRef,e),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:e,state:n}=this,{aspectRatio:r}=e,i=["fc-view-harness",r||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],s="",o="";return r?n.availableWidth!==null?s=n.availableWidth/r:o=`${1/r*100}%`:s=e.height||"",E("div",{"aria-labelledby":e.labeledById,ref:this.handleEl,className:i.join(" "),style:{height:s,paddingBottom:o}},e.children)}componentDidMount(){this.context.addResizeHandler(this.handleResize)}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateAvailableWidth(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})}}class kb extends Hc{constructor(e){super(e),this.handleSegClick=(n,r)=>{let{component:i}=this,{context:s}=i,o=Ai(r);if(o&&i.isValidSegDownEl(n.target)){let a=Ue(n.target,".fc-event-forced-url"),l=a?a.querySelector("a[href]").href:"";s.emitter.trigger("eventClick",{el:r,event:new Se(i.context,o.eventRange.def,o.eventRange.instance),jsEvent:n,view:s.viewApi}),l&&!n.defaultPrevented&&(window.location.href=l)}},this.destroy=hc(e.el,"click",".fc-event",this.handleSegClick)}}class Bb extends Hc{constructor(e){super(e),this.handleEventElRemove=n=>{n===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(n,r)=>{Ai(r)&&(this.currentSegEl=r,this.triggerEvent("eventMouseEnter",n,r))},this.handleSegLeave=(n,r)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent("eventMouseLeave",n,r))},this.removeHoverListeners=BE(e.el,".fc-event",this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,n,r){let{component:i}=this,{context:s}=i,o=Ai(r);(!n||i.isValidSegDownEl(n.target))&&s.emitter.trigger(e,{el:r,event:new Se(s,o.eventRange.def,o.eventRange.instance),jsEvent:n,view:s.viewApi})}}class Fb extends St{constructor(){super(...arguments),this.buildViewContext=B(Fy),this.buildViewPropTransformers=B(Ub),this.buildToolbarProps=B(Gb),this.headerRef=ue(),this.footerRef=ue(),this.interactionsStore={},this.state={viewLabelId:tt()},this.registerInteractiveComponent=(e,n)=>{let r=Vv(e,n),o=[kb,Bb].concat(this.props.pluginHooks.componentInteractions).map(a=>new a(r));this.interactionsStore[e.uid]=o,fa[e.uid]=r},this.unregisterInteractiveComponent=e=>{let n=this.interactionsStore[e.uid];if(n){for(let r of n)r.destroy();delete this.interactionsStore[e.uid]}delete fa[e.uid]},this.resizeRunner=new qi(()=>{this.props.emitter.trigger("_resize",!0),this.props.emitter.trigger("windowResize",{view:this.props.viewApi})}),this.handleWindowResize=e=>{let{options:n}=this.props;n.handleWindowResize&&e.target===window&&this.resizeRunner.request(n.windowResizeDelay)}}render(){let{props:e}=this,{toolbarConfig:n,options:r}=e,i=this.buildToolbarProps(e.viewSpec,e.dateProfile,e.dateProfileGenerator,e.currentDate,pn(e.options.now,e.dateEnv),e.viewTitle),s=!1,o="",a;e.isHeightAuto||e.forPrint?o="":r.height!=null?s=!0:r.contentHeight!=null?o=r.contentHeight:a=Math.max(r.aspectRatio,.5);let l=this.buildViewContext(e.viewSpec,e.viewApi,e.options,e.dateProfileGenerator,e.dateEnv,e.theme,e.pluginHooks,e.dispatch,e.getCurrentData,e.emitter,e.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),d=n.header&&n.header.hasTitle?this.state.viewLabelId:void 0;return E(Ye.Provider,{value:l},n.header&&E(ba,Object.assign({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.header,titleId:d},i)),E(Lb,{liquid:s,height:o,aspectRatio:a,labeledById:d},this.renderView(e),this.buildAppendContent()),n.footer&&E(ba,Object.assign({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footer,titleId:""},i)))}componentDidMount(){let{props:e}=this;this.calendarInteractions=e.pluginHooks.calendarInteractions.map(r=>new r(e)),window.addEventListener("resize",this.handleWindowResize);let{propSetHandlers:n}=e.pluginHooks;for(let r in n)n[r](e[r],e)}componentDidUpdate(e){let{props:n}=this,{propSetHandlers:r}=n.pluginHooks;for(let i in r)n[i]!==e[i]&&r[i](n[i],n)}componentWillUnmount(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(let e of this.calendarInteractions)e.destroy();this.props.emitter.trigger("_unmount")}buildAppendContent(){let{props:e}=this,n=e.pluginHooks.viewContainerAppends.map(r=>r(e));return E(Y,{},...n)}renderView(e){let{pluginHooks:n}=e,{viewSpec:r}=e,i={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},s=this.buildViewPropTransformers(n.viewPropsTransformers);for(let a of s)Object.assign(i,a.transform(i,e));let o=r.component;return E(o,Object.assign({},i))}}function Gb(t,e,n,r,i,s){let o=n.build(i,void 0,!1),a=n.buildPrev(e,r,!1),l=n.buildNext(e,r,!1);return{title:s,activeButton:t.type,navUnit:t.singleUnit,isTodayEnabled:o.isValid&&!Ve(e.currentRange,i),isPrevEnabled:a.isValid,isNextEnabled:l.isValid}}function Ub(t){return t.map(e=>new e)}class Hb extends zv{constructor(e,n={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=r=>{switch(r.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":this.renderRunner.tryDrain()}},this.handleData=r=>{this.currentData=r,this.renderRunner.request(r.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:r}=this;rr(()=>{on(E(Hv,{options:r.calendarOptions,theme:r.theme,emitter:r.emitter},(i,s,o,a)=>(this.setClassNames(i),this.setHeight(s),E(Tc.Provider,{value:this.customContentRenderId},E(Fb,Object.assign({isHeightAuto:o,forPrint:a},r))))),this.el)})}else this.isRendered&&(this.isRendered=!1,on(null,this.el),this.setClassNames([]),this.setHeight(""))},IE(e),this.el=e,this.renderRunner=new qi(this.handleRenderRequest),new Ib({optionOverrides:n,calendarApi:this,onAction:this.handleAction,onData:this.handleData})}render(){let e=this.isRendering;e?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()}destroy(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())}updateSize(){rr(()=>{super.updateSize()})}batchRendering(e){this.renderRunner.pause("batchRendering"),e(),this.renderRunner.resume("batchRendering")}pauseRendering(){this.renderRunner.pause("pauseRendering")}resumeRendering(){this.renderRunner.resume("pauseRendering",!0)}resetOptions(e,n){this.currentDataManager.resetOptions(e,n)}setClassNames(e){if(!nt(e,this.currentClassNames)){let{classList:n}=this.el;for(let r of this.currentClassNames)n.remove(r);for(let r of e)n.add(r);this.currentClassNames=e}}setHeight(e){fc(this.el,"height",e)}}class Vb extends xe{constructor(){super(...arguments),this.headerElRef=ue()}renderSimpleLayout(e,n){let{props:r,context:i}=this,s=[],o=or(i.options);return e&&s.push({type:"header",key:"header",isSticky:o,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),s.push({type:"body",key:"body",liquid:!0,chunk:{content:n}}),E(an,{elClasses:["fc-daygrid"],viewSpec:i.viewSpec},E(cs,{liquid:!r.isHeightAuto&&!r.forPrint,collapsibleWidth:r.forPrint,cols:[],sections:s}))}renderHScrollLayout(e,n,r,i){let s=this.context.pluginHooks.scrollGridImpl;if(!s)throw new Error("No ScrollGrid implementation");let{props:o,context:a}=this,l=!o.forPrint&&or(a.options),d=!o.forPrint&&Xc(a.options),c=[];return e&&c.push({type:"header",key:"header",isSticky:l,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),c.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:n}]}),d&&c.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:Di}]}),E(an,{elClasses:["fc-daygrid"],viewSpec:a.viewSpec},E(s,{liquid:!o.isHeightAuto&&!o.forPrint,forPrint:o.forPrint,collapsibleWidth:o.forPrint,colGroups:[{cols:[{span:r,minWidth:i}]}],sections:c}))}}function Nn(t,e){let n=[];for(let r=0;r<e;r+=1)n[r]=[];for(let r of t)n[r.row].push(r);return n}function xn(t,e){let n=[];for(let r=0;r<e;r+=1)n[r]=[];for(let r of t)n[r.firstCol].push(r);return n}function Ta(t,e){let n=[];if(t){for(let r=0;r<e;r+=1)n[r]={affectedInstances:t.affectedInstances,isEvent:t.isEvent,segs:[]};for(let r of t.segs)n[r.row].segs.push(r)}else for(let r=0;r<e;r+=1)n[r]=null;return n}const hd=X({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function pd(t){let{display:e}=t.eventRange.ui;return e==="list-item"||e==="auto"&&!t.eventRange.def.allDay&&t.firstCol===t.lastCol&&t.isStart&&t.isEnd}class gd extends q{render(){let{props:e}=this;return E(Kc,Object.assign({},e,{elClasses:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:hd,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))}}class md extends q{render(){let{props:e,context:n}=this,{options:r}=n,{seg:i}=e,s=r.eventTimeFormat||hd,o=tn(i,s,n,!0,e.defaultDisplayEventEnd);return E(Rr,Object.assign({},e,{elTag:"a",elClasses:["fc-daygrid-event","fc-daygrid-dot-event"],elAttrs:os(e.seg,n),defaultGenerator:zb,timeText:o,isResizing:!1,isDateSelecting:!1}))}}function zb(t){return E(Y,null,E("div",{className:"fc-daygrid-event-dot",style:{borderColor:t.borderColor||t.backgroundColor}}),t.timeText&&E("div",{className:"fc-event-time"},t.timeText),E("div",{className:"fc-event-title"},t.event.title||E(Y,null," ")))}class Wb extends q{constructor(){super(...arguments),this.compileSegs=B(jb)}render(){let{props:e}=this,{allSegs:n,invisibleSegs:r}=this.compileSegs(e.singlePlacements);return E(nd,{elClasses:["fc-daygrid-more-link"],dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:n,hiddenSegs:r,alignmentElRef:e.alignmentElRef,alignGridTop:e.alignGridTop,extraDateSpan:e.extraDateSpan,popoverContent:()=>{let i=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return E(Y,null,n.map(s=>{let o=s.eventRange.instance.instanceId;return E("div",{className:"fc-daygrid-event-harness",key:o,style:{visibility:i[o]?"hidden":""}},pd(s)?E(md,Object.assign({seg:s,isDragging:!1,isSelected:o===e.eventSelection,defaultDisplayEventEnd:!1},ze(s,e.todayRange))):E(gd,Object.assign({seg:s,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:o===e.eventSelection,defaultDisplayEventEnd:!1},ze(s,e.todayRange))))}))}})}}function jb(t){let e=[],n=[];for(let r of t)e.push(r.seg),r.isVisible||n.push(r.seg);return{allSegs:e,invisibleSegs:n}}const qb=X({week:"narrow"});class $b extends xe{constructor(){super(...arguments),this.rootElRef=ue(),this.state={dayNumberId:tt()},this.handleRootEl=e=>{qe(this.rootElRef,e),qe(this.props.elRef,e)}}render(){let{context:e,props:n,state:r,rootElRef:i}=this,{options:s,dateEnv:o}=e,{date:a,dateProfile:l}=n;const d=n.showDayNumber&&Qb(a,l.currentRange,o);return E(us,{elTag:"td",elRef:this.handleRootEl,elClasses:["fc-daygrid-day",...n.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},n.extraDataAttrs),n.showDayNumber?{"aria-labelledby":r.dayNumberId}:{}),{role:"gridcell"}),defaultGenerator:Yb,date:a,dateProfile:l,todayRange:n.todayRange,showDayNumber:n.showDayNumber,isMonthStart:d,extraRenderProps:n.extraRenderProps},(c,u)=>E("div",{ref:n.innerElRef,className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",style:{minHeight:n.minHeight}},n.showWeekNumber&&E(td,{elTag:"a",elClasses:["fc-daygrid-week-number"],elAttrs:Gt(e,a,"week"),date:a,defaultFormat:qb}),!u.isDisabled&&(n.showDayNumber||fs(s)||n.forceDayTop)?E("div",{className:"fc-daygrid-day-top"},E(c,{elTag:"a",elClasses:["fc-daygrid-day-number",d&&"fc-daygrid-month-start"],elAttrs:Object.assign(Object.assign({},Gt(e,a)),{id:r.dayNumberId})})):n.showDayNumber?E("div",{className:"fc-daygrid-day-top",style:{visibility:"hidden"}},E("a",{className:"fc-daygrid-day-number"}," ")):void 0,E("div",{className:"fc-daygrid-day-events",ref:n.fgContentElRef},n.fgContent,E("div",{className:"fc-daygrid-day-bottom",style:{marginTop:n.moreMarginTop}},E(Wb,{allDayDate:a,singlePlacements:n.singlePlacements,moreCnt:n.moreCnt,alignmentElRef:i,alignGridTop:!n.showDayNumber,extraDateSpan:n.extraDateSpan,dateProfile:n.dateProfile,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,todayRange:n.todayRange}))),E("div",{className:"fc-daygrid-day-bg"},n.bgContent)))}}function Yb(t){return t.dayNumberText||E(Y,null," ")}function Qb(t,e,n){const{start:r,end:i}=e,s=rt(i,-1),o=n.getYear(r),a=n.getMonth(r),l=n.getYear(s),d=n.getMonth(s);return!(o===l&&a===d)&&(t.valueOf()===r.valueOf()||n.getDay(t)===1&&t.valueOf()<i.valueOf())}function Ed(t){return t.eventRange.instance.instanceId+":"+t.firstCol}function yd(t){return Ed(t)+":"+t.lastCol}function Zb(t,e,n,r,i,s,o){let a=new Jb(v=>{let y=t[v.index].eventRange.instance.instanceId+":"+v.span.start+":"+(v.span.end-1);return i[y]||1});a.allowReslicing=!0,a.strictOrder=r,e===!0||n===!0?(a.maxCoord=s,a.hiddenConsumes=!0):typeof e=="number"?a.maxStackCnt=e:typeof n=="number"&&(a.maxStackCnt=n,a.hiddenConsumes=!0);let l=[],d=[];for(let v=0;v<t.length;v+=1){let y=t[v],_=yd(y);i[_]!=null?l.push({index:v,span:{start:y.firstCol,end:y.lastCol+1}}):d.push(y)}let c=a.addSegs(l),u=a.toRects(),{singleColPlacements:p,multiColPlacements:f,leftoverMargins:h}=Xb(u,t,o),g=[],m=[];for(let v of d){f[v.firstCol].push({seg:v,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let y=v.firstCol;y<=v.lastCol;y+=1)p[y].push({seg:Lt(v,y,y+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let v=0;v<o.length;v+=1)g.push(0);for(let v of c){let y=t[v.index],_=v.span;f[_.start].push({seg:Lt(y,_.start,_.end,o),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let b=_.start;b<_.end;b+=1)g[b]+=1,p[b].push({seg:Lt(y,b,b+1,o),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let v=0;v<o.length;v+=1)m.push(h[v]);return{singleColPlacements:p,multiColPlacements:f,moreCnts:g,moreMarginTops:m}}function Xb(t,e,n){let r=Kb(t,n.length),i=[],s=[],o=[];for(let a=0;a<n.length;a+=1){let l=r[a],d=[],c=0,u=0;for(let f of l){let h=e[f.index];d.push({seg:Lt(h,a,a+1,n),isVisible:!0,isAbsolute:!1,absoluteTop:f.levelCoord,marginTop:f.levelCoord-c}),c=f.levelCoord+f.thickness}let p=[];c=0,u=0;for(let f of l){let h=e[f.index],g=f.span.end-f.span.start>1,m=f.span.start===a;u+=f.levelCoord-c,c=f.levelCoord+f.thickness,g?(u+=f.thickness,m&&p.push({seg:Lt(h,f.span.start,f.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:f.levelCoord,marginTop:0})):m&&(p.push({seg:Lt(h,f.span.start,f.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:f.levelCoord,marginTop:u}),u=0)}i.push(d),s.push(p),o.push(u)}return{singleColPlacements:i,multiColPlacements:s,leftoverMargins:o}}function Kb(t,e){let n=[];for(let r=0;r<e;r+=1)n.push([]);for(let r of t)for(let i=r.span.start;i<r.span.end;i+=1)n[i].push(r);return n}function Lt(t,e,n,r){if(t.firstCol===e&&t.lastCol===n-1)return t;let i=t.eventRange,s=i.range,o=it(s,{start:r[e].date,end:oe(r[n-1].date,1)});return Object.assign(Object.assign({},t),{firstCol:e,lastCol:n-1,eventRange:{def:i.def,ui:Object.assign(Object.assign({},i.ui),{durationEditable:!1}),instance:i.instance,range:o},isStart:t.isStart&&o.start.valueOf()===s.start.valueOf(),isEnd:t.isEnd&&o.end.valueOf()===s.end.valueOf()})}class Jb extends Vc{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(e){const n=super.addSegs(e),{entriesByLevel:r}=this,i=s=>!this.forceHidden[_t(s)];for(let s=0;s<r.length;s+=1)r[s]=r[s].filter(i);return n}handleInvalidInsertion(e,n,r){const{entriesByLevel:i,forceHidden:s}=this,{touchingEntry:o,touchingLevel:a,touchingLateral:l}=e;if(this.hiddenConsumes&&o){const d=_t(o);if(!s[d])if(this.allowReslicing){const c=Object.assign(Object.assign({},o),{span:ls(o.span,n.span)}),u=_t(c);s[u]=!0,i[a][l]=c,r.push(c),this.splitEntry(o,n,r)}else s[d]=!0,r.push(o)}super.handleInvalidInsertion(e,n,r)}}class vd extends xe{constructor(){super(...arguments),this.cellElRefs=new He,this.frameElRefs=new He,this.fgElRefs=new He,this.segHarnessRefs=new He,this.rootElRef=ue(),this.state={framePositions:null,maxContentHeight:null,segHeights:{}},this.handleResize=e=>{e&&this.updateSizing(!0)}}render(){let{props:e,state:n,context:r}=this,{options:i}=r,s=e.cells.length,o=xn(e.businessHourSegs,s),a=xn(e.bgEventSegs,s),l=xn(this.getHighlightSegs(),s),d=xn(this.getMirrorSegs(),s),{singleColPlacements:c,multiColPlacements:u,moreCnts:p,moreMarginTops:f}=Zb(ss(e.fgEventSegs,i.eventOrder),e.dayMaxEvents,e.dayMaxEventRows,i.eventOrderStrict,n.segHeights,n.maxContentHeight,e.cells),h=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{};return E("tr",{ref:this.rootElRef,role:"row"},e.renderIntro&&e.renderIntro(),e.cells.map((g,m)=>{let v=this.renderFgSegs(m,e.forPrint?c[m]:u[m],e.todayRange,h),y=this.renderFgSegs(m,eT(d[m],u),e.todayRange,{},!!e.eventDrag,!!e.eventResize,!1);return E($b,{key:g.key,elRef:this.cellElRefs.createRef(g.key),innerElRef:this.frameElRefs.createRef(g.key),dateProfile:e.dateProfile,date:g.date,showDayNumber:e.showDayNumbers,showWeekNumber:e.showWeekNumbers&&m===0,forceDayTop:e.showWeekNumbers,todayRange:e.todayRange,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,extraRenderProps:g.extraRenderProps,extraDataAttrs:g.extraDataAttrs,extraClassNames:g.extraClassNames,extraDateSpan:g.extraDateSpan,moreCnt:p[m],moreMarginTop:f[m],singlePlacements:c[m],fgContentElRef:this.fgElRefs.createRef(g.key),fgContent:E(Y,null,E(Y,null,v),E(Y,null,y)),bgContent:E(Y,null,this.renderFillSegs(l[m],"highlight"),this.renderFillSegs(o[m],"non-business"),this.renderFillSegs(a[m],"bg-event")),minHeight:e.cellMinHeight})}))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,n){let r=this.props;this.updateSizing(!Fe(e,r))}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}getHighlightSegs(){let{props:e}=this;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs}getMirrorSegs(){let{props:e}=this;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]}renderFgSegs(e,n,r,i,s,o,a){let{context:l}=this,{eventSelection:d}=this.props,{framePositions:c}=this.state,u=this.props.cells.length===1,p=s||o||a,f=[];if(c)for(let h of n){let{seg:g}=h,{instanceId:m}=g.eventRange.instance,v=h.isVisible&&!i[m],y=h.isAbsolute,_="",b="";y&&(l.isRtl?(b=0,_=c.lefts[g.lastCol]-c.lefts[g.firstCol]):(_=0,b=c.rights[g.firstCol]-c.rights[g.lastCol])),f.push(E("div",{className:"fc-daygrid-event-harness"+(y?" fc-daygrid-event-harness-abs":""),key:Ed(g),ref:p?null:this.segHarnessRefs.createRef(yd(g)),style:{visibility:v?"":"hidden",marginTop:y?"":h.marginTop,top:y?h.absoluteTop:"",left:_,right:b}},pd(g)?E(md,Object.assign({seg:g,isDragging:s,isSelected:m===d,defaultDisplayEventEnd:u},ze(g,r))):E(gd,Object.assign({seg:g,isDragging:s,isResizing:o,isDateSelecting:a,isSelected:m===d,defaultDisplayEventEnd:u},ze(g,r)))))}return f}renderFillSegs(e,n){let{isRtl:r}=this.context,{todayRange:i}=this.props,{framePositions:s}=this.state,o=[];if(s)for(let a of e){let l=r?{right:0,left:s.lefts[a.lastCol]-s.lefts[a.firstCol]}:{left:0,right:s.rights[a.firstCol]-s.rights[a.lastCol]};o.push(E("div",{key:Bc(a.eventRange),className:"fc-daygrid-bg-harness",style:l},n==="bg-event"?E(Jc,Object.assign({seg:a},ze(a,i))):ed(n)))}return E(Y,{},...o)}updateSizing(e){let{props:n,state:r,frameElRefs:i}=this;if(!n.forPrint&&n.clientWidth!==null){if(e){let l=n.cells.map(d=>i.currentMap[d.key]);if(l.length){let d=this.rootElRef.current,c=new Ut(d,l,!0,!1);(!r.framePositions||!r.framePositions.similarTo(c))&&this.setState({framePositions:new Ut(d,l,!0,!1)})}}const s=this.state.segHeights,o=this.querySegHeights(),a=n.dayMaxEvents===!0||n.dayMaxEventRows===!0;this.safeSetState({segHeights:Object.assign(Object.assign({},s),o),maxContentHeight:a?this.computeMaxContentHeight():null})}}querySegHeights(){let e=this.segHarnessRefs.currentMap,n={};for(let r in e){let i=Math.round(e[r].getBoundingClientRect().height);n[r]=Math.max(n[r]||0,i)}return n}computeMaxContentHeight(){let e=this.props.cells[0].key,n=this.cellElRefs.currentMap[e],r=this.fgElRefs.currentMap[e];return n.getBoundingClientRect().bottom-r.getBoundingClientRect().top}getCellEls(){let e=this.cellElRefs.currentMap;return this.props.cells.map(n=>e[n.key])}}vd.addStateEquality({segHeights:Fe});function eT(t,e){if(!t.length)return[];let n=tT(e);return t.map(r=>({seg:r,isVisible:!0,isAbsolute:!0,absoluteTop:n[r.eventRange.instance.instanceId],marginTop:0}))}function tT(t){let e={};for(let n of t)for(let r of n)e[r.seg.eventRange.instance.instanceId]=r.absoluteTop;return e}class nT extends xe{constructor(){super(...arguments),this.splitBusinessHourSegs=B(Nn),this.splitBgEventSegs=B(Nn),this.splitFgEventSegs=B(Nn),this.splitDateSelectionSegs=B(Nn),this.splitEventDrag=B(Ta),this.splitEventResize=B(Ta),this.rowRefs=new He}render(){let{props:e,context:n}=this,r=e.cells.length,i=this.splitBusinessHourSegs(e.businessHourSegs,r),s=this.splitBgEventSegs(e.bgEventSegs,r),o=this.splitFgEventSegs(e.fgEventSegs,r),a=this.splitDateSelectionSegs(e.dateSelectionSegs,r),l=this.splitEventDrag(e.eventDrag,r),d=this.splitEventResize(e.eventResize,r),c=r>=7&&e.clientWidth?e.clientWidth/n.options.aspectRatio/6:null;return E(Wt,{unit:"day"},(u,p)=>E(Y,null,e.cells.map((f,h)=>E(vd,{ref:this.rowRefs.createRef(h),key:f.length?f[0].date.toISOString():h,showDayNumbers:r>1,showWeekNumbers:e.showWeekNumbers,todayRange:p,dateProfile:e.dateProfile,cells:f,renderIntro:e.renderRowIntro,businessHourSegs:i[h],eventSelection:e.eventSelection,bgEventSegs:s[h].filter(rT),fgEventSegs:o[h],dateSelectionSegs:a[h],eventDrag:l[h],eventResize:d[h],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,clientWidth:e.clientWidth,clientHeight:e.clientHeight,cellMinHeight:c,forPrint:e.forPrint}))))}componentDidMount(){this.registerInteractiveComponent()}componentDidUpdate(){this.registerInteractiveComponent()}registerInteractiveComponent(){if(!this.rootEl){const e=this.rowRefs.currentMap[0].getCellEls()[0],n=e?e.closest(".fc-daygrid-body"):null;n&&(this.rootEl=n,this.context.registerInteractiveComponent(this,{el:n,isHitComboAllowed:this.props.isHitComboAllowed}))}}componentWillUnmount(){this.rootEl&&(this.context.unregisterInteractiveComponent(this),this.rootEl=null)}prepareHits(){this.rowPositions=new Ut(this.rootEl,this.rowRefs.collect().map(e=>e.getCellEls()[0]),!1,!0),this.colPositions=new Ut(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(e,n){let{colPositions:r,rowPositions:i}=this,s=r.leftToIndex(e),o=i.topToIndex(n);if(o!=null&&s!=null){let a=this.props.cells[o][s];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(o,s),allDay:!0},a.extraDateSpan),dayEl:this.getCellEl(o,s),rect:{left:r.lefts[s],right:r.rights[s],top:i.tops[o],bottom:i.bottoms[o]},layer:0}}return null}getCellEl(e,n){return this.rowRefs.currentMap[e].getCellEls()[n]}getCellRange(e,n){let r=this.props.cells[e][n].date,i=oe(r,1);return{start:r,end:i}}}function rT(t){return t.eventRange.def.allDay}class iT extends xe{constructor(){super(...arguments),this.elRef=ue(),this.needsScrollReset=!1}render(){let{props:e}=this,{dayMaxEventRows:n,dayMaxEvents:r,expandRows:i}=e,s=r===!0||n===!0;s&&!i&&(s=!1,n=null,r=null);let o=["fc-daygrid-body",s?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",i?"":"fc-daygrid-body-natural"];return E("div",{ref:this.elRef,className:o.join(" "),style:{width:e.clientWidth,minWidth:e.tableMinWidth}},E("table",{role:"presentation",className:"fc-scrollgrid-sync-table",style:{width:e.clientWidth,minWidth:e.tableMinWidth,height:i?e.clientHeight:""}},e.colGroupNode,E("tbody",{role:"presentation"},E(nT,{dateProfile:e.dateProfile,cells:e.cells,renderRowIntro:e.renderRowIntro,showWeekNumbers:e.showWeekNumbers,clientWidth:e.clientWidth,clientHeight:e.clientHeight,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,dayMaxEvents:r,dayMaxEventRows:n,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed}))))}componentDidMount(){this.requestScrollReset()}componentDidUpdate(e){e.dateProfile!==this.props.dateProfile?this.requestScrollReset():this.flushScrollReset()}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.props.clientWidth){const e=sT(this.elRef.current,this.props.dateProfile);if(e){const n=e.closest(".fc-daygrid-body"),r=n.closest(".fc-scroller"),i=e.getBoundingClientRect().top-n.getBoundingClientRect().top;r.scrollTop=i?i+1:0}this.needsScrollReset=!1}}}function sT(t,e){let n;return e.currentRangeUnit.match(/year|month/)&&(n=t.querySelector(`[data-date="${ly(e.currentDate)}-01"]`)),n||(n=t.querySelector(`[data-date="${fn(e.currentDate)}"]`)),n}class oT extends Yc{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,n){return n.sliceRange(e)}}class _d extends xe{constructor(){super(...arguments),this.slicer=new oT,this.tableRef=ue()}render(){let{props:e,context:n}=this;return E(iT,Object.assign({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,n,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))}}class aT extends Vb{constructor(){super(...arguments),this.buildDayTableModel=B(lT),this.headerRef=ue(),this.tableRef=ue()}render(){let{options:e,dateProfileGenerator:n}=this.context,{props:r}=this,i=this.buildDayTableModel(r.dateProfile,n),s=e.dayHeaders&&E(jc,{ref:this.headerRef,dateProfile:r.dateProfile,dates:i.headerDates,datesRepDistinctDays:i.rowCnt===1}),o=a=>E(_d,{ref:this.tableRef,dateProfile:r.dateProfile,dayTableModel:i,businessHours:r.businessHours,dateSelection:r.dateSelection,eventStore:r.eventStore,eventUiBases:r.eventUiBases,eventSelection:r.eventSelection,eventDrag:r.eventDrag,eventResize:r.eventResize,nextDayThreshold:e.nextDayThreshold,colGroupNode:a.tableColGroupNode,tableMinWidth:a.tableMinWidth,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.weekNumbers,expandRows:!r.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:a.clientWidth,clientHeight:a.clientHeight,forPrint:r.forPrint});return e.dayMinWidth?this.renderHScrollLayout(s,o,i.colCnt,e.dayMinWidth):this.renderSimpleLayout(s,o)}}function lT(t,e){let n=new qc(t.renderRange,e);return new $c(n,/year|month|week/.test(t.currentRangeUnit))}class cT extends Ic{buildRenderRange(e,n,r){let i=super.buildRenderRange(e,n,r),{props:s}=this;return dT({currentRange:i,snapToWeek:/^(year|month)$/.test(n),fixedWeekCount:s.fixedWeekCount,dateEnv:s.dateEnv})}}function dT(t){let{dateEnv:e,currentRange:n}=t,{start:r,end:i}=n,s;if(t.snapToWeek&&(r=e.startOfWeek(r),s=e.startOfWeek(i),s.valueOf()!==i.valueOf()&&(i=Zo(s,1))),t.fixedWeekCount){let o=e.startOfWeek(e.startOfMonth(oe(n.end,-1))),a=Math.ceil(XE(o,i));i=Zo(i,6-a)}return{start:r,end:i}}var uT=':root{--fc-daygrid-event-dot-width:8px}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{clear:both;content:"";display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-frame{min-height:100%;position:relative}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{padding:4px;position:relative;z-index:4}.fc .fc-daygrid-month-start{font-size:1.1em;font-weight:700}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{left:0;position:absolute;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{min-height:2em;position:relative}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{left:0;position:absolute;right:0;top:0}.fc .fc-daygrid-bg-harness{bottom:0;position:absolute;top:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{margin-top:1px;z-index:6}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;margin:0 2px}.fc .fc-daygrid-day-bottom:after,.fc .fc-daygrid-day-bottom:before{clear:both;content:"";display:table}.fc .fc-daygrid-more-link{border-radius:3px;cursor:pointer;line-height:1;margin-top:1px;max-width:100%;overflow:hidden;padding:2px;position:relative;white-space:nowrap;z-index:4}.fc .fc-daygrid-more-link:hover{background-color:rgba(0,0,0,.1)}.fc .fc-daygrid-week-number{background-color:var(--fc-neutral-bg-color);color:var(--fc-neutral-text-color);min-width:1.5em;padding:2px;position:absolute;text-align:center;top:0;z-index:5}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-more-link{float:left}.fc-direction-ltr .fc-daygrid-week-number{border-radius:0 0 3px 0;left:0}.fc-direction-rtl .fc-daygrid-more-link{float:right}.fc-direction-rtl .fc-daygrid-week-number{border-radius:0 0 0 3px;right:0}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{border-radius:3px;font-size:var(--fc-small-font-size);position:relative;white-space:nowrap}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{align-items:center;display:flex;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;font-weight:700;min-width:0;overflow:hidden}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-daygrid-event-dot{border:calc(var(--fc-daygrid-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-daygrid-event-dot-width)/2);box-sizing:content-box;height:0;margin:0 4px;width:0}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}';br(uT);var fT=Qe({name:"@fullcalendar/daygrid",initialView:"dayGridMonth",views:{dayGrid:{component:aT,dateProfileGeneratorClass:cT},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},fixedWeekCount:!0},dayGridYear:{type:"dayGrid",duration:{years:1}}}});class hT extends jv{getKeyInfo(){return{allDay:{},timed:{}}}getKeysForDateSpan(e){return e.allDay?["allDay"]:["timed"]}getKeysForEventDef(e){return e.allDay?Dv(e)?["timed","allDay"]:["allDay"]:["timed"]}}const pT=X({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function bd(t){let e=["fc-timegrid-slot","fc-timegrid-slot-label",t.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return E(Ye.Consumer,null,n=>{if(!t.isLabeled)return E("td",{className:e.join(" "),"data-time":t.isoTimeStr});let{dateEnv:r,options:i,viewApi:s}=n,o=i.slotLabelFormat==null?pT:Array.isArray(i.slotLabelFormat)?X(i.slotLabelFormat[0]):X(i.slotLabelFormat),a={level:0,time:t.time,date:r.toDate(t.date),view:s,text:r.format(t.date,o)};return E(ce,{elTag:"td",elClasses:e,elAttrs:{"data-time":t.isoTimeStr},renderProps:a,generatorName:"slotLabelContent",customGenerator:i.slotLabelContent,defaultGenerator:gT,classNameGenerator:i.slotLabelClassNames,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},l=>E("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},E(l,{elTag:"div",elClasses:["fc-timegrid-slot-label-cushion","fc-scrollgrid-shrink-cushion"]})))})}function gT(t){return t.text}class mT extends q{render(){return this.props.slatMetas.map(e=>E("tr",{key:e.key},E(bd,Object.assign({},e))))}}const ET=X({week:"short"}),yT=5;class vT extends xe{constructor(){super(...arguments),this.allDaySplitter=new hT,this.headerElRef=ue(),this.rootElRef=ue(),this.scrollerElRef=ue(),this.state={slatCoords:null},this.handleScrollTopRequest=e=>{let n=this.scrollerElRef.current;n&&(n.scrollTop=e)},this.renderHeadAxis=(e,n="")=>{let{options:r}=this.context,{dateProfile:i}=this.props,s=i.renderRange,a=st(s.start,s.end)===1?Gt(this.context,s.start,"week"):{};return r.weekNumbers&&e==="day"?E(td,{elTag:"th",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},date:s.start,defaultFormat:ET},l=>E("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame","fc-timegrid-axis-frame-liquid"].join(" "),style:{height:n}},E(l,{elTag:"a",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"],elAttrs:a}))):E("th",{"aria-hidden":!0,className:"fc-timegrid-axis"},E("div",{className:"fc-timegrid-axis-frame",style:{height:n}}))},this.renderTableRowAxis=e=>{let{options:n,viewApi:r}=this.context,i={text:n.allDayText,view:r};return E(ce,{elTag:"td",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},renderProps:i,generatorName:"allDayContent",customGenerator:n.allDayContent,defaultGenerator:_T,classNameGenerator:n.allDayClassNames,didMount:n.allDayDidMount,willUnmount:n.allDayWillUnmount},s=>E("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame",e==null?" fc-timegrid-axis-frame-liquid":""].join(" "),style:{height:e}},E(s,{elTag:"span",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"]})))},this.handleSlatCoords=e=>{this.setState({slatCoords:e})}}renderSimpleLayout(e,n,r){let{context:i,props:s}=this,o=[],a=or(i.options);return e&&o.push({type:"header",key:"header",isSticky:a,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),n&&(o.push({type:"body",key:"all-day",chunk:{content:n}}),o.push({type:"body",key:"all-day-divider",outerContent:E("tr",{role:"presentation",className:"fc-scrollgrid-section"},E("td",{className:"fc-timegrid-divider "+i.theme.getClass("tableCellShaded")}))})),o.push({type:"body",key:"body",liquid:!0,expandRows:!!i.options.expandRows,chunk:{scrollerElRef:this.scrollerElRef,content:r}}),E(an,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:i.viewSpec},E(cs,{liquid:!s.isHeightAuto&&!s.forPrint,collapsibleWidth:s.forPrint,cols:[{width:"shrink"}],sections:o}))}renderHScrollLayout(e,n,r,i,s,o,a){let l=this.context.pluginHooks.scrollGridImpl;if(!l)throw new Error("No ScrollGrid implementation");let{context:d,props:c}=this,u=!c.forPrint&&or(d.options),p=!c.forPrint&&Xc(d.options),f=[];e&&f.push({type:"header",key:"header",isSticky:u,syncRowHeights:!0,chunks:[{key:"axis",rowContent:g=>E("tr",{role:"presentation"},this.renderHeadAxis("day",g.rowSyncHeights[0]))},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),n&&(f.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:g=>E("tr",{role:"presentation"},this.renderTableRowAxis(g.rowSyncHeights[0]))},{key:"cols",content:n}]}),f.push({key:"all-day-divider",type:"body",outerContent:E("tr",{role:"presentation",className:"fc-scrollgrid-section"},E("td",{colSpan:2,className:"fc-timegrid-divider "+d.theme.getClass("tableCellShaded")}))}));let h=d.options.nowIndicator;return f.push({type:"body",key:"body",liquid:!0,expandRows:!!d.options.expandRows,chunks:[{key:"axis",content:g=>E("div",{className:"fc-timegrid-axis-chunk"},E("table",{"aria-hidden":!0,style:{height:g.expandRows?g.clientHeight:""}},g.tableColGroupNode,E("tbody",null,E(mT,{slatMetas:o}))),E("div",{className:"fc-timegrid-now-indicator-container"},E(Wt,{unit:h?"minute":"day"},m=>{let v=h&&a&&a.safeComputeTop(m);return typeof v=="number"?E(ds,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:v},isAxis:!0,date:m}):null})))},{key:"cols",scrollerElRef:this.scrollerElRef,content:r}]}),p&&f.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:Di},{key:"cols",content:Di}]}),E(an,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:d.viewSpec},E(l,{liquid:!c.isHeightAuto&&!c.forPrint,forPrint:c.forPrint,collapsibleWidth:!1,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:i,minWidth:s}]}],sections:f}))}getAllDayMaxEventProps(){let{dayMaxEvents:e,dayMaxEventRows:n}=this.context.options;return(e===!0||n===!0)&&(e=void 0,n=yT),{dayMaxEvents:e,dayMaxEventRows:n}}}function _T(t){return t.text}class bT{constructor(e,n,r){this.positions=e,this.dateProfile=n,this.slotDuration=r}safeComputeTop(e){let{dateProfile:n}=this;if(Ve(n.currentRange,e)){let r=Q(e),i=e.valueOf()-r.valueOf();if(i>=Me(n.slotMinTime)&&i<Me(n.slotMaxTime))return this.computeTimeTop(j(i))}return null}computeDateTop(e,n){return n||(n=Q(e)),this.computeTimeTop(j(e.valueOf()-n.valueOf()))}computeTimeTop(e){let{positions:n,dateProfile:r}=this,i=n.els.length,s=(e.milliseconds-Me(r.slotMinTime))/Me(this.slotDuration),o,a;return s=Math.max(0,s),s=Math.min(i,s),o=Math.floor(s),o=Math.min(o,i-1),a=s-o,n.tops[o]+n.getHeight(o)*a}}class TT extends q{render(){let{props:e,context:n}=this,{options:r}=n,{slatElRefs:i}=e;return E("tbody",null,e.slatMetas.map((s,o)=>{let a={time:s.time,date:n.dateEnv.toDate(s.date),view:n.viewApi};return E("tr",{key:s.key,ref:i.createRef(s.key)},e.axis&&E(bd,Object.assign({},s)),E(ce,{elTag:"td",elClasses:["fc-timegrid-slot","fc-timegrid-slot-lane",!s.isLabeled&&"fc-timegrid-slot-minor"],elAttrs:{"data-time":s.isoTimeStr},renderProps:a,generatorName:"slotLaneContent",customGenerator:r.slotLaneContent,classNameGenerator:r.slotLaneClassNames,didMount:r.slotLaneDidMount,willUnmount:r.slotLaneWillUnmount}))}))}}class RT extends q{constructor(){super(...arguments),this.rootElRef=ue(),this.slatElRefs=new He}render(){let{props:e,context:n}=this;return E("div",{ref:this.rootElRef,className:"fc-timegrid-slots"},E("table",{"aria-hidden":!0,className:n.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,E(TT,{slatElRefs:this.slatElRefs,axis:e.axis,slatMetas:e.slatMetas})))}componentDidMount(){this.updateSizing()}componentDidUpdate(){this.updateSizing()}componentWillUnmount(){this.props.onCoords&&this.props.onCoords(null)}updateSizing(){let{context:e,props:n}=this;n.onCoords&&n.clientWidth!==null&&this.rootElRef.current.offsetHeight&&n.onCoords(new bT(new Ut(this.rootElRef.current,AT(this.slatElRefs.currentMap,n.slatMetas),!1,!0),this.props.dateProfile,e.options.slotDuration))}}function AT(t,e){return e.map(n=>t[n.key])}function Zt(t,e){let n=[],r;for(r=0;r<e;r+=1)n.push([]);if(t)for(r=0;r<t.length;r+=1)n[t[r].col].push(t[r]);return n}function Ra(t,e){let n=[];if(t){for(let r=0;r<e;r+=1)n[r]={affectedInstances:t.affectedInstances,isEvent:t.isEvent,segs:[]};for(let r of t.segs)n[r.col].segs.push(r)}else for(let r=0;r<e;r+=1)n[r]=null;return n}class IT extends q{render(){let{props:e}=this;return E(nd,{elClasses:["fc-timegrid-more-link"],elStyle:{top:e.top,bottom:e.bottom},allDayDate:null,moreCnt:e.hiddenSegs.length,allSegs:e.hiddenSegs,hiddenSegs:e.hiddenSegs,extraDateSpan:e.extraDateSpan,dateProfile:e.dateProfile,todayRange:e.todayRange,popoverContent:()=>Rd(e.hiddenSegs,e),defaultGenerator:ST,forceTimed:!0},n=>E(n,{elTag:"div",elClasses:["fc-timegrid-more-link-inner","fc-sticky"]}))}}function ST(t){return t.shortText}function DT(t,e,n){let r=new Vc;e!=null&&(r.strictOrder=e),n!=null&&(r.maxStackCnt=n);let i=r.addSegs(t),s=e_(i),o=wT(r);return o=NT(o,1),{segRects:xT(o),hiddenGroups:s}}function wT(t){const{entriesByLevel:e}=t,n=ps((r,i)=>r+":"+i,(r,i)=>{let s=MT(t,r,i),o=Aa(s,n),a=e[r][i];return[Object.assign(Object.assign({},a),{nextLevelNodes:o[0]}),a.thickness+o[1]]});return Aa(e.length?{level:0,lateralStart:0,lateralEnd:e[0].length}:null,n)[0]}function Aa(t,e){if(!t)return[[],0];let{level:n,lateralStart:r,lateralEnd:i}=t,s=r,o=[];for(;s<i;)o.push(e(n,s)),s+=1;return o.sort(CT),[o.map(OT),o[0][1]]}function CT(t,e){return e[1]-t[1]}function OT(t){return t[0]}function MT(t,e,n){let{levelCoords:r,entriesByLevel:i}=t,s=i[e][n],o=r[e]+s.thickness,a=r.length,l=e;for(;l<a&&r[l]<o;l+=1);for(;l<a;l+=1){let d=i[l],c,u=Si(d,s.span.start,Ii),p=u[0]+u[1],f=p;for(;(c=d[f])&&c.span.start<s.span.end;)f+=1;if(p<f)return{level:l,lateralStart:p,lateralEnd:f}}return null}function NT(t,e){const n=ps((r,i,s)=>_t(r),(r,i,s)=>{let{nextLevelNodes:o,thickness:a}=r,l=a+s,d=a/l,c,u=[];if(!o.length)c=e;else for(let f of o)if(c===void 0){let h=n(f,i,l);c=h[0],u.push(h[1])}else{let h=n(f,c,0);u.push(h[1])}let p=(c-i)*d;return[c-p,Object.assign(Object.assign({},r),{thickness:p,nextLevelNodes:u})]});return t.map(r=>n(r,0,0)[1])}function xT(t){let e=[];const n=ps((i,s,o)=>_t(i),(i,s,o)=>{let a=Object.assign(Object.assign({},i),{levelCoord:s,stackDepth:o,stackForward:0});return e.push(a),a.stackForward=r(i.nextLevelNodes,s+i.thickness,o+1)+1});function r(i,s,o){let a=0;for(let l of i)a=Math.max(n(l,s,o),a);return a}return r(t,0,0),e}function ps(t,e){const n={};return(...r)=>{let i=t(...r);return i in n?n[i]:n[i]=e(...r)}}function Ia(t,e,n=null,r=0){let i=[];if(n)for(let s=0;s<t.length;s+=1){let o=t[s],a=n.computeDateTop(o.start,e),l=Math.max(a+(r||0),n.computeDateTop(o.end,e));i.push({start:Math.round(a),end:Math.round(l)})}return i}function PT(t,e,n,r){let i=[],s=[];for(let d=0;d<t.length;d+=1){let c=e[d];c?i.push({index:d,thickness:1,span:c}):s.push(t[d])}let{segRects:o,hiddenGroups:a}=DT(i,n,r),l=[];for(let d of o)l.push({seg:t[d.index],rect:d});for(let d of s)l.push({seg:d,rect:null});return{segPlacements:l,hiddenGroups:a}}const LT=X({hour:"numeric",minute:"2-digit",meridiem:!1});class Td extends q{render(){return E(Kc,Object.assign({},this.props,{elClasses:["fc-timegrid-event","fc-v-event",this.props.isShort&&"fc-timegrid-event-short"],defaultTimeFormat:LT}))}}class kT extends q{constructor(){super(...arguments),this.sortEventSegs=B(ss)}render(){let{props:e,context:n}=this,{options:r}=n,i=r.selectMirror,s=e.eventDrag&&e.eventDrag.segs||e.eventResize&&e.eventResize.segs||i&&e.dateSelectionSegs||[],o=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{},a=this.sortEventSegs(e.fgEventSegs,r.eventOrder);return E(us,{elTag:"td",elRef:e.elRef,elClasses:["fc-timegrid-col",...e.extraClassNames||[]],elAttrs:Object.assign({role:"gridcell"},e.extraDataAttrs),date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraRenderProps:e.extraRenderProps},l=>E("div",{className:"fc-timegrid-col-frame"},E("div",{className:"fc-timegrid-col-bg"},this.renderFillSegs(e.businessHourSegs,"non-business"),this.renderFillSegs(e.bgEventSegs,"bg-event"),this.renderFillSegs(e.dateSelectionSegs,"highlight")),E("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(a,o,!1,!1,!1)),E("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(s,{},!!e.eventDrag,!!e.eventResize,!!i,"mirror")),E("div",{className:"fc-timegrid-now-indicator-container"},this.renderNowIndicator(e.nowIndicatorSegs)),fs(r)&&E(l,{elTag:"div",elClasses:["fc-timegrid-col-misc"]})))}renderFgSegs(e,n,r,i,s,o){let{props:a}=this;return a.forPrint?Rd(e,a):this.renderPositionedFgSegs(e,n,r,i,s,o)}renderPositionedFgSegs(e,n,r,i,s,o){let{eventMaxStack:a,eventShortHeight:l,eventOrderStrict:d,eventMinHeight:c}=this.context.options,{date:u,slatCoords:p,eventSelection:f,todayRange:h,nowDate:g}=this.props,m=r||i||s,v=Ia(e,u,p,c),{segPlacements:y,hiddenGroups:_}=PT(e,v,d,a);return E(Y,null,this.renderHiddenGroups(_,e),y.map(b=>{let{seg:A,rect:S}=b,M=A.eventRange.instance.instanceId,I=m||!!(!n[M]&&S),N=Xr(S&&S.span),G=!m&&S?this.computeSegHStyle(S):{left:0,right:0},x=!!S&&S.stackForward>0,P=!!S&&S.span.end-S.span.start<l;return E("div",{className:"fc-timegrid-event-harness"+(x?" fc-timegrid-event-harness-inset":""),key:o||M,style:Object.assign(Object.assign({visibility:I?"":"hidden"},N),G)},E(Td,Object.assign({seg:A,isDragging:r,isResizing:i,isDateSelecting:s,isSelected:M===f,isShort:P},ze(A,h,g))))}))}renderHiddenGroups(e,n){let{extraDateSpan:r,dateProfile:i,todayRange:s,nowDate:o,eventSelection:a,eventDrag:l,eventResize:d}=this.props;return E(Y,null,e.map(c=>{let u=Xr(c.span),p=BT(c.entries,n);return E(IT,{key:Ec(rd(p)),hiddenSegs:p,top:u.top,bottom:u.bottom,extraDateSpan:r,dateProfile:i,todayRange:s,nowDate:o,eventSelection:a,eventDrag:l,eventResize:d})}))}renderFillSegs(e,n){let{props:r,context:i}=this,o=Ia(e,r.date,r.slatCoords,i.options.eventMinHeight).map((a,l)=>{let d=e[l];return E("div",{key:Bc(d.eventRange),className:"fc-timegrid-bg-harness",style:Xr(a)},n==="bg-event"?E(Jc,Object.assign({seg:d},ze(d,r.todayRange,r.nowDate))):ed(n))});return E(Y,null,o)}renderNowIndicator(e){let{slatCoords:n,date:r}=this.props;return n?e.map((i,s)=>E(ds,{key:s,elClasses:["fc-timegrid-now-indicator-line"],elStyle:{top:n.computeDateTop(i.start,r)},isAxis:!1,date:r})):null}computeSegHStyle(e){let{isRtl:n,options:r}=this.context,i=r.slotEventOverlap,s=e.levelCoord,o=e.levelCoord+e.thickness,a,l;i&&(o=Math.min(1,s+(o-s)*2)),n?(a=1-o,l=s):(a=s,l=1-o);let d={zIndex:e.stackDepth+1,left:a*100+"%",right:l*100+"%"};return i&&!e.stackForward&&(d[n?"marginLeft":"marginRight"]=10*2),d}}function Rd(t,{todayRange:e,nowDate:n,eventSelection:r,eventDrag:i,eventResize:s}){let o=(i?i.affectedInstances:null)||(s?s.affectedInstances:null)||{};return E(Y,null,t.map(a=>{let l=a.eventRange.instance.instanceId;return E("div",{key:l,style:{visibility:o[l]?"hidden":""}},E(Td,Object.assign({seg:a,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:l===r,isShort:!1},ze(a,e,n))))}))}function Xr(t){return t?{top:t.start,bottom:-t.end}:{top:"",bottom:""}}function BT(t,e){return t.map(n=>e[n.index])}class FT extends q{constructor(){super(...arguments),this.splitFgEventSegs=B(Zt),this.splitBgEventSegs=B(Zt),this.splitBusinessHourSegs=B(Zt),this.splitNowIndicatorSegs=B(Zt),this.splitDateSelectionSegs=B(Zt),this.splitEventDrag=B(Ra),this.splitEventResize=B(Ra),this.rootElRef=ue(),this.cellElRefs=new He}render(){let{props:e,context:n}=this,r=n.options.nowIndicator&&e.slatCoords&&e.slatCoords.safeComputeTop(e.nowDate),i=e.cells.length,s=this.splitFgEventSegs(e.fgEventSegs,i),o=this.splitBgEventSegs(e.bgEventSegs,i),a=this.splitBusinessHourSegs(e.businessHourSegs,i),l=this.splitNowIndicatorSegs(e.nowIndicatorSegs,i),d=this.splitDateSelectionSegs(e.dateSelectionSegs,i),c=this.splitEventDrag(e.eventDrag,i),u=this.splitEventResize(e.eventResize,i);return E("div",{className:"fc-timegrid-cols",ref:this.rootElRef},E("table",{role:"presentation",style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,E("tbody",{role:"presentation"},E("tr",{role:"row"},e.axis&&E("td",{"aria-hidden":!0,className:"fc-timegrid-col fc-timegrid-axis"},E("div",{className:"fc-timegrid-col-frame"},E("div",{className:"fc-timegrid-now-indicator-container"},typeof r=="number"&&E(ds,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:r},isAxis:!0,date:e.nowDate})))),e.cells.map((p,f)=>E(kT,{key:p.key,elRef:this.cellElRefs.createRef(p.key),dateProfile:e.dateProfile,date:p.date,nowDate:e.nowDate,todayRange:e.todayRange,extraRenderProps:p.extraRenderProps,extraDataAttrs:p.extraDataAttrs,extraClassNames:p.extraClassNames,extraDateSpan:p.extraDateSpan,fgEventSegs:s[f],bgEventSegs:o[f],businessHourSegs:a[f],nowIndicatorSegs:l[f],dateSelectionSegs:d[f],eventDrag:c[f],eventResize:u[f],slatCoords:e.slatCoords,eventSelection:e.eventSelection,forPrint:e.forPrint}))))))}componentDidMount(){this.updateCoords()}componentDidUpdate(){this.updateCoords()}updateCoords(){let{props:e}=this;e.onColCoords&&e.clientWidth!==null&&e.onColCoords(new Ut(this.rootElRef.current,GT(this.cellElRefs.currentMap,e.cells),!0,!1))}}function GT(t,e){return e.map(n=>t[n.key])}class UT extends xe{constructor(){super(...arguments),this.processSlotOptions=B(HT),this.state={slatCoords:null},this.handleRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e,isHitComboAllowed:this.props.isHitComboAllowed}):this.context.unregisterInteractiveComponent(this)},this.handleScrollRequest=e=>{let{onScrollTopRequest:n}=this.props,{slatCoords:r}=this.state;if(n&&r){if(e.time){let i=r.computeTimeTop(e.time);i=Math.ceil(i),i&&(i+=1),n(i)}return!0}return!1},this.handleColCoords=e=>{this.colCoords=e},this.handleSlatCoords=e=>{this.setState({slatCoords:e}),this.props.onSlatCoords&&this.props.onSlatCoords(e)}}render(){let{props:e,state:n}=this;return E("div",{className:"fc-timegrid-body",ref:this.handleRootEl,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},E(RT,{axis:e.axis,dateProfile:e.dateProfile,slatMetas:e.slatMetas,clientWidth:e.clientWidth,minHeight:e.expandRows?e.clientHeight:"",tableMinWidth:e.tableMinWidth,tableColGroupNode:e.axis?e.tableColGroupNode:null,onCoords:this.handleSlatCoords}),E(FT,{cells:e.cells,axis:e.axis,dateProfile:e.dateProfile,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange,nowDate:e.nowDate,nowIndicatorSegs:e.nowIndicatorSegs,clientWidth:e.clientWidth,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,slatCoords:n.slatCoords,onColCoords:this.handleColCoords,forPrint:e.forPrint}))}componentDidMount(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)}componentDidUpdate(e){this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)}componentWillUnmount(){this.scrollResponder.detach()}queryHit(e,n){let{dateEnv:r,options:i}=this.context,{colCoords:s}=this,{dateProfile:o}=this.props,{slatCoords:a}=this.state,{snapDuration:l,snapsPerSlot:d}=this.processSlotOptions(this.props.slotDuration,i.snapDuration),c=s.leftToIndex(e),u=a.positions.topToIndex(n);if(c!=null&&u!=null){let p=this.props.cells[c],f=a.positions.tops[u],h=a.positions.getHeight(u),g=(n-f)/h,m=Math.floor(g*d),v=u*d+m,y=this.props.cells[c].date,_=Ei(o.slotMinTime,$E(l,v)),b=r.add(y,_),A=r.add(b,l);return{dateProfile:o,dateSpan:Object.assign({range:{start:b,end:A},allDay:!1},p.extraDateSpan),dayEl:s.els[c],rect:{left:s.lefts[c],right:s.rights[c],top:f,bottom:f+h},layer:0}}return null}}function HT(t,e){let n=e||t,r=$i(t,n);return r===null&&(n=t,r=1),{snapDuration:n,snapsPerSlot:r}}class VT extends Yc{sliceRange(e,n){let r=[];for(let i=0;i<n.length;i+=1){let s=it(e,n[i]);s&&r.push({start:s.start,end:s.end,isStart:s.start.valueOf()===e.start.valueOf(),isEnd:s.end.valueOf()===e.end.valueOf(),col:i})}return r}}class zT extends xe{constructor(){super(...arguments),this.buildDayRanges=B(WT),this.slicer=new VT,this.timeColsRef=ue()}render(){let{props:e,context:n}=this,{dateProfile:r,dayTableModel:i}=e,{nowIndicator:s,nextDayThreshold:o}=n.options,a=this.buildDayRanges(i,r,n.dateEnv);return E(Wt,{unit:s?"minute":"day"},(l,d)=>E(UT,Object.assign({ref:this.timeColsRef},this.slicer.sliceProps(e,r,null,n,a),{forPrint:e.forPrint,axis:e.axis,dateProfile:r,slatMetas:e.slatMetas,slotDuration:e.slotDuration,cells:i.cells[0],tableColGroupNode:e.tableColGroupNode,tableMinWidth:e.tableMinWidth,clientWidth:e.clientWidth,clientHeight:e.clientHeight,expandRows:e.expandRows,nowDate:l,nowIndicatorSegs:s&&this.slicer.sliceNowDate(l,r,o,n,a),todayRange:d,onScrollTopRequest:e.onScrollTopRequest,onSlatCoords:e.onSlatCoords})))}}function WT(t,e,n){let r=[];for(let i of t.headerDates)r.push({start:n.add(i,e.slotMinTime),end:n.add(i,e.slotMaxTime)});return r}const Sa=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];function jT(t,e,n,r,i){let s=new Date(0),o=t,a=j(0),l=n||qT(r),d=[];for(;Me(o)<Me(e);){let c=i.add(s,o),u=$i(a,l)!==null;d.push({date:c,time:o,key:c.toISOString(),isoTimeStr:cy(c),isLabeled:u}),o=Ei(o,r),a=Ei(a,r)}return d}function qT(t){let e,n,r;for(e=Sa.length-1;e>=0;e-=1)if(n=j(Sa[e]),r=$i(n,t),r!==null&&r>1)return n;return t}class $T extends vT{constructor(){super(...arguments),this.buildTimeColsModel=B(YT),this.buildSlatMetas=B(jT)}render(){let{options:e,dateEnv:n,dateProfileGenerator:r}=this.context,{props:i}=this,{dateProfile:s}=i,o=this.buildTimeColsModel(s,r),a=this.allDaySplitter.splitProps(i),l=this.buildSlatMetas(s.slotMinTime,s.slotMaxTime,e.slotLabelInterval,e.slotDuration,n),{dayMinWidth:d}=e,c=!d,u=d,p=e.dayHeaders&&E(jc,{dates:o.headerDates,dateProfile:s,datesRepDistinctDays:!0,renderIntro:c?this.renderHeadAxis:null}),f=e.allDaySlot!==!1&&(g=>E(_d,Object.assign({},a.allDay,{dateProfile:s,dayTableModel:o,nextDayThreshold:e.nextDayThreshold,tableMinWidth:g.tableMinWidth,colGroupNode:g.tableColGroupNode,renderRowIntro:c?this.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:this.headerElRef,clientWidth:g.clientWidth,clientHeight:g.clientHeight,forPrint:i.forPrint},this.getAllDayMaxEventProps()))),h=g=>E(zT,Object.assign({},a.timed,{dayTableModel:o,dateProfile:s,axis:c,slotDuration:e.slotDuration,slatMetas:l,forPrint:i.forPrint,tableColGroupNode:g.tableColGroupNode,tableMinWidth:g.tableMinWidth,clientWidth:g.clientWidth,clientHeight:g.clientHeight,onSlatCoords:this.handleSlatCoords,expandRows:g.expandRows,onScrollTopRequest:this.handleScrollTopRequest}));return u?this.renderHScrollLayout(p,f,h,o.colCnt,d,l,this.state.slatCoords):this.renderSimpleLayout(p,f,h)}}function YT(t,e){let n=new qc(t.renderRange,e);return new $c(n,!1)}var QT='.fc-v-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-v-event .fc-event-main{color:var(--fc-event-text-color);height:100%}.fc-v-event .fc-event-main-frame{display:flex;flex-direction:column;height:100%}.fc-v-event .fc-event-time{flex-grow:0;flex-shrink:0;max-height:100%;overflow:hidden}.fc-v-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-height:0}.fc-v-event .fc-event-title{bottom:0;max-height:100%;overflow:hidden;top:0}.fc-v-event:not(.fc-event-start){border-top-left-radius:0;border-top-right-radius:0;border-top-width:0}.fc-v-event:not(.fc-event-end){border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-width:0}.fc-v-event.fc-event-selected:before{left:-10px;right:-10px}.fc-v-event .fc-event-resizer-start{cursor:n-resize}.fc-v-event .fc-event-resizer-end{cursor:s-resize}.fc-v-event:not(.fc-event-selected) .fc-event-resizer{height:var(--fc-event-resizer-thickness);left:0;right:0}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-start{top:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer{left:50%;margin-left:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-start{top:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc .fc-timegrid .fc-daygrid-body{z-index:2}.fc .fc-timegrid-divider{padding:0 0 2px}.fc .fc-timegrid-body{min-height:100%;position:relative;z-index:1}.fc .fc-timegrid-axis-chunk{position:relative}.fc .fc-timegrid-axis-chunk>table,.fc .fc-timegrid-slots{position:relative;z-index:1}.fc .fc-timegrid-slot{border-bottom:0;height:1.5em}.fc .fc-timegrid-slot:empty:before{content:"\\00a0"}.fc .fc-timegrid-slot-minor{border-top-style:dotted}.fc .fc-timegrid-slot-label-cushion{display:inline-block;white-space:nowrap}.fc .fc-timegrid-slot-label{vertical-align:middle}.fc .fc-timegrid-axis-cushion,.fc .fc-timegrid-slot-label-cushion{padding:0 4px}.fc .fc-timegrid-axis-frame-liquid{height:100%}.fc .fc-timegrid-axis-frame{align-items:center;display:flex;justify-content:flex-end;overflow:hidden}.fc .fc-timegrid-axis-cushion{flex-shrink:0;max-width:60px}.fc-direction-ltr .fc-timegrid-slot-label-frame{text-align:right}.fc-direction-rtl .fc-timegrid-slot-label-frame{text-align:left}.fc-liquid-hack .fc-timegrid-axis-frame-liquid{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-timegrid-col-frame{min-height:100%;position:relative}.fc-media-screen.fc-liquid-hack .fc-timegrid-col-frame{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols{bottom:0;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols>table{height:100%}.fc-media-screen .fc-timegrid-col-bg,.fc-media-screen .fc-timegrid-col-events,.fc-media-screen .fc-timegrid-now-indicator-container{left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col-bg{z-index:2}.fc .fc-timegrid-col-bg .fc-non-business{z-index:1}.fc .fc-timegrid-col-bg .fc-bg-event{z-index:2}.fc .fc-timegrid-col-bg .fc-highlight{z-index:3}.fc .fc-timegrid-bg-harness{left:0;position:absolute;right:0}.fc .fc-timegrid-col-events{z-index:3}.fc .fc-timegrid-now-indicator-container{bottom:0;overflow:hidden}.fc-direction-ltr .fc-timegrid-col-events{margin:0 2.5% 0 2px}.fc-direction-rtl .fc-timegrid-col-events{margin:0 2px 0 2.5%}.fc-timegrid-event-harness{position:absolute}.fc-timegrid-event-harness>.fc-timegrid-event{bottom:0;left:0;position:absolute;right:0;top:0}.fc-timegrid-event-harness-inset .fc-timegrid-event,.fc-timegrid-event.fc-event-mirror,.fc-timegrid-more-link{box-shadow:0 0 0 1px var(--fc-page-bg-color)}.fc-timegrid-event,.fc-timegrid-more-link{border-radius:3px;font-size:var(--fc-small-font-size)}.fc-timegrid-event{margin-bottom:1px}.fc-timegrid-event .fc-event-main{padding:1px 1px 0}.fc-timegrid-event .fc-event-time{font-size:var(--fc-small-font-size);margin-bottom:1px;white-space:nowrap}.fc-timegrid-event-short .fc-event-main-frame{flex-direction:row;overflow:hidden}.fc-timegrid-event-short .fc-event-time:after{content:"\\00a0-\\00a0"}.fc-timegrid-event-short .fc-event-title{font-size:var(--fc-small-font-size)}.fc-timegrid-more-link{background:var(--fc-more-link-bg-color);color:var(--fc-more-link-text-color);cursor:pointer;margin-bottom:1px;position:absolute;z-index:9999}.fc-timegrid-more-link-inner{padding:3px 2px;top:0}.fc-direction-ltr .fc-timegrid-more-link{right:0}.fc-direction-rtl .fc-timegrid-more-link{left:0}.fc .fc-timegrid-now-indicator-arrow,.fc .fc-timegrid-now-indicator-line{pointer-events:none}.fc .fc-timegrid-now-indicator-line{border-color:var(--fc-now-indicator-color);border-style:solid;border-width:1px 0 0;left:0;position:absolute;right:0;z-index:4}.fc .fc-timegrid-now-indicator-arrow{border-color:var(--fc-now-indicator-color);border-style:solid;margin-top:-5px;position:absolute;z-index:4}.fc-direction-ltr .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 0 5px 6px;left:0}.fc-direction-rtl .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 6px 5px 0;right:0}';br(QT);const ZT={allDaySlot:Boolean};var XT=Qe({name:"@fullcalendar/timegrid",initialView:"timeGridWeek",optionRefiners:ZT,views:{timeGrid:{component:$T,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}});class KT extends q{constructor(){super(...arguments),this.state={textId:tt()}}render(){let{theme:e,dateEnv:n,options:r,viewApi:i}=this.context,{cellId:s,dayDate:o,todayRange:a}=this.props,{textId:l}=this.state,d=as(o,a),c=r.listDayFormat?n.format(o,r.listDayFormat):"",u=r.listDaySideFormat?n.format(o,r.listDaySideFormat):"",p=Object.assign({date:n.toDate(o),view:i,textId:l,text:c,sideText:u,navLinkAttrs:Gt(this.context,o),sideNavLinkAttrs:Gt(this.context,o,"day",!1)},d);return E(ce,{elTag:"tr",elClasses:["fc-list-day",...Tr(d,e)],elAttrs:{"data-date":fn(o)},renderProps:p,generatorName:"dayHeaderContent",customGenerator:r.dayHeaderContent,defaultGenerator:JT,classNameGenerator:r.dayHeaderClassNames,didMount:r.dayHeaderDidMount,willUnmount:r.dayHeaderWillUnmount},f=>E("th",{scope:"colgroup",colSpan:3,id:s,"aria-labelledby":l},E(f,{elTag:"div",elClasses:["fc-list-day-cushion",e.getClass("tableCellShaded")]})))}}function JT(t){return E(Y,null,t.text&&E("a",Object.assign({id:t.textId,className:"fc-list-day-text"},t.navLinkAttrs),t.text),t.sideText&&E("a",Object.assign({"aria-hidden":!0,className:"fc-list-day-side-text"},t.sideNavLinkAttrs),t.sideText))}const eR=X({hour:"numeric",minute:"2-digit",meridiem:"short"});class tR extends q{render(){let{props:e,context:n}=this,{options:r}=n,{seg:i,timeHeaderId:s,eventHeaderId:o,dateHeaderId:a}=e,l=r.eventTimeFormat||eR;return E(Rr,Object.assign({},e,{elTag:"tr",elClasses:["fc-list-event",i.eventRange.def.url&&"fc-event-forced-url"],defaultGenerator:()=>nR(i,n),seg:i,timeText:"",disableDragging:!0,disableResizing:!0}),(d,c)=>E(Y,null,rR(i,l,n,s,a),E("td",{"aria-hidden":!0,className:"fc-list-event-graphic"},E("span",{className:"fc-list-event-dot",style:{borderColor:c.borderColor||c.backgroundColor}})),E(d,{elTag:"td",elClasses:["fc-list-event-title"],elAttrs:{headers:`${o} ${a}`}})))}}function nR(t,e){let n=os(t,e);return E("a",Object.assign({},n),t.eventRange.def.title)}function rR(t,e,n,r,i){let{options:s}=n;if(s.displayEventTime!==!1){let o=t.eventRange.def,a=t.eventRange.instance,l=!1,d;if(o.allDay?l=!0:Yy(t.eventRange.range)?t.isStart?d=tn(t,e,n,null,null,a.range.start,t.end):t.isEnd?d=tn(t,e,n,null,null,t.start,a.range.end):l=!0:d=tn(t,e,n),l){let c={text:n.options.allDayText,view:n.viewApi};return E(ce,{elTag:"td",elClasses:["fc-list-event-time"],elAttrs:{headers:`${r} ${i}`},renderProps:c,generatorName:"allDayContent",customGenerator:s.allDayContent,defaultGenerator:iR,classNameGenerator:s.allDayClassNames,didMount:s.allDayDidMount,willUnmount:s.allDayWillUnmount})}return E("td",{className:"fc-list-event-time"},d)}return null}function iR(t){return t.text}class sR extends xe{constructor(){super(...arguments),this.computeDateVars=B(aR),this.eventStoreToSegs=B(this._eventStoreToSegs),this.state={timeHeaderId:tt(),eventHeaderId:tt(),dateHeaderIdRoot:tt()},this.setRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e}):this.context.unregisterInteractiveComponent(this)}}render(){let{props:e,context:n}=this,{dayDates:r,dayRanges:i}=this.computeDateVars(e.dateProfile),s=this.eventStoreToSegs(e.eventStore,e.eventUiBases,i);return E(an,{elRef:this.setRootEl,elClasses:["fc-list",n.theme.getClass("table"),n.options.stickyHeaderDates!==!1?"fc-list-sticky":""],viewSpec:n.viewSpec},E(Qc,{liquid:!e.isHeightAuto,overflowX:e.isHeightAuto?"visible":"hidden",overflowY:e.isHeightAuto?"visible":"auto"},s.length>0?this.renderSegList(s,r):this.renderEmptyMessage()))}renderEmptyMessage(){let{options:e,viewApi:n}=this.context,r={text:e.noEventsText,view:n};return E(ce,{elTag:"div",elClasses:["fc-list-empty"],renderProps:r,generatorName:"noEventsContent",customGenerator:e.noEventsContent,defaultGenerator:oR,classNameGenerator:e.noEventsClassNames,didMount:e.noEventsDidMount,willUnmount:e.noEventsWillUnmount},i=>E(i,{elTag:"div",elClasses:["fc-list-empty-cushion"]}))}renderSegList(e,n){let{theme:r,options:i}=this.context,{timeHeaderId:s,eventHeaderId:o,dateHeaderIdRoot:a}=this.state,l=lR(e);return E(Wt,{unit:"day"},(d,c)=>{let u=[];for(let p=0;p<l.length;p+=1){let f=l[p];if(f){let h=fn(n[p]),g=a+"-"+h;u.push(E(KT,{key:h,cellId:g,dayDate:n[p],todayRange:c})),f=ss(f,i.eventOrder);for(let m of f)u.push(E(tR,Object.assign({key:h+":"+m.eventRange.instance.instanceId,seg:m,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,timeHeaderId:s,eventHeaderId:o,dateHeaderId:g},ze(m,c,d))))}}return E("table",{className:"fc-list-table "+r.getClass("table")},E("thead",null,E("tr",null,E("th",{scope:"col",id:s},i.timeHint),E("th",{scope:"col","aria-hidden":!0}),E("th",{scope:"col",id:o},i.eventHint))),E("tbody",null,u))})}_eventStoreToSegs(e,n,r){return this.eventRangesToSegs(Ri(e,n,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,r)}eventRangesToSegs(e,n){let r=[];for(let i of e)r.push(...this.eventRangeToSegs(i,n));return r}eventRangeToSegs(e,n){let{dateEnv:r}=this.context,{nextDayThreshold:i}=this.context.options,s=e.range,o=e.def.allDay,a,l,d,c=[];for(a=0;a<n.length;a+=1)if(l=it(s,n[a]),l&&(d={component:this,eventRange:e,start:l.start,end:l.end,isStart:e.isStart&&l.start.valueOf()===s.start.valueOf(),isEnd:e.isEnd&&l.end.valueOf()===s.end.valueOf(),dayIndex:a},c.push(d),!d.isEnd&&!o&&a+1<n.length&&s.end<r.add(n[a+1].start,i))){d.end=s.end,d.isEnd=!0;break}return c}}function oR(t){return t.text}function aR(t){let e=Q(t.renderRange.start),n=t.renderRange.end,r=[],i=[];for(;e<n;)r.push(e),i.push({start:e,end:oe(e,1)}),e=oe(e,1);return{dayDates:r,dayRanges:i}}function lR(t){let e=[],n,r;for(n=0;n<t.length;n+=1)r=t[n],(e[r.dayIndex]||(e[r.dayIndex]=[])).push(r);return e}var cR=':root{--fc-list-event-dot-width:10px;--fc-list-event-hover-bg-color:#f5f5f5}.fc-theme-standard .fc-list{border:1px solid var(--fc-border-color)}.fc .fc-list-empty{align-items:center;background-color:var(--fc-neutral-bg-color);display:flex;height:100%;justify-content:center}.fc .fc-list-empty-cushion{margin:5em 0}.fc .fc-list-table{border-style:hidden;width:100%}.fc .fc-list-table tr>*{border-left:0;border-right:0}.fc .fc-list-sticky .fc-list-day>*{background:var(--fc-page-bg-color);position:sticky;top:0}.fc .fc-list-table thead{left:-10000px;position:absolute}.fc .fc-list-table tbody>tr:first-child th{border-top:0}.fc .fc-list-table th{padding:0}.fc .fc-list-day-cushion,.fc .fc-list-table td{padding:8px 14px}.fc .fc-list-day-cushion:after{clear:both;content:"";display:table}.fc-theme-standard .fc-list-day-cushion{background-color:var(--fc-neutral-bg-color)}.fc-direction-ltr .fc-list-day-text,.fc-direction-rtl .fc-list-day-side-text{float:left}.fc-direction-ltr .fc-list-day-side-text,.fc-direction-rtl .fc-list-day-text{float:right}.fc-direction-ltr .fc-list-table .fc-list-event-graphic{padding-right:0}.fc-direction-rtl .fc-list-table .fc-list-event-graphic{padding-left:0}.fc .fc-list-event.fc-event-forced-url{cursor:pointer}.fc .fc-list-event:hover td{background-color:var(--fc-list-event-hover-bg-color)}.fc .fc-list-event-graphic,.fc .fc-list-event-time{white-space:nowrap;width:1px}.fc .fc-list-event-dot{border:calc(var(--fc-list-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-list-event-dot-width)/2);box-sizing:content-box;display:inline-block;height:0;width:0}.fc .fc-list-event-title a{color:inherit;text-decoration:none}.fc .fc-list-event.fc-event-forced-url:hover a{text-decoration:underline}';br(cR);const dR={listDayFormat:Da,listDaySideFormat:Da,noEventsClassNames:T,noEventsContent:T,noEventsDidMount:T,noEventsWillUnmount:T};function Da(t){return t===!1?null:X(t)}var uR=Qe({name:"@fullcalendar/list",optionRefiners:dR,views:{list:{component:sR,buttonTextKey:"list",listDayFormat:{month:"long",day:"numeric",year:"numeric"}},listDay:{type:"list",duration:{days:1},listDayFormat:{weekday:"long"}},listWeek:{type:"list",duration:{weeks:1},listDayFormat:{weekday:"long"},listDaySideFormat:{month:"long",day:"numeric",year:"numeric"}},listMonth:{type:"list",duration:{month:1},listDaySideFormat:{weekday:"long"}},listYear:{type:"list",duration:{year:1},listDaySideFormat:{weekday:"long"}}}});const fR={labelIdle:'Arraste e solte os arquivos ou <span class="filepond--label-action"> clique aqui </span>',labelInvalidField:"Arquivos inválidos",labelFileWaitingForSize:"Calculando o tamanho do arquivo",labelFileSizeNotAvailable:"Tamanho do arquivo indisponível",labelFileLoading:"Carregando",labelFileLoadError:"Erro durante o carregamento",labelFileProcessing:"Enviando",labelFileProcessingComplete:"Envio finalizado",labelFileProcessingAborted:"Envio cancelado",labelFileProcessingError:"Erro durante o envio",labelFileProcessingRevertError:"Erro ao reverter o envio",labelFileRemoveError:"Erro ao remover o arquivo",labelTapToCancel:"clique para cancelar",labelTapToRetry:"clique para reenviar",labelTapToUndo:"clique para desfazer",labelButtonRemoveItem:"Remover",labelButtonAbortItemLoad:"Abortar",labelButtonRetryItemLoad:"Reenviar",labelButtonAbortItemProcessing:"Cancelar",labelButtonUndoItemProcessing:"Desfazer",labelButtonRetryItemProcessing:"Reenviar",labelButtonProcessItem:"Enviar",labelMaxFileSizeExceeded:"Arquivo é muito grande",labelMaxFileSize:"O tamanho máximo permitido: {filesize}",labelMaxTotalFileSizeExceeded:"Tamanho total dos arquivos excedido",labelMaxTotalFileSize:"Tamanho total permitido: {filesize}",labelFileTypeNotAllowed:"Tipo de arquivo inválido",fileValidateTypeLabelExpectedTypes:"Tipos de arquivo suportados são {allButLastType} ou {lastType}",imageValidateSizeLabelFormatError:"Tipo de imagem inválida",imageValidateSizeLabelImageSizeTooSmall:"Imagem muito pequena",imageValidateSizeLabelImageSizeTooBig:"Imagem muito grande",imageValidateSizeLabelExpectedMinSize:"Tamanho mínimo permitida: {minWidth} × {minHeight}",imageValidateSizeLabelExpectedMaxSize:"Tamanho máximo permitido: {maxWidth} × {maxHeight}",imageValidateSizeLabelImageResolutionTooLow:"Resolução muito baixa",imageValidateSizeLabelImageResolutionTooHigh:"Resolução muito alta",imageValidateSizeLabelExpectedMinResolution:"Resolução mínima permitida: {minResolution}",imageValidateSizeLabelExpectedMaxResolution:"Resolução máxima permitida: {maxResolution}"};fi(Gl,Ul,Wl);hi(fR);window.initFilePond=function(){document.querySelectorAll(".filepond").forEach(e=>{e._pond||FilePond.create(e)})};window.FullCalendar={Calendar:Hb,plugins:{dayGridPlugin:fT,timeGridPlugin:XT,listPlugin:uR}};
