!function(e){"use strict";var t=e.htmx;if(t&&!e.EasyChatHtmxAdminConfigured){e.EasyChatHtmxAdminConfigured=!0,t.config.transitions=!1,t.config.noSwap=[204,304,"5xx"],t.config.defaultTimeout=6e4;var r=["quickreply/save","quickreply/blankRow","quickreply/reorder","quickreply/aiSuggest","operator/save","operator/delete","operator/uploadAvatar","knowledge_storage/list","knowledge_storage/bulkAction","knowledge_storage/editor","knowledge_storage/saveDocument","knowledge_storage/rowAction","notification_health/pulse","notification_health/logoutAndroidPulse","setting/catalogSearchPreview","setting/triggerCmsIndex","integration/avitoHealth","integration/tlsDiagnostics"],a=["index","quickreply","operator","analytics","notification_health","knowledge_storage","integration","marketplace","crm_integration","setting"];t.on("htmx:config:request",function(t){var i,o,s=t&&t.detail?t.detail.ctx:null;s&&s.request&&s.request.headers&&(i=s.request.action,o=n(i),-1!==r.indexOf(o)||-1!==a.indexOf(o)?(s.request.headers["X-EasyChat-Htmx"]="1",function(e){var t=n(e);return-1!==a.indexOf(t)}(s.request.action)&&(s.request.headers["X-EasyChat-Shell"]="1"),e.EasyChatCsrfToken&&(s.request.headers["X-EasyChat-CSRF"]=e.EasyChatCsrfToken)):t.preventDefault())})}function n(t){var r;try{r=new URL(String(t||""),e.location.href)}catch(e){return""}var a=r.searchParams.get("route")||"";if(a)return a;var n=String(e.EasyChatRouteBase||"index.php?route="),i=String(t||"");return n&&0===i.indexOf(n)?i.substring(n.length).split(/[&#]/)[0]:""}}(window);