(()=>{var zo=Object.create;var Ht=Object.defineProperty;var Zo=Object.getOwnPropertyDescriptor;var Jo=Object.getOwnPropertyNames;var Ko=Object.getPrototypeOf,Go=Object.prototype.hasOwnProperty;var Yo=(t,e,r)=>e in t?Ht(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Xo=t=>Ht(t,"__esModule",{value:!0});var Qo=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var ea=(t,e,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Jo(e))!Go.call(t,i)&&i!=="default"&&Ht(t,i,{get:()=>e[i],enumerable:!(r=Zo(e,i))||r.enumerable});return t},ki=t=>ea(Xo(Ht(t!=null?zo(Ko(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var Ai=(t,e,r)=>(Yo(t,typeof e!="symbol"?e+"":e,r),r);var ii=Qo(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});function Vn(t,e){for(var r=0;r=0)&&(r[n]=t[n]);return r}function Cl(t,e){if(!!t){if(typeof t=="string")return Bn(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Bn(t,e)}}function Bn(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ne=function(t){W(e,t);function e(){return t.apply(this,arguments)||this}return e}(Nr(Error)),Ll=function(t){W(e,t);function e(r){return t.call(this,"Invalid DateTime: "+r.toMessage())||this}return e}(Ne),Il=function(t){W(e,t);function e(r){return t.call(this,"Invalid Interval: "+r.toMessage())||this}return e}(Ne),Pl=function(t){W(e,t);function e(r){return t.call(this,"Invalid Duration: "+r.toMessage())||this}return e}(Ne),pt=function(t){W(e,t);function e(){return t.apply(this,arguments)||this}return e}(Ne),jn=function(t){W(e,t);function e(r){return t.call(this,"Invalid unit "+r)||this}return e}(Ne),z=function(t){W(e,t);function e(){return t.apply(this,arguments)||this}return e}(Ne),Le=function(t){W(e,t);function e(){return t.call(this,"Zone is an abstract class")||this}return e}(Ne),v="numeric",Q="short",j="long",_r={year:v,month:v,day:v},Un={year:v,month:Q,day:v},Ml={year:v,month:Q,day:v,weekday:Q},qn={year:v,month:j,day:v},$n={year:v,month:j,day:v,weekday:j},Wn={hour:v,minute:v},zn={hour:v,minute:v,second:v},Zn={hour:v,minute:v,second:v,timeZoneName:Q},Jn={hour:v,minute:v,second:v,timeZoneName:j},Kn={hour:v,minute:v,hourCycle:"h23"},Gn={hour:v,minute:v,second:v,hourCycle:"h23"},Yn={hour:v,minute:v,second:v,hourCycle:"h23",timeZoneName:Q},Xn={hour:v,minute:v,second:v,hourCycle:"h23",timeZoneName:j},Qn={year:v,month:v,day:v,hour:v,minute:v},es={year:v,month:v,day:v,hour:v,minute:v,second:v},ts={year:v,month:Q,day:v,hour:v,minute:v},rs={year:v,month:Q,day:v,hour:v,minute:v,second:v},Rl={year:v,month:Q,day:v,weekday:Q,hour:v,minute:v},is={year:v,month:j,day:v,hour:v,minute:v,timeZoneName:Q},ns={year:v,month:j,day:v,hour:v,minute:v,second:v,timeZoneName:Q},ss={year:v,month:j,day:v,weekday:j,hour:v,minute:v,timeZoneName:j},os={year:v,month:j,day:v,weekday:j,hour:v,minute:v,second:v,timeZoneName:j};function A(t){return typeof t=="undefined"}function _e(t){return typeof t=="number"}function Jt(t){return typeof t=="number"&&t%1==0}function Dl(t){return typeof t=="string"}function xl(t){return Object.prototype.toString.call(t)==="[object Date]"}function as(){try{return typeof Intl!="undefined"&&!!Intl.RelativeTimeFormat}catch(t){return!1}}function Nl(t){return Array.isArray(t)?t:[t]}function ls(t,e,r){if(t.length!==0)return t.reduce(function(i,n){var s=[e(n),n];return i&&r(i[0],s[0])===i[0]?i:s},null)[1]}function _l(t,e){return e.reduce(function(r,i){return r[i]=t[i],r},{})}function Xe(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function ge(t,e,r){return Jt(t)&&t>=e&&t<=r}function Fl(t,e){return t-e*Math.floor(t/e)}function Qe(t,e){e===void 0&&(e=2);var r=t<0?"-":"",i=r?t*-1:t,n;return i.toString().length=0&&(e=new Date(e),e.setUTCFullYear(e.getUTCFullYear()-1900)),+e}function Gt(t){var e=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7,r=t-1,i=(r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400))%7;return e===4||i===3?53:52}function Br(t){return t>99?t:t>60?1900+t:2e3+t}function us(t,e,r,i){i===void 0&&(i=null);var n=new Date(t),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(s.timeZone=i);var o=k({timeZoneName:e},s),a=new Intl.DateTimeFormat(r,o).formatToParts(n).find(function(l){return l.type.toLowerCase()==="timezonename"});return a?a.value:null}function Yt(t,e){var r=parseInt(t,10);Number.isNaN(r)&&(r=0);var i=parseInt(e,10)||0,n=r<0||Object.is(r,-0)?-i:i;return r*60+n}function cs(t){var e=Number(t);if(typeof t=="boolean"||t===""||Number.isNaN(e))throw new z("Invalid unit value "+t);return e}function Xt(t,e){var r={};for(var i in t)if(Xe(t,i)){var n=t[i];if(n==null)continue;r[e(i)]=cs(n)}return r}function Qt(t,e){var r=Math.trunc(Math.abs(t/60)),i=Math.trunc(Math.abs(t%60)),n=t>=0?"+":"-";switch(e){case"short":return""+n+Qe(r,2)+":"+Qe(i,2);case"narrow":return""+n+r+(i>0?":"+i:"");case"techie":return""+n+Qe(r,2)+Qe(i,2);default:throw new RangeError("Value format "+e+" is out of range for property format")}}function er(t){return _l(t,["hour","minute","second","millisecond"])}var hs=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/,Hl=["January","February","March","April","May","June","July","August","September","October","November","December"],ds=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Vl=["J","F","M","A","M","J","J","A","S","O","N","D"];function fs(t){switch(t){case"narrow":return[].concat(Vl);case"short":return[].concat(ds);case"long":return[].concat(Hl);case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var ms=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],ps=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Bl=["M","T","W","T","F","S","S"];function gs(t){switch(t){case"narrow":return[].concat(Bl);case"short":return[].concat(ps);case"long":return[].concat(ms);case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var vs=["AM","PM"],jl=["Before Christ","Anno Domini"],Ul=["BC","AD"],ql=["B","A"];function ys(t){switch(t){case"narrow":return[].concat(ql);case"short":return[].concat(Ul);case"long":return[].concat(jl);default:return null}}function $l(t){return vs[t.hour<12?0:1]}function Wl(t,e){return gs(e)[t.weekday-1]}function zl(t,e){return fs(e)[t.month-1]}function Zl(t,e){return ys(e)[t.year<0?0:1]}function Jl(t,e,r,i){r===void 0&&(r="always"),i===void 0&&(i=!1);var n={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},s=["hours","minutes","seconds"].indexOf(t)===-1;if(r==="auto"&&s){var o=t==="days";switch(e){case 1:return o?"tomorrow":"next "+n[t][0];case-1:return o?"yesterday":"last "+n[t][0];case 0:return o?"today":"this "+n[t][0]}}var a=Object.is(e,-0)||e<0,l=Math.abs(e),u=l===1,c=n[t],h=i?u?c[1]:c[2]||c[1]:u?n[t][0]:t;return a?l+" "+h+" ago":"in "+l+" "+h}function bs(t,e){for(var r="",i=Ce(t),n;!(n=i()).done;){var s=n.value;s.literal?r+=s.val:r+=e(s.val)}return r}var Kl={D:_r,DD:Un,DDD:qn,DDDD:$n,t:Wn,tt:zn,ttt:Zn,tttt:Jn,T:Kn,TT:Gn,TTT:Yn,TTTT:Xn,f:Qn,ff:ts,fff:is,ffff:ss,F:es,FF:rs,FFF:ns,FFFF:os},ve=function(){t.create=function(i,n){return n===void 0&&(n={}),new t(i,n)},t.parseFormat=function(i){for(var n=null,s="",o=!1,a=[],l=0;l0&&a.push({literal:o,val:s}),n=null,s="",o=!o):o||u===n?s+=u:(s.length>0&&a.push({literal:!1,val:s}),s=u,n=u)}return s.length>0&&a.push({literal:o,val:s}),a},t.macroTokenToFormatOpts=function(i){return Kl[i]};function t(r,i){this.opts=i,this.loc=r,this.systemLoc=null}var e=t.prototype;return e.formatWithSystemDefault=function(i,n){this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem());var s=this.systemLoc.dtFormatter(i,k({},this.opts,n));return s.format()},e.formatDateTime=function(i,n){n===void 0&&(n={});var s=this.loc.dtFormatter(i,k({},this.opts,n));return s.format()},e.formatDateTimeParts=function(i,n){n===void 0&&(n={});var s=this.loc.dtFormatter(i,k({},this.opts,n));return s.formatToParts()},e.resolvedOptions=function(i,n){n===void 0&&(n={});var s=this.loc.dtFormatter(i,k({},this.opts,n));return s.resolvedOptions()},e.num=function(i,n){if(n===void 0&&(n=0),this.opts.forceSimple)return Qe(i,n);var s=k({},this.opts);return n>0&&(s.padTo=n),this.loc.numberFormatter(s).format(i)},e.formatDateTimeFromString=function(i,n){var s=this,o=this.loc.listingMode()==="en",a=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",l=function(f,S){return s.loc.extract(i,f,S)},u=function(f){return i.isOffsetFixed&&i.offset===0&&f.allowZ?"Z":i.isValid?i.zone.formatOffset(i.ts,f.format):""},c=function(){return o?$l(i):l({hour:"numeric",hourCycle:"h12"},"dayperiod")},h=function(f,S){return o?zl(i,f):l(S?{month:f}:{month:f,day:"numeric"},"month")},d=function(f,S){return o?Wl(i,f):l(S?{weekday:f}:{weekday:f,month:"long",day:"numeric"},"weekday")},m=function(f){var S=t.macroTokenToFormatOpts(f);return S?s.formatWithSystemDefault(i,S):f},p=function(f){return o?Zl(i,f):l({era:f},"era")},y=function(f){switch(f){case"S":return s.num(i.millisecond);case"u":case"SSS":return s.num(i.millisecond,3);case"s":return s.num(i.second);case"ss":return s.num(i.second,2);case"m":return s.num(i.minute);case"mm":return s.num(i.minute,2);case"h":return s.num(i.hour%12==0?12:i.hour%12);case"hh":return s.num(i.hour%12==0?12:i.hour%12,2);case"H":return s.num(i.hour);case"HH":return s.num(i.hour,2);case"Z":return u({format:"narrow",allowZ:s.opts.allowZ});case"ZZ":return u({format:"short",allowZ:s.opts.allowZ});case"ZZZ":return u({format:"techie",allowZ:s.opts.allowZ});case"ZZZZ":return i.zone.offsetName(i.ts,{format:"short",locale:s.loc.locale});case"ZZZZZ":return i.zone.offsetName(i.ts,{format:"long",locale:s.loc.locale});case"z":return i.zoneName;case"a":return c();case"d":return a?l({day:"numeric"},"day"):s.num(i.day);case"dd":return a?l({day:"2-digit"},"day"):s.num(i.day,2);case"c":return s.num(i.weekday);case"ccc":return d("short",!0);case"cccc":return d("long",!0);case"ccccc":return d("narrow",!0);case"E":return s.num(i.weekday);case"EEE":return d("short",!1);case"EEEE":return d("long",!1);case"EEEEE":return d("narrow",!1);case"L":return a?l({month:"numeric",day:"numeric"},"month"):s.num(i.month);case"LL":return a?l({month:"2-digit",day:"numeric"},"month"):s.num(i.month,2);case"LLL":return h("short",!0);case"LLLL":return h("long",!0);case"LLLLL":return h("narrow",!0);case"M":return a?l({month:"numeric"},"month"):s.num(i.month);case"MM":return a?l({month:"2-digit"},"month"):s.num(i.month,2);case"MMM":return h("short",!1);case"MMMM":return h("long",!1);case"MMMMM":return h("narrow",!1);case"y":return a?l({year:"numeric"},"year"):s.num(i.year);case"yy":return a?l({year:"2-digit"},"year"):s.num(i.year.toString().slice(-2),2);case"yyyy":return a?l({year:"numeric"},"year"):s.num(i.year,4);case"yyyyyy":return a?l({year:"numeric"},"year"):s.num(i.year,6);case"G":return p("short");case"GG":return p("long");case"GGGGG":return p("narrow");case"kk":return s.num(i.weekYear.toString().slice(-2),2);case"kkkk":return s.num(i.weekYear,4);case"W":return s.num(i.weekNumber);case"WW":return s.num(i.weekNumber,2);case"o":return s.num(i.ordinal);case"ooo":return s.num(i.ordinal,3);case"q":return s.num(i.quarter);case"qq":return s.num(i.quarter,2);case"X":return s.num(Math.floor(i.ts/1e3));case"x":return s.num(i.ts);default:return m(f)}};return bs(t.parseFormat(n),y)},e.formatDurationFromString=function(i,n){var s=this,o=function(d){switch(d[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}},a=function(d){return function(m){var p=o(m);return p?s.num(d.get(p),m.length):m}},l=t.parseFormat(n),u=l.reduce(function(h,d){var m=d.literal,p=d.val;return m?h:h.concat(p)},[]),c=i.shiftTo.apply(i,u.map(o).filter(function(h){return h}));return bs(l,a(c))},t}(),ee=function(){function t(r,i){this.reason=r,this.explanation=i}var e=t.prototype;return e.toMessage=function(){return this.explanation?this.reason+": "+this.explanation:this.reason},t}(),et=function(){function t(){}var e=t.prototype;return e.offsetName=function(i,n){throw new Le},e.formatOffset=function(i,n){throw new Le},e.offset=function(i){throw new Le},e.equals=function(i){throw new Le},oe(t,[{key:"type",get:function(){throw new Le}},{key:"name",get:function(){throw new Le}},{key:"isUniversal",get:function(){throw new Le}},{key:"isValid",get:function(){throw new Le}}]),t}(),jr=null,ws=function(t){W(e,t);function e(){return t.apply(this,arguments)||this}var r=e.prototype;return r.offsetName=function(n,s){var o=s.format,a=s.locale;return us(n,o,a)},r.formatOffset=function(n,s){return Qt(this.offset(n),s)},r.offset=function(n){return-new Date(n).getTimezoneOffset()},r.equals=function(n){return n.type==="system"},oe(e,[{key:"type",get:function(){return"system"}},{key:"name",get:function(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}},{key:"isUniversal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return jr===null&&(jr=new e),jr}}]),e}(et),Gl=RegExp("^"+hs.source+"$"),tr={};function Yl(t){return tr[t]||(tr[t]=new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),tr[t]}var Xl={year:0,month:1,day:2,hour:3,minute:4,second:5};function Ql(t,e){var r=t.format(e).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(r),n=i[1],s=i[2],o=i[3],a=i[4],l=i[5],u=i[6];return[o,n,s,a,l,u]}function eu(t,e){for(var r=t.formatToParts(e),i=[],n=0;n=0?b:1e3+b,(p-y)/(60*1e3)},r.equals=function(n){return n.type==="iana"&&n.name===this.name},oe(e,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"isUniversal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),e}(et),Ur=null,Z=function(t){W(e,t),e.instance=function(n){return n===0?e.utcInstance:new e(n)},e.parseSpecifier=function(n){if(n){var s=n.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(s)return new e(Yt(s[1],s[2]))}return null};function e(i){var n;return n=t.call(this)||this,n.fixed=i,n}var r=e.prototype;return r.offsetName=function(){return this.name},r.formatOffset=function(n,s){return Qt(this.fixed,s)},r.offset=function(){return this.fixed},r.equals=function(n){return n.type==="fixed"&&n.fixed===this.fixed},oe(e,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return this.fixed===0?"UTC":"UTC"+Qt(this.fixed,"narrow")}},{key:"isUniversal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}],[{key:"utcInstance",get:function(){return Ur===null&&(Ur=new e(0)),Ur}}]),e}(et),qr=function(t){W(e,t);function e(i){var n;return n=t.call(this)||this,n.zoneName=i,n}var r=e.prototype;return r.offsetName=function(){return null},r.formatOffset=function(){return""},r.offset=function(){return NaN},r.equals=function(){return!1},oe(e,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"isUniversal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),e}(et);function Ie(t,e){var r;if(A(t)||t===null)return e;if(t instanceof et)return t;if(Dl(t)){var i=t.toLowerCase();return i==="local"||i==="system"?e:i==="utc"||i==="gmt"?Z.utcInstance:(r=ae.parseGMTOffset(t))!=null?Z.instance(r):ae.isValidSpecifier(i)?ae.create(t):Z.parseSpecifier(i)||new qr(t)}else return _e(t)?Z.instance(t):typeof t=="object"&&t.offset&&typeof t.offset=="number"?t:new qr(t)}var Ss=function(){return Date.now()},Es="system",Ts=null,ks=null,As=null,Os,L=function(){function t(){}return t.resetCaches=function(){M.resetCache(),ae.resetCache()},oe(t,null,[{key:"now",get:function(){return Ss},set:function(r){Ss=r}},{key:"defaultZone",get:function(){return Ie(Es,ws.instance)},set:function(r){Es=r}},{key:"defaultLocale",get:function(){return Ts},set:function(r){Ts=r}},{key:"defaultNumberingSystem",get:function(){return ks},set:function(r){ks=r}},{key:"defaultOutputCalendar",get:function(){return As},set:function(r){As=r}},{key:"throwOnInvalid",get:function(){return Os},set:function(r){Os=r}}]),t}(),tu=["base"],$r={};function Wr(t,e){e===void 0&&(e={});var r=JSON.stringify([t,e]),i=$r[r];return i||(i=new Intl.DateTimeFormat(t,e),$r[r]=i),i}var zr={};function ru(t,e){e===void 0&&(e={});var r=JSON.stringify([t,e]),i=zr[r];return i||(i=new Intl.NumberFormat(t,e),zr[r]=i),i}var Zr={};function iu(t,e){e===void 0&&(e={});var r=e;r.base;var i=Ol(r,tu),n=JSON.stringify([t,i]),s=Zr[n];return s||(s=new Intl.RelativeTimeFormat(t,e),Zr[n]=s),s}var yt=null;function nu(){return yt||(yt=new Intl.DateTimeFormat().resolvedOptions().locale,yt)}function su(t){var e=t.indexOf("-u-");if(e===-1)return[t];var r,i=t.substring(0,e);try{r=Wr(t).resolvedOptions()}catch(a){r=Wr(i).resolvedOptions()}var n=r,s=n.numberingSystem,o=n.calendar;return[i,s,o]}function ou(t,e,r){return(r||e)&&(t+="-u",r&&(t+="-ca-"+r),e&&(t+="-nu-"+e)),t}function au(t){for(var e=[],r=1;r<=12;r++){var i=I.utc(2016,r,1);e.push(t(i))}return e}function lu(t){for(var e=[],r=1;r<=7;r++){var i=I.utc(2016,11,13+r);e.push(t(i))}return e}function ir(t,e,r,i,n){var s=t.listingMode(r);return s==="error"?null:s==="en"?i(e):n(e)}function uu(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem==="latn"}var cu=function(){function t(r,i,n){if(this.padTo=n.padTo||0,this.floor=n.floor||!1,!i){var s={useGrouping:!1};n.padTo>0&&(s.minimumIntegerDigits=n.padTo),this.inf=ru(r,s)}}var e=t.prototype;return e.format=function(i){if(this.inf){var n=this.floor?Math.floor(i):i;return this.inf.format(n)}else{var s=this.floor?Math.floor(i):Hr(i,3);return Qe(s,this.padTo)}},t}(),hu=function(){function t(r,i,n){this.opts=n;var s;if(r.zone.isUniversal){var o=-1*(r.offset/60),a=o>=0?"Etc/GMT+"+o:"Etc/GMT"+o,l=ae.isValidZone(a);r.offset!==0&&l?(s=a,this.dt=r):(s="UTC",n.timeZoneName?this.dt=r:this.dt=r.offset===0?r:I.fromMillis(r.ts+r.offset*60*1e3))}else r.zone.type==="system"?this.dt=r:(this.dt=r,s=r.zone.name);var u=k({},this.opts);s&&(u.timeZone=s),this.dtf=Wr(i,u)}var e=t.prototype;return e.format=function(){return this.dtf.format(this.dt.toJSDate())},e.formatToParts=function(){return this.dtf.formatToParts(this.dt.toJSDate())},e.resolvedOptions=function(){return this.dtf.resolvedOptions()},t}(),du=function(){function t(r,i,n){this.opts=k({style:"long"},n),!i&&as()&&(this.rtf=iu(r,n))}var e=t.prototype;return e.format=function(i,n){return this.rtf?this.rtf.format(i,n):Jl(n,i,this.opts.numeric,this.opts.style!=="long")},e.formatToParts=function(i,n){return this.rtf?this.rtf.formatToParts(i,n):[]},t}(),M=function(){t.fromOpts=function(i){return t.create(i.locale,i.numberingSystem,i.outputCalendar,i.defaultToEN)},t.create=function(i,n,s,o){o===void 0&&(o=!1);var a=i||L.defaultLocale,l=a||(o?"en-US":nu()),u=n||L.defaultNumberingSystem,c=s||L.defaultOutputCalendar;return new t(l,u,c,a)},t.resetCache=function(){yt=null,$r={},zr={},Zr={}},t.fromObject=function(i){var n=i===void 0?{}:i,s=n.locale,o=n.numberingSystem,a=n.outputCalendar;return t.create(s,o,a)};function t(r,i,n,s){var o=su(r),a=o[0],l=o[1],u=o[2];this.locale=a,this.numberingSystem=i||l||null,this.outputCalendar=n||u||null,this.intl=ou(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}var e=t.prototype;return e.listingMode=function(i){var n=this.isEnglish(),s=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return n&&s?"en":"intl"},e.clone=function(i){return!i||Object.getOwnPropertyNames(i).length===0?this:t.create(i.locale||this.specifiedLocale,i.numberingSystem||this.numberingSystem,i.outputCalendar||this.outputCalendar,i.defaultToEN||!1)},e.redefaultToEN=function(i){return i===void 0&&(i={}),this.clone(k({},i,{defaultToEN:!0}))},e.redefaultToSystem=function(i){return i===void 0&&(i={}),this.clone(k({},i,{defaultToEN:!1}))},e.months=function(i,n,s){var o=this;return n===void 0&&(n=!1),s===void 0&&(s=!0),ir(this,i,s,fs,function(){var a=n?{month:i,day:"numeric"}:{month:i},l=n?"format":"standalone";return o.monthsCache[l][i]||(o.monthsCache[l][i]=au(function(u){return o.extract(u,a,"month")})),o.monthsCache[l][i]})},e.weekdays=function(i,n,s){var o=this;return n===void 0&&(n=!1),s===void 0&&(s=!0),ir(this,i,s,gs,function(){var a=n?{weekday:i,year:"numeric",month:"long",day:"numeric"}:{weekday:i},l=n?"format":"standalone";return o.weekdaysCache[l][i]||(o.weekdaysCache[l][i]=lu(function(u){return o.extract(u,a,"weekday")})),o.weekdaysCache[l][i]})},e.meridiems=function(i){var n=this;return i===void 0&&(i=!0),ir(this,void 0,i,function(){return vs},function(){if(!n.meridiemCache){var s={hour:"numeric",hourCycle:"h12"};n.meridiemCache=[I.utc(2016,11,13,9),I.utc(2016,11,13,19)].map(function(o){return n.extract(o,s,"dayperiod")})}return n.meridiemCache})},e.eras=function(i,n){var s=this;return n===void 0&&(n=!0),ir(this,i,n,ys,function(){var o={era:i};return s.eraCache[i]||(s.eraCache[i]=[I.utc(-40,1,1),I.utc(2017,1,1)].map(function(a){return s.extract(a,o,"era")})),s.eraCache[i]})},e.extract=function(i,n,s){var o=this.dtFormatter(i,n),a=o.formatToParts(),l=a.find(function(u){return u.type.toLowerCase()===s});return l?l.value:null},e.numberFormatter=function(i){return i===void 0&&(i={}),new cu(this.intl,i.forceSimple||this.fastNumbers,i)},e.dtFormatter=function(i,n){return n===void 0&&(n={}),new hu(i,this.intl,n)},e.relFormatter=function(i){return i===void 0&&(i={}),new du(this.intl,this.isEnglish(),i)},e.isEnglish=function(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},e.equals=function(i){return this.locale===i.locale&&this.numberingSystem===i.numberingSystem&&this.outputCalendar===i.outputCalendar},oe(t,[{key:"fastNumbers",get:function(){return this.fastNumbersCached==null&&(this.fastNumbersCached=uu(this)),this.fastNumbersCached}}]),t}();function tt(){for(var t=arguments.length,e=new Array(t),r=0;r1?e-1:0),i=1;i3?ms.indexOf(t)+1:ps.indexOf(t)+1),a}var ku=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Au(t){var e=t[1],r=t[2],i=t[3],n=t[4],s=t[5],o=t[6],a=t[7],l=t[8],u=t[9],c=t[10],h=t[11],d=Gr(e,n,i,r,s,o,a),m;return l?m=Tu[l]:u?m=0:m=Yt(c,h),[d,new Z(m)]}function Ou(t){return t.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var Cu=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Lu=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Iu=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Ds(t){var e=t[1],r=t[2],i=t[3],n=t[4],s=t[5],o=t[6],a=t[7],l=Gr(e,n,i,r,s,o,a);return[l,Z.utcInstance]}function Pu(t){var e=t[1],r=t[2],i=t[3],n=t[4],s=t[5],o=t[6],a=t[7],l=Gr(e,a,r,i,n,s,o);return[l,Z.utcInstance]}var Mu=tt(fu,Kr),Ru=tt(mu,Kr),Du=tt(pu,Kr),xu=tt(Is),Nu=Fe(Ms,He,nt),_u=Fe(gu,He,nt),Fu=Fe(vu,He,nt),Hu=Fe(He,nt);function Vu(t){return rt(t,[Mu,Nu],[Ru,_u],[Du,Fu],[xu,Hu])}function Bu(t){return rt(Ou(t),[ku,Au])}function ju(t){return rt(t,[Cu,Ds],[Lu,Ds],[Iu,Pu])}function Uu(t){return rt(t,[Su,Eu])}var qu=Fe(He);function $u(t){return rt(t,[wu,qu])}var Wu=tt(yu,bu),zu=tt(Ps),Zu=Fe(Ms,He,nt,Rs),Ju=Fe(He,nt,Rs);function Ku(t){return rt(t,[Wu,Zu],[zu,Ju])}var Gu="Invalid Duration",xs={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Yu=k({years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3}},xs),J=146097/400,st=146097/4800,Xu=k({years:{quarters:4,months:12,weeks:J/7,days:J,hours:J*24,minutes:J*24*60,seconds:J*24*60*60,milliseconds:J*24*60*60*1e3},quarters:{months:3,weeks:J/28,days:J/4,hours:J*24/4,minutes:J*24*60/4,seconds:J*24*60*60/4,milliseconds:J*24*60*60*1e3/4},months:{weeks:st/7,days:st,hours:st*24,minutes:st*24*60,seconds:st*24*60*60,milliseconds:st*24*60*60*1e3}},xs),ot=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Qu=ot.slice(0).reverse();function Ve(t,e,r){r===void 0&&(r=!1);var i={values:r?e.values:k({},t.values,e.values||{}),loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy};return new N(i)}function ec(t){return t<0?Math.floor(t):Math.ceil(t)}function Ns(t,e,r,i,n){var s=t[n][r],o=e[r]/s,a=Math.sign(o)===Math.sign(i[n]),l=!a&&i[n]!==0&&Math.abs(o)<=1?ec(o):Math.trunc(o);i[n]+=l,e[r]-=l*s}function tc(t,e){Qu.reduce(function(r,i){return A(e[i])?r:(r&&Ns(t,e,r,e,i),i)},null)}var N=function(){function t(r){var i=r.conversionAccuracy==="longterm"||!1;this.values=r.values,this.loc=r.loc||M.create(),this.conversionAccuracy=i?"longterm":"casual",this.invalid=r.invalid||null,this.matrix=i?Xu:Yu,this.isLuxonDuration=!0}t.fromMillis=function(i,n){return t.fromObject({milliseconds:i},n)},t.fromObject=function(i,n){if(n===void 0&&(n={}),i==null||typeof i!="object")throw new z("Duration.fromObject: argument expected to be an object, got "+(i===null?"null":typeof i));return new t({values:Xt(i,t.normalizeUnit),loc:M.fromObject(n),conversionAccuracy:n.conversionAccuracy})},t.fromISO=function(i,n){var s=Uu(i),o=s[0];return o?t.fromObject(o,n):t.invalid("unparsable",'the input "'+i+`" can't be parsed as ISO 8601`)},t.fromISOTime=function(i,n){var s=$u(i),o=s[0];return o?t.fromObject(o,n):t.invalid("unparsable",'the input "'+i+`" can't be parsed as ISO 8601`)},t.invalid=function(i,n){if(n===void 0&&(n=null),!i)throw new z("need to specify a reason the Duration is invalid");var s=i instanceof ee?i:new ee(i,n);if(L.throwOnInvalid)throw new Pl(s);return new t({invalid:s})},t.normalizeUnit=function(i){var n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[i&&i.toLowerCase()];if(!n)throw new jn(i);return n},t.isDuration=function(i){return i&&i.isLuxonDuration||!1};var e=t.prototype;return e.toFormat=function(i,n){n===void 0&&(n={});var s=k({},n,{floor:n.round!==!1&&n.floor!==!1});return this.isValid?ve.create(this.loc,s).formatDurationFromString(this,i):Gu},e.toObject=function(){return this.isValid?k({},this.values):{}},e.toISO=function(){if(!this.isValid)return null;var i="P";return this.years!==0&&(i+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(i+=this.months+this.quarters*3+"M"),this.weeks!==0&&(i+=this.weeks+"W"),this.days!==0&&(i+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(i+="T"),this.hours!==0&&(i+=this.hours+"H"),this.minutes!==0&&(i+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(i+=Hr(this.seconds+this.milliseconds/1e3,3)+"S"),i==="P"&&(i+="T0S"),i},e.toISOTime=function(i){if(i===void 0&&(i={}),!this.isValid)return null;var n=this.toMillis();if(n<0||n>=864e5)return null;i=k({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},i);var s=this.shiftTo("hours","minutes","seconds","milliseconds"),o=i.format==="basic"?"hhmm":"hh:mm";(!i.suppressSeconds||s.seconds!==0||s.milliseconds!==0)&&(o+=i.format==="basic"?"ss":":ss",(!i.suppressMilliseconds||s.milliseconds!==0)&&(o+=".SSS"));var a=s.toFormat(o);return i.includePrefix&&(a="T"+a),a},e.toJSON=function(){return this.toISO()},e.toString=function(){return this.toISO()},e.toMillis=function(){return this.as("milliseconds")},e.valueOf=function(){return this.toMillis()},e.plus=function(i){if(!this.isValid)return this;for(var n=Be(i),s={},o=Ce(ot),a;!(a=o()).done;){var l=a.value;(Xe(n.values,l)||Xe(this.values,l))&&(s[l]=n.get(l)+this.get(l))}return Ve(this,{values:s},!0)},e.minus=function(i){if(!this.isValid)return this;var n=Be(i);return this.plus(n.negate())},e.mapUnits=function(i){if(!this.isValid)return this;for(var n={},s=0,o=Object.keys(this.values);s=0){u=d;var m=0;for(var p in a)m+=this.matrix[p][d]*a[p],a[p]=0;_e(l[d])&&(m+=l[d]);var y=Math.trunc(m);o[d]=y,a[d]=m-y;for(var b in l)ot.indexOf(b)>ot.indexOf(d)&&Ns(this.matrix,l,b,o,d)}else _e(l[d])&&(a[d]=l[d])}for(var f in a)a[f]!==0&&(o[u]+=f===u?a[f]:a[f]/this.matrix[u][f]);return Ve(this,{values:o},!0).normalize()},e.negate=function(){if(!this.isValid)return this;for(var i={},n=0,s=Object.keys(this.values);ni:!1},e.isBefore=function(i){return this.isValid?this.e<=i:!1},e.contains=function(i){return this.isValid?this.s<=i&&this.e>i:!1},e.set=function(i){var n=i===void 0?{}:i,s=n.start,o=n.end;return this.isValid?t.fromDateTimes(s||this.s,o||this.e):this},e.splitAt=function(){var i=this;if(!this.isValid)return[];for(var n=arguments.length,s=new Array(n),o=0;o+this.e?this.e:h;l.push(t.fromDateTimes(u,d)),u=d,c+=1}return l},e.splitBy=function(i){var n=Be(i);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];for(var s=this.s,o=1,a,l=[];s+this.e?this.e:u,l.push(t.fromDateTimes(s,a)),s=a,o+=1}return l},e.divideEqually=function(i){return this.isValid?this.splitBy(this.length()/i).slice(0,i):[]},e.overlaps=function(i){return this.e>i.s&&this.s=i.e:!1},e.equals=function(i){return!this.isValid||!i.isValid?!1:this.s.equals(i.s)&&this.e.equals(i.e)},e.intersection=function(i){if(!this.isValid)return this;var n=this.s>i.s?this.s:i.s,s=this.e=s?null:t.fromDateTimes(n,s)},e.union=function(i){if(!this.isValid)return this;var n=this.si.e?this.e:i.e;return t.fromDateTimes(n,s)},t.merge=function(i){var n=i.sort(function(a,l){return a.s-l.s}).reduce(function(a,l){var u=a[0],c=a[1];return c?c.overlaps(l)||c.abutsStart(l)?[u,c.union(l)]:[u.concat([c]),l]:[u,l]},[[],null]),s=n[0],o=n[1];return o&&s.push(o),s},t.xor=function(i){for(var n,s=null,o=0,a=[],l=i.map(function(p){return[{time:p.s,type:"s"},{time:p.e,type:"e"}]}),u=(n=Array.prototype).concat.apply(n,l),c=u.sort(function(p,y){return p.time-y.time}),h=Ce(c),d;!(d=h()).done;){var m=d.value;o+=m.type==="s"?1:-1,o===1?s=m.time:(s&&+s!=+m.time&&a.push(t.fromDateTimes(s,m.time)),s=null)}return t.merge(a)},e.difference=function(){for(var i=this,n=arguments.length,s=new Array(n),o=0;o=0){var d;s=c;var m=h(t,e);if(o=t.plus((d={},d[c]=m,d)),o>e){var p;t=t.plus((p={},p[c]=m-1,p)),m-=1}else t=o;n[c]=m}}return[t,n,o,s]}function nc(t,e,r,i){var n=ic(t,e,r),s=n[0],o=n[1],a=n[2],l=n[3],u=e-s,c=r.filter(function(p){return["hours","minutes","seconds","milliseconds"].indexOf(p)>=0});if(c.length===0){if(a0){var m;return(m=N.fromMillis(u,i)).shiftTo.apply(m,c).plus(d)}else return d}var Yr={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},Fs={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},sc=Yr.hanidec.replace(/[\[|\]]/g,"").split("");function oc(t){var e=parseInt(t,10);if(isNaN(e)){e="";for(var r=0;r=o&&i<=a&&(e+=i-o)}}return parseInt(e,10)}else return e}function te(t,e){var r=t.numberingSystem;return e===void 0&&(e=""),new RegExp(""+Yr[r||"latn"]+e)}var ac="missing Intl.DateTimeFormat.formatToParts support";function O(t,e){return e===void 0&&(e=function(i){return i}),{regex:t,deser:function(i){var n=i[0];return e(oc(n))}}}var lc=String.fromCharCode(160),Hs="( |"+lc+")",Vs=new RegExp(Hs,"g");function uc(t){return t.replace(/\./g,"\\.?").replace(Vs,Hs)}function Bs(t){return t.replace(/\./g,"").replace(Vs," ").toLowerCase()}function re(t,e){return t===null?null:{regex:RegExp(t.map(uc).join("|")),deser:function(i){var n=i[0];return t.findIndex(function(s){return Bs(n)===Bs(s)})+e}}}function js(t,e){return{regex:t,deser:function(i){var n=i[1],s=i[2];return Yt(n,s)},groups:e}}function Us(t){return{regex:t,deser:function(r){var i=r[0];return i}}}function cc(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function hc(t,e){var r=te(e),i=te(e,"{2}"),n=te(e,"{3}"),s=te(e,"{4}"),o=te(e,"{6}"),a=te(e,"{1,2}"),l=te(e,"{1,3}"),u=te(e,"{1,6}"),c=te(e,"{1,9}"),h=te(e,"{2,4}"),d=te(e,"{4,6}"),m=function(f){return{regex:RegExp(cc(f.val)),deser:function(ie){var de=ie[0];return de},literal:!0}},p=function(f){if(t.literal)return m(f);switch(f.val){case"G":return re(e.eras("short",!1),0);case"GG":return re(e.eras("long",!1),0);case"y":return O(u);case"yy":return O(h,Br);case"yyyy":return O(s);case"yyyyy":return O(d);case"yyyyyy":return O(o);case"M":return O(a);case"MM":return O(i);case"MMM":return re(e.months("short",!0,!1),1);case"MMMM":return re(e.months("long",!0,!1),1);case"L":return O(a);case"LL":return O(i);case"LLL":return re(e.months("short",!1,!1),1);case"LLLL":return re(e.months("long",!1,!1),1);case"d":return O(a);case"dd":return O(i);case"o":return O(l);case"ooo":return O(n);case"HH":return O(i);case"H":return O(a);case"hh":return O(i);case"h":return O(a);case"mm":return O(i);case"m":return O(a);case"q":return O(a);case"qq":return O(i);case"s":return O(a);case"ss":return O(i);case"S":return O(l);case"SSS":return O(n);case"u":return Us(c);case"a":return re(e.meridiems(),0);case"kkkk":return O(s);case"kk":return O(h,Br);case"W":return O(a);case"WW":return O(i);case"E":case"c":return O(r);case"EEE":return re(e.weekdays("short",!1,!1),1);case"EEEE":return re(e.weekdays("long",!1,!1),1);case"ccc":return re(e.weekdays("short",!0,!1),1);case"cccc":return re(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return js(new RegExp("([+-]"+a.source+")(?::("+i.source+"))?"),2);case"ZZZ":return js(new RegExp("([+-]"+a.source+")("+i.source+")?"),2);case"z":return Us(/[a-z_+-/]{1,256}?/i);default:return m(f)}},y=p(t)||{invalidReason:ac};return y.token=t,y}var dc={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function fc(t,e,r){var i=t.type,n=t.value;if(i==="literal")return{literal:!0,val:n};var s=r[i],o=dc[i];if(typeof o=="object"&&(o=o[s]),o)return{literal:!1,val:o}}function mc(t){var e=t.map(function(r){return r.regex}).reduce(function(r,i){return r+"("+i.source+")"},"");return["^"+e+"$",t]}function pc(t,e,r){var i=t.match(e);if(i){var n={},s=1;for(var o in r)if(Xe(r,o)){var a=r[o],l=a.groups?a.groups+1:1;!a.literal&&a.token&&(n[a.token.val[0]]=a.deser(i.slice(s,s+l))),s+=l}return[i,n]}else return[i,{}]}function gc(t){var e=function(s){switch(s){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}},r;A(t.Z)?A(t.z)?r=null:r=ae.create(t.z):r=new Z(t.Z),A(t.q)||(t.M=(t.q-1)*3+1),A(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),A(t.u)||(t.S=Fr(t.u));var i=Object.keys(t).reduce(function(n,s){var o=e(s);return o&&(n[o]=t[s]),n},{});return[i,r]}var Xr=null;function vc(){return Xr||(Xr=I.fromMillis(1555555555555)),Xr}function yc(t,e){if(t.literal)return t;var r=ve.macroTokenToFormatOpts(t.val);if(!r)return t;var i=ve.create(e,r),n=i.formatDateTimeParts(vc()),s=n.map(function(o){return fc(o,e,r)});return s.includes(void 0)?t:s}function bc(t,e){var r;return(r=Array.prototype).concat.apply(r,t.map(function(i){return yc(i,e)}))}function qs(t,e,r){var i=bc(ve.parseFormat(r),t),n=i.map(function(b){return hc(b,t)}),s=n.find(function(b){return b.invalidReason});if(s)return{input:e,tokens:i,invalidReason:s.invalidReason};var o=mc(n),a=o[0],l=o[1],u=RegExp(a,"i"),c=pc(e,u,l),h=c[0],d=c[1],m=d?gc(d):[null,null],p=m[0],y=m[1];if(Xe(d,"a")&&Xe(d,"H"))throw new pt("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:i,regex:u,rawMatches:h,matches:d,result:p,zone:y}}function wc(t,e,r){var i=qs(t,e,r),n=i.result,s=i.zone,o=i.invalidReason;return[n,s,o]}var $s=[0,31,59,90,120,151,181,212,243,273,304,334],Ws=[0,31,60,91,121,152,182,213,244,274,305,335];function K(t,e){return new ee("unit out of range","you specified "+e+" (of type "+typeof e+") as a "+t+", which is invalid")}function zs(t,e,r){var i=new Date(Date.UTC(t,e-1,r)).getUTCDay();return i===0?7:i}function Zs(t,e,r){return r+(gt(t)?Ws:$s)[e-1]}function Js(t,e){var r=gt(t)?Ws:$s,i=r.findIndex(function(s){return sGt(e)?(a=e+1,o=1):a=e,k({weekYear:a,weekNumber:o,weekday:s},er(t))}function Ks(t){var e=t.weekYear,r=t.weekNumber,i=t.weekday,n=zs(e,1,4),s=vt(e),o=r*7+i-n-3,a;o<1?(a=e-1,o+=vt(a)):o>s?(a=e+1,o-=vt(e)):a=e;var l=Js(a,o),u=l.month,c=l.day;return k({year:a,month:u,day:c},er(t))}function ei(t){var e=t.year,r=t.month,i=t.day,n=Zs(e,r,i);return k({year:e,ordinal:n},er(t))}function Gs(t){var e=t.year,r=t.ordinal,i=Js(e,r),n=i.month,s=i.day;return k({year:e,month:n,day:s},er(t))}function Sc(t){var e=Jt(t.weekYear),r=ge(t.weekNumber,1,Gt(t.weekYear)),i=ge(t.weekday,1,7);return e?r?i?!1:K("weekday",t.weekday):K("week",t.week):K("weekYear",t.weekYear)}function Ec(t){var e=Jt(t.year),r=ge(t.ordinal,1,vt(t.year));return e?r?!1:K("ordinal",t.ordinal):K("year",t.year)}function Ys(t){var e=Jt(t.year),r=ge(t.month,1,12),i=ge(t.day,1,Kt(t.year,t.month));return e?r?i?!1:K("day",t.day):K("month",t.month):K("year",t.year)}function Xs(t){var e=t.hour,r=t.minute,i=t.second,n=t.millisecond,s=ge(e,0,23)||e===24&&r===0&&i===0&&n===0,o=ge(r,0,59),a=ge(i,0,59),l=ge(n,0,999);return s?o?a?l?!1:K("millisecond",n):K("second",i):K("minute",r):K("hour",e)}var ti="Invalid DateTime",Qs=864e13;function nr(t){return new ee("unsupported zone",'the zone "'+t.name+'" is not supported')}function ri(t){return t.weekData===null&&(t.weekData=Qr(t.c)),t.weekData}function Et(t,e){var r={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new I(k({},r,e,{old:r}))}function eo(t,e,r){var i=t-e*60*1e3,n=r.offset(i);if(e===n)return[i,e];i-=(n-e)*60*1e3;var s=r.offset(i);return n===s?[i,n]:[t-Math.min(n,s)*60*1e3,Math.max(n,s)]}function to(t,e){t+=e*60*1e3;var r=new Date(t);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function sr(t,e,r){return eo(Vr(t),e,r)}function ro(t,e){var r=t.o,i=t.c.year+Math.trunc(e.years),n=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,s=k({},t.c,{year:i,month:n,day:Math.min(t.c.day,Kt(i,n))+Math.trunc(e.days)+Math.trunc(e.weeks)*7}),o=N.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=Vr(s),l=eo(a,r,t.zone),u=l[0],c=l[1];return o!==0&&(u+=o,c=t.zone.offset(u)),{ts:u,o:c}}function Tt(t,e,r,i,n){var s=r.setZone,o=r.zone;if(t&&Object.keys(t).length!==0){var a=e||o,l=I.fromObject(t,k({},r,{zone:a}));return s?l:l.setZone(o)}else return I.invalid(new ee("unparsable",'the input "'+n+`" can't be parsed as `+i))}function at(t,e,r){return r===void 0&&(r=!0),t.isValid?ve.create(M.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(t,e):null}function io(t,e){var r=e.suppressSeconds,i=r===void 0?!1:r,n=e.suppressMilliseconds,s=n===void 0?!1:n,o=e.includeOffset,a=e.includePrefix,l=a===void 0?!1:a,u=e.includeZone,c=u===void 0?!1:u,h=e.spaceZone,d=h===void 0?!1:h,m=e.format,p=m===void 0?"extended":m,y=p==="basic"?"HHmm":"HH:mm";(!i||t.second!==0||t.millisecond!==0)&&(y+=p==="basic"?"ss":":ss",(!s||t.millisecond!==0)&&(y+=".SSS")),(c||o)&&d&&(y+=" "),c?y+="z":o&&(y+=p==="basic"?"ZZZ":"ZZ");var b=at(t,y);return l&&(b="T"+b),b}var no={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Tc={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},kc={ordinal:1,hour:0,minute:0,second:0,millisecond:0},so=["year","month","day","hour","minute","second","millisecond"],Ac=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Oc=["year","ordinal","hour","minute","second","millisecond"];function oo(t){var e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new jn(t);return e}function ao(t,e){var r=Ie(e.zone,L.defaultZone),i=M.fromObject(e),n=L.now(),s,o;if(A(t.year))s=n;else{for(var a=Ce(so),l;!(l=a()).done;){var u=l.value;A(t[u])&&(t[u]=no[u])}var c=Ys(t)||Xs(t);if(c)return I.invalid(c);var h=r.offset(n),d=sr(t,h,r);s=d[0],o=d[1]}return new I({ts:s,zone:r,loc:i,o})}function lo(t,e,r){var i=A(r.round)?!0:r.round,n=function(h,d){h=Hr(h,i||r.calendary?0:2,!0);var m=e.loc.clone(r).relFormatter(r);return m.format(h,d)},s=function(h){return r.calendary?e.hasSame(t,h)?0:e.startOf(h).diff(t.startOf(h),h).get(h):e.diff(t,h).get(h)};if(r.unit)return n(s(r.unit),r.unit);for(var o=Ce(r.units),a;!(a=o()).done;){var l=a.value,u=s(l);if(Math.abs(u)>=1)return n(u,l)}return n(t>e?-0:0,r.units[r.units.length-1])}function uo(t){var e={},r;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],r=Array.from(t).slice(0,t.length-1)):r=Array.from(t),[e,r]}var I=function(){function t(r){var i=r.zone||L.defaultZone,n=r.invalid||(Number.isNaN(r.ts)?new ee("invalid input"):null)||(i.isValid?null:nr(i));this.ts=A(r.ts)?L.now():r.ts;var s=null,o=null;if(!n){var a=r.old&&r.old.ts===this.ts&&r.old.zone.equals(i);if(a){var l=[r.old.c,r.old.o];s=l[0],o=l[1]}else{var u=i.offset(this.ts);s=to(this.ts,u),n=Number.isNaN(s.year)?new ee("invalid input"):null,s=n?null:s,o=n?null:u}}this._zone=i,this.loc=r.loc||M.create(),this.invalid=n,this.weekData=null,this.c=s,this.o=o,this.isLuxonDateTime=!0}t.now=function(){return new t({})},t.local=function(){var i=uo(arguments),n=i[0],s=i[1],o=s[0],a=s[1],l=s[2],u=s[3],c=s[4],h=s[5],d=s[6];return ao({year:o,month:a,day:l,hour:u,minute:c,second:h,millisecond:d},n)},t.utc=function(){var i=uo(arguments),n=i[0],s=i[1],o=s[0],a=s[1],l=s[2],u=s[3],c=s[4],h=s[5],d=s[6];return n.zone=Z.utcInstance,ao({year:o,month:a,day:l,hour:u,minute:c,second:h,millisecond:d},n)},t.fromJSDate=function(i,n){n===void 0&&(n={});var s=xl(i)?i.valueOf():NaN;if(Number.isNaN(s))return t.invalid("invalid input");var o=Ie(n.zone,L.defaultZone);return o.isValid?new t({ts:s,zone:o,loc:M.fromObject(n)}):t.invalid(nr(o))},t.fromMillis=function(i,n){if(n===void 0&&(n={}),_e(i))return i<-Qs||i>Qs?t.invalid("Timestamp out of range"):new t({ts:i,zone:Ie(n.zone,L.defaultZone),loc:M.fromObject(n)});throw new z("fromMillis requires a numerical input, but received a "+typeof i+" with value "+i)},t.fromSeconds=function(i,n){if(n===void 0&&(n={}),_e(i))return new t({ts:i*1e3,zone:Ie(n.zone,L.defaultZone),loc:M.fromObject(n)});throw new z("fromSeconds requires a numerical input")},t.fromObject=function(i,n){n===void 0&&(n={}),i=i||{};var s=Ie(n.zone,L.defaultZone);if(!s.isValid)return t.invalid(nr(s));var o=L.now(),a=s.offset(o),l=Xt(i,oo),u=!A(l.ordinal),c=!A(l.year),h=!A(l.month)||!A(l.day),d=c||h,m=l.weekYear||l.weekNumber,p=M.fromObject(n);if((d||u)&&m)throw new pt("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(h&&u)throw new pt("Can't mix ordinal dates with month/day");var y=m||l.weekday&&!d,b,f,S=to(o,a);y?(b=Ac,f=Tc,S=Qr(S)):u?(b=Oc,f=kc,S=ei(S)):(b=so,f=no);for(var ie=!1,de=Ce(b),qe;!(qe=de()).done;){var Re=qe.value,$e=l[Re];A($e)?ie?l[Re]=f[Re]:l[Re]=S[Re]:ie=!0}var br=y?Sc(l):u?Ec(l):Ys(l),P=br||Xs(l);if(P)return t.invalid(P);var We=y?Ks(l):u?Gs(l):l,ut=sr(We,a,s),ct=ut[0],wr=ut[1],De=new t({ts:ct,zone:s,o:wr,loc:p});return l.weekday&&d&&i.weekday!==De.weekday?t.invalid("mismatched weekday","you can't specify both a weekday of "+l.weekday+" and a date of "+De.toISO()):De},t.fromISO=function(i,n){n===void 0&&(n={});var s=Vu(i),o=s[0],a=s[1];return Tt(o,a,n,"ISO 8601",i)},t.fromRFC2822=function(i,n){n===void 0&&(n={});var s=Bu(i),o=s[0],a=s[1];return Tt(o,a,n,"RFC 2822",i)},t.fromHTTP=function(i,n){n===void 0&&(n={});var s=ju(i),o=s[0],a=s[1];return Tt(o,a,n,"HTTP",n)},t.fromFormat=function(i,n,s){if(s===void 0&&(s={}),A(i)||A(n))throw new z("fromFormat requires an input string and a format");var o=s,a=o.locale,l=a===void 0?null:a,u=o.numberingSystem,c=u===void 0?null:u,h=M.fromOpts({locale:l,numberingSystem:c,defaultToEN:!0}),d=wc(h,i,n),m=d[0],p=d[1],y=d[2];return y?t.invalid(y):Tt(m,p,s,"format "+n,i)},t.fromString=function(i,n,s){return s===void 0&&(s={}),t.fromFormat(i,n,s)},t.fromSQL=function(i,n){n===void 0&&(n={});var s=Ku(i),o=s[0],a=s[1];return Tt(o,a,n,"SQL",i)},t.invalid=function(i,n){if(n===void 0&&(n=null),!i)throw new z("need to specify a reason the DateTime is invalid");var s=i instanceof ee?i:new ee(i,n);if(L.throwOnInvalid)throw new Ll(s);return new t({invalid:s})},t.isDateTime=function(i){return i&&i.isLuxonDateTime||!1};var e=t.prototype;return e.get=function(i){return this[i]},e.resolvedLocaleOptions=function(i){i===void 0&&(i={});var n=ve.create(this.loc.clone(i),i).resolvedOptions(this),s=n.locale,o=n.numberingSystem,a=n.calendar;return{locale:s,numberingSystem:o,outputCalendar:a}},e.toUTC=function(i,n){return i===void 0&&(i=0),n===void 0&&(n={}),this.setZone(Z.instance(i),n)},e.toLocal=function(){return this.setZone(L.defaultZone)},e.setZone=function(i,n){var s=n===void 0?{}:n,o=s.keepLocalTime,a=o===void 0?!1:o,l=s.keepCalendarTime,u=l===void 0?!1:l;if(i=Ie(i,L.defaultZone),i.equals(this.zone))return this;if(i.isValid){var c=this.ts;if(a||u){var h=i.offset(this.ts),d=this.toObject(),m=sr(d,h,i);c=m[0]}return Et(this,{ts:c,zone:i})}else return t.invalid(nr(i))},e.reconfigure=function(i){var n=i===void 0?{}:i,s=n.locale,o=n.numberingSystem,a=n.outputCalendar,l=this.loc.clone({locale:s,numberingSystem:o,outputCalendar:a});return Et(this,{loc:l})},e.setLocale=function(i){return this.reconfigure({locale:i})},e.set=function(i){if(!this.isValid)return this;var n=Xt(i,oo),s=!A(n.weekYear)||!A(n.weekNumber)||!A(n.weekday),o=!A(n.ordinal),a=!A(n.year),l=!A(n.month)||!A(n.day),u=a||l,c=n.weekYear||n.weekNumber;if((u||o)&&c)throw new pt("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&o)throw new pt("Can't mix ordinal dates with month/day");var h;s?h=Ks(k({},Qr(this.c),n)):A(n.ordinal)?(h=k({},this.toObject(),n),A(n.day)&&(h.day=Math.min(Kt(h.year,h.month),h.day))):h=Gs(k({},ei(this.c),n));var d=sr(h,this.o,this.zone),m=d[0],p=d[1];return Et(this,{ts:m,o:p})},e.plus=function(i){if(!this.isValid)return this;var n=Be(i);return Et(this,ro(this,n))},e.minus=function(i){if(!this.isValid)return this;var n=Be(i).negate();return Et(this,ro(this,n))},e.startOf=function(i){if(!this.isValid)return this;var n={},s=N.normalizeUnit(i);switch(s){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0;break}if(s==="weeks"&&(n.weekday=1),s==="quarters"){var o=Math.ceil(this.month/3);n.month=(o-1)*3+1}return this.set(n)},e.endOf=function(i){var n;return this.isValid?this.plus((n={},n[i]=1,n)).startOf(i).minus(1):this},e.toFormat=function(i,n){return n===void 0&&(n={}),this.isValid?ve.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,i):ti},e.toLocaleString=function(i,n){return i===void 0&&(i=_r),n===void 0&&(n={}),this.isValid?ve.create(this.loc.clone(n),i).formatDateTime(this):ti},e.toLocaleParts=function(i){return i===void 0&&(i={}),this.isValid?ve.create(this.loc.clone(i),i).formatDateTimeParts(this):[]},e.toISO=function(i){return i===void 0&&(i={}),this.isValid?this.toISODate(i)+"T"+this.toISOTime(i):null},e.toISODate=function(i){var n=i===void 0?{}:i,s=n.format,o=s===void 0?"extended":s,a=o==="basic"?"yyyyMMdd":"yyyy-MM-dd";return this.year>9999&&(a="+"+a),at(this,a)},e.toISOWeekDate=function(){return at(this,"kkkk-'W'WW-c")},e.toISOTime=function(i){var n=i===void 0?{}:i,s=n.suppressMilliseconds,o=s===void 0?!1:s,a=n.suppressSeconds,l=a===void 0?!1:a,u=n.includeOffset,c=u===void 0?!0:u,h=n.includePrefix,d=h===void 0?!1:h,m=n.format,p=m===void 0?"extended":m;return io(this,{suppressSeconds:l,suppressMilliseconds:o,includeOffset:c,includePrefix:d,format:p})},e.toRFC2822=function(){return at(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},e.toHTTP=function(){return at(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},e.toSQLDate=function(){return at(this,"yyyy-MM-dd")},e.toSQLTime=function(i){var n=i===void 0?{}:i,s=n.includeOffset,o=s===void 0?!0:s,a=n.includeZone,l=a===void 0?!1:a;return io(this,{includeOffset:o,includeZone:l,spaceZone:!0})},e.toSQL=function(i){return i===void 0&&(i={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(i):null},e.toString=function(){return this.isValid?this.toISO():ti},e.valueOf=function(){return this.toMillis()},e.toMillis=function(){return this.isValid?this.ts:NaN},e.toSeconds=function(){return this.isValid?this.ts/1e3:NaN},e.toJSON=function(){return this.toISO()},e.toBSON=function(){return this.toJSDate()},e.toObject=function(i){if(i===void 0&&(i={}),!this.isValid)return{};var n=k({},this.c);return i.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n},e.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},e.diff=function(i,n,s){if(n===void 0&&(n="milliseconds"),s===void 0&&(s={}),!this.isValid||!i.isValid)return N.invalid("created by diffing an invalid DateTime");var o=k({locale:this.locale,numberingSystem:this.numberingSystem},s),a=Nl(n).map(N.normalizeUnit),l=i.valueOf()>this.valueOf(),u=l?this:i,c=l?i:this,h=nc(u,c,a,o);return l?h.negate():h},e.diffNow=function(i,n){return i===void 0&&(i="milliseconds"),n===void 0&&(n={}),this.diff(t.now(),i,n)},e.until=function(i){return this.isValid?wt.fromDateTimes(this,i):this},e.hasSame=function(i,n){if(!this.isValid)return!1;var s=i.valueOf(),o=this.setZone(i.zone,{keepLocalTime:!0});return o.startOf(n)<=s&&s<=o.endOf(n)},e.equals=function(i){return this.isValid&&i.isValid&&this.valueOf()===i.valueOf()&&this.zone.equals(i.zone)&&this.loc.equals(i.loc)},e.toRelative=function(i){if(i===void 0&&(i={}),!this.isValid)return null;var n=i.base||t.fromObject({},{zone:this.zone}),s=i.padding?thisthis.set({month:1}).offset||this.offset>this.set({month:5}).offset}},{key:"isInLeapYear",get:function(){return gt(this.year)}},{key:"daysInMonth",get:function(){return Kt(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?vt(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?Gt(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function(){return _r}},{key:"DATE_MED",get:function(){return Un}},{key:"DATE_MED_WITH_WEEKDAY",get:function(){return Ml}},{key:"DATE_FULL",get:function(){return qn}},{key:"DATE_HUGE",get:function(){return $n}},{key:"TIME_SIMPLE",get:function(){return Wn}},{key:"TIME_WITH_SECONDS",get:function(){return zn}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return Zn}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return Jn}},{key:"TIME_24_SIMPLE",get:function(){return Kn}},{key:"TIME_24_WITH_SECONDS",get:function(){return Gn}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return Yn}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return Xn}},{key:"DATETIME_SHORT",get:function(){return Qn}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return es}},{key:"DATETIME_MED",get:function(){return ts}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return rs}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return Rl}},{key:"DATETIME_FULL",get:function(){return is}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return ns}},{key:"DATETIME_HUGE",get:function(){return ss}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return os}}]),t}();function kt(t){if(I.isDateTime(t))return t;if(t&&t.valueOf&&_e(t.valueOf()))return I.fromJSDate(t);if(t&&typeof t=="object")return I.fromObject(t);throw new z("Unknown datetime argument: "+t+", of type "+typeof t)}var Cc="2.0.2";U.DateTime=I;U.Duration=N;U.FixedOffsetZone=Z;U.IANAZone=ae;U.Info=St;U.Interval=wt;U.InvalidZone=qr;U.Settings=L;U.SystemZone=ws;U.VERSION=Cc;U.Zone=et});(function(){if(window.Reflect===void 0||window.customElements===void 0||window.customElements.polyfillWrapFlushCallback)return;let t=HTMLElement,e={HTMLElement:function(){return Reflect.construct(t,[],this.constructor)}};window.HTMLElement=e.HTMLElement,HTMLElement.prototype=t.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,t)})();var Oi=new WeakMap;function ta(t){let e=t instanceof Element?t:t instanceof Node?t.parentElement:null,r=e?e.closest("input, button"):null;return(r==null?void 0:r.type)=="submit"?r:null}function ra(t){let e=ta(t.target);e&&e.form&&Oi.set(e.form,e)}(function(){"SubmitEvent"in window||(addEventListener("click",ra,!0),Object.defineProperty(Event.prototype,"submitter",{get(){if(this.type=="submit"&&this.target instanceof HTMLFormElement)return Oi.get(this.target)}}))})();var Te;(function(t){t.eager="eager",t.lazy="lazy"})(Te||(Te={}));var fe=class extends HTMLElement{constructor(){super();this.loaded=Promise.resolve(),this.delegate=new fe.delegateConstructor(this)}static get observedAttributes(){return["disabled","loading","src"]}connectedCallback(){this.delegate.connect()}disconnectedCallback(){this.delegate.disconnect()}reload(){let{src:e}=this;this.src=null,this.src=e}attributeChangedCallback(e){e=="loading"?this.delegate.loadingStyleChanged():e=="src"?this.delegate.sourceURLChanged():this.delegate.disabledChanged()}get src(){return this.getAttribute("src")}set src(e){e?this.setAttribute("src",e):this.removeAttribute("src")}get loading(){return ia(this.getAttribute("loading")||"")}set loading(e){e?this.setAttribute("loading",e):this.removeAttribute("loading")}get disabled(){return this.hasAttribute("disabled")}set disabled(e){e?this.setAttribute("disabled",""):this.removeAttribute("disabled")}get autoscroll(){return this.hasAttribute("autoscroll")}set autoscroll(e){e?this.setAttribute("autoscroll",""):this.removeAttribute("autoscroll")}get complete(){return!this.delegate.isLoading}get isActive(){return this.ownerDocument===document&&!this.isPreview}get isPreview(){var e,r;return(r=(e=this.ownerDocument)===null||e===void 0?void 0:e.documentElement)===null||r===void 0?void 0:r.hasAttribute("data-turbo-preview")}};function ia(t){switch(t.toLowerCase()){case"lazy":return Te.lazy;default:return Te.eager}}function ne(t){return new URL(t.toString(),document.baseURI)}function xe(t){let e;if(t.hash)return t.hash.slice(1);if(e=t.href.match(/#(.*)$/))return e[1]}function na(t){return(ua(t).match(/\.[^.]*$/)||[])[0]||""}function sa(t){return!!na(t).match(/^(?:|\.(?:htm|html|xhtml))$/)}function oa(t,e){let r=ca(e);return t.href===ne(r).href||t.href.startsWith(r)}function Er(t){let e=xe(t);return e!=null?t.href.slice(0,-(e.length+1)):t.href}function Vt(t){return Er(t)}function aa(t,e){return ne(t).href==ne(e).href}function la(t){return t.pathname.split("/").slice(1)}function ua(t){return la(t).slice(-1)[0]}function ca(t){return ha(t.origin+t.pathname)}function ha(t){return t.endsWith("/")?t:t+"/"}var Tr=class{constructor(e){this.response=e}get succeeded(){return this.response.ok}get failed(){return!this.succeeded}get clientError(){return this.statusCode>=400&&this.statusCode<=499}get serverError(){return this.statusCode>=500&&this.statusCode<=599}get redirected(){return this.response.redirected}get location(){return ne(this.response.url)}get isHTML(){return this.contentType&&this.contentType.match(/^(?:text\/([^\s;,]+\b)?html|application\/xhtml\+xml)\b/)}get statusCode(){return this.response.status}get contentType(){return this.header("Content-Type")}get responseText(){return this.response.text()}get responseHTML(){return this.isHTML?this.response.text():Promise.resolve(void 0)}header(e){return this.response.headers.get(e)}};function _(t,{target:e,cancelable:r,detail:i}={}){let n=new CustomEvent(t,{cancelable:r,bubbles:!0,detail:i});return(e||document.documentElement).dispatchEvent(n),n}function Bt(){return new Promise(t=>requestAnimationFrame(()=>t()))}function da(){return new Promise(t=>setTimeout(()=>t(),0))}function fa(){return Promise.resolve()}function Ci(t=""){return new DOMParser().parseFromString(t,"text/html")}function Li(t,...e){let r=ma(t,e).replace(/^\n/,"").split(` `),i=r[0].match(/^\s+/),n=i?i[0].length:0;return r.map(s=>s.slice(n)).join(` `)}function ma(t,e){return t.reduce((r,i,n)=>{let s=e[n]==null?"":e[n];return r+i+s},"")}function ht(){return Array.apply(null,{length:36}).map((t,e)=>e==8||e==13||e==18||e==23?"-":e==14?"4":e==19?(Math.floor(Math.random()*4)+8).toString(16):Math.floor(Math.random()*15).toString(16)).join("")}var F;(function(t){t[t.get=0]="get",t[t.post=1]="post",t[t.put=2]="put",t[t.patch=3]="patch",t[t.delete=4]="delete"})(F||(F={}));function pa(t){switch(t.toLowerCase()){case"get":return F.get;case"post":return F.post;case"put":return F.put;case"patch":return F.patch;case"delete":return F.delete}}var jt=class{constructor(e,r,i,n=new URLSearchParams){this.abortController=new AbortController,this.resolveRequestPromise=s=>{},this.delegate=e,this.method=r,this.headers=this.defaultHeaders,this.isIdempotent?this.url=ga(i,[...n.entries()]):(this.body=n,this.url=i)}get location(){return this.url}get params(){return this.url.searchParams}get entries(){return this.body?Array.from(this.body.entries()):[]}cancel(){this.abortController.abort()}async perform(){var e,r;let{fetchOptions:i}=this;(r=(e=this.delegate).prepareHeadersForRequest)===null||r===void 0||r.call(e,this.headers,this),await this.allowRequestToBeIntercepted(i);try{this.delegate.requestStarted(this);let n=await fetch(this.url.href,i);return await this.receive(n)}catch(n){if(n.name!=="AbortError")throw this.delegate.requestErrored(this,n),n}finally{this.delegate.requestFinished(this)}}async receive(e){let r=new Tr(e);return _("turbo:before-fetch-response",{cancelable:!0,detail:{fetchResponse:r}}).defaultPrevented?this.delegate.requestPreventedHandlingResponse(this,r):r.succeeded?this.delegate.requestSucceededWithResponse(this,r):this.delegate.requestFailedWithResponse(this,r),r}get fetchOptions(){var e;return{method:F[this.method].toUpperCase(),credentials:"same-origin",headers:this.headers,redirect:"follow",body:this.body,signal:this.abortSignal,referrer:(e=this.delegate.referrer)===null||e===void 0?void 0:e.href}}get defaultHeaders(){return{Accept:"text/html, application/xhtml+xml"}}get isIdempotent(){return this.method==F.get}get abortSignal(){return this.abortController.signal}async allowRequestToBeIntercepted(e){let r=new Promise(n=>this.resolveRequestPromise=n);_("turbo:before-fetch-request",{cancelable:!0,detail:{fetchOptions:e,url:this.url.href,resume:this.resolveRequestPromise}}).defaultPrevented&&await r}};function ga(t,e){let r=new URLSearchParams(t.search);for(let[i,n]of e)n instanceof File||(r.has(i)?(r.delete(i),t.searchParams.set(i,n)):t.searchParams.append(i,n));return t}var Ii=class{constructor(e,r){this.started=!1,this.intersect=i=>{let n=i.slice(-1)[0];(n==null?void 0:n.isIntersecting)&&this.delegate.elementAppearedInViewport(this.element)},this.delegate=e,this.element=r,this.intersectionObserver=new IntersectionObserver(this.intersect)}start(){this.started||(this.started=!0,this.intersectionObserver.observe(this.element))}stop(){this.started&&(this.started=!1,this.intersectionObserver.unobserve(this.element))}},Ze=class{constructor(e){this.templateElement=document.createElement("template"),this.templateElement.innerHTML=e}static wrap(e){return typeof e=="string"?new this(e):e}get fragment(){let e=document.createDocumentFragment();for(let r of this.foreignElements)e.appendChild(document.importNode(r,!0));return e}get foreignElements(){return this.templateChildren.reduce((e,r)=>r.tagName.toLowerCase()=="turbo-stream"?[...e,r]:e,[])}get templateChildren(){return Array.from(this.templateElement.content.children)}};Ze.contentType="text/vnd.turbo-stream.html";var ke;(function(t){t[t.initialized=0]="initialized",t[t.requesting=1]="requesting",t[t.waiting=2]="waiting",t[t.receiving=3]="receiving",t[t.stopping=4]="stopping",t[t.stopped=5]="stopped"})(ke||(ke={}));var Ae;(function(t){t.urlEncoded="application/x-www-form-urlencoded",t.multipart="multipart/form-data",t.plain="text/plain"})(Ae||(Ae={}));function va(t){switch(t.toLowerCase()){case Ae.multipart:return Ae.multipart;case Ae.plain:return Ae.plain;default:return Ae.urlEncoded}}var kr=class{constructor(e,r,i,n=!1){this.state=ke.initialized,this.delegate=e,this.formElement=r,this.submitter=i,this.formData=ya(r,i),this.fetchRequest=new jt(this,this.method,this.location,this.body),this.mustRedirect=n}get method(){var e;let r=((e=this.submitter)===null||e===void 0?void 0:e.getAttribute("formmethod"))||this.formElement.getAttribute("method")||"";return pa(r.toLowerCase())||F.get}get action(){var e;let r=typeof this.formElement.action=="string"?this.formElement.action:null;return((e=this.submitter)===null||e===void 0?void 0:e.getAttribute("formaction"))||this.formElement.getAttribute("action")||r||""}get location(){return ne(this.action)}get body(){return this.enctype==Ae.urlEncoded||this.method==F.get?new URLSearchParams(this.stringFormData):this.formData}get enctype(){var e;return va(((e=this.submitter)===null||e===void 0?void 0:e.getAttribute("formenctype"))||this.formElement.enctype)}get isIdempotent(){return this.fetchRequest.isIdempotent}get stringFormData(){return[...this.formData].reduce((e,[r,i])=>e.concat(typeof i=="string"?[[r,i]]:[]),[])}async start(){let{initialized:e,requesting:r}=ke;if(this.state==e)return this.state=r,this.fetchRequest.perform()}stop(){let{stopping:e,stopped:r}=ke;if(this.state!=e&&this.state!=r)return this.state=e,this.fetchRequest.cancel(),!0}prepareHeadersForRequest(e,r){if(!r.isIdempotent){let i=ba(Pi("csrf-param"))||Pi("csrf-token");i&&(e["X-CSRF-Token"]=i),e.Accept=[Ze.contentType,e.Accept].join(", ")}}requestStarted(e){this.state=ke.waiting,_("turbo:submit-start",{target:this.formElement,detail:{formSubmission:this}}),this.delegate.formSubmissionStarted(this)}requestPreventedHandlingResponse(e,r){this.result={success:r.succeeded,fetchResponse:r}}requestSucceededWithResponse(e,r){if(r.clientError||r.serverError)this.delegate.formSubmissionFailedWithResponse(this,r);else if(this.requestMustRedirect(e)&&wa(r)){let i=new Error("Form responses must redirect to another location");this.delegate.formSubmissionErrored(this,i)}else this.state=ke.receiving,this.result={success:!0,fetchResponse:r},this.delegate.formSubmissionSucceededWithResponse(this,r)}requestFailedWithResponse(e,r){this.result={success:!1,fetchResponse:r},this.delegate.formSubmissionFailedWithResponse(this,r)}requestErrored(e,r){this.result={success:!1,error:r},this.delegate.formSubmissionErrored(this,r)}requestFinished(e){this.state=ke.stopped,_("turbo:submit-end",{target:this.formElement,detail:Object.assign({formSubmission:this},this.result)}),this.delegate.formSubmissionFinished(this)}requestMustRedirect(e){return!e.isIdempotent&&this.mustRedirect}};function ya(t,e){let r=new FormData(t),i=e==null?void 0:e.getAttribute("name"),n=e==null?void 0:e.getAttribute("value");return i&&n!=null&&r.get(i)!=n&&r.append(i,n),r}function ba(t){if(t!=null){let r=(document.cookie?document.cookie.split("; "):[]).find(i=>i.startsWith(t));if(r){let i=r.split("=").slice(1).join("=");return i?decodeURIComponent(i):void 0}}}function Pi(t){let e=document.querySelector(`meta[name="${t}"]`);return e&&e.content}function wa(t){return t.statusCode==200&&!t.redirected}var dt=class{constructor(e){this.element=e}get children(){return[...this.element.children]}hasAnchor(e){return this.getElementForAnchor(e)!=null}getElementForAnchor(e){return e?this.element.querySelector(`[id='${e}'], a[name='${e}']`):null}get isConnected(){return this.element.isConnected}get firstAutofocusableElement(){return this.element.querySelector("[autofocus]")}get permanentElements(){return[...this.element.querySelectorAll("[id][data-turbo-permanent]")]}getPermanentElementById(e){return this.element.querySelector(`#${e}[data-turbo-permanent]`)}getPermanentElementMapForSnapshot(e){let r={};for(let i of this.permanentElements){let{id:n}=i,s=e.getPermanentElementById(n);s&&(r[n]=[i,s])}return r}},Ar=class{constructor(e,r){this.submitBubbled=i=>{if(i.target instanceof HTMLFormElement){let n=i.target,s=i.submitter||void 0;this.delegate.shouldInterceptFormSubmission(n,s)&&(i.preventDefault(),i.stopImmediatePropagation(),this.delegate.formSubmissionIntercepted(n,s))}},this.delegate=e,this.element=r}start(){this.element.addEventListener("submit",this.submitBubbled)}stop(){this.element.removeEventListener("submit",this.submitBubbled)}},Or=class{constructor(e,r){this.resolveRenderPromise=i=>{},this.resolveInterceptionPromise=i=>{},this.delegate=e,this.element=r}scrollToAnchor(e){let r=this.snapshot.getElementForAnchor(e);r?(this.scrollToElement(r),this.focusElement(r)):this.scrollToPosition({x:0,y:0})}scrollToAnchorFromLocation(e){this.scrollToAnchor(xe(e))}scrollToElement(e){e.scrollIntoView()}focusElement(e){e instanceof HTMLElement&&(e.hasAttribute("tabindex")?e.focus():(e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")))}scrollToPosition({x:e,y:r}){this.scrollRoot.scrollTo(e,r)}scrollToTop(){this.scrollToPosition({x:0,y:0})}get scrollRoot(){return window}async render(e){let{isPreview:r,shouldRender:i,newSnapshot:n}=e;if(i)try{this.renderPromise=new Promise(a=>this.resolveRenderPromise=a),this.renderer=e,this.prepareToRenderSnapshot(e);let s=new Promise(a=>this.resolveInterceptionPromise=a);this.delegate.allowsImmediateRender(n,this.resolveInterceptionPromise)||await s,await this.renderSnapshot(e),this.delegate.viewRenderedSnapshot(n,r),this.finishRenderingSnapshot(e)}finally{delete this.renderer,this.resolveRenderPromise(void 0),delete this.renderPromise}else this.invalidate()}invalidate(){this.delegate.viewInvalidated()}prepareToRenderSnapshot(e){this.markAsPreview(e.isPreview),e.prepareToRender()}markAsPreview(e){e?this.element.setAttribute("data-turbo-preview",""):this.element.removeAttribute("data-turbo-preview")}async renderSnapshot(e){await e.render()}finishRenderingSnapshot(e){e.finishRendering()}},Mi=class extends Or{invalidate(){this.element.innerHTML=""}get snapshot(){return new dt(this.element)}},Cr=class{constructor(e,r){this.clickBubbled=i=>{this.respondsToEventTarget(i.target)?this.clickEvent=i:delete this.clickEvent},this.linkClicked=i=>{this.clickEvent&&this.respondsToEventTarget(i.target)&&i.target instanceof Element&&this.delegate.shouldInterceptLinkClick(i.target,i.detail.url)&&(this.clickEvent.preventDefault(),i.preventDefault(),this.delegate.linkClickIntercepted(i.target,i.detail.url)),delete this.clickEvent},this.willVisit=()=>{delete this.clickEvent},this.delegate=e,this.element=r}start(){this.element.addEventListener("click",this.clickBubbled),document.addEventListener("turbo:click",this.linkClicked),document.addEventListener("turbo:before-visit",this.willVisit)}stop(){this.element.removeEventListener("click",this.clickBubbled),document.removeEventListener("turbo:click",this.linkClicked),document.removeEventListener("turbo:before-visit",this.willVisit)}respondsToEventTarget(e){let r=e instanceof Element?e:e instanceof Node?e.parentElement:null;return r&&r.closest("turbo-frame, html")==this.element}},Ri=class{constructor(e){this.permanentElementMap=e}static preservingPermanentElements(e,r){let i=new this(e);i.enter(),r(),i.leave()}enter(){for(let e in this.permanentElementMap){let[,r]=this.permanentElementMap[e];this.replaceNewPermanentElementWithPlaceholder(r)}}leave(){for(let e in this.permanentElementMap){let[r]=this.permanentElementMap[e];this.replaceCurrentPermanentElementWithClone(r),this.replacePlaceholderWithPermanentElement(r)}}replaceNewPermanentElementWithPlaceholder(e){let r=Sa(e);e.replaceWith(r)}replaceCurrentPermanentElementWithClone(e){let r=e.cloneNode(!0);e.replaceWith(r)}replacePlaceholderWithPermanentElement(e){let r=this.getPlaceholderById(e.id);r==null||r.replaceWith(e)}getPlaceholderById(e){return this.placeholders.find(r=>r.content==e)}get placeholders(){return[...document.querySelectorAll("meta[name=turbo-permanent-placeholder][content]")]}};function Sa(t){let e=document.createElement("meta");return e.setAttribute("name","turbo-permanent-placeholder"),e.setAttribute("content",t.id),e}var Ut=class{constructor(e,r,i){this.currentSnapshot=e,this.newSnapshot=r,this.isPreview=i,this.promise=new Promise((n,s)=>this.resolvingFunctions={resolve:n,reject:s})}get shouldRender(){return!0}prepareToRender(){}finishRendering(){this.resolvingFunctions&&(this.resolvingFunctions.resolve(),delete this.resolvingFunctions)}createScriptElement(e){if(e.getAttribute("data-turbo-eval")=="false")return e;{let r=document.createElement("script");return this.cspNonce&&(r.nonce=this.cspNonce),r.textContent=e.textContent,r.async=!1,Ea(r,e),r}}preservingPermanentElements(e){Ri.preservingPermanentElements(this.permanentElementMap,e)}focusFirstAutofocusableElement(){let e=this.connectedSnapshot.firstAutofocusableElement;Ta(e)&&e.focus()}get connectedSnapshot(){return this.newSnapshot.isConnected?this.newSnapshot:this.currentSnapshot}get currentElement(){return this.currentSnapshot.element}get newElement(){return this.newSnapshot.element}get permanentElementMap(){return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot)}get cspNonce(){var e;return(e=document.head.querySelector('meta[name="csp-nonce"]'))===null||e===void 0?void 0:e.getAttribute("content")}};function Ea(t,e){for(let{name:r,value:i}of[...e.attributes])t.setAttribute(r,i)}function Ta(t){return t&&typeof t.focus=="function"}var Di=class extends Ut{get shouldRender(){return!0}async render(){await Bt(),this.preservingPermanentElements(()=>{this.loadFrameElement()}),this.scrollFrameIntoView(),await Bt(),this.focusFirstAutofocusableElement(),await Bt(),this.activateScriptElements()}loadFrameElement(){var e;let r=document.createRange();r.selectNodeContents(this.currentElement),r.deleteContents();let i=this.newElement,n=(e=i.ownerDocument)===null||e===void 0?void 0:e.createRange();n&&(n.selectNodeContents(i),this.currentElement.appendChild(n.extractContents()))}scrollFrameIntoView(){if(this.currentElement.autoscroll||this.newElement.autoscroll){let e=this.currentElement.firstElementChild,r=ka(this.currentElement.getAttribute("data-autoscroll-block"),"end");if(e)return e.scrollIntoView({block:r}),!0}return!1}activateScriptElements(){for(let e of this.newScriptElements){let r=this.createScriptElement(e);e.replaceWith(r)}}get newScriptElements(){return this.currentElement.querySelectorAll("script")}};function ka(t,e){return t=="end"||t=="start"||t=="center"||t=="nearest"?t:e}var se=class{constructor(){this.hiding=!1,this.value=0,this.visible=!1,this.trickle=()=>{this.setValue(this.value+Math.random()/100)},this.stylesheetElement=this.createStylesheetElement(),this.progressElement=this.createProgressElement(),this.installStylesheetElement(),this.setValue(0)}static get defaultCSS(){return Li` .turbo-progress-bar { position: fixed; display: block; top: 0; left: 0; height: 3px; background: #0076ff; z-index: 9999; transition: width ${se.animationDuration}ms ease-out, opacity ${se.animationDuration/2}ms ${se.animationDuration/2}ms ease-in; transform: translate3d(0, 0, 0); } `}show(){this.visible||(this.visible=!0,this.installProgressElement(),this.startTrickling())}hide(){this.visible&&!this.hiding&&(this.hiding=!0,this.fadeProgressElement(()=>{this.uninstallProgressElement(),this.stopTrickling(),this.visible=!1,this.hiding=!1}))}setValue(e){this.value=e,this.refresh()}installStylesheetElement(){document.head.insertBefore(this.stylesheetElement,document.head.firstChild)}installProgressElement(){this.progressElement.style.width="0",this.progressElement.style.opacity="1",document.documentElement.insertBefore(this.progressElement,document.body),this.refresh()}fadeProgressElement(e){this.progressElement.style.opacity="0",setTimeout(e,se.animationDuration*1.5)}uninstallProgressElement(){this.progressElement.parentNode&&document.documentElement.removeChild(this.progressElement)}startTrickling(){this.trickleInterval||(this.trickleInterval=window.setInterval(this.trickle,se.animationDuration))}stopTrickling(){window.clearInterval(this.trickleInterval),delete this.trickleInterval}refresh(){requestAnimationFrame(()=>{this.progressElement.style.width=`${10+this.value*90}%`})}createStylesheetElement(){let e=document.createElement("style");return e.type="text/css",e.textContent=se.defaultCSS,e}createProgressElement(){let e=document.createElement("div");return e.className="turbo-progress-bar",e}};se.animationDuration=300;var xi=class extends dt{constructor(){super(...arguments);this.detailsByOuterHTML=this.children.filter(e=>!La(e)).reduce((e,r)=>{let{outerHTML:i}=r,n=i in e?e[i]:{type:Aa(r),tracked:Oa(r),elements:[]};return Object.assign(Object.assign({},e),{[i]:Object.assign(Object.assign({},n),{elements:[...n.elements,r]})})},{})}get trackedElementSignature(){return Object.keys(this.detailsByOuterHTML).filter(e=>this.detailsByOuterHTML[e].tracked).join("")}getScriptElementsNotInSnapshot(e){return this.getElementsMatchingTypeNotInSnapshot("script",e)}getStylesheetElementsNotInSnapshot(e){return this.getElementsMatchingTypeNotInSnapshot("stylesheet",e)}getElementsMatchingTypeNotInSnapshot(e,r){return Object.keys(this.detailsByOuterHTML).filter(i=>!(i in r.detailsByOuterHTML)).map(i=>this.detailsByOuterHTML[i]).filter(({type:i})=>i==e).map(({elements:[i]})=>i)}get provisionalElements(){return Object.keys(this.detailsByOuterHTML).reduce((e,r)=>{let{type:i,tracked:n,elements:s}=this.detailsByOuterHTML[r];return i==null&&!n?[...e,...s]:s.length>1?[...e,...s.slice(1)]:e},[])}getMetaValue(e){let r=this.findMetaElementByName(e);return r?r.getAttribute("content"):null}findMetaElementByName(e){return Object.keys(this.detailsByOuterHTML).reduce((r,i)=>{let{elements:[n]}=this.detailsByOuterHTML[i];return Pa(n,e)?n:r},void 0)}};function Aa(t){if(Ca(t))return"script";if(Ia(t))return"stylesheet"}function Oa(t){return t.getAttribute("data-turbo-track")=="reload"}function Ca(t){return t.tagName.toLowerCase()=="script"}function La(t){return t.tagName.toLowerCase()=="noscript"}function Ia(t){let e=t.tagName.toLowerCase();return e=="style"||e=="link"&&t.getAttribute("rel")=="stylesheet"}function Pa(t,e){return t.tagName.toLowerCase()=="meta"&&t.getAttribute("name")==e}var me=class extends dt{constructor(e,r){super(e);this.headSnapshot=r}static fromHTMLString(e=""){return this.fromDocument(Ci(e))}static fromElement(e){return this.fromDocument(e.ownerDocument)}static fromDocument({head:e,body:r}){return new this(r,new xi(e))}clone(){return new me(this.element.cloneNode(!0),this.headSnapshot)}get headElement(){return this.headSnapshot.element}get rootLocation(){var e;let r=(e=this.getSetting("root"))!==null&&e!==void 0?e:"/";return ne(r)}get cacheControlValue(){return this.getSetting("cache-control")}get isPreviewable(){return this.cacheControlValue!="no-preview"}get isCacheable(){return this.cacheControlValue!="no-cache"}get isVisitable(){return this.getSetting("visit-control")!="reload"}getSetting(e){return this.headSnapshot.getMetaValue(`turbo-${e}`)}},Je;(function(t){t.visitStart="visitStart",t.requestStart="requestStart",t.requestEnd="requestEnd",t.visitEnd="visitEnd"})(Je||(Je={}));var X;(function(t){t.initialized="initialized",t.started="started",t.canceled="canceled",t.failed="failed",t.completed="completed"})(X||(X={}));var Ma={action:"advance",historyChanged:!1},Oe;(function(t){t[t.networkFailure=0]="networkFailure",t[t.timeoutFailure=-1]="timeoutFailure",t[t.contentTypeMismatch=-2]="contentTypeMismatch"})(Oe||(Oe={}));var Ni=class{constructor(e,r,i,n={}){this.identifier=ht(),this.timingMetrics={},this.followedRedirect=!1,this.historyChanged=!1,this.scrolled=!1,this.snapshotCached=!1,this.state=X.initialized,this.delegate=e,this.location=r,this.restorationIdentifier=i||ht();let{action:s,historyChanged:o,referrer:a,snapshotHTML:l,response:u}=Object.assign(Object.assign({},Ma),n);this.action=s,this.historyChanged=o,this.referrer=a,this.snapshotHTML=l,this.response=u,this.isSamePage=this.delegate.locationWithActionIsSamePage(this.location,this.action)}get adapter(){return this.delegate.adapter}get view(){return this.delegate.view}get history(){return this.delegate.history}get restorationData(){return this.history.getRestorationDataForIdentifier(this.restorationIdentifier)}get silent(){return this.isSamePage}start(){this.state==X.initialized&&(this.recordTimingMetric(Je.visitStart),this.state=X.started,this.adapter.visitStarted(this),this.delegate.visitStarted(this))}cancel(){this.state==X.started&&(this.request&&this.request.cancel(),this.cancelRender(),this.state=X.canceled)}complete(){this.state==X.started&&(this.recordTimingMetric(Je.visitEnd),this.state=X.completed,this.adapter.visitCompleted(this),this.delegate.visitCompleted(this),this.followRedirect())}fail(){this.state==X.started&&(this.state=X.failed,this.adapter.visitFailed(this))}changeHistory(){var e;if(!this.historyChanged){let r=this.location.href===((e=this.referrer)===null||e===void 0?void 0:e.href)?"replace":this.action,i=this.getHistoryMethodForAction(r);this.history.update(i,this.location,this.restorationIdentifier),this.historyChanged=!0}}issueRequest(){this.hasPreloadedResponse()?this.simulateRequest():this.shouldIssueRequest()&&!this.request&&(this.request=new jt(this,F.get,this.location),this.request.perform())}simulateRequest(){this.response&&(this.startRequest(),this.recordResponse(),this.finishRequest())}startRequest(){this.recordTimingMetric(Je.requestStart),this.adapter.visitRequestStarted(this)}recordResponse(e=this.response){if(this.response=e,e){let{statusCode:r}=e;_i(r)?this.adapter.visitRequestCompleted(this):this.adapter.visitRequestFailedWithStatusCode(this,r)}}finishRequest(){this.recordTimingMetric(Je.requestEnd),this.adapter.visitRequestFinished(this)}loadResponse(){if(this.response){let{statusCode:e,responseHTML:r}=this.response;this.render(async()=>{this.cacheSnapshot(),this.view.renderPromise&&await this.view.renderPromise,_i(e)&&r!=null?(await this.view.renderPage(me.fromHTMLString(r)),this.adapter.visitRendered(this),this.complete()):(await this.view.renderError(me.fromHTMLString(r)),this.adapter.visitRendered(this),this.fail())})}}getCachedSnapshot(){let e=this.view.getCachedSnapshotForLocation(this.location)||this.getPreloadedSnapshot();if(e&&(!xe(this.location)||e.hasAnchor(xe(this.location)))&&(this.action=="restore"||e.isPreviewable))return e}getPreloadedSnapshot(){if(this.snapshotHTML)return me.fromHTMLString(this.snapshotHTML)}hasCachedSnapshot(){return this.getCachedSnapshot()!=null}loadCachedSnapshot(){let e=this.getCachedSnapshot();if(e){let r=this.shouldIssueRequest();this.render(async()=>{this.cacheSnapshot(),this.isSamePage?this.adapter.visitRendered(this):(this.view.renderPromise&&await this.view.renderPromise,await this.view.renderPage(e,r),this.adapter.visitRendered(this),r||this.complete())})}}followRedirect(){this.redirectedToLocation&&!this.followedRedirect&&(this.adapter.visitProposedToLocation(this.redirectedToLocation,{action:"replace",response:this.response}),this.followedRedirect=!0)}goToSamePageAnchor(){this.isSamePage&&this.render(async()=>{this.cacheSnapshot(),this.adapter.visitRendered(this)})}requestStarted(){this.startRequest()}requestPreventedHandlingResponse(e,r){}async requestSucceededWithResponse(e,r){let i=await r.responseHTML;i==null?this.recordResponse({statusCode:Oe.contentTypeMismatch}):(this.redirectedToLocation=r.redirected?r.location:void 0,this.recordResponse({statusCode:r.statusCode,responseHTML:i}))}async requestFailedWithResponse(e,r){let i=await r.responseHTML;i==null?this.recordResponse({statusCode:Oe.contentTypeMismatch}):this.recordResponse({statusCode:r.statusCode,responseHTML:i})}requestErrored(e,r){this.recordResponse({statusCode:Oe.networkFailure})}requestFinished(){this.finishRequest()}performScroll(){this.scrolled||(this.action=="restore"?this.scrollToRestoredPosition()||this.scrollToAnchor()||this.view.scrollToTop():this.scrollToAnchor()||this.view.scrollToTop(),this.isSamePage&&this.delegate.visitScrolledToSamePageLocation(this.view.lastRenderedLocation,this.location),this.scrolled=!0)}scrollToRestoredPosition(){let{scrollPosition:e}=this.restorationData;if(e)return this.view.scrollToPosition(e),!0}scrollToAnchor(){let e=xe(this.location);if(e!=null)return this.view.scrollToAnchor(e),!0}recordTimingMetric(e){this.timingMetrics[e]=new Date().getTime()}getTimingMetrics(){return Object.assign({},this.timingMetrics)}getHistoryMethodForAction(e){switch(e){case"replace":return history.replaceState;case"advance":case"restore":return history.pushState}}hasPreloadedResponse(){return typeof this.response=="object"}shouldIssueRequest(){return this.isSamePage?!1:this.action=="restore"?!this.hasCachedSnapshot():!0}cacheSnapshot(){this.snapshotCached||(this.view.cacheSnapshot(),this.snapshotCached=!0)}async render(e){this.cancelRender(),await new Promise(r=>{this.frame=requestAnimationFrame(()=>r())}),await e(),delete this.frame,this.performScroll()}cancelRender(){this.frame&&(cancelAnimationFrame(this.frame),delete this.frame)}};function _i(t){return t>=200&&t<300}var Fi=class{constructor(e){this.progressBar=new se,this.showProgressBar=()=>{this.progressBar.show()},this.session=e}visitProposedToLocation(e,r){this.navigator.startVisit(e,ht(),r)}visitStarted(e){e.issueRequest(),e.changeHistory(),e.goToSamePageAnchor(),e.loadCachedSnapshot()}visitRequestStarted(e){this.progressBar.setValue(0),e.hasCachedSnapshot()||e.action!="restore"?this.showVisitProgressBarAfterDelay():this.showProgressBar()}visitRequestCompleted(e){e.loadResponse()}visitRequestFailedWithStatusCode(e,r){switch(r){case Oe.networkFailure:case Oe.timeoutFailure:case Oe.contentTypeMismatch:return this.reload();default:return e.loadResponse()}}visitRequestFinished(e){this.progressBar.setValue(1),this.hideVisitProgressBar()}visitCompleted(e){}pageInvalidated(){this.reload()}visitFailed(e){}visitRendered(e){}formSubmissionStarted(e){this.progressBar.setValue(0),this.showFormProgressBarAfterDelay()}formSubmissionFinished(e){this.progressBar.setValue(1),this.hideFormProgressBar()}showVisitProgressBarAfterDelay(){this.visitProgressBarTimeout=window.setTimeout(this.showProgressBar,this.session.progressBarDelay)}hideVisitProgressBar(){this.progressBar.hide(),this.visitProgressBarTimeout!=null&&(window.clearTimeout(this.visitProgressBarTimeout),delete this.visitProgressBarTimeout)}showFormProgressBarAfterDelay(){this.formProgressBarTimeout==null&&(this.formProgressBarTimeout=window.setTimeout(this.showProgressBar,this.session.progressBarDelay))}hideFormProgressBar(){this.progressBar.hide(),this.formProgressBarTimeout!=null&&(window.clearTimeout(this.formProgressBarTimeout),delete this.formProgressBarTimeout)}reload(){window.location.reload()}get navigator(){return this.session.navigator}},Hi=class{constructor(){this.started=!1}start(){this.started||(this.started=!0,addEventListener("turbo:before-cache",this.removeStaleElements,!1))}stop(){this.started&&(this.started=!1,removeEventListener("turbo:before-cache",this.removeStaleElements,!1))}removeStaleElements(){let e=[...document.querySelectorAll('[data-turbo-cache="false"]')];for(let r of e)r.remove()}},Vi=class{constructor(e){this.started=!1,this.submitCaptured=()=>{removeEventListener("submit",this.submitBubbled,!1),addEventListener("submit",this.submitBubbled,!1)},this.submitBubbled=r=>{if(!r.defaultPrevented){let i=r.target instanceof HTMLFormElement?r.target:void 0,n=r.submitter||void 0;i&&((n==null?void 0:n.getAttribute("formmethod"))||i.method)!="dialog"&&this.delegate.willSubmitForm(i,n)&&(r.preventDefault(),this.delegate.formSubmitted(i,n))}},this.delegate=e}start(){this.started||(addEventListener("submit",this.submitCaptured,!0),this.started=!0)}stop(){this.started&&(removeEventListener("submit",this.submitCaptured,!0),this.started=!1)}},Bi=class{constructor(e){this.element=e,this.linkInterceptor=new Cr(this,e),this.formInterceptor=new Ar(this,e)}start(){this.linkInterceptor.start(),this.formInterceptor.start()}stop(){this.linkInterceptor.stop(),this.formInterceptor.stop()}shouldInterceptLinkClick(e,r){return this.shouldRedirect(e)}linkClickIntercepted(e,r){let i=this.findFrameElement(e);i&&(i.setAttribute("reloadable",""),i.src=r)}shouldInterceptFormSubmission(e,r){return this.shouldRedirect(e,r)}formSubmissionIntercepted(e,r){let i=this.findFrameElement(e);i&&(i.removeAttribute("reloadable"),i.delegate.formSubmissionIntercepted(e,r))}shouldRedirect(e,r){let i=this.findFrameElement(e);return i?i!=e.closest("turbo-frame"):!1}findFrameElement(e){let r=e.getAttribute("data-turbo-frame");if(r&&r!="_top"){let i=this.element.querySelector(`#${r}:not([disabled])`);if(i instanceof fe)return i}}},ji=class{constructor(e){this.restorationIdentifier=ht(),this.restorationData={},this.started=!1,this.pageLoaded=!1,this.onPopState=r=>{if(this.shouldHandlePopState()){let{turbo:i}=r.state||{};if(i){this.location=new URL(window.location.href);let{restorationIdentifier:n}=i;this.restorationIdentifier=n,this.delegate.historyPoppedToLocationWithRestorationIdentifier(this.location,n)}}},this.onPageLoad=async r=>{await fa(),this.pageLoaded=!0},this.delegate=e}start(){this.started||(addEventListener("popstate",this.onPopState,!1),addEventListener("load",this.onPageLoad,!1),this.started=!0,this.replace(new URL(window.location.href)))}stop(){this.started&&(removeEventListener("popstate",this.onPopState,!1),removeEventListener("load",this.onPageLoad,!1),this.started=!1)}push(e,r){this.update(history.pushState,e,r)}replace(e,r){this.update(history.replaceState,e,r)}update(e,r,i=ht()){let n={turbo:{restorationIdentifier:i}};e.call(history,n,"",r.href),this.location=r,this.restorationIdentifier=i}getRestorationDataForIdentifier(e){return this.restorationData[e]||{}}updateRestorationData(e){let{restorationIdentifier:r}=this,i=this.restorationData[r];this.restorationData[r]=Object.assign(Object.assign({},i),e)}assumeControlOfScrollRestoration(){var e;this.previousScrollRestoration||(this.previousScrollRestoration=(e=history.scrollRestoration)!==null&&e!==void 0?e:"auto",history.scrollRestoration="manual")}relinquishControlOfScrollRestoration(){this.previousScrollRestoration&&(history.scrollRestoration=this.previousScrollRestoration,delete this.previousScrollRestoration)}shouldHandlePopState(){return this.pageIsLoaded()}pageIsLoaded(){return this.pageLoaded||document.readyState=="complete"}},Ui=class{constructor(e){this.started=!1,this.clickCaptured=()=>{removeEventListener("click",this.clickBubbled,!1),addEventListener("click",this.clickBubbled,!1)},this.clickBubbled=r=>{if(this.clickEventIsSignificant(r)){let i=r.composedPath&&r.composedPath()[0]||r.target,n=this.findLinkFromClickTarget(i);if(n){let s=this.getLocationForLink(n);this.delegate.willFollowLinkToLocation(n,s)&&(r.preventDefault(),this.delegate.followedLinkToLocation(n,s))}}},this.delegate=e}start(){this.started||(addEventListener("click",this.clickCaptured,!0),this.started=!0)}stop(){this.started&&(removeEventListener("click",this.clickCaptured,!0),this.started=!1)}clickEventIsSignificant(e){return!(e.target&&e.target.isContentEditable||e.defaultPrevented||e.which>1||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)}findLinkFromClickTarget(e){if(e instanceof Element)return e.closest("a[href]:not([target^=_]):not([download])")}getLocationForLink(e){return ne(e.getAttribute("href")||"")}};function qi(t){return t=="advance"||t=="replace"||t=="restore"}var $i=class{constructor(e){this.delegate=e}proposeVisit(e,r={}){this.delegate.allowsVisitingLocationWithAction(e,r.action)&&this.delegate.visitProposedToLocation(e,r)}startVisit(e,r,i={}){this.stop(),this.currentVisit=new Ni(this,ne(e),r,Object.assign({referrer:this.location},i)),this.currentVisit.start()}submitForm(e,r){this.stop(),this.formSubmission=new kr(this,e,r,!0),this.formSubmission.isIdempotent?this.proposeVisit(this.formSubmission.fetchRequest.url,{action:this.getActionForFormSubmission(this.formSubmission)}):this.formSubmission.start()}stop(){this.formSubmission&&(this.formSubmission.stop(),delete this.formSubmission),this.currentVisit&&(this.currentVisit.cancel(),delete this.currentVisit)}get adapter(){return this.delegate.adapter}get view(){return this.delegate.view}get history(){return this.delegate.history}formSubmissionStarted(e){typeof this.adapter.formSubmissionStarted=="function"&&this.adapter.formSubmissionStarted(e)}async formSubmissionSucceededWithResponse(e,r){if(e==this.formSubmission){let i=await r.responseHTML;if(i){e.method!=F.get&&this.view.clearSnapshotCache();let{statusCode:n}=r,s={response:{statusCode:n,responseHTML:i}};this.proposeVisit(r.location,s)}}}async formSubmissionFailedWithResponse(e,r){let i=await r.responseHTML;if(i){let n=me.fromHTMLString(i);r.serverError?await this.view.renderError(n):await this.view.renderPage(n),this.view.scrollToTop(),this.view.clearSnapshotCache()}}formSubmissionErrored(e,r){console.error(r)}formSubmissionFinished(e){typeof this.adapter.formSubmissionFinished=="function"&&this.adapter.formSubmissionFinished(e)}visitStarted(e){this.delegate.visitStarted(e)}visitCompleted(e){this.delegate.visitCompleted(e)}locationWithActionIsSamePage(e,r){let i=xe(e),n=xe(this.view.lastRenderedLocation),s=r==="restore"&&typeof i=="undefined";return r!=="replace"&&Er(e)===Er(this.view.lastRenderedLocation)&&(s||i!=null&&i!==n)}visitScrolledToSamePageLocation(e,r){this.delegate.visitScrolledToSamePageLocation(e,r)}get location(){return this.history.location}get restorationIdentifier(){return this.history.restorationIdentifier}getActionForFormSubmission(e){let{formElement:r,submitter:i}=e,n=(i==null?void 0:i.getAttribute("data-turbo-action"))||r.getAttribute("data-turbo-action");return qi(n)?n:"advance"}},pe;(function(t){t[t.initial=0]="initial",t[t.loading=1]="loading",t[t.interactive=2]="interactive",t[t.complete=3]="complete"})(pe||(pe={}));var Wi=class{constructor(e){this.stage=pe.initial,this.started=!1,this.interpretReadyState=()=>{let{readyState:r}=this;r=="interactive"?this.pageIsInteractive():r=="complete"&&this.pageIsComplete()},this.pageWillUnload=()=>{this.delegate.pageWillUnload()},this.delegate=e}start(){this.started||(this.stage==pe.initial&&(this.stage=pe.loading),document.addEventListener("readystatechange",this.interpretReadyState,!1),addEventListener("pagehide",this.pageWillUnload,!1),this.started=!0)}stop(){this.started&&(document.removeEventListener("readystatechange",this.interpretReadyState,!1),removeEventListener("pagehide",this.pageWillUnload,!1),this.started=!1)}pageIsInteractive(){this.stage==pe.loading&&(this.stage=pe.interactive,this.delegate.pageBecameInteractive())}pageIsComplete(){this.pageIsInteractive(),this.stage==pe.interactive&&(this.stage=pe.complete,this.delegate.pageLoaded())}get readyState(){return document.readyState}},zi=class{constructor(e){this.started=!1,this.onScroll=()=>{this.updatePosition({x:window.pageXOffset,y:window.pageYOffset})},this.delegate=e}start(){this.started||(addEventListener("scroll",this.onScroll,!1),this.onScroll(),this.started=!0)}stop(){this.started&&(removeEventListener("scroll",this.onScroll,!1),this.started=!1)}updatePosition(e){this.delegate.scrollPositionChanged(e)}},Zi=class{constructor(e){this.sources=new Set,this.started=!1,this.inspectFetchResponse=r=>{let i=Ra(r);i&&Da(i)&&(r.preventDefault(),this.receiveMessageResponse(i))},this.receiveMessageEvent=r=>{this.started&&typeof r.data=="string"&&this.receiveMessageHTML(r.data)},this.delegate=e}start(){this.started||(this.started=!0,addEventListener("turbo:before-fetch-response",this.inspectFetchResponse,!1))}stop(){this.started&&(this.started=!1,removeEventListener("turbo:before-fetch-response",this.inspectFetchResponse,!1))}connectStreamSource(e){this.streamSourceIsConnected(e)||(this.sources.add(e),e.addEventListener("message",this.receiveMessageEvent,!1))}disconnectStreamSource(e){this.streamSourceIsConnected(e)&&(this.sources.delete(e),e.removeEventListener("message",this.receiveMessageEvent,!1))}streamSourceIsConnected(e){return this.sources.has(e)}async receiveMessageResponse(e){let r=await e.responseHTML;r&&this.receiveMessageHTML(r)}receiveMessageHTML(e){this.delegate.receivedMessageFromStream(new Ze(e))}};function Ra(t){var e;let r=(e=t.detail)===null||e===void 0?void 0:e.fetchResponse;if(r instanceof Tr)return r}function Da(t){var e;return((e=t.contentType)!==null&&e!==void 0?e:"").startsWith(Ze.contentType)}var Ji=class extends Ut{async render(){this.replaceHeadAndBody(),this.activateScriptElements()}replaceHeadAndBody(){let{documentElement:e,head:r,body:i}=document;e.replaceChild(this.newHead,r),e.replaceChild(this.newElement,i)}activateScriptElements(){for(let e of this.scriptElements){let r=e.parentNode;if(r){let i=this.createScriptElement(e);r.replaceChild(i,e)}}}get newHead(){return this.newSnapshot.headSnapshot.element}get scriptElements(){return[...document.documentElement.querySelectorAll("script")]}},Lr=class extends Ut{get shouldRender(){return this.newSnapshot.isVisitable&&this.trackedElementsAreIdentical}prepareToRender(){this.mergeHead()}async render(){this.replaceBody()}finishRendering(){super.finishRendering(),this.isPreview||this.focusFirstAutofocusableElement()}get currentHeadSnapshot(){return this.currentSnapshot.headSnapshot}get newHeadSnapshot(){return this.newSnapshot.headSnapshot}get newElement(){return this.newSnapshot.element}mergeHead(){this.copyNewHeadStylesheetElements(),this.copyNewHeadScriptElements(),this.removeCurrentHeadProvisionalElements(),this.copyNewHeadProvisionalElements()}replaceBody(){this.preservingPermanentElements(()=>{this.activateNewBody(),this.assignNewBody()})}get trackedElementsAreIdentical(){return this.currentHeadSnapshot.trackedElementSignature==this.newHeadSnapshot.trackedElementSignature}copyNewHeadStylesheetElements(){for(let e of this.newHeadStylesheetElements)document.head.appendChild(e)}copyNewHeadScriptElements(){for(let e of this.newHeadScriptElements)document.head.appendChild(this.createScriptElement(e))}removeCurrentHeadProvisionalElements(){for(let e of this.currentHeadProvisionalElements)document.head.removeChild(e)}copyNewHeadProvisionalElements(){for(let e of this.newHeadProvisionalElements)document.head.appendChild(e)}activateNewBody(){document.adoptNode(this.newElement),this.activateNewBodyScriptElements()}activateNewBodyScriptElements(){for(let e of this.newBodyScriptElements){let r=this.createScriptElement(e);e.replaceWith(r)}}assignNewBody(){document.body&&this.newElement instanceof HTMLBodyElement?document.body.replaceWith(this.newElement):document.documentElement.appendChild(this.newElement)}get newHeadStylesheetElements(){return this.newHeadSnapshot.getStylesheetElementsNotInSnapshot(this.currentHeadSnapshot)}get newHeadScriptElements(){return this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapshot)}get currentHeadProvisionalElements(){return this.currentHeadSnapshot.provisionalElements}get newHeadProvisionalElements(){return this.newHeadSnapshot.provisionalElements}get newBodyScriptElements(){return this.newElement.querySelectorAll("script")}},Ki=class{constructor(e){this.keys=[],this.snapshots={},this.size=e}has(e){return Vt(e)in this.snapshots}get(e){if(this.has(e)){let r=this.read(e);return this.touch(e),r}}put(e,r){return this.write(e,r),this.touch(e),r}clear(){this.snapshots={}}read(e){return this.snapshots[Vt(e)]}write(e,r){this.snapshots[Vt(e)]=r}touch(e){let r=Vt(e),i=this.keys.indexOf(r);i>-1&&this.keys.splice(i,1),this.keys.unshift(r),this.trim()}trim(){for(let e of this.keys.splice(this.size))delete this.snapshots[e]}},Gi=class extends Or{constructor(){super(...arguments);this.snapshotCache=new Ki(10),this.lastRenderedLocation=new URL(location.href)}renderPage(e,r=!1){let i=new Lr(this.snapshot,e,r);return this.render(i)}renderError(e){let r=new Ji(this.snapshot,e,!1);return this.render(r)}clearSnapshotCache(){this.snapshotCache.clear()}async cacheSnapshot(){if(this.shouldCacheSnapshot){this.delegate.viewWillCacheSnapshot();let{snapshot:e,lastRenderedLocation:r}=this;await da(),this.snapshotCache.put(r,e.clone())}}getCachedSnapshotForLocation(e){return this.snapshotCache.get(e)}get snapshot(){return me.fromElement(this.element)}get shouldCacheSnapshot(){return this.snapshot.isCacheable}},Yi=class{constructor(){this.navigator=new $i(this),this.history=new ji(this),this.view=new Gi(this,document.documentElement),this.adapter=new Fi(this),this.pageObserver=new Wi(this),this.cacheObserver=new Hi,this.linkClickObserver=new Ui(this),this.formSubmitObserver=new Vi(this),this.scrollObserver=new zi(this),this.streamObserver=new Zi(this),this.frameRedirector=new Bi(document.documentElement),this.drive=!0,this.enabled=!0,this.progressBarDelay=500,this.started=!1}start(){this.started||(this.pageObserver.start(),this.cacheObserver.start(),this.linkClickObserver.start(),this.formSubmitObserver.start(),this.scrollObserver.start(),this.streamObserver.start(),this.frameRedirector.start(),this.history.start(),this.started=!0,this.enabled=!0)}disable(){this.enabled=!1}stop(){this.started&&(this.pageObserver.stop(),this.cacheObserver.stop(),this.linkClickObserver.stop(),this.formSubmitObserver.stop(),this.scrollObserver.stop(),this.streamObserver.stop(),this.frameRedirector.stop(),this.history.stop(),this.started=!1)}registerAdapter(e){this.adapter=e}visit(e,r={}){this.navigator.proposeVisit(ne(e),r)}connectStreamSource(e){this.streamObserver.connectStreamSource(e)}disconnectStreamSource(e){this.streamObserver.disconnectStreamSource(e)}renderStreamMessage(e){document.documentElement.appendChild(Ze.wrap(e).fragment)}clearCache(){this.view.clearSnapshotCache()}setProgressBarDelay(e){this.progressBarDelay=e}get location(){return this.history.location}get restorationIdentifier(){return this.history.restorationIdentifier}historyPoppedToLocationWithRestorationIdentifier(e,r){this.enabled?this.navigator.startVisit(e,r,{action:"restore",historyChanged:!0}):this.adapter.pageInvalidated()}scrollPositionChanged(e){this.history.updateRestorationData({scrollPosition:e})}willFollowLinkToLocation(e,r){return this.elementDriveEnabled(e)&&this.locationIsVisitable(r)&&this.applicationAllowsFollowingLinkToLocation(e,r)}followedLinkToLocation(e,r){let i=this.getActionForLink(e);this.convertLinkWithMethodClickToFormSubmission(e)||this.visit(r.href,{action:i})}convertLinkWithMethodClickToFormSubmission(e){let r=e.getAttribute("data-turbo-method");if(r){let i=document.createElement("form");return i.method=r,i.action=e.getAttribute("href")||"undefined",document.body.appendChild(i),_("submit",{cancelable:!0,target:i})}else return!1}allowsVisitingLocationWithAction(e,r){return this.locationWithActionIsSamePage(e,r)||this.applicationAllowsVisitingLocation(e)}visitProposedToLocation(e,r){Xi(e),this.adapter.visitProposedToLocation(e,r)}visitStarted(e){Xi(e.location),e.silent||this.notifyApplicationAfterVisitingLocation(e.location,e.action)}visitCompleted(e){this.notifyApplicationAfterPageLoad(e.getTimingMetrics())}locationWithActionIsSamePage(e,r){return this.navigator.locationWithActionIsSamePage(e,r)}visitScrolledToSamePageLocation(e,r){this.notifyApplicationAfterVisitingSamePageLocation(e,r)}willSubmitForm(e,r){return this.elementDriveEnabled(e)&&this.elementDriveEnabled(r)}formSubmitted(e,r){this.navigator.submitForm(e,r)}pageBecameInteractive(){this.view.lastRenderedLocation=this.location,this.notifyApplicationAfterPageLoad()}pageLoaded(){this.history.assumeControlOfScrollRestoration()}pageWillUnload(){this.history.relinquishControlOfScrollRestoration()}receivedMessageFromStream(e){this.renderStreamMessage(e)}viewWillCacheSnapshot(){var e;((e=this.navigator.currentVisit)===null||e===void 0?void 0:e.silent)||this.notifyApplicationBeforeCachingSnapshot()}allowsImmediateRender({element:e},r){return!this.notifyApplicationBeforeRender(e,r).defaultPrevented}viewRenderedSnapshot(e,r){this.view.lastRenderedLocation=this.history.location,this.notifyApplicationAfterRender()}viewInvalidated(){this.adapter.pageInvalidated()}frameLoaded(e){this.notifyApplicationAfterFrameLoad(e)}frameRendered(e,r){this.notifyApplicationAfterFrameRender(e,r)}applicationAllowsFollowingLinkToLocation(e,r){return!this.notifyApplicationAfterClickingLinkToLocation(e,r).defaultPrevented}applicationAllowsVisitingLocation(e){return!this.notifyApplicationBeforeVisitingLocation(e).defaultPrevented}notifyApplicationAfterClickingLinkToLocation(e,r){return _("turbo:click",{target:e,detail:{url:r.href},cancelable:!0})}notifyApplicationBeforeVisitingLocation(e){return _("turbo:before-visit",{detail:{url:e.href},cancelable:!0})}notifyApplicationAfterVisitingLocation(e,r){return _("turbo:visit",{detail:{url:e.href,action:r}})}notifyApplicationBeforeCachingSnapshot(){return _("turbo:before-cache")}notifyApplicationBeforeRender(e,r){return _("turbo:before-render",{detail:{newBody:e,resume:r},cancelable:!0})}notifyApplicationAfterRender(){return _("turbo:render")}notifyApplicationAfterPageLoad(e={}){return _("turbo:load",{detail:{url:this.location.href,timing:e}})}notifyApplicationAfterVisitingSamePageLocation(e,r){dispatchEvent(new HashChangeEvent("hashchange",{oldURL:e.toString(),newURL:r.toString()}))}notifyApplicationAfterFrameLoad(e){return _("turbo:frame-load",{target:e})}notifyApplicationAfterFrameRender(e,r){return _("turbo:frame-render",{detail:{fetchResponse:e},target:r,cancelable:!0})}elementDriveEnabled(e){let r=e==null?void 0:e.closest("[data-turbo]");return this.drive?r?r.getAttribute("data-turbo")!="false":!0:r?r.getAttribute("data-turbo")=="true":!1}getActionForLink(e){let r=e.getAttribute("data-turbo-action");return qi(r)?r:"advance"}locationIsVisitable(e){return oa(e,this.snapshot.rootLocation)&&sa(e)}get snapshot(){return this.view.snapshot}};function Xi(t){Object.defineProperties(t,xa)}var xa={absoluteURL:{get(){return this.toString()}}},H=new Yi,{navigator:Na}=H;function Qi(){H.start()}function _a(t){H.registerAdapter(t)}function Fa(t,e){H.visit(t,e)}function Ha(t){H.connectStreamSource(t)}function Va(t){H.disconnectStreamSource(t)}function Ba(t){H.renderStreamMessage(t)}function ja(){H.clearCache()}function Ua(t){H.setProgressBarDelay(t)}var qa=Object.freeze({__proto__:null,navigator:Na,session:H,PageRenderer:Lr,PageSnapshot:me,start:Qi,registerAdapter:_a,visit:Fa,connectStreamSource:Ha,disconnectStreamSource:Va,renderStreamMessage:Ba,clearCache:ja,setProgressBarDelay:Ua}),en=class{constructor(e){this.resolveVisitPromise=()=>{},this.connected=!1,this.hasBeenLoaded=!1,this.settingSourceURL=!1,this.element=e,this.view=new Mi(this,this.element),this.appearanceObserver=new Ii(this,this.element),this.linkInterceptor=new Cr(this,this.element),this.formInterceptor=new Ar(this,this.element)}connect(){this.connected||(this.connected=!0,this.reloadable=!1,this.loadingStyle==Te.lazy&&this.appearanceObserver.start(),this.linkInterceptor.start(),this.formInterceptor.start(),this.sourceURLChanged())}disconnect(){this.connected&&(this.connected=!1,this.appearanceObserver.stop(),this.linkInterceptor.stop(),this.formInterceptor.stop())}disabledChanged(){this.loadingStyle==Te.eager&&this.loadSourceURL()}sourceURLChanged(){(this.loadingStyle==Te.eager||this.hasBeenLoaded)&&this.loadSourceURL()}loadingStyleChanged(){this.loadingStyle==Te.lazy?this.appearanceObserver.start():(this.appearanceObserver.stop(),this.loadSourceURL())}async loadSourceURL(){if(!this.settingSourceURL&&this.enabled&&this.isActive&&(this.reloadable||this.sourceURL!=this.currentURL)){let e=this.currentURL;if(this.currentURL=this.sourceURL,this.sourceURL)try{this.element.loaded=this.visit(this.sourceURL),this.appearanceObserver.stop(),await this.element.loaded,this.hasBeenLoaded=!0,H.frameLoaded(this.element)}catch(r){throw this.currentURL=e,r}}}async loadResponse(e){e.redirected&&(this.sourceURL=e.response.url);try{let r=await e.responseHTML;if(r){let{body:i}=Ci(r),n=new dt(await this.extractForeignFrameElement(i)),s=new Di(this.view.snapshot,n,!1);this.view.renderPromise&&await this.view.renderPromise,await this.view.render(s),H.frameRendered(e,this.element)}}catch(r){console.error(r),this.view.invalidate()}}elementAppearedInViewport(e){this.loadSourceURL()}shouldInterceptLinkClick(e,r){return e.hasAttribute("data-turbo-method")?!1:this.shouldInterceptNavigation(e)}linkClickIntercepted(e,r){this.reloadable=!0,this.navigateFrame(e,r)}shouldInterceptFormSubmission(e,r){return this.shouldInterceptNavigation(e,r)}formSubmissionIntercepted(e,r){if(this.formSubmission&&this.formSubmission.stop(),this.reloadable=!1,this.formSubmission=new kr(this,e,r),this.formSubmission.fetchRequest.isIdempotent)this.navigateFrame(e,this.formSubmission.fetchRequest.url.href);else{let{fetchRequest:i}=this.formSubmission;this.prepareHeadersForRequest(i.headers,i),this.formSubmission.start()}}prepareHeadersForRequest(e,r){e["Turbo-Frame"]=this.id}requestStarted(e){this.element.setAttribute("busy","")}requestPreventedHandlingResponse(e,r){this.resolveVisitPromise()}async requestSucceededWithResponse(e,r){await this.loadResponse(r),this.resolveVisitPromise()}requestFailedWithResponse(e,r){console.error(r),this.resolveVisitPromise()}requestErrored(e,r){console.error(r),this.resolveVisitPromise()}requestFinished(e){this.element.removeAttribute("busy")}formSubmissionStarted(e){this.findFrameElement(e.formElement).setAttribute("busy","")}formSubmissionSucceededWithResponse(e,r){this.findFrameElement(e.formElement).delegate.loadResponse(r)}formSubmissionFailedWithResponse(e,r){this.element.delegate.loadResponse(r)}formSubmissionErrored(e,r){console.error(r)}formSubmissionFinished(e){this.findFrameElement(e.formElement).removeAttribute("busy")}allowsImmediateRender(e,r){return!0}viewRenderedSnapshot(e,r){}viewInvalidated(){}async visit(e){let r=new jt(this,F.get,ne(e));return new Promise(i=>{this.resolveVisitPromise=()=>{this.resolveVisitPromise=()=>{},i()},r.perform()})}navigateFrame(e,r){let i=this.findFrameElement(e);i.src=r}findFrameElement(e){var r;let i=e.getAttribute("data-turbo-frame")||this.element.getAttribute("target");return(r=tn(i))!==null&&r!==void 0?r:this.element}async extractForeignFrameElement(e){let r,i=CSS.escape(this.id);try{if(r=rn(e.querySelector(`turbo-frame#${i}`),this.currentURL))return r;if(r=rn(e.querySelector(`turbo-frame[src][recurse~=${i}]`),this.currentURL))return await r.loaded,await this.extractForeignFrameElement(r);console.error(`Response has no matching element`)}catch(n){console.error(n)}return new fe}shouldInterceptNavigation(e,r){let i=e.getAttribute("data-turbo-frame")||this.element.getAttribute("target");if(!this.enabled||i=="_top")return!1;if(i){let n=tn(i);if(n)return!n.disabled}return!(!H.elementDriveEnabled(e)||r&&!H.elementDriveEnabled(r))}get id(){return this.element.id}get enabled(){return!this.element.disabled}get sourceURL(){if(this.element.src)return this.element.src}get reloadable(){return this.findFrameElement(this.element).hasAttribute("reloadable")}set reloadable(e){let r=this.findFrameElement(this.element);e?r.setAttribute("reloadable",""):r.removeAttribute("reloadable")}set sourceURL(e){this.settingSourceURL=!0,this.element.src=e??null,this.currentURL=this.element.src,this.settingSourceURL=!1}get loadingStyle(){return this.element.loading}get isLoading(){return this.formSubmission!==void 0||this.resolveVisitPromise()!==void 0}get isActive(){return this.element.isActive&&this.connected}};function tn(t){if(t!=null){let e=document.getElementById(t);if(e instanceof fe)return e}}function rn(t,e){if(t){let r=t.getAttribute("src");if(r!=null&&e!=null&&aa(r,e))throw new Error(`Matching element has a source URL which references itself`);if(t.ownerDocument!==document&&(t=document.importNode(t,!0)),t instanceof fe)return t.connectedCallback(),t}}var $a={after(){this.targetElements.forEach(t=>{var e;return(e=t.parentElement)===null||e===void 0?void 0:e.insertBefore(this.templateContent,t.nextSibling)})},append(){this.removeDuplicateTargetChildren(),this.targetElements.forEach(t=>t.append(this.templateContent))},before(){this.targetElements.forEach(t=>{var e;return(e=t.parentElement)===null||e===void 0?void 0:e.insertBefore(this.templateContent,t)})},prepend(){this.removeDuplicateTargetChildren(),this.targetElements.forEach(t=>t.prepend(this.templateContent))},remove(){this.targetElements.forEach(t=>t.remove())},replace(){this.targetElements.forEach(t=>t.replaceWith(this.templateContent))},update(){this.targetElements.forEach(t=>{t.innerHTML="",t.append(this.templateContent)})}},nn=class extends HTMLElement{async connectedCallback(){try{await this.render()}catch(e){console.error(e)}finally{this.disconnect()}}async render(){var e;return(e=this.renderPromise)!==null&&e!==void 0?e:this.renderPromise=(async()=>{this.dispatchEvent(this.beforeRenderEvent)&&(await Bt(),this.performAction())})()}disconnect(){try{this.remove()}catch(e){}}removeDuplicateTargetChildren(){this.duplicateChildren.forEach(e=>e.remove())}get duplicateChildren(){var e;let r=this.targetElements.flatMap(n=>[...n.children]).filter(n=>!!n.id),i=[...(e=this.templateContent)===null||e===void 0?void 0:e.children].filter(n=>!!n.id).map(n=>n.id);return r.filter(n=>i.includes(n.id))}get performAction(){if(this.action){let e=$a[this.action];if(e)return e;this.raise("unknown action")}this.raise("action attribute is missing")}get targetElements(){if(this.target)return this.targetElementsById;if(this.targets)return this.targetElementsByQuery;this.raise("target or targets attribute is missing")}get templateContent(){return this.templateElement.content.cloneNode(!0)}get templateElement(){if(this.firstElementChild instanceof HTMLTemplateElement)return this.firstElementChild;this.raise("first child element must be a