unpoly-rails 3.8.0.rc1 → 3.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- (()=>{var t={5941:()=>{},7433:()=>{},7921:()=>{},7298:()=>{},2903:()=>{},573:()=>{},2811:()=>{up.browser={submitForm:function(t){t.submit()},canPushState:function(){return"GET"===up.protocol.initialRequestMethod()},canJQuery:function(){return!!window.jQuery},assertConfirmed:function(t){if(t.confirm&&!window.confirm(t.confirm))throw new up.Aborted("User canceled action");return!0},popCookie:function(t){var e;let n=null===(e=document.cookie.match(new RegExp(t+"=(\\w+)")))||void 0===e?void 0:e[1];if(n)return document.cookie=t+"=;Max-Age=0;Path=/",n},canHasSelector:up.util.memoize((()=>CSS.supports("selector(:has(*))")))}},6346:()=>{const t=up.element,e="up-scrollbar-away";up.BodyShifter=class BodyShifter{constructor(){this.t=new Set,this.i=0}lowerStack(){0==--this.i&&this.o()}raiseStack(){1==++this.i&&this.u()}onAnchoredElementInserted(t){return this.t.add(t),this.h(t,"right"),()=>this.t.delete(t)}l(){return this.p&&this.i>0}u(){this.p=up.viewport.rootScrollbarWidth(),t.root.style.setProperty("--up-scrollbar-width",this.p+"px"),this.h(document.body,"padding-right");for(let t of this.t)this.h(t,"right")}h(n,i){if(!this.l())return;let s=t.style(n,i);n.style.setProperty("--up-original-"+i,s),n.classList.add(e)}o(){for(let t of[document.body,...this.t])t.classList.remove(e)}}},7948:()=>{const t=up.util,e=up.element;up.Change.Addition=class Addition extends up.Change{constructor(t){super(t),this.m=t.acceptLayer,this.v=t.dismissLayer,this._=t.eventPlans||[],this.O=t.response}handleLayerChangeRequests(){this.layer.isOverlay()&&(this.tryAcceptLayerFromServer(),this.abortWhenLayerClosed(),this.layer.tryAcceptForLocation(this.responseOption()),this.abortWhenLayerClosed(),this.tryDismissLayerFromServer(),this.abortWhenLayerClosed(),this.layer.tryDismissForLocation(this.responseOption()),this.abortWhenLayerClosed()),this.layer.asCurrent((()=>{for(let t of this._)up.emit(Object.assign(Object.assign({},t),this.responseOption())),this.abortWhenLayerClosed()}))}tryAcceptLayerFromServer(){t.isDefined(this.m)&&this.layer.isOverlay()&&this.layer.accept(this.m,this.responseOption())}tryDismissLayerFromServer(){t.isDefined(this.v)&&this.layer.isOverlay()&&this.layer.dismiss(this.v,this.responseOption())}abortWhenLayerClosed(t=this.layer){if(t.isClosed())throw new up.Aborted("Layer was closed")}setSource({oldElement:n,newElement:i,source:s}){"keep"===s&&(s=n&&up.fragment.source(n)),s&&e.setMissingAttr(i,"up-source",t.normalizeURL(s,{hash:!1}))}setTime({newElement:t,time:n}){e.setMissingAttr(t,"up-time",!!n&&n.toUTCString())}setETag({newElement:t,etag:n}){e.setMissingAttr(t,"up-etag",n||!1)}setReloadAttrs(t){this.setSource(t),this.setTime(t),this.setETag(t)}responseOption(){return{response:this.O}}executeSteps(t,e,n){return new up.Change.UpdateSteps({steps:t,noneOptions:n}).execute(e)}}},3030:()=>{const t=up.util;up.Change=class Change{constructor(t){this.options=t}execute(){throw new up.NotImplemented}onFinished(t){var e,n;return null===(n=(e=this.options).onFinished)||void 0===n?void 0:n.call(e,t)}improveHistoryValue(e,n){return!1===e||t.isString(e)?e:n}deriveFailOptions(){return up.RenderOptions.deriveFailOptions(this.options)}}},7422:()=>{const t=up.util;up.Change.CloseLayer=class CloseLayer extends up.Change.Removal{constructor(t){var e,n;super(t),this.k=t.verb,this.S=up.layer.get(t),this.j=t.origin,this.C=t.value,this.F=null===(e=t.preventable)||void 0===e||e,this.O=t.response,this.T=null===(n=t.history)||void 0===n||n}execute(){if(!this.S.isOpen())return Promise.resolve();if(up.browser.assertConfirmed(this.options),this.R().defaultPrevented&&this.F)throw new up.Aborted("Close event was prevented");this.P(),up.fragment.abort({reason:"Layer is closing",layer:this.S});const{parent:t}=this.S;this.S.peel(),this.S.stack.remove(this.S),this.T&&t.restoreHistory(),this.A(t),this.S.teardownHandlers(),this.S.destroyElements(this.options),this.L(t)}R(){let e=this.S.emit(this.$(`up:layer:${this.k}`),{callback:this.S.callback(`on${t.upperCaseFirst(this.k)}`),log:[`Will ${this.k} ${this.S} with value %o`,this.C]});return this.C=e.value,e}P(){let t=this.$(`up:layer:${this.k}ing`);this.S.emit(t,{log:!1})}L(e){const n=`${this.k}ed`,i=t.upperCaseFirst(n);return this.S.emit(this.$(`up:layer:${n}`),{baseLayer:e,callback:this.S.callback(`on${i}`),ensureBubbles:!0,log:[`${i} ${this.S} with value %o`,this.C]})}$(t){return up.event.build(t,{layer:this.S,value:this.C,origin:this.j,response:this.O})}A(t){var e;this.S.overlayFocus.teardown(),null===(e=t.overlayFocus)||void 0===e||e.moveToFront();let n=this.S.origin||t.element;up.focus(n,{preventScroll:!0})}}},8228:function(){var t=this&&this.D||function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{c(i.next(t))}catch(t){r(t)}}function u(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((i=i.apply(t,e||[])).next())}))};up.Change.DestroyFragment=class DestroyFragment extends up.Change.Removal{constructor(t){super(t),this.S=up.layer.get(t)||up.layer.current,this.M=this.options.element,this.H=this.options.animation,this.N=this.options.log}execute(){this.q=this.M.parentNode,up.fragment.markAsDestroying(this.M),up.motion.willAnimate(this.M,this.H,this.options)?this.U():this.B()}U(){return t(this,void 0,void 0,(function*(){this.I(),yield this.K(),this.V(),this.onFinished()}))}B(){this.V(),this.I(),this.onFinished()}K(){return up.motion.animate(this.M,this.H,this.options)}V(){this.S.asCurrent((()=>{up.fragment.abort(this.M),up.script.clean(this.M,{layer:this.S}),up.element.cleanJQuery(this.M),this.M.remove()}))}I(){up.fragment.emitDestroyed(this.M,{parent:this.q,log:this.N})}}},9005:()=>{var t;const e=up.util;up.Change.FromContent=(t=class FromContent extends up.Change{constructor(t){super(t),this.j=this.options.origin,this.X=this.options.preview}W(){let t=[];return this.J(),this.G(),this.Y(t,this.Z,this.options.target),this.Y(t,this.Z,this.options.fallback),t}tt(t){return"new"===t||t.isOpen()}J(){this.et=up.layer.getAll(this.options),this.Z=e.filter(this.et,this.tt)}Y(t,e,n){for(let i of e)for(let e of this.nt(n,i)){const n=Object.assign(Object.assign({},this.options),{target:e,layer:i,defaultPlacement:this.it()}),s="new"===i?new up.Change.OpenLayer(n):new up.Change.UpdateLayer(n);t.push(s)}}nt(t,e){return up.fragment.expandTargets(t,{layer:e,mode:this.options.mode,origin:this.j})}execute(){return this.options.preload?Promise.resolve():this.st(this.rt.bind(this))||this.ot()}rt(t){let e=t.execute(this.ut(),this.ct.bind(this,t));return e.options=this.options,e}ht(t){return!(t instanceof up.CannotMatch)}ct(t){var e,n;let i=this.W()[0];t!==i&&up.puts("up.render()",'Could not match primary target "%s". Updating a fallback target "%s".',i.target,t.target);let{assets:s}=this.ut();s&&up.script.assertAssetsOK(s,t.options),null===(n=(e=this.options).onRender)||void 0===n||n.call(e)}ut(){var t,n;if(this.X)return;const i=e.pick(this.options,["target","content","fragment","document","html","cspNonces","origin"]);return null===(n=(t=up.migrate).handleResponseDocOptions)||void 0===n||n.call(t,i),"content"===this.it()&&(i.target=this.lt(i.target)),new up.ResponseDoc(i)}G(){var t;if(this.X)return;let e=this.ut();this.options.fragment&&((t=this.options).target||(t.target=e.rootSelector())),this.options.title=this.improveHistoryValue(this.options.title,e.title),this.options.metaTags=this.improveHistoryValue(this.options.metaTags,e.metaTags),this.options.lang=this.improveHistoryValue(this.options.lang,e.lang)}it(){if(!this.options.document&&!this.options.fragment)return"content"}lt(t){let e=this.Z[0]||up.layer.root;return this.nt(t||":main",e)[0]}getPreflightProps(t={}){return this.st((t=>t.getPreflightProps()))||t.optional||this.ft()}ft(){this.dt("Could not find target in current page")}ot(){this.dt("Could not find common target in current page and response")}dt(t){if(this.W().length){const n=e.uniq(e.map(this.W(),"target")),i=up.layer.optionToString(this.options.layer);throw new up.CannotMatch([t+" (tried selectors %o in %s)",n,i])}if(0!==this.Z.length)throw this.options.failPrefixForced?new up.CannotMatch("No target selector given for failed responses (https://unpoly.com/failed-responses)"):new up.CannotMatch("No target selector given");this.gt()}gt(){throw new up.CannotMatch("Could not find a layer to render in. You may have passed an unmatchable layer reference, or a detached element.")}st(t){for(let e of this.W())try{return t(e)}catch(t){if(this.ht(t))throw t}}},e.memoizeMethod(t.prototype,{W:!0,ut:!0,getPreflightProps:!0}),t)},278:function(){var t,e=this&&this.D||function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{c(i.next(t))}catch(t){r(t)}}function u(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((i=i.apply(t,e||[])).next())}))};const n=up.util;up.Change.FromResponse=(t=class FromResponse extends up.Change{constructor(t){super(t),this.O=t.response,this.vt=this.O.request}execute(){var t;if(up.fragment.config.skipResponse(this.bt())?this.yt():this.vt.assertEmitted("up:fragment:loaded",Object.assign(Object.assign({},this.bt()),{callback:this.options.onLoaded,log:["Loaded fragment from %s",this.O.description],skip:()=>this.yt()})),null!==(t=n.evalOption(this.options.fail,this.O))&&void 0!==t?t:!this.O.ok)throw this.wt(this.deriveFailOptions());return this.wt(this.options)}yt(){up.puts("up.render()","Skipping "+this.O.description),this.options.target=":none",this.options.failTarget=":none"}wt(t){t.failPrefixForced&&up.puts("up.render()","Rendering failed response using fail-prefixed options (https://unpoly.com/failed-responses)"),this._t(t),t.meta=this.Ot();let e=new up.Change.FromContent(t).execute();return e.finished=this.finish(e,t),e}finish(t,n){return e(this,void 0,void 0,(function*(){return t=yield t.finished,up.fragment.shouldRevalidate(this.vt,this.O,n)&&(t=yield this.kt(t,n)),t}))}kt(t,n){return e(this,void 0,void 0,(function*(){let e=n.target,i=t.target;if(/:(before|after)/.test(e))up.warn("up.render()","Cannot revalidate cache when prepending/appending (target %s)",e);else{up.puts("up.render()",'Revalidating cached response for target "%s"',i);let e=yield up.reload(i,Object.assign(Object.assign({},n),{preferOldElements:t.fragments,layer:t.layer,onFinished:null,scroll:!1,focus:"keep",transition:!1,cache:!1,confirm:!1,feedback:!1,abort:!1,expiredResponse:this.O}));e.none||(t=e)}return t}))}bt(){const{expiredResponse:t}=this.options;return{request:this.vt,response:this.O,renderOptions:this.options,revalidating:!!t,expiredResponse:t}}Ot(){var t,e;let n={revalidating:!!this.options.expiredResponse};return null===(e=(t=up.migrate).processCompilerPassMeta)||void 0===e||e.call(t,n,this.O),n}_t(t){var e,i;const s=this.O.url;let r=s,o=this.vt.hash;o&&(t.hash=o,r+=o),"GET"===this.O.method?t.source=this.improveHistoryValue(t.source,s):(t.source=this.improveHistoryValue(t.source,"keep"),t.history=!!t.location),t.location=this.improveHistoryValue(t.location,r),t.title=this.improveHistoryValue(t.title,this.O.title),t.eventPlans=this.O.eventPlans;let u=this.O.target;u&&(t.target=u),t.acceptLayer=this.O.acceptLayer,t.dismissLayer=this.O.dismissLayer,t.document=this.O.text,this.O.none&&(t.target=":none"),t.context=n.merge(t.context,this.O.context),t.cspNonces=this.O.cspNonces,null!==(e=t.time)&&void 0!==e||(t.time=this.O.lastModified),null!==(i=t.etag)&&void 0!==i||(t.etag=this.O.etag)}},n.memoizeMethod(t.prototype,{bt:!0}),t)},2200:()=>{var t;const e=up.util;up.Change.FromURL=(t=class FromURL extends up.Change{constructor(t){super(t),this.options.layer=up.layer.getAll(this.options),this.options.normalizeLayerOptions=!1}execute(){var t,n;let i=this.St();return i?(up.puts("up.render()",i),up.network.loadPage(this.options),e.unresolvablePromise()):(this.request=up.request(this.xt()),null===(n=(t=this.options).onRequest)||void 0===n||n.call(t,this.request),up.feedback.showAroundRequest(this.request,this.options),up.form.disableWhile(this.request,this.options),this.options.preload?this.request:e.always(this.request,(t=>this.Et(t))))}St(){return e.isCrossOrigin(this.options.url)?"Loading cross-origin content in new page":this.options.history&&!up.browser.canPushState()?"Loading content in new page to restore history support":void 0}xt(){const t=this.jt(this.options),n=this.jt(this.deriveFailOptions(),{optional:!0});return Object.assign(Object.assign(Object.assign({},this.options),t),e.renameKeys(n,up.fragment.failKey))}getPreflightProps(){return this.xt()}jt(t,e){return new up.Change.FromContent(Object.assign(Object.assign({},t),{preview:!0})).getPreflightProps(e)}Et(t){return t instanceof up.Response?this.Ct(t):this.Ft(t)}Ct(t){return new up.Change.FromResponse(Object.assign(Object.assign({},this.options),{response:t})).execute()}Ft(t){throw t instanceof up.Offline&&this.request.emit("up:fragment:offline",{callback:this.options.onOffline,renderOptions:this.options,retry:t=>up.render(Object.assign(Object.assign({},this.options),t)),log:["Cannot load fragment from %s: %s",this.request.description,t.reason]}),t}},e.memoizeMethod(t.prototype,{xt:!0}),t)},7050:function(){var t=this&&this.D||function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{c(i.next(t))}catch(t){r(t)}}function u(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((i=i.apply(t,e||[])).next())}))};let e=up.util;up.Change.OpenLayer=class OpenLayer extends up.Change.Addition{constructor(t){super(t),this.target=t.target,this.j=t.origin,this.Tt=t.baseLayer}getPreflightProps(){return{mode:this.options.mode,context:this.Rt().context,origin:this.options.origin,target:this.target,layer:this.Tt,fragments:e.compact([up.fragment.get(":main",{layer:this.Tt})]),newLayer:!0}}execute(t,e){this.responseDoc=t,this.Pt(),e(),this.At();let n=this.layer.on("up:layer:accepting up:layer:dimissing",this.Lt.bind(this));try{return this.$t(),this.Lt(),up.RenderResult.both(this.Dt,this.Mt)}finally{n()}}Pt(){if(":none"===this.target?this.Ht=document.createElement("up-none"):this.Ht=this.responseDoc.select(this.target),!this.Ht||this.Tt.isClosed())throw new up.CannotMatch}At(){up.puts("up.render()",`Opening element "${this.target}" in new overlay`),this.Nt(),this.layer=this.Rt(),this.Tt.peel({history:!this.layer.history}),up.layer.stack.push(this.layer),this.layer.createElements(),this.layer.setupHandlers()}$t(){this.qt(),this.handleLayerChangeRequests(),this.responseDoc.commitElement(this.Ht),this.layer.setContent(this.Ht),this.setReloadAttrs({newElement:this.Ht,source:this.options.source}),this.responseDoc.finalizeElement(this.Ht),this.Dt=new up.RenderResult({layer:this.layer,fragments:[this.Ht],target:this.target}),up.hello(this.layer.element,Object.assign(Object.assign({},this.options),{layer:this.layer})),this.Ut(),this.Dt.finished=this.Bt(),this.layer.opening=!1,this.zt(),this.abortWhenLayerClosed()}Lt(){if(this.Mt)return;let t=this.It().other;this.Mt=this.executeSteps(t,this.responseDoc)}Bt(){return t(this,void 0,void 0,(function*(){return yield this.layer.startOpenAnimation(),this.abortWhenLayerClosed(),this.A(),this.Dt}))}Rt(){const t=Object.assign(Object.assign({},this.options),{opening:!0});return up.layer.build(t,(t=>this.options=up.RenderOptions.finalize(t)))}qt(){var t;"auto"===this.layer.history&&(this.layer.history=up.fragment.hasAutoHistory([this.Ht],this.layer));let{parent:e}=this.layer;(t=this.layer).history&&(t.history=e.history),e.saveHistory(),this.layer.updateHistory(this.options)}A(){var t;null===(t=this.Tt.overlayFocus)||void 0===t||t.moveToBack(),this.layer.overlayFocus.moveToFront(),new up.FragmentFocus({fragment:this.Ht,layer:this.layer,autoMeans:["autofocus","layer"],inputDevice:this.options.inputDevice}).process(this.options.focus)}Ut(){const t=Object.assign(Object.assign({},this.options),{fragment:this.Ht,layer:this.layer,autoMeans:["hash","layer"]});new up.FragmentScrolling(t).process(this.options.scroll)}Nt(){up.event.assertEmitted("up:layer:open",{origin:this.j,baseLayer:this.Tt,layerOptions:this.options,log:"Opening new overlay"})}zt(){this.layer.emit("up:layer:opened",{origin:this.j,callback:this.layer.callback("onOpened"),log:`Opened new ${this.layer}`})}It(){return up.radio.hungrySteps(this.Kt())}Kt(){return Object.assign(Object.assign({},this.options),{layer:this.layer,history:this.layer.history})}}},1752:()=>{up.Change.Removal=class Removal extends up.Change{}},9441:()=>{var t;const e=up.util;up.Change.UpdateLayer=(t=class UpdateLayer extends up.Change.Addition{constructor(t){super(t=up.RenderOptions.finalize(t)),this.layer=t.layer,this.target=t.target,this.Vt=t.context,this.Xt=up.fragment.parseTargetSteps(this.target,this.options)}getPreflightProps(){return this.Wt(),{layer:this.layer,mode:this.layer.mode,context:e.merge(this.layer.context,this.Vt),origin:this.options.origin,target:this.Jt(),fragments:this.Gt(),newLayer:!1}}Jt(){return this.Wt(),up.fragment.targetForSteps(this.Xt)}Gt(){return this.Wt(),e.map(this.Xt,"oldElement")}execute(t,e){this.responseDoc=t,this.Pt(),e();let n=this.layer.on("up:layer:accepting up:layer:dimissing",this.Lt.bind(this));try{return this.Qt(),this.Lt(),up.RenderResult.both(this.Yt,this.Mt)}finally{n()}}Qt(){this.Xt.length&&up.puts("up.render()",`Updating "${this.Jt()}" in ${this.layer}`),this.Zt(),this.options.saveScroll&&up.viewport.saveScroll({layer:this.layer}),this.options.saveFocus&&up.viewport.saveFocus({layer:this.layer}),this.options.peel&&this.layer.peel({history:!this.te()}),!1!==this.options.abort&&up.fragment.abort(this.Gt(),{reason:"Fragment is being replaced"}),Object.assign(this.layer.context,this.Vt),this.te()&&this.layer.updateHistory(this.options),this.handleLayerChangeRequests(),this.Yt=this.executeSteps(this.Xt,this.responseDoc,this.options)}Lt(){if(this.Mt)return;let t=this.It().other;this.Mt=this.executeSteps(t,this.responseDoc)}Wt(){this.ee(),this.ne()}Pt(){this.ee(),this.ie(),this.ne(),this.se()}ie(){this.Xt.push(...this.It().current)}ee(){this.Xt=this.Xt.filter((t=>{const n=new up.FragmentFinder(e.pick(t,["selector","origin","layer","match","preferOldElements"]));if(t.oldElement||(t.oldElement=n.find()),t.oldElement)return!0;if(!t.maybe)throw new up.CannotMatch}))}se(){this.Xt=this.responseDoc.selectSteps(this.Xt)}ne(){this.Xt=up.fragment.compressNestedSteps(this.Xt)}It(){return up.radio.hungrySteps(this.Kt())}Zt(){let t=up.FocusCapsule.preserve(this.layer);this.Xt.forEach(((e,n)=>{e.focusCapsule=t,n>0&&(e.scroll=!1,e.focus=!1),"swap"!==e.placement&&"content"!==e.placement||(e.scrollBehavior="instant")}))}te(){return e.evalAutoOption(this.options.history,this.re.bind(this))}re(){const t=e.map(this.Xt,"oldElement");return up.fragment.hasAutoHistory(t,this.layer)}Kt(){return Object.assign(Object.assign({},this.options),{layer:this.layer,history:this.te()})}},e.memoizeMethod(t.prototype,{Wt:!0,ee:!0,te:!0,It:!0}),t)},9489:function(){var t=this&&this.D||function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{c(i.next(t))}catch(t){r(t)}}function u(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((i=i.apply(t,e||[])).next())}))};const e=up.util,n=up.element;up.Change.UpdateSteps=class UpdateSteps extends up.Change.Addition{constructor(t){super(t),this.oe=t.noneOptions||{},this.Xt=e.copy(t.steps)}execute(t){var e;if(this.responseDoc=t,this.Xt=t.selectSteps(this.Xt),this.Xt=t.commitSteps(this.Xt),!this.Xt.length)return this.ue();this.renderResult=new up.RenderResult({layer:null===(e=this.Xt[0])||void 0===e?void 0:e.layer,target:up.fragment.targetForSteps(this.Xt)}),this.Xt.reverse();const n=this.Xt.map((t=>this.ce(t)));return this.renderResult.finished=this.Bt(n),this.renderResult}ue(){return this.A(null,this.oe),this.Ut(null,this.oe),up.RenderResult.buildNone()}Bt(e){return t(this,void 0,void 0,(function*(){yield Promise.all(e);for(let t of this.Xt)this.abortWhenLayerClosed(t.layer);return this.renderResult}))}ae(t){let e=t.matches("up-wrapper")?t.children:[t];this.renderResult.fragments.unshift(...e)}ce(t){switch(this.setReloadAttrs(t),t.placement){case"swap":if(this.he(t))return this.A(t.oldElement,t),this.Ut(t.oldElement,t),Promise.resolve();{this.le(t);const e=t.oldElement.parentNode,n=Object.assign(Object.assign({},t),{beforeStart(){up.fragment.markAsDestroying(t.oldElement)},afterInsert:()=>{this.pe(t),this.responseDoc.finalizeElement(t.newElement),this.fe(t),up.hello(t.newElement,t),this.ae(t.newElement)},beforeDetach:()=>{up.script.clean(t.oldElement,{layer:t.layer})},afterDetach(){up.element.cleanJQuery(),up.fragment.emitDestroyed(t.oldElement,{parent:e,log:!1})},scrollNew:()=>{this.A(t.newElement,t),this.Ut(t.newElement,t)}});return up.morph(t.oldElement,t.newElement,t.transition,n)}case"content":{let e=n.wrapChildren(t.oldElement),i=n.wrapChildren(t.newElement),s=Object.assign(Object.assign({},t),{placement:"swap",oldElement:e,newElement:i,focus:!1});return this.ce(s).then((()=>{n.unwrap(i),this.A(t.oldElement,t)}))}case"before":case"after":{let e=n.wrapChildren(t.newElement),i="before"===t.placement?"afterbegin":"beforeend";return t.oldElement.insertAdjacentElement(i,e),this.responseDoc.finalizeElement(e),up.hello(e,t),this.ae(e),this.A(e,t),this.Ut(e,t),up.animate(e,t.transition,t).then((()=>n.unwrap(e)))}default:up.fail("Unknown placement: %o",t.placement)}}he(t){if(!t.useKeep)return;const{oldElement:e,newElement:i}=t;let s;if(!n.booleanAttr(e,"up-keep"))return;let r=up.fragment.toTarget(e);const o={layer:t.layer};if(s=t.descendantsOnly?up.fragment.get(i,r,o):up.fragment.subtree(i,r,o)[0],s&&!1!==n.booleanAttr(s,"up-keep")){const n={oldElement:e,newElement:s,newData:up.script.data(s),renderOptions:t};if(!up.fragment.emitKeep(n).defaultPrevented)return n}}le(t){const e=[];if(t.useKeep)for(let n of t.oldElement.querySelectorAll("[up-keep]")){let i=this.he(Object.assign(Object.assign({},t),{oldElement:n,descendantsOnly:!0}));if(i){const t=n.cloneNode(!0);n.insertAdjacentElement("beforebegin",t),n.classList.add("up-keeping"),up.script.disableSubtree(i.newElement);let s=up.viewport.subtree(i.oldElement);i.revivers=s.map((function(t){let e=up.viewport.copyCursorProps(t);return()=>up.viewport.copyCursorProps(e,t)})),this.de(document.body)?i.newElement.replaceWith(n):document.body.append(n),e.push(i)}}t.keepPlans=e}pe(t){for(let e of t.keepPlans){e.newElement.replaceWith(e.oldElement);for(let t of e.revivers)t()}}fe(t){for(let e of t.keepPlans)e.oldElement.classList.remove("up-keeping")}de(t){return e.some(this.Xt,(e=>e.oldElement.contains(t)))}A(t,e){return new up.FragmentFocus(Object.assign(Object.assign({},e),{fragment:t,autoMeans:up.fragment.config.autoFocus})).process(e.focus)}Ut(t,e){return new up.FragmentScrolling(Object.assign(Object.assign({},e),{fragment:t,autoMeans:up.fragment.config.autoScroll})).process(e.scroll)}}},1569:()=>{const t=up.util;up.CompilerPass=class CompilerPass{constructor(t,e,{layer:n,data:i,dataMap:s,meta:r}){n||(n=up.layer.get(t)||up.layer.current),this.me=t,this.ge=e,this.S=n,this.ve=i,this.be=s,r||(r={}),r.layer=n,this.ye=r}run(){this.S.asCurrent((()=>{this.setCompileData();for(let t of this.ge)this.we(t)}))}setCompileData(){if(this.ve&&(this.me.upCompileData=this.ve),this.be)for(let t in this.be)for(let e of this._e(t))e.upCompileData=this.be[t]}we(t){var e,n;const i=this.Oe(t);if(i.length){if(t.isDefault||up.puts("up.hello()",'Compiling %d× "%s" on %s',i.length,t.selector,this.S),t.batch)this.ke(t,i);else for(let e of i)this.Se(t,e);return null===(n=(e=up.migrate).postCompile)||void 0===n?void 0:n.call(e,i,t)}}Se(t,e){const n=[e];if(1!==t.length){const t=up.script.data(e);n.push(t,this.ye)}const i=this.xe(t,e,n);let s=this.Ee(i);s&&up.destructor(e,s)}ke(e,n){const i=[n];if(1!==e.length){const e=t.map(n,up.script.data);i.push(e,this.ye)}const s=this.xe(e,n,i);this.Ee(s)&&up.fail("Compilers with { batch: true } cannot return destructors")}xe(t,e,n){return up.error.guard((()=>t.apply(e,n)))}Ee(e){if(t.isFunction(e)||t.isArray(e)&&t.every(e,t.isFunction))return e}_e(e){return up.fragment.subtree(this.me,t.evalOption(e),{layer:this.S})}Oe(e){let n=this._e(e.selector);return t.filter(n,(t=>{let n=t.upAppliedCompilers||(t.upAppliedCompilers=new Set);if(!n.has(e))return n.add(e),!0}))}}},3742:()=>{const t=up.util,e=up.element;up.Config=class Config{constructor(t=(()=>({}))){this.je=t,this.reset(),document.addEventListener("up:framework:reset",(()=>this.reset()))}reset(){Object.assign(this,this.je())}matches(t,e){return t.matches(this.selector(e))}selector(n){let i=this[n],s=this["no"+t.upperCaseFirst(n)];return e.unionSelector(i,s)}selectorFn(t){return()=>this.selector(t)}}},2737:()=>{const t=up.util,e=up.element;up.CSSTransition=class CSSTransition{constructor(e,n,i){this.M=e,this.Ce=n,this.Fe=Object.keys(this.Ce),t.some(this.Fe,(t=>t.match(/A-Z/)))&&up.fail("Animation keys must be kebab-case"),this.Te=i.finishEvent,this.Re=i.duration,this.Pe=i.easing,this.Ae=!1}start(){return 0===this.Fe.length?(this.Ae=!0,Promise.resolve()):(this.Le=t.newDeferred(),this.$e(),this.De=new Date,this.Me(),this.He(),this.Ne(),this.qe(),this.Le)}He(){this.Te&&(this.Ue=up.on(this.M,this.Te,this.Be.bind(this)))}Be(t){t.stopPropagation(),this.Bt()}Me(){this.ze=t.timer(this.Re+100,(()=>{this.Bt()}))}Ie(){clearTimeout(this.ze)}Ne(){this.Ke=up.on(this.M,"transitionend",this.Ve.bind(this))}Ve(e){if(e.target!==this.M)return;if(new Date-this.De<=.25*this.Re)return;const n=e.propertyName;t.contains(this.Fe,n)&&this.Bt()}Bt(){var t,n;this.Ae||(this.Ae=!0,this.Ie(),null===(t=this.Ue)||void 0===t||t.call(this),null===(n=this.Ke)||void 0===n||n.call(this),e.concludeCSSTransition(this.M),this.Xe(),this.Le.resolve())}$e(){const t=e.style(this.M,["transitionProperty","transitionDuration","transitionDelay","transitionTimingFunction"]);if(e.hasCSSTransition(t)){if("all"!==t.transitionProperty){const n=t.transitionProperty.split(/\s*,\s*/),i=e.style(this.M,n);this.We=e.setTemporaryStyle(this.M,i)}this.Je=e.concludeCSSTransition(this.M)}}Xe(){var t,e;null===(t=this.We)||void 0===t||t.call(this),null===(e=this.Je)||void 0===e||e.call(this)}qe(){e.setStyle(this.M,{transitionProperty:Object.keys(this.Ce).join(", "),transitionDuration:`${this.Re}ms`,transitionTimingFunction:this.Pe}),e.setStyle(this.M,this.Ce)}}},3635:()=>{const t=up.util;up.DestructorPass=class DestructorPass{constructor(t,e){this.Ge=t,this.Qe=e}run(){for(let e of this.Ye()){let n=t.pluckKey(e,"upDestructors");if(n)for(let t of n)this.Ze(t,e);e.classList.remove("up-can-clean")}}Ye(){const t=Object.assign(Object.assign({},this.Qe),{destroying:!0});return up.fragment.subtree(this.Ge,".up-can-clean",t)}Ze(t,e){up.error.guard((()=>t(e)))}}},1906:()=>{const t=up.util,e=up.element;up.EventEmitter=class EventEmitter extends up.Record{keys(){return["target","event","baseLayer","callback","log","ensureBubbles"]}emit(){return this.tn(),this.baseLayer?this.baseLayer.asCurrent((()=>this.en())):this.en(),this.event}en(){this.target.dispatchEvent(this.event),this.ensureBubbles&&!this.target.isConnected&&document.dispatchEvent(this.event),up.error.guard((()=>{var t;return null===(t=this.callback)||void 0===t?void 0:t.call(this,this.event)}))}assertEmitted(){const t=this.emit();if(t.defaultPrevented)throw new up.Aborted(`Event ${t.type} was prevented`)}tn(){if(!up.log.config.enabled)return;let e,n=this.log;t.isArray(n)?[n,...e]=n:e=[];const{type:i}=this.event;t.isString(n)?up.puts(i,n,...e):!1!==n&&up.puts(i,`Event ${i}`)}static fromEmitArgs(n,i={}){var s,r;let o,u=t.extractOptions(n);return u=t.merge(i,u),t.isElementish(n[0])?u.target=e.get(n.shift()):n[0]instanceof up.Layer&&(u.layer=n.shift()),t.isGiven(u.layer)&&(o=up.layer.get(u.layer),u.target||(u.target=o.element),u.baseLayer||(u.baseLayer=o)),u.baseLayer&&(u.baseLayer=up.layer.get(u.baseLayer)),t.isString(u.target)?u.target=up.fragment.get(u.target,{layer:u.layer}):u.target||(u.target=document),(null===(s=n[0])||void 0===s?void 0:s.preventDefault)?(u.event=n[0],null!==(r=u.log)&&void 0!==r||(u.log=n[0].log)):t.isString(n[0])?u.event=up.event.build(n[0],u):u.event=up.event.build(u),new this(u)}}},4158:()=>{const t=up.util;up.EventListener=class EventListener extends up.Record{keys(){return["element","eventType","selector","callback","guard","baseLayer","passive","once","capture","beforeBoot"]}constructor(t){var e;super(t),this.nn=this.constructor.sn(t),this.isDefault=up.framework.evaling,null!==(e=this.beforeBoot)&&void 0!==e||(this.beforeBoot=0===this.eventType.indexOf("up:framework:")),this.nativeCallback=this.nativeCallback.bind(this)}bind(){var t;const e=(t=this.element).upEventListeners||(t.upEventListeners={});e[this.nn]&&up.fail("up.on(): The %o callback %o cannot be registered more than once",this.eventType,this.callback),e[this.nn]=this,this.element.addEventListener(...this.rn())}rn(){let e=t.compactObject(t.pick(this,["once","passive","capture"]));return[this.eventType,this.nativeCallback,e]}unbind(){let t=this.element.upEventListeners;t&&delete t[this.nn],this.element.removeEventListener(...this.rn())}nativeCallback(e){if(up.framework.beforeBoot&&!this.beforeBoot)return;let n=e.target;if(this.selector&&(n=n.closest(t.evalOption(this.selector))),(!this.guard||this.guard(e))&&n){const t=[e,n],i=this.callback.length;if(1!==i&&2!==i){const e=up.script.data(n);t.push(e)}if("click"===this.eventType&&n.disabled)return;const s=this.callback.bind(n,...t);this.baseLayer?this.baseLayer.asCurrent(s):s()}}static fromElement(t){let e=t.element.upEventListeners;if(e)return e[this.sn(t)]}static sn(e){var n;return(n=e.callback).upUid||(n.upUid=t.uid()),[e.eventType,e.selector,e.callback.upUid].join("|")}static allNonDefault(e){let n=e.upEventListeners;if(n){const e=Object.values(n);return t.reject(e,"isDefault")}return[]}}},3139:()=>{const t=up.util;up.EventListenerGroup=class EventListenerGroup extends up.Record{keys(){return["elements","eventTypes","selector","callback","guard","baseLayer","passive","once","capture","beforeBoot"]}bind(){const e=[];return this.un((function(t){const n=new up.EventListener(t);return n.bind(),e.push(n.unbind.bind(n))})),t.sequence(e)}un(t){for(let e of this.elements)for(let n of this.eventTypes)t(this.cn(e,n))}cn(t,e){return Object.assign(Object.assign({},this.attributes()),{element:t,eventType:e})}unbind(){this.un((function(t){let e=up.EventListener.fromElement(t);e&&e.unbind()}))}static fromBindArgs(e,n){const i=(e=t.copy(e)).pop();let s;s=e[0].addEventListener?[e.shift()]:t.isJQuery(e[0])||t.isList(e[0])&&e[0][0].addEventListener?e.shift():[document];let r=t.parseTokens(e.shift()),o=up.migrate.fixEventTypes;o&&(r=o(r));const u=t.extractOptions(e),c=e[0];return new this(Object.assign(Object.assign({elements:s,eventTypes:r,selector:c,callback:i},u),n))}}},2214:function(){var t=this&&this.D||function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{c(i.next(t))}catch(t){r(t)}}function u(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((i=i.apply(t,e||[])).next())}))};const e=up.util;up.FieldWatcher=class FieldWatcher{constructor(t,e,n){this.Qe=e,this.me=t,this.an=up.form.getScope(t),this.hn=n,this.ln=e.batch,this.pn=e.abortable}start(){this.fn=null,this.dn=this.mn(),this.gn=null,this.vn=!1,this.bn=[],this.yn(this.me),this.me.addEventListener("up:fragment:inserted",(({target:t})=>{t!==this.me&&this.yn(t)})),this.bn.push(up.fragment.onAborted(this.an,(()=>this.wn()))),this.bn.push(up.on(this.an,"reset",(()=>this._n())))}stop(){this.wn();for(let t of this.bn)t()}On(t){let n=e.copy(this.Qe);return up.form.watchOptions(t,n,{defaults:{event:"input"}})}yn(t){for(let e of up.form.fields(t))this.kn(e)}kn(t){let e=this.On(t);this.bn.push(up.on(t,e.event,(()=>this.Sn(e))))}wn(){this.fn=null}xn(t,n){this.fn=t,this.En=n;let i=n.delay||0;clearTimeout(this.gn),this.gn=e.timer(i,(()=>{this.gn=null,this.jn()}))}Cn(t){return!e.isEqual(t,this.dn)&&!e.isEqual(this.fn,t)}jn(){return t(this,void 0,void 0,(function*(){if(!this.fn)return;if(this.vn)return;if(this.gn)return;if(!this.an.isConnected)return;let t=this.En;const n=this.Fn(this.dn,this.fn);this.dn=this.fn,this.fn=null,this.vn=!0,this.En=null;let i=Object.assign(Object.assign({},t),{disable:!1});const s=[];if(this.ln)s.push(this.Tn(n,i));else for(let t in n){const e=n[t];s.push(this.Tn(e,t,i))}if(e.some(s,e.isPromise)){let e=Promise.allSettled(s);up.form.disableWhile(e,t),yield e}this.vn=!1,this.jn()}))}Tn(...t){return up.error.guard((()=>this.hn(...t)))}Fn(t,n){const i={};let s=Object.keys(t);s=s.concat(Object.keys(n)),s=e.uniq(s);for(let r of s){const s=t[r],o=n[r];e.isEqual(s,o)||(i[r]=o)}return i}mn(){return up.Params.fromContainer(this.me).toObject()}Sn(t={}){const e=this.mn();this.Cn(e)&&this.xn(e,t)}_n(){e.task((()=>this.Sn()))}}},5949:()=>{const t=up.util;up.FIFOCache=class FIFOCache{constructor({capacity:e=10,normalizeKey:n=t.identity}={}){this.Rn=new Map,this.Pn=e,this.An=n}get(t){return t=this.An(t),this.Rn.get(t)}set(t,e){if(this.Rn.size===this.Pn){let t=this.Rn.keys().next().value;this.Rn.delete(t)}t=this.An(t),this.Rn.set(t,e)}clear(){this.Rn.clear()}}},665:()=>{up.FocusCapsule=class FocusCapsule{constructor(t,e){this.Ln=t,this.$n=e}restore(t,e){let n=up.fragment.get(this.Ln,{layer:t});if(n)return up.viewport.copyCursorProps(this.$n,n),up.focus(n,e),!0}static preserve(t){let e=up.viewport.focusedElementWithin(t.element);if(!e)return;let n=up.fragment.tryToTarget(e);return n?new this(n,up.viewport.copyCursorProps(e)):void 0}}},5240:function(){var t=this&&this.D||function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{c(i.next(t))}catch(t){r(t)}}function u(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((i=i.apply(t,e||[])).next())}))},e=this&&this.Dn||function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n};const n=up.util,i=up.element;up.FormValidator=class FormValidator{constructor(t){this.Mn=t,this.Hn=[],this.Nn=null,this.qn=!1,this.Un(),this.Bn()}Bn(){up.fragment.onAborted(this.Mn,(t=>this.zn(t)))}zn(t){this.Hn.length&&(this.Hn=[],this.In.reject(new up.Aborted(t.reason)),this.Un())}Un(){this.In=n.newDeferred()}watchContainer(t){let{event:e}=this.Kn(t);up.on(t,e,{guard:()=>up.fragment.isAlive(t)},(()=>up.error.muteUncriticalRejection(this.validate({origin:t}))))}validate(t={}){let e=this.Vn(t);return this.Hn.push(...e),this.Xn(),this.In}Vn(t){let e=this.Wn(t)||this.Jn(t)||this.Gn(t.origin);for(let n of e)n.renderOptions=this.Kn(n.origin,t),n.target=up.fragment.resolveOrigin(n.target,n);return e}Jn(t){var{origin:n}=t,i=e(t,["origin"]);if(up.form.isField(n))return this.Qn(n)||this.Yn(n,i)}Yn(t,{formGroup:e=!0}){if(!e)return;let n=up.form.groupSolution(t);return n?(up.puts("up.validate()","Validating form group of field %o",t),[n]):void 0}Wn({target:t,origin:e}){if(n.isString(t)){up.puts("up.validate()",'Validating target "%s"',t);let i=up.fragment.splitTarget(t);return n.compact(i.map((function(t){let n=up.fragment.get(t,{origin:e});if(n)return{element:n,target:t,origin:e};up.fail('Validation target "%s" does not match an element',t)})))}}Gn(t){return up.puts("up.validate()","Validating element %o",t),[{element:t,target:up.fragment.toTarget(t),origin:t}]}Qn(t){let e=t.closest("[up-validate]");if(e){let n=i.booleanOrStringAttr(e,"up-validate");return this.Wn({target:n,origin:t})}}Kn(t,e){return up.form.watchOptions(t,e,{defaults:{event:"change"}})}Xn(){let t=this.Hn.map((t=>t.renderOptions.delay)),e=Math.min(...t)||0;clearTimeout(this.Nn),this.Nn=n.timer(e,(()=>{this.Nn=null,this.Zn()}))}Zn(){up.error.muteUncriticalRejection(this.ti())}ti(){var e;return t(this,void 0,void 0,(function*(){if(!this.Hn.length)return;if(this.qn)return;if(this.Nn)return;let t=this.Hn;this.Hn=[];let i=n.map(t,"origin"),s=n.flatMap(i,up.form.fields),r=n.uniq(n.map(s,"name")),o=this.ei(t),u=n.map(t,"renderOptions"),c=n.mergeDefined(...u,{dataMap:o},up.form.destinationOptions(this.Mn));c.target=n.map(t,"target").join(", "),c.feedback=n.some(u,"feedback"),c.origin=this.Mn,null!==(e=c.focus)&&void 0!==e||(c.focus="keep"),c.failOptions=!1,c.defaultMaybe=!0,c.params=up.Params.merge(c.params,...n.map(u,"params")),c.headers=n.merge(...n.map(u,"headers")),this.ni(c.headers,r),c.guardEvent=up.event.build("up:form:validate",{fields:s,log:"Validating form",params:c.params,form:this.Mn}),this.qn=!0;let a=this.In;this.Un(),c.disable=!1;for(let e of t)up.form.disableWhile(a,{disable:e.renderOptions.disable,origin:e.origin});try{a.resolve(up.render(c)),yield a}finally{this.qn=!1,this.Zn()}}))}ni(t,e){let n=up.protocol.headerize("validate"),i=e.join(" ");(!i||i.length>up.protocol.config.maxHeaderSize)&&(i=":unknown"),t[n]=i}ei(t){let e={};for(let i of t){let t=n.pluckKey(i.renderOptions,"data");n.pluckKey(i.renderOptions,"keepData")&&(t=up.data(i.element)),t&&(e[i.target]=t)}return e}static forElement(t){let e=up.form.get(t);return e.upFormValidator||(e.upFormValidator=new this(e))}}},2587:()=>{const t=up.util,e=/^([^ >+(]+) (.+)$/;up.FragmentFinder=class FragmentFinder{constructor(t){var e;this.Qe=t,this.j=t.origin,this.ii=t.selector,this.si=t.document||window.document,this.ri=null!==(e=t.match)&&void 0!==e?e:up.fragment.config.match,this.oi=t.preferOldElements}find(){return this.ui()||this.ci()||this.ai()}ui(){if(this.oi)return this.oi.find((t=>this.si.contains(t)&&up.fragment.matches(t,this.ii)))}ci(){var t;if("region"===this.ri&&!up.fragment.containsMainPseudo(this.ii)&&(null===(t=this.j)||void 0===t?void 0:t.isConnected))return this.hi()||this.li()}hi(){return up.fragment.closest(this.j,this.ii,this.Qe)}li(){let n=up.fragment.splitTarget(this.ii);return t.findResult(n,(t=>{let n=t.match(e);if(n){let t=up.fragment.closest(this.j,n[1],this.Qe);if(t)return up.fragment.getDumb(t,n[2])}}))}ai(){return up.fragment.getDumb(this.si,this.ii,this.Qe)}}},7031:()=>{const t=up.util,e=up.element,n={preventScroll:!0};up.FragmentFocus=class FragmentFocus extends up.FragmentProcessor{keys(){return super.keys().concat(["hash","focusCapsule","inputDevice"])}processPrimitive(e){switch(e){case"keep":return this.pi();case"restore":return this.fi();case"target":case!0:return this.di(this.fragment);case"layer":return this.di(this.layer.getFocusElement());case"main":return this.mi(":main");case"hash":return this.gi();case"autofocus":return this.vi();default:if(t.isString(e))return this.mi(e)}}processElement(t){return this.di(t)}resolveCondition(t){return"lost"===t?this.bi():super.resolveCondition(t)}mi(t){let e=this.findSelector(t);return this.di(e)}pi(){var t;if(this.bi())return null===(t=this.focusCapsule)||void 0===t?void 0:t.restore(this.layer,n)}fi(){return up.viewport.restoreFocus({layer:this.layer})}vi(){let t=this.fragment&&e.subtree(this.fragment,"[autofocus]")[0];if(t)return this.di(t)}di(t){if(t)return up.focus(t,Object.assign(Object.assign({force:!0},n),{inputDevice:this.inputDevice})),!0}gi(){let t=up.viewport.firstHashTarget(this.hash,{layer:this.layer});if(t)return this.di(t)}bi(){return!this.layer.hasFocus()}}},8057:()=>{const t=up.element;up.FragmentPolling=class FragmentPolling{constructor(t){this.Qe=up.radio.pollOptions(t),this.Ge=t,up.destructor(t,this.yi.bind(this)),up.fragment.onAborted(t,this.wi.bind(this)),this._i="initialized",this.pn=!0,this.Oi=!1,this.ki()}static forFragment(t){return t.upPolling||(t.upPolling=new this(t))}onPollAttributeObserved(){this.Si()}yi(){this.xi()}Si(t){if(Object.assign(this.Qe,t),"started"!==this._i){if(!up.fragment.isTargetable(this.Ge))return void up.warn("[up-poll]","Cannot poll untargetable fragment %o",this.Ge);this._i="started",this.Ei(),this.ji()}}xi(){var t;"started"===this._i&&(this.Ci(),this._i="stopped",null===(t=this.unbindEvents)||void 0===t||t.call(this))}forceStart(t){Object.assign(this.Qe,t),this.forceStarted=!0,this.Si()}forceStop(){this.xi(),this.forceStarted=!1}Ei(){this.unbindEvents||(this.unbindEvents=up.on("visibilitychange up:layer:opened up:layer:dismissed up:layer:accepted",this.Fi.bind(this)))}Fi(){this.Ti()&&this.ji()}Ti(){return!document.hidden&&("any"===this.Qe.ifLayer||this.Ri())}Ci(){clearTimeout(this.reloadTimer),this.reloadTimer=null}ji(){this.reloadTimer||this.Oi||(this.Ci(),this.reloadTimer=setTimeout(this.Pi.bind(this),this.Ai()))}Pi(){this.reloadTimer=null,this.Li()}Li(){if("started"===this._i){if(this.Ti())return up.emit(this.Ge,"up:fragment:poll",{log:["Polling fragment",this.Ge]}).defaultPrevented?(up.puts("[up-poll]","User prevented up:fragment:poll event"),this.ki(),void this.ji()):void this.$i();up.puts("[up-poll]","Will not poll hidden fragment")}}Di(){var e,n;return null!==(n=null!==(e=this.Qe.interval)&&void 0!==e?e:t.numberAttr(this.Ge,"up-interval"))&&void 0!==n?n:up.radio.config.pollInterval}Ai(){return Math.max(this.Di()-this.Mi(),0)}Mi(){return new Date-this.Hi}Ri(){var t,e;return this.layer||(this.layer=up.layer.get(this.Ge)),null===(e=null===(t=this.layer)||void 0===t?void 0:t.isFront)||void 0===e?void 0:e.call(t)}$i(){this.Ci();let t={url:this.Qe.url,fail:!1,background:!0},e=this.pn;try{this.pn=!1,this.Oi=!0,up.reload(this.Ge,t).then(this.Ni.bind(this),this.qi.bind(this))}finally{this.pn=e}}wi({newLayer:t}){this.pn&&!t&&this.xi()}Ni({fragment:t}){this.Oi=!1,this.ki(),t?this.Ui(t):this.ji()}Ui(t){this.xi(),this.forceStarted&&up.fragment.matches(this.Ge,t)&&this.constructor.forFragment(t).forceStart(this.Qe)}qi(t){this.Oi=!1,this.ki(),this.ji(),up.error.throwCritical(t)}ki(){this.Hi=new Date}}},2828:()=>{const t=up.util;up.FragmentProcessor=class FragmentProcessor extends up.Record{keys(){return["fragment","autoMeans","origin","layer"]}process(t){let e=this.preprocess(t);return this.tryProcess(e)}preprocess(e){return t.parseTokens(e,{separator:"or"})}tryProcess(e){if(t.isArray(e))return this.processArray(e);if(t.isFunction(e)){let t=up.error.guard((()=>e(this.fragment,this.attributes())));return this.tryProcess(t)}if(t.isElement(e))return this.processElement(e);if(t.isString(e)){if("auto"===e)return this.tryProcess(this.autoMeans);let t=e.match(/^(.+?)-if-(.+?)$/);if(t)return this.resolveCondition(t[2])&&this.process(t[1])}return this.processPrimitive(e)}processArray(e){return t.find(e,(t=>this.tryProcess(t)))}resolveCondition(t){if("main"===t)return this.fragment&&up.fragment.contains(this.fragment,":main")}findSelector(t){const e={layer:this.layer,origin:this.origin};let n=this.fragment&&up.fragment.get(this.fragment,t,e)||up.fragment.get(t,e);if(n)return n;up.warn("up.render()",'Could not find an element matching "%s"',t)}}},4850:()=>{const t=up.util;up.FragmentScrolling=class FragmentScrolling extends up.FragmentProcessor{keys(){return super.keys().concat(["hash","mode","revealTop","revealMax","revealSnap","scrollBehavior"])}processPrimitive(e){switch(e){case"reset":return this.Bi();case"layer":return this.zi();case"main":return this.Ii(":main");case"restore":return this.Ki();case"hash":return this.hash&&up.viewport.revealHash(this.hash,this.attributes());case"target":case"reveal":case!0:return this.Vi(this.fragment);default:if(t.isString(e))return this.Ii(e)}}processElement(t){return this.Vi(t)}Vi(t){if(t)return up.reveal(t,this.attributes()),!0}Ii(t){let e=this.findSelector(t);return this.Vi(e)}zi(){return this.Vi(this.layer.getBoxElement())}Bi(){return up.viewport.resetScroll(Object.assign(Object.assign({},this.attributes()),{around:this.fragment})),!0}Ki(){return up.viewport.restoreScroll(Object.assign(Object.assign({},this.attributes()),{around:this.fragment}))}}},7956:()=>{const t=up.element,e=up.util;up.Layer=class Layer extends up.Record{keys(){return["element","stack","history","mode","context","lastScrollTops","lastFocusCapsules"]}defaults(){return{context:{},lastScrollTops:up.viewport.newStateCache(),lastFocusCapsules:up.viewport.newStateCache()}}constructor(t={}){if(super(t),!this.mode)throw"missing { mode } option"}setupHandlers(){up.link.convertClicks(this)}teardownHandlers(){}mainTargets(){return up.layer.mainTargets(this.mode)}sync(){}accept(){throw new up.NotImplemented}dismiss(){throw new up.NotImplemented}peel(t){this.stack.peel(this,t)}evalOption(t){return e.evalOption(t,this)}isCurrent(){return this.stack.isCurrent(this)}isFront(){return this.stack.isFront(this)}isRoot(){return this.stack.isRoot(this)}isOverlay(){return this.stack.isOverlay(this)}isOpen(){return this.stack.isOpen(this)}isClosed(){return this.stack.isClosed(this)}get parent(){return this.stack.parentOf(this)}get child(){return this.stack.childOf(this)}get ancestors(){return this.stack.ancestorsOf(this)}get descendants(){return this.stack.descendantsOf(this)}get subtree(){return[this,...this.descendants]}get index(){var t;return null!==(t=this.Xi)&&void 0!==t?t:this.Xi=this.stack.indexOf(this)}getContentElement(){return this.contentElement||this.element}getBoxElement(){return this.boxElement||this.element}getFocusElement(){return this.getBoxElement()}getFirstSwappableElement(){throw new up.NotImplemented}contains(t){return t.closest(up.layer.anySelector())===this.element}on(...t){return this.Wi(t).bind()}off(...t){return this.Wi(t).unbind()}Wi(t){return up.EventListenerGroup.fromBindArgs(t,{guard:t=>this.Ji(t),elements:[this.element],baseLayer:this})}Ji(t){return this.contains(t.target)}wasHitByMouseEvent(t){const e=document.elementFromPoint(t.clientX,t.clientY);return!e||this.contains(e)}Gi(t){return up.EventEmitter.fromEmitArgs(t,{layer:this})}emit(...t){return this.Gi(t).emit()}isDetached(){return!this.element.isConnected}saveHistory(){this.history&&(this.savedTitle=document.title,this.savedMetaTags=up.history.findMetaTags(),this.savedLocation=up.history.location,this.savedLang=up.history.getLang())}restoreHistory(){this.showsLiveHistory()&&(this.savedLocation&&up.history.push(this.savedLocation),this.savedTitle&&(document.title=this.savedTitle),this.savedMetaTags&&up.history.updateMetaTags(this.savedMetaTags),e.isString(this.savedLang)&&up.history.updateLang(this.savedLang))}asCurrent(t){return this.stack.asCurrent(this,t)}updateHistory(t){var n,i;e.isString(t.location)&&(this.location=t.location),up.history.config.updateMetaTags&&e.isList(t.metaTags)&&(null===(i=null===(n=up.migrate)||void 0===n?void 0:n.warnOfHungryMetaTags)||void 0===i||i.call(n,t.metaTags),this.metaTags=t.metaTags),e.isString(t.title)&&(this.title=t.title),e.isString(t.lang)&&(this.lang=t.lang)}showsLiveHistory(){return this.history&&this.isFront()}get title(){return this.showsLiveHistory()?document.title:this.savedTitle}set title(t){this.savedTitle=t,this.showsLiveHistory()&&(document.title=t)}get metaTags(){return this.showsLiveHistory()?up.history.findMetaTags():this.savedMetaTags}set metaTags(t){this.savedMetaTags=t,this.showsLiveHistory()&&up.history.updateMetaTags(t)}get lang(){return this.showsLiveHistory()?up.history.getLang():this.savedLang}set lang(t){this.savedLang=t,this.showsLiveHistory()&&up.history.updateLang(t)}get location(){return this.showsLiveHistory()?up.history.location:this.savedLocation}set location(t){(this.location!==(t=up.history.normalizeURL(t))||this.opening)&&(this.savedLocation=t,this.showsLiveHistory()&&up.history.push(t),this.opening||this.emit("up:layer:location:changed",{location:t}))}selector(t){return this.constructor.selector(t)}static selector(t){throw new up.NotImplemented}toString(){throw new up.NotImplemented}affix(...e){return t.affix(this.getFirstSwappableElement(),...e)}[e.isEqual.key](t){return this.constructor===t.constructor&&this.element===t.element}hasFocus(){let t=document.activeElement;return t!==document.body&&this.element.contains(t)}reset(){Object.assign(this,this.defaults())}}},7101:()=>{var t;up.Layer.Cover=((t=class Cover extends up.Layer.OverlayWithViewport{}).mode="cover",t)},5580:()=>{var t;up.Layer.Drawer=((t=class Drawer extends up.Layer.OverlayWithViewport{}).mode="drawer",t)},86:()=>{var t;up.Layer.Modal=((t=class Modal extends up.Layer.OverlayWithViewport{}).mode="modal",t)},7403:function(){var t=this&&this.D||function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{c(i.next(t))}catch(t){r(t)}}function u(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((i=i.apply(t,e||[])).next())}))};const e=up.element,n=up.util;up.Layer.Overlay=class Overlay extends up.Layer{keys(){return super.keys().concat(["position","align","size","origin","class","backdrop","openAnimation","closeAnimation","openDuration","closeDuration","openEasing","closeEasing","backdropOpenAnimation","backdropCloseAnimation","dismissable","dismissLabel","dismissAriaLabel","onOpened","onAccept","onAccepted","onDismiss","onDismissed","acceptEvent","dismissEvent","acceptLocation","dismissLocation","opening"])}constructor(t){super(t),!0===this.dismissable?this.dismissable=["button","key","outside"]:!1===this.dismissable?this.dismissable=[]:this.dismissable=n.parseTokens(this.dismissable),this.acceptLocation&&(this.acceptLocation=new up.URLPattern(this.acceptLocation)),this.dismissLocation&&(this.dismissLocation=new up.URLPattern(this.dismissLocation))}callback(t){let e=this[t];if(e)return e.bind(this)}createElement(t){this.nesting||(this.nesting=this.Qi());const e=n.compactObject(n.pick(this,["align","position","size","class","nesting"]));this.element=this.affixPart(t,null,e)}createBackdropElement(t){this.backdropElement=this.affixPart(t,"backdrop")}createViewportElement(t){this.viewportElement=this.affixPart(t,"viewport",{"up-viewport":""})}createBoxElement(t){this.boxElement=this.affixPart(t,"box")}createContentElement(t){this.contentElement=this.affixPart(t,"content")}setContent(t){this.contentElement.append(t),this.onContentSet()}onContentSet(){}createDismissElement(t){return this.dismissElement=this.affixPart(t,"dismiss",{"up-dismiss":'":button"',"aria-label":this.dismissAriaLabel}),e.affix(this.dismissElement,'span[aria-hidden="true"]',{text:this.dismissLabel})}affixPart(t,n,i={}){return e.affix(t,this.selector(n),i)}static selector(t){return n.compact(["up",this.mode,t]).join("-")}Qi(){const{parent:t}=this;return this.mode===t.mode?1+t.Qi():0}setupHandlers(){var t,e;super.setupHandlers(),this.overlayFocus=new up.OverlayFocus(this),this.Yi("button")&&this.createDismissElement(this.getBoxElement()),this.Yi("outside")&&(this.viewportElement?up.on(this.viewportElement,"up:click",(t=>{t.target===this.viewportElement&&this.Zi(t,!0)})):this.unbindParentClicked=this.parent.on("up:click",((t,e)=>{if(!up.layer.isWithinForeignOverlay(e)){const n=this.origin&&this.origin.contains(e);this.Zi(t,n)}}))),this.Yi("key")&&(this.unbindEscapePressed=up.event.onEscape((t=>this.onEscapePressed(t)))),this.registerClickCloser("up-accept",((t,e)=>{this.accept(t,e)})),this.registerClickCloser("up-dismiss",((t,e)=>{this.dismiss(t,e)})),null===(e=(t=up.migrate).registerLayerCloser)||void 0===e||e.call(t,this),this.ts(this.acceptEvent,this.accept),this.ts(this.dismissEvent,this.dismiss),this.on("up:click","label[for]",((t,e)=>this.es(t,e)))}es(t,n){let i=n.getAttribute("for"),s=up.form.fieldSelector(e.idSelector(i)),r=up.fragment.all(s,{layer:"any"}),o=up.fragment.all(s,{layer:this});if(r.length>1&&o[0]!==r[0]){t.preventDefault();const e=o[0];e.focus(),e.matches("input[type=checkbox], input[type=radio]")&&e.click()}}Zi(t,e){up.log.putsEvent(t),e&&up.event.halt(t),this.dismiss(":outside",{origin:t.target})}onEscapePressed(t){if(this.isFront()){let e=up.form.focusedField();e?e.blur():this.Yi("key")&&(up.event.halt(t,{log:!0}),this.dismiss(":key"))}}registerClickCloser(t,n){let i=`[${t}]`;this.on("up:click",i,(function(s){up.event.halt(s,{log:!0});const r=s.target.closest(i),o=e.jsonAttr(r,t),u={origin:r},c=new up.OptionsParser(r,u);c.booleanOrString("animation"),c.string("easing"),c.number("duration"),c.string("confirm"),up.error.muteUncriticalSync((()=>n(o,u)))}))}ts(t,e){if(t)return this.on(t,(t=>{t.preventDefault(),e.call(this,t,{response:t.response})}))}tryAcceptForLocation(t){this.ns(this.acceptLocation,this.accept,t)}tryDismissForLocation(t){this.ns(this.dismissLocation,this.dismiss,t)}ns(t,e,n){let i,s;if(t&&(i=this.location)&&(s=t.recognize(i))){const t=Object.assign(Object.assign({},s),{location:i});e.call(this,t,n)}}teardownHandlers(){var t,e;super.teardownHandlers(),null===(t=this.unbindParentClicked)||void 0===t||t.call(this),null===(e=this.unbindEscapePressed)||void 0===e||e.call(this),this.overlayFocus.teardown()}destroyElements(t){const e=Object.assign(Object.assign({},t),{animation:()=>this.startCloseAnimation(t),onFinished:()=>{var e;this.onElementsRemoved(),null===(e=t.onFinished)||void 0===e||e.call(t)},log:!1});up.destroy(this.element,e)}onElementsRemoved(){}ss(t={}){const e=up.animate(this.getBoxElement(),t.boxAnimation,t);let n;return this.backdrop&&!up.motion.isNone(t.boxAnimation)&&(n=up.animate(this.backdropElement,t.backdropAnimation,t)),Promise.all([e,n])}startOpenAnimation(e={}){var n;return t(this,void 0,void 0,(function*(){yield this.ss({boxAnimation:null!==(n=e.animation)&&void 0!==n?n:this.evalOption(this.openAnimation),backdropAnimation:"fade-in",easing:e.easing||this.openEasing,duration:e.duration||this.openDuration}),this.wasEverVisible=!0}))}startCloseAnimation(t={}){var e;return this.ss({boxAnimation:this.wasEverVisible&&(null!==(e=t.animation)&&void 0!==e?e:this.evalOption(this.closeAnimation)),backdropAnimation:this.wasEverVisible&&"fade-out",easing:t.easing||this.closeEasing,duration:t.duration||this.closeDuration})}accept(t=null,e={}){return this.rs("accept",t,e)}dismiss(t=null,e={}){return this.rs("dismiss",t,e)}Yi(t){return n.contains(this.dismissable,t)}rs(t,e,n){return n=Object.assign(Object.assign({},n),{verb:t,value:e,layer:this}),new up.Change.CloseLayer(n).execute()}getFirstSwappableElement(){return this.getContentElement().children[0]}toString(){return`${this.mode} overlay`}}},6412:()=>{up.Layer.OverlayWithTether=class OverlayWithTether extends up.Layer.Overlay{createElements(){this.origin||up.fail("Missing { origin } option"),this.os=new up.Tether({anchor:this.origin,align:this.align,position:this.position}),this.createElement(this.os.parent),this.createContentElement(this.element)}onContentSet(){this.os.start(this.element)}onElementsRemoved(){this.os.stop()}sync(){this.isOpen()&&(this.isDetached()||this.os.isDetached()?this.dismiss(":detached",{animation:!1,preventable:!1}):this.os.sync())}}},7965:()=>{up.Layer.OverlayWithViewport=class OverlayWithViewport extends up.Layer.Overlay{static getParentElement(){return document.body}createElements(){up.viewport.bodyShifter.raiseStack(),this.createElement(this.constructor.getParentElement()),this.backdrop&&this.createBackdropElement(this.element),this.createViewportElement(this.element),this.createBoxElement(this.viewportElement),this.createContentElement(this.boxElement)}onElementsRemoved(){up.viewport.bodyShifter.lowerStack()}sync(){this.isDetached()&&this.isOpen()&&this.constructor.getParentElement().appendChild(this.element)}}},4552:()=>{var t;up.Layer.Popup=((t=class Popup extends up.Layer.OverlayWithTether{}).mode="popup",t)},7771:()=>{var t;const e=up.element;up.Layer.Root=((t=class Root extends up.Layer{get element(){return e.root}constructor(t){super(t),this.setupHandlers()}getFirstSwappableElement(){return document.body}static selector(){return"html"}setupHandlers(){this.element.upHandlersApplied||(this.element.upHandlersApplied=!0,super.setupHandlers())}sync(){this.setupHandlers()}accept(){this.us()}dismiss(){this.us()}us(){up.fail("Cannot close the root layer")}toString(){return"root layer"}}).mode="root",t)},6066:()=>{const t=up.util,e=up.element;up.LayerLookup=class LayerLookup{constructor(e,...n){this.i=e;const i=t.parseArgIntoOptions(n,"layer");if(!1!==i.normalizeLayerOptions&&up.layer.normalizeOptions(i),this.cs=t.parseTokens(i.layer),this.j=i.origin,this.Tt=i.baseLayer||this.hs()||this.i.current,t.isString(this.Tt)){const t=Object.assign(Object.assign({},i),{baseLayer:this.i.current,normalizeLayerOptions:!1});this.Tt=new this.constructor(this.i,this.Tt,t).first()}}hs(){if(this.j)return this.ls(this.j)}first(){return this.all()[0]}all(){let e=t.flatMap(this.cs,(t=>this.ps(t)));return e=t.compact(e),e=t.uniq(e),e}ls(n){return n=e.get(n),t.find(this.i.reversed(),(t=>t.contains(n)))}fs(t){return this.i.at(t)}ps(e){if(e instanceof up.Layer)return e;if(t.isNumber(e))return this.fs(e);if(/^\d+$/.test(e))return this.fs(Number(e));if(t.isElementish(e))return this.ls(e);switch(e){case"any":return[this.Tt,...this.i.reversed()];case"current":return this.Tt;case"closest":return this.i.selfAndAncestorsOf(this.Tt);case"parent":return this.Tt.parent;case"ancestor":case"ancestors":return this.Tt.ancestors;case"child":return this.Tt.child;case"descendant":case"descendants":return this.Tt.descendants;case"subtree":return this.Tt.subtree;case"new":return"new";case"root":return this.i.root;case"overlay":case"overlays":return t.reverse(this.i.overlays);case"front":return this.i.front;case"origin":return this.hs();default:return up.fail("Unknown { layer } option: %o",e)}}}},6387:()=>{const t=up.util;up.LayerStack=class LayerStack{constructor(){this.ds=[],this.layers=[this.gs()]}gs(){return up.layer.build({mode:"root",stack:this})}remove(e){t.remove(this.layers,e)}peel(e,n){const i=t.reverse(e.descendants),s=Object.assign(Object.assign({},n),{preventable:!1});for(let t of i)t.dismiss(":peel",s)}reset(){this.peel(this.root,{animation:!1}),this.ds=[],this.root.reset()}isOpen(e){return t.contains(this.layers,e)}isClosed(t){return!this.isOpen(t)}parentOf(t){return this.layers[t.index-1]}childOf(t){return this.layers[t.index+1]}ancestorsOf(e){return t.reverse(this.layers.slice(0,e.index))}selfAndAncestorsOf(t){return[t,...t.ancestors]}descendantsOf(t){return this.layers.slice(t.index+1)}isRoot(t){return this.root===t}isOverlay(t){return this.root!==t}isCurrent(t){return this.current===t}isFront(t){return this.front===t}get(...t){return this.getAll(...t)[0]}getAll(...t){return new up.LayerLookup(this,...t).all()}sync(){for(let t of this.layers)t.sync()}asCurrent(t,e){try{return this.ds.push(t),e()}finally{this.ds.pop()}}reversed(){return t.reverse(this.layers)}dismissOverlays(e=null,n={}){n.dismissable=!1;for(let i of t.reverse(this.overlays))i.dismiss(e,n)}at(t){return this.layers[t]}indexOf(t){return this.layers.indexOf(t)}get count(){return this.layers.length}get root(){return this.layers[0]}get overlays(){return this.root.descendants}get current(){return t.last(this.ds)||this.front}get front(){return t.last(this.layers)}}},5390:()=>{up.LinkFeedbackURLs=class LinkFeedbackURLs{constructor(t){const e=up.feedback.normalizeURL;if(this.vs=up.link.isSafe(t),this.vs){const n=t.getAttribute("href");n&&"#"!==n&&(this.href=e(n));const i=t.getAttribute("up-href");i&&(this.bs=e(i));const s=t.getAttribute("up-alias");s&&(this.ys=new up.URLPattern(s,e))}}isCurrent(t){var e,n;return!(!t||this.href!==t&&this.bs!==t&&!(null===(n=null===(e=this.ys)||void 0===e?void 0:e.test)||void 0===n?void 0:n.call(e,t,!1)))}}},2460:()=>{const t=up.util,e=up.element;up.LinkFollowIntent=class LinkFollowIntent{constructor(t,e){this.ws=t,this.hn=e,this._s("mouseenter mousedown touchstart",(t=>this.Os(t))),this._s("mouseleave",(()=>this.ks())),up.fragment.onAborted(this.ws,(()=>this.ks()))}_s(t,e){up.on(this.ws,t,{passive:!0},e)}Os(e){if(up.link.shouldFollowEvent(e,this.ws))if(this.ks(),"mouseenter"===e.type){let n=this.Ss();this.xs=t.timer(n,(()=>this.Tn(e)))}else this.Tn(e)}ks(){clearTimeout(this.xs),up.network.abort((t=>t.origin===this.ws&&t.background))}Ss(){var t;return null!==(t=e.numberAttr(this.ws,"up-preload-delay"))&&void 0!==t?t:up.link.config.preloadDelay}Tn(t){up.log.putsEvent(t),up.error.muteUncriticalRejection(this.hn())}}},1653:()=>{let t="up.log.enabled",e=!1;try{e=!!(null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem(t))}catch(t){}up.LogConfig=class LogConfig extends up.Config{constructor(){super((()=>({banner:!0,format:!0})))}get enabled(){return e}set enabled(n){e=n;try{null===sessionStorage||void 0===sessionStorage||sessionStorage.setItem(t,n?"1":"")}catch(t){}}}},7792:function(){var t=this&&this.D||function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{c(i.next(t))}catch(t){r(t)}}function u(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((i=i.apply(t,e||[])).next())}))};const e=up.util,n=up.element;up.MotionController=class MotionController{constructor(t){this.Es=`up-${t}`,this.ii=`.${this.Es}`,this.finishEvent=`up:${t}:finish`,this.finishCount=0,this.js=0}startFunction(t,e,i={}){var s;t=n.list(t);const r=()=>up.error.muteUncriticalRejection(e());if(i.trackMotion=null!==(s=i.trackMotion)&&void 0!==s?s:up.motion.isEnabled(),!1===i.trackMotion)return r();{i.trackMotion=!1,this.finish(t),this.Cs(t);let e=this.Fs(t,r);return e=e.then((()=>this.Ts(t))),e}}finish(t){var e,n;if(this.finishCount++,0!==this.js&&up.motion.isEnabled()){t=this.Rs(t);for(let e of t)this.Ps(e);return null===(n=(e=up.migrate).formerlyAsync)||void 0===n?void 0:n.call(e,"up.motion.finish()")}}Rs(t){return t?e.flatMap(t,(t=>n.list(t.closest(this.ii),t.querySelectorAll(this.ii)))):document.querySelectorAll(this.ii)}isActive(t){return t.classList.contains(this.Es)}Ps(t){this.As(t)}As(t,e={}){return e=Object.assign({target:t,log:!1},e),up.emit(this.finishEvent,e)}Cs(t){this.js++,this.Ls(t,!0)}Ts(t){this.js--,this.Ls(t,!1)}Ls(t,e){for(let n of t)n.classList.toggle(this.Es,e)}Fs(t,e){if(t.length<2)return e();const n=up.on(t,this.finishEvent,(e=>{if(!e.forwarded)for(let n of t)n!==e.target&&this.isActive(n)&&this.As(n,{forwarded:!0})}));return e().then(n)}reset(){return t(this,void 0,void 0,(function*(){yield this.finish(),this.finishCount=0,this.js=0}))}}},4308:()=>{const t=up.util,e=up.element;up.NonceableCallback=class NonceableCallback{constructor(t,e){this.script=t,this.nonce=e}static fromString(t){let e=t.match(/^(nonce-([^\s]+)\s)?(.*)$/);return new this(e[3],e[2])}toFunction(...t){if(this.nonce){let e=this;return function(...n){return e.$s(this,t,n)}}return new Function(...t,this.script)}toString(){return`nonce-${this.nonce} ${this.script}`}$s(t,e,n){let i,s=`\n try {\n up.noncedEval.value = (function(${e.join()}) {\n ${this.script}\n }).apply(up.noncedEval.thisArg, up.noncedEval.args)\n } catch (error) {\n up.noncedEval.error = error\n }\n `;try{if(up.noncedEval={args:n,thisArg:t},i=up.element.affix(document.body,"script",{nonce:this.nonce,text:s}),up.noncedEval.error)throw up.noncedEval.error;return up.noncedEval.value}finally{up.noncedEval=void 0,i&&i.remove()}}Ds(e){return this.nonce&&t.contains(e,this.nonce)}static adoptNonces(n,i){if(!(null==i?void 0:i.length))return;const s=t.memoize(up.protocol.cspNonce);t.each(up.script.config.nonceableAttributes,(r=>{let o=e.subtree(n,`[${r}^="nonce-"]`);t.each(o,(t=>{let e=t.getAttribute(r),n=this.fromString(e),o=(t,...n)=>up.log.warn("up.render()",`Cannot use callback [${r}="${e}"]: ${t}`,...n);if(!n.Ds(i))return o("Callback's CSP nonce (%o) does not match response header (%o)",n.nonce,i);let u=s();if(!u)return o("Current page's CSP nonce is unknown");n.nonce=u,t.setAttribute(r,n.toString())}))}))}}},1104:()=>{const t=up.util,e=up.element;up.OptionsParser=class OptionsParser{constructor(t,e,n={}){this.Qe=e,this.M=t,this.Ms=n,this.Hs=n.fail,this.Ns=n.closest,this.qs=n.attrPrefix||"up-",this.Us=n.defaults||{}}string(t,n){this.parse(e.attr,t,n)}boolean(t,n){this.parse(e.booleanAttr,t,n)}number(t,n){this.parse(e.numberAttr,t,n)}booleanOrString(t,n){this.parse(e.booleanOrStringAttr,t,n)}json(t,n){this.parse(e.jsonAttr,t,n)}callback(t,n={}){this.parse(((t,i)=>e.callbackAttr(t,i,n)),t,n)}parse(e,n,i={}){var s,r;const o=t.wrapList(null!==(s=i.attr)&&void 0!==s?s:this.Bs(n));let u=this.Qe[n];for(let t of o)null!=u||(u=this.zs(e,this.M,t));null!=u||(u=null!==(r=i.default)&&void 0!==r?r:this.Us[n]);let c,a=i.normalize;if(a&&(u=a(u)),t.isDefined(u)&&(this.Qe[n]=u),this.Hs&&(c=up.fragment.failKey(n))){const n=t.compact(t.map(o,(t=>this.Is(t))));this.parse(e,c,Object.assign(Object.assign({},i),{attr:n}))}}include(t){let e=t(this.M,this.Qe,this.Ms);Object.assign(this.Qe,e)}zs(t,n,i){return this.Ns?e.closestAttr(n,i,t):t(n,i)}Is(t){return this.Ks(t,this.qs+"on-")||this.Ks(t,this.qs)}Ks(t,e){if(t.startsWith(e))return`${e}fail-${t.substring(e.length)}`}Bs(e){return`${this.qs}${t.camelToKebabCase(e)}`}}},8665:()=>{const t=up.element,e=up.util;up.OverlayFocus=class OverlayFocus{constructor(t){this.S=t,this.di=this.S.getFocusElement()}moveToFront(){this.Vs||(this.Vs=!0,this.Xs=up.on("focusin",(t=>this.Ws(t))),this.Js=t.setTemporaryAttrs(this.di,{tabindex:"0",role:"dialog","aria-modal":"true"}),this.Gs=t.affix(this.di,"beforebegin","up-focus-trap[tabindex=0]"),this.Qs=t.affix(this.di,"afterend","up-focus-trap[tabindex=0]"))}moveToBack(){this.teardown()}teardown(){this.Vs&&(this.Vs=!1,this.Xs(),this.Js(),this.Gs.remove(),this.Qs.remove())}Ws(t){const{target:e}=t;this.Ys||up.layer.isWithinForeignOverlay(e)||(this.Ys=!0,e===this.Gs?this.Zs():e!==this.Qs&&this.S.contains(e)||this.tr(),this.Ys=!1)}tr(t){up.focus(this.di,t)}Zs(){this.er(this.S.getBoxElement())||this.tr()}er(t){for(let n of e.reverse(t.children))if(up.viewport.tryFocus(n)||this.er(n))return!0}}},3645:()=>{const t=up.util,e=up.element;up.Params=class Params{constructor(t){this.clear(),this.addAll(t)}clear(){this.entries=[]}[t.copy.key](){return new up.Params(this)}toObject(){const e={};for(let n of this.entries){const{name:i,value:s}=n;t.isBasicObjectProperty(i)||(this.nr(i)?(e[i]||(e[i]=[]),e[i].push(s)):e[i]=s)}return e}toArray(){return this.entries}toFormData(){const t=new FormData;for(let e of this.entries)t.append(e.name,e.value);return t.entries||(t.originalArray=this.entries),t}toQuery(){let e=t.map(this.entries,this.ir.bind(this));return e=t.compact(e),e.join("&")}ir(e){const{value:n}=e;if(this.sr(n))return;let i=encodeURIComponent(e.name);return t.isGiven(n)&&(i+="=",i+=encodeURIComponent(n)),i}sr(t){return t instanceof Blob}hasBinaryValues(){const e=t.map(this.entries,"value");return t.some(e,this.sr)}toURL(e){let n=[e,this.toQuery()];n=t.filter(n,t.isPresent);const i=t.contains(e,"?")?"&":"?";return n.join(i)}add(t,e){this.entries.push({name:t,value:e})}addAll(e){t.isMissing(e)||(e instanceof this.constructor?this.entries.push(...e.entries):t.isArray(e)?this.entries.push(...e):t.isString(e)?this.rr(e):t.isFormData(e)?this.ur(e):t.isObject(e)?this.cr(e):up.fail("Unsupport params type: %o",e))}cr(e){for(let n in e){const i=e[n],s=t.isArray(i)?i:[i];for(let t of s)this.add(n,t)}}rr(e){for(let n of e.split("&"))if(n){let[e,i]=n.split("=");e=decodeURIComponent(e),i=t.isGiven(i)?decodeURIComponent(i):null,this.add(e,i)}}ur(t){for(let e of t.entries())this.add(...e)}set(t,e){this.delete(t),this.add(t,e)}delete(e){this.entries=t.reject(this.entries,this.ar(e))}ar(t){return e=>e.name===t}get(t){return this.nr(t)?this.getAll(t):this.getFirst(t)}getFirst(e){const n=t.find(this.entries,this.ar(e));return null==n?void 0:n.value}getAll(e){if(this.nr(e))return this.getAll(e);{const n=t.map(this.entries,this.ar(e));return t.map(n,"value")}}nr(t){return t.endsWith("[]")}[t.isBlank.key](){return 0===this.entries.length}static fromForm(t){return this.fromContainer(t)}static fromContainer(t){let e=up.form.fields(t);return this.fromFields(e)}static fromFields(e){const n=new this;for(let i of t.wrapList(e))n.addField(i);return n}addField(t){let n=(t=e.get(t)).name;if(n&&!t.disabled){const{tagName:e}=t,{type:i}=t;if("SELECT"===e)for(let e of t.querySelectorAll("option"))e.selected&&this.add(n,e.value);else if("checkbox"===i||"radio"===i)t.checked&&this.add(n,t.value);else{if("file"!==i)return this.add(n,t.value);for(let e of t.files)this.add(n,e)}}}[t.isEqual.key](e){return this.constructor===e.constructor&&t.isEqual(this.entries,e.entries)}static fromURL(e){const n=new this;let i=t.parseURL(e).search;return i&&(i=i.replace(/^\?/,""),n.addAll(i)),n}static stripURL(e){return t.normalizeURL(e,{search:!1})}static merge(...t){return t.reduce((function(t,e){return t.addAll(e),t}),new up.Params)}}},7782:()=>{const t=up.element;up.ProgressBar=class ProgressBar{constructor(){this.hr=0,this.M=t.affix(document.body,"up-progress-bar"),this.M.style.transition="width 300ms ease-out",this.lr(0),up.element.paint(this.M),this.pr=31,this.dr()}dr(){let t;t=this.pr<80?Math.random()<.15?7+5*Math.random():1.5+.5*Math.random():.13*(100-this.pr)*Math.random(),this.lr(this.pr+t),this.hr++;const e=300+40*this.hr;this.timeout=setTimeout(this.dr.bind(this),e)}lr(t){this.pr=t,this.M.style.width=`${t}vw`}destroy(){clearTimeout(this.timeout),this.M.remove()}conclude(){clearTimeout(this.timeout),this.lr(100),setTimeout(this.destroy.bind(this),300)}}},2406:()=>{const t=up.util;up.Record=class Record{keys(){throw"Return an array of keys"}defaults(t){return{}}constructor(t){Object.assign(this,this.defaults(t),this.attributes(t))}attributes(e=this){return t.pick(e,this.keys())}[t.copy.key](){return t.variant(this)}[t.isEqual.key](e){return this.constructor===e.constructor&&t.isEqual(this.attributes(),e.attributes())}}},1279:()=>{up.Rect=class Rect extends up.Record{keys(){return["left","top","width","height"]}get bottom(){return this.top+this.height}get right(){return this.left+this.width}grow(t){this.left-=t,this.top-=t,this.width+=2*t,this.height+=2*t}static fromElement(t){return new this(t.getBoundingClientRect())}}},2714:function(){var t,e=this&&this.D||function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{c(i.next(t))}catch(t){r(t)}}function u(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((i=i.apply(t,e||[])).next())}))};const n=up.util;up.RenderJob=(t=class RenderJob{constructor(t){this.options=up.RenderOptions.preprocess(t)}execute(){return this.mr=this.gr(),this}gr(){return e(this,void 0,void 0,(function*(){try{this.vr();let t=yield this.br().execute();return this.yr(t),t}catch(t){throw this.yr(t)||this.wr(t),t}}))}yr(t){if(t instanceof up.RenderResult){let{onRendered:e,onFinished:i}=t.options;t.none||up.error.guard((()=>null==e?void 0:e(t)));let s=function(t){up.error.guard((()=>null==i?void 0:i(t)))};return this.finished.then(s,n.noop),!0}}wr(t){let e=t instanceof up.Aborted?"Rendering was aborted":"Error while rendering";up.puts("up.render()",`${e}: ${t.name}: ${t.message}`),up.error.guard((()=>{var e,n;return null===(n=(e=this.options).onError)||void 0===n?void 0:n.call(e,t)}))}get finished(){return this._r()}_r(){return e(this,void 0,void 0,(function*(){try{let t=yield this.mr;return yield t.finished}catch(t){throw t instanceof up.RenderResult?yield t.finished:t}}))}br(){if(this.options.url){let t=t=>this.Or(t);return new up.Change.FromURL(Object.assign(Object.assign({},this.options),{onRequest:t}))}if(this.options.response){let t=()=>this.Or(null);return new up.Change.FromResponse(Object.assign(Object.assign({},this.options),{onRender:t}))}{let t=()=>this.Or(null);return new up.Change.FromContent(Object.assign(Object.assign({},this.options),{onRender:t}))}}vr(){up.browser.assertConfirmed(this.options);let t=n.pluckKey(this.options,"guardEvent");if(t&&(t.renderOptions=this.options,up.emit(t,{target:this.options.origin}).defaultPrevented))throw new up.Aborted(`Rendering was prevented by ${t.type} listener`);up.RenderOptions.assertContentGiven(this.options)}Or(t){let{abort:e}=this.options;if(!e||!up.network.isBusy())return;let{fragments:i,layer:s,origin:r,newLayer:o}=this.br().getPreflightProps(),u={except:t,logOnce:["up.render()","Change with { abort } option will abort other requests"],newLayer:o,origin:r};"target"===e?up.fragment.abort(i,u):"layer"===e?up.fragment.abort(Object.assign(Object.assign({},u),{layer:s})):"all"===e||!0===e?up.fragment.abort(Object.assign(Object.assign({},u),{layer:"any"})):n.isFunction(e)?e(u):up.fragment.abort(e,Object.assign(Object.assign({},u),{layer:s}))}},n.delegate(t.prototype,["then","catch","finally"],(function(){return this.mr})),n.memoizeMethod(t.prototype,{_r:!0,br:!0}),t)},2705:()=>{const t=up.util;up.RenderOptions=function(){const e={useHungry:!0,useKeep:!0,saveScroll:!0,saveFocus:!0,focus:"keep",abort:"target",failOptions:!0},n={abort:!1,confirm:!1,feedback:!1,cache:!0,background:!0},i=["url","method","origin","headers","params","cache","fallback","abort","abortable","confirm","feedback","origin","baseLayer","fail","onError"].concat(["keep","hungry","history","source","saveScroll","navigate"]),s=["url","response","content","fragment","document"],r=["history","focus","scroll"];function o(t){const e={};for(let n in t){const i=t[n];let s=up.fragment.successKey(n);s&&(e[s]=i)}return e}return{preprocess:function(i){var s,o;null===(o=(s=up.migrate).preprocessRenderOptions)||void 0===o||o.call(s,i);const u=t.merge(e,function(t){if(t.navigate)return up.fragment.config.navigateOptions}(i));return t.merge(t.omit(u,r),{defaults:u},{inputDevice:up.event.inputDevice},i,function(t){if(t.preload)return n}(i))},finalize:function(e,n){return t.merge(e.defaults,n,e)},assertContentGiven:function(e){t.some(s,(n=>t.isGiven(e[n])))||(e.defaultToEmptyContent?e.content="":up.fail("up.render() needs either { "+s.join(", ")+" } option"))},deriveFailOptions:function(e){return e.failOptions?Object.assign(Object.assign(Object.assign(Object.assign({},e.defaults),t.pick(e,i)),o(e)),{failPrefixForced:!0}):Object.assign(Object.assign({},e),o(e))}}}()},606:function(){var t=this&&this.D||function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{c(i.next(t))}catch(t){r(t)}}function u(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((i=i.apply(t,e||[])).next())}))};up.RenderResult=class RenderResult extends up.Record{keys(){return["fragments","layer","target","options","finished"]}defaults(){return{fragments:[]}}get none(){return!this.fragments.length}get fragment(){return this.fragments[0]}static both(t,e,n=!0){return e?new this({target:t.target,layer:t.layer,options:t.options,fragments:t.fragments.concat(e.fragments),finished:n&&this.mergeFinished(t,e)}):t}static mergeFinished(e,n){return t(this,void 0,void 0,(function*(){return this.both(yield e.finished,yield n.finished,!1)}))}static buildNone(){return new this({target:":none",finished:Promise.resolve()})}}},5437:()=>{var t;const e=up.util;up.Request=(t=class Request extends up.Record{keys(){return["method","url","hash","params","target","failTarget","headers","timeout","background","cache","expireCache","evictCache","layer","mode","context","failLayer","failMode","failContext","origin","fragments","builtAt","wrapMethod","contentType","payload","onLoading","fail","abortable","badResponseTime"]}defaults(){return{state:"new",abortable:!0,headers:{},timeout:up.network.config.timeout,builtAt:new Date}}constructor(t){var n,i,s;if(super(t),this.params=new up.Params(this.params),null==this.wrapMethod&&(this.wrapMethod=up.network.config.wrapMethod),this.kr(),(this.target||this.layer||this.origin)&&!t.basic){const t={origin:this.origin};this.layer=up.layer.get(this.layer,t),this.failLayer=up.layer.get(this.failLayer,t),this.context||(this.context=this.layer.context||{}),this.failContext||(this.failContext=(null===(n=this.failLayer)||void 0===n?void 0:n.context)||{}),this.mode||(this.mode=this.layer.mode),this.failMode||(this.failMode=null===(i=this.failLayer)||void 0===i?void 0:i.mode)}this.deferred=e.newDeferred(),null!==(s=this.badResponseTime)&&void 0!==s||(this.badResponseTime=e.evalOption(up.network.config.badResponseTime,this)),this.Sr()}get xhr(){var t;return null!==(t=this.Er)&&void 0!==t?t:this.Er=new XMLHttpRequest}get fragments(){if(this.jr)return this.jr;{let t=up.fragment.parseTargetSteps(this.target),n=e.map(t,"selector"),i={origin:this.origin,layer:this.layer};return e.compact(e.map(n,(t=>up.fragment.get(t,i))))}}set fragments(t){this.jr=t}get fragment(){var t;return null===(t=this.fragments)||void 0===t?void 0:t[0]}kr(){this.method=e.normalizeMethod(this.method),this.Cr(),this.Fr(),this.url=e.normalizeURL(this.url)}Tr(){e.task((()=>{this.layer=void 0,this.failLayer=void 0,this.origin=void 0,this.fragments=void 0}))}Cr(){var t;let e=null===(t=this.url)||void 0===t?void 0:t.match(/^([^#]*)(#.+)$/);if(e)return this.url=e[1],this.hash=e[2]}Fr(){!this.url||this.allowsPayload()||e.isBlank(this.params)||(this.url=this.params.toURL(this.url),this.params.clear())}isSafe(){return up.network.isSafeMethod(this.method)}allowsPayload(){return e.methodAllowsPayload(this.method)}will302RedirectWithGET(){return this.isSafe()||"POST"===this.method}willCache(){return e.evalAutoOption(this.cache,up.network.config.autoCache,this)}runQueuedCallbacks(){e.always(this,(()=>this.Tr()))}load(){var t;if("new"===this.state)return this.Rr()?(this.state="loading",this.kr(),null===(t=this.onLoading)||void 0===t||t.call(this),this.expired=!1,new up.Request.XHRRenderer(this).buildAndSend({onload:()=>this.Pr(),onerror:()=>this.Ar(),ontimeout:()=>this.Lr(),onabort:()=>this.$r()}),!0):void this.abort({reason:"Prevented by event listener"})}Rr(){return!this.emit("up:request:load",{log:["Loading %s",this.description]}).defaultPrevented}loadPage(){up.network.abort(),new up.Request.FormRenderer(this).buildAndSubmit()}Pr(){const t=this.Dr(),e="Loaded "+t.description;this.emit("up:request:loaded",{request:t.request,response:t,log:e}),this.respondWith(t)}Ar(){this.Mr("Network error")}Lr(){this.Mr("Timeout")}$r(){this.Hr()}abort({reason:t}={}){this.Hr(t)&&this.Er&&this.Er.abort()}Hr(t){if(this.Nr())return;let e="Aborted request to "+this.description+(t?": "+t:"");return this.state="aborted",this.deferred.reject(new up.Aborted(e)),this.emit("up:request:aborted",{log:e}),!0}Mr(t){if(this.Nr())return;let e="Cannot load request to "+this.description+(t?": "+t:"");this.state="offline",this.emit("up:request:offline",{log:e}),this.deferred.reject(new up.Offline(e))}respondWith(t){this.response=t,this.Nr()||(this.state="loaded",t.ok?this.deferred.resolve(t):this.deferred.reject(t))}Nr(){return"new"!==this.state&&"loading"!==this.state&&"tracking"!==this.state}csrfHeader(){return up.protocol.csrfHeader()}csrfParam(){return up.protocol.csrfParam()}csrfToken(){if(!this.isSafe()&&!this.isCrossOrigin())return up.protocol.csrfToken()}isCrossOrigin(){return e.isCrossOrigin(this.url)}Dr(){const t={method:this.method,url:this.url,request:this,xhr:this.xhr,text:this.xhr.responseText,status:this.xhr.status,title:up.protocol.titleFromXHR(this.xhr),target:up.protocol.targetFromXHR(this.xhr),acceptLayer:up.protocol.acceptLayerFromXHR(this.xhr),dismissLayer:up.protocol.dismissLayerFromXHR(this.xhr),eventPlans:up.protocol.eventPlansFromXHR(this.xhr),context:up.protocol.contextFromXHR(this.xhr),expireCache:up.protocol.expireCacheFromXHR(this.xhr),evictCache:up.protocol.evictCacheFromXHR(this.xhr),fail:this.fail};let n=up.protocol.methodFromXHR(this.xhr),i=up.protocol.locationFromXHR(this.xhr);return i&&(e.matchURLs(this.url,i)||n||(n="GET"),t.url=i),n&&(t.method=n),new up.Response(t)}Gi(t){return up.EventEmitter.fromEmitArgs(t,{layer:this.layer,request:this,origin:this.origin})}emit(...t){return this.Gi(t).emit()}assertEmitted(...t){this.Gi(t).assertEmitted()}get description(){return this.method+" "+this.url}isPartOfSubtree(t){return t=e.wrapList(t),e.some(this.fragments,(function(n){return e.some(t,(t=>t.contains(n)))}))}get age(){return new Date-this.builtAt}header(t){return this.headers[t]}Sr(){for(let t of["target","failTarget","mode","failMode","context","failContext"])this.qr(t);let t,e;(t=this.csrfHeader())&&(e=this.csrfToken())&&this.Ur(t,e),this.Ur(up.protocol.headerize("version"),up.version)}qr(t){this.Ur(up.protocol.headerize(t),this[t])}Ur(t,n){e.isMissing(n)||((e.isOptions(n)||e.isArray(n))&&(n=e.safeStringifyJSON(n)),this.headers[t]=n)}mergeIfUnsent(t){if("new"!==this.state)return;if(!this.target||!t.target)return;let n=up.fragment.splitTarget(this.target+","+t.target);this.target=e.uniq(n).join(", "),this.qr("target"),this.jr=e.uniq([...this.fragments,...t.fragments])}static tester(t,{except:n}={}){let i;if(e.isFunction(t))i=t;else if(t instanceof this)i=e=>t===e;else if(e.isString(t)){let e=new up.URLPattern(t);i=t=>e.test(t.url)}else i=e=>t;return n?t=>!up.cache.willHaveSameResponse(t,n)&&i(t):i}},e.delegate(t.prototype,["then","catch","finally"],(function(){return this.deferred})),t)},7974:function(){var t=this&&this.D||function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{c(i.next(t))}catch(t){r(t)}}function u(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((i=i.apply(t,e||[])).next())}))};const e=up.util;class Route{constructor(){this.varyHeaders=new Set,this.requests=[]}matchBest(t){let n=this.requests.filter((e=>this.satisfies(e,t)));return e.last(n)}delete(t){e.remove(this.requests,t)}put(t){this.requests.push(t)}updateVary(t){for(let e of t.varyHeaderNames)this.varyHeaders.add(e)}satisfies(t,n){return t===n||e.every(this.varyHeaders,(i=>{let s=t.header(i),r=n.header(i);if("X-Up-Target"===i||"X-Up-Fail-Target"===i){if(!s)return!0;if(!r)return!1;let t=e.parseTokens(s,{separator:"comma"}),n=e.parseTokens(r,{separator:"comma"});return e.containsAll(t,n)}return s===r}))}}up.Request.Cache=class Cache{constructor(){this.reset()}reset(){this.Br={},this.zr=[]}get(t){t=this.Ir(t);let e=this.Kr(t),n=e.matchBest(t);if(n){if(this.Vr(n))return n;this.Xr(t,e)}}put(e){return t(this,void 0,void 0,(function*(){e=this.Ir(e);let t=this.Kr(e),{response:n}=e;n&&t.updateVary(n);let i=t.requests.filter((n=>t.satisfies(e,n)));for(let t of i)this.Xr(t);e.cacheRoute=t,t.put(e),this.zr.push(e),this.Wr()}))}alias(t,e){if(t=this.get(t))return e=this.Ir(e),this.track(t,e,{force:!0}),this.put(e),e}track(n,i,s={}){var r;return t(this,void 0,void 0,(function*(){i.trackedRequest=n,i.state="tracking";let t=yield e.always(n);t instanceof up.Response?s.force||n.cacheRoute.satisfies(n,i)?(i.fromCache=!0,t=e.variant(t,{request:i}),i.respondWith(t),e.delegate(i,["expired","state"],(()=>n))):(delete i.trackedRequest,i.state="new",null===(r=s.onIncompatible)||void 0===r||r.call(s,i)):(i.state=n.state,i.deferred.reject(t))}))}willHaveSameResponse(t,e){return t===e||t===e.trackedRequest}evict(t=!0,e){this.Jr(t,e,(t=>this.Xr(t)))}expire(t=!0,e){this.Jr(t,e,(t=>t.expired=!0))}reindex(t){this.Xr(t),this.put(t)}Xr(t){var n;e.remove(this.zr,t),null===(n=t.cacheRoute)||void 0===n||n.delete(t),delete t.cacheRoute}Kr(t){var e,n;return t.cacheRoute||(e=this.Br)[n=t.description]||(e[n]=new Route)}Vr(t){return t.age<up.network.config.cacheEvictAge}get Gr(){return this.zr.length}get Pn(){return up.network.config.cacheSize}Wr(){for(let t=0;t<this.Gr-this.Pn;t++)this.Xr(this.zr[0])}Jr(t=!0,n,i){let s=up.Request.tester(t,n),r=e.filter(this.zr,s);e.each(r,i)}Ir(t){return e.wrapValue(up.Request,t)}}},5221:()=>{const t=up.util,e=up.element,n=["GET","POST"];up.Request.FormRenderer=class FormRenderer{constructor(t){this.vt=t}buildAndSubmit(){this.params=t.copy(this.vt.params);let i=this.vt.url,{method:s}=this.vt;const r=up.Params.fromURL(i);this.params.addAll(r),i=up.Params.stripURL(i),t.contains(n,s)||(s=up.protocol.wrapMethod(s,this.params)),this.Mn=e.affix(document.body,"form.up-request-loader",{method:s,action:i});let o,u,c=this.vt.contentType;c&&this.Mn.setAttribute("enctype",c),(o=this.vt.csrfParam())&&(u=this.vt.csrfToken())&&this.params.add(o,u),t.each(this.params.toArray(),this.Qr.bind(this)),up.browser.submitForm(this.Mn)}Qr(t){e.affix(this.Mn,"input[type=hidden]",t)}}},6413:()=>{const t=up.util;up.Request.Queue=class Queue{constructor(){this.reset()}reset(){this.Yr=[],this.Zr=[],this.eo=!1}get allRequests(){return this.Zr.concat(this.Yr)}asap(e){e.runQueuedCallbacks(),t.always(e,(t=>this.Et(e,t))),this.no(e),this.io(e),queueMicrotask((()=>this.so()))}promoteToForeground(t){t.background&&(t.background=!1,this.no(t))}no(e){let n=Math.max(e.badResponseTime-e.age,0);t.timer(n,(()=>this.ro()))}oo(){return t.evalOption(up.network.config.concurrency)}uo(){const t=this.oo();return-1===t||this.Zr.length<t}isBusy(){return this.Zr.length>0||this.Yr.length>0}io(t){this.Yr.push(t)}co(){let e=t.find(this.Yr,(t=>!t.background));return e||(e=this.Yr[0]),t.remove(this.Yr,e)}ao(t){t.load()&&this.Zr.push(t)}Et(e,n){t.remove(this.Zr,e)||t.remove(this.Yr,e),n instanceof up.Response&&n.ok&&up.network.registerAliasForRedirect(e,n),this.ro(),queueMicrotask((()=>this.so()))}so(){let t;if(this.uo()&&(t=this.co()))return this.ao(t)}abort(...e){var n;let i=t.extractOptions(e),{except:s,reason:r,logOnce:o}=i,u=null===(n=e[0])||void 0===n||n,c=up.Request.tester(u,{except:s});for(let e of[this.Zr,this.Yr]){const n=t.filter(e,c);for(let i of n)o&&(up.puts(...o),o=null),i.abort({reason:r}),t.remove(e,i)}}ro(){const t=this.ho();this.eo!==t&&(this.eo=t,t?up.emit("up:network:late",{log:"Server is slow to respond"}):up.emit("up:network:recover",{log:"Slow requests were loaded"}))}ho(){const e=t.reject(this.allRequests,"background");return t.some(e,(t=>t.age>=t.badResponseTime-1))}}},2298:()=>{var t;const e="multipart/form-data",n=up.util;up.Request.XHRRenderer=(t=class XHRRenderer{constructor(t){this.vt=t}buildAndSend(t){const e=this.vt.xhr;this.lo=n.copy(this.vt.params),this.vt.timeout&&(e.timeout=this.vt.timeout),e.open(this.po(),this.vt.url);let i=this.fo();i&&e.setRequestHeader("Content-Type",i);for(let t in this.vt.headers){let n=this.vt.headers[t];e.setRequestHeader(t,n)}Object.assign(e,t),e.send(this.do())}po(){let t=this.vt.method;return this.vt.wrapMethod&&!this.vt.will302RedirectWithGET()&&(t=up.protocol.wrapMethod(t,this.lo)),t}fo(){return this.mo(),this.vo}do(){return this.mo(),this.bo}mo(){this.bo=this.vt.payload,this.vo=this.vt.contentType,!this.bo&&this.vt.allowsPayload()&&(this.vo||(this.vo=this.lo.hasBinaryValues()?e:"application/x-www-form-urlencoded"),this.vo===e?(this.vo=null,this.bo=this.lo.toFormData()):this.bo=this.lo.toQuery().replace(/%20/g,"+"))}},n.memoizeMethod(t.prototype,{mo:!0,po:!0}),t)},4517:()=>{const t=up.util;up.Response=class Response extends up.Record{keys(){return["method","url","text","status","request","xhr","target","title","acceptLayer","dismissLayer","eventPlans","context","expireCache","evictCache","headers","loadedAt","fail"]}defaults(){return{headers:{},loadedAt:new Date}}get ok(){var e;return!t.evalOption(null!==(e=this.fail)&&void 0!==e?e:up.network.config.fail,this)}get none(){return!this.text}header(t){var e;return this.headers[t]||(null===(e=this.xhr)||void 0===e?void 0:e.getResponseHeader(t))}get varyHeaderNames(){let e=this.header("Vary");return t.parseTokens(e,{separator:"comma"})}get contentType(){return this.header("Content-Type")}get cspNonces(){return up.protocol.cspNoncesFromHeader(this.header("Content-Security-Policy")||this.header("Content-Security-Policy-Report-Only"))}get lastModified(){let t=this.header("Last-Modified");if(t)return new Date(t)}get etag(){return this.header("ETag")}get json(){return this.parsedJSON||(this.parsedJSON=JSON.parse(this.text))}get age(){return new Date-this.loadedAt}get expired(){return this.age>up.network.config.cacheExpireAge||this.request.expired}get description(){return`HTTP ${this.status} response to ${this.request.description}`}}},7241:()=>{var t;const e=up.util,n=up.element,i=/^\s*<(html|!DOCTYPE)\b/i;up.ResponseDoc=(t=class ResponseDoc{constructor({document:t,fragment:e,content:n,target:i,origin:s,cspNonces:r,match:o}){if(t?this.yo(t):e?this.wo(e):this._o(n||"",i),this.Oo=r,s){let t=up.fragment.tryToTarget(s);t&&(this.ko=this.select(t))}this.ri=o}yo(t){t instanceof Document?(this.si=t,this.So=!0):e.isString(t)?(this.si=n.createBrokenDocumentFromHTML(t),this.So=i.test(t),this.xo=!0):(this.si=this.Eo(t),this.So=t.matches("html"))}wo(t){let i=e.isString(t)?n.createFromHTML(t):t;this.si=this.Eo(i)}_o(t,i){i||up.fail("must pass a { target } when passing { content }");let s=e.map(up.fragment.parseTargetSteps(i),"selector").join();const r=n.createFromSelector(s);e.isString(t)?r.innerHTML=t:r.appendChild(t),this.si=this.Eo(r)}Eo(t){let e=document.createElement("up-document");return e.append(t),e.documentElement=t,e}rootSelector(){return up.fragment.toTarget(this.si.documentElement)}get title(){return this.jo(this.Co)}Fo(){if(this.So)return this.si.head}jo(t){let e=this.Fo();return e&&t(e)}get metaTags(){return this.jo(up.history.findMetaTags)}get assets(){return this.jo(up.script.findAssets)}get lang(){if(this.So)return up.history.getLang(this.si)}Co(t){var e;return null===(e=t.querySelector("title"))||void 0===e?void 0:e.textContent}select(t){return new up.FragmentFinder({selector:t,origin:this.ko,document:this.si,match:this.ri}).find()}selectSteps(t){return t.filter((t=>this.To(t)||this.Ro(t)))}commitSteps(t){return t.filter((t=>this.commitElement(t.newElement)))}To(t){if(t.newElement)return!0;let e=this.select(t.selector);if(!e)return;let{selectEvent:n}=t;return n&&(n.newFragment=e,n.renderOptions=t.originalRenderOptions,up.emit(t.oldElement,n,{callback:t.selectCallback}),n.defaultPrevented)?void 0:(t.newElement=e,!0)}Ro(t){if(!t.maybe)throw new up.CannotMatch}commitElement(t){if(this.si.contains(t))return up.fragment.config.runScripts||up.script.disableSubtree(t),t.remove(),!0}finalizeElement(t){if(up.NonceableCallback.adoptNonces(t,this.Oo),this.xo){let i=n.subtree(t,":is(noscript,script,audio,video):not(.up-keeping, .up-keeping *)");e.each(i,n.fixParserDamage)}}},e.memoizeMethod(t.prototype,{Fo:!0}),t)},2723:()=>{const t=up.element,e=up.util;up.RevealMotion=class RevealMotion{constructor(e,n={}){var i,s,r,o,u,c,a,h,l;this.M=e,this.Po=t.get(n.viewport)||up.viewport.get(this.M),this.Ao=up.layer.get(this.Po),this.Lo=null!==(i=n.behavior)&&void 0!==i?i:"instant";const p=up.viewport.config;this.$o=null!==(r=null!==(s=n.snap)&&void 0!==s?s:n.revealSnap)&&void 0!==r?r:p.revealSnap,this.Do=null!==(u=null!==(o=n.padding)&&void 0!==o?o:n.revealPadding)&&void 0!==u?u:p.revealPadding,this.Mo=null!==(a=null!==(c=n.top)&&void 0!==c?c:n.revealTop)&&void 0!==a?a:p.revealTop,this.Ho=null!==(l=null!==(h=n.max)&&void 0!==h?h:n.revealMax)&&void 0!==l?l:p.revealMax,this.No=p.selector("fixedTopSelectors"),this.qo=p.selector("fixedBottomSelectors")}start(){const t=this.Uo(this.Po),n=up.Rect.fromElement(this.M);if(this.Ho){const t=e.evalOption(this.Ho,this.M);n.height=Math.min(n.height,t)}n.grow(this.Do),this.Bo(t),t.height<0&&up.fail("Viewport has no visible area");const i=this.Po.scrollTop;let s=i;this.Mo||n.height>t.height?s+=n.top-t.top:n.top<t.top?s-=t.top-n.top:n.bottom>t.bottom&&(s+=n.bottom-t.bottom),e.isNumber(this.$o)&&s<this.$o&&n.top<.5*t.height&&(s=0),s!==i&&this.Po.scrollTo({top:s,behavior:this.Lo})}Uo(){return up.viewport.isRoot(this.Po)?new up.Rect({left:0,top:0,width:up.viewport.rootWidth(),height:up.viewport.rootHeight()}):up.Rect.fromElement(this.Po)}zo(n){let i=up.fragment.all(n,{layer:this.Ao});return e.filter(i,t.isVisible)}Bo(t){for(let e of this.zo(this.No)){let n=up.Rect.fromElement(e).bottom-t.top;n>0&&(t.top+=n,t.height-=n)}for(let e of this.zo(this.qo)){let n=up.Rect.fromElement(e),i=t.bottom-n.top;i>0&&(t.height-=i)}}}},8720:()=>{const t=up.util,e=/:has\(([^)]+)\)$/;up.Selector=class Selector{constructor(n,i,s={}){var r;let o;if(this.Io=[],s.destroying||this.Io.push(up.fragment.isNotDestroying),i&&!document.contains(i)||"any"===s.layer)o=up.layer.root;else{if(null!==(r=s.layer)&&void 0!==r||(s.layer=t.presence(i,t.isElement)),this.Z=up.layer.getAll(s),!this.Z.length)throw new up.CannotMatch(["Unknown layer: %o",s.layer]);this.Io.push((e=>t.some(this.Z,(t=>t.contains(e))))),o=this.Z[0]}let u=up.fragment.expandTargets(n,Object.assign(Object.assign({},s),{layer:o}));this.Ko=u.map((t=>(up.browser.canHasSelector()||(t=t.replace(e,((t,e)=>(this.Io.push((t=>t.querySelector(e))),"")))),t||"*"))),this.Vo=this.Ko.join()||"match-none"}matches(t){return t.matches(this.Vo)&&this.Xo(t)}closest(t){let e;return this.matches(t)?t:(e=t.parentElement)?this.closest(e):void 0}Xo(e){return t.every(this.Io,(t=>t(e)))}descendants(e=document){const n=t.flatMap(this.Ko,(t=>e.querySelectorAll(t)));return t.filter(n,(t=>this.Xo(t)))}subtree(t){const e=[];return t instanceof Document||!this.matches(t)||e.push(t),e.push(...this.descendants(t)),e}}},7885:()=>{const t=up.util,e=up.element;up.Tether=class Tether{constructor(t){var n,i;null===(i=(n=up.migrate).handleTetherOptions)||void 0===i||i.call(n,t),this.Wo=t.anchor,this.Jo=t.align,this.Go=t.position,this.Qo="top"===this.Go||"bottom"===this.Go?"horizontal":"vertical",this.Po=up.viewport.get(this.Wo),this.parent=this.Po===e.root?document.body:this.Po,this.Yo=!this.Po.contains(this.Wo.offsetParent)}start(t){this.M=t,this.M.style.position="absolute",this.Zo(0,0),this.sync(),this.tu("on")}stop(){this.tu("off")}tu(t){let e=this.eu.bind(this);up[t](window,"resize",e),this.Yo&&up[t](this.Po,"scroll",e)}eu(){return clearTimeout(this.syncTimer),this.syncTimer=t.task(this.sync.bind(this))}isDetached(){return!this.parent.isConnected||!this.Wo.isConnected}sync(){const n=this.M.getBoundingClientRect(),i=e.styleNumber(this.M,"marginTop"),s=e.styleNumber(this.M,"marginRight"),r=e.styleNumber(this.M,"marginBottom"),o=e.styleNumber(this.M,"marginLeft"),u=this.Wo.getBoundingClientRect();let c,a;switch(this.Qo){case"horizontal":switch(this.Go){case"top":a=u.top-r-n.height;break;case"bottom":a=u.top+u.height+i}switch(this.Jo){case"left":c=u.left+o;break;case"center":c=u.left+.5*(u.width-n.width);break;case"right":c=u.left+u.width-n.width-s}break;case"vertical":switch(this.Jo){case"top":a=u.top+i;break;case"center":a=u.top+.5*(u.height-n.height);break;case"bottom":a=u.top+u.height-n.height-r}switch(this.Go){case"left":c=u.left-s-n.width;break;case"right":c=u.left+u.width+o}}t.isDefined(c)||t.isDefined(a)?this.lr(c,a):up.fail("Invalid tether constraints: %o",this.nu())}nu(){return{position:this.Go,align:this.Jo}}lr(t,e){const n=this.M.getBoundingClientRect();this.Zo(t-n.left+this.offsetLeft,e-n.top+this.offsetTop)}Zo(t,n){this.offsetLeft=t,this.offsetTop=n,e.setStyle(this.M,{left:t,top:n})}}},4818:()=>{const t=up.util;up.URLPattern=class URLPattern{constructor(e,n=t.normalizeURL){this.iu=n,this.su=[];const i=[],s=[];for(let n of t.parseTokens(e))"-"===n[0]?s.push(n.substring(1)):i.push(n);this.ru=this.ou(i,!0),this.uu=this.ou(s,!1)}ou(e,n){if(!e.length)return;let i=(e=e.map((e=>("*"===e[0]&&(e="/"+e),e=this.iu(e),t.escapeRegExp(e))))).join("|");return i=i.replace(/\\\*/g,".*?"),i=i.replace(/(:|\\\$)([a-z][\w-]*)/gi,((t,e,i)=>"\\$"===e?(n&&this.su.push({name:i,cast:Number}),"(\\d+)"):(n&&this.su.push({name:i,cast:String}),"([^/?#]+)"))),new RegExp("^(?:"+i+")$")}test(t,e=!0){return e&&(t=this.iu(t)),this.ru.test(t)&&!this.cu(t)}recognize(t,e=!0){e&&(t=this.iu(t));let n=this.ru.exec(t);if(n&&!this.cu(t)){const t={};return this.su.forEach(((e,i)=>{let s=n[i+1];if(s)return t[e.name]=e.cast(s)})),t}}cu(t){var e;return null===(e=this.uu)||void 0===e?void 0:e.test(t)}}},9675:(t,e,n)=>{n(5941),up.element=function(){const t=up.util;function e(...t){const e=t.pop();return(t[0]||document).querySelector(e)}function n(t,e){const n=[];return t.matches(e)&&n.push(t),n.push(...t.querySelectorAll(e)),n}function i(...n){const i=n.pop();return t.isElement(i)?i:t.isString(i)?e(...n,i):t.isList(i)?(i.length>1&&up.fail("up.element.get(): Cannot cast multiple elements (%o) to a single element",i),i[0]):i}function s(...e){return t.flatMap(e,r)}function r(e){return t.isString(e)?document.querySelectorAll(e):t.wrapList(e)}function o(t){t.setAttribute("hidden","")}function u(t){t.removeAttribute("hidden"),"none"===t.style.display&&(t.style.display="")}function c(e,n){for(let i in n){const s=n[i];t.isGiven(s)?e.setAttribute(i,s):e.removeAttribute(i)}}function a(e,n={}){let i,s,r,{includePath:o}=h(e);for(let t of o){let{tagName:e,id:n,classNames:o,attributes:u}=t;e&&"*"!==e||(e="div"),s=document.createElement(e),i||(i=s),n&&(s.id=n);for(let t of o)s.classList.add(t);for(let t in u){let e=u[t];s.setAttribute(t,e||"")}null==r||r.appendChild(s),r=s}for(let e in n){let s=n[e];if("class"===e)for(let e of t.wrapList(s))i.classList.add(e);else"style"===e?E(i,s):"text"===e?i.textContent=s:"content"===e?i.innerHTML=s:i.setAttribute(e,s)}return i}function h(t){let e;const n=t.replace(/:not\([^)]+\)/,(function(t){return e=t,""})),[i,s]=function(t){let e=[];return[t=p(t,(function({name:t,value:n}){return e.push(n),`[${t}]`})),e]}(n);return{includePath:i.split(/[ >]+/).map((function(e){let n={tagName:null,classNames:[],id:null,attributes:{}};return e=(e=(e=e.replace(/^[\w-*]+/,(function(t){return n.tagName=t,""}))).replace(/#([\w-]+)/,(function(t,e){return n.id=e,""}))).replace(/\.([\w-]+)/g,(function(t,e){return n.classNames.push(e),""})),s.length&&(e=p(e,(function({name:t}){return n.attributes[t]=s.shift(),""}))),e&&up.fail("Cannot parse selector: "+t),n})),includeRaw:n,excludeRaw:e}}const l=/\[([\w-]+)(?:([~|^$*]?=)(["'])?([^\3\]]*?)\3)?]/g;function p(t,e){return t.replace(l,(function(t,n,i,s,r){return r&&(r=r.replace(/\\([\\"'])/,"$1")),e({name:n,operator:i,quote:s,value:r})}))}const f=["HTML","BODY","HEAD","TITLE"],d=up.mockable((t=>t.matches(f.join())));function m(e,n){return t.isGiven(n)?`[${e}="${n=n.replace(/"/g,'\\"')}"]`:`[${e}]`}function g(t){const e=document.createRange();e.setStart(document.body,0);let n=e.createContextualFragment(t.trim()).childNodes;if(1!==n.length)throw new Error("HTML must have a single root element");return n[0]}function v(t){t.offsetHeight}function b(e,n,i){t.isMissing(e.getAttribute(n))&&e.setAttribute(n,i)}function y(e,n){let i=e.getAttribute(n);return t.replaceValue(i,null,void 0)}function w(t,e,n){if(!t.hasAttribute(e))return;const i=y(t,e);switch(i){case"false":return!1;case"true":case"":case e:return!0;default:return!n||i}}function _(t,e){const n=S(t,Object.keys(e));return E(t,e),()=>E(t,n)}function O(t,e){return x(window.getComputedStyle(t),e)}function k(e,n){const i=O(e,n);if(t.isGiven(i))return parseFloat(i)}function S(t,e){const{style:n}=t;return x(n,e)}function x(e,n){return t.isString(n)?e[n]:t.pick(e,n)}function E(e,n){if(t.isString(n))e.setAttribute("style",n);else{const{style:t}=e;for(let e in n){let i=n[e];i=j(e,i),t[e]=i}}}function j(e,n){var i;return t.isMissing(n)?n="":C.has(e.toLowerCase().replace(/-/,""))&&(i=n,n=t.isNumber(i)||t.isString(i)&&/^\d+$/.test(i)?i.toString()+"px":i),n}const C=new Set(["top","right","bottom","left","padding","paddingtop","paddingright","paddingbottom","paddingleft","margin","margintop","marginright","marginbottom","marginleft","borderwidth","bordertopwidth","borderrightwidth","borderbottomwidth","borderleftwidth","width","height","maxwidth","maxheight","minwidth","minheight"]);function F(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)}function T(t){return/^up-/.test(t)}return{subtree:n,contains:function(t,e){const n=i(e);return Node.prototype.contains.call(t,n)},closestAttr:function(t,e,n=y){let i=t.closest("["+e+"]");if(i)return n(i,e)},ancestor:function(t,e){var n;return null===(n=t.parentNode)||void 0===n?void 0:n.closest(e)},around:function(t,e){return s(t.closest(e),n(t,e))},get:i,list:s,toggle:function(t,e){null==e&&(e=!F(t)),(e?u:o)(t)},hide:o,show:u,metaContent:function(t){var n;return null===(n=e("meta"+m("name",t)))||void 0===n?void 0:n.getAttribute("content")},insertBefore:function(t,e){t.insertAdjacentElement("beforebegin",e)},createFromSelector:a,setAttrs:c,setTemporaryAttrs:function(t,e){const n={};for(let i of Object.keys(e))n[i]=t.getAttribute(i);return c(t,e),()=>c(t,n)},affix:function(e,...n){let i,s;const r=t.extractOptions(n);2===n.length?[i,s]=n:(i="beforeend",s=n[0]);const o=a(s,r);return e.insertAdjacentElement(i,o),o},idSelector:function(t){return t.match(/^[a-z][a-z0-9\-_]*$/i)?`#${t}`:m("id",t)},classSelector:function(t){return`.${t=t.replace(/[^\w-]/g,"\\$&")}`},isSingleton:d,attrSelector:m,tagName:function(t){return t.tagName.toLowerCase()},createBrokenDocumentFromHTML:function(t){return(new DOMParser).parseFromString(t,"text/html")},fixParserDamage:function(t){let e=g(t.outerHTML);t.replaceWith(e)},createFromHTML:g,get root(){return document.documentElement},paint:v,concludeCSSTransition:function(t){const e=_(t,{transition:"none"});return v(t),e},hasCSSTransition:function(e){let n;n=t.isOptions(e)?e:O(e);const i=n.transitionProperty,s=n.transitionDuration;return!("none"===i||"all"===i&&0===s)},fixedToAbsolute:function(t){const e=t.getBoundingClientRect();t.style.position="absolute";const n=t.offsetParent.getBoundingClientRect();E(t,{left:e.left-k(t,"margin-left")-n.left,top:e.top-k(t,"margin-top")-n.top,right:"",bottom:""})},setMissingAttrs:function(t,e){for(let n in e)b(t,n,e[n])},setMissingAttr:b,unwrap:function(e){!function(n){const i=document.activeElement;try{return function(){const n=e.parentNode,i=t.toArray(e.childNodes);t.each(i,(t=>n.insertBefore(t,e))),n.removeChild(e)}()}finally{i&&i!==document.activeElement&&i.focus({preventScroll:!0})}}()},wrapChildren:function(t){let e;const n=document.createElement("up-wrapper");for(;e=t.firstChild;)n.appendChild(e);return t.appendChild(n),n},attr:y,booleanAttr:w,numberAttr:function(t,e){let n=t.getAttribute(e);if(n&&(n=n.replace(/_/g,""),n.match(/^-?[\d.]+$/)))return parseFloat(n)},jsonAttr:function(t,e){var n,i;let s=null===(i=null===(n=t.getAttribute)||void 0===n?void 0:n.call(t,e))||void 0===i?void 0:i.trim();if(s)return JSON.parse(s)},callbackAttr:function(e,n,{exposedKeys:i=[],mainKey:s="event"}={}){let r=e.getAttribute(n);if(r){const n=up.NonceableCallback.fromString(r).toFunction(s,...i);return function(s){const r=Object.values(t.pick(s,i));return n.call(e,s,...r)}}},booleanOrStringAttr:function(t,e,n=!0){let i=w(t,e,!0);return!0===i?n:i},setTemporaryStyle:_,style:O,styleNumber:k,inlineStyle:S,setStyle:E,isVisible:F,upAttrs:function(e){let n=t.filter(e.getAttributeNames(),T);return t.mapObject(n,(t=>[t,e.getAttribute(t)]))},upClasses:function(e){return t.filter(e.classList.values(),T)},toggleAttr:function(t,e,n,i){return null==i&&(i=!t.hasAttribute(e)),i?t.setAttribute(e,n):t.removeAttribute(e)},addTemporaryClass:function(t,e){return t.classList.add(e),()=>t.classList.remove(e)},cleanJQuery:function(t){up.browser.canJQuery()&&jQuery(t).remove()},parseSelector:h,isEmpty:function(t){return!t.children.length>0&&!t.innerText.trim()},crossOriginSelector:function(t){return`[${t}*="//"]:not([${t}*="//${location.host}/"])`},isIntersectingWindow:function(t,{margin:e=0}={}){const n=up.Rect.fromElement(t);return n.grow(e),n.bottom>0&&n.top<window.innerHeight&&n.right>0&&n.left<window.innerWidth},unionSelector:function(e,n){let i=`:is(${e.join()})`;return t.isPresent(n)&&(i+=`:not(${n.join()})`),i}}}()},3924:()=>{up.error=function(){function t(t){if("object"!=typeof(e=t)||!("AbortError"===e.name||e instanceof up.RenderResult||e instanceof up.Response))throw t;var e}function e(t){try{return t()}catch(t){!function(t){console.error("Uncaught %o",t);let e=new ErrorEvent("error",{error:t,message:"Uncaught "+t});window.dispatchEvent(e)}(t)}}return{fail:function(...t){throw new up.Error(t)},throwCritical:t,muteUncriticalRejection:function(e){return e.catch(t)},muteUncriticalSync:function(e){try{return e()}catch(e){t(e)}},guard:e,guardFn:function(t){return(...n)=>e((()=>t(...n)))}}}(),up.fail=up.error.fail},4366:()=>{up.Aborted=class Aborted extends up.Error{constructor(t){super(t,{name:"AbortError"})}}},8010:()=>{up.CannotMatch=class CannotMatch extends up.Error{}},4861:()=>{up.CannotParse=class CannotParse extends up.Error{}},3469:()=>{up.CannotTarget=class CannotTarget extends up.Error{}},376:()=>{up.Error=class Error extends window.Error{constructor(t,e={}){Array.isArray(t)&&(t=up.util.sprintf(...t)),super(t);let n="up."+this.constructor.name;Object.assign(this,{name:n},e)}}},8272:()=>{up.NotImplemented=class NotImplemented extends up.Error{}},4504:()=>{up.Offline=class Offline extends up.Error{}},8670:()=>{up.event=function(){const t=up.util,e=up.element;function n(...t){return i(t).bind()}function i(t,e){return up.EventListenerGroup.fromBindArgs(t,e)}function s(t){return up.EventEmitter.fromEmitArgs(t)}const r=["metaKey","shiftKey","ctrlKey","altKey"];function o(e){return(t.isUndefined(e.button)||0===e.button)&&!t.some(r,(t=>e[t]))}function u(e,n,i=[]){const s=up.event.build(n,t.pick(e,i));return s.originalEvent=e,["stopPropagation","stopImmediatePropagation","preventDefault"].forEach((function(t){const n=s[t];return s[t]=function(){return e[t](),n.call(s)}})),e.defaultPrevented&&s.preventDefault(),s}n("up:click","a[up-emit]",(function(t,n){if(!o(t))return;const i=e.attr(n,"up-emit"),s=e.jsonAttr(n,"up-emit-props"),r=u(t,i);Object.assign(r,s),up.emit(n,r)}));let c=["unknown"];function a(t){c.push(t),setTimeout((()=>c.pop()))}return n("keydown keyup",{capture:!0},(()=>a("key"))),n("pointerdown pointerup",{capture:!0},(()=>a("pointer"))),n("up:framework:reset",(function(){for(let t of[window,document,e.root,document.body])for(let e of up.EventListener.allNonDefault(t))e.unbind()})),{on:n,off:function(...t){return i(t).unbind()},build:function(...e){const n=t.extractOptions(e),i=e[0]||n.type||up.fail("Expected event type to be passed as string argument or { type } property"),s=document.createEvent("Event");return s.initEvent(i,!0,!0),Object.assign(s,t.omit(n,["type","target"])),s},emit:function(...t){return s(t).emit()},assertEmitted:function(...t){return s(t).assertEmitted()},onEscape:function(t){return n("keydown",(function(e){if("Escape"===e.key)return t(e)}))},halt:function(t,e={}){e.log&&up.log.putsEvent(t),t.stopImmediatePropagation(),t.preventDefault()},isUnmodified:o,fork:u,keyModifiers:r,get inputDevice(){return t.last(c)}}}(),up.on=up.event.on,up.off=up.event.off,up.emit=up.event.emit},454:()=>{up.feedback=function(){const t=up.util,e=up.element,n=new up.Config((()=>({currentClasses:["up-current"],navSelectors:["[up-nav]","nav"],noNavSelectors:["[up-nav=false]"]}))),i="a, [up-href]";function s(e){if(e)return t.normalizeURL(e,{trailingSlash:!1,hash:!1})}function r(t){return t.upFeedbackURLs||(t.upFeedbackURLs=new up.LinkFeedbackURLs(t))}function o(t,{layer:s}={}){s||(s=up.layer.get(t));let o=u(s);const c=n.selector("navSelectors"),a=`${c} :is(${i}), ${c}:is(${i})`,h=up.fragment.all(a,{layer:s});for(let t of h){const i=r(t).isCurrent(o);for(let e of n.currentClasses)t.classList.toggle(e,i);e.toggleAttr(t,"aria-current","page",i)}}function u(t){return t.feedbackLocation||s(t.location)}function c(t){const e=t.feedbackLocation,n=u(t.location);e&&e===n||(t.feedbackLocation=n,o(t.element,{layer:t}))}return up.on("up:location:changed",(t=>{!function(){const t=up.layer.front;t.showsLiveHistory()&&c(t)}()})),up.on("up:fragment:compile",((t,e)=>{o(e)})),up.on("up:layer:location:changed",(t=>{c(t.layer)})),up.on("up:framework:reset",(function(){up.layer.root.feedbackLocation=null})),{config:n,showAroundRequest:function(n,s){if(!s.feedback)return;let r=e=>t.always(n,e),o=function(t){let n=t.origin;if(n)return s=n,e.ancestor(s,i)||s;var s}(n);o&&r(e.addTemporaryClass(o,"up-active"));for(let t of n.fragments)r(e.addTemporaryClass(t,"up-loading"))},normalizeURL:s}}()},2851:()=>{up.form=function(){const t=up.util,e=up.element,n=["[up-submit]","[up-target]","[up-layer]","[up-transition]"],i=new up.Config((()=>({groupSelectors:["[up-form-group]","fieldset","label","form"],fieldSelectors:["select","input:not([type=submit]):not([type=image])","button[type]:not([type=submit])","textarea"],submitSelectors:up.link.combineFollowableSelectors(["form"],n),noSubmitSelectors:["[up-submit=false]","[target]",e.crossOriginSelector("action")],submitButtonSelectors:["input[type=submit]","input[type=image]","button[type=submit]","button:not([type])"],watchInputEvents:["input","change"],watchInputDelay:0,watchChangeEvents:["change"]})));function s(t=""){return i.fieldSelectors.map((e=>e+t)).join()}function r(t){return t.matches(s())}function o(n){n=e.get(n);let i=e.subtree(n,s());if(n.matches("form[id]")){const r=s(e.attrSelector("form",n.getAttribute("id"))),o=up.fragment.all(r,{layer:n});i.push(...o),i=t.uniq(i)}return i}function u(t){return e.subtree(t,c())}function c(){return i.selector("submitButtonSelectors")}const a=up.mockable(((t,e)=>up.render(h(t,e))));function h(e,n,i){e=S(e),n=t.options(n);let s=new up.OptionsParser(e,n,i);return s.include(d),s.string("failTarget",{default:up.fragment.tryToTarget(e)}),s.booleanOrString("disable"),n.guardEvent||(n.guardEvent=up.event.build("up:form:submit",{submitButton:n.submitButton,log:"Submitting form",params:n.params,form:e})),n.origin||(n.origin=up.viewport.focusedElementWithin(e)||n.submitButton||e),s.include(up.link.followOptions),n}function l(t){let e,n=document.activeElement,i=[...o(t),...u(t)];for(let t of i)t===n&&(e=b(n)),p(t);return e&&up.focus(e,{force:!0,preventScroll:!0}),function(){i.forEach(f)}}function p(t){t.upDisableCount||(t.upDisableCount||(t.upDisableCount=0),t.upOriginalDisabled=t.disabled),t.upDisableCount++,t.disabled=!0}function f(t){t.upDisableCount&&(t.disabled?(t.upDisableCount--,t.upDisableCount||(t.disabled=t.upOriginalDisabled)):t.upDisableCount=0)}function d(n,i,s){i=t.options(i),n=S(n);const r=new up.OptionsParser(n,i,s);r.string("contentType",{attr:"enctype"}),r.json("headers");const o=up.Params.fromForm(n),u=function(t){const n=c(),i=document.activeElement;return i&&i.form===t&&i.matches(n)?i:e.get(t,n)}(n);return u&&(i.submitButton=u,o.addField(u),i.method||(i.method=u.getAttribute("formmethod")),i.url||(i.url=u.getAttribute("formaction"))),o.addAll(i.params),i.params=o,r.string("url",{attr:"action",default:up.fragment.source(n)}),r.string("method",{attr:["up-method","data-method","method"],default:"GET",normalize:t.normalizeMethod}),"GET"===i.method&&(i.url=up.Params.stripURL(i.url)),i}function m(e,...n){e=up.element.get(e);const i=t.extractCallback(n)||function(t){let e=t.getAttribute("up-watch");if(e)return up.NonceableCallback.fromString(e).toFunction("value","name").bind(t)}(e)||up.fail("No callback given for up.watch()");let s=t.extractOptions(n);const r=new up.FieldWatcher(e,s,i);return r.start(),()=>r.stop()}function g(t,e={}){return m(t,{options:e,batch:!0},((e,n)=>a(t,n)))}function v(){var t,e;return(null===(e=(t=up.migrate).migratedFormGroupSelectors)||void 0===e?void 0:e.call(t))||i.groupSelectors}function b(t){return y(t).element}function y(e){return t.findResult(v(),(function(t){let n=e.closest(t);if(n){let i=up.fragment.tryToTarget(n),s=up.fragment.tryToTarget(e),r=i||s&&n!==e&&`${t}:has(${s})`;if(r)return{target:r,element:n,origin:e}}}))}function w(n){let i,s;if(n.matches("input[type=checkbox]"))n.checked?(i=n.value,s=":checked"):s=":unchecked";else if(n.matches("input[type=radio]")){const t=x(n),r=n.getAttribute("name"),o=t.querySelector(`input[type=radio]${e.attrSelector("name",r)}:checked`);o?(s=":checked",i=o.value):s=":unchecked"}else i=n.value;const r=[];return t.isPresent(i)?(r.push(i),r.push(":present")):r.push(":blank"),t.isPresent(s)&&r.push(s),r}function _(t,e={}){const n=e.target||e.target||t.getAttribute("up-switch"),i=x(t);n||up.fail("No switch target given for %o",t);const s=w(t);for(let t of up.fragment.all(i,n))O(t,s)}up.on("up:click",c,(function(t,e){const n=S(e);n&&E(n)&&e.focus()}));const O=up.mockable((function(n,i){let s;i||(i=w(function(e){const n=x(e).querySelectorAll("[up-switch]");return t.find(n,(function(t){const n=t.getAttribute("up-switch");return e.matches(n)}))||up.fail("Could not find [up-switch] field for %o",e)}(n)));let r=n.getAttribute("up-hide-for");if(r)r=k(r),s=0===t.intersect(i,r).length;else{let e=n.getAttribute("up-show-for");e=e?k(e):[":present",":checked"],s=t.intersect(i,e).length>0}e.toggle(n,s),n.classList.add("up-switched")}));function k(e){return t.parseTokens(e,{json:!0})}function S(t,e={}){const n=up.fragment.get(t,e);return n.form||n.closest("form")}function x(t,e){return S(t,e)||up.layer.get(t).element}function E(t){return t=up.fragment.get(t),i.matches(t,"submitSelectors")}return up.on("submit",i.selectorFn("submitSelectors"),(function(t,e){t.defaultPrevented||(up.event.halt(t,{log:!0}),up.error.muteUncriticalRejection(a(e)))})),up.compiler((function(){let t=i.fieldSelectors.map((t=>`${t}[up-validate], [up-validate] ${t}`));return e.unionSelector(t,["[up-validate=false]"])}),(function(t){up.FormValidator.forElement(t).watchContainer(t)})),up.compiler("[up-switch]",(t=>{_(t)})),up.on("change","[up-switch]",((t,e)=>{_(e)})),up.compiler("[up-show-for]:not(.up-switched), [up-hide-for]:not(.up-switched)",(t=>{O(t)})),up.attribute("up-watch",(t=>m(t))),up.attribute("up-autosubmit",(t=>g(t))),{config:i,submit:a,submitOptions:h,destinationOptions:d,watchOptions:function(e,n,i={}){var s;n=t.options(n);let r=new up.OptionsParser(e,n,Object.assign(Object.assign({},i),{closest:!0,attrPrefix:"up-watch-"}));r.boolean("feedback"),r.booleanOrString("disable"),r.string("event"),r.number("delay");let o=up.form.config;return"input"===n.event?(n.event=t.evalOption(o.watchInputEvents,e),null!==(s=n.delay)&&void 0!==s||(n.delay=o.watchInputDelay)):"change"===n.event&&(n.event=t.evalOption(o.watchChangeEvents,e)),n.origin||(n.origin=e),n},isSubmittable:E,watch:m,validate:function(...e){let n=function(e,...n){const i=t.extractOptions(n);return i.origin?i.target||(i.target=up.fragment.toTarget(e)):i.origin||(i.origin=up.fragment.get(e)),i}(...e);return up.FormValidator.forElement(n.origin).validate(n)},autosubmit:g,fieldSelector:s,fields:o,isField:r,submitButtons:u,focusedField:function(){return t.presence(document.activeElement,r)},switchTarget:O,disableWhile:function(e,n){let i=function({disable:e,origin:n}){if(!e)return t.noop;let i,s=()=>x(n||void up.fail("Cannot process { disable: '%s' } option without { %s }",e,"origin"));return!0===e?i=[s()]:t.isString(e)&&(i=up.fragment.subtree(s(),e,{origin:n})),t.sequence(i.map(l))}(n);t.always(e,i)},disable:l,group:b,groupSolution:y,groupSelectors:v,get:S,getScope:x}}(),up.submit=up.form.submit,up.watch=up.form.watch,up.autosubmit=up.form.autosubmit,up.validate=up.form.validate},2667:(t,e,n)=>{n(7433);const i=up.util,s=up.element;up.fragment=function(){function t(t){let e=s.tagName(t);if(e.startsWith("up-"))return e}const e=new up.Config((()=>({badTargetClasses:[/^up-/],targetDerivers:["[up-id]","[id]","html","head","body","main","[up-main]",t,"link[rel][type]","link[rel=preload][href]","link[rel=preconnect][href]","link[rel=prefetch][href]","link[rel]","meta[property]","*[name]","form[action]","a[href]","[class]","[up-flashes]","form"],verifyDerivedTarget:!0,navigateOptions:{cache:"auto",revalidate:"auto",feedback:!0,fallback:!0,focus:"auto",scroll:"auto",history:"auto",peel:!0},match:"region",runScripts:!0,autoHistoryTargets:[":main"],autoFocus:["hash","autofocus","main-if-main","keep","target-if-lost"],autoScroll:["hash","layer-if-main"],autoRevalidate:t=>t.expired,skipResponse:n})));function n({response:t,expiredResponse:e}){return!t.text||t.text===(null==e?void 0:e.text)}function r(t,e={}){return t=p(t,e),s.closestAttr(t,"up-source")}function o(t){let e=s.closestAttr(t,"up-time");if(e&&"false"!==e)return/^\d+$/.test(e)&&(e=1e3*Number(e)),new Date(e)}function u(t){let e=s.closestAttr(t,"up-etag");if(e&&"false"!==e)return e}i.delegate(e,["mainTargets"],(()=>up.layer.config.any));const c=up.mockable(((...t)=>{let e=g(t);return new up.RenderJob(e).execute()})),a=up.mockable(((...t)=>{const e=g(t);return c(Object.assign(Object.assign({},e),{navigate:!0}))}));function h(t){return!t.closest(".up-destroying")}function l(t){return t.isConnected&&h(t)}function p(...t){const e=i.extractOptions(t),n=t.pop(),r=t[0];return i.isElementish(n)?s.get(n):r?f(r,n,e):new up.FragmentFinder({selector:n,origin:e.origin,layer:e.layer,match:e.match}).find()}function f(...t){return d(...t)[0]}function d(...t){const e=i.extractOptions(t);let n=t.pop();const s=t[0];return i.isElement(n)?[n]:i.isList(n)?n:new up.Selector(n,s,e).descendants(s)}function m(t,e,n={}){return new up.Selector(e,t,n).subtree(t)}function g(t){const e=i.parseArgIntoOptions(t,"target");return i.isElement(e.target)&&(e.origin||(e.origin=e.target)),e}const v=/^(onFail|on|fail)?(.+)$/;function b(t,e){return i.presence(t,i.isString)||y(t,e)||function(t){throw new up.CannotTarget(function(t){return`Cannot derive good target selector from a <${s.tagName(t)}> element without identifying attributes. Try setting an [id] or configure up.fragment.config.targetDerivers.`}(t))}(t)}function y(t,n){return i.findResult(e.targetDerivers,(function(r){let o=function(t,e){if(i.isFunction(e))return e(t);if(t.matches(e))try{return function(t,e){let{includePath:n,excludeRaw:i}=up.element.parseSelector(e);if(1!==n.length)throw new up.CannotParse(e);let{tagName:r,id:o,classNames:u,attributes:c}=n[0],a="";"*"===r?a+=s.tagName(t):r&&(a+=r);for(let t of u)a+=s.classSelector(t);o&&(a+=s.idSelector(o));for(let e in c){let n=c[e]||t.getAttribute(e);if("id"===e)a+=s.idSelector(n);else if("class"===e)for(let e of w(t))a+=s.classSelector(e);else a+=s.attrSelector(e,n)}return i&&(a+=i),a}(t,e)}catch(t){if(t instanceof up.CannotParse)return e;throw t}}(t,r);if(o&&function(t,n,i={}){return!l(n)||!e.verifyDerivedTarget||up.fragment.get(t,Object.assign({layer:n},i))===n}(o,t,n))return o}))}function w(t){return i.filter(t.classList,(t=>!i.some(e.badTargetClasses,(e=>{return n=e,s=t,i.isRegExp(n)?n.test(s):n===s;var n,s}))))}const _=/:main\b/,O=/:layer\b/,k=/:origin\b/;function S(t){return _.test(t)}function x(t,e={}){const{layer:n}=e;"new"===n||n instanceof up.Layer||up.fail("Must pass an up.Layer as { layer } option, but got %o",n),t=i.copy(i.wrapList(t));const s=[];for(;t.length;){let r=t.shift();if(!0===r&&(r=":main"),S(r)){let n=E(e),i=up.layer.mainTargets(n).map((t=>r.replace(_,t)));t.unshift(...i)}else if(O.test(r)){if("new"===n||n.opening)continue;let i=b(n.getFirstSwappableElement(),e);t.unshift(r.replace(O,i))}else i.isElementish(r)?s.push(b(r,e)):i.isString(r)&&s.push(C(r,e))}return i.uniq(s)}function E({layer:t,mode:e}){return"new"===t?e||up.fail('Must pass a { mode } option together with { layer: "new" }'):t.mode}function j(t,{origin:e}={}){return t.replace(k,(function(n){if(e)return b(e);up.fail('Missing { origin } element to resolve "%s" reference (found in %s)',n,t)}))}function C(...t){return(up.migrate.resolveOrigin||j)(...t)}function F(t){return i.parseTokens(t,{separator:"comma"})}function T(t,e){let n=up.on("up:fragment:aborted",{guard:e=>e.target.contains(t)},e);return up.destructor(t,n),n}return up.on("up:framework:boot",(function(){const{documentElement:t}=document;if(t.setAttribute("up-source",i.normalizeURL(location.href,{hash:!1})),up.hello(t),!up.browser.canPushState())return up.warn("Cannot push history changes. Next fragment update will load in a new page.")})),{config:e,reload:function(...t){var e,n;const a=g(t);a.target||(a.target=":main");const h=p(a.target,a);return a.url||(a.url=r(h)),a.headers=i.merge(a.headers,function(t){let e={},n=o(t);n&&(e["If-Modified-Since"]=n.toUTCString());let i=u(t);return i&&(e["If-None-Match"]=i),e}(h)),(a.keepData||s.booleanAttr(h,"up-keep-data"))&&(a.data=up.data(h)),null===(n=(e=up.migrate).postprocessReloadOptions)||void 0===n||n.call(e,a),c(a)},destroy:function(...t){var e,n;const i=g(t);return(i.element=p(i.target,i))&&new up.Change.DestroyFragment(i).execute(),null===(n=(e=up.migrate).formerlyAsync)||void 0===n?void 0:n.call(e,"up.destroy()")},render:c,navigate:a,get:p,getDumb:f,all:d,subtree:m,contains:function(t,e){return i.isElement(e)?s.contains(t,e)&&up.layer.get(t).contains(e):m(t,e).length>0},closest:function(t,e,n){return new up.Selector(e,t,n).closest(t)},source:r,visit:function(t,e){return a(Object.assign(Object.assign({},e),{url:t}))},markAsDestroying:function(t){t.classList.add("up-destroying"),t.setAttribute("aria-hidden","true")},emitInserted:function(t){return up.emit(t,"up:fragment:inserted",{log:["Inserted fragment %o",t]})},emitDestroyed:function(t,e){var n;const i=null!==(n=e.log)&&void 0!==n?n:["Destroyed fragment %o",t],s=e.parent||document;return up.emit(s,"up:fragment:destroyed",{fragment:t,parent:s,log:i})},emitKeep:function(t){let{oldElement:e,newElement:n,newData:i,renderOptions:r}=t;const o=["Keeping fragment %o",e],u=s.callbackAttr(e,"up-on-keep",{exposedKeys:["newFragment","newData"]});return up.emit(e,"up:fragment:keep",{newFragment:n,newData:i,renderOptions:r,log:o,callback:u})},successKey:function(t){let e=v.exec(t);if(e){let[t,n,s]=e;switch(n){case"onFail":return"on"+i.upperCaseFirst(s);case"fail":return i.lowerCaseFirst(s)}}},failKey:function(t){let e=v.exec(t);if(e){let[t,n,s]=e;switch(n){case"on":return"onFail"+i.upperCaseFirst(s);case void 0:return"fail"+i.upperCaseFirst(s)}}},expandTargets:x,resolveOrigin:C,toTarget:b,tryToTarget:y,isTargetable:function(t){return!!y(t)},matches:function(t,e,n={}){if(t=s.get(t),i.isElement(e)){let n=y(e);return n&&t.matches(n)}return new up.Selector(e,t,n).matches(t)},hasAutoHistory:function(t,n){let i=x(e.autoHistoryTargets,{layer:n}).join();for(let e of t)if(s.subtree(e,i).length)return!0;return up.puts("up.render()","Will not auto-update history because fragment doesn't contain a selector from up.fragment.config.autoHistoryTargets"),!1},time:o,etag:u,shouldRevalidate:function(t,n,s={}){return t.fromCache&&i.evalAutoOption(s.revalidate,e.autoRevalidate,n)},abort:function(...t){let e,n,s=g(t),{reason:r,newLayer:o}=s;if(s.target)n=d(s.target,s),e=t=>t.isPartOfSubtree(n),r||(r="Aborting requests within fragment");else{let t=up.layer.getAll(s);n=i.map(t,"element"),e=e=>i.contains(t,e.layer),r||(r="Aborting requests within "+t.join(", "))}up.network.abort((t=>t.abortable&&e(t)),Object.assign(Object.assign({},s),{reason:r}));for(let t of n)up.emit(t,"up:fragment:aborted",{reason:r,newLayer:o,log:!1})},onAborted:T,onFirstIntersect:function(t,e,{margin:n=0}={}){if(s.isIntersectingWindow(t,{margin:n}))return void e();let i=new IntersectionObserver((function(t){for(let n of t)if(n.isIntersecting)return r(),void e()}),{rootMargin:`${n}px`}),r=()=>i.disconnect();i.observe(t),T(t,r)},splitTarget:F,parseTargetSteps:function(t,e={}){var n;let i=e.defaultPlacement||"swap",s=null!==(n=e.defaultMaybe)&&void 0!==n&&n,r=[],o=F(t);for(let t of o){if(":none"===t)continue;let n=i,o=s;t=t.replace(/\b::?(before|after)\b/,((t,e)=>(n=e,""))),t=t.replace(/\b:maybe\b/,(()=>(o=!0,"")));const u=Object.assign(Object.assign({},e),{selector:t,placement:n,maybe:o,originalRenderOptions:e});r.push(u)}return r},isAlive:l,isNotDestroying:h,targetForSteps:function(t){let e=t.filter((t=>{var e;return!t.maybe||(null===(e=t.oldElement)||void 0===e?void 0:e.isConnected)}));return i.map(e,"selector").join(", ")||":none"},compressNestedSteps:function(t){if(t.length<2)return t;let e=i.uniqBy(t,"oldElement");return e=i.reject(e,(t=>function(t,e){return i.some(t,(function(t){return t!==e&&("swap"===t.placement||"content"===t.placement)&&t.oldElement.contains(e.oldElement)}))}(e,t))),e},containsMainPseudo:S}}(),up.reload=up.fragment.reload,up.destroy=up.fragment.destroy,up.render=up.fragment.render,up.navigate=up.fragment.navigate,up.visit=up.fragment.visit,i.delegate(up,["context"],(()=>up.layer.current))},9634:()=>{up.framework=function(){let t="evaling";function e(){if("configuring"!==t)return void console.error("Unpoly has already booted");let e=n();e?console.error("Unpoly cannot boot: %s",e):(t="booting",up.emit("up:framework:boot",{log:!1}),t="booted",up.emit("up:framework:booted",{log:!1}))}function n(){for(let t of["URL","Proxy","Promise","DOMParser","FormData"])if(!window[t])return`Browser doesn't support the ${t} API`;if("BackCompat"===document.compatMode)return"Browser is in quirks mode (missing DOCTYPE?)"}return{onEvaled:function(){up.emit("up:framework:evaled",{log:!1}),function(){let t=document.currentScript;return!!(null==t?void 0:t.async)||"manual"===(null==t?void 0:t.getAttribute("up-boot"))||"complete"===document.readyState||void 0}()?console.debug("Call up.boot() after you have configured Unpoly"):document.addEventListener("DOMContentLoaded",e),t="configuring"},boot:e,startExtension:function(){if("configuring"!==t)throw new Error("Unpoly extensions must be loaded before booting");t="evaling"},stopExtension:function(){t="configuring"},reset:function(){up.emit("up:framework:reset",{log:!1})},get evaling(){return"evaling"===t},get booted(){return"booted"===t},get beforeBoot(){return"booting"!==t&&"booted"!==t},isSupported:function(){return!n()}}}(),up.boot=up.framework.boot},8944:()=>{up.history=function(){const t=up.util,e=up.element,n=new up.Config((()=>({enabled:!0,updateMetaTags:!0,restoreTargets:["body"],metaTagSelectors:["meta","link[rel=alternate]","link[rel=canonical]","link[rel=icon]","[up-meta]",'script[type="application/ld+json"]'],noMetaTagSelectors:["meta[http-equiv]","[up-meta=false]","meta[name=csp-nonce]"]})));let i,s;const r={hash:!0};function o(e,n){return n=t.merge(r,n),t.normalizeURL(e,n)}function u(t){return o(location.href,t)}function c(){const t=u();s!==t&&(i=s,s=t)}c();const a={trailingSlash:!1};function h(e,n){return o(e,n=t.merge(a,n))===u(n)}function l(t,e={}){f("replaceState",t=o(t))&&!1!==e.event&&p({location:t,reason:"replace",log:`Replaced state for ${t}`})}function p(t){var e,n;let i=up.event.build("up:location:changed",t);null===(n=null===(e=up.migrate)||void 0===e?void 0:e.renamedProperty)||void 0===n||n.call(e,i,"url","location"),up.emit(i)}function f(t,e){if(n.enabled){const n={up:{}};return window.history[t](n,"",e),c(),!0}}function d(t){c();let e=u();p({location:e,reason:"pop",log:`Navigated to history entry ${e}`}),up.viewport.saveFocus({location:i}),up.viewport.saveScroll({location:i}),function(t){if(!(null==t?void 0:t.up))return void up.puts("popstate","Ignoring a history state not owned by Unpoly");let e=u();up.emit("up:location:restore",{location:e,log:`Restoring location ${e}`}).defaultPrevented||up.render({url:e,target:n.restoreTargets,fail:!1,history:!0,location:e,peel:!0,layer:"root",cache:!0,saveScroll:!1,scroll:["restore","auto"],saveFocus:!1,focus:["restore","auto"]})}(t.state)}function m(){window.addEventListener("popstate",d),"GET"===up.protocol.initialRequestMethod()&&l(u(),{event:!1})}function g(t=document.head){return t.querySelectorAll(n.selector("metaTagSelectors"))}return up.on("up:framework:boot",(function(){"jasmine"in window?m():setTimeout(m,100)})),up.macro("a[up-back], [up-href][up-back]",(function(t){i&&(e.setMissingAttrs(t,{"up-href":i,"up-scroll":"restore"}),t.removeAttribute("up-back"),up.link.makeFollowable(t))})),up.on("up:framework:reset",(function(){i=void 0,s=void 0,c()})),{config:n,push:function(t){!h(t=o(t))&&f("pushState",t)&&p({location:t,reason:"push",log:`Advanced to location ${t}`})},replace:l,get location(){return u()},get previousLocation(){return i},normalizeURL:o,isLocation:h,findMetaTags:g,updateMetaTags:function(t){let e=g();for(let t of e)t.remove();for(let e of t)document.head.append(e)},getLang:function(t=document){let{documentElement:e}=t;if(e.matches("html"))return t.documentElement.lang},updateLang:function(t){e.toggleAttr(e.root,"lang",t,!!t)}}}()},9443:function(t,e,n){var i=this&&this.D||function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{c(i.next(t))}catch(t){r(t)}}function u(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((i=i.apply(t,e||[])).next())}))};n(7921);const s=up.util,r=up.element;up.layer=function(){const t=[up.Layer.Root,up.Layer.Modal,up.Layer.Popup,up.Layer.Drawer,up.Layer.Cover],e=new up.Config((function(){const e={mode:"modal",any:{mainTargets:["[up-main='']","main",":layer"]},root:{mainTargets:["[up-main~=root]"],history:!0},overlay:{mainTargets:["[up-main~=overlay]"],openAnimation:"fade-in",closeAnimation:"fade-out",dismissLabel:"×",dismissAriaLabel:"Dismiss dialog",dismissable:!0,history:"auto"},cover:{mainTargets:["[up-main~=cover]"]},drawer:{mainTargets:["[up-main~=drawer]"],backdrop:!0,position:"left",size:"medium",openAnimation(t){switch(t.position){case"left":return"move-from-left";case"right":return"move-from-right"}},closeAnimation(t){switch(t.position){case"left":return"move-to-left";case"right":return"move-to-right"}}},modal:{mainTargets:["[up-main~=modal]"],backdrop:!0,size:"medium"},popup:{mainTargets:["[up-main~=popup]"],position:"bottom",size:"medium",align:"left",dismissable:"outside key"},foreignOverlaySelectors:["dialog"]};for(let n of t)e[n.mode].Class=n;return e}));let n=null,o=[];function u(t){return"root"===t?[e.root,e.any]:[e[t],e.overlay,e.any]}function c(t){return i(this,void 0,void 0,(function*(){return t=s.options(t,{layer:"new",defaultToEmptyContent:!0,navigate:!0}),(yield up.render(t)).layer}))}up.on("up:fragment:destroyed",(function(){n.sync()})),up.on("up:framework:evaled",(function(){n=new up.LayerStack})),up.on("up:framework:reset",(function(){n.reset(),o=s.filter(o,"isDefault")}));const a={config:e,mainTargets:function(t){return s.flatMap(u(t),"mainTargets")},open:c,build:function(t,i){var r;const{mode:o}=t,{Class:c}=e[o],a=s.reverse(u(o));let h=up.migrate.handleLayerConfig;return h&&a.forEach(h),null!==(r=t.openAnimation)&&void 0!==r||(t.openAnimation=s.pluckKey(t,"animation")),t=s.mergeDefined(...a,{mode:o,stack:n},t),i&&(t=i(t)),new c(t)},ask:function(t){return new Promise((function(e,n){c(t=Object.assign(Object.assign({},t),{onAccepted:t=>e(t.value),onDismissed:t=>n(t.value)}))}))},normalizeOptions:function(t){var i,r;if(null===(r=(i=up.migrate).handleLayerOptions)||void 0===r||r.call(i,t),s.isGiven(t.layer)){let n=String(t.layer).match(/^(new|shatter|swap)( (\w+))?/);if(n){t.layer="new";const i=n[1],s=n[3];t.mode||(t.mode=s||e.mode),"swap"===i?up.layer.isOverlay()&&(t.baseLayer="parent"):"shatter"===i&&(t.baseLayer="root")}}else t.mode?t.layer="new":s.isElementish(t.target)?t.layer=n.get(t.target,{normalizeLayerOptions:!1}):t.origin?t.layer="origin":t.layer="current";t.context||(t.context={}),t.baseLayer=n.get("current",Object.assign(Object.assign({},t),{normalizeLayerOptions:!1}))},openCallbackAttr:function(t,e){return r.callbackAttr(t,e,{exposedKeys:["layer"]})},closeCallbackAttr:function(t,e){return r.callbackAttr(t,e,{exposedKeys:["layer","value","response"]})},anySelector:function(){return s.map(t,(t=>t.selector())).join()},optionToString:function(t){return s.isString(t)?`layer "${t}"`:t.toString()},get stack(){return n.layers},isWithinForeignOverlay:function(t){let n=e.selector("foreignOverlaySelectors");return!(!n||!t.closest(n))}};return s.delegate(a,["get","getAll","root","overlays","current","front","sync","count","dismissOverlays"],(()=>n)),s.delegate(a,["accept","dismiss","isRoot","isOverlay","isFront","on","off","emit","parent","history","location","mode","context","element","contains","size","affix"],(()=>n.current)),a}()},3849:(t,e,n)=>{n(7298),up.link=function(){const t=up.util,e=up.element;let n=null;const i=["a[up-content]","a[up-fragment]","a[up-document]"],s=["a[href]","[up-href]"],r=["[up-follow]","[up-target]","[up-layer]","[up-transition]","[up-preload]","[up-instant]","[up-href]"];function o(e,n){return t.flatMap(e,(t=>n.map((e=>t+e))))}const u=new up.Config((()=>({followSelectors:o(s,r).concat(i),noFollowSelectors:["[up-follow=false]","a[download]","a[target]",'a[href^="#"]:not([up-content]):not([up-fragment]):not([up-document])','a[href^="javascript:"]','a[href^="mailto:"]',e.crossOriginSelector("href"),e.crossOriginSelector("up-href")],instantSelectors:["[up-instant]"],noInstantSelectors:["[up-instant=false]","[onclick]"],preloadSelectors:o(s,["[up-preload]"]),noPreloadSelectors:["[up-preload=false]"],clickableSelectors:i.concat(["[up-emit]","[up-accept]","[up-dismiss]","[up-clickable]"]),preloadDelay:90}))),c=up.mockable((function(t,e,n){return up.render(h(t,e,n))}));function a(e,n,i){n=t.options(n);const s=new up.OptionsParser(e,n,Object.assign(Object.assign({},i),{fail:!1}));return n.url=function(t,e={}){const n=e.url||t.getAttribute("up-href")||t.getAttribute("href");if("#"!==n)return n}(e,n),n.method=p(e,n),s.json("headers"),s.json("params"),s.booleanOrString("cache"),s.booleanOrString("expireCache"),s.booleanOrString("evictCache"),s.booleanOrString("revalidate"),s.booleanOrString("abort"),s.boolean("abortable"),s.boolean("background"),s.string("contentType"),s.number("badResponseTime"),s.number("timeout"),n}function h(e,n,i){var s;e=up.fragment.get(e),n=t.options(n);const r=new up.OptionsParser(e,n,Object.assign({fail:!0},i));return r.include(a),r.boolean("feedback"),n.origin||(n.origin=e),r.boolean("fail"),r.boolean("navigate",{default:!0}),r.string("confirm",{attr:["up-confirm","data-confirm"]}),r.string("target"),r.booleanOrString("fallback"),r.string("match"),r.string("content"),r.string("fragment"),r.string("document"),r.boolean("useKeep"),r.boolean("useHungry"),r.callback("onLoaded"),r.callback("onRendered",{mainKey:"result"}),r.callback("onFinished",{mainKey:"result"}),r.callback("onOffline",{mainKey:"error"}),r.callback("onError",{mainKey:"error"}),r.boolean("peel"),r.string("layer"),r.string("baseLayer"),r.json("context"),r.string("mode"),r.string("align"),r.string("position"),r.string("class"),r.string("size"),r.booleanOrString("dismissable"),r.parse(up.layer.openCallbackAttr,"onOpened"),r.parse(up.layer.closeCallbackAttr,"onAccepted"),r.parse(up.layer.closeCallbackAttr,"onDismissed"),r.string("acceptEvent"),r.string("dismissEvent"),r.string("acceptLocation"),r.string("dismissLocation"),r.booleanOrString("history"),r.booleanOrString("focus"),r.boolean("saveScroll"),r.boolean("saveFocus"),r.booleanOrString("scroll"),r.boolean("revealTop"),r.number("revealMax"),r.number("revealPadding"),r.number("revealSnap"),r.string("scrollBehavior"),r.booleanOrString("history"),r.booleanOrString("location"),r.booleanOrString("title"),r.boolean("metaTags"),r.booleanOrString("lang"),r.include(up.motion.motionOptions),null!==(s=n.guardEvent)&&void 0!==s||(n.guardEvent=up.event.build("up:link:follow",{log:["Following link %o",e]})),n}function l(t,e){let n=function(t){if(!b(t))return"Will not preload an unsafe link"}(t=up.fragment.get(t));if(n)return Promise.reject(new up.Error(n));const i=up.event.build("up:link:preload",{log:["Preloading link %o",t]});return c(t,Object.assign(Object.assign({abortable:!1},e),{guardEvent:i,preload:!0}))}function p(e,n={}){return t.normalizeMethod(n.method||e.getAttribute("up-method")||e.getAttribute("data-method"))}function f(t){return t=up.fragment.get(t),u.matches(t,"followSelectors")}function d(t){f(t)||t.setAttribute("up-follow","")}function m(t,e){if(t.defaultPrevented)return!1;const n=`a, [up-href], ${up.form.fieldSelector()}`,i=t.target.closest(n);return!i||i===e}function g(t){const e=t.closest(u.selector("instantSelectors"));return e&&(n=e,!(u.matches(n,"noInstantSelectors")||u.matches(n,"noFollowSelectors")));var n}function v(t){let e=["clientX","clientY","button",...up.event.keyModifiers];const n=up.event.fork(t,"up:click",e);up.emit(t.target,n,{log:!1})}function b(t){const e=p(t);return up.network.isSafeMethod(e)}function y(t,n,i){switch(t){case"insert":i();break;case"reveal":{let t=e.numberAttr(n,"up-intersect-margin");up.fragment.onFirstIntersect(n,i,{margin:t});break}case"hover":new up.LinkFollowIntent(n,i)}}function w(t,e){let n=up.event.build("up:deferred:load",{log:["Loading deferred %o",t]}),i=Object.assign({navigate:!1,guardEvent:n},e);return c(t,i,{defaults:{target:":origin",cache:"auto",revalidate:"auto",feedback:!0}})}return up.macro(u.selectorFn("clickableSelectors"),(function(t){if(t.matches("a[href], button"))return;let n=t.matches("a")?"link":"button";e.setMissingAttrs(t,{tabindex:"0",role:n,"up-clickable":""}),t.addEventListener("keydown",(function(t){if("Enter"===t.key||"Space"===t.key)return v(t)}))})),up.attribute("up-defer",{defaultValue:"insert"},(function(t,e){y(e,t,(()=>up.error.muteUncriticalRejection(w(t))))})),up.on("up:click",u.selectorFn("followSelectors"),(function(t,e){m(t,e)&&(up.event.halt(t,{log:!0}),up.focus(e,{preventScroll:!0}),up.error.muteUncriticalRejection(c(e)))})),up.attribute("up-expand",{defaultValue:"a, [up-href]",macro:!0},(function(t,n){let i=e.get(t,n);i&&(e.setMissingAttrs(t,Object.assign({"up-href":e.attr(i,"href")},e.upAttrs(i))),t.classList.add(...e.upClasses(i)),d(t))})),up.compiler(u.selectorFn("preloadSelectors"),(function(t){var n;if(!function(t){return!up.browser.canPushState()||!f(t)||!function(t){const e=a(t);if(e.url)return null==e.cache&&(e.cache="auto"),e.basic=!0,new up.Request(e).willCache()}(t)}(t)){let i=()=>up.error.muteUncriticalRejection(l(t));y(null!==(n=e.booleanOrStringAttr(t,"up-preload",null))&&void 0!==n?n:"hover",t,i)}})),up.on("up:framework:reset",(function(){n=null})),{follow:c,followOptions:h,preload:l,makeFollowable:d,isSafe:b,isFollowable:f,shouldFollowEvent:m,convertClicks:function(t){t.on("click",(function(e,i){if(up.event.isUnmodified(e))return g(i)&&n?up.event.halt(e):t.wasHitByMouseEvent(e)&&(!n||n===e.target)&&v(e),n=null})),t.on("mousedown",(function(t,e){up.event.isUnmodified(t)&&(n=t.target,g(e)&&v(t))}))},config:u,combineFollowableSelectors:o,loadDeferred:w}}(),up.follow=up.link.follow,up.deferred={load:up.link.loadDeferred}},4453:()=>{up.log=function(){const t=up.util,e=new up.LogConfig;function n(t,e,n,...s){i(t,e,"",n,...s)}function i(n,i,s,r,...o){r&&(e.format?console[n](`%c${i}%c ${r}`,"color: #666666; padding: 1px 3px; border: 1px solid #bbbbbb; border-radius: 2px; font-size: 90%; display: inline-block;"+s,"",...o):console[n](`[${i}] ${t.sprintf(r,...o)}`))}return up.on("up:framework:boot",(function(){if(!e.banner)return;const t=` __ _____ ___ ___ / /_ __\n/ // / _ \\/ _ \\/ _ \\/ / // / ${up.version}\n\\___/_//_/ .__/\\___/_/\\_. / \n / / / /\n\n`;let n="";up.migrate.loaded||(n+="Load unpoly-migrate.js to polyfill deprecated APIs.\n\n"),e.enabled?n+="Call `up.log.disable()` to disable logging for this session.":n+="Call `up.log.enable()` to enable logging for this session.";const i="color: #777777";e.format?console.log("%c"+t+"%c"+n,"font-family: monospace;"+i,i):console.log(t+n)})),{puts:function(...t){e.enabled&&n("log",...t)},putsEvent:function(t){if(e.enabled){let e="#5566cc";i("log",(t=t.originalEvent||t).type,`color: white; border-color: ${e}; background-color: ${e}`,"Interaction on %o",t.target)}},error:(...t)=>n("error",...t),warn:(...t)=>n("warn",...t),config:e,enable:function(){e.enabled=!0},disable:function(){e.enabled=!1}}}(),up.puts=up.log.puts,up.warn=up.log.warn},6535:()=>{up.migrate={config:{}}},8374:()=>{up.mockable=function(t){if(window.jasmine){let e=t.name,n={[e]:t},i=function(){return n[e].apply(this,arguments)};return i.mock=()=>spyOn(n,e),i}return t}},4034:function(){var t=this&&this.D||function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{c(i.next(t))}catch(t){r(t)}}function u(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((i=i.apply(t,e||[])).next())}))};up.motion=function(){const e=up.util,n=up.element;let i={},s={};const r=new up.MotionController("motion"),o=new up.Config((()=>({duration:175,easing:"ease",enabled:!matchMedia("(prefers-reduced-motion: reduce)").matches})));function u(t){return e.pickBy(t,"isDefault")}function c(){return o.enabled}function a(t,e,i){return l(i),c()&&!b(e)&&i.duration>0&&!n.isSingleton(t)}function h(t,e,n){return n=Object.assign(Object.assign({},n),{finishEvent:r.finishEvent}),new up.CSSTransition(t,e,n).start()}function l(t){var e,n;null!==(e=t.easing)&&void 0!==e||(t.easing=o.easing),null!==(n=t.duration)&&void 0!==n||(t.duration=o.duration)}function p(t){if(!b(t)){if(e.isFunction(t))return t;if(e.isArray(t))return f(...t);if(e.isString(t)){let e;if(t.indexOf("/")>=0)return f(...t.split("/"));if(e=s[t])return p(e)}else up.fail("Unknown transition %o",t)}}function f(t,n){if(!b(t)&&!b(n)){const i=d(t)||e.asyncNoop,s=d(n)||e.asyncNoop;return(t,e,n)=>Promise.all([i(t,n),s(e,n)])}}function d(t){var n;if(!b(t))return e.isFunction(t)?t:e.isString(t)?i[n=t]||up.fail("Unknown animation %o",n):e.isOptions(t)?(e,n)=>h(e,t,n):void up.fail("Unknown animation %o",t)}const m=up.mockable((function(t,e){t.replaceWith(e)}));function g(t,e){const n=p(e);n.isDefault=up.framework.evaling,s[t]=n}function v(t,e){const n=d(e);n.isDefault=up.framework.evaling,i[t]=n}function b(t){return!t||"none"===t}function y(t,e,i){v(t,(function(t,s){return t.style.opacity=0,n.setStyle(t,{opacity:e}),h(t,{opacity:i},s)}))}function w(t,e){return{transform:`translate(${t}px, ${e}px)`}}function _(t){return n.setStyle(t,{transform:null}),t.getBoundingClientRect()}function O(t,e){const i=`move-from-${t}`;v(`move-to-${t}`,(function(t,n){const i=_(t);return h(t,e(i),n)})),v(i,(function(t,i){const s=_(t),r=e(s);return n.setStyle(t,r),h(t,{transform:null},i)}))}return up.on("up:framework:boot",(function(){c()||up.puts("up.motion","Animations are disabled")})),y("fade-in",0,1),y("fade-out",1,0),O("top",(function(t){return w(0,-(t.top+t.height))})),O("bottom",(function(t){return w(0,up.viewport.rootHeight()-t.top)})),O("left",(function(t){return w(-(t.left+t.width),0)})),O("right",(function(t){return w(up.viewport.rootWidth()-t.left,0)})),g("cross-fade",["fade-out","fade-in"]),g("move-left",["move-to-left","move-from-right"]),g("move-right",["move-to-right","move-from-left"]),g("move-up",["move-to-top","move-from-bottom"]),g("move-down",["move-to-bottom","move-from-top"]),up.on("up:framework:reset",(function(){r.reset(),i=u(i),s=u(s)})),{morph:function(i,s,o,u){l(u=e.options(u)),i=up.fragment.get(i),s=up.fragment.get(s);let c=p(o);const h=a(i,c,u);c=up.error.guardFn(c);const f=e.pluckKey(u,"beforeStart")||e.noop,d=e.pluckKey(u,"afterInsert")||e.noop,g=e.pluckKey(u,"beforeDetach")||e.noop,v=e.pluckKey(u,"afterDetach")||e.noop,b=e.pluckKey(u,"scrollNew")||e.noop;if(f(),h){if(r.isActive(i)&&!1===u.trackMotion)return c(i,s,u);up.puts("up.morph()","Morphing %o to %o with transition %O over %d ms",i,s,o,u.duration);const e=up.viewport.get(i),a=e.scrollTop,h=up.viewport.absolutize(i,{afterMeasure(){n.insertBefore(i,s),d()}}),l=function(){return t(this,void 0,void 0,(function*(){b();const t=e.scrollTop;h.moveBounds(0,t-a),yield c(i,s,u),g(),h.bounds.remove(),v()}))};return r.startFunction([i,s],l,u)}return g(),m(i,s),d(),v(),b(),Promise.resolve()},animate:function(t,i,s){t=up.fragment.get(t),s=e.options(s);let o=d(i);const u=a(t,i,s);if(o=up.error.guardFn(o),u){const e=()=>o(t,s);return r.startFunction(t,e,s)}return function(t,i){return e.isOptions(i)&&n.setStyle(t,i),Promise.resolve()}(t,i)},finish:function(t){return r.finish(t)},finishCount:()=>r.finishCount,transition:g,animation:v,config:o,isEnabled:c,isNone:b,willAnimate:a,swapElementsDirectly:m,motionOptions:function(t,n,i){n=e.options(n);let s=new up.OptionsParser(t,n,i);return s.booleanOrString("animation"),s.booleanOrString("transition"),s.string("easing"),s.number("duration"),n}}}(),up.transition=up.motion.transition,up.animation=up.motion.animation,up.morph=up.motion.morph,up.animate=up.motion.animate},1647:(t,e,n)=>{n(2903);const i=up.util;up.network=function(){const t=new up.Config((()=>({concurrency:6,wrapMethod:!0,cacheSize:70,cacheExpireAge:15e3,cacheEvictAge:54e5,badResponseTime:400,fail:t=>(t.status<200||t.status>299)&&304!==t.status,autoCache:t=>t.isSafe(),expireCache:(t,e)=>!t.isSafe(),evictCache:!1,progressBar:!0,timeout:9e4}))),e=new up.Request.Queue,n=new up.Request.Cache;let s=null;function r(s){(function(t){let i;if(t.willCache()&&(i=n.get(t)))return up.puts("up.request()","Re-using previous request to %s",t.description),t.background||e.promoteToForeground(i),i.mergeIfUnsent(t),n.track(i,t,{onIncompatible:r}),!0})(s)||function(s){(function(e){e.willCache()&&(n.put(e),e.onLoading=()=>n.reindex(e)),i.always(e,(function(s){var r,o,u,c;let a=null!==(o=null!==(r=s.expireCache)&&void 0!==r?r:e.expireCache)&&void 0!==o?o:i.evalOption(t.expireCache,e,s);a&&n.expire(a,{except:e});let h=null!==(c=null!==(u=s.evictCache)&&void 0!==u?u:e.evictCache)&&void 0!==c?c:i.evalOption(t.evictCache,e,s);h&&n.evict(h,{except:e});let l=n.get(e),p=s instanceof up.Response,f=!p,d=p&&s.ok,m=p&&!s.ok,g=p&&s.none;m?n.evict(e.url):f||g?n.evict(e):d&&l&&n.put(e)}))})(s),e.asap(s)}(s)}function o(...t){var n,i;null===(i=(n=up.migrate).preprocessAbortArgs)||void 0===i||i.call(n,t),e.abort(...t)}return up.on("up:network:late",(function(){i.evalOption(t.progressBar)&&(s=new up.ProgressBar)})),up.on("up:network:recover",(function(){null==s||s.conclude()})),up.on("up:framework:reset",(function(){o(),e.reset(),n.reset(),null==s||s.destroy(),s=null})),{request:function(...t){const e=function(t){var e,n;const s=i.extractOptions(t);return s.url||(s.url=t[0]),null===(n=(e=up.migrate).handleRequestOptions)||void 0===n||n.call(e,s),s}(t),n=new up.Request(e);return r(n),n},cache:n,isBusy:function(){return e.isBusy()},isSafeMethod:function(t){return i.contains(["GET","OPTIONS","HEAD"],i.normalizeMethod(t))},config:t,abort:o,registerAliasForRedirect:function(t,e){if(t.cache&&e.url&&t.url!==e.url){const s=i.variant(t,{method:e.method,url:e.url,cacheRoute:null});n.alias(t,s)}},queue:e,loadPage:function(t){new up.Request(t).loadPage()}}}(),up.request=up.network.request,up.cache=up.network.cache},3535:()=>{up.protocol=function(){const t=up.util,e=up.element,n=function(t){return"X-Up"+t.replace(/(^.|[A-Z])/g,(t=>"-"+t.toUpperCase()))},i=function(e,i,s=t.identity){let r=e.getResponseHeader(n(i));if(r)return s(r)};function s(t){return"false"!==t&&t}const r=t.memoize((function(){return t.normalizeMethod(up.browser.popCookie("_up_method"))})),o=new up.Config((()=>({methodParam:"_method",csrfParam:()=>e.metaContent("csrf-param"),csrfToken:()=>e.metaContent("csrf-token"),cspNonce:()=>e.metaContent("csp-nonce"),csrfHeader:"X-CSRF-Token",maxHeaderSize:2048})));return{config:o,locationFromXHR:function(t){return i(t,"location")||t.responseURL},titleFromXHR:function(t){var e,n,s;return null!==(s=null===(n=(e=up.migrate).titleFromXHR)||void 0===n?void 0:n.call(e,t))&&void 0!==s?s:i(t,"title",JSON.parse)},targetFromXHR:function(t){return i(t,"target")},methodFromXHR:function(e){return i(e,"method",t.normalizeMethod)},acceptLayerFromXHR:function(t){return i(t,"acceptLayer",JSON.parse)},contextFromXHR:function(t){return i(t,"context",JSON.parse)},dismissLayerFromXHR:function(t){return i(t,"dismissLayer",JSON.parse)},eventPlansFromXHR:function(t){return i(t,"events",JSON.parse)},expireCacheFromXHR:function(t){var e,n;return i(t,"expireCache")||(null===(n=(e=up.migrate).clearCacheFromXHR)||void 0===n?void 0:n.call(e,t))},evictCacheFromXHR:function(t){return i(t,"evictCache",s)},csrfHeader:function(){return t.evalOption(o.csrfHeader)},csrfParam:function(){return t.evalOption(o.csrfParam)},csrfToken:function(){return t.evalOption(o.csrfToken)},cspNonce:function(){return t.evalOption(o.cspNonce)},initialRequestMethod:r,headerize:n,wrapMethod:function(t,e){return e.add(o.methodParam,t),"POST"},cspNoncesFromHeader:function(t){let e=[];if(t){let n=t.split(/\s*;\s*/);for(let t of n)if(0===t.indexOf("script-src")){let n,i=/'nonce-([^']+)'/g;for(;n=i.exec(t);)e.push(n[1])}}return e}}}()},9615:()=>{up.radio=function(){const t=up.element,e=new up.Config((()=>({hungrySelectors:["[up-hungry]"],noHungrySelectors:["[up-hungry=false]"],pollInterval:3e4})));return up.attribute("up-poll",(function(t){up.FragmentPolling.forFragment(t).onPollAttributeObserved()})),up.macro("[up-flashes]",(function(e){t.setMissingAttrs(e,{"up-hungry":"","up-if-layer":"subtree","up-keep":"",role:"alert"}),e.addEventListener("up:fragment:keep",(function(e){t.isEmpty(e.newFragment)||e.preventDefault()}))})),{config:e,hungrySteps:function(n){let{useHungry:i,origin:s,layer:r}=n,o={current:[],other:[]};if(!i)return o;let u=e.selector("hungrySelectors");const c=[r,...r.ancestors,...r.descendants];for(let e of c){let i=up.fragment.all(e.element,u,{layer:e});for(let u of i){let i=up.fragment.tryToTarget(u,{origin:s});if(!i){up.warn("[up-hungry]","Ignoring untargetable fragment %o",u);continue}let c=t.attr(u,"up-if-layer"),a=c?up.layer.getAll(c,{baseLayer:e}):[e],h=up.motion.motionOptions(u),l=up.event.build("up:fragment:hungry",{log:!1}),p=t.callbackAttr(u,"up-on-hungry",{exposedKeys:["newFragment","renderOptions"]}),f=Object.assign(Object.assign({selector:i,oldElement:u,layer:e,origin:s},h),{placement:"swap",useKeep:!0,maybe:!0,selectEvent:l,selectCallback:p,originalRenderOptions:n});a.includes(r)&&(r===e?o.current:o.other).push(f)}}return o.other=up.fragment.compressNestedSteps(o.other),o},startPolling:function(t,e={}){up.FragmentPolling.forFragment(t).forceStart(e)},stopPolling:function(t){up.FragmentPolling.forFragment(t).forceStop()},pollOptions:function(t,n={}){const i=new up.OptionsParser(t,n);return i.number("interval",{default:e.pollInterval}),i.string("ifLayer",{default:"front"}),n}}}()},6774:()=>{!function(){const t=up.element;for(let e of["method","confirm"]){const n=`up-${e}`,i=`data-${e}`;up.macro(`a[${i}]`,(function(e){var s;(window.Rails||(null===(s=window.jQuery)||void 0===s?void 0:s.rails))&&up.link.isFollowable(e)&&(t.setMissingAttr(e,n,e.getAttribute(i)),e.removeAttribute(i))}))}}()},1897:()=>{up.script=function(){const t=up.util,e=up.element,n=new up.Config((()=>({assetSelectors:["link[rel=stylesheet]","script[src]","[up-asset]"],noAssetSelectors:["[up-asset=false]"],nonceableAttributes:["up-watch","up-on-accepted","up-on-dismissed","up-on-loaded","up-on-rendered","up-on-finished","up-on-error","up-on-offline"],scriptSelectors:["script"],noScriptSelectors:['script[type="application/ld+json"]']}))),i={"[up-back]":-100,"[up-content]":-200,"[up-drawer]":-200,"[up-modal]":-200,"[up-cover]":-200,"[up-popup]":-200,"[up-tooltip]":-200,"[up-dash]":-200,"[up-flashes]":-200,"[up-expand]":-300,"[data-method]":-400,"[data-confirm]":-400};let s=[],r=[];function o(e,n={}){let o=function(e,n){let[i,s,r]=u(e);return s=t.options(s,{selector:i,isDefault:up.framework.evaling,priority:0,batch:!1}),Object.assign(r,s,n)}(e,n);o.macro?(up.framework.evaling&&(o.priority||(o.priority=function(e){e=t.evalOption(e);for(let t in i)if(e.indexOf(t)>=0)return i[t];up.fail("Unregistered priority for system macro %o",e)}(o.selector))),c(r,o)):c(s,o)}const u=function(e){const n=t.extractOptions(e),i=e.shift(),s=e.pop();return[i,Object.assign(Object.assign({},n),t.extractOptions(e)),s]};function c(t,e){let n,i=0;for(;(n=t[i])&&n.priority>=e.priority;)i+=1;if(t.splice(i,0,e),up.framework.booted)if(0===e.priority)for(let t of up.layer.stack)a(t.element,{layer:t,compilers:[e]});else up.puts("up.compiler()","Compiler %s was registered after booting Unpoly. Compiler will run for future fragments only.",e.selector);return e}function a(t,e){up.emit(t,"up:fragment:compile",{log:!1});let n=e.compilers||r.concat(s);new up.CompilerPass(t,n,e).run()}function h(t=document.head){return t.querySelectorAll(n.selector("assetSelectors"))}function l(t){t.type="up-disabled-script"}return up.on("up:framework:reset",(function(){s=t.filter(s,"isDefault"),r=t.filter(r,"isDefault")})),{config:n,compiler:function(...t){o(t)},macro:function(...t){o(t,{macro:!0})},attrCompiler:function(...t){let[n,i,s]=u(t);o([`[${n}]`,i,t=>{let r=e.booleanOrStringAttr(t,n,i.defaultValue);if(r)return s(t,r)}])},destructor:function(e,n){let i=e.upDestructors;i||(i=[],e.upDestructors=i,e.classList.add("up-can-clean")),t.isArray(n)?i.push(...n):i.push(n)},hello:function(t,e={}){return t=up.fragment.get(t,e),up.puts("up.hello()","Compiling fragment %o",t),a(t,e),up.fragment.emitInserted(t),t},clean:function(t,e={}){new up.DestructorPass(t,e).run()},data:function(e){return(e=up.fragment.get(e)).upData||(e.upData=function(e){if(!e.getAttribute)return{};let n,i=e.getAttribute("up-data");return i&&(n=JSON.parse(i),!t.isOptions(n))?n:Object.assign(Object.assign(Object.assign({},e.dataset),n),e.upCompileData)}(e))},findAssets:h,assertAssetsOK:function(e,n){let i=h();t.map(i,"outerHTML").join()!==t.map(e,"outerHTML").join()&&up.event.assertEmitted("up:assets:changed",{oldAssets:i,newAssets:e,renderOptions:n})},disableSubtree:function(i){let s=n.selector("scriptSelectors");t.each(e.subtree(i,s),l)}}}(),up.compiler=up.script.compiler,up.destructor=up.script.destructor,up.macro=up.script.macro,up.data=up.script.data,up.hello=up.script.hello,up.attribute=up.script.attrCompiler},7924:()=>{up.util=function(){function t(){}const e={host:"cross-domain"};function n(t,n){n=R(n,e);const i=o(t);let s="";"cross-domain"===n.host&&(n.host=r(i)),n.host&&(s+=i.protocol+"//"+i.host);let{pathname:u}=i;return!1===n.trailingSlash&&"/"!==u&&(u=u.replace(/\/$/,"")),s+=u,!1!==n.search&&(s+=i.search),!1!==n.hash&&(s+=i.hash),s}const i=location.protocol,s=location.hostname;function r(t){if(b(t)&&-1===t.indexOf("//"))return!1;const e=o(t);return s!==e.hostname||i!==e.protocol}function o(t){if(t.pathname)return t;let e=document.createElement("a");return e.href=t,e}function u(t){return b(t)?e=>e[t]:t}function c(t,e){if(0===t.length)return[];e=u(e);let n=[],i=0;for(let s of t)n.push(e(s,i++));return n}function a(t,e){let n=0;for(let i of t)e(i,n++)}function h(t){return null===t}function l(t){return void 0===t}const p=Z(l);function f(t){return l(t)||h(t)}const d=Z(f);function m(t){return!!f(t)||(_(t)&&t[m.key]?t[m.key]():b(t)||E(t)?0===t.length:!!w(t)&&0===Object.keys(t).length)}m.key="up.util.isBlank";const g=Z(m);function v(t){return"function"==typeof t}function b(t){return"string"==typeof t||t instanceof String}function y(t){return"number"==typeof t||t instanceof Number}function w(t){return"object"==typeof t&&!h(t)&&(l(t.constructor)||t.constructor===Object)}function _(t){const e=typeof t;return"object"===e&&!h(t)||"function"===e}function O(t){return t instanceof Element}function k(t){return t instanceof RegExp}function S(t){return up.browser.canJQuery()&&t instanceof jQuery}const{isArray:x}=Array;function E(t){return x(t)||function(t){return t instanceof NodeList}(t)||function(t){return"[object Arguments]"===Object.prototype.toString.call(t)}(t)||S(t)||function(t){return t instanceof HTMLCollection}(t)}function j(t){return E(t)?t:f(t)?[]:[t]}function C(t){return _(t)&&t[C.key]?t=t[C.key]():E(t)?t=F(t):w(t)&&(t=Object.assign({},t)),t}function F(t){return Array.prototype.slice.call(t)}function T(...t){return Object.assign({},...t)}function R(t,e){return e?T(e,t):t?C(t):{}}function P(t,e){e=u(e);let n=0;for(let i of t){const t=e(i,n++);if(t)return t}}function A(t,e){e=u(e);let n=!0,i=0;for(let s of t)if(!e(s,i++)){n=!1;break}return n}function L(t){return $(t,d)}function $(t,e){e=u(e);const n=[];return a(t,(function(t,i){if(e(t,i))return n.push(t)})),n}function D(t){return t[t.length-1]}function M(t,e){return(t.indexOf||Array.prototype.indexOf).call(t,e)>=0}function H(t,e){const n={};for(let i of e)i in t&&(n[i]=t[i]);return n}function N(t,e){e=u(e);const n={};for(let i in t)e(t[i],i,t)&&(n[i]=t[i]);return n}function q(t,...e){return v(t)?t(...e):t}C.key="up.util.copy",Date.prototype[C.key]=function(){return new Date(+this)};const U={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"};function B(t,e){const n=t[e];return delete t[e],n}function z(t,e){if(e(D(t)))return t.pop()}function I(t){return z(t,w)||{}}function K(t){return t}function V(t){const e=[];for(let n of t)E(n)?e.push(...n):e.push(n);return e}function X(t,e){if((null==t?void 0:t.valueOf)&&(t=t.valueOf()),(null==e?void 0:e.valueOf)&&(e=e.valueOf()),typeof t!=typeof e)return!1;if(E(t)&&E(e))return W(t,e);if(_(t)&&t[X.key])return t[X.key](e);if(w(t)&&w(e)){const n=Object.keys(t);return!!W(n,Object.keys(e))&&A(n,(n=>X(t[n],e[n])))}return t===e}function W(t,e){return t.length===e.length&&A(t,((t,n)=>X(t,e[n])))}X.key="up.util.isEqual";const J={"space/or":/\s+(?:or\s+)?/,or:/\s+or\s+/,comma:/\s*,\s*/};let G=0;function Q(t,e="%o"){let n;if("%c"===e)return"";if("%s"===e&&d(t)&&(t=t.toString()),b(t))n=t.trim().replace(/[\n\r\t ]+/g," "),"%o"===e&&(n=JSON.stringify(n));else if(l(t))n="undefined";else if(y(t)||v(t))n=t.toString();else if(x(t))n=`[${c(t,Q).join(", ")}]`;else if(S(t))n=`$(${c(t,Q).join(", ")})`;else if(O(t)){n=`<${t.tagName.toLowerCase()}`;for(let e of["id","up-id","name","class"]){let i=t.getAttribute(e);i&&(n+=` ${e}="${i}"`)}n+=">"}else if(k(t)||t instanceof Error)n=t.toString();else try{n=JSON.stringify(t)}catch(t){if("TypeError"!==t.name)throw t;n="(circular structure)"}return n.length>200&&(n=`${n.substr(0,200)}…${D(n)}`),n}const Y=/%[oOdisfc]/g;function Z(t){return function(...e){return!t(...e)}}function tt(t){if(t.error)throw t.error;return t.value}function et(t,e,n){try{return{value:t.apply(e,n)}}catch(t){return{error:t}}}return{parseURL:o,normalizeURL:n,matchURLs:function(t,e){return n(t)===n(e)},normalizeMethod:function(t){return t?t.toUpperCase():"GET"},methodAllowsPayload:function(t){return"GET"!==t&&"HEAD"!==t},copy:C,merge:T,mergeDefined:function(...t){const e={};for(let n of t)if(n)for(let t in n){const i=n[t];p(i)&&(e[t]=i)}return e},options:R,parseArgIntoOptions:function(t,e){let n=I(t);return p(t[0])&&(n=C(n),n[e]=t[0]),n},each:a,map:c,flatMap:function(t,e){return V(c(t,e))},mapObject:function(t,e){return c(t,e).reduce((function(t,e){return t[e[0]]=e[1],t}),{})},findResult:P,some:function(t,e){return!!P(t,e)},every:A,find:function(t,e){let n;e=u(e);for(let i of t)if(e(i)){n=i;break}return n},filter:$,reject:function(t,e){return $(t,e=Z(u(e)))},intersect:function(t,e){return $(t,(t=>M(e,t)))},compact:L,compactObject:function(t){return N(t,d)},uniq:function(t){return t.length<2?t:Array.from(new Set(t))},uniqBy:function(t,e){if(t.length<2)return t;e=u(e);const n=new Set;return $(t,(function(t,i){const s=e(t,i);return!n.has(s)&&(n.add(s),!0)}))},last:D,isNull:h,isDefined:p,isUndefined:l,isGiven:d,isMissing:f,isPresent:g,isBlank:m,presence:function(t,e=g){if(e(t))return t},isObject:_,isFunction:v,isString:b,isBoolean:function(t){return"boolean"==typeof t||t instanceof Boolean},isNumber:y,isElement:O,isJQuery:S,isElementish:function(t){var e;return!(!t||!t.addEventListener&&!(null===(e=t[0])||void 0===e?void 0:e.addEventListener))},isPromise:function(t){return _(t)&&v(t.then)},isOptions:w,isArray:x,isFormData:function(t){return t instanceof FormData},isList:E,isRegExp:k,timer:function(t,e){return setTimeout(e,t)},contains:M,containsAll:function(t,e){return A(e,(e=>M(t,e)))},objectContains:function(t,e){return X(e,H(t,Object.keys(e)))},toArray:function(t){return x(t)?t:F(t)},pick:H,pickBy:N,omit:function(t,e){return N(t,((t,n)=>!M(e,n)))},unresolvablePromise:function(){return new Promise(t)},remove:function(t,e){const n=t.indexOf(e);if(n>=0)return t.splice(n,1),e},memoize:function(t){let e,n;return function(...i){return n?e:(n=!0,e=t.apply(this,i))}},pluckKey:B,renameKey:function(t,e,n){return t[n]=B(t,e)},extractOptions:I,extractCallback:function(t){return z(t,v)},noop:t,asyncNoop:function(){return Promise.resolve()},identity:K,escapeHTML:function(t){return t.replace(/[&<>"']/g,(t=>U[t]))},escapeRegExp:function(t){return t.replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")},sequence:function(t){return t=L(t),(...e)=>c(t,(t=>t(...e)))},evalOption:q,evalAutoOption:function(t,e,...n){return"auto"===(t=q(t,...n))&&(t=q(e,...n)),t},flatten:V,newDeferred:function(){let t,e;const n=new Promise((function(n,i){t=n,e=i}));return n.resolve=t,n.reject=e,n},always:function(t,e=K){return t.then(e,e)},isBasicObjectProperty:function(t){return Object.prototype.hasOwnProperty(t)},isCrossOrigin:r,task:function(t){return setTimeout(t)},isEqual:X,parseTokens:function(t,e={}){if(b(t)){if(t=t.trim(),e.json&&/^\[.*]$/.test(t))return JSON.parse(t);{let n=e.separator||"space/or",i=J[n];return t.split(i)}}return j(t)},wrapList:j,wrapValue:function(t,...e){return e[0]instanceof t?e[0]:new t(...e)},uid:function(){return G++},upperCaseFirst:function(t){return t[0].toUpperCase()+t.slice(1)},lowerCaseFirst:function(t){return t[0].toLowerCase()+t.slice(1)},delegate:function(t,e,n){for(let i of e)Object.defineProperty(t,i,{get(){const t=n.call(this);let e=t[i];return v(e)&&(e=e.bind(t)),e},set(t){n.call(this)[i]=t}})},reverse:function(t){return C(t).reverse()},camelToKebabCase:function(t){return t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))},replaceValue:function(t,e,n){return t===e?n:t},sprintf:function(t,...e){return t.replace(Y,(t=>Q(e.shift(),t)))},renameKeys:function(t,e){const n={};for(let i in t)n[e(i)]=t[i];return n},memoizeMethod:function(t,e){for(let n in e){let e=Object.getOwnPropertyDescriptor(t,n).value,i=function(...t){var i;let s=this[i=`__${n}MemoizeCache`]||(this[i]={}),r=JSON.stringify(t);return s[r]||(s[r]=et(e,this,t)),tt(s[r])};t[n]=i}},safeStringifyJSON:function(t){return JSON.stringify(t).replace(/[^\x00-\x7F]/g,(t=>"\\u"+t.charCodeAt(0).toString(16).padStart(4,"0")))},variant:function(t,e={}){let n=Object.create(t);return Object.assign(n,e),n}}}()},4606:(t,e,n)=>{n(573),up.viewport=function(){const t=up.util,e=up.element,n=up.fragment,i=new up.Config((()=>({viewportSelectors:["[up-viewport]","[up-fixed]"],fixedTopSelectors:["[up-fixed~=top]"],fixedBottomSelectors:["[up-fixed~=bottom]"],anchoredRightSelectors:["[up-anchored~=right]","[up-fixed~=top]","[up-fixed~=bottom]","[up-fixed~=right]"],revealSnap:200,revealPadding:0,revealTop:!1,revealMax:()=>.5*window.innerHeight,autoFocusVisible:({element:t,inputDevice:e})=>"key"===e||up.form.isField(t)}))),s=new up.BodyShifter;function r(e,i){var s,r;return i=t.options(i),e=n.get(e,i),(i.layer=up.layer.get(e))||up.fail("Cannot reveal a detached element"),i.peel&&i.layer.peel(),new up.RevealMotion(e,i).start(),(null===(r=(s=up.migrate).formerlyAsync)||void 0===r?void 0:r.call(s,"up.reveal()"))||!0}function o(e,{preventScroll:n,force:s,inputDevice:o,focusVisible:c}={}){if(s&&(e.hasAttribute("tabindex")||-1!==e.tabIndex||e.setAttribute("tabindex","-1")),null!=o||(o=up.event.inputDevice),null!=c||(c="auto"),c=t.evalAutoOption(c,i.autoFocusVisible,{element:e,inputDevice:o}),e.focus({preventScroll:!0,focusVisible:c}),u(e),e.classList.add(c?"up-focus-visible":"up-focus-hidden"),!n)return r(e)}function u(t){null==t||t.classList.remove("up-focus-hidden","up-focus-visible")}function c(t=location.hash,e){let n=v(t,e);if(n)return up.reveal(n,{top:!0})}function a(){return[p().tagName,...i.viewportSelectors].join()}function h(t,e={}){return n.get(t,e).closest(a())}function l(t,i={}){return t=n.get(t,i),e.around(t,a())}function p(){return document.scrollingElement}function f(){return e.root.clientWidth}function d(t){return up.fragment.tryToTarget(t)}function m(e){const i=t.copy(t.extractOptions(e));let s;return i.layer=up.layer.get(i),s=e[0]?[h(e[0],i)]:i.around?l(i.around,i):function(t={}){return n.all(a(),t)}(i),[s,i]}function g(t,e){for(let n of t){const t=d(n);n.scrollTop=e[t]||0}}function v(t,i={}){if(t=null==(s=t)?void 0:s.replace(/^#/,"")){const s=[e.attrSelector("id",t),"a"+e.attrSelector("name",t)].join();return n.get(s,i)}var s}up.compiler(i.selectorFn("anchoredRightSelectors"),(function(t){return s.onAnchoredElementInserted(t)})),up.on("focusin",(function({relatedTarget:t}){u(t)}));const b=["selectionStart","selectionEnd","scrollLeft","scrollTop"];let y=!1;return up.on("scroll",{once:!0,beforeBoot:!0},(()=>y=!0)),up.on("up:framework:boot",(function(){t.task((function(){if(!y)return c()}))})),up.on(window,"hashchange",(()=>c())),{reveal:r,revealHash:c,firstHashTarget:v,config:i,get:h,subtree:function(t,i={}){return t=n.get(t,i),e.subtree(t,a())},around:l,get root(){return p()},rootWidth:f,rootHeight:function(){return e.root.clientHeight},isRoot:function(t){return t===p()},rootScrollbarWidth:function(){return window.innerWidth-f()},saveScroll:function(...t){const[e,n]=m(t),i=n.location||n.layer.location;if(i){const t=function(t){let e={};for(let n of t){let t=d(n);t?e[t]=n.scrollTop:up.warn("up.viewport.saveScroll()","Cannot save scroll positions for untargetable viewport %o",n)}return e}(e);n.layer.lastScrollTops.set(i,t)}},restoreScroll:function(...t){const[e,n]=m(t),{location:i}=n.layer,s=n.layer.lastScrollTops.get(i);return!!s&&(g(e,s),up.puts("up.viewport.restoreScroll()","Restored scroll positions to %o",s),!0)},resetScroll:function(...t){const[e,n]=m(t);g(e,{})},saveFocus:function(t={}){const e=up.layer.get(t),n=t.location||e.location;if(n){const t=up.FocusCapsule.preserve(e);e.lastFocusCapsules.set(n,t)}},restoreFocus:function(t={}){const e=up.layer.get(t),n=t.location||e.location,i=t.layer.lastFocusCapsules.get(n);return!(!i||!i.restore(e)||(up.puts("up.viewport.restoreFocus()",'Restored focus to "%s"',i.target),0))},absolutize:function(n,s={}){var r;const o=h(n).getBoundingClientRect(),u=n.getBoundingClientRect(),c=new up.Rect({left:u.left-o.left,top:u.top-o.top,width:u.width,height:u.height});null===(r=s.afterMeasure)||void 0===r||r.call(s),e.setStyle(n,{position:"static"===n.style.position?"static":"relative",top:"auto",right:"auto",bottom:"auto",left:"auto",width:"100%",height:"100%"});const a=e.createFromSelector("up-bounds");e.insertBefore(n,a),a.appendChild(n);const l=function(t,n){return c.left+=t,c.top+=n,e.setStyle(a,c)};l(0,0);const p=n.getBoundingClientRect();return l(u.left-p.left,u.top-p.top),t.each(function(t=document){const e=["[up-fixed]"].concat(i.fixedTopSelectors).concat(i.fixedBottomSelectors);return t.querySelectorAll(e.join())}(n),e.fixedToAbsolute),{bounds:a,moveBounds:l}},focus:o,tryFocus:function(t,e){return o(t,e),t===document.activeElement},newStateCache:function(){return new up.FIFOCache({capacity:30,normalizeKey:up.history.normalizeURL})},focusedElementWithin:function(t){const e=document.activeElement;if(up.fragment.contains(t,e))return e},copyCursorProps:function(t,e={}){for(let n of b)try{e[n]=t[n]}catch(t){}return e},bodyShifter:s}}(),up.focus=up.viewport.focus,up.reveal=up.viewport.reveal},3507:()=>{window.up={version:"3.8.0-rc1"}}},e={};function n(i){var s=e[i];if(void 0!==s)return s.exports;var r=e[i]={exports:{}};return t[i].call(r.exports,r,r.exports,n),r.exports}n(3507),n(8374),n(7924),n(3924),n(6535),n(2811),n(9675),n(376),n(8272),n(4366),n(8010),n(4861),n(3469),n(4504),n(2406),n(3742),n(1653),n(1104),n(5949),n(1279),n(6346),n(3030),n(7948),n(2714),n(1752),n(8228),n(7050),n(9441),n(9489),n(7422),n(2200),n(278),n(9005),n(1569),n(2737),n(3635),n(1906),n(4158),n(3139),n(2214),n(5240),n(665),n(2828),n(2587),n(7031),n(8057),n(4850),n(7956),n(7403),n(6412),n(7965),n(7771),n(86),n(4552),n(5580),n(7101),n(6066),n(6387),n(5390),n(2460),n(7792),n(4308),n(8665),n(3645),n(7782),n(2705),n(606),n(5437),n(7974),n(6413),n(5221),n(2298),n(4517),n(7241),n(2723),n(8720),n(7885),n(4818),n(9634),n(8670),n(3535),n(4453),n(1897),n(8944),n(2667),n(4606),n(4034),n(1647),n(9443),n(3849),n(2851),n(454),n(9615),n(6774),up.framework.onEvaled()})();
1
+ (()=>{var t={5941:()=>{},7433:()=>{},7921:()=>{},7298:()=>{},2903:()=>{},573:()=>{},2811:()=>{up.browser={submitForm:function(t){t.submit()},canPushState:function(){return"GET"===up.protocol.initialRequestMethod()},canJQuery:function(){return!!window.jQuery},assertConfirmed:function(t){if(t.confirm&&!window.confirm(t.confirm))throw new up.Aborted("User canceled action");return!0},popCookie:function(t){var e;let n=null===(e=document.cookie.match(new RegExp(t+"=(\\w+)")))||void 0===e?void 0:e[1];if(n)return document.cookie=t+"=;Max-Age=0;Path=/",n},canHasSelector:up.util.memoize((()=>CSS.supports("selector(:has(*))")))}},6346:()=>{const t=up.element;up.BodyShifter=class BodyShifter{constructor(){this.t=new Set,this.i=0,this.o=[]}lowerStack(){0==--this.i&&this.u()}raiseStack(){1==++this.i&&this.h()}onAnchoredElementInserted(t){return this.t.add(t),this.l(t,"right"),()=>this.t.delete(t)}p(){return this.m&&this.i>0}h(){this.m=up.viewport.rootScrollbarWidth(),this.o.push(t.setTemporaryStyle(t.root,{"--up-scrollbar-width":this.m+"px"})),this.l(document.body,"padding-right");for(let t of this.t)this.l(t,"right")}l(e,n){if(!this.p())return;let i=t.style(e,n);this.o.push(t.setTemporaryStyle(t.root,{["--up-original-"+n]:i}),t.addTemporaryClass(e,"up-scrollbar-away"))}u(){let t;for(;t=this.o.pop();)t()}}},7948:()=>{const t=up.util,e=up.element;up.Change.Addition=class Addition extends up.Change{constructor(t){super(t),this.v=t.acceptLayer,this._=t.dismissLayer,this.O=t.eventPlans||[],this.k=t.response}handleLayerChangeRequests(){this.layer.isOverlay()&&(this.tryAcceptLayerFromServer(),this.abortWhenLayerClosed(),this.layer.tryAcceptForLocation(this.responseOption()),this.abortWhenLayerClosed(),this.tryDismissLayerFromServer(),this.abortWhenLayerClosed(),this.layer.tryDismissForLocation(this.responseOption()),this.abortWhenLayerClosed()),this.layer.asCurrent((()=>{for(let t of this.O)up.emit(Object.assign(Object.assign({},t),this.responseOption())),this.abortWhenLayerClosed()}))}tryAcceptLayerFromServer(){t.isDefined(this.v)&&this.layer.isOverlay()&&this.layer.accept(this.v,this.responseOption())}tryDismissLayerFromServer(){t.isDefined(this._)&&this.layer.isOverlay()&&this.layer.dismiss(this._,this.responseOption())}abortWhenLayerClosed(t=this.layer){if(t.isClosed())throw new up.Aborted("Layer was closed")}setSource({oldElement:n,newElement:i,source:s}){"keep"===s&&(s=n&&up.fragment.source(n)),s&&e.setMissingAttr(i,"up-source",t.normalizeURL(s,{hash:!1}))}setTime({newElement:t,time:n}){e.setMissingAttr(t,"up-time",!!n&&n.toUTCString())}setETag({newElement:t,etag:n}){e.setMissingAttr(t,"up-etag",n||!1)}setReloadAttrs(t){this.setSource(t),this.setTime(t),this.setETag(t)}responseOption(){return{response:this.k}}executeSteps(t,e,n){return new up.Change.UpdateSteps({steps:t,noneOptions:n}).execute(e)}}},3030:()=>{const t=up.util;up.Change=class Change{constructor(t){this.options=t}execute(){throw new up.NotImplemented}onFinished(t){var e,n;return null===(n=(e=this.options).onFinished)||void 0===n?void 0:n.call(e,t)}improveHistoryValue(e,n){return!1===e||t.isString(e)?e:n}deriveFailOptions(){return up.RenderOptions.deriveFailOptions(this.options)}}},7422:()=>{const t=up.util;up.Change.CloseLayer=class CloseLayer extends up.Change.Removal{constructor(t){var e,n;super(t),this.S=t.verb,this.C=up.layer.get(t),this.j=t.origin,this.F=t.value,this.T=null===(e=t.preventable)||void 0===e||e,this.k=t.response,this.R=null===(n=t.history)||void 0===n||n}execute(){if(!this.C.isOpen())return Promise.resolve();if(up.browser.assertConfirmed(this.options),this.P().defaultPrevented&&this.T)throw new up.Aborted("Close event was prevented");this.A(),up.fragment.abort({reason:"Layer is closing",layer:this.C});const{parent:t}=this.C;this.C.peel(),this.C.stack.remove(this.C),this.R&&t.restoreHistory(),this.L(t),this.C.teardownHandlers(),this.C.destroyElements(this.options),this.$(t)}P(){let e=this.C.emit(this.D(`up:layer:${this.S}`),{callback:this.C.callback(`on${t.upperCaseFirst(this.S)}`),log:[`Will ${this.S} ${this.C} with value %o`,this.F]});return this.F=e.value,e}A(){let t=this.D(`up:layer:${this.S}ing`);this.C.emit(t,{log:!1})}$(e){const n=`${this.S}ed`,i=t.upperCaseFirst(n);return this.C.emit(this.D(`up:layer:${n}`),{baseLayer:e,callback:this.C.callback(`on${i}`),ensureBubbles:!0,log:[`${i} ${this.C} with value %o`,this.F]})}D(t){return up.event.build(t,{layer:this.C,value:this.F,origin:this.j,response:this.k})}L(t){var e;this.C.overlayFocus.teardown(),null===(e=t.overlayFocus)||void 0===e||e.moveToFront();let n=this.C.origin||t.element;up.focus(n,{preventScroll:!0})}}},8228:function(){var t=this&&this.M||function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{c(i.next(t))}catch(t){r(t)}}function u(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((i=i.apply(t,e||[])).next())}))};up.Change.DestroyFragment=class DestroyFragment extends up.Change.Removal{constructor(t){super(t),this.C=up.layer.get(t)||up.layer.current,this.H=this.options.element,this.N=this.options.animation,this.q=this.options.log}execute(){this.U=this.H.parentNode,up.fragment.markAsDestroying(this.H),up.motion.willAnimate(this.H,this.N,this.options)?this.B():this.I()}B(){return t(this,void 0,void 0,(function*(){this.K(),yield this.V(),this.X(),this.onFinished()}))}I(){this.X(),this.K(),this.onFinished()}V(){return up.motion.animate(this.H,this.N,this.options)}X(){this.C.asCurrent((()=>{up.fragment.abort(this.H),up.script.clean(this.H,{layer:this.C}),up.element.cleanJQuery(this.H),this.H.remove()}))}K(){up.fragment.emitDestroyed(this.H,{parent:this.U,log:this.q})}}},9005:()=>{var t;const e=up.util;up.Change.FromContent=(t=class FromContent extends up.Change{constructor(t){super(t),this.j=this.options.origin,this.W=this.options.preview}J(){let t=[];return this.G(),this.Y(),this.Z(t,this.tt,this.options.target),this.Z(t,this.tt,this.options.fallback),t}et(t){return"new"===t||t.isOpen()}G(){this.nt=up.layer.getAll(this.options),this.tt=e.filter(this.nt,this.et)}Z(t,e,n){for(let i of e)for(let e of this.it(n,i)){const n=Object.assign(Object.assign({},this.options),{target:e,layer:i,defaultPlacement:this.st()}),s="new"===i?new up.Change.OpenLayer(n):new up.Change.UpdateLayer(n);t.push(s)}}it(t,e){return up.fragment.expandTargets(t,{layer:e,mode:this.options.mode,origin:this.j})}execute(){return this.options.preload?Promise.resolve():this.rt(this.ot.bind(this))||this.ut()}ot(t){let e=t.execute(this.ct(),this.ht.bind(this,t));return e.options=this.options,e}lt(t){return!(t instanceof up.CannotMatch)}ht(t){var e,n;let i=this.J()[0];t!==i&&up.puts("up.render()",'Could not match primary target "%s". Updating a fallback target "%s".',i.target,t.target);let{assets:s}=this.ct();s&&up.script.assertAssetsOK(s,t.options),null===(n=(e=this.options).onRender)||void 0===n||n.call(e)}ct(){var t,n;if(this.W)return;const i=e.pick(this.options,["target","content","fragment","document","html","cspNonces","origin"]);return null===(n=(t=up.migrate).handleResponseDocOptions)||void 0===n||n.call(t,i),"content"===this.st()&&(i.target=this.ft(i.target)),new up.ResponseDoc(i)}Y(){var t;if(this.W)return;let e=this.ct();this.options.fragment&&((t=this.options).target||(t.target=e.rootSelector())),this.options.title=this.improveHistoryValue(this.options.title,e.title),this.options.metaTags=this.improveHistoryValue(this.options.metaTags,e.metaTags),this.options.lang=this.improveHistoryValue(this.options.lang,e.lang)}st(){if(!this.options.document&&!this.options.fragment)return"content"}ft(t){let e=this.tt[0]||up.layer.root;return this.it(t||":main",e)[0]}getPreflightProps(t={}){return this.rt((t=>t.getPreflightProps()))||t.optional||this.dt()}dt(){this.gt("Could not find target in current page")}ut(){this.gt("Could not find common target in current page and response")}gt(t){if(this.J().length){const n=e.uniq(e.map(this.J(),"target")),i=up.layer.optionToString(this.options.layer);throw new up.CannotMatch([t+" (tried selectors %o in %s)",n,i])}if(0!==this.tt.length)throw this.options.failPrefixForced?new up.CannotMatch("No target selector given for failed responses (https://unpoly.com/failed-responses)"):new up.CannotMatch("No target selector given");this.vt()}vt(){throw new up.CannotMatch("Could not find a layer to render in. You may have passed an unmatchable layer reference, or a detached element.")}rt(t){for(let e of this.J())try{return t(e)}catch(t){if(this.lt(t))throw t}}},e.memoizeMethod(t.prototype,{J:!0,ct:!0,getPreflightProps:!0}),t)},278:function(){var t,e=this&&this.M||function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{c(i.next(t))}catch(t){r(t)}}function u(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((i=i.apply(t,e||[])).next())}))};const n=up.util;up.Change.FromResponse=(t=class FromResponse extends up.Change{constructor(t){super(t),this.k=t.response,this.bt=this.k.request}execute(){var t;if(up.fragment.config.skipResponse(this.yt())?this.wt():this.bt.assertEmitted("up:fragment:loaded",Object.assign(Object.assign({},this.yt()),{callback:this.options.onLoaded,log:["Loaded fragment from %s",this.k.description],skip:()=>this.wt()})),null!==(t=n.evalOption(this.options.fail,this.k))&&void 0!==t?t:!this.k.ok)throw this._t(this.deriveFailOptions());return this._t(this.options)}wt(){up.puts("up.render()","Skipping "+this.k.description),this.options.target=":none",this.options.failTarget=":none"}_t(t){t.failPrefixForced&&up.puts("up.render()","Rendering failed response using fail-prefixed options (https://unpoly.com/failed-responses)"),this.Ot(t),t.meta=this.kt();let e=new up.Change.FromContent(t).execute();return e.finished=this.finish(e,t),e}finish(t,n){return e(this,void 0,void 0,(function*(){return t=yield t.finished,up.fragment.shouldRevalidate(this.bt,this.k,n)&&(t=yield this.St(t,n)),t}))}St(t,n){return e(this,void 0,void 0,(function*(){let e=n.target,i=t.target;if(/:(before|after)/.test(e))up.warn("up.render()","Cannot revalidate cache when prepending/appending (target %s)",e);else{up.puts("up.render()",'Revalidating cached response for target "%s"',i);let e=yield up.reload(i,Object.assign(Object.assign({},n),{preferOldElements:t.fragments,layer:t.layer,onFinished:null,scroll:!1,focus:"keep",transition:!1,cache:!1,confirm:!1,feedback:!1,abort:!1,expiredResponse:this.k}));e.none||(t=e)}return t}))}yt(){const{expiredResponse:t}=this.options;return{request:this.bt,response:this.k,renderOptions:this.options,revalidating:!!t,expiredResponse:t}}kt(){var t,e;let n={revalidating:!!this.options.expiredResponse};return null===(e=(t=up.migrate).processCompilerPassMeta)||void 0===e||e.call(t,n,this.k),n}Ot(t){var e,i;const s=this.k.url;let r=s,o=this.bt.hash;o&&(t.hash=o,r+=o),"GET"===this.k.method?t.source=this.improveHistoryValue(t.source,s):(t.source=this.improveHistoryValue(t.source,"keep"),t.history=!!t.location),t.location=this.improveHistoryValue(t.location,r),t.title=this.improveHistoryValue(t.title,this.k.title),t.eventPlans=this.k.eventPlans;let u=this.k.target;u&&(t.target=u),t.acceptLayer=this.k.acceptLayer,t.dismissLayer=this.k.dismissLayer,t.document=this.k.text,this.k.none&&(t.target=":none"),t.context=n.merge(t.context,this.k.context),t.cspNonces=this.k.cspNonces,null!==(e=t.time)&&void 0!==e||(t.time=this.k.lastModified),null!==(i=t.etag)&&void 0!==i||(t.etag=this.k.etag)}},n.memoizeMethod(t.prototype,{yt:!0}),t)},2200:()=>{var t;const e=up.util;up.Change.FromURL=(t=class FromURL extends up.Change{constructor(t){super(t),this.options.layer=up.layer.getAll(this.options),this.options.normalizeLayerOptions=!1}execute(){var t,n;let i=this.xt();return i?(up.puts("up.render()",i),up.network.loadPage(this.options),e.unresolvablePromise()):(this.request=up.request(this.Et()),null===(n=(t=this.options).onRequest)||void 0===n||n.call(t,this.request),up.feedback.showAroundRequest(this.request,this.options),up.form.disableWhile(this.request,this.options),this.options.preload?this.request:e.always(this.request,(t=>this.Ct(t))))}xt(){return e.isCrossOrigin(this.options.url)?"Loading cross-origin content in new page":this.options.history&&!up.browser.canPushState()?"Loading content in new page to restore history support":void 0}Et(){const t=this.jt(this.options),n=this.jt(this.deriveFailOptions(),{optional:!0});return Object.assign(Object.assign(Object.assign({},this.options),t),e.renameKeys(n,up.fragment.failKey))}getPreflightProps(){return this.Et()}jt(t,e){return new up.Change.FromContent(Object.assign(Object.assign({},t),{preview:!0})).getPreflightProps(e)}Ct(t){return t instanceof up.Response?this.Ft(t):this.Tt(t)}Ft(t){return new up.Change.FromResponse(Object.assign(Object.assign({},this.options),{response:t})).execute()}Tt(t){throw t instanceof up.Offline&&this.request.emit("up:fragment:offline",{callback:this.options.onOffline,renderOptions:this.options,retry:t=>up.render(Object.assign(Object.assign({},this.options),t)),log:["Cannot load fragment from %s: %s",this.request.description,t.reason]}),t}},e.memoizeMethod(t.prototype,{Et:!0}),t)},7050:function(){var t=this&&this.M||function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{c(i.next(t))}catch(t){r(t)}}function u(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((i=i.apply(t,e||[])).next())}))};let e=up.util;up.Change.OpenLayer=class OpenLayer extends up.Change.Addition{constructor(t){super(t),this.target=t.target,this.j=t.origin,this.Rt=t.baseLayer}getPreflightProps(){return{mode:this.options.mode,context:this.Pt().context,origin:this.options.origin,target:this.target,layer:this.Rt,fragments:e.compact([up.fragment.get(":main",{layer:this.Rt})]),newLayer:!0}}execute(t,e){this.responseDoc=t,this.At(),e(),this.Lt();let n=this.layer.on("up:layer:accepting up:layer:dimissing",this.$t.bind(this));try{return this.Dt(),this.$t(),up.RenderResult.both(this.Mt,this.Ht)}finally{n()}}At(){if(":none"===this.target?this.Nt=document.createElement("up-none"):this.Nt=this.responseDoc.select(this.target),!this.Nt||this.Rt.isClosed())throw new up.CannotMatch}Lt(){up.puts("up.render()",`Opening element "${this.target}" in new overlay`),this.qt(),this.layer=this.Pt(),this.Rt.peel({history:!this.layer.history}),up.layer.stack.push(this.layer),this.layer.createElements(),this.layer.setupHandlers()}Dt(){this.Ut(),this.handleLayerChangeRequests(),this.responseDoc.commitElement(this.Nt),this.layer.setContent(this.Nt),this.setReloadAttrs({newElement:this.Nt,source:this.options.source}),this.responseDoc.finalizeElement(this.Nt),this.Mt=new up.RenderResult({layer:this.layer,fragments:[this.Nt],target:this.target}),up.hello(this.layer.element,Object.assign(Object.assign({},this.options),{layer:this.layer})),this.Bt(),this.Mt.finished=this.zt(),this.layer.opening=!1,this.It(),this.abortWhenLayerClosed()}$t(){if(this.Ht)return;let t=this.Kt().other;this.Ht=this.executeSteps(t,this.responseDoc)}zt(){return t(this,void 0,void 0,(function*(){return yield this.layer.startOpenAnimation(),this.abortWhenLayerClosed(),this.L(),this.Mt}))}Pt(){const t=Object.assign(Object.assign({},this.options),{opening:!0});return up.layer.build(t,(t=>this.options=up.RenderOptions.finalize(t)))}Ut(){var t;"auto"===this.layer.history&&(this.layer.history=up.fragment.hasAutoHistory([this.Nt],this.layer));let{parent:e}=this.layer;(t=this.layer).history&&(t.history=e.history),e.saveHistory(),this.layer.updateHistory(this.options)}L(){var t;null===(t=this.Rt.overlayFocus)||void 0===t||t.moveToBack(),this.layer.overlayFocus.moveToFront(),new up.FragmentFocus({fragment:this.Nt,layer:this.layer,autoMeans:["autofocus","layer"],inputDevice:this.options.inputDevice}).process(this.options.focus)}Bt(){const t=Object.assign(Object.assign({},this.options),{fragment:this.Nt,layer:this.layer,autoMeans:["hash","layer"]});new up.FragmentScrolling(t).process(this.options.scroll)}qt(){up.event.assertEmitted("up:layer:open",{origin:this.j,baseLayer:this.Rt,layerOptions:this.options,log:"Opening new overlay"})}It(){this.layer.emit("up:layer:opened",{origin:this.j,callback:this.layer.callback("onOpened"),log:`Opened new ${this.layer}`})}Kt(){return up.radio.hungrySteps(this.Vt())}Vt(){return Object.assign(Object.assign({},this.options),{layer:this.layer,history:this.layer.history})}}},1752:()=>{up.Change.Removal=class Removal extends up.Change{}},9441:()=>{var t;const e=up.util;up.Change.UpdateLayer=(t=class UpdateLayer extends up.Change.Addition{constructor(t){super(t=up.RenderOptions.finalize(t)),this.layer=t.layer,this.target=t.target,this.Xt=t.context,this.Wt=up.fragment.parseTargetSteps(this.target,this.options)}getPreflightProps(){return this.Jt(),{layer:this.layer,mode:this.layer.mode,context:e.merge(this.layer.context,this.Xt),origin:this.options.origin,target:this.Gt(),fragments:this.Qt(),newLayer:!1}}Gt(){return this.Jt(),up.fragment.targetForSteps(this.Wt)}Qt(){return this.Jt(),e.map(this.Wt,"oldElement")}execute(t,e){this.responseDoc=t,this.At(),e();let n=this.layer.on("up:layer:accepting up:layer:dimissing",this.$t.bind(this));try{return this.Yt(),this.$t(),up.RenderResult.both(this.Zt,this.Ht)}finally{n()}}Yt(){this.Wt.length&&up.puts("up.render()",`Updating "${this.Gt()}" in ${this.layer}`),this.te(),this.options.saveScroll&&up.viewport.saveScroll({layer:this.layer}),this.options.saveFocus&&up.viewport.saveFocus({layer:this.layer}),this.options.peel&&this.layer.peel({history:!this.ee()}),!1!==this.options.abort&&up.fragment.abort(this.Qt(),{reason:"Fragment is being replaced"}),Object.assign(this.layer.context,this.Xt),this.ee()&&this.layer.updateHistory(this.options),this.handleLayerChangeRequests(),this.Zt=this.executeSteps(this.Wt,this.responseDoc,this.options)}$t(){if(this.Ht)return;let t=this.Kt().other;this.Ht=this.executeSteps(t,this.responseDoc)}Jt(){this.ne(),this.ie()}At(){this.ne(),this.se(),this.ie(),this.re()}se(){this.Wt.push(...this.Kt().current)}ne(){this.Wt=this.Wt.filter((t=>{const n=new up.FragmentFinder(e.pick(t,["selector","origin","layer","match","preferOldElements"]));if(t.oldElement||(t.oldElement=n.find()),t.oldElement)return!0;if(!t.maybe)throw new up.CannotMatch}))}re(){this.Wt=this.responseDoc.selectSteps(this.Wt)}ie(){this.Wt=up.fragment.compressNestedSteps(this.Wt)}Kt(){return up.radio.hungrySteps(this.Vt())}te(){let t=up.FocusCapsule.preserve(this.layer);this.Wt.forEach(((e,n)=>{e.focusCapsule=t,n>0&&(e.scroll=!1,e.focus=!1),"swap"!==e.placement&&"content"!==e.placement||(e.scrollBehavior="instant")}))}ee(){return e.evalAutoOption(this.options.history,this.oe.bind(this))}oe(){const t=e.map(this.Wt,"oldElement");return up.fragment.hasAutoHistory(t,this.layer)}Vt(){return Object.assign(Object.assign({},this.options),{layer:this.layer,history:this.ee()})}},e.memoizeMethod(t.prototype,{Jt:!0,ne:!0,ee:!0,Kt:!0}),t)},9489:function(){var t=this&&this.M||function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{c(i.next(t))}catch(t){r(t)}}function u(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((i=i.apply(t,e||[])).next())}))};const e=up.util,n=up.element;up.Change.UpdateSteps=class UpdateSteps extends up.Change.Addition{constructor(t){super(t),this.ue=t.noneOptions||{},this.Wt=e.copy(t.steps)}execute(t){var e;if(this.responseDoc=t,this.Wt=t.selectSteps(this.Wt),this.Wt=t.commitSteps(this.Wt),!this.Wt.length)return this.ce();this.renderResult=new up.RenderResult({layer:null===(e=this.Wt[0])||void 0===e?void 0:e.layer,target:up.fragment.targetForSteps(this.Wt)}),this.Wt.reverse();const n=this.Wt.map((t=>this.ae(t)));return this.renderResult.finished=this.zt(n),this.renderResult}ce(){return this.L(null,this.ue),this.Bt(null,this.ue),up.RenderResult.buildNone()}zt(e){return t(this,void 0,void 0,(function*(){yield Promise.all(e);for(let t of this.Wt)this.abortWhenLayerClosed(t.layer);return this.renderResult}))}he(t){let e=t.matches("up-wrapper")?t.children:[t];this.renderResult.fragments.unshift(...e)}ae(t){switch(this.setReloadAttrs(t),t.placement){case"swap":if(this.le(t))return this.L(t.oldElement,t),this.Bt(t.oldElement,t),Promise.resolve();{this.pe(t);const e=t.oldElement.parentNode,n=Object.assign(Object.assign({},t),{beforeStart(){up.fragment.markAsDestroying(t.oldElement)},afterInsert:()=>{this.fe(t),this.responseDoc.finalizeElement(t.newElement),this.de(t),up.hello(t.newElement,t),this.he(t.newElement)},beforeDetach:()=>{up.script.clean(t.oldElement,{layer:t.layer})},afterDetach(){up.element.cleanJQuery(),up.fragment.emitDestroyed(t.oldElement,{parent:e,log:!1})},scrollNew:()=>{this.L(t.newElement,t),this.Bt(t.newElement,t)}});return up.morph(t.oldElement,t.newElement,t.transition,n)}case"content":{let e=n.wrapChildren(t.oldElement),i=n.wrapChildren(t.newElement),s=Object.assign(Object.assign({},t),{placement:"swap",oldElement:e,newElement:i,focus:!1});return this.ae(s).then((()=>{n.unwrap(i),this.L(t.oldElement,t)}))}case"before":case"after":{let e=n.wrapChildren(t.newElement),i="before"===t.placement?"afterbegin":"beforeend";return t.oldElement.insertAdjacentElement(i,e),this.responseDoc.finalizeElement(e),up.hello(e,t),this.he(e),this.L(e,t),this.Bt(e,t),up.animate(e,t.transition,t).then((()=>n.unwrap(e)))}default:up.fail("Unknown placement: %o",t.placement)}}le(t){if(!t.useKeep)return;const{oldElement:e,newElement:i}=t;let s;if(!n.booleanAttr(e,"up-keep"))return;let r=up.fragment.toTarget(e);const o={layer:t.layer};if(s=t.descendantsOnly?up.fragment.get(i,r,o):up.fragment.subtree(i,r,o)[0],s&&!1!==n.booleanAttr(s,"up-keep")){const n={oldElement:e,newElement:s,newData:up.script.data(s),renderOptions:t};if(!up.fragment.emitKeep(n).defaultPrevented)return n}}pe(t){const e=[];if(t.useKeep)for(let n of t.oldElement.querySelectorAll("[up-keep]")){let i=this.le(Object.assign(Object.assign({},t),{oldElement:n,descendantsOnly:!0}));if(i){const t=n.cloneNode(!0);n.insertAdjacentElement("beforebegin",t),n.classList.add("up-keeping"),up.script.disableSubtree(i.newElement);let s=up.viewport.subtree(i.oldElement);i.revivers=s.map((function(t){let e=up.viewport.copyCursorProps(t);return()=>up.viewport.copyCursorProps(e,t)})),this.me(document.body)?i.newElement.replaceWith(n):document.body.append(n),e.push(i)}}t.keepPlans=e}fe(t){for(let e of t.keepPlans){e.newElement.replaceWith(e.oldElement);for(let t of e.revivers)t()}}de(t){for(let e of t.keepPlans)e.oldElement.classList.remove("up-keeping")}me(t){return e.some(this.Wt,(e=>e.oldElement.contains(t)))}L(t,e){return new up.FragmentFocus(Object.assign(Object.assign({},e),{fragment:t,autoMeans:up.fragment.config.autoFocus})).process(e.focus)}Bt(t,e){return new up.FragmentScrolling(Object.assign(Object.assign({},e),{fragment:t,autoMeans:up.fragment.config.autoScroll})).process(e.scroll)}}},1569:()=>{const t=up.util;up.CompilerPass=class CompilerPass{constructor(t,e,{layer:n,data:i,dataMap:s,meta:r}){n||(n=up.layer.get(t)||up.layer.current),this.ge=t,this.ve=e,this.C=n,this.be=i,this.ye=s,r||(r={}),r.layer=n,this.we=r}run(){this.C.asCurrent((()=>{this.setCompileData();for(let t of this.ve)this._e(t)}))}setCompileData(){if(this.be&&(this.ge.upCompileData=this.be),this.ye)for(let t in this.ye)for(let e of this.Oe(t))e.upCompileData=this.ye[t]}_e(t){var e,n;const i=this.ke(t);if(i.length){if(t.isDefault||up.puts("up.hello()",'Compiling %d× "%s" on %s',i.length,t.selector,this.C),t.batch)this.Se(t,i);else for(let e of i)this.xe(t,e);return null===(n=(e=up.migrate).postCompile)||void 0===n?void 0:n.call(e,i,t)}}xe(t,e){const n=[e];if(1!==t.length){const t=up.script.data(e);n.push(t,this.we)}const i=this.Ee(t,e,n);let s=this.Ce(i);s&&up.destructor(e,s)}Se(e,n){const i=[n];if(1!==e.length){const e=t.map(n,up.script.data);i.push(e,this.we)}const s=this.Ee(e,n,i);this.Ce(s)&&up.fail("Compilers with { batch: true } cannot return destructors")}Ee(t,e,n){return up.error.guard((()=>t.apply(e,n)))}Ce(e){if(t.isFunction(e)||t.isArray(e)&&t.every(e,t.isFunction))return e}Oe(e){return up.fragment.subtree(this.ge,t.evalOption(e),{layer:this.C})}ke(e){let n=this.Oe(e.selector);return t.filter(n,(t=>{let n=t.upAppliedCompilers||(t.upAppliedCompilers=new Set);if(!n.has(e))return n.add(e),!0}))}}},3742:()=>{const t=up.util,e=up.element;up.Config=class Config{constructor(t=(()=>({}))){this.je=t,this.reset(),document.addEventListener("up:framework:reset",(()=>this.reset()))}reset(){Object.assign(this,this.je())}matches(t,e){return t.matches(this.selector(e))}selector(n){let i=this[n],s=this["no"+t.upperCaseFirst(n)];return e.unionSelector(i,s)}selectorFn(t){return()=>this.selector(t)}}},2737:()=>{const t=up.util,e=up.element;up.CSSTransition=class CSSTransition{constructor(t,e,n){this.H=t,this.Fe=e,this.Te=Object.keys(this.Fe),this.Re=n.finishEvent,this.Pe=n.duration,this.Ae=n.easing,this.Le=!1}start(){return 0===this.Te.length?(this.Le=!0,Promise.resolve()):(this.$e=t.newDeferred(),this.De(),this.Me=new Date,this.He(),this.Ne(),this.qe(),this.Ue(),this.$e)}Ne(){this.Re&&(this.Be=up.on(this.H,this.Re,this.ze.bind(this)))}ze(t){t.stopPropagation(),this.zt()}He(){this.Ie=t.timer(this.Pe+100,(()=>this.zt()))}Ke(){clearTimeout(this.Ie)}qe(){this.Ve=up.on(this.H,"transitionend",this.Xe.bind(this))}Xe(e){if(e.target!==this.H)return;if(new Date-this.Me<=.25*this.Pe)return;const n=e.propertyName;t.contains(this.Te,n)&&this.zt()}zt(){var t,n;this.Le||(this.Le=!0,this.Ke(),null===(t=this.Be)||void 0===t||t.call(this),null===(n=this.Ve)||void 0===n||n.call(this),e.concludeCSSTransition(this.H),this.We(),this.$e.resolve())}De(){const t=e.style(this.H,["transition-property","transition-duration","transition-delay","transition-timing-function"]);if(e.hasCSSTransition(t)){if("all"!==t["transition-property"]){const n=t["transition-property"].split(/\s*,\s*/),i=e.style(this.H,n);this.Je=e.setTemporaryStyle(this.H,i)}this.Ge=e.concludeCSSTransition(this.H)}}We(){var t,e;null===(t=this.Je)||void 0===t||t.call(this),null===(e=this.Ge)||void 0===e||e.call(this)}Ue(){e.setStyle(this.H,{"transition-property":this.Te.join(),"transition-duration":`${this.Pe}ms`,"transition-timing-function":this.Ae}),e.setStyle(this.H,this.Fe)}}},3635:()=>{const t=up.util;up.DestructorPass=class DestructorPass{constructor(t,e){this.Qe=t,this.Ye=e}run(){for(let e of this.Ze()){let n=t.pluckKey(e,"upDestructors");if(n)for(let t of n)this.tn(t,e);e.classList.remove("up-can-clean")}}Ze(){const t=Object.assign(Object.assign({},this.Ye),{destroying:!0});return up.fragment.subtree(this.Qe,".up-can-clean",t)}tn(t,e){up.error.guard((()=>t(e)))}}},1906:()=>{const t=up.util,e=up.element;up.EventEmitter=class EventEmitter extends up.Record{keys(){return["target","event","baseLayer","callback","log","ensureBubbles"]}emit(){return this.en(),this.baseLayer?this.baseLayer.asCurrent((()=>this.nn())):this.nn(),this.event}nn(){this.target.dispatchEvent(this.event),this.ensureBubbles&&!this.target.isConnected&&document.dispatchEvent(this.event),up.error.guard((()=>{var t;return null===(t=this.callback)||void 0===t?void 0:t.call(this,this.event)}))}assertEmitted(){const t=this.emit();if(t.defaultPrevented)throw new up.Aborted(`Event ${t.type} was prevented`)}en(){if(!up.log.config.enabled)return;let e,n=this.log;t.isArray(n)?[n,...e]=n:e=[];const{type:i}=this.event;t.isString(n)?up.puts(i,n,...e):!1!==n&&up.puts(i,`Event ${i}`)}static fromEmitArgs(n,i={}){var s,r;let o,u=t.extractOptions(n);return u=t.merge(i,u),t.isElementish(n[0])?u.target=e.get(n.shift()):n[0]instanceof up.Layer&&(u.layer=n.shift()),t.isGiven(u.layer)&&(o=up.layer.get(u.layer),u.target||(u.target=o.element),u.baseLayer||(u.baseLayer=o)),u.baseLayer&&(u.baseLayer=up.layer.get(u.baseLayer)),t.isString(u.target)?u.target=up.fragment.get(u.target,{layer:u.layer}):u.target||(u.target=document),(null===(s=n[0])||void 0===s?void 0:s.preventDefault)?(u.event=n[0],null!==(r=u.log)&&void 0!==r||(u.log=n[0].log)):t.isString(n[0])?u.event=up.event.build(n[0],u):u.event=up.event.build(u),new this(u)}}},4158:()=>{const t=up.util;up.EventListener=class EventListener extends up.Record{keys(){return["element","eventType","selector","callback","guard","baseLayer","passive","once","capture","beforeBoot"]}constructor(t){var e;super(t),this.sn=this.constructor.rn(t),this.isDefault=up.framework.evaling,null!==(e=this.beforeBoot)&&void 0!==e||(this.beforeBoot=0===this.eventType.indexOf("up:framework:")),this.nativeCallback=this.nativeCallback.bind(this)}bind(){var t;const e=(t=this.element).upEventListeners||(t.upEventListeners={});e[this.sn]&&up.fail("up.on(): The %o callback %o cannot be registered more than once",this.eventType,this.callback),e[this.sn]=this,this.element.addEventListener(...this.un())}un(){let e=t.compactObject(t.pick(this,["once","passive","capture"]));return[this.eventType,this.nativeCallback,e]}unbind(){let t=this.element.upEventListeners;t&&delete t[this.sn],this.element.removeEventListener(...this.un())}nativeCallback(e){if(up.framework.beforeBoot&&!this.beforeBoot)return;let n=e.target;if(this.selector&&(n=n.closest(t.evalOption(this.selector))),(!this.guard||this.guard(e))&&n){const t=[e,n],i=this.callback.length;if(1!==i&&2!==i){const e=up.script.data(n);t.push(e)}if("click"===this.eventType&&n.disabled)return;const s=this.callback.bind(n,...t);this.baseLayer?this.baseLayer.asCurrent(s):s()}}static fromElement(t){let e=t.element.upEventListeners;if(e)return e[this.rn(t)]}static rn(e){var n;return(n=e.callback).upUid||(n.upUid=t.uid()),[e.eventType,e.selector,e.callback.upUid].join("|")}static allNonDefault(e){let n=e.upEventListeners;if(n){const e=Object.values(n);return t.reject(e,"isDefault")}return[]}}},3139:()=>{const t=up.util;up.EventListenerGroup=class EventListenerGroup extends up.Record{keys(){return["elements","eventTypes","selector","callback","guard","baseLayer","passive","once","capture","beforeBoot"]}bind(){const e=[];return this.cn((function(t){const n=new up.EventListener(t);return n.bind(),e.push(n.unbind.bind(n))})),t.sequence(e)}cn(t){for(let e of this.elements)for(let n of this.eventTypes)t(this.an(e,n))}an(t,e){return Object.assign(Object.assign({},this.attributes()),{element:t,eventType:e})}unbind(){this.cn((function(t){let e=up.EventListener.fromElement(t);e&&e.unbind()}))}static fromBindArgs(e,n){const i=(e=t.copy(e)).pop();let s;s=e[0].addEventListener?[e.shift()]:t.isJQuery(e[0])||t.isList(e[0])&&e[0][0].addEventListener?e.shift():[document];let r=t.parseTokens(e.shift()),o=up.migrate.fixEventTypes;o&&(r=o(r));const u=t.extractOptions(e),c=e[0];return new this(Object.assign(Object.assign({elements:s,eventTypes:r,selector:c,callback:i},u),n))}}},2214:function(){var t=this&&this.M||function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{c(i.next(t))}catch(t){r(t)}}function u(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((i=i.apply(t,e||[])).next())}))};const e=up.util;up.FieldWatcher=class FieldWatcher{constructor(t,e,n){this.Ye=e,this.ge=t,this.hn=up.form.getScope(t),this.ln=n,this.pn=e.batch,this.fn=e.abortable}start(){this.dn=null,this.mn=this.gn(),this.vn=null,this.bn=!1,this.yn=[],this.wn(this.ge),this.ge.addEventListener("up:fragment:inserted",(({target:t})=>{t!==this.ge&&this.wn(t)})),this.yn.push(up.fragment.onAborted(this.hn,(()=>this._n()))),this.yn.push(up.on(this.hn,"reset",(()=>this.On())))}stop(){this._n();for(let t of this.yn)t()}kn(t){let n=e.copy(this.Ye);return up.form.watchOptions(t,n,{defaults:{event:"input"}})}wn(t){for(let e of up.form.fields(t))this.Sn(e)}Sn(t){let e=this.kn(t);this.yn.push(up.on(t,e.event,(()=>this.xn(e))))}_n(){this.dn=null}En(t,n){this.dn=t,this.Cn=n;let i=n.delay||0;clearTimeout(this.vn),this.vn=e.timer(i,(()=>{this.vn=null,this.jn()}))}Fn(t){return!e.isEqual(t,this.mn)&&!e.isEqual(this.dn,t)}jn(){return t(this,void 0,void 0,(function*(){if(!this.dn)return;if(this.bn)return;if(this.vn)return;if(!this.hn.isConnected)return;let t=this.Cn;const n=this.Tn(this.mn,this.dn);this.mn=this.dn,this.dn=null,this.bn=!0,this.Cn=null;let i=Object.assign(Object.assign({},t),{disable:!1});const s=[];if(this.pn)s.push(this.Rn(n,i));else for(let t in n){const e=n[t];s.push(this.Rn(e,t,i))}if(e.some(s,e.isPromise)){let e=Promise.allSettled(s);up.form.disableWhile(e,t),yield e}this.bn=!1,this.jn()}))}Rn(...t){return up.error.guard((()=>this.ln(...t)))}Tn(t,n){const i={};let s=Object.keys(t);s=s.concat(Object.keys(n)),s=e.uniq(s);for(let r of s){const s=t[r],o=n[r];e.isEqual(s,o)||(i[r]=o)}return i}gn(){return up.Params.fromContainer(this.ge).toObject()}xn(t={}){const e=this.gn();this.Fn(e)&&this.En(e,t)}On(){e.task((()=>this.xn()))}}},5949:()=>{const t=up.util;up.FIFOCache=class FIFOCache{constructor({capacity:e=10,normalizeKey:n=t.identity}={}){this.Pn=new Map,this.An=e,this.Ln=n}get(t){return t=this.Ln(t),this.Pn.get(t)}set(t,e){if(this.Pn.size===this.An){let t=this.Pn.keys().next().value;this.Pn.delete(t)}t=this.Ln(t),this.Pn.set(t,e)}clear(){this.Pn.clear()}}},665:()=>{up.FocusCapsule=class FocusCapsule{constructor(t,e){this.$n=t,this.Dn=e}restore(t,e){let n=up.fragment.get(this.$n,{layer:t});if(n)return up.viewport.copyCursorProps(this.Dn,n),up.focus(n,e),!0}static preserve(t){let e=up.viewport.focusedElementWithin(t.element);if(!e)return;let n=up.fragment.tryToTarget(e);return n?new this(n,up.viewport.copyCursorProps(e)):void 0}}},5240:function(){var t=this&&this.M||function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{c(i.next(t))}catch(t){r(t)}}function u(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((i=i.apply(t,e||[])).next())}))},e=this&&this.Mn||function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n};const n=up.util,i=up.element;up.FormValidator=class FormValidator{constructor(t){this.Hn=t,this.Nn=[],this.qn=null,this.Un=!1,this.Bn(),this.zn()}zn(){up.fragment.onAborted(this.Hn,(t=>this.In(t)))}In(t){this.Nn.length&&(this.Nn=[],this.Kn.reject(new up.Aborted(t.reason)),this.Bn())}Bn(){this.Kn=n.newDeferred()}watchContainer(t){let{event:e}=this.Vn(t);up.on(t,e,{guard:()=>up.fragment.isAlive(t)},(()=>up.error.muteUncriticalRejection(this.validate({origin:t}))))}validate(t={}){let e=this.Xn(t);return this.Nn.push(...e),this.Wn(),this.Kn}Xn(t){let e=this.Jn(t)||this.Gn(t)||this.Qn(t.origin);for(let n of e)n.renderOptions=this.Vn(n.origin,t),n.target=up.fragment.resolveOrigin(n.target,n);return e}Gn(t){var{origin:n}=t,i=e(t,["origin"]);if(up.form.isField(n))return this.Yn(n)||this.Zn(n,i)}Zn(t,{formGroup:e=!0}){if(!e)return;let n=up.form.groupSolution(t);return n?(up.puts("up.validate()","Validating form group of field %o",t),[n]):void 0}Jn({target:t,origin:e}){if(n.isString(t)){up.puts("up.validate()",'Validating target "%s"',t);let i=up.fragment.splitTarget(t);return n.compact(i.map((function(t){let n=up.fragment.get(t,{origin:e});if(n)return{element:n,target:t,origin:e};up.fail('Validation target "%s" does not match an element',t)})))}}Qn(t){return up.puts("up.validate()","Validating element %o",t),[{element:t,target:up.fragment.toTarget(t),origin:t}]}Yn(t){let e=t.closest("[up-validate]");if(e){let n=i.booleanOrStringAttr(e,"up-validate");return this.Jn({target:n,origin:t})}}Vn(t,e){return up.form.watchOptions(t,e,{defaults:{event:"change"}})}Wn(){let t=this.Nn.map((t=>t.renderOptions.delay)),e=Math.min(...t)||0;clearTimeout(this.qn),this.qn=n.timer(e,(()=>{this.qn=null,this.ti()}))}ti(){up.error.muteUncriticalRejection(this.ei())}ei(){var e;return t(this,void 0,void 0,(function*(){if(!this.Nn.length)return;if(this.Un)return;if(this.qn)return;let t=this.Nn;this.Nn=[];let i=n.map(t,"origin"),s=n.flatMap(i,up.form.fields),r=n.uniq(n.map(s,"name")),o=this.ni(t),u=n.map(t,"renderOptions"),c=n.mergeDefined(...u,{dataMap:o},up.form.destinationOptions(this.Hn));c.target=n.map(t,"target").join(", "),c.feedback=n.some(u,"feedback"),c.origin=this.Hn,null!==(e=c.focus)&&void 0!==e||(c.focus="keep"),c.failOptions=!1,c.defaultMaybe=!0,c.params=up.Params.merge(c.params,...n.map(u,"params")),c.headers=n.merge(...n.map(u,"headers")),this.ii(c.headers,r),c.guardEvent=up.event.build("up:form:validate",{fields:s,log:"Validating form",params:c.params,form:this.Hn}),this.Un=!0;let a=this.Kn;this.Bn(),c.disable=!1;for(let e of t)up.form.disableWhile(a,{disable:e.renderOptions.disable,origin:e.origin});try{a.resolve(up.render(c)),yield a}finally{this.Un=!1,this.ti()}}))}ii(t,e){let n=up.protocol.headerize("validate"),i=e.join(" ");(!i||i.length>up.protocol.config.maxHeaderSize)&&(i=":unknown"),t[n]=i}ni(t){let e={};for(let i of t){let t=n.pluckKey(i.renderOptions,"data");n.pluckKey(i.renderOptions,"keepData")&&(t=up.data(i.element)),t&&(e[i.target]=t)}return e}static forElement(t){let e=up.form.get(t);return e.upFormValidator||(e.upFormValidator=new this(e))}}},2587:()=>{const t=up.util,e=/^([^ >+(]+) (.+)$/;up.FragmentFinder=class FragmentFinder{constructor(t){var e;this.Ye=t,this.j=t.origin,this.si=t.selector,this.ri=t.document||window.document,this.oi=null!==(e=t.match)&&void 0!==e?e:up.fragment.config.match,this.ui=t.preferOldElements}find(){return this.ci()||this.ai()||this.hi()}ci(){if(this.ui)return this.ui.find((t=>this.ri.contains(t)&&up.fragment.matches(t,this.si)))}ai(){var t;if("region"===this.oi&&!up.fragment.containsMainPseudo(this.si)&&(null===(t=this.j)||void 0===t?void 0:t.isConnected))return this.li()||this.pi()}li(){return up.fragment.closest(this.j,this.si,this.Ye)}pi(){let n=up.fragment.splitTarget(this.si);return t.findResult(n,(t=>{let n=t.match(e);if(n){let t=up.fragment.closest(this.j,n[1],this.Ye);if(t)return up.fragment.getDumb(t,n[2])}}))}hi(){return up.fragment.getDumb(this.ri,this.si,this.Ye)}}},7031:()=>{const t=up.util,e=up.element,n={preventScroll:!0};up.FragmentFocus=class FragmentFocus extends up.FragmentProcessor{keys(){return super.keys().concat(["hash","focusCapsule","inputDevice"])}processPrimitive(e){switch(e){case"keep":return this.fi();case"restore":return this.di();case"target":case!0:return this.mi(this.fragment);case"layer":return this.mi(this.layer.getFocusElement());case"main":return this.gi(":main");case"hash":return this.vi();case"autofocus":return this.bi();default:if(t.isString(e))return this.gi(e)}}processElement(t){return this.mi(t)}resolveCondition(t){return"lost"===t?this.yi():super.resolveCondition(t)}gi(t){let e=this.findSelector(t);return this.mi(e)}fi(){var t;if(this.yi())return null===(t=this.focusCapsule)||void 0===t?void 0:t.restore(this.layer,n)}di(){return up.viewport.restoreFocus({layer:this.layer})}bi(){let t=this.fragment&&e.subtree(this.fragment,"[autofocus]")[0];if(t)return this.mi(t)}mi(t){if(t)return up.focus(t,Object.assign(Object.assign({force:!0},n),{inputDevice:this.inputDevice})),!0}vi(){let t=up.viewport.firstHashTarget(this.hash,{layer:this.layer});if(t)return this.mi(t)}yi(){return!this.layer.hasFocus()}}},8057:()=>{const t=up.element;up.FragmentPolling=class FragmentPolling{constructor(t){this.Ye=up.radio.pollOptions(t),this.Qe=t,up.destructor(t,this.wi.bind(this)),up.fragment.onAborted(t,this._i.bind(this)),this.Oi="initialized",this.fn=!0,this.ki=!1,this.Si()}static forFragment(t){return t.upPolling||(t.upPolling=new this(t))}onPollAttributeObserved(){this.xi()}wi(){this.Ei()}xi(t){if(Object.assign(this.Ye,t),"started"!==this.Oi){if(!up.fragment.isTargetable(this.Qe))return void up.warn("[up-poll]","Cannot poll untargetable fragment %o",this.Qe);this.Oi="started",this.Ci(),this.ji()}}Ei(){var t;"started"===this.Oi&&(this.Fi(),this.Oi="stopped",null===(t=this.unbindEvents)||void 0===t||t.call(this))}forceStart(t){Object.assign(this.Ye,t),this.forceStarted=!0,this.xi()}forceStop(){this.Ei(),this.forceStarted=!1}Ci(){this.unbindEvents||(this.unbindEvents=up.on("visibilitychange up:layer:opened up:layer:dismissed up:layer:accepted",this.Ti.bind(this)))}Ti(){this.Ri()&&this.ji()}Ri(){return!document.hidden&&("any"===this.Ye.ifLayer||this.Pi())}Fi(){clearTimeout(this.reloadTimer),this.reloadTimer=null}ji(){this.reloadTimer||this.ki||(this.Fi(),this.reloadTimer=setTimeout(this.Ai.bind(this),this.Li()))}Ai(){this.reloadTimer=null,this.$i()}$i(){if("started"===this.Oi){if(this.Ri())return up.emit(this.Qe,"up:fragment:poll",{log:["Polling fragment",this.Qe]}).defaultPrevented?(up.puts("[up-poll]","User prevented up:fragment:poll event"),this.Si(),void this.ji()):void this.Di();up.puts("[up-poll]","Will not poll hidden fragment")}}Mi(){var e,n;return null!==(n=null!==(e=this.Ye.interval)&&void 0!==e?e:t.numberAttr(this.Qe,"up-interval"))&&void 0!==n?n:up.radio.config.pollInterval}Li(){return Math.max(this.Mi()-this.Hi(),0)}Hi(){return new Date-this.Ni}Pi(){var t,e;return this.layer||(this.layer=up.layer.get(this.Qe)),null===(e=null===(t=this.layer)||void 0===t?void 0:t.isFront)||void 0===e?void 0:e.call(t)}Di(){this.Fi();let t={url:this.Ye.url,fail:!1,background:!0},e=this.fn;try{this.fn=!1,this.ki=!0,up.reload(this.Qe,t).then(this.qi.bind(this),this.Ui.bind(this))}finally{this.fn=e}}_i({newLayer:t}){this.fn&&!t&&this.Ei()}qi({fragment:t}){this.ki=!1,this.Si(),t?this.Bi(t):this.ji()}Bi(t){this.Ei(),this.forceStarted&&up.fragment.matches(this.Qe,t)&&this.constructor.forFragment(t).forceStart(this.Ye)}Ui(t){this.ki=!1,this.Si(),this.ji(),up.error.throwCritical(t)}Si(){this.Ni=new Date}}},2828:()=>{const t=up.util;up.FragmentProcessor=class FragmentProcessor extends up.Record{keys(){return["fragment","autoMeans","origin","layer"]}process(t){let e=this.preprocess(t);return this.tryProcess(e)}preprocess(e){return t.parseTokens(e,{separator:"or"})}tryProcess(e){if(t.isArray(e))return this.processArray(e);if(t.isFunction(e)){let t=up.error.guard((()=>e(this.fragment,this.attributes())));return this.tryProcess(t)}if(t.isElement(e))return this.processElement(e);if(t.isString(e)){if("auto"===e)return this.tryProcess(this.autoMeans);let t=e.match(/^(.+?)-if-(.+?)$/);if(t)return this.resolveCondition(t[2])&&this.process(t[1])}return this.processPrimitive(e)}processArray(e){return t.find(e,(t=>this.tryProcess(t)))}resolveCondition(t){if("main"===t)return this.fragment&&up.fragment.contains(this.fragment,":main")}findSelector(t){const e={layer:this.layer,origin:this.origin};let n=this.fragment&&up.fragment.get(this.fragment,t,e)||up.fragment.get(t,e);if(n)return n;up.warn("up.render()",'Could not find an element matching "%s"',t)}}},4850:()=>{const t=up.util;up.FragmentScrolling=class FragmentScrolling extends up.FragmentProcessor{keys(){return super.keys().concat(["hash","mode","revealTop","revealMax","revealSnap","scrollBehavior"])}processPrimitive(e){switch(e){case"reset":return this.zi();case"layer":return this.Ii();case"main":return this.Ki(":main");case"restore":return this.Vi();case"hash":return this.hash&&up.viewport.revealHash(this.hash,this.attributes());case"target":case"reveal":case!0:return this.Xi(this.fragment);default:if(t.isString(e))return this.Ki(e)}}processElement(t){return this.Xi(t)}Xi(t){if(t)return up.reveal(t,this.attributes()),!0}Ki(t){let e=this.findSelector(t);return this.Xi(e)}Ii(){return this.Xi(this.layer.getBoxElement())}zi(){return up.viewport.resetScroll(Object.assign(Object.assign({},this.attributes()),{around:this.fragment})),!0}Vi(){return up.viewport.restoreScroll(Object.assign(Object.assign({},this.attributes()),{around:this.fragment}))}}},7956:()=>{const t=up.element,e=up.util;up.Layer=class Layer extends up.Record{keys(){return["element","stack","history","mode","context","lastScrollTops","lastFocusCapsules"]}defaults(){return{context:{},lastScrollTops:up.viewport.newStateCache(),lastFocusCapsules:up.viewport.newStateCache()}}constructor(t={}){if(super(t),!this.mode)throw"missing { mode } option"}setupHandlers(){up.link.convertClicks(this)}teardownHandlers(){}mainTargets(){return up.layer.mainTargets(this.mode)}sync(){}accept(){throw new up.NotImplemented}dismiss(){throw new up.NotImplemented}peel(t){this.stack.peel(this,t)}evalOption(t){return e.evalOption(t,this)}isCurrent(){return this.stack.isCurrent(this)}isFront(){return this.stack.isFront(this)}isRoot(){return this.stack.isRoot(this)}isOverlay(){return this.stack.isOverlay(this)}isOpen(){return this.stack.isOpen(this)}isClosed(){return this.stack.isClosed(this)}get parent(){return this.stack.parentOf(this)}get child(){return this.stack.childOf(this)}get ancestors(){return this.stack.ancestorsOf(this)}get descendants(){return this.stack.descendantsOf(this)}get subtree(){return[this,...this.descendants]}get index(){var t;return null!==(t=this.Wi)&&void 0!==t?t:this.Wi=this.stack.indexOf(this)}getContentElement(){return this.contentElement||this.element}getBoxElement(){return this.boxElement||this.element}getFocusElement(){return this.getBoxElement()}getFirstSwappableElement(){throw new up.NotImplemented}contains(t){return t.closest(up.layer.anySelector())===this.element}on(...t){return this.Ji(t).bind()}off(...t){return this.Ji(t).unbind()}Ji(t){return up.EventListenerGroup.fromBindArgs(t,{guard:t=>this.Gi(t),elements:[this.element],baseLayer:this})}Gi(t){return this.contains(t.target)}wasHitByMouseEvent(t){const e=document.elementFromPoint(t.clientX,t.clientY);return!e||this.contains(e)}Qi(t){return up.EventEmitter.fromEmitArgs(t,{layer:this})}emit(...t){return this.Qi(t).emit()}isDetached(){return!this.element.isConnected}saveHistory(){this.history&&(this.savedTitle=document.title,this.savedMetaTags=up.history.findMetaTags(),this.savedLocation=up.history.location,this.savedLang=up.history.getLang())}restoreHistory(){this.showsLiveHistory()&&(this.savedLocation&&up.history.push(this.savedLocation),this.savedTitle&&(document.title=this.savedTitle),this.savedMetaTags&&up.history.updateMetaTags(this.savedMetaTags),e.isString(this.savedLang)&&up.history.updateLang(this.savedLang))}asCurrent(t){return this.stack.asCurrent(this,t)}updateHistory(t){var n,i;e.isString(t.location)&&(this.location=t.location),up.history.config.updateMetaTags&&e.isList(t.metaTags)&&(null===(i=null===(n=up.migrate)||void 0===n?void 0:n.warnOfHungryMetaTags)||void 0===i||i.call(n,t.metaTags),this.metaTags=t.metaTags),e.isString(t.title)&&(this.title=t.title),e.isString(t.lang)&&(this.lang=t.lang)}showsLiveHistory(){return this.history&&this.isFront()}get title(){return this.showsLiveHistory()?document.title:this.savedTitle}set title(t){this.savedTitle=t,this.showsLiveHistory()&&(document.title=t)}get metaTags(){return this.showsLiveHistory()?up.history.findMetaTags():this.savedMetaTags}set metaTags(t){this.savedMetaTags=t,this.showsLiveHistory()&&up.history.updateMetaTags(t)}get lang(){return this.showsLiveHistory()?up.history.getLang():this.savedLang}set lang(t){this.savedLang=t,this.showsLiveHistory()&&up.history.updateLang(t)}get location(){return this.showsLiveHistory()?up.history.location:this.savedLocation}set location(t){(this.location!==(t=up.history.normalizeURL(t))||this.opening)&&(this.savedLocation=t,this.showsLiveHistory()&&up.history.push(t),this.opening||this.emit("up:layer:location:changed",{location:t}))}selector(t){return this.constructor.selector(t)}static selector(t){throw new up.NotImplemented}toString(){throw new up.NotImplemented}affix(...e){return t.affix(this.getFirstSwappableElement(),...e)}[e.isEqual.key](t){return this.constructor===t.constructor&&this.element===t.element}hasFocus(){let t=document.activeElement;return t!==document.body&&this.element.contains(t)}reset(){Object.assign(this,this.defaults())}}},7101:()=>{var t;up.Layer.Cover=((t=class Cover extends up.Layer.OverlayWithViewport{}).mode="cover",t)},5580:()=>{var t;up.Layer.Drawer=((t=class Drawer extends up.Layer.OverlayWithViewport{}).mode="drawer",t)},86:()=>{var t;up.Layer.Modal=((t=class Modal extends up.Layer.OverlayWithViewport{}).mode="modal",t)},7403:function(){var t=this&&this.M||function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{c(i.next(t))}catch(t){r(t)}}function u(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((i=i.apply(t,e||[])).next())}))};const e=up.element,n=up.util;up.Layer.Overlay=class Overlay extends up.Layer{keys(){return super.keys().concat(["position","align","size","origin","class","backdrop","openAnimation","closeAnimation","openDuration","closeDuration","openEasing","closeEasing","backdropOpenAnimation","backdropCloseAnimation","dismissable","dismissLabel","dismissAriaLabel","onOpened","onAccept","onAccepted","onDismiss","onDismissed","acceptEvent","dismissEvent","acceptLocation","dismissLocation","opening"])}constructor(t){super(t),!0===this.dismissable?this.dismissable=["button","key","outside"]:!1===this.dismissable?this.dismissable=[]:this.dismissable=n.parseTokens(this.dismissable),this.acceptLocation&&(this.acceptLocation=new up.URLPattern(this.acceptLocation)),this.dismissLocation&&(this.dismissLocation=new up.URLPattern(this.dismissLocation))}callback(t){let e=this[t];if(e)return e.bind(this)}createElement(t){this.nesting||(this.nesting=this.Yi());const e=n.compactObject(n.pick(this,["align","position","size","class","nesting"]));this.element=this.affixPart(t,null,e)}createBackdropElement(t){this.backdropElement=this.affixPart(t,"backdrop")}createViewportElement(t){this.viewportElement=this.affixPart(t,"viewport",{"up-viewport":""})}createBoxElement(t){this.boxElement=this.affixPart(t,"box")}createContentElement(t){this.contentElement=this.affixPart(t,"content")}setContent(t){this.contentElement.append(t),this.onContentSet()}onContentSet(){}createDismissElement(t){return this.dismissElement=this.affixPart(t,"dismiss",{"up-dismiss":'":button"',"aria-label":this.dismissAriaLabel}),e.affix(this.dismissElement,'span[aria-hidden="true"]',{text:this.dismissLabel})}affixPart(t,n,i={}){return e.affix(t,this.selector(n),i)}static selector(t){return n.compact(["up",this.mode,t]).join("-")}Yi(){const{parent:t}=this;return this.mode===t.mode?1+t.Yi():0}setupHandlers(){var t,e;super.setupHandlers(),this.overlayFocus=new up.OverlayFocus(this),this.Zi("button")&&this.createDismissElement(this.getBoxElement()),this.Zi("outside")&&(this.viewportElement?up.on(this.viewportElement,"up:click",(t=>{t.target===this.viewportElement&&this.ts(t,!0)})):this.unbindParentClicked=this.parent.on("up:click",((t,e)=>{if(!up.layer.isWithinForeignOverlay(e)){const n=this.origin&&this.origin.contains(e);this.ts(t,n)}}))),this.Zi("key")&&(this.unbindEscapePressed=up.event.onEscape((t=>this.onEscapePressed(t)))),this.registerClickCloser("up-accept",((t,e)=>{this.accept(t,e)})),this.registerClickCloser("up-dismiss",((t,e)=>{this.dismiss(t,e)})),null===(e=(t=up.migrate).registerLayerCloser)||void 0===e||e.call(t,this),this.es(this.acceptEvent,this.accept),this.es(this.dismissEvent,this.dismiss),this.on("up:click","label[for]",((t,e)=>this.ns(t,e)))}ns(t,n){let i=n.getAttribute("for"),s=up.form.fieldSelector(e.idSelector(i)),r=up.fragment.all(s,{layer:"any"}),o=up.fragment.all(s,{layer:this});if(r.length>1&&o[0]!==r[0]){t.preventDefault();const e=o[0];e.focus(),e.matches("input[type=checkbox], input[type=radio]")&&e.click()}}ts(t,e){up.log.putsEvent(t),e&&up.event.halt(t),this.dismiss(":outside",{origin:t.target})}onEscapePressed(t){if(this.isFront()){let e=up.form.focusedField();e?e.blur():this.Zi("key")&&(up.event.halt(t,{log:!0}),this.dismiss(":key"))}}registerClickCloser(t,n){let i=`[${t}]`;this.on("up:click",i,(function(s){up.event.halt(s,{log:!0});const r=s.target.closest(i),o=e.jsonAttr(r,t),u={origin:r},c=new up.OptionsParser(r,u);c.booleanOrString("animation"),c.string("easing"),c.number("duration"),c.string("confirm"),up.error.muteUncriticalSync((()=>n(o,u)))}))}es(t,e){if(t)return this.on(t,(t=>{t.preventDefault(),e.call(this,t,{response:t.response})}))}tryAcceptForLocation(t){this.ss(this.acceptLocation,this.accept,t)}tryDismissForLocation(t){this.ss(this.dismissLocation,this.dismiss,t)}ss(t,e,n){let i,s;if(t&&(i=this.location)&&(s=t.recognize(i))){const t=Object.assign(Object.assign({},s),{location:i});e.call(this,t,n)}}teardownHandlers(){var t,e;super.teardownHandlers(),null===(t=this.unbindParentClicked)||void 0===t||t.call(this),null===(e=this.unbindEscapePressed)||void 0===e||e.call(this),this.overlayFocus.teardown()}destroyElements(t){const e=Object.assign(Object.assign({},t),{animation:()=>this.startCloseAnimation(t),onFinished:()=>{var e;this.onElementsRemoved(),null===(e=t.onFinished)||void 0===e||e.call(t)},log:!1});up.destroy(this.element,e)}onElementsRemoved(){}rs(t={}){const e=up.animate(this.getBoxElement(),t.boxAnimation,t);let n;return this.backdrop&&!up.motion.isNone(t.boxAnimation)&&(n=up.animate(this.backdropElement,t.backdropAnimation,t)),Promise.all([e,n])}startOpenAnimation(e={}){var n;return t(this,void 0,void 0,(function*(){yield this.rs({boxAnimation:null!==(n=e.animation)&&void 0!==n?n:this.evalOption(this.openAnimation),backdropAnimation:"fade-in",easing:e.easing||this.openEasing,duration:e.duration||this.openDuration}),this.wasEverVisible=!0}))}startCloseAnimation(t={}){var e;return this.rs({boxAnimation:this.wasEverVisible&&(null!==(e=t.animation)&&void 0!==e?e:this.evalOption(this.closeAnimation)),backdropAnimation:this.wasEverVisible&&"fade-out",easing:t.easing||this.closeEasing,duration:t.duration||this.closeDuration})}accept(t=null,e={}){return this.os("accept",t,e)}dismiss(t=null,e={}){return this.os("dismiss",t,e)}Zi(t){return n.contains(this.dismissable,t)}os(t,e,n){return n=Object.assign(Object.assign({},n),{verb:t,value:e,layer:this}),new up.Change.CloseLayer(n).execute()}getFirstSwappableElement(){return this.getContentElement().children[0]}toString(){return`${this.mode} overlay`}}},6412:()=>{up.Layer.OverlayWithTether=class OverlayWithTether extends up.Layer.Overlay{createElements(){this.origin||up.fail("Missing { origin } option"),this.us=new up.Tether({anchor:this.origin,align:this.align,position:this.position}),this.createElement(this.us.parent),this.createContentElement(this.element)}onContentSet(){this.us.start(this.element)}onElementsRemoved(){this.us.stop()}sync(){this.isOpen()&&(this.isDetached()||this.us.isDetached()?this.dismiss(":detached",{animation:!1,preventable:!1}):this.us.sync())}}},7965:()=>{up.Layer.OverlayWithViewport=class OverlayWithViewport extends up.Layer.Overlay{static getParentElement(){return document.body}createElements(){up.viewport.bodyShifter.raiseStack(),this.createElement(this.constructor.getParentElement()),this.backdrop&&this.createBackdropElement(this.element),this.createViewportElement(this.element),this.createBoxElement(this.viewportElement),this.createContentElement(this.boxElement)}onElementsRemoved(){up.viewport.bodyShifter.lowerStack()}sync(){this.isDetached()&&this.isOpen()&&this.constructor.getParentElement().appendChild(this.element)}}},4552:()=>{var t;up.Layer.Popup=((t=class Popup extends up.Layer.OverlayWithTether{}).mode="popup",t)},7771:()=>{var t;const e=up.element;up.Layer.Root=((t=class Root extends up.Layer{get element(){return e.root}constructor(t){super(t),this.setupHandlers()}getFirstSwappableElement(){return document.body}static selector(){return"html"}setupHandlers(){this.element.upHandlersApplied||(this.element.upHandlersApplied=!0,super.setupHandlers())}sync(){this.setupHandlers()}accept(){this.cs()}dismiss(){this.cs()}cs(){up.fail("Cannot close the root layer")}toString(){return"root layer"}}).mode="root",t)},6066:()=>{const t=up.util,e=up.element;up.LayerLookup=class LayerLookup{constructor(e,...n){this.i=e;const i=t.parseArgIntoOptions(n,"layer");if(!1!==i.normalizeLayerOptions&&up.layer.normalizeOptions(i),this.hs=t.parseTokens(i.layer),this.j=i.origin,this.Rt=i.baseLayer||this.ls()||this.i.current,t.isString(this.Rt)){const t=Object.assign(Object.assign({},i),{baseLayer:this.i.current,normalizeLayerOptions:!1});this.Rt=new this.constructor(this.i,this.Rt,t).first()}}ls(){if(this.j)return this.ps(this.j)}first(){return this.all()[0]}all(){let e=t.flatMap(this.hs,(t=>this.fs(t)));return e=t.compact(e),e=t.uniq(e),e}ps(n){return n=e.get(n),t.find(this.i.reversed(),(t=>t.contains(n)))}ds(t){return this.i.at(t)}fs(e){if(e instanceof up.Layer)return e;if(t.isNumber(e))return this.ds(e);if(/^\d+$/.test(e))return this.ds(Number(e));if(t.isElementish(e))return this.ps(e);switch(e){case"any":return[this.Rt,...this.i.reversed()];case"current":return this.Rt;case"closest":return this.i.selfAndAncestorsOf(this.Rt);case"parent":return this.Rt.parent;case"ancestor":case"ancestors":return this.Rt.ancestors;case"child":return this.Rt.child;case"descendant":case"descendants":return this.Rt.descendants;case"subtree":return this.Rt.subtree;case"new":return"new";case"root":return this.i.root;case"overlay":case"overlays":return t.reverse(this.i.overlays);case"front":return this.i.front;case"origin":return this.ls();default:return up.fail("Unknown { layer } option: %o",e)}}}},6387:()=>{const t=up.util;up.LayerStack=class LayerStack{constructor(){this.gs=[],this.layers=[this.vs()]}vs(){return up.layer.build({mode:"root",stack:this})}remove(e){t.remove(this.layers,e)}peel(e,n){const i=t.reverse(e.descendants),s=Object.assign(Object.assign({},n),{preventable:!1});for(let t of i)t.dismiss(":peel",s)}reset(){this.peel(this.root,{animation:!1}),this.gs=[],this.root.reset()}isOpen(e){return t.contains(this.layers,e)}isClosed(t){return!this.isOpen(t)}parentOf(t){return this.layers[t.index-1]}childOf(t){return this.layers[t.index+1]}ancestorsOf(e){return t.reverse(this.layers.slice(0,e.index))}selfAndAncestorsOf(t){return[t,...t.ancestors]}descendantsOf(t){return this.layers.slice(t.index+1)}isRoot(t){return this.root===t}isOverlay(t){return this.root!==t}isCurrent(t){return this.current===t}isFront(t){return this.front===t}get(...t){return this.getAll(...t)[0]}getAll(...t){return new up.LayerLookup(this,...t).all()}sync(){for(let t of this.layers)t.sync()}asCurrent(t,e){try{return this.gs.push(t),e()}finally{this.gs.pop()}}reversed(){return t.reverse(this.layers)}dismissOverlays(e=null,n={}){n.dismissable=!1;for(let i of t.reverse(this.overlays))i.dismiss(e,n)}at(t){return this.layers[t]}indexOf(t){return this.layers.indexOf(t)}get count(){return this.layers.length}get root(){return this.layers[0]}get overlays(){return this.root.descendants}get current(){return t.last(this.gs)||this.front}get front(){return t.last(this.layers)}}},5390:()=>{up.LinkFeedbackURLs=class LinkFeedbackURLs{constructor(t){const e=up.feedback.normalizeURL;if(this.bs=up.link.isSafe(t),this.bs){const n=t.getAttribute("href");n&&"#"!==n&&(this.href=e(n));const i=t.getAttribute("up-href");i&&(this.ys=e(i));const s=t.getAttribute("up-alias");s&&(this.ws=new up.URLPattern(s,e))}}isCurrent(t){var e,n;return!(!t||this.href!==t&&this.ys!==t&&!(null===(n=null===(e=this.ws)||void 0===e?void 0:e.test)||void 0===n?void 0:n.call(e,t,!1)))}}},2460:()=>{const t=up.util,e=up.element;up.LinkFollowIntent=class LinkFollowIntent{constructor(t,e){this._s=t,this.ln=e,this.Os("mouseenter mousedown touchstart",(t=>this.ks(t))),this.Os("mouseleave",(()=>this.Ss())),up.fragment.onAborted(this._s,(()=>this.Ss()))}Os(t,e){up.on(this._s,t,{passive:!0},e)}ks(e){if(up.link.shouldFollowEvent(e,this._s))if(this.Ss(),"mouseenter"===e.type){let n=this.xs();this.Es=t.timer(n,(()=>this.Rn(e)))}else this.Rn(e)}Ss(){clearTimeout(this.Es),up.network.abort((t=>t.origin===this._s&&t.background))}xs(){var t;return null!==(t=e.numberAttr(this._s,"up-preload-delay"))&&void 0!==t?t:up.link.config.preloadDelay}Rn(t){up.log.putsEvent(t),up.error.muteUncriticalRejection(this.ln())}}},1653:()=>{let t="up.log.enabled",e=!1;try{e=!!(null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem(t))}catch(t){}up.LogConfig=class LogConfig extends up.Config{constructor(){super((()=>({banner:!0,format:!0})))}get enabled(){return e}set enabled(n){e=n;try{null===sessionStorage||void 0===sessionStorage||sessionStorage.setItem(t,n?"1":"")}catch(t){}}}},7792:function(){var t=this&&this.M||function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{c(i.next(t))}catch(t){r(t)}}function u(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((i=i.apply(t,e||[])).next())}))};const e=up.util,n=up.element;up.MotionController=class MotionController{constructor(t){this.Cs=`up-${t}`,this.si=`.${this.Cs}`,this.finishEvent=`up:${t}:finish`,this.finishCount=0,this.js=0}startFunction(t,e,i={}){var s;t=n.list(t);const r=()=>up.error.muteUncriticalRejection(e());if(i.trackMotion=null!==(s=i.trackMotion)&&void 0!==s?s:up.motion.isEnabled(),!1===i.trackMotion)return r();{i.trackMotion=!1,this.finish(t),this.Fs(t);let e=this.Ts(t,r);return e=e.then((()=>this.Rs(t))),e}}finish(t){var e,n;if(this.finishCount++,0!==this.js&&up.motion.isEnabled()){t=this.Ps(t);for(let e of t)this.As(e);return null===(n=(e=up.migrate).formerlyAsync)||void 0===n?void 0:n.call(e,"up.motion.finish()")}}Ps(t){return t?e.flatMap(t,(t=>n.list(t.closest(this.si),t.querySelectorAll(this.si)))):document.querySelectorAll(this.si)}isActive(t){return t.classList.contains(this.Cs)}As(t){this.Ls(t)}Ls(t,e={}){return e=Object.assign({target:t,log:!1},e),up.emit(this.finishEvent,e)}Fs(t){this.js++,this.$s(t,!0)}Rs(t){this.js--,this.$s(t,!1)}$s(t,e){for(let n of t)n.classList.toggle(this.Cs,e)}Ts(t,e){if(t.length<2)return e();const n=up.on(t,this.finishEvent,(e=>{if(!e.forwarded)for(let n of t)n!==e.target&&this.isActive(n)&&this.Ls(n,{forwarded:!0})}));return e().then(n)}reset(){return t(this,void 0,void 0,(function*(){yield this.finish(),this.finishCount=0,this.js=0}))}}},4308:()=>{const t=up.util,e=up.element;up.NonceableCallback=class NonceableCallback{constructor(t,e){this.script=t,this.nonce=e}static fromString(t){let e=t.match(/^(nonce-([^\s]+)\s)?(.*)$/);return new this(e[3],e[2])}toFunction(...t){if(this.nonce){let e=this;return function(...n){return e.Ds(this,t,n)}}return new Function(...t,this.script)}toString(){return`nonce-${this.nonce} ${this.script}`}Ds(t,e,n){let i,s=`\n try {\n up.noncedEval.value = (function(${e.join()}) {\n ${this.script}\n }).apply(up.noncedEval.thisArg, up.noncedEval.args)\n } catch (error) {\n up.noncedEval.error = error\n }\n `;try{if(up.noncedEval={args:n,thisArg:t},i=up.element.affix(document.body,"script",{nonce:this.nonce,text:s}),up.noncedEval.error)throw up.noncedEval.error;return up.noncedEval.value}finally{up.noncedEval=void 0,i&&i.remove()}}Ms(e){return this.nonce&&t.contains(e,this.nonce)}static adoptNonces(n,i){if(!(null==i?void 0:i.length))return;const s=t.memoize(up.protocol.cspNonce);t.each(up.script.config.nonceableAttributes,(r=>{let o=e.subtree(n,`[${r}^="nonce-"]`);t.each(o,(t=>{let e=t.getAttribute(r),n=this.fromString(e),o=(t,...n)=>up.log.warn("up.render()",`Cannot use callback [${r}="${e}"]: ${t}`,...n);if(!n.Ms(i))return o("Callback's CSP nonce (%o) does not match response header (%o)",n.nonce,i);let u=s();if(!u)return o("Current page's CSP nonce is unknown");n.nonce=u,t.setAttribute(r,n.toString())}))}))}}},1104:()=>{const t=up.util,e=up.element;up.OptionsParser=class OptionsParser{constructor(t,e,n={}){this.Ye=e,this.H=t,this.Hs=n,this.Ns=n.fail,this.qs=n.closest,this.Us=n.attrPrefix||"up-",this.Bs=n.defaults||{}}string(t,n){this.parse(e.attr,t,n)}boolean(t,n){this.parse(e.booleanAttr,t,n)}number(t,n){this.parse(e.numberAttr,t,n)}booleanOrString(t,n){this.parse(e.booleanOrStringAttr,t,n)}json(t,n){this.parse(e.jsonAttr,t,n)}callback(t,n={}){this.parse(((t,i)=>e.callbackAttr(t,i,n)),t,n)}parse(e,n,i={}){var s,r;const o=t.wrapList(null!==(s=i.attr)&&void 0!==s?s:this.zs(n));let u=this.Ye[n];for(let t of o)null!=u||(u=this.Is(e,this.H,t));null!=u||(u=null!==(r=i.default)&&void 0!==r?r:this.Bs[n]);let c,a=i.normalize;if(a&&(u=a(u)),t.isDefined(u)&&(this.Ye[n]=u),this.Ns&&(c=up.fragment.failKey(n))){const n=t.compact(t.map(o,(t=>this.Ks(t))));this.parse(e,c,Object.assign(Object.assign({},i),{attr:n}))}}include(t){let e=t(this.H,this.Ye,this.Hs);Object.assign(this.Ye,e)}Is(t,n,i){return this.qs?e.closestAttr(n,i,t):t(n,i)}Ks(t){return this.Vs(t,this.Us+"on-")||this.Vs(t,this.Us)}Vs(t,e){if(t.startsWith(e))return`${e}fail-${t.substring(e.length)}`}zs(e){return`${this.Us}${t.camelToKebabCase(e)}`}}},8665:()=>{const t=up.element,e=up.util;up.OverlayFocus=class OverlayFocus{constructor(t){this.C=t,this.mi=this.C.getFocusElement()}moveToFront(){this.Xs||(this.Xs=!0,this.Ws=up.on("focusin",(t=>this.Js(t))),this.Gs=t.setTemporaryAttrs(this.mi,{tabindex:"0",role:"dialog","aria-modal":"true"}),this.Qs=t.affix(this.mi,"beforebegin","up-focus-trap[tabindex=0]"),this.Ys=t.affix(this.mi,"afterend","up-focus-trap[tabindex=0]"))}moveToBack(){this.teardown()}teardown(){this.Xs&&(this.Xs=!1,this.Ws(),this.Gs(),this.Qs.remove(),this.Ys.remove())}Js(t){const{target:e}=t;this.Zs||up.layer.isWithinForeignOverlay(e)||(this.Zs=!0,e===this.Qs?this.tr():e!==this.Ys&&this.C.contains(e)||this.er(),this.Zs=!1)}er(t){up.focus(this.mi,t)}tr(){this.nr(this.C.getBoxElement())||this.er()}nr(t){for(let n of e.reverse(t.children))if(up.viewport.tryFocus(n)||this.nr(n))return!0}}},3645:()=>{const t=up.util,e=up.element;up.Params=class Params{constructor(t){this.clear(),this.addAll(t)}clear(){this.entries=[]}[t.copy.key](){return new up.Params(this)}toObject(){const e={};for(let n of this.entries){const{name:i,value:s}=n;t.isBasicObjectProperty(i)||(this.ir(i)?(e[i]||(e[i]=[]),e[i].push(s)):e[i]=s)}return e}toArray(){return this.entries}toFormData(){const t=new FormData;for(let e of this.entries)t.append(e.name,e.value);return t.entries||(t.originalArray=this.entries),t}toQuery(){let e=t.map(this.entries,this.sr.bind(this));return e=t.compact(e),e.join("&")}sr(e){const{value:n}=e;if(this.rr(n))return;let i=encodeURIComponent(e.name);return t.isGiven(n)&&(i+="=",i+=encodeURIComponent(n)),i}rr(t){return t instanceof Blob}hasBinaryValues(){const e=t.map(this.entries,"value");return t.some(e,this.rr)}toURL(e){let n=[e,this.toQuery()];n=t.filter(n,t.isPresent);const i=t.contains(e,"?")?"&":"?";return n.join(i)}add(t,e){this.entries.push({name:t,value:e})}addAll(e){t.isMissing(e)||(e instanceof this.constructor?this.entries.push(...e.entries):t.isArray(e)?this.entries.push(...e):t.isString(e)?this.ur(e):t.isFormData(e)?this.cr(e):t.isObject(e)?this.ar(e):up.fail("Unsupport params type: %o",e))}ar(e){for(let n in e){const i=e[n],s=t.isArray(i)?i:[i];for(let t of s)this.add(n,t)}}ur(e){for(let n of e.split("&"))if(n){let[e,i]=n.split("=");e=decodeURIComponent(e),i=t.isGiven(i)?decodeURIComponent(i):null,this.add(e,i)}}cr(t){for(let e of t.entries())this.add(...e)}set(t,e){this.delete(t),this.add(t,e)}delete(e){this.entries=t.reject(this.entries,this.hr(e))}hr(t){return e=>e.name===t}get(t){return this.ir(t)?this.getAll(t):this.getFirst(t)}getFirst(e){const n=t.find(this.entries,this.hr(e));return null==n?void 0:n.value}getAll(e){if(this.ir(e))return this.getAll(e);{const n=t.map(this.entries,this.hr(e));return t.map(n,"value")}}ir(t){return t.endsWith("[]")}[t.isBlank.key](){return 0===this.entries.length}static fromForm(t){return this.fromContainer(t)}static fromContainer(t){let e=up.form.fields(t);return this.fromFields(e)}static fromFields(e){const n=new this;for(let i of t.wrapList(e))n.addField(i);return n}addField(t){let n=(t=e.get(t)).name;if(n&&!t.disabled){const{tagName:e}=t,{type:i}=t;if("SELECT"===e)for(let e of t.querySelectorAll("option"))e.selected&&this.add(n,e.value);else if("checkbox"===i||"radio"===i)t.checked&&this.add(n,t.value);else{if("file"!==i)return this.add(n,t.value);for(let e of t.files)this.add(n,e)}}}[t.isEqual.key](e){return this.constructor===e.constructor&&t.isEqual(this.entries,e.entries)}static fromURL(e){const n=new this;let i=t.parseURL(e).search;return i&&(i=i.replace(/^\?/,""),n.addAll(i)),n}static stripURL(e){return t.normalizeURL(e,{search:!1})}static merge(...t){return t.reduce((function(t,e){return t.addAll(e),t}),new up.Params)}}},7782:()=>{const t=up.element;up.ProgressBar=class ProgressBar{constructor(){this.lr=0,this.H=t.affix(document.body,"up-progress-bar"),this.H.style.transition="width 300ms ease-out",this.pr(0),up.element.paint(this.H),this.dr=31,this.mr()}mr(){let t;t=this.dr<80?Math.random()<.15?7+5*Math.random():1.5+.5*Math.random():.13*(100-this.dr)*Math.random(),this.pr(this.dr+t),this.lr++;const e=300+40*this.lr;this.timeout=setTimeout(this.mr.bind(this),e)}pr(t){this.dr=t,this.H.style.width=`${t}vw`}destroy(){clearTimeout(this.timeout),this.H.remove()}conclude(){clearTimeout(this.timeout),this.pr(100),setTimeout(this.destroy.bind(this),300)}}},2406:()=>{const t=up.util;up.Record=class Record{keys(){throw"Return an array of keys"}defaults(t){return{}}constructor(t){Object.assign(this,this.defaults(t),this.attributes(t))}attributes(e=this){return t.pick(e,this.keys())}[t.copy.key](){return t.variant(this)}[t.isEqual.key](e){return this.constructor===e.constructor&&t.isEqual(this.attributes(),e.attributes())}}},1279:()=>{up.Rect=class Rect extends up.Record{keys(){return["left","top","width","height"]}get bottom(){return this.top+this.height}get right(){return this.left+this.width}grow(t){this.left-=t,this.top-=t,this.width+=2*t,this.height+=2*t}static fromElement(t){return new this(t.getBoundingClientRect())}}},2714:function(){var t,e=this&&this.M||function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{c(i.next(t))}catch(t){r(t)}}function u(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((i=i.apply(t,e||[])).next())}))};const n=up.util;up.RenderJob=(t=class RenderJob{constructor(t){this.options=up.RenderOptions.preprocess(t)}execute(){return this.gr=this.vr(),this}vr(){return e(this,void 0,void 0,(function*(){try{this.br();let t=yield this.yr().execute();return this.wr(t),t}catch(t){throw this.wr(t)||this._r(t),t}}))}wr(t){if(t instanceof up.RenderResult){let{onRendered:e,onFinished:i}=t.options;t.none||up.error.guard((()=>null==e?void 0:e(t)));let s=function(t){up.error.guard((()=>null==i?void 0:i(t)))};return this.finished.then(s,n.noop),!0}}_r(t){let e=t instanceof up.Aborted?"Rendering was aborted":"Error while rendering";up.puts("up.render()",`${e}: ${t.name}: ${t.message}`),up.error.guard((()=>{var e,n;return null===(n=(e=this.options).onError)||void 0===n?void 0:n.call(e,t)}))}get finished(){return this.Or()}Or(){return e(this,void 0,void 0,(function*(){try{let t=yield this.gr;return yield t.finished}catch(t){throw t instanceof up.RenderResult?yield t.finished:t}}))}yr(){if(this.options.url){let t=t=>this.kr(t);return new up.Change.FromURL(Object.assign(Object.assign({},this.options),{onRequest:t}))}if(this.options.response){let t=()=>this.kr(null);return new up.Change.FromResponse(Object.assign(Object.assign({},this.options),{onRender:t}))}{let t=()=>this.kr(null);return new up.Change.FromContent(Object.assign(Object.assign({},this.options),{onRender:t}))}}br(){up.browser.assertConfirmed(this.options);let t=n.pluckKey(this.options,"guardEvent");if(t&&(t.renderOptions=this.options,up.emit(t,{target:this.options.origin}).defaultPrevented))throw new up.Aborted(`Rendering was prevented by ${t.type} listener`);up.RenderOptions.assertContentGiven(this.options)}kr(t){let{abort:e}=this.options;if(!e||!up.network.isBusy())return;let{fragments:i,layer:s,origin:r,newLayer:o}=this.yr().getPreflightProps(),u={except:t,logOnce:["up.render()","Change with { abort } option will abort other requests"],newLayer:o,origin:r};"target"===e?up.fragment.abort(i,u):"layer"===e?up.fragment.abort(Object.assign(Object.assign({},u),{layer:s})):"all"===e||!0===e?up.fragment.abort(Object.assign(Object.assign({},u),{layer:"any"})):n.isFunction(e)?e(u):up.fragment.abort(e,Object.assign(Object.assign({},u),{layer:s}))}},n.delegate(t.prototype,["then","catch","finally"],(function(){return this.gr})),n.memoizeMethod(t.prototype,{Or:!0,yr:!0}),t)},2705:()=>{const t=up.util;up.RenderOptions=function(){const e={useHungry:!0,useKeep:!0,saveScroll:!0,saveFocus:!0,focus:"keep",abort:"target",failOptions:!0},n={abort:!1,confirm:!1,feedback:!1,cache:!0,background:!0},i=["url","method","origin","headers","params","cache","fallback","abort","abortable","confirm","feedback","origin","baseLayer","fail","onError"].concat(["keep","hungry","history","source","saveScroll","navigate"]),s=["url","response","content","fragment","document"],r=["history","focus","scroll"];function o(t){const e={};for(let n in t){const i=t[n];let s=up.fragment.successKey(n);s&&(e[s]=i)}return e}return{preprocess:function(i){var s,o;null===(o=(s=up.migrate).preprocessRenderOptions)||void 0===o||o.call(s,i);const u=t.merge(e,function(t){if(t.navigate)return up.fragment.config.navigateOptions}(i));return t.merge(t.omit(u,r),{defaults:u},{inputDevice:up.event.inputDevice},i,function(t){if(t.preload)return n}(i))},finalize:function(e,n){return t.merge(e.defaults,n,e)},assertContentGiven:function(e){t.some(s,(n=>t.isGiven(e[n])))||(e.defaultToEmptyContent?e.content="":up.fail("up.render() needs either { "+s.join(", ")+" } option"))},deriveFailOptions:function(e){return e.failOptions?Object.assign(Object.assign(Object.assign(Object.assign({},e.defaults),t.pick(e,i)),o(e)),{failPrefixForced:!0}):Object.assign(Object.assign({},e),o(e))}}}()},606:function(){var t=this&&this.M||function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{c(i.next(t))}catch(t){r(t)}}function u(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((i=i.apply(t,e||[])).next())}))};up.RenderResult=class RenderResult extends up.Record{keys(){return["fragments","layer","target","options","finished"]}defaults(){return{fragments:[]}}get none(){return!this.fragments.length}get fragment(){return this.fragments[0]}static both(t,e,n=!0){return e?new this({target:t.target,layer:t.layer,options:t.options,fragments:t.fragments.concat(e.fragments),finished:n&&this.mergeFinished(t,e)}):t}static mergeFinished(e,n){return t(this,void 0,void 0,(function*(){return this.both(yield e.finished,yield n.finished,!1)}))}static buildNone(){return new this({target:":none",finished:Promise.resolve()})}}},5437:()=>{var t;const e=up.util;up.Request=(t=class Request extends up.Record{keys(){return["method","url","hash","params","target","failTarget","headers","timeout","background","cache","expireCache","evictCache","layer","mode","context","failLayer","failMode","failContext","origin","fragments","builtAt","wrapMethod","contentType","payload","onLoading","fail","abortable","badResponseTime"]}defaults(){return{state:"new",abortable:!0,headers:{},timeout:up.network.config.timeout,builtAt:new Date}}constructor(t){var n,i,s;if(super(t),this.params=new up.Params(this.params),null==this.wrapMethod&&(this.wrapMethod=up.network.config.wrapMethod),this.Sr(),(this.target||this.layer||this.origin)&&!t.basic){const t={origin:this.origin};this.layer=up.layer.get(this.layer,t),this.failLayer=up.layer.get(this.failLayer,t),this.context||(this.context=this.layer.context||{}),this.failContext||(this.failContext=(null===(n=this.failLayer)||void 0===n?void 0:n.context)||{}),this.mode||(this.mode=this.layer.mode),this.failMode||(this.failMode=null===(i=this.failLayer)||void 0===i?void 0:i.mode)}this.deferred=e.newDeferred(),null!==(s=this.badResponseTime)&&void 0!==s||(this.badResponseTime=e.evalOption(up.network.config.badResponseTime,this)),this.Er()}get xhr(){var t;return null!==(t=this.Cr)&&void 0!==t?t:this.Cr=new XMLHttpRequest}get fragments(){if(this.jr)return this.jr;{let t=up.fragment.parseTargetSteps(this.target),n=e.map(t,"selector"),i={origin:this.origin,layer:this.layer};return e.compact(e.map(n,(t=>up.fragment.get(t,i))))}}set fragments(t){this.jr=t}get fragment(){var t;return null===(t=this.fragments)||void 0===t?void 0:t[0]}Sr(){this.method=e.normalizeMethod(this.method),this.Fr(),this.Tr(),this.url=e.normalizeURL(this.url)}Rr(){e.task((()=>{this.layer=void 0,this.failLayer=void 0,this.origin=void 0,this.fragments=void 0}))}Fr(){var t;let e=null===(t=this.url)||void 0===t?void 0:t.match(/^([^#]*)(#.+)$/);if(e)return this.url=e[1],this.hash=e[2]}Tr(){!this.url||this.allowsPayload()||e.isBlank(this.params)||(this.url=this.params.toURL(this.url),this.params.clear())}isSafe(){return up.network.isSafeMethod(this.method)}allowsPayload(){return e.methodAllowsPayload(this.method)}will302RedirectWithGET(){return this.isSafe()||"POST"===this.method}willCache(){return e.evalAutoOption(this.cache,up.network.config.autoCache,this)}runQueuedCallbacks(){e.always(this,(()=>this.Rr()))}load(){var t;if("new"===this.state)return this.Pr()?(this.state="loading",this.Sr(),null===(t=this.onLoading)||void 0===t||t.call(this),this.expired=!1,new up.Request.XHRRenderer(this).buildAndSend({onload:()=>this.Ar(),onerror:()=>this.Lr(),ontimeout:()=>this.$r(),onabort:()=>this.Dr()}),!0):void this.abort({reason:"Prevented by event listener"})}Pr(){return!this.emit("up:request:load",{log:["Loading %s",this.description]}).defaultPrevented}loadPage(){up.network.abort(),new up.Request.FormRenderer(this).buildAndSubmit()}Ar(){const t=this.Mr(),e="Loaded "+t.description;this.emit("up:request:loaded",{request:t.request,response:t,log:e}),this.respondWith(t)}Lr(){this.Hr("Network error")}$r(){this.Hr("Timeout")}Dr(){this.Nr()}abort({reason:t}={}){this.Nr(t)&&this.Cr&&this.Cr.abort()}Nr(t){if(this.qr())return;let e="Aborted request to "+this.description+(t?": "+t:"");return this.state="aborted",this.deferred.reject(new up.Aborted(e)),this.emit("up:request:aborted",{log:e}),!0}Hr(t){if(this.qr())return;let e="Cannot load request to "+this.description+(t?": "+t:"");this.state="offline",this.emit("up:request:offline",{log:e}),this.deferred.reject(new up.Offline(e))}respondWith(t){this.response=t,this.qr()||(this.state="loaded",t.ok?this.deferred.resolve(t):this.deferred.reject(t))}qr(){return"new"!==this.state&&"loading"!==this.state&&"tracking"!==this.state}csrfHeader(){return up.protocol.csrfHeader()}csrfParam(){return up.protocol.csrfParam()}csrfToken(){if(!this.isSafe()&&!this.isCrossOrigin())return up.protocol.csrfToken()}isCrossOrigin(){return e.isCrossOrigin(this.url)}Mr(){const t={method:this.method,url:this.url,request:this,xhr:this.xhr,text:this.xhr.responseText,status:this.xhr.status,title:up.protocol.titleFromXHR(this.xhr),target:up.protocol.targetFromXHR(this.xhr),acceptLayer:up.protocol.acceptLayerFromXHR(this.xhr),dismissLayer:up.protocol.dismissLayerFromXHR(this.xhr),eventPlans:up.protocol.eventPlansFromXHR(this.xhr),context:up.protocol.contextFromXHR(this.xhr),expireCache:up.protocol.expireCacheFromXHR(this.xhr),evictCache:up.protocol.evictCacheFromXHR(this.xhr),fail:this.fail};let n=up.protocol.methodFromXHR(this.xhr),i=up.protocol.locationFromXHR(this.xhr);return i&&(e.matchURLs(this.url,i)||n||(n="GET"),t.url=i),n&&(t.method=n),new up.Response(t)}Qi(t){return up.EventEmitter.fromEmitArgs(t,{layer:this.layer,request:this,origin:this.origin})}emit(...t){return this.Qi(t).emit()}assertEmitted(...t){this.Qi(t).assertEmitted()}get description(){return this.method+" "+this.url}isPartOfSubtree(t){return t=e.wrapList(t),e.some(this.fragments,(function(n){return e.some(t,(t=>t.contains(n)))}))}get age(){return new Date-this.builtAt}header(t){return this.headers[t]}Er(){for(let t of["target","failTarget","mode","failMode","context","failContext"])this.Ur(t);let t,e;(t=this.csrfHeader())&&(e=this.csrfToken())&&this.Br(t,e),this.Br(up.protocol.headerize("version"),up.version)}Ur(t){this.Br(up.protocol.headerize(t),this[t])}Br(t,n){e.isMissing(n)||((e.isOptions(n)||e.isArray(n))&&(n=e.safeStringifyJSON(n)),this.headers[t]=n)}mergeIfUnsent(t){if("new"!==this.state)return;if(!this.target||!t.target)return;let n=up.fragment.splitTarget(this.target+","+t.target);this.target=e.uniq(n).join(", "),this.Ur("target"),this.jr=e.uniq([...this.fragments,...t.fragments])}static tester(t,{except:n}={}){let i;if(e.isFunction(t))i=t;else if(t instanceof this)i=e=>t===e;else if(e.isString(t)){let e=new up.URLPattern(t);i=t=>e.test(t.url)}else i=e=>t;return n?t=>!up.cache.willHaveSameResponse(t,n)&&i(t):i}},e.delegate(t.prototype,["then","catch","finally"],(function(){return this.deferred})),t)},7974:function(){var t=this&&this.M||function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{c(i.next(t))}catch(t){r(t)}}function u(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((i=i.apply(t,e||[])).next())}))};const e=up.util;class Route{constructor(){this.varyHeaders=new Set,this.requests=[]}matchBest(t){let n=this.requests.filter((e=>this.satisfies(e,t)));return e.last(n)}delete(t){e.remove(this.requests,t)}put(t){this.requests.push(t)}updateVary(t){for(let e of t.varyHeaderNames)this.varyHeaders.add(e)}satisfies(t,n){return t===n||e.every(this.varyHeaders,(i=>{let s=t.header(i),r=n.header(i);if("X-Up-Target"===i||"X-Up-Fail-Target"===i){if(!s)return!0;if(!r)return!1;let t=e.parseTokens(s,{separator:"comma"}),n=e.parseTokens(r,{separator:"comma"});return e.containsAll(t,n)}return s===r}))}}up.Request.Cache=class Cache{constructor(){this.reset()}reset(){this.zr={},this.Ir=[]}get(t){t=this.Kr(t);let e=this.Vr(t),n=e.matchBest(t);if(n){if(this.Xr(n))return n;this.Wr(t,e)}}put(e){return t(this,void 0,void 0,(function*(){e=this.Kr(e);let t=this.Vr(e),{response:n}=e;n&&t.updateVary(n);let i=t.requests.filter((n=>t.satisfies(e,n)));for(let t of i)this.Wr(t);e.cacheRoute=t,t.put(e),this.Ir.push(e),this.Jr()}))}alias(t,e){if(t=this.get(t))return e=this.Kr(e),this.track(t,e,{force:!0}),this.put(e),e}track(n,i,s={}){var r;return t(this,void 0,void 0,(function*(){i.trackedRequest=n,i.state="tracking";let t=yield e.always(n);t instanceof up.Response?s.force||n.cacheRoute.satisfies(n,i)?(i.fromCache=!0,t=e.variant(t,{request:i}),i.respondWith(t),e.delegate(i,["expired","state"],(()=>n))):(delete i.trackedRequest,i.state="new",null===(r=s.onIncompatible)||void 0===r||r.call(s,i)):(i.state=n.state,i.deferred.reject(t))}))}willHaveSameResponse(t,e){return t===e||t===e.trackedRequest}evict(t=!0,e){this.Gr(t,e,(t=>this.Wr(t)))}expire(t=!0,e){this.Gr(t,e,(t=>t.expired=!0))}reindex(t){this.Wr(t),this.put(t)}Wr(t){var n;e.remove(this.Ir,t),null===(n=t.cacheRoute)||void 0===n||n.delete(t),delete t.cacheRoute}Vr(t){var e,n;return t.cacheRoute||(e=this.zr)[n=t.description]||(e[n]=new Route)}Xr(t){return t.age<up.network.config.cacheEvictAge}get Qr(){return this.Ir.length}get An(){return up.network.config.cacheSize}Jr(){for(let t=0;t<this.Qr-this.An;t++)this.Wr(this.Ir[0])}Gr(t=!0,n,i){let s=up.Request.tester(t,n),r=e.filter(this.Ir,s);e.each(r,i)}Kr(t){return e.wrapValue(up.Request,t)}}},5221:()=>{const t=up.util,e=up.element,n=["GET","POST"];up.Request.FormRenderer=class FormRenderer{constructor(t){this.bt=t}buildAndSubmit(){this.params=t.copy(this.bt.params);let i=this.bt.url,{method:s}=this.bt;const r=up.Params.fromURL(i);this.params.addAll(r),i=up.Params.stripURL(i),t.contains(n,s)||(s=up.protocol.wrapMethod(s,this.params)),this.Hn=e.affix(document.body,"form.up-request-loader",{method:s,action:i});let o,u,c=this.bt.contentType;c&&this.Hn.setAttribute("enctype",c),(o=this.bt.csrfParam())&&(u=this.bt.csrfToken())&&this.params.add(o,u),t.each(this.params.toArray(),this.Yr.bind(this)),up.browser.submitForm(this.Hn)}Yr(t){e.affix(this.Hn,"input[type=hidden]",t)}}},6413:()=>{const t=up.util;up.Request.Queue=class Queue{constructor(){this.reset()}reset(){this.Zr=[],this.eo=[],this.no=!1}get allRequests(){return this.eo.concat(this.Zr)}asap(e){e.runQueuedCallbacks(),t.always(e,(t=>this.Ct(e,t))),this.io(e),this.so(e),queueMicrotask((()=>this.ro()))}promoteToForeground(t){t.background&&(t.background=!1,this.io(t))}io(e){let n=Math.max(e.badResponseTime-e.age,0);t.timer(n,(()=>this.oo()))}uo(){return t.evalOption(up.network.config.concurrency)}co(){const t=this.uo();return-1===t||this.eo.length<t}isBusy(){return this.eo.length>0||this.Zr.length>0}so(t){this.Zr.push(t)}ao(){let e=t.find(this.Zr,(t=>!t.background));return e||(e=this.Zr[0]),t.remove(this.Zr,e)}ho(t){t.load()&&this.eo.push(t)}Ct(e,n){t.remove(this.eo,e)||t.remove(this.Zr,e),n instanceof up.Response&&n.ok&&up.network.registerAliasForRedirect(e,n),this.oo(),queueMicrotask((()=>this.ro()))}ro(){let t;if(this.co()&&(t=this.ao()))return this.ho(t)}abort(...e){var n;let i=t.extractOptions(e),{except:s,reason:r,logOnce:o}=i,u=null===(n=e[0])||void 0===n||n,c=up.Request.tester(u,{except:s});for(let e of[this.eo,this.Zr]){const n=t.filter(e,c);for(let i of n)o&&(up.puts(...o),o=null),i.abort({reason:r}),t.remove(e,i)}}oo(){const t=this.lo();this.no!==t&&(this.no=t,t?up.emit("up:network:late",{log:"Server is slow to respond"}):up.emit("up:network:recover",{log:"Slow requests were loaded"}))}lo(){const e=t.reject(this.allRequests,"background");return t.some(e,(t=>t.age>=t.badResponseTime-1))}}},2298:()=>{var t;const e="multipart/form-data",n=up.util;up.Request.XHRRenderer=(t=class XHRRenderer{constructor(t){this.bt=t}buildAndSend(t){const e=this.bt.xhr;this.po=n.copy(this.bt.params),this.bt.timeout&&(e.timeout=this.bt.timeout),e.open(this.fo(),this.bt.url);let i=this.do();i&&e.setRequestHeader("Content-Type",i);for(let t in this.bt.headers){let n=this.bt.headers[t];e.setRequestHeader(t,n)}Object.assign(e,t),e.send(this.mo())}fo(){let t=this.bt.method;return this.bt.wrapMethod&&!this.bt.will302RedirectWithGET()&&(t=up.protocol.wrapMethod(t,this.po)),t}do(){return this.vo(),this.bo}mo(){return this.vo(),this.yo}vo(){this.yo=this.bt.payload,this.bo=this.bt.contentType,!this.yo&&this.bt.allowsPayload()&&(this.bo||(this.bo=this.po.hasBinaryValues()?e:"application/x-www-form-urlencoded"),this.bo===e?(this.bo=null,this.yo=this.po.toFormData()):this.yo=this.po.toQuery().replace(/%20/g,"+"))}},n.memoizeMethod(t.prototype,{vo:!0,fo:!0}),t)},4517:()=>{const t=up.util;up.Response=class Response extends up.Record{keys(){return["method","url","text","status","request","xhr","target","title","acceptLayer","dismissLayer","eventPlans","context","expireCache","evictCache","headers","loadedAt","fail"]}defaults(){return{headers:{},loadedAt:new Date}}get ok(){var e;return!t.evalOption(null!==(e=this.fail)&&void 0!==e?e:up.network.config.fail,this)}get none(){return!this.text}header(t){var e;return this.headers[t]||(null===(e=this.xhr)||void 0===e?void 0:e.getResponseHeader(t))}get varyHeaderNames(){let e=this.header("Vary");return t.parseTokens(e,{separator:"comma"})}get contentType(){return this.header("Content-Type")}get cspNonces(){return up.protocol.cspNoncesFromHeader(this.header("Content-Security-Policy")||this.header("Content-Security-Policy-Report-Only"))}get lastModified(){let t=this.header("Last-Modified");if(t)return new Date(t)}get etag(){return this.header("ETag")}get json(){return this.parsedJSON||(this.parsedJSON=JSON.parse(this.text))}get age(){return new Date-this.loadedAt}get expired(){return this.age>up.network.config.cacheExpireAge||this.request.expired}get description(){return`HTTP ${this.status} response to ${this.request.description}`}}},7241:()=>{var t;const e=up.util,n=up.element,i=/^\s*<(html|!DOCTYPE)\b/i;up.ResponseDoc=(t=class ResponseDoc{constructor({document:t,fragment:e,content:n,target:i,origin:s,cspNonces:r,match:o}){if(t?this.wo(t):e?this._o(e):this.Oo(n||"",i),this.ko=r,s){let t=up.fragment.tryToTarget(s);t&&(this.So=this.select(t))}this.oi=o}wo(t){t instanceof Document?(this.ri=t,this.xo=!0):e.isString(t)?(this.ri=n.createBrokenDocumentFromHTML(t),this.xo=i.test(t),this.Eo=!0):(this.ri=this.Co(t),this.xo=t.matches("html"))}_o(t){let i=e.isString(t)?n.createFromHTML(t):t;this.ri=this.Co(i)}Oo(t,i){i||up.fail("must pass a { target } when passing { content }");let s=e.map(up.fragment.parseTargetSteps(i),"selector").join();const r=n.createFromSelector(s);e.isString(t)?r.innerHTML=t:r.appendChild(t),this.ri=this.Co(r)}Co(t){let e=document.createElement("up-document");return e.append(t),e.documentElement=t,e}rootSelector(){return up.fragment.toTarget(this.ri.documentElement)}get title(){return this.jo(this.Fo)}To(){if(this.xo)return this.ri.head}jo(t){let e=this.To();return e&&t(e)}get metaTags(){return this.jo(up.history.findMetaTags)}get assets(){return this.jo(up.script.findAssets)}get lang(){if(this.xo)return up.history.getLang(this.ri)}Fo(t){var e;return null===(e=t.querySelector("title"))||void 0===e?void 0:e.textContent}select(t){return new up.FragmentFinder({selector:t,origin:this.So,document:this.ri,match:this.oi}).find()}selectSteps(t){return t.filter((t=>this.Ro(t)||this.Po(t)))}commitSteps(t){return t.filter((t=>this.commitElement(t.newElement)))}Ro(t){if(t.newElement)return!0;let e=this.select(t.selector);if(!e)return;let{selectEvent:n}=t;return n&&(n.newFragment=e,n.renderOptions=t.originalRenderOptions,up.emit(t.oldElement,n,{callback:t.selectCallback}),n.defaultPrevented)?void 0:(t.newElement=e,!0)}Po(t){if(!t.maybe)throw new up.CannotMatch}commitElement(t){if(this.ri.contains(t))return up.fragment.config.runScripts||up.script.disableSubtree(t),t.remove(),!0}finalizeElement(t){if(up.NonceableCallback.adoptNonces(t,this.ko),this.Eo){let i=n.subtree(t,":is(noscript,script,audio,video):not(.up-keeping, .up-keeping *)");e.each(i,n.fixParserDamage)}}},e.memoizeMethod(t.prototype,{To:!0}),t)},2723:()=>{const t=up.element,e=up.util;up.RevealMotion=class RevealMotion{constructor(e,n={}){var i,s,r,o,u,c,a,h,l;this.H=e,this.Ao=t.get(n.viewport)||up.viewport.get(this.H),this.Lo=up.layer.get(this.Ao),this.$o=null!==(i=n.behavior)&&void 0!==i?i:"instant";const p=up.viewport.config;this.Do=null!==(r=null!==(s=n.snap)&&void 0!==s?s:n.revealSnap)&&void 0!==r?r:p.revealSnap,this.Mo=null!==(u=null!==(o=n.padding)&&void 0!==o?o:n.revealPadding)&&void 0!==u?u:p.revealPadding,this.Ho=null!==(a=null!==(c=n.top)&&void 0!==c?c:n.revealTop)&&void 0!==a?a:p.revealTop,this.No=null!==(l=null!==(h=n.max)&&void 0!==h?h:n.revealMax)&&void 0!==l?l:p.revealMax,this.qo=p.selector("fixedTopSelectors"),this.Uo=p.selector("fixedBottomSelectors")}start(){const t=this.Bo(this.Ao),n=up.Rect.fromElement(this.H);if(this.No){const t=e.evalOption(this.No,this.H);n.height=Math.min(n.height,t)}n.grow(this.Mo),this.zo(t),t.height<0&&up.fail("Viewport has no visible area");const i=this.Ao.scrollTop;let s=i;this.Ho||n.height>t.height?s+=n.top-t.top:n.top<t.top?s-=t.top-n.top:n.bottom>t.bottom&&(s+=n.bottom-t.bottom),e.isNumber(this.Do)&&s<this.Do&&n.top<.5*t.height&&(s=0),s!==i&&this.Ao.scrollTo({top:s,behavior:this.$o})}Bo(){return up.viewport.isRoot(this.Ao)?new up.Rect({left:0,top:0,width:up.viewport.rootWidth(),height:up.viewport.rootHeight()}):up.Rect.fromElement(this.Ao)}Io(n){let i=up.fragment.all(n,{layer:this.Lo});return e.filter(i,t.isVisible)}zo(t){for(let e of this.Io(this.qo)){let n=up.Rect.fromElement(e).bottom-t.top;n>0&&(t.top+=n,t.height-=n)}for(let e of this.Io(this.Uo)){let n=up.Rect.fromElement(e),i=t.bottom-n.top;i>0&&(t.height-=i)}}}},8720:()=>{const t=up.util,e=/:has\(([^)]+)\)$/;up.Selector=class Selector{constructor(n,i,s={}){var r;let o;if(this.Ko=[],s.destroying||this.Ko.push(up.fragment.isNotDestroying),i&&!document.contains(i)||"any"===s.layer)o=up.layer.root;else{if(null!==(r=s.layer)&&void 0!==r||(s.layer=t.presence(i,t.isElement)),this.tt=up.layer.getAll(s),!this.tt.length)throw new up.CannotMatch(["Unknown layer: %o",s.layer]);this.Ko.push((e=>t.some(this.tt,(t=>t.contains(e))))),o=this.tt[0]}let u=up.fragment.expandTargets(n,Object.assign(Object.assign({},s),{layer:o}));this.Vo=u.map((t=>(up.browser.canHasSelector()||(t=t.replace(e,((t,e)=>(this.Ko.push((t=>t.querySelector(e))),"")))),t||"*"))),this.Xo=this.Vo.join()||"match-none"}matches(t){return t.matches(this.Xo)&&this.Wo(t)}closest(t){let e;return this.matches(t)?t:(e=t.parentElement)?this.closest(e):void 0}Wo(e){return t.every(this.Ko,(t=>t(e)))}descendants(e=document){const n=t.flatMap(this.Vo,(t=>e.querySelectorAll(t)));return t.filter(n,(t=>this.Wo(t)))}subtree(t){const e=[];return t instanceof Document||!this.matches(t)||e.push(t),e.push(...this.descendants(t)),e}}},7885:()=>{const t=up.util,e=up.element;up.Tether=class Tether{constructor(t){var n,i;null===(i=(n=up.migrate).handleTetherOptions)||void 0===i||i.call(n,t),this.Jo=t.anchor,this.Go=t.align,this.Qo=t.position,this.Yo="top"===this.Qo||"bottom"===this.Qo?"horizontal":"vertical",this.Ao=up.viewport.get(this.Jo),this.parent=this.Ao===e.root?document.body:this.Ao,this.Zo=!this.Ao.contains(this.Jo.offsetParent)}start(t){this.H=t,this.H.style.position="absolute",this.tu(0,0),this.sync(),this.eu("on")}stop(){this.eu("off")}eu(t){let e=this.nu.bind(this);up[t](window,"resize",e),this.Zo&&up[t](this.Ao,"scroll",e)}nu(){return clearTimeout(this.syncTimer),this.syncTimer=t.task(this.sync.bind(this))}isDetached(){return!this.parent.isConnected||!this.Jo.isConnected}sync(){const n=this.H.getBoundingClientRect(),i=e.styleNumber(this.H,"margin-top"),s=e.styleNumber(this.H,"margin-right"),r=e.styleNumber(this.H,"margin-bottom"),o=e.styleNumber(this.H,"margin-left"),u=this.Jo.getBoundingClientRect();let c,a;switch(this.Yo){case"horizontal":switch(this.Qo){case"top":a=u.top-r-n.height;break;case"bottom":a=u.top+u.height+i}switch(this.Go){case"left":c=u.left+o;break;case"center":c=u.left+.5*(u.width-n.width);break;case"right":c=u.left+u.width-n.width-s}break;case"vertical":switch(this.Go){case"top":a=u.top+i;break;case"center":a=u.top+.5*(u.height-n.height);break;case"bottom":a=u.top+u.height-n.height-r}switch(this.Qo){case"left":c=u.left-s-n.width;break;case"right":c=u.left+u.width+o}}t.isDefined(c)||t.isDefined(a)?this.pr(c,a):up.fail("Invalid tether constraints: %o",this.iu())}iu(){return{position:this.Qo,align:this.Go}}pr(t,e){const n=this.H.getBoundingClientRect();this.tu(t-n.left+this.offsetLeft,e-n.top+this.offsetTop)}tu(t,n){this.offsetLeft=t,this.offsetTop=n,e.setStyle(this.H,{left:t,top:n},"px")}}},4818:()=>{const t=up.util;up.URLPattern=class URLPattern{constructor(e,n=t.normalizeURL){this.su=n,this.ru=[];const i=[],s=[];for(let n of t.parseTokens(e))"-"===n[0]?s.push(n.substring(1)):i.push(n);this.ou=this.uu(i,!0),this.cu=this.uu(s,!1)}uu(e,n){if(!e.length)return;let i=(e=e.map((e=>("*"===e[0]&&(e="/"+e),e=this.su(e),t.escapeRegExp(e))))).join("|");return i=i.replace(/\\\*/g,".*?"),i=i.replace(/(:|\\\$)([a-z][\w-]*)/gi,((t,e,i)=>"\\$"===e?(n&&this.ru.push({name:i,cast:Number}),"(\\d+)"):(n&&this.ru.push({name:i,cast:String}),"([^/?#]+)"))),new RegExp("^(?:"+i+")$")}test(t,e=!0){return e&&(t=this.su(t)),this.ou.test(t)&&!this.au(t)}recognize(t,e=!0){e&&(t=this.su(t));let n=this.ou.exec(t);if(n&&!this.au(t)){const t={};return this.ru.forEach(((e,i)=>{let s=n[i+1];if(s)return t[e.name]=e.cast(s)})),t}}au(t){var e;return null===(e=this.cu)||void 0===e?void 0:e.test(t)}}},9675:(t,e,n)=>{n(5941),up.element=function(){const t=up.util;function e(...t){const e=t.pop();return(t[0]||document).querySelector(e)}function n(t,e){const n=[];return t.matches(e)&&n.push(t),n.push(...t.querySelectorAll(e)),n}function i(...n){const i=n.pop();return t.isElement(i)?i:t.isString(i)?e(...n,i):t.isList(i)?(i.length>1&&up.fail("up.element.get(): Cannot cast multiple elements (%o) to a single element",i),i[0]):i}function s(...e){return t.flatMap(e,r)}function r(e){return t.isString(e)?document.querySelectorAll(e):t.wrapList(e)}function o(t){t.setAttribute("hidden","")}function u(t){t.removeAttribute("hidden"),"none"===t.style.display&&(t.style.display="")}function c(e,n){for(let i in n){const s=n[i];t.isGiven(s)?e.setAttribute(i,s):e.removeAttribute(i)}}function a(e,n={}){let i,s,r,{includePath:o}=h(e);for(let t of o){let{tagName:e,id:n,classNames:o,attributes:u}=t;e&&"*"!==e||(e="div"),s=document.createElement(e),i||(i=s),n&&(s.id=n);for(let t of o)s.classList.add(t);for(let t in u){let e=u[t];s.setAttribute(t,e||"")}null==r||r.appendChild(s),r=s}for(let e in n){let s=n[e];if("class"===e)for(let e of t.wrapList(s))i.classList.add(e);else"style"===e?x(i,s):"text"===e?i.textContent=s:"content"===e?i.innerHTML=s:i.setAttribute(e,s)}return i}function h(t){let e;const n=t.replace(/:not\([^)]+\)/,(function(t){return e=t,""})),[i,s]=function(t){let e=[];return[t=p(t,(function({name:t,value:n}){return e.push(n),`[${t}]`})),e]}(n);return{includePath:i.split(/[ >]+/).map((function(e){let n={tagName:null,classNames:[],id:null,attributes:{}};return e=(e=(e=e.replace(/^[\w-*]+/,(function(t){return n.tagName=t,""}))).replace(/#([\w-]+)/,(function(t,e){return n.id=e,""}))).replace(/\.([\w-]+)/g,(function(t,e){return n.classNames.push(e),""})),s.length&&(e=p(e,(function({name:t}){return n.attributes[t]=s.shift(),""}))),e&&up.fail("Cannot parse selector: "+t),n})),includeRaw:n,excludeRaw:e}}const l=/\[([\w-]+)(?:([~|^$*]?=)(["'])?([^\3\]]*?)\3)?]/g;function p(t,e){return t.replace(l,(function(t,n,i,s,r){return r&&(r=r.replace(/\\([\\"'])/,"$1")),e({name:n,operator:i,quote:s,value:r})}))}const f=["HTML","BODY","HEAD","TITLE"];function d(e,n){return t.isGiven(n)?`[${e}="${n=n.replace(/"/g,'\\"')}"]`:`[${e}]`}function m(t){const e=document.createRange();e.setStart(document.body,0);let n=e.createContextualFragment(t.trim()).childNodes;if(1!==n.length)throw new Error("HTML must have a single root element");return n[0]}function g(t){t.offsetHeight}function v(e,n,i){t.isMissing(e.getAttribute(n))&&e.setAttribute(n,i)}function b(e,n){let i=e.getAttribute(n);return t.replaceValue(i,null,void 0)}function y(t,e,n){if(!t.hasAttribute(e))return;const i=b(t,e);switch(i){case"false":return!1;case"true":case"":case e:return!0;default:return!n||i}}function w(t,e){const n=k(t,Object.keys(e));return x(t,e),()=>x(t,n)}function _(t,e){return S(window.getComputedStyle(t),e)}function O(e,n){const i=_(e,n);if(t.isPresent(i))return parseFloat(i)}function k(t,e){const{style:n}=t;return S(n,e)}function S(e,n){return up.migrate.loaded&&(n=up.migrate.fixStyleProps(n)),t.isString(n)?e.getPropertyValue(n):t.mapObject(n,(t=>[t,e.getPropertyValue(t)]))}function x(e,n,i=""){if(up.migrate.loaded&&(n=up.migrate.fixStyleProps(n,i)),t.isString(n))e.setAttribute("style",n);else{const{style:t}=e;for(let e in n){let s=n[e];t.setProperty(e,s+i)}}}function E(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)}function C(t){return/^up-/.test(t)}return{subtree:n,contains:function(t,e){const n=i(e);return Node.prototype.contains.call(t,n)},closestAttr:function(t,e,n=b){let i=t.closest("["+e+"]");if(i)return n(i,e)},ancestor:function(t,e){var n;return null===(n=t.parentNode)||void 0===n?void 0:n.closest(e)},around:function(t,e){return s(t.closest(e),n(t,e))},get:i,list:s,toggle:function(t,e){null==e&&(e=!E(t)),(e?u:o)(t)},hide:o,show:u,metaContent:function(t){var n;return null===(n=e("meta"+d("name",t)))||void 0===n?void 0:n.getAttribute("content")},insertBefore:function(t,e){t.insertAdjacentElement("beforebegin",e)},createFromSelector:a,setAttrs:c,setTemporaryAttrs:function(t,e){const n={};for(let i of Object.keys(e))n[i]=t.getAttribute(i);return c(t,e),()=>c(t,n)},affix:function(e,...n){let i,s;const r=t.extractOptions(n);2===n.length?[i,s]=n:(i="beforeend",s=n[0]);const o=a(s,r);return e.insertAdjacentElement(i,o),o},idSelector:function(t){return t.match(/^[a-z][a-z0-9\-_]*$/i)?`#${t}`:d("id",t)},classSelector:function(t){return`.${t=t.replace(/[^\w-]/g,"\\$&")}`},isSingleton:up.mockable((t=>t.matches(f.join()))),attrSelector:d,tagName:function(t){return t.tagName.toLowerCase()},createBrokenDocumentFromHTML:function(t){return(new DOMParser).parseFromString(t,"text/html")},fixParserDamage:function(t){let e=m(t.outerHTML);t.replaceWith(e)},createFromHTML:m,get root(){return document.documentElement},paint:g,concludeCSSTransition:function(t){const e=w(t,{transition:"none"});return g(t),e},hasCSSTransition:function(t){const e=t["transition-property"],n=t["transition-duration"];return!("none"===e||"all"===e&&0===n)},fixedToAbsolute:function(t){const e=t.getBoundingClientRect();t.style.position="absolute";const n=t.offsetParent.getBoundingClientRect();x(t,{left:e.left-O(t,"margin-left")-n.left+"px",top:e.top-O(t,"margin-top")-n.top+"px",right:"",bottom:""})},setMissingAttrs:function(t,e){for(let n in e)v(t,n,e[n])},setMissingAttr:v,unwrap:function(e){!function(n){const i=document.activeElement;try{return function(){const n=e.parentNode,i=t.toArray(e.childNodes);t.each(i,(t=>n.insertBefore(t,e))),n.removeChild(e)}()}finally{i&&i!==document.activeElement&&i.focus({preventScroll:!0})}}()},wrapChildren:function(t){let e;const n=document.createElement("up-wrapper");for(;e=t.firstChild;)n.appendChild(e);return t.appendChild(n),n},attr:b,booleanAttr:y,numberAttr:function(t,e){let n=t.getAttribute(e);if(n&&(n=n.replace(/_/g,""),n.match(/^-?[\d.]+$/)))return parseFloat(n)},jsonAttr:function(t,e){var n,i;let s=null===(i=null===(n=t.getAttribute)||void 0===n?void 0:n.call(t,e))||void 0===i?void 0:i.trim();if(s)return JSON.parse(s)},callbackAttr:function(e,n,{exposedKeys:i=[],mainKey:s="event"}={}){let r=e.getAttribute(n);if(r){const n=up.NonceableCallback.fromString(r).toFunction(s,...i);return function(s){const r=Object.values(t.pick(s,i));return n.call(e,s,...r)}}},booleanOrStringAttr:function(t,e,n=!0){let i=y(t,e,!0);return!0===i?n:i},setTemporaryStyle:w,style:_,styleNumber:O,inlineStyle:k,setStyle:x,isVisible:E,upAttrs:function(e){let n=t.filter(e.getAttributeNames(),C);return t.mapObject(n,(t=>[t,e.getAttribute(t)]))},upClasses:function(e){return t.filter(e.classList.values(),C)},toggleAttr:function(t,e,n,i){return null==i&&(i=!t.hasAttribute(e)),i?t.setAttribute(e,n):t.removeAttribute(e)},addTemporaryClass:function(t,e){return t.classList.add(e),()=>t.classList.remove(e)},cleanJQuery:function(t){up.browser.canJQuery()&&jQuery(t).remove()},parseSelector:h,isEmpty:function(t){return!t.children.length>0&&!t.innerText.trim()},crossOriginSelector:function(t){return`[${t}*="//"]:not([${t}*="//${location.host}/"])`},isIntersectingWindow:function(t,{margin:e=0}={}){const n=up.Rect.fromElement(t);return n.grow(e),n.bottom>0&&n.top<window.innerHeight&&n.right>0&&n.left<window.innerWidth},unionSelector:function(e,n){let i=`:is(${e.join()})`;return t.isPresent(n)&&(i+=`:not(${n.join()})`),i}}}()},3924:()=>{up.error=function(){function t(t){if("object"!=typeof(e=t)||!("AbortError"===e.name||e instanceof up.RenderResult||e instanceof up.Response))throw t;var e}function e(t){try{return t()}catch(t){!function(t){console.error("Uncaught %o",t);let e=new ErrorEvent("error",{error:t,message:"Uncaught "+t});window.dispatchEvent(e)}(t)}}return{fail:function(...t){throw new up.Error(t)},throwCritical:t,muteUncriticalRejection:function(e){return e.catch(t)},muteUncriticalSync:function(e){try{return e()}catch(e){t(e)}},guard:e,guardFn:function(t){return(...n)=>e((()=>t(...n)))}}}(),up.fail=up.error.fail},4366:()=>{up.Aborted=class Aborted extends up.Error{constructor(t){super(t,{name:"AbortError"})}}},8010:()=>{up.CannotMatch=class CannotMatch extends up.Error{}},4861:()=>{up.CannotParse=class CannotParse extends up.Error{}},3469:()=>{up.CannotTarget=class CannotTarget extends up.Error{}},376:()=>{up.Error=class Error extends window.Error{constructor(t,e={}){Array.isArray(t)&&(t=up.util.sprintf(...t)),super(t);let n="up."+this.constructor.name;Object.assign(this,{name:n},e)}}},8272:()=>{up.NotImplemented=class NotImplemented extends up.Error{}},4504:()=>{up.Offline=class Offline extends up.Error{}},8670:()=>{up.event=function(){const t=up.util,e=up.element;function n(...t){return i(t).bind()}function i(t,e){return up.EventListenerGroup.fromBindArgs(t,e)}function s(t){return up.EventEmitter.fromEmitArgs(t)}const r=["metaKey","shiftKey","ctrlKey","altKey"];function o(e){return(t.isUndefined(e.button)||0===e.button)&&!t.some(r,(t=>e[t]))}function u(e,n,i=[]){const s=up.event.build(n,t.pick(e,i));return s.originalEvent=e,["stopPropagation","stopImmediatePropagation","preventDefault"].forEach((function(t){const n=s[t];return s[t]=function(){return e[t](),n.call(s)}})),e.defaultPrevented&&s.preventDefault(),s}n("up:click","a[up-emit]",(function(t,n){if(!o(t))return;const i=e.attr(n,"up-emit"),s=e.jsonAttr(n,"up-emit-props"),r=u(t,i);Object.assign(r,s),up.emit(n,r)}));let c=["unknown"];function a(t){c.push(t),setTimeout((()=>c.pop()))}return n("keydown keyup",{capture:!0},(()=>a("key"))),n("pointerdown pointerup",{capture:!0},(()=>a("pointer"))),n("up:framework:reset",(function(){for(let t of[window,document,e.root,document.body])for(let e of up.EventListener.allNonDefault(t))e.unbind()})),{on:n,off:function(...t){return i(t).unbind()},build:function(...e){const n=t.extractOptions(e),i=e[0]||n.type||up.fail("Expected event type to be passed as string argument or { type } property"),s=document.createEvent("Event");return s.initEvent(i,!0,!0),Object.assign(s,t.omit(n,["type","target"])),s},emit:function(...t){return s(t).emit()},assertEmitted:function(...t){return s(t).assertEmitted()},onEscape:function(t){return n("keydown",(function(e){if("Escape"===e.key)return t(e)}))},halt:function(t,e={}){e.log&&up.log.putsEvent(t),t.stopImmediatePropagation(),t.preventDefault()},isUnmodified:o,fork:u,keyModifiers:r,get inputDevice(){return t.last(c)}}}(),up.on=up.event.on,up.off=up.event.off,up.emit=up.event.emit},454:()=>{up.feedback=function(){const t=up.util,e=up.element,n=new up.Config((()=>({currentClasses:["up-current"],navSelectors:["[up-nav]","nav"],noNavSelectors:["[up-nav=false]"]}))),i="a, [up-href]";function s(e){if(e)return t.normalizeURL(e,{trailingSlash:!1,hash:!1})}function r(t){return t.upFeedbackURLs||(t.upFeedbackURLs=new up.LinkFeedbackURLs(t))}function o(t,{layer:s}={}){s||(s=up.layer.get(t));let o=u(s);const c=n.selector("navSelectors"),a=`${c} :is(${i}), ${c}:is(${i})`,h=up.fragment.all(a,{layer:s});for(let t of h){const i=r(t).isCurrent(o);for(let e of n.currentClasses)t.classList.toggle(e,i);e.toggleAttr(t,"aria-current","page",i)}}function u(t){return t.feedbackLocation||s(t.location)}function c(t){const e=t.feedbackLocation,n=u(t.location);e&&e===n||(t.feedbackLocation=n,o(t.element,{layer:t}))}return up.on("up:location:changed",(t=>{!function(){const t=up.layer.front;t.showsLiveHistory()&&c(t)}()})),up.on("up:fragment:compile",((t,e)=>{o(e)})),up.on("up:layer:location:changed",(t=>{c(t.layer)})),up.on("up:framework:reset",(function(){up.layer.root.feedbackLocation=null})),{config:n,showAroundRequest:function(n,s){if(!s.feedback)return;let r=e=>t.always(n,e),o=function(t){let n=t.origin;if(n)return s=n,e.ancestor(s,i)||s;var s}(n);o&&r(e.addTemporaryClass(o,"up-active"));for(let t of n.fragments)r(e.addTemporaryClass(t,"up-loading"))},normalizeURL:s}}()},2851:()=>{up.form=function(){const t=up.util,e=up.element,n=["[up-submit]","[up-target]","[up-layer]","[up-transition]"],i=new up.Config((()=>({groupSelectors:["[up-form-group]","fieldset","label","form"],fieldSelectors:["select","input:not([type=submit]):not([type=image])","button[type]:not([type=submit])","textarea"],submitSelectors:up.link.combineFollowableSelectors(["form"],n),noSubmitSelectors:["[up-submit=false]","[target]",e.crossOriginSelector("action")],submitButtonSelectors:["input[type=submit]","input[type=image]","button[type=submit]","button:not([type])"],watchInputEvents:["input","change"],watchInputDelay:0,watchChangeEvents:["change"]})));function s(t=""){return i.fieldSelectors.map((e=>e+t)).join()}function r(t){return t.matches(s())}function o(n){n=e.get(n);let i=e.subtree(n,s());if(n.matches("form[id]")){const r=s(e.attrSelector("form",n.getAttribute("id"))),o=up.fragment.all(r,{layer:n});i.push(...o),i=t.uniq(i)}return i}function u(t){return e.subtree(t,c())}function c(){return i.selector("submitButtonSelectors")}const a=up.mockable(((t,e)=>up.render(h(t,e))));function h(e,n,i){e=S(e),n=t.options(n);let s=new up.OptionsParser(e,n,i);return s.include(d),s.string("failTarget",{default:up.fragment.tryToTarget(e)}),s.booleanOrString("disable"),n.guardEvent||(n.guardEvent=up.event.build("up:form:submit",{submitButton:n.submitButton,log:"Submitting form",params:n.params,form:e})),n.origin||(n.origin=up.viewport.focusedElementWithin(e)||n.submitButton||e),s.include(up.link.followOptions),n}function l(t){let e,n=document.activeElement,i=[...o(t),...u(t)];for(let t of i)t===n&&(e=b(n)),p(t);return e&&up.focus(e,{force:!0,preventScroll:!0}),function(){i.forEach(f)}}function p(t){t.upDisableCount||(t.upDisableCount||(t.upDisableCount=0),t.upOriginalDisabled=t.disabled),t.upDisableCount++,t.disabled=!0}function f(t){t.upDisableCount&&(t.disabled?(t.upDisableCount--,t.upDisableCount||(t.disabled=t.upOriginalDisabled)):t.upDisableCount=0)}function d(n,i,s){i=t.options(i),n=S(n);const r=new up.OptionsParser(n,i,s);r.string("contentType",{attr:"enctype"}),r.json("headers");const o=up.Params.fromForm(n),u=function(t){const n=c(),i=document.activeElement;return i&&i.form===t&&i.matches(n)?i:e.get(t,n)}(n);return u&&(i.submitButton=u,o.addField(u),i.method||(i.method=u.getAttribute("formmethod")),i.url||(i.url=u.getAttribute("formaction"))),o.addAll(i.params),i.params=o,r.string("url",{attr:"action",default:up.fragment.source(n)}),r.string("method",{attr:["up-method","data-method","method"],default:"GET",normalize:t.normalizeMethod}),"GET"===i.method&&(i.url=up.Params.stripURL(i.url)),i}function m(e,...n){e=up.element.get(e);const i=t.extractCallback(n)||function(t){let e=t.getAttribute("up-watch");if(e)return up.NonceableCallback.fromString(e).toFunction("value","name").bind(t)}(e)||up.fail("No callback given for up.watch()");let s=t.extractOptions(n);const r=new up.FieldWatcher(e,s,i);return r.start(),()=>r.stop()}function g(t,e={}){return m(t,{options:e,batch:!0},((e,n)=>a(t,n)))}function v(){var t,e;return(null===(e=(t=up.migrate).migratedFormGroupSelectors)||void 0===e?void 0:e.call(t))||i.groupSelectors}function b(t){return y(t).element}function y(e){return t.findResult(v(),(function(t){let n=e.closest(t);if(n){let i=up.fragment.tryToTarget(n),s=up.fragment.tryToTarget(e),r=i||s&&n!==e&&`${t}:has(${s})`;if(r)return{target:r,element:n,origin:e}}}))}function w(n){let i,s;if(n.matches("input[type=checkbox]"))n.checked?(i=n.value,s=":checked"):s=":unchecked";else if(n.matches("input[type=radio]")){const t=x(n),r=n.getAttribute("name"),o=t.querySelector(`input[type=radio]${e.attrSelector("name",r)}:checked`);o?(s=":checked",i=o.value):s=":unchecked"}else i=n.value;const r=[];return t.isPresent(i)?(r.push(i),r.push(":present")):r.push(":blank"),t.isPresent(s)&&r.push(s),r}function _(t,e={}){const n=e.target||e.target||t.getAttribute("up-switch"),i=x(t);n||up.fail("No switch target given for %o",t);const s=w(t);for(let t of up.fragment.all(i,n))O(t,s)}up.on("up:click",c,(function(t,e){const n=S(e);n&&E(n)&&e.focus()}));const O=up.mockable((function(n,i){let s;i||(i=w(function(e){const n=x(e).querySelectorAll("[up-switch]");return t.find(n,(function(t){const n=t.getAttribute("up-switch");return e.matches(n)}))||up.fail("Could not find [up-switch] field for %o",e)}(n)));let r=n.getAttribute("up-hide-for");if(r)r=k(r),s=0===t.intersect(i,r).length;else{let e=n.getAttribute("up-show-for");e=e?k(e):[":present",":checked"],s=t.intersect(i,e).length>0}e.toggle(n,s),n.classList.add("up-switched")}));function k(e){return t.parseTokens(e,{json:!0})}function S(t,e={}){const n=up.fragment.get(t,e);return n.form||n.closest("form")}function x(t,e){return S(t,e)||up.layer.get(t).element}function E(t){return t=up.fragment.get(t),i.matches(t,"submitSelectors")}return up.on("submit",i.selectorFn("submitSelectors"),(function(t,e){t.defaultPrevented||(up.event.halt(t,{log:!0}),up.error.muteUncriticalRejection(a(e)))})),up.compiler((function(){let t=i.fieldSelectors.map((t=>`${t}[up-validate], [up-validate] ${t}`));return e.unionSelector(t,["[up-validate=false]"])}),(function(t){up.FormValidator.forElement(t).watchContainer(t)})),up.compiler("[up-switch]",(t=>{_(t)})),up.on("change","[up-switch]",((t,e)=>{_(e)})),up.compiler("[up-show-for]:not(.up-switched), [up-hide-for]:not(.up-switched)",(t=>{O(t)})),up.attribute("up-watch",(t=>m(t))),up.attribute("up-autosubmit",(t=>g(t))),{config:i,submit:a,submitOptions:h,destinationOptions:d,watchOptions:function(e,n,i={}){var s;n=t.options(n);let r=new up.OptionsParser(e,n,Object.assign(Object.assign({},i),{closest:!0,attrPrefix:"up-watch-"}));r.boolean("feedback"),r.booleanOrString("disable"),r.string("event"),r.number("delay");let o=up.form.config;return"input"===n.event?(n.event=t.evalOption(o.watchInputEvents,e),null!==(s=n.delay)&&void 0!==s||(n.delay=o.watchInputDelay)):"change"===n.event&&(n.event=t.evalOption(o.watchChangeEvents,e)),n.origin||(n.origin=e),n},isSubmittable:E,watch:m,validate:function(...e){let n=function(e,...n){const i=t.extractOptions(n);return i.origin?i.target||(i.target=up.fragment.toTarget(e)):i.origin||(i.origin=up.fragment.get(e)),i}(...e);return up.FormValidator.forElement(n.origin).validate(n)},autosubmit:g,fieldSelector:s,fields:o,isField:r,submitButtons:u,focusedField:function(){return t.presence(document.activeElement,r)},switchTarget:O,disableWhile:function(e,n){let i=function({disable:e,origin:n}){if(!e)return t.noop;let i,s=()=>x(n||void up.fail("Cannot process { disable: '%s' } option without { %s }",e,"origin"));return!0===e?i=[s()]:t.isString(e)&&(i=up.fragment.subtree(s(),e,{origin:n})),t.sequence(i.map(l))}(n);t.always(e,i)},disable:l,group:b,groupSolution:y,groupSelectors:v,get:S,getScope:x}}(),up.submit=up.form.submit,up.watch=up.form.watch,up.autosubmit=up.form.autosubmit,up.validate=up.form.validate},2667:(t,e,n)=>{n(7433);const i=up.util,s=up.element;up.fragment=function(){function t(t){let e=s.tagName(t);if(e.startsWith("up-"))return e}const e=new up.Config((()=>({badTargetClasses:[/^up-/],targetDerivers:["[up-id]","[id]","html","head","body","main","[up-main]",t,"link[rel][type]","link[rel=preload][href]","link[rel=preconnect][href]","link[rel=prefetch][href]","link[rel]","meta[property]","*[name]","form[action]","a[href]","[class]","[up-flashes]","form"],verifyDerivedTarget:!0,navigateOptions:{cache:"auto",revalidate:"auto",feedback:!0,fallback:!0,focus:"auto",scroll:"auto",history:"auto",peel:!0},match:"region",runScripts:!0,autoHistoryTargets:[":main"],autoFocus:["hash","autofocus","main-if-main","keep","target-if-lost"],autoScroll:["hash","layer-if-main"],autoRevalidate:t=>t.expired,skipResponse:n})));function n({response:t,expiredResponse:e}){return!t.text||t.text===(null==e?void 0:e.text)}function r(t,e={}){return t=p(t,e),s.closestAttr(t,"up-source")}function o(t){let e=s.closestAttr(t,"up-time");if(e&&"false"!==e)return/^\d+$/.test(e)&&(e=1e3*Number(e)),new Date(e)}function u(t){let e=s.closestAttr(t,"up-etag");if(e&&"false"!==e)return e}i.delegate(e,["mainTargets"],(()=>up.layer.config.any));const c=up.mockable(((...t)=>{let e=g(t);return new up.RenderJob(e).execute()})),a=up.mockable(((...t)=>{const e=g(t);return c(Object.assign(Object.assign({},e),{navigate:!0}))}));function h(t){return!t.closest(".up-destroying")}function l(t){return t.isConnected&&h(t)}function p(...t){const e=i.extractOptions(t),n=t.pop(),r=t[0];return i.isElementish(n)?s.get(n):r?f(r,n,e):new up.FragmentFinder({selector:n,origin:e.origin,layer:e.layer,match:e.match}).find()}function f(...t){return d(...t)[0]}function d(...t){const e=i.extractOptions(t);let n=t.pop();const s=t[0];return i.isElement(n)?[n]:i.isList(n)?n:new up.Selector(n,s,e).descendants(s)}function m(t,e,n={}){return new up.Selector(e,t,n).subtree(t)}function g(t){const e=i.parseArgIntoOptions(t,"target");return i.isElement(e.target)&&(e.origin||(e.origin=e.target)),e}const v=/^(onFail|on|fail)?(.+)$/;function b(t,e){return i.presence(t,i.isString)||y(t,e)||function(t){throw new up.CannotTarget(function(t){return`Cannot derive good target selector from a <${s.tagName(t)}> element without identifying attributes. Try setting an [id] or configure up.fragment.config.targetDerivers.`}(t))}(t)}function y(t,n){return i.findResult(e.targetDerivers,(function(r){let o=function(t,e){if(i.isFunction(e))return e(t);if(t.matches(e))try{return function(t,e){let{includePath:n,excludeRaw:i}=up.element.parseSelector(e);if(1!==n.length)throw new up.CannotParse(e);let{tagName:r,id:o,classNames:u,attributes:c}=n[0],a="";"*"===r?a+=s.tagName(t):r&&(a+=r);for(let t of u)a+=s.classSelector(t);o&&(a+=s.idSelector(o));for(let e in c){let n=c[e]||t.getAttribute(e);if("id"===e)a+=s.idSelector(n);else if("class"===e)for(let e of w(t))a+=s.classSelector(e);else a+=s.attrSelector(e,n)}return i&&(a+=i),a}(t,e)}catch(t){if(t instanceof up.CannotParse)return e;throw t}}(t,r);if(o&&function(t,n,i={}){return!l(n)||!e.verifyDerivedTarget||up.fragment.get(t,Object.assign({layer:n},i))===n}(o,t,n))return o}))}function w(t){return i.filter(t.classList,(t=>!i.some(e.badTargetClasses,(e=>{return n=e,s=t,i.isRegExp(n)?n.test(s):n===s;var n,s}))))}const _=/:main\b/,O=/:layer\b/,k=/:origin\b/;function S(t){return _.test(t)}function x(t,e={}){const{layer:n}=e;"new"===n||n instanceof up.Layer||up.fail("Must pass an up.Layer as { layer } option, but got %o",n),t=i.copy(i.wrapList(t));const s=[];for(;t.length;){let r=t.shift();if(!0===r&&(r=":main"),S(r)){let n=E(e),i=up.layer.mainTargets(n).map((t=>r.replace(_,t)));t.unshift(...i)}else if(O.test(r)){if("new"===n||n.opening)continue;let i=b(n.getFirstSwappableElement(),e);t.unshift(r.replace(O,i))}else i.isElementish(r)?s.push(b(r,e)):i.isString(r)&&s.push(j(r,e))}return i.uniq(s)}function E({layer:t,mode:e}){return"new"===t?e||up.fail('Must pass a { mode } option together with { layer: "new" }'):t.mode}function C(t,{origin:e}={}){return t.replace(k,(function(n){if(e)return b(e);up.fail('Missing { origin } element to resolve "%s" reference (found in %s)',n,t)}))}function j(...t){return(up.migrate.resolveOrigin||C)(...t)}function F(t){return i.parseTokens(t,{separator:"comma"})}function T(t,e){let n=up.on("up:fragment:aborted",{guard:e=>e.target.contains(t)},e);return up.destructor(t,n),n}return up.on("up:framework:boot",(function(){const{documentElement:t}=document;if(t.setAttribute("up-source",i.normalizeURL(location.href,{hash:!1})),up.hello(t),!up.browser.canPushState())return up.warn("Cannot push history changes. Next fragment update will load in a new page.")})),{config:e,reload:function(...t){var e,n;const a=g(t);a.target||(a.target=":main");const h=p(a.target,a);return a.url||(a.url=r(h)),a.headers=i.merge(a.headers,function(t){let e={},n=o(t);n&&(e["If-Modified-Since"]=n.toUTCString());let i=u(t);return i&&(e["If-None-Match"]=i),e}(h)),(a.keepData||s.booleanAttr(h,"up-keep-data"))&&(a.data=up.data(h)),null===(n=(e=up.migrate).postprocessReloadOptions)||void 0===n||n.call(e,a),c(a)},destroy:function(...t){var e,n;const i=g(t);return(i.element=p(i.target,i))&&new up.Change.DestroyFragment(i).execute(),null===(n=(e=up.migrate).formerlyAsync)||void 0===n?void 0:n.call(e,"up.destroy()")},render:c,navigate:a,get:p,getDumb:f,all:d,subtree:m,contains:function(t,e){return i.isElement(e)?s.contains(t,e)&&up.layer.get(t).contains(e):m(t,e).length>0},closest:function(t,e,n){return new up.Selector(e,t,n).closest(t)},source:r,visit:function(t,e){return a(Object.assign(Object.assign({},e),{url:t}))},markAsDestroying:function(t){t.classList.add("up-destroying"),t.setAttribute("aria-hidden","true")},emitInserted:function(t){return up.emit(t,"up:fragment:inserted",{log:["Inserted fragment %o",t]})},emitDestroyed:function(t,e){var n;const i=null!==(n=e.log)&&void 0!==n?n:["Destroyed fragment %o",t],s=e.parent||document;return up.emit(s,"up:fragment:destroyed",{fragment:t,parent:s,log:i})},emitKeep:function(t){let{oldElement:e,newElement:n,newData:i,renderOptions:r}=t;const o=["Keeping fragment %o",e],u=s.callbackAttr(e,"up-on-keep",{exposedKeys:["newFragment","newData"]});return up.emit(e,"up:fragment:keep",{newFragment:n,newData:i,renderOptions:r,log:o,callback:u})},successKey:function(t){let e=v.exec(t);if(e){let[t,n,s]=e;switch(n){case"onFail":return"on"+i.upperCaseFirst(s);case"fail":return i.lowerCaseFirst(s)}}},failKey:function(t){let e=v.exec(t);if(e){let[t,n,s]=e;switch(n){case"on":return"onFail"+i.upperCaseFirst(s);case void 0:return"fail"+i.upperCaseFirst(s)}}},expandTargets:x,resolveOrigin:j,toTarget:b,tryToTarget:y,isTargetable:function(t){return!!y(t)},matches:function(t,e,n={}){if(t=s.get(t),i.isElement(e)){let n=y(e);return n&&t.matches(n)}return new up.Selector(e,t,n).matches(t)},hasAutoHistory:function(t,n){let i=x(e.autoHistoryTargets,{layer:n}).join();for(let e of t)if(s.subtree(e,i).length)return!0;return up.puts("up.render()","Will not auto-update history because fragment doesn't contain a selector from up.fragment.config.autoHistoryTargets"),!1},time:o,etag:u,shouldRevalidate:function(t,n,s={}){return t.fromCache&&i.evalAutoOption(s.revalidate,e.autoRevalidate,n)},abort:function(...t){let e,n,s=g(t),{reason:r,newLayer:o}=s;if(s.target)n=d(s.target,s),e=t=>t.isPartOfSubtree(n),r||(r="Aborting requests within fragment");else{let t=up.layer.getAll(s);n=i.map(t,"element"),e=e=>i.contains(t,e.layer),r||(r="Aborting requests within "+t.join(", "))}up.network.abort((t=>t.abortable&&e(t)),Object.assign(Object.assign({},s),{reason:r}));for(let t of n)up.emit(t,"up:fragment:aborted",{reason:r,newLayer:o,log:!1})},onAborted:T,onFirstIntersect:function(t,e,{margin:n=0}={}){if(s.isIntersectingWindow(t,{margin:n}))return void e();let i=new IntersectionObserver((function(t){for(let n of t)if(n.isIntersecting)return r(),void e()}),{rootMargin:`${n}px`}),r=()=>i.disconnect();i.observe(t),T(t,r)},splitTarget:F,parseTargetSteps:function(t,e={}){var n;let i=e.defaultPlacement||"swap",s=null!==(n=e.defaultMaybe)&&void 0!==n&&n,r=[],o=F(t);for(let t of o){if(":none"===t)continue;let n=i,o=s;t=t.replace(/\b::?(before|after)\b/,((t,e)=>(n=e,""))),t=t.replace(/\b:maybe\b/,(()=>(o=!0,"")));const u=Object.assign(Object.assign({},e),{selector:t,placement:n,maybe:o,originalRenderOptions:e});r.push(u)}return r},isAlive:l,isNotDestroying:h,targetForSteps:function(t){let e=t.filter((t=>{var e;return!t.maybe||(null===(e=t.oldElement)||void 0===e?void 0:e.isConnected)}));return i.map(e,"selector").join(", ")||":none"},compressNestedSteps:function(t){if(t.length<2)return t;let e=i.uniqBy(t,"oldElement");return e=i.reject(e,(t=>function(t,e){return i.some(t,(function(t){return t!==e&&("swap"===t.placement||"content"===t.placement)&&t.oldElement.contains(e.oldElement)}))}(e,t))),e},containsMainPseudo:S}}(),up.reload=up.fragment.reload,up.destroy=up.fragment.destroy,up.render=up.fragment.render,up.navigate=up.fragment.navigate,up.visit=up.fragment.visit,i.delegate(up,["context"],(()=>up.layer.current))},9634:()=>{up.framework=function(){let t="evaling";function e(){if("configuring"!==t)return void console.error("Unpoly has already booted");let e=n();e?console.error("Unpoly cannot boot: %s",e):(t="booting",up.emit("up:framework:boot",{log:!1}),t="booted",up.emit("up:framework:booted",{log:!1}))}function n(){for(let t of["URL","Proxy","Promise","DOMParser","FormData"])if(!window[t])return`Browser doesn't support the ${t} API`;if("BackCompat"===document.compatMode)return"Browser is in quirks mode (missing DOCTYPE?)"}return{onEvaled:function(){up.emit("up:framework:evaled",{log:!1}),function(){let t=document.currentScript;return!!(null==t?void 0:t.async)||"manual"===(null==t?void 0:t.getAttribute("up-boot"))||"complete"===document.readyState||void 0}()?console.debug("Call up.boot() after you have configured Unpoly"):document.addEventListener("DOMContentLoaded",e),t="configuring"},boot:e,startExtension:function(){if("configuring"!==t)throw new Error("Unpoly extensions must be loaded before booting");t="evaling"},stopExtension:function(){t="configuring"},reset:function(){up.emit("up:framework:reset",{log:!1})},get evaling(){return"evaling"===t},get booted(){return"booted"===t},get beforeBoot(){return"booting"!==t&&"booted"!==t},isSupported:function(){return!n()}}}(),up.boot=up.framework.boot},8944:()=>{up.history=function(){const t=up.util,e=up.element,n=new up.Config((()=>({enabled:!0,updateMetaTags:!0,restoreTargets:["body"],metaTagSelectors:["meta","link[rel=alternate]","link[rel=canonical]","link[rel=icon]","[up-meta]",'script[type="application/ld+json"]'],noMetaTagSelectors:["meta[http-equiv]","[up-meta=false]","meta[name=csp-nonce]"]})));let i,s;const r={hash:!0};function o(e,n){return n=t.merge(r,n),t.normalizeURL(e,n)}function u(t){return o(location.href,t)}function c(){const t=u();s!==t&&(i=s,s=t)}c();const a={trailingSlash:!1};function h(e,n){return o(e,n=t.merge(a,n))===u(n)}function l(t,e={}){f("replaceState",t=o(t))&&!1!==e.event&&p({location:t,reason:"replace",log:`Replaced state for ${t}`})}function p(t){var e,n;let i=up.event.build("up:location:changed",t);null===(n=null===(e=up.migrate)||void 0===e?void 0:e.renamedProperty)||void 0===n||n.call(e,i,"url","location"),up.emit(i)}function f(t,e){if(n.enabled){const n={up:{}};return window.history[t](n,"",e),c(),!0}}function d(t){c();let e=u();p({location:e,reason:"pop",log:`Navigated to history entry ${e}`}),up.viewport.saveFocus({location:i}),up.viewport.saveScroll({location:i}),function(t){if(!(null==t?void 0:t.up))return void up.puts("popstate","Ignoring a history state not owned by Unpoly");let e=u();up.render({guardEvent:up.event.build("up:location:restore",{location:e,log:`Restoring location ${e}`}),url:e,target:n.restoreTargets,fail:!1,history:!0,location:e,peel:!0,layer:"root",cache:"auto",revalidate:"auto",saveScroll:!1,scroll:["restore","auto"],saveFocus:!1,focus:["restore","auto"]})}(t.state)}function m(){window.addEventListener("popstate",d),"GET"===up.protocol.initialRequestMethod()&&l(u(),{event:!1})}function g(t=document.head){return t.querySelectorAll(n.selector("metaTagSelectors"))}return up.on("up:framework:boot",(function(){"jasmine"in window?m():setTimeout(m,100)})),up.macro("a[up-back], [up-href][up-back]",(function(t){i&&(e.setMissingAttrs(t,{"up-href":i,"up-scroll":"restore"}),t.removeAttribute("up-back"),up.link.makeFollowable(t))})),up.on("up:framework:reset",(function(){i=void 0,s=void 0,c()})),{config:n,push:function(t){!h(t=o(t))&&f("pushState",t)&&p({location:t,reason:"push",log:`Advanced to location ${t}`})},replace:l,get location(){return u()},get previousLocation(){return i},normalizeURL:o,isLocation:h,findMetaTags:g,updateMetaTags:function(t){let e=g();for(let t of e)t.remove();for(let e of t)document.head.append(e)},getLang:function(t=document){let{documentElement:e}=t;if(e.matches("html"))return t.documentElement.lang},updateLang:function(t){e.toggleAttr(e.root,"lang",t,!!t)}}}()},9443:function(t,e,n){var i=this&&this.M||function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{c(i.next(t))}catch(t){r(t)}}function u(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((i=i.apply(t,e||[])).next())}))};n(7921);const s=up.util,r=up.element;up.layer=function(){const t=[up.Layer.Root,up.Layer.Modal,up.Layer.Popup,up.Layer.Drawer,up.Layer.Cover],e=new up.Config((function(){const e={mode:"modal",any:{mainTargets:["[up-main='']","main",":layer"]},root:{mainTargets:["[up-main~=root]"],history:!0},overlay:{mainTargets:["[up-main~=overlay]"],openAnimation:"fade-in",closeAnimation:"fade-out",dismissLabel:"×",dismissAriaLabel:"Dismiss dialog",dismissable:!0,history:"auto"},cover:{mainTargets:["[up-main~=cover]"]},drawer:{mainTargets:["[up-main~=drawer]"],backdrop:!0,position:"left",size:"medium",openAnimation(t){switch(t.position){case"left":return"move-from-left";case"right":return"move-from-right"}},closeAnimation(t){switch(t.position){case"left":return"move-to-left";case"right":return"move-to-right"}}},modal:{mainTargets:["[up-main~=modal]"],backdrop:!0,size:"medium"},popup:{mainTargets:["[up-main~=popup]"],position:"bottom",size:"medium",align:"left",dismissable:"outside key"},foreignOverlaySelectors:["dialog"]};for(let n of t)e[n.mode].Class=n;return e}));let n=null,o=[];function u(t){return"root"===t?[e.root,e.any]:[e[t],e.overlay,e.any]}function c(t){return i(this,void 0,void 0,(function*(){return t=s.options(t,{layer:"new",defaultToEmptyContent:!0,navigate:!0}),(yield up.render(t)).layer}))}up.on("up:fragment:destroyed",(function(){n.sync()})),up.on("up:framework:evaled",(function(){n=new up.LayerStack})),up.on("up:framework:reset",(function(){n.reset(),o=s.filter(o,"isDefault")}));const a={config:e,mainTargets:function(t){return s.flatMap(u(t),"mainTargets")},open:c,build:function(t,i){var r;const{mode:o}=t,{Class:c}=e[o],a=s.reverse(u(o));let h=up.migrate.handleLayerConfig;return h&&a.forEach(h),null!==(r=t.openAnimation)&&void 0!==r||(t.openAnimation=s.pluckKey(t,"animation")),t=s.mergeDefined(...a,{mode:o,stack:n},t),i&&(t=i(t)),new c(t)},ask:function(t){return new Promise((function(e,n){c(t=Object.assign(Object.assign({},t),{onAccepted:t=>e(t.value),onDismissed:t=>n(t.value)}))}))},normalizeOptions:function(t){var i,r;if(null===(r=(i=up.migrate).handleLayerOptions)||void 0===r||r.call(i,t),s.isGiven(t.layer)){let n=String(t.layer).match(/^(new|shatter|swap)( (\w+))?/);if(n){t.layer="new";const i=n[1],s=n[3];t.mode||(t.mode=s||e.mode),"swap"===i?up.layer.isOverlay()&&(t.baseLayer="parent"):"shatter"===i&&(t.baseLayer="root")}}else t.mode?t.layer="new":s.isElementish(t.target)?t.layer=n.get(t.target,{normalizeLayerOptions:!1}):t.origin?t.layer="origin":t.layer="current";t.context||(t.context={}),t.baseLayer=n.get("current",Object.assign(Object.assign({},t),{normalizeLayerOptions:!1}))},openCallbackAttr:function(t,e){return r.callbackAttr(t,e,{exposedKeys:["layer"]})},closeCallbackAttr:function(t,e){return r.callbackAttr(t,e,{exposedKeys:["layer","value","response"]})},anySelector:function(){return s.map(t,(t=>t.selector())).join()},optionToString:function(t){return s.isString(t)?`layer "${t}"`:t.toString()},get stack(){return n.layers},isWithinForeignOverlay:function(t){let n=e.selector("foreignOverlaySelectors");return!(!n||!t.closest(n))}};return s.delegate(a,["get","getAll","root","overlays","current","front","sync","count","dismissOverlays"],(()=>n)),s.delegate(a,["accept","dismiss","isRoot","isOverlay","isFront","on","off","emit","parent","history","location","mode","context","element","contains","size","affix"],(()=>n.current)),a}()},3849:(t,e,n)=>{n(7298),up.link=function(){const t=up.util,e=up.element;let n=null;const i=["a[up-content]","a[up-fragment]","a[up-document]"],s=["a[href]","[up-href]"],r=["[up-follow]","[up-target]","[up-layer]","[up-transition]","[up-preload]","[up-instant]","[up-href]"];function o(e,n){return t.flatMap(e,(t=>n.map((e=>t+e))))}const u=new up.Config((()=>({followSelectors:o(s,r).concat(i),noFollowSelectors:["[up-follow=false]","a[download]","a[target]",'a[href^="#"]:not([up-content]):not([up-fragment]):not([up-document])','a[href^="javascript:"]','a[href^="mailto:"]',e.crossOriginSelector("href"),e.crossOriginSelector("up-href")],instantSelectors:["[up-instant]"],noInstantSelectors:["[up-instant=false]","[onclick]"],preloadSelectors:o(s,["[up-preload]"]),noPreloadSelectors:["[up-preload=false]"],clickableSelectors:i.concat(["[up-emit]","[up-accept]","[up-dismiss]","[up-clickable]"]),preloadDelay:90}))),c=up.mockable((function(t,e,n){return up.render(h(t,e,n))}));function a(e,n,i){n=t.options(n);const s=new up.OptionsParser(e,n,Object.assign(Object.assign({},i),{fail:!1}));return n.url=function(t,e={}){const n=e.url||t.getAttribute("up-href")||t.getAttribute("href");if("#"!==n)return n}(e,n),n.method=p(e,n),s.json("headers"),s.json("params"),s.booleanOrString("cache"),s.booleanOrString("expireCache"),s.booleanOrString("evictCache"),s.booleanOrString("revalidate"),s.booleanOrString("abort"),s.boolean("abortable"),s.boolean("background"),s.string("contentType"),s.number("badResponseTime"),s.number("timeout"),n}function h(e,n,i){var s;e=up.fragment.get(e),n=t.options(n);const r=new up.OptionsParser(e,n,Object.assign({fail:!0},i));return r.include(a),r.boolean("feedback"),n.origin||(n.origin=e),r.boolean("fail"),r.boolean("navigate",{default:!0}),r.string("confirm",{attr:["up-confirm","data-confirm"]}),r.string("target"),r.booleanOrString("fallback"),r.string("match"),r.string("content"),r.string("fragment"),r.string("document"),r.boolean("useKeep"),r.boolean("useHungry"),r.callback("onLoaded"),r.callback("onRendered",{mainKey:"result"}),r.callback("onFinished",{mainKey:"result"}),r.callback("onOffline",{mainKey:"error"}),r.callback("onError",{mainKey:"error"}),r.boolean("peel"),r.string("layer"),r.string("baseLayer"),r.json("context"),r.string("mode"),r.string("align"),r.string("position"),r.string("class"),r.string("size"),r.booleanOrString("dismissable"),r.parse(up.layer.openCallbackAttr,"onOpened"),r.parse(up.layer.closeCallbackAttr,"onAccepted"),r.parse(up.layer.closeCallbackAttr,"onDismissed"),r.string("acceptEvent"),r.string("dismissEvent"),r.string("acceptLocation"),r.string("dismissLocation"),r.booleanOrString("history"),r.booleanOrString("focus"),r.boolean("saveScroll"),r.boolean("saveFocus"),r.booleanOrString("scroll"),r.boolean("revealTop"),r.number("revealMax"),r.number("revealPadding"),r.number("revealSnap"),r.string("scrollBehavior"),r.booleanOrString("history"),r.booleanOrString("location"),r.booleanOrString("title"),r.boolean("metaTags"),r.booleanOrString("lang"),r.include(up.motion.motionOptions),null!==(s=n.guardEvent)&&void 0!==s||(n.guardEvent=up.event.build("up:link:follow",{log:["Following link %o",e]})),n}function l(t,e){let n=function(t){if(!b(t))return"Will not preload an unsafe link"}(t=up.fragment.get(t));if(n)return Promise.reject(new up.Error(n));const i=up.event.build("up:link:preload",{log:["Preloading link %o",t]});return c(t,Object.assign(Object.assign({abortable:!1},e),{guardEvent:i,preload:!0}))}function p(e,n={}){return t.normalizeMethod(n.method||e.getAttribute("up-method")||e.getAttribute("data-method"))}function f(t){return t=up.fragment.get(t),u.matches(t,"followSelectors")}function d(t){f(t)||t.setAttribute("up-follow","")}function m(t,e){if(t.defaultPrevented)return!1;const n=`a, [up-href], ${up.form.fieldSelector()}`,i=t.target.closest(n);return!i||i===e}function g(t){const e=t.closest(u.selector("instantSelectors"));return e&&(n=e,!(u.matches(n,"noInstantSelectors")||u.matches(n,"noFollowSelectors")));var n}function v(t){let e=["clientX","clientY","button",...up.event.keyModifiers];const n=up.event.fork(t,"up:click",e);up.emit(t.target,n,{log:!1})}function b(t){const e=p(t);return up.network.isSafeMethod(e)}function y(t,n,i){switch(t){case"insert":i();break;case"reveal":{let t=e.numberAttr(n,"up-intersect-margin");up.fragment.onFirstIntersect(n,i,{margin:t});break}case"hover":new up.LinkFollowIntent(n,i)}}function w(t,e){let n=up.event.build("up:deferred:load",{log:["Loading deferred %o",t]}),i=Object.assign({navigate:!1,guardEvent:n},e);return c(t,i,{defaults:{target:":origin",cache:"auto",revalidate:"auto",feedback:!0}})}return up.macro(u.selectorFn("clickableSelectors"),(function(t){if(t.matches("a[href], button"))return;let n=t.matches("a")?"link":"button";e.setMissingAttrs(t,{tabindex:"0",role:n,"up-clickable":""}),t.addEventListener("keydown",(function(t){if("Enter"===t.key||"Space"===t.key)return v(t)}))})),up.attribute("up-defer",{defaultValue:"insert"},(function(t,e){y(e,t,(()=>up.error.muteUncriticalRejection(w(t))))})),up.on("up:click",u.selectorFn("followSelectors"),(function(t,e){m(t,e)&&(up.event.halt(t,{log:!0}),up.focus(e,{preventScroll:!0}),up.error.muteUncriticalRejection(c(e)))})),up.attribute("up-expand",{defaultValue:"a, [up-href]",macro:!0},(function(t,n){let i=e.get(t,n);i&&(e.setMissingAttrs(t,Object.assign({"up-href":e.attr(i,"href")},e.upAttrs(i))),t.classList.add(...e.upClasses(i)),d(t))})),up.compiler(u.selectorFn("preloadSelectors"),(function(t){var n;if(!function(t){return!up.browser.canPushState()||!f(t)||!function(t){const e=a(t);if(e.url)return null==e.cache&&(e.cache="auto"),e.basic=!0,new up.Request(e).willCache()}(t)}(t)){let i=()=>up.error.muteUncriticalRejection(l(t));y(null!==(n=e.booleanOrStringAttr(t,"up-preload",null))&&void 0!==n?n:"hover",t,i)}})),up.on("up:framework:reset",(function(){n=null})),{follow:c,followOptions:h,preload:l,makeFollowable:d,isSafe:b,isFollowable:f,shouldFollowEvent:m,convertClicks:function(t){t.on("click",(function(e,i){if(up.event.isUnmodified(e))return g(i)&&n?up.event.halt(e):t.wasHitByMouseEvent(e)&&(!n||n===e.target)&&v(e),n=null})),t.on("mousedown",(function(t,e){up.event.isUnmodified(t)&&(n=t.target,g(e)&&v(t))}))},config:u,combineFollowableSelectors:o,loadDeferred:w}}(),up.follow=up.link.follow,up.deferred={load:up.link.loadDeferred}},4453:()=>{up.log=function(){const t=up.util,e=new up.LogConfig;function n(t,e,n,...s){i(t,e,"",n,...s)}function i(n,i,s,r,...o){r&&(e.format?console[n](`%c${i}%c ${r}`,"color: #666666; padding: 1px 3px; border: 1px solid #bbbbbb; border-radius: 2px; font-size: 90%; display: inline-block;"+s,"",...o):console[n](`[${i}] ${t.sprintf(r,...o)}`))}return up.on("up:framework:boot",(function(){if(!e.banner)return;const t=` __ _____ ___ ___ / /_ __\n/ // / _ \\/ _ \\/ _ \\/ / // / ${up.version}\n\\___/_//_/ .__/\\___/_/\\_. / \n / / / /\n\n`;let n="";up.migrate.loaded||(n+="Load unpoly-migrate.js to polyfill deprecated APIs.\n\n"),e.enabled?n+="Call `up.log.disable()` to disable logging for this session.":n+="Call `up.log.enable()` to enable logging for this session.";const i="color: #777777";e.format?console.log("%c"+t+"%c"+n,"font-family: monospace;"+i,i):console.log(t+n)})),{puts:function(...t){e.enabled&&n("log",...t)},putsEvent:function(t){if(e.enabled){let e="#5566cc";i("log",(t=t.originalEvent||t).type,`color: white; border-color: ${e}; background-color: ${e}`,"Interaction on %o",t.target)}},error:(...t)=>n("error",...t),warn:(...t)=>n("warn",...t),config:e,enable:function(){e.enabled=!0},disable:function(){e.enabled=!1}}}(),up.puts=up.log.puts,up.warn=up.log.warn},6535:()=>{up.migrate={config:{}}},8374:()=>{up.mockable=function(t){if(window.jasmine){let e=t.name,n={[e]:t},i=function(){return n[e].apply(this,arguments)};return i.mock=()=>spyOn(n,e),i}return t}},4034:function(){var t=this&&this.M||function(t,e,n,i){return new(n||(n=Promise))((function(s,r){function o(t){try{c(i.next(t))}catch(t){r(t)}}function u(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((i=i.apply(t,e||[])).next())}))};up.motion=function(){const e=up.util,n=up.element;let i={},s={};const r=new up.MotionController("motion"),o=new up.Config((()=>({duration:175,easing:"ease",enabled:!matchMedia("(prefers-reduced-motion: reduce)").matches})));function u(t){return e.pickBy(t,"isDefault")}function c(){return o.enabled}function a(t,e,i){return l(i),c()&&!b(e)&&i.duration>0&&!n.isSingleton(t)}function h(t,e,n){return up.migrate.loaded&&(e=up.migrate.fixStyleProps(e)),n=Object.assign(Object.assign({},n),{finishEvent:r.finishEvent}),new up.CSSTransition(t,e,n).start()}function l(t){var e,n;null!==(e=t.easing)&&void 0!==e||(t.easing=o.easing),null!==(n=t.duration)&&void 0!==n||(t.duration=o.duration)}function p(t){if(!b(t)){if(e.isFunction(t))return t;if(e.isArray(t))return f(...t);if(e.isString(t)){let e;if(t.indexOf("/")>=0)return f(...t.split("/"));if(e=s[t])return p(e)}else up.fail("Unknown transition %o",t)}}function f(t,n){if(!b(t)&&!b(n)){const i=d(t)||e.asyncNoop,s=d(n)||e.asyncNoop;return(t,e,n)=>Promise.all([i(t,n),s(e,n)])}}function d(t){var n;if(!b(t))return e.isFunction(t)?t:e.isString(t)?i[n=t]||up.fail("Unknown animation %o",n):e.isOptions(t)?(e,n)=>h(e,t,n):void up.fail("Unknown animation %o",t)}const m=up.mockable((function(t,e){t.replaceWith(e)}));function g(t,e){const n=p(e);n.isDefault=up.framework.evaling,s[t]=n}function v(t,e){const n=d(e);n.isDefault=up.framework.evaling,i[t]=n}function b(t){return!t||"none"===t}function y(t,e,i){v(t,(function(t,s){return t.style.opacity=0,n.setStyle(t,{opacity:e}),h(t,{opacity:i},s)}))}function w(t,e){return{transform:`translate(${t}px, ${e}px)`}}function _(t){return n.setStyle(t,{transform:""}),t.getBoundingClientRect()}function O(t,e){const i=`move-from-${t}`;v(`move-to-${t}`,(function(t,n){const i=_(t);return h(t,e(i),n)})),v(i,(function(t,i){const s=_(t),r=e(s);return n.setStyle(t,r),h(t,{transform:""},i)}))}return up.on("up:framework:boot",(function(){c()||up.puts("up.motion","Animations are disabled")})),y("fade-in",0,1),y("fade-out",1,0),O("top",(function(t){return w(0,-(t.top+t.height))})),O("bottom",(function(t){return w(0,up.viewport.rootHeight()-t.top)})),O("left",(function(t){return w(-(t.left+t.width),0)})),O("right",(function(t){return w(up.viewport.rootWidth()-t.left,0)})),g("cross-fade",["fade-out","fade-in"]),g("move-left",["move-to-left","move-from-right"]),g("move-right",["move-to-right","move-from-left"]),g("move-up",["move-to-top","move-from-bottom"]),g("move-down",["move-to-bottom","move-from-top"]),up.on("up:framework:reset",(function(){r.reset(),i=u(i),s=u(s)})),{morph:function(i,s,o,u){l(u=e.options(u)),i=up.fragment.get(i),s=up.fragment.get(s);let c=p(o);const h=a(i,c,u);c=up.error.guardFn(c);const f=e.pluckKey(u,"beforeStart")||e.noop,d=e.pluckKey(u,"afterInsert")||e.noop,g=e.pluckKey(u,"beforeDetach")||e.noop,v=e.pluckKey(u,"afterDetach")||e.noop,b=e.pluckKey(u,"scrollNew")||e.noop;if(f(),h){if(r.isActive(i)&&!1===u.trackMotion)return c(i,s,u);up.puts("up.morph()","Morphing %o to %o with transition %O over %d ms",i,s,o,u.duration);const e=up.viewport.get(i),a=e.scrollTop,h=up.viewport.absolutize(i,{afterMeasure(){n.insertBefore(i,s),d()}}),l=function(){return t(this,void 0,void 0,(function*(){b();const t=e.scrollTop;h.moveBounds(0,t-a),yield c(i,s,u),g(),h.bounds.remove(),v()}))};return r.startFunction([i,s],l,u)}return g(),m(i,s),d(),v(),b(),Promise.resolve()},animate:function(t,i,s){t=up.fragment.get(t),s=e.options(s);let o=d(i);const u=a(t,i,s);if(o=up.error.guardFn(o),u){const e=()=>o(t,s);return r.startFunction(t,e,s)}return function(t,i){return e.isOptions(i)&&n.setStyle(t,i),Promise.resolve()}(t,i)},finish:function(t){return r.finish(t)},finishCount:()=>r.finishCount,transition:g,animation:v,config:o,isEnabled:c,isNone:b,willAnimate:a,swapElementsDirectly:m,motionOptions:function(t,n,i){n=e.options(n);let s=new up.OptionsParser(t,n,i);return s.booleanOrString("animation"),s.booleanOrString("transition"),s.string("easing"),s.number("duration"),n}}}(),up.transition=up.motion.transition,up.animation=up.motion.animation,up.morph=up.motion.morph,up.animate=up.motion.animate},1647:(t,e,n)=>{n(2903);const i=up.util;up.network=function(){const t=new up.Config((()=>({concurrency:6,wrapMethod:!0,cacheSize:70,cacheExpireAge:15e3,cacheEvictAge:54e5,badResponseTime:400,fail:t=>(t.status<200||t.status>299)&&304!==t.status,autoCache:t=>t.isSafe(),expireCache:(t,e)=>!t.isSafe(),evictCache:!1,progressBar:!0,timeout:9e4}))),e=new up.Request.Queue,n=new up.Request.Cache;let s=null;function r(s){(function(t){let i;if(t.willCache()&&(i=n.get(t)))return up.puts("up.request()","Re-using previous request to %s",t.description),t.background||e.promoteToForeground(i),i.mergeIfUnsent(t),n.track(i,t,{onIncompatible:r}),!0})(s)||function(s){(function(e){e.willCache()&&(n.put(e),e.onLoading=()=>n.reindex(e)),i.always(e,(function(s){var r,o,u,c;let a=null!==(o=null!==(r=s.expireCache)&&void 0!==r?r:e.expireCache)&&void 0!==o?o:i.evalOption(t.expireCache,e,s);a&&n.expire(a,{except:e});let h=null!==(c=null!==(u=s.evictCache)&&void 0!==u?u:e.evictCache)&&void 0!==c?c:i.evalOption(t.evictCache,e,s);h&&n.evict(h,{except:e});let l=n.get(e),p=s instanceof up.Response,f=!p,d=p&&s.ok,m=p&&!s.ok,g=p&&s.none;m?n.evict(e.url):f||g?n.evict(e):d&&l&&n.put(e)}))})(s),e.asap(s)}(s)}function o(...t){var n,i;null===(i=(n=up.migrate).preprocessAbortArgs)||void 0===i||i.call(n,t),e.abort(...t)}return up.on("up:network:late",(function(){i.evalOption(t.progressBar)&&(s=new up.ProgressBar)})),up.on("up:network:recover",(function(){null==s||s.conclude()})),up.on("up:framework:reset",(function(){o(),e.reset(),n.reset(),null==s||s.destroy(),s=null})),{request:function(...t){const e=function(t){var e,n;const s=i.extractOptions(t);return s.url||(s.url=t[0]),null===(n=(e=up.migrate).handleRequestOptions)||void 0===n||n.call(e,s),s}(t),n=new up.Request(e);return r(n),n},cache:n,isBusy:function(){return e.isBusy()},isSafeMethod:function(t){return i.contains(["GET","OPTIONS","HEAD"],i.normalizeMethod(t))},config:t,abort:o,registerAliasForRedirect:function(t,e){if(t.cache&&e.url&&t.url!==e.url){const s=i.variant(t,{method:e.method,url:e.url,cacheRoute:null});n.alias(t,s)}},queue:e,loadPage:function(t){new up.Request(t).loadPage()}}}(),up.request=up.network.request,up.cache=up.network.cache},3535:()=>{up.protocol=function(){const t=up.util,e=up.element,n=function(t){return"X-Up"+t.replace(/(^.|[A-Z])/g,(t=>"-"+t.toUpperCase()))},i=function(e,i,s=t.identity){let r=e.getResponseHeader(n(i));if(r)return s(r)};function s(t){return"false"!==t&&t}const r=t.memoize((function(){return t.normalizeMethod(up.browser.popCookie("_up_method"))})),o=new up.Config((()=>({methodParam:"_method",csrfParam:()=>e.metaContent("csrf-param"),csrfToken:()=>e.metaContent("csrf-token"),cspNonce:()=>e.metaContent("csp-nonce"),csrfHeader:"X-CSRF-Token",maxHeaderSize:2048})));return{config:o,locationFromXHR:function(t){return i(t,"location")||t.responseURL},titleFromXHR:function(t){var e,n,s;return null!==(s=null===(n=(e=up.migrate).titleFromXHR)||void 0===n?void 0:n.call(e,t))&&void 0!==s?s:i(t,"title",JSON.parse)},targetFromXHR:function(t){return i(t,"target")},methodFromXHR:function(e){return i(e,"method",t.normalizeMethod)},acceptLayerFromXHR:function(t){return i(t,"acceptLayer",JSON.parse)},contextFromXHR:function(t){return i(t,"context",JSON.parse)},dismissLayerFromXHR:function(t){return i(t,"dismissLayer",JSON.parse)},eventPlansFromXHR:function(t){return i(t,"events",JSON.parse)},expireCacheFromXHR:function(t){var e,n;return i(t,"expireCache")||(null===(n=(e=up.migrate).clearCacheFromXHR)||void 0===n?void 0:n.call(e,t))},evictCacheFromXHR:function(t){return i(t,"evictCache",s)},csrfHeader:function(){return t.evalOption(o.csrfHeader)},csrfParam:function(){return t.evalOption(o.csrfParam)},csrfToken:function(){return t.evalOption(o.csrfToken)},cspNonce:function(){return t.evalOption(o.cspNonce)},initialRequestMethod:r,headerize:n,wrapMethod:function(t,e){return e.add(o.methodParam,t),"POST"},cspNoncesFromHeader:function(t){let e=[];if(t){let n=t.split(/\s*;\s*/);for(let t of n)if(0===t.indexOf("script-src")){let n,i=/'nonce-([^']+)'/g;for(;n=i.exec(t);)e.push(n[1])}}return e}}}()},9615:()=>{up.radio=function(){const t=up.element,e=new up.Config((()=>({hungrySelectors:["[up-hungry]"],noHungrySelectors:["[up-hungry=false]"],pollInterval:3e4})));return up.attribute("up-poll",(function(t){up.FragmentPolling.forFragment(t).onPollAttributeObserved()})),up.macro("[up-flashes]",(function(e){t.setMissingAttrs(e,{"up-hungry":"","up-if-layer":"subtree","up-keep":"",role:"alert"}),e.addEventListener("up:fragment:keep",(function(e){t.isEmpty(e.newFragment)||e.preventDefault()}))})),{config:e,hungrySteps:function(n){let{useHungry:i,origin:s,layer:r}=n,o={current:[],other:[]};if(!i)return o;let u=e.selector("hungrySelectors");const c=[r,...r.ancestors,...r.descendants];for(let e of c){let i=up.fragment.all(e.element,u,{layer:e});for(let u of i){let i=up.fragment.tryToTarget(u,{origin:s});if(!i){up.warn("[up-hungry]","Ignoring untargetable fragment %o",u);continue}let c=t.attr(u,"up-if-layer"),a=c?up.layer.getAll(c,{baseLayer:e}):[e],h=up.motion.motionOptions(u),l=up.event.build("up:fragment:hungry",{log:!1}),p=t.callbackAttr(u,"up-on-hungry",{exposedKeys:["newFragment","renderOptions"]}),f=Object.assign(Object.assign({selector:i,oldElement:u,layer:e,origin:s},h),{placement:"swap",useKeep:!0,maybe:!0,selectEvent:l,selectCallback:p,originalRenderOptions:n});a.includes(r)&&(r===e?o.current:o.other).push(f)}}return o.other=up.fragment.compressNestedSteps(o.other),o},startPolling:function(t,e={}){up.FragmentPolling.forFragment(t).forceStart(e)},stopPolling:function(t){up.FragmentPolling.forFragment(t).forceStop()},pollOptions:function(t,n={}){const i=new up.OptionsParser(t,n);return i.number("interval",{default:e.pollInterval}),i.string("ifLayer",{default:"front"}),n}}}()},6774:()=>{!function(){const t=up.element;for(let e of["method","confirm"]){const n=`up-${e}`,i=`data-${e}`;up.macro(`a[${i}]`,(function(e){var s;(window.Rails||(null===(s=window.jQuery)||void 0===s?void 0:s.rails))&&up.link.isFollowable(e)&&(t.setMissingAttr(e,n,e.getAttribute(i)),e.removeAttribute(i))}))}}()},1897:()=>{up.script=function(){const t=up.util,e=up.element,n=new up.Config((()=>({assetSelectors:["link[rel=stylesheet]","script[src]","[up-asset]"],noAssetSelectors:["[up-asset=false]"],nonceableAttributes:["up-watch","up-on-accepted","up-on-dismissed","up-on-loaded","up-on-rendered","up-on-finished","up-on-error","up-on-offline"],scriptSelectors:["script"],noScriptSelectors:['script[type="application/ld+json"]']}))),i={"[up-back]":-100,"[up-content]":-200,"[up-drawer]":-200,"[up-modal]":-200,"[up-cover]":-200,"[up-popup]":-200,"[up-tooltip]":-200,"[up-dash]":-200,"[up-flashes]":-200,"[up-expand]":-300,"[data-method]":-400,"[data-confirm]":-400};let s=[],r=[];function o(e,n={}){let o=function(e,n){let[i,s,r]=u(e);return s=t.options(s,{selector:i,isDefault:up.framework.evaling,priority:0,batch:!1}),Object.assign(r,s,n)}(e,n);o.macro?(up.framework.evaling&&(o.priority||(o.priority=function(e){e=t.evalOption(e);for(let t in i)if(e.indexOf(t)>=0)return i[t];up.fail("Unregistered priority for system macro %o",e)}(o.selector))),c(r,o)):c(s,o)}const u=function(e){const n=t.extractOptions(e),i=e.shift(),s=e.pop();return[i,Object.assign(Object.assign({},n),t.extractOptions(e)),s]};function c(t,e){let n,i=0;for(;(n=t[i])&&n.priority>=e.priority;)i+=1;if(t.splice(i,0,e),up.framework.booted)if(0===e.priority)for(let t of up.layer.stack)a(t.element,{layer:t,compilers:[e]});else up.puts("up.compiler()","Compiler %s was registered after booting Unpoly. Compiler will run for future fragments only.",e.selector);return e}function a(t,e){up.emit(t,"up:fragment:compile",{log:!1});let n=e.compilers||r.concat(s);new up.CompilerPass(t,n,e).run()}function h(t=document.head){return t.querySelectorAll(n.selector("assetSelectors"))}function l(t){t.type="up-disabled-script"}return up.on("up:framework:reset",(function(){s=t.filter(s,"isDefault"),r=t.filter(r,"isDefault")})),{config:n,compiler:function(...t){o(t)},macro:function(...t){o(t,{macro:!0})},attrCompiler:function(...t){let[n,i,s]=u(t);o([`[${n}]`,i,t=>{let r=e.booleanOrStringAttr(t,n,i.defaultValue);if(r)return s(t,r)}])},destructor:function(e,n){let i=e.upDestructors;i||(i=[],e.upDestructors=i,e.classList.add("up-can-clean")),t.isArray(n)?i.push(...n):i.push(n)},hello:function(t,e={}){return t=up.fragment.get(t,e),up.puts("up.hello()","Compiling fragment %o",t),a(t,e),up.fragment.emitInserted(t),t},clean:function(t,e={}){new up.DestructorPass(t,e).run()},data:function(e){return(e=up.fragment.get(e)).upData||(e.upData=function(e){if(!e.getAttribute)return{};let n,i=e.getAttribute("up-data");return i&&(n=JSON.parse(i),!t.isOptions(n))?n:Object.assign(Object.assign(Object.assign({},e.dataset),n),e.upCompileData)}(e))},findAssets:h,assertAssetsOK:function(e,n){let i=h();t.map(i,"outerHTML").join()!==t.map(e,"outerHTML").join()&&up.event.assertEmitted("up:assets:changed",{oldAssets:i,newAssets:e,renderOptions:n})},disableSubtree:function(i){let s=n.selector("scriptSelectors");t.each(e.subtree(i,s),l)}}}(),up.compiler=up.script.compiler,up.destructor=up.script.destructor,up.macro=up.script.macro,up.data=up.script.data,up.hello=up.script.hello,up.attribute=up.script.attrCompiler},7924:()=>{up.util=function(){function t(){}const e={host:"cross-domain"};function n(t,n){n=R(n,e);const i=o(t);let s="";"cross-domain"===n.host&&(n.host=r(i)),n.host&&(s+=i.protocol+"//"+i.host);let{pathname:u}=i;return!1===n.trailingSlash&&"/"!==u&&(u=u.replace(/\/$/,"")),s+=u,!1!==n.search&&(s+=i.search),!1!==n.hash&&(s+=i.hash),s}const i=location.protocol,s=location.hostname;function r(t){if(b(t)&&-1===t.indexOf("//"))return!1;const e=o(t);return s!==e.hostname||i!==e.protocol}function o(t){if(t.pathname)return t;let e=document.createElement("a");return e.href=t,e}function u(t){return b(t)?e=>e[t]:t}function c(t,e){if(0===t.length)return[];e=u(e);let n=[],i=0;for(let s of t)n.push(e(s,i++));return n}function a(t,e){let n=0;for(let i of t)e(i,n++)}function h(t){return null===t}function l(t){return void 0===t}const p=Z(l);function f(t){return l(t)||h(t)}const d=Z(f);function m(t){return!!f(t)||(_(t)&&t[m.key]?t[m.key]():b(t)||E(t)?0===t.length:!!w(t)&&0===Object.keys(t).length)}m.key="up.util.isBlank";const g=Z(m);function v(t){return"function"==typeof t}function b(t){return"string"==typeof t||t instanceof String}function y(t){return"number"==typeof t||t instanceof Number}function w(t){return"object"==typeof t&&!h(t)&&(l(t.constructor)||t.constructor===Object)}function _(t){const e=typeof t;return"object"===e&&!h(t)||"function"===e}function O(t){return t instanceof Element}function k(t){return t instanceof RegExp}function S(t){return up.browser.canJQuery()&&t instanceof jQuery}const{isArray:x}=Array;function E(t){return x(t)||function(t){return t instanceof NodeList}(t)||function(t){return"[object Arguments]"===Object.prototype.toString.call(t)}(t)||S(t)||function(t){return t instanceof HTMLCollection}(t)}function C(t){return E(t)?t:f(t)?[]:[t]}function j(t){return _(t)&&t[j.key]?t=t[j.key]():E(t)?t=F(t):w(t)&&(t=Object.assign({},t)),t}function F(t){return Array.prototype.slice.call(t)}function T(...t){return Object.assign({},...t)}function R(t,e){return e?T(e,t):t?j(t):{}}function P(t,e){e=u(e);let n=0;for(let i of t){const t=e(i,n++);if(t)return t}}function A(t,e){e=u(e);let n=!0,i=0;for(let s of t)if(!e(s,i++)){n=!1;break}return n}function L(t){return $(t,d)}function $(t,e){e=u(e);const n=[];return a(t,(function(t,i){if(e(t,i))return n.push(t)})),n}function D(t){return t[t.length-1]}function M(t,e){return(t.indexOf||Array.prototype.indexOf).call(t,e)>=0}function H(t,e){const n={};for(let i of e)i in t&&(n[i]=t[i]);return n}function N(t,e){e=u(e);const n={};for(let i in t)e(t[i],i,t)&&(n[i]=t[i]);return n}function q(t,...e){return v(t)?t(...e):t}j.key="up.util.copy",Date.prototype[j.key]=function(){return new Date(+this)};const U={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"};function B(t,e){const n=t[e];return delete t[e],n}function z(t,e){if(e(D(t)))return t.pop()}function I(t){return z(t,w)||{}}function K(t){return t}function V(t){const e=[];for(let n of t)E(n)?e.push(...n):e.push(n);return e}function X(t,e){if((null==t?void 0:t.valueOf)&&(t=t.valueOf()),(null==e?void 0:e.valueOf)&&(e=e.valueOf()),typeof t!=typeof e)return!1;if(E(t)&&E(e))return W(t,e);if(_(t)&&t[X.key])return t[X.key](e);if(w(t)&&w(e)){const n=Object.keys(t);return!!W(n,Object.keys(e))&&A(n,(n=>X(t[n],e[n])))}return t===e}function W(t,e){return t.length===e.length&&A(t,((t,n)=>X(t,e[n])))}X.key="up.util.isEqual";const J={"space/or":/\s+(?:or\s+)?/,or:/\s+or\s+/,comma:/\s*,\s*/};let G=0;function Q(t,e="%o"){let n;if("%c"===e)return"";if("%s"===e&&d(t)&&(t=t.toString()),b(t))n=t.trim().replace(/[\n\r\t ]+/g," "),"%o"===e&&(n=JSON.stringify(n));else if(l(t))n="undefined";else if(y(t)||v(t))n=t.toString();else if(x(t))n=`[${c(t,Q).join(", ")}]`;else if(S(t))n=`$(${c(t,Q).join(", ")})`;else if(O(t)){n=`<${t.tagName.toLowerCase()}`;for(let e of["id","up-id","name","class"]){let i=t.getAttribute(e);i&&(n+=` ${e}="${i}"`)}n+=">"}else if(k(t)||t instanceof Error)n=t.toString();else try{n=JSON.stringify(t)}catch(t){if("TypeError"!==t.name)throw t;n="(circular structure)"}return n.length>200&&(n=`${n.substr(0,200)}…${D(n)}`),n}const Y=/%[oOdisfc]/g;function Z(t){return function(...e){return!t(...e)}}function tt(t){if(t.error)throw t.error;return t.value}function et(t,e,n){try{return{value:t.apply(e,n)}}catch(t){return{error:t}}}return{parseURL:o,normalizeURL:n,matchURLs:function(t,e){return n(t)===n(e)},normalizeMethod:function(t){return t?t.toUpperCase():"GET"},methodAllowsPayload:function(t){return"GET"!==t&&"HEAD"!==t},copy:j,merge:T,mergeDefined:function(...t){const e={};for(let n of t)if(n)for(let t in n){const i=n[t];p(i)&&(e[t]=i)}return e},options:R,parseArgIntoOptions:function(t,e){let n=I(t);return p(t[0])&&(n=j(n),n[e]=t[0]),n},each:a,map:c,flatMap:function(t,e){return V(c(t,e))},mapObject:function(t,e){return c(t,e).reduce((function(t,e){return t[e[0]]=e[1],t}),{})},findResult:P,some:function(t,e){return!!P(t,e)},every:A,find:function(t,e){let n;e=u(e);for(let i of t)if(e(i)){n=i;break}return n},filter:$,reject:function(t,e){return $(t,e=Z(u(e)))},intersect:function(t,e){return $(t,(t=>M(e,t)))},compact:L,compactObject:function(t){return N(t,d)},uniq:function(t){return t.length<2?t:Array.from(new Set(t))},uniqBy:function(t,e){if(t.length<2)return t;e=u(e);const n=new Set;return $(t,(function(t,i){const s=e(t,i);return!n.has(s)&&(n.add(s),!0)}))},last:D,isNull:h,isDefined:p,isUndefined:l,isGiven:d,isMissing:f,isPresent:g,isBlank:m,presence:function(t,e=g){if(e(t))return t},isObject:_,isFunction:v,isString:b,isBoolean:function(t){return"boolean"==typeof t||t instanceof Boolean},isNumber:y,isElement:O,isJQuery:S,isElementish:function(t){var e;return!(!t||!t.addEventListener&&!(null===(e=t[0])||void 0===e?void 0:e.addEventListener))},isPromise:function(t){return _(t)&&v(t.then)},isOptions:w,isArray:x,isFormData:function(t){return t instanceof FormData},isList:E,isRegExp:k,timer:function(t,e){return setTimeout(e,t)},contains:M,containsAll:function(t,e){return A(e,(e=>M(t,e)))},objectContains:function(t,e){return X(e,H(t,Object.keys(e)))},toArray:function(t){return x(t)?t:F(t)},pick:H,pickBy:N,omit:function(t,e){return N(t,((t,n)=>!M(e,n)))},unresolvablePromise:function(){return new Promise(t)},remove:function(t,e){const n=t.indexOf(e);if(n>=0)return t.splice(n,1),e},memoize:function(t){let e,n;return function(...i){return n?e:(n=!0,e=t.apply(this,i))}},pluckKey:B,renameKey:function(t,e,n){return t[n]=B(t,e)},extractOptions:I,extractCallback:function(t){return z(t,v)},noop:t,asyncNoop:function(){return Promise.resolve()},identity:K,escapeHTML:function(t){return t.replace(/[&<>"']/g,(t=>U[t]))},escapeRegExp:function(t){return t.replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")},sequence:function(t){return t=L(t),(...e)=>c(t,(t=>t(...e)))},evalOption:q,evalAutoOption:function(t,e,...n){return"auto"===(t=q(t,...n))&&(t=q(e,...n)),t},flatten:V,newDeferred:function(){let t,e;const n=new Promise((function(n,i){t=n,e=i}));return n.resolve=t,n.reject=e,n},always:function(t,e=K){return t.then(e,e)},isBasicObjectProperty:function(t){return Object.prototype.hasOwnProperty(t)},isCrossOrigin:r,task:function(t){return setTimeout(t)},isEqual:X,parseTokens:function(t,e={}){if(b(t)){if(t=t.trim(),e.json&&/^\[.*]$/.test(t))return JSON.parse(t);{let n=e.separator||"space/or",i=J[n];return t.split(i)}}return C(t)},wrapList:C,wrapValue:function(t,...e){return e[0]instanceof t?e[0]:new t(...e)},uid:function(){return G++},upperCaseFirst:function(t){return t[0].toUpperCase()+t.slice(1)},lowerCaseFirst:function(t){return t[0].toLowerCase()+t.slice(1)},delegate:function(t,e,n){for(let i of e)Object.defineProperty(t,i,{get(){const t=n.call(this);let e=t[i];return v(e)&&(e=e.bind(t)),e},set(t){n.call(this)[i]=t}})},reverse:function(t){return j(t).reverse()},camelToKebabCase:function(t){return t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))},replaceValue:function(t,e,n){return t===e?n:t},sprintf:function(t,...e){return t.replace(Y,(t=>Q(e.shift(),t)))},renameKeys:function(t,e){const n={};for(let i in t)n[e(i)]=t[i];return n},memoizeMethod:function(t,e){for(let n in e){let e=Object.getOwnPropertyDescriptor(t,n).value,i=function(...t){var i;let s=this[i=`__${n}MemoizeCache`]||(this[i]={}),r=JSON.stringify(t);return s[r]||(s[r]=et(e,this,t)),tt(s[r])};t[n]=i}},safeStringifyJSON:function(t){return JSON.stringify(t).replace(/[^\x00-\x7F]/g,(t=>"\\u"+t.charCodeAt(0).toString(16).padStart(4,"0")))},variant:function(t,e={}){let n=Object.create(t);return Object.assign(n,e),n}}}()},4606:(t,e,n)=>{n(573),up.viewport=function(){const t=up.util,e=up.element,n=up.fragment,i=new up.Config((()=>({viewportSelectors:["[up-viewport]","[up-fixed]"],fixedTopSelectors:["[up-fixed~=top]"],fixedBottomSelectors:["[up-fixed~=bottom]"],anchoredRightSelectors:["[up-anchored~=right]","[up-fixed~=top]","[up-fixed~=bottom]","[up-fixed~=right]"],revealSnap:200,revealPadding:0,revealTop:!1,revealMax:()=>.5*window.innerHeight,autoFocusVisible:({element:t,inputDevice:e})=>"key"===e||up.form.isField(t)}))),s=new up.BodyShifter;function r(e,i){var s,r;return i=t.options(i),e=n.get(e,i),(i.layer=up.layer.get(e))||up.fail("Cannot reveal a detached element"),i.peel&&i.layer.peel(),new up.RevealMotion(e,i).start(),(null===(r=(s=up.migrate).formerlyAsync)||void 0===r?void 0:r.call(s,"up.reveal()"))||!0}function o(e,{preventScroll:n,force:s,inputDevice:o,focusVisible:c}={}){if(s&&(e.hasAttribute("tabindex")||-1!==e.tabIndex||e.setAttribute("tabindex","-1")),null!=o||(o=up.event.inputDevice),null!=c||(c="auto"),c=t.evalAutoOption(c,i.autoFocusVisible,{element:e,inputDevice:o}),e.focus({preventScroll:!0,focusVisible:c}),u(e),e.classList.add(c?"up-focus-visible":"up-focus-hidden"),!n)return r(e)}function u(t){null==t||t.classList.remove("up-focus-hidden","up-focus-visible")}function c(t=location.hash,e){let n=v(t,e);if(n)return up.reveal(n,{top:!0})}function a(){return[p().tagName,...i.viewportSelectors].join()}function h(t,e={}){return n.get(t,e).closest(a())}function l(t,i={}){return t=n.get(t,i),e.around(t,a())}function p(){return document.scrollingElement}function f(){return e.root.clientWidth}function d(t){return up.fragment.tryToTarget(t)}function m(e){const i=t.copy(t.extractOptions(e));let s;return i.layer=up.layer.get(i),s=e[0]?[h(e[0],i)]:i.around?l(i.around,i):function(t={}){return n.all(a(),t)}(i),[s,i]}function g(t,e){for(let n of t){const t=d(n);n.scrollTop=e[t]||0}}function v(t,i={}){if(t=null==(s=t)?void 0:s.replace(/^#/,"")){const s=[e.attrSelector("id",t),"a"+e.attrSelector("name",t)].join();return n.get(s,i)}var s}up.compiler(i.selectorFn("anchoredRightSelectors"),(function(t){return s.onAnchoredElementInserted(t)})),up.on("focusin",(function({relatedTarget:t}){u(t)}));const b=["selectionStart","selectionEnd","scrollLeft","scrollTop"];let y=!1;return up.on("scroll",{once:!0,beforeBoot:!0},(()=>y=!0)),up.on("up:framework:boot",(function(){t.task((function(){if(!y)return c()}))})),up.on(window,"hashchange",(()=>c())),{reveal:r,revealHash:c,firstHashTarget:v,config:i,get:h,subtree:function(t,i={}){return t=n.get(t,i),e.subtree(t,a())},around:l,get root(){return p()},rootWidth:f,rootHeight:function(){return e.root.clientHeight},isRoot:function(t){return t===p()},rootScrollbarWidth:function(){return window.innerWidth-f()},saveScroll:function(...t){const[e,n]=m(t),i=n.location||n.layer.location;if(i){const t=function(t){let e={};for(let n of t){let t=d(n);t?e[t]=n.scrollTop:up.warn("up.viewport.saveScroll()","Cannot save scroll positions for untargetable viewport %o",n)}return e}(e);n.layer.lastScrollTops.set(i,t)}},restoreScroll:function(...t){const[e,n]=m(t),{location:i}=n.layer,s=n.layer.lastScrollTops.get(i);return!!s&&(g(e,s),up.puts("up.viewport.restoreScroll()","Restored scroll positions to %o",s),!0)},resetScroll:function(...t){const[e,n]=m(t);g(e,{})},saveFocus:function(t={}){const e=up.layer.get(t),n=t.location||e.location;if(n){const t=up.FocusCapsule.preserve(e);e.lastFocusCapsules.set(n,t)}},restoreFocus:function(t={}){const e=up.layer.get(t),n=t.location||e.location,i=t.layer.lastFocusCapsules.get(n);return!(!i||!i.restore(e)||(up.puts("up.viewport.restoreFocus()",'Restored focus to "%s"',i.target),0))},absolutize:function(n,s={}){var r;const o=h(n).getBoundingClientRect(),u=n.getBoundingClientRect(),c=new up.Rect({left:u.left-o.left,top:u.top-o.top,width:u.width,height:u.height});null===(r=s.afterMeasure)||void 0===r||r.call(s),e.setStyle(n,{position:"static"===n.style.position?"static":"relative",top:"auto",right:"auto",bottom:"auto",left:"auto",width:"100%",height:"100%"});const a=e.createFromSelector("up-bounds");e.insertBefore(n,a),a.appendChild(n);const l=function(t,n){return c.left+=t,c.top+=n,e.setStyle(a,c,"px")};l(0,0);const p=n.getBoundingClientRect();return l(u.left-p.left,u.top-p.top),t.each(function(t=document){const e=["[up-fixed]"].concat(i.fixedTopSelectors).concat(i.fixedBottomSelectors);return t.querySelectorAll(e.join())}(n),e.fixedToAbsolute),{bounds:a,moveBounds:l}},focus:o,tryFocus:function(t,e){return o(t,e),t===document.activeElement},newStateCache:function(){return new up.FIFOCache({capacity:30,normalizeKey:up.history.normalizeURL})},focusedElementWithin:function(t){const e=document.activeElement;if(up.fragment.contains(t,e))return e},copyCursorProps:function(t,e={}){for(let n of b)try{e[n]=t[n]}catch(t){}return e},bodyShifter:s}}(),up.focus=up.viewport.focus,up.reveal=up.viewport.reveal},3507:()=>{window.up={version:"3.8.0"}}},e={};function n(i){var s=e[i];if(void 0!==s)return s.exports;var r=e[i]={exports:{}};return t[i].call(r.exports,r,r.exports,n),r.exports}n(3507),n(8374),n(7924),n(3924),n(6535),n(2811),n(9675),n(376),n(8272),n(4366),n(8010),n(4861),n(3469),n(4504),n(2406),n(3742),n(1653),n(1104),n(5949),n(1279),n(6346),n(3030),n(7948),n(2714),n(1752),n(8228),n(7050),n(9441),n(9489),n(7422),n(2200),n(278),n(9005),n(1569),n(2737),n(3635),n(1906),n(4158),n(3139),n(2214),n(5240),n(665),n(2828),n(2587),n(7031),n(8057),n(4850),n(7956),n(7403),n(6412),n(7965),n(7771),n(86),n(4552),n(5580),n(7101),n(6066),n(6387),n(5390),n(2460),n(7792),n(4308),n(8665),n(3645),n(7782),n(2705),n(606),n(5437),n(7974),n(6413),n(5221),n(2298),n(4517),n(7241),n(2723),n(8720),n(7885),n(4818),n(9634),n(8670),n(3535),n(4453),n(1897),n(8944),n(2667),n(4606),n(4034),n(1647),n(9443),n(3849),n(2851),n(454),n(9615),n(6774),up.framework.onEvaled()})();