(function(e,t){if(typeof define==="function"&&define.amd){define([],t)}else{e.htmx=t()}})(typeof self!=="undefined"?self:this,function(){return function(){"use strict";var k={onLoad:t,process:rt,on:I,off:M,trigger:lt,ajax:$t,find:w,findAll:S,closest:L,values:function(e,t){var r=Lt(e,t||"post");return r.values},remove:E,addClass:q,removeClass:R,toggleClass:C,takeClass:O,defineExtension:Qt,removeExtension:er,logAll:b,logger:null,useTemplateFragments:false,config:{historyEnabled:true,historyCacheSize:10,refreshOnHistoryMiss:false,defaultSwapStyle:"innerHTML",defaultSwapDelay:0,defaultSettleDelay:20,includeIndicatorStyles:true,indicatorClass:"htmx-indicator",requestClass:"htmx-request",settlingClass:"htmx-settling",swappingClass:"htmx-swapping",allowEval:true,attributesToSettle:["class","style","width","height"],withCredentials:false,wsReconnectDelay:"full-jitter",disableSelector:"[hx-disable], [data-hx-disable]"},parseInterval:f,_:e,createEventSource:function(e){return new EventSource(e,{withCredentials:true})},createWebSocket:function(e){return new WebSocket(e,[])}};var r=["get","post","put","delete","patch"];var n=r.map(function(e){return"[hx-"+e+"], [data-hx-"+e+"]"}).join(", ");function f(e){if(e==undefined){return undefined}if(e.slice(-2)=="ms"){return parseFloat(e.slice(0,-2))||undefined}if(e.slice(-1)=="s"){return parseFloat(e.slice(0,-1))*1e3||undefined}return parseFloat(e)||undefined}function l(e,t){return e.getAttribute&&e.getAttribute(t)}function s(e,t){return e.hasAttribute&&(e.hasAttribute(t)||e.hasAttribute("data-"+t))}function D(e,t){return l(e,t)||l(e,"data-"+t)}function c(e){return e.parentElement}function F(){return document}function h(e,t){if(t(e)){return e}else if(c(e)){return h(c(e),t)}else{return null}}function X(e,t){var r=null;h(e,function(e){return r=D(e,t)});return r}function d(e,t){var r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector;return r&&r.call(e,t)}function i(e){var t=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i;var r=t.exec(e);if(r){return r[1].toLowerCase()}else{return""}}function o(e,t){var r=new DOMParser;var n=r.parseFromString(e,"text/html");var i=n.body;while(t>0){t--;i=i.firstChild}if(i==null){i=F().createDocumentFragment()}return i}function u(e){if(k.config.useTemplateFragments){var t=o("
"+e+"",0);return t.querySelector("template").content}else{var r=i(e);switch(r){case"thead":case"tbody":case"tfoot":case"colgroup":case"caption":return o("",1);case"col":return o("",2);case"tr":return o("",2);case"td":case"th":return o("",3);case"script":return o(""+e+"
",1);default:return o(e,0)}}}function P(e){if(e){e()}}function a(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function v(e){return a(e,"Function")}function g(e){return a(e,"Object")}function U(e){var t="htmx-internal-data";var r=e[t];if(!r){r=e[t]={}}return r}function p(e){var t=[];if(e){for(var r=0;r=0}function z(e){return F().body.contains(e)}function y(e){return e.trim().split(/\s+/)}function V(e,t){for(var r in t){if(t.hasOwnProperty(r)){e[r]=t[r]}}return e}function x(e){try{return JSON.parse(e)}catch(e){ut(e);return null}}function e(e){return Ut(F().body,function(){return eval(e)})}function t(t){var e=k.on("htmx:load",function(e){t(e.detail.elt)});return e}function b(){k.logger=function(e,t,r){if(console){console.log(t,e,r)}}}function w(e,t){if(t){return e.querySelector(t)}else{return w(F(),e)}}function S(e,t){if(t){return e.querySelectorAll(t)}else{return S(F(),e)}}function E(e,t){e=H(e);if(t){setTimeout(function(){E(e)},t)}else{e.parentElement.removeChild(e)}}function q(e,t,r){e=H(e);if(r){setTimeout(function(){q(e,t)},r)}else{e.classList.add(t)}}function R(e,t,r){e=H(e);if(r){setTimeout(function(){R(e,t)},r)}else{e.classList.remove(t)}}function C(e,t){e=H(e);e.classList.toggle(t)}function O(e,t){e=H(e);j(e.parentElement.children,function(e){R(e,t)});q(e,t)}function L(e,t){e=H(e);if(e.closest){return e.closest(t)}else{do{if(e==null||d(e,t)){return e}}while(e=e&&c(e))}}function A(e,t){if(t.indexOf("closest ")===0){return[L(e,t.substr(8))]}else if(t.indexOf("find ")===0){return[w(e,t.substr(5))]}else{return F().querySelectorAll(t)}}function T(e,t){return A(e,t)[0]}function H(e){if(a(e,"String")){return w(e)}else{return e}}function N(e,t,r){if(v(t)){return{target:F().body,event:e,listener:t}}else{return{target:H(e),event:t,listener:r}}}function I(t,r,n){rr(function(){var e=N(t,r,n);e.target.addEventListener(e.event,e.listener)});var e=v(r);return e?r:n}function M(t,r,n){rr(function(){var e=N(t,r,n);e.target.removeEventListener(e.event,e.listener)});return v(r)?r:n}function _(e){var t=h(e,function(e){return D(e,"hx-target")!==null});if(t){var r=D(t,"hx-target");if(r==="this"){return t}else{return T(e,r)}}else{var n=U(e);if(n.boosted){return F().body}else{return e}}}function B(e){var t=k.config.attributesToSettle;for(var r=0;r0){i=e.substr(0,e.indexOf(":"));n=e.substr(e.indexOf(":")+1,e.length)}else{i=e}var o=F().querySelector(n);if(o){var a;a=F().createDocumentFragment();a.appendChild(t);if(!$(i,o)){a=t}le(i,o,o,a,r)}else{t.parentNode.removeChild(t);ot(F().body,"htmx:oobErrorNoTarget",{content:t})}return e}function Z(e,r){j(S(e,"[hx-swap-oob], [data-hx-swap-oob]"),function(e){var t=D(e,"hx-swap-oob");if(t!=null){J(t,e,r)}})}function G(e){j(S(e,"[hx-preserve], [data-hx-preserve]"),function(e){var t=D(e,"id");var r=F().getElementById(t);if(r!=null){e.parentNode.replaceChild(r,e)}})}function K(n,e,i){j(e.querySelectorAll("[id]"),function(e){if(e.id&&e.id.length>0){var t=n.querySelector(e.tagName+"[id='"+e.id+"']");if(t&&t!==n){var r=e.cloneNode();W(e,t);i.tasks.push(function(){W(e,r)})}}})}function Y(e){return function(){rt(e);Ye(e);Q(e);lt(e,"htmx:load")}}function Q(e){var t="[autofocus]";var r=d(e,t)?e:e.querySelector(t);if(r!=null){r.focus()}}function ee(e,t,r,n){K(e,r,n);while(r.childNodes.length>0){var i=r.firstChild;e.insertBefore(i,t);if(i.nodeType!==Node.TEXT_NODE&&i.nodeType!==Node.COMMENT_NODE){n.tasks.push(Y(i))}}}function te(t){var e=U(t);if(e.webSocket){e.webSocket.close()}if(e.sseEventSource){e.sseEventSource.close()}if(e.listenerInfos){j(e.listenerInfos,function(e){if(t!==e.on){e.on.removeEventListener(e.trigger,e.listener)}})}if(t.children){j(t.children,function(e){te(e)})}}function re(e,t,r){if(e.tagName==="BODY"){return se(e,t,r)}else{var n=e.previousSibling;ee(c(e),e,t,r);if(n==null){var i=c(e).firstChild}else{var i=n.nextSibling}U(e).replacedWith=i;r.elts=[];while(i&&i!==e){if(i.nodeType===Node.ELEMENT_NODE){r.elts.push(i)}i=i.nextElementSibling}te(e);c(e).removeChild(e)}}function ne(e,t,r){return ee(e,e.firstChild,t,r)}function ie(e,t,r){return ee(c(e),e,t,r)}function oe(e,t,r){return ee(e,null,t,r)}function ae(e,t,r){return ee(c(e),e.nextSibling,t,r)}function se(e,t,r){var n=e.firstChild;ee(e,n,t,r);if(n){while(n.nextSibling){te(n.nextSibling);e.removeChild(n.nextSibling)}te(n);e.removeChild(n)}}function ue(e,t){var r=X(e,"hx-select");if(r){var n=F().createDocumentFragment();j(t.querySelectorAll(r),function(e){n.appendChild(e)});t=n}return t}function le(e,t,r,n,i){switch(e){case"none":return;case"outerHTML":re(r,n,i);return;case"afterbegin":ne(r,n,i);return;case"beforebegin":ie(r,n,i);return;case"beforeend":oe(r,n,i);return;case"afterend":ae(r,n,i);return;default:var o=tr(t);for(var a=0;a([\s\S]+?)<\/title>/im;function ce(e){if(e.indexOf("")>-1&&(e.indexOf("