(function(e,t){if(typeof define==="function"&&define.amd){define([],t)}else if(typeof module==="object"&&module.exports){module.exports=t()}else{e.htmx=e.htmx||t()}})(typeof self!=="undefined"?self:this,function(){return function(){"use strict";var z={onLoad:t,process:mt,on:D,off:X,trigger:ee,ajax:or,find:C,findAll:R,closest:A,values:function(e,t){var r=Bt(e,t||"post");return r.values},remove:O,addClass:q,removeClass:T,toggleClass:L,takeClass:H,defineExtension:dr,removeExtension:vr,logAll:E,logger:null,config:{historyEnabled:true,historyCacheSize:10,refreshOnHistoryMiss:false,defaultSwapStyle:"innerHTML",defaultSwapDelay:0,defaultSettleDelay:20,includeIndicatorStyles:true,indicatorClass:"htmx-indicator",requestClass:"htmx-request",addedClass:"htmx-added",settlingClass:"htmx-settling",swappingClass:"htmx-swapping",allowEval:true,inlineScriptNonce:"",attributesToSettle:["class","style","width","height"],withCredentials:false,timeout:0,wsReconnectDelay:"full-jitter",wsBinaryType:"blob",disableSelector:"[hx-disable], [data-hx-disable]",useTemplateFragments:false,scrollBehavior:"smooth",defaultFocusScroll:false,getCacheBusterParam:false},parseInterval:v,_:e,createEventSource:function(e){return new EventSource(e,{withCredentials:true})},createWebSocket:function(e){var t=new WebSocket(e,[]);t.binaryType=z.config.wsBinaryType;return t},version:"1.8.6"};var r={addTriggerHandler:ft,bodyContains:re,canAccessLocalStorage:S,filterValues:Wt,hasAttribute:o,getAttributeValue:J,getClosestMatch:h,getExpressionVars:rr,getHeaders:_t,getInputValues:Bt,getInternalData:K,getSwapSpecification:Gt,getTriggerSpecs:Xe,getTarget:se,makeFragment:f,mergeObjects:ne,makeSettleInfo:Zt,oobSwap:V,selectAndSwap:Oe,settleImmediately:At,shouldCancel:Ve,triggerEvent:ee,triggerErrorEvent:Q,withExtensions:wt};var n=["get","post","put","delete","patch"];var i=n.map(function(e){return"[hx-"+e+"], [data-hx-"+e+"]"}).join(", ");function v(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}if(e.slice(-1)=="m"){return parseFloat(e.slice(0,-1))*1e3*60||undefined}return parseFloat(e)||undefined}function G(e,t){return e.getAttribute&&e.getAttribute(t)}function o(e,t){return e.hasAttribute&&(e.hasAttribute(t)||e.hasAttribute("data-"+t))}function J(e,t){return G(e,t)||G(e,"data-"+t)}function u(e){return e.parentElement}function $(){return document}function h(e,t){while(e&&!t(e)){e=u(e)}return e?e:null}function a(e,t,r){var n=J(t,r);var i=J(t,"hx-disinherit");if(e!==t&&i&&(i==="*"||i.split(" ").indexOf(r)>=0)){return"unset"}else{return n}}function Z(t,r){var n=null;h(t,function(e){return n=a(t,e,r)});if(n!=="unset"){return n}}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 s(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 l(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=$().createDocumentFragment()}return i}function f(e){if(z.config.useTemplateFragments){var t=l("
"+e+"",0);return t.querySelector("template").content}else{var r=s(e);switch(r){case"thead":case"tbody":case"tfoot":case"colgroup":case"caption":return l("",1);case"col":return l("",2);case"tr":return l("",2);case"td":case"th":return l("",3);case"script":return l(""+e+"
",1);default:return l(e,0)}}}function te(e){if(e){e()}}function g(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function p(e){return g(e,"Function")}function m(e){return g(e,"Object")}function K(e){var t="htmx-internal-data";var r=e[t];if(!r){r=e[t]={}}return r}function x(e){var t=[];if(e){for(var r=0;r=0}function re(e){if(e.getRootNode&&e.getRootNode()instanceof ShadowRoot){return $().body.contains(e.getRootNode().host)}else{return $().body.contains(e)}}function b(e){return e.trim().split(/\s+/)}function ne(e,t){for(var r in t){if(t.hasOwnProperty(r)){e[r]=t[r]}}return e}function w(e){try{return JSON.parse(e)}catch(e){St(e);return null}}function S(){var e="htmx:localStorageTest";try{localStorage.setItem(e,e);localStorage.removeItem(e);return true}catch(e){return false}}function e(e){return Qt($().body,function(){return eval(e)})}function t(t){var e=z.on("htmx:load",function(e){t(e.detail.elt)});return e}function E(){z.logger=function(e,t,r){if(console){console.log(t,e,r)}}}function C(e,t){if(t){return e.querySelector(t)}else{return C($(),e)}}function R(e,t){if(t){return e.querySelectorAll(t)}else{return R($(),e)}}function O(e,t){e=M(e);if(t){setTimeout(function(){O(e)},t)}else{e.parentElement.removeChild(e)}}function q(e,t,r){e=M(e);if(r){setTimeout(function(){q(e,t)},r)}else{e.classList&&e.classList.add(t)}}function T(e,t,r){e=M(e);if(r){setTimeout(function(){T(e,t)},r)}else{if(e.classList){e.classList.remove(t);if(e.classList.length===0){e.removeAttribute("class")}}}}function L(e,t){e=M(e);e.classList.toggle(t)}function H(e,t){e=M(e);Y(e.parentElement.children,function(e){T(e,t)});q(e,t)}function A(e,t){e=M(e);if(e.closest){return e.closest(t)}else{do{if(e==null||d(e,t)){return e}}while(e=e&&u(e));return null}}function N(e,t){if(t.indexOf("closest ")===0){return[A(e,t.substr(8))]}else if(t.indexOf("find ")===0){return[C(e,t.substr(5))]}else if(t.indexOf("next ")===0){return[I(e,t.substr(5))]}else if(t.indexOf("previous ")===0){return[k(e,t.substr(9))]}else if(t==="document"){return[document]}else if(t==="window"){return[window]}else{return $().querySelectorAll(t)}}var I=function(e,t){var r=$().querySelectorAll(t);for(var n=0;n=0;n--){var i=r[n];if(i.compareDocumentPosition(e)===Node.DOCUMENT_POSITION_FOLLOWING){return i}}};function ie(e,t){if(t){return N(e,t)[0]}else{return N($().body,e)[0]}}function M(e){if(g(e,"String")){return C(e)}else{return e}}function P(e,t,r){if(p(t)){return{target:$().body,event:e,listener:t}}else{return{target:M(e),event:t,listener:r}}}function D(t,r,n){pr(function(){var e=P(t,r,n);e.target.addEventListener(e.event,e.listener)});var e=p(r);return e?r:n}function X(t,r,n){pr(function(){var e=P(t,r,n);e.target.removeEventListener(e.event,e.listener)});return p(r)?r:n}var ae=$().createElement("output");function F(e,t){var r=Z(e,t);if(r){if(r==="this"){return[oe(e,t)]}else{var n=N(e,r);if(n.length===0){St('The selector "'+r+'" on '+t+" returned no matches!");return[ae]}else{return n}}}}function oe(e,t){return h(e,function(e){return J(e,t)!=null})}function se(e){var t=Z(e,"hx-target");if(t){if(t==="this"){return oe(e,"hx-target")}else{return ie(e,t)}}else{var r=K(e);if(r.boosted){return $().body}else{return e}}}function B(e){var t=z.config.attributesToSettle;for(var r=0;r0){o=e.substr(0,e.indexOf(":"));t=e.substr(e.indexOf(":")+1,e.length)}else{o=e}var r=$().querySelectorAll(t);if(r){Y(r,function(e){var t;var r=i.cloneNode(true);t=$().createDocumentFragment();t.appendChild(r);if(!U(o,e)){t=r}var n={shouldSwap:true,target:e,fragment:t};if(!ee(e,"htmx:oobBeforeSwap",n))return;e=n.target;if(n["shouldSwap"]){Ce(o,e,e,t,a)}Y(a.elts,function(e){ee(e,"htmx:oobAfterSwap",n)})});i.parentNode.removeChild(i)}else{i.parentNode.removeChild(i);Q($().body,"htmx:oobErrorNoTarget",{content:i})}return e}function _(e,t,r){var n=Z(e,"hx-select-oob");if(n){var i=n.split(",");for(let e=0;e0){var t=e.id.replace("'","\\'");var r=i.querySelector(e.tagName+"[id='"+t+"']");if(r&&r!==i){var n=e.cloneNode();j(e,r);a.tasks.push(function(){j(e,n)})}}})}function ue(e){return function(){T(e,z.config.addedClass);mt(e);ht(e);fe(e);ee(e,"htmx:load")}}function fe(e){var t="[autofocus]";var r=d(e,t)?e:e.querySelector(t);if(r!=null){r.focus()}}function ce(e,t,r,n){le(e,r,n);while(r.childNodes.length>0){var i=r.firstChild;q(i,z.config.addedClass);e.insertBefore(i,t);if(i.nodeType!==Node.TEXT_NODE&&i.nodeType!==Node.COMMENT_NODE){n.tasks.push(ue(i))}}}function he(e,t){var r=0;while(r-1){var t=e.replace(/