PageSourceSearch

https://app.coax.com.au/_next/static/chunks/pages/dashboard/admin/coax-updates-16d78d9ae3abd8db.js

js coax.com.au collected 2026-09-24 12:19:51 UTC 111,308 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="83fba678-ddba-4b8e-a97f-659c7a2ffd2c",e._sentryDebugIdIdentifier="sentry-dbid-83fba678-ddba-4b8e-a97f-659c7a2ffd2c")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3942,451],{53727:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/admin/coax-updates",function(){return r(56363)}])},57090:function(e,t,r){"use strict";r.d(t,{Z:function(){return sanitizeHtml},j:function(){return isHtmlString}});var a=r(22424);let sanitizeHtml=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a.Z.sanitize(e,{FORBID_TAGS:["style"],...t})},isHtmlString=e=>{if("string"!=typeof e)return!1;let t=new DOMParser,r=t.parseFromString(e,"text/html");for(let e of r.body.childNodes)if(e.nodeType===Node.ELEMENT_NODE)return!0;return!1}},88313:function(e,t,r){"use strict";r.d(t,{$R:function(){return previewAttachment},H_:function(){return getFallbackDownloadNameFromUrl},Ve:function(){return downloadAttachment}});var a=r(11187),n=r(4438);let removeFileExtension=e=>{let t=e.lastIndexOf(".");return t<=0||t===e.length-1?e:e.slice(0,t)},getFallbackDownloadNameFromUrl=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"attachment";try{let t=new URL(e).pathname.split("/").filter(Boolean).pop();if(t)return removeFileExtension(decodeURIComponent(t))}catch(r){let t=e.split(/[?#]/)[0].split("/").filter(Boolean).pop();if(t)return removeFileExtension(decodeURIComponent(t))}return t},previewAttachment=(e,t)=>{let{type:r,url:a,name:s}=e;r.includes("image")||r.includes("video")?t((0,n.HK)({type:r,name:s,url:a})):window.open(a,"_blank")},downloadAttachment=e=>{let{url:t,name:r}=e;a.ZP.loading("Downloading attachment...",0),fetch(t).then(e=>e.blob()).then(e=>{var t=window.URL.createObjectURL(e),n=document.createElement("a");n.href=t,n.download=r;var s=new MouseEvent("click");n.dispatchEvent(s),window.URL.revokeObjectURL(t),a.ZP.loading("Success",100),a.ZP.destroy()}).catch(e=>{a.ZP.destroy(),window.open(t,"_blank")})}},89645:function(e,t,r){"use strict";r.d(t,{P:function(){return isTransientNetworkError}});var a=r(87066);let isTransientNetworkError=e=>{var t,r,n,s;if(!e||"object"!=typeof e||a.default.isCancel(e))return!1;let i=null!==(s=null===(t=e.response)||void 0===t?void 0:t.status)&&void 0!==s?s:e.status;if("number"==typeof i&&i>0)return!1;let l=(null===(r=e.message)||void 0===r?void 0:r.toLowerCase())||"";return!e.response&&("ERR_NETWORK"===e.code||"ECONNABORTED"===e.code||(null===(n=e.request)||void 0===n?void 0:n.status)===0||"network error"===l||l.includes("timeout"))}},81188:function(e,t,r){"use strict";r.d(t,{Jq:function(){return getCurrentWordAtCursor},W0:function(){return n},iU:function(){return i},vc:function(){return a},ys:function(){return s}});let a={plugins:["quickbars","link","autolink","lists","autoresize"],statusbar:!1,min_height:100,max_height:250,menubar:!1,toolbar_location:"top",branding:!1,resize:!1,toolbar:"blocks | bold italic underline strikethrough |       bullist numlist More",quickbars_selection_toolbar:"blocks forecolor backcolor | bold italic underline strikethrough |       alignleft aligncenter alignright al
1ignjustify |       bullist numlist outdent indent | removeformat |       charmap | link",quickbars_insert_toolbar:!1,link_default_target:"_blank",placeholder:"Your message...",browser_spellcheck:!0,content_style:'\n    html, body {\n      cursor: text !important;\n    }\n    body {\n      margin: 0 !important;\n      font-size: 14px;\n    }\n    body.dark {\n      color: #fff;\n    }\n    body p {\n      margin-block-start: 0.5em !important;\n      margin-block-end: 0.5em !important;\n    }\n    .mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before {\n      color: #a6a6a6 !important;\n    }\n    * {\n      scrollbar-color: #cad5e0 transparent;\n      scrollbar-width: 8px;\n    }\n\n    .dark * {\n      scrollbar-color: #1c2a3a transparent;\n    }\n\n    /* Works on Chrome, Edge, and Safari */\n    *::-webkit-scrollbar {\n      width: 8px;\n      height: 8px;\n    }\n\n    .dark *::-webkit-scrollbar-track {\n      background: transparent;\n    }\n\n    ::-webkit-scrollbar-corner {\n      background-color: transparent;\n    }\n\n    /* *::-webkit-scrollbar-track {\n      background: black;\n    } */\n\n    .dark *::-webkit-scrollbar-thumb {\n      background: #1c2a3a;\n      border-radius: 50px;\n    }\n\n    *::-webkit-scrollbar-thumb {\n      background: #cad5e0;\n      border-radius: 50px;\n    }\n\n    /* Remove table borders */\n    .mce-item-table:not([border]),\n    .mce-item-table:not([border]) caption,\n    .mce-item-table:not([border]) td,\n    .mce-item-table:not([border]) th,\n    .mce-item-table[border="0"],\n    .mce-item-table[border="0"] caption,\n    .mce-item-table[border="0"] td,\n    .mce-item-table[border="0"] th,\n    table[style*="border-width: 0px"],\n    table[style*="border-width: 0px"] caption,\n    table[style*="border-width: 0px"] td,\n    table[style*="border-width: 0px"] th {\n      border: none !important;\n    }\n\n    div[data-coax-signature] {\n      border-top: 1px solid #aeaeae;\n      padding-top: 20px;\n    }\n\n    .dark div[data-coax-signature] {\n      border-color: #445668;\n    }\n  ',toolbar_mode:"floating",setup:e=>{e.on("init",()=>{let t=e.getBody();t&&(t.spellcheck=!0,t.setAttribute("autocorrect","on"),t.setAttribute("autocapitalize","sentences"))}),e.on("keydown",e=>{e.altKey&&"Enter"===e.code&&(e.preventDefault(),window.parent.postMessage({type:"tinymce-keydown",event:"alt-enter"},"*"))}),e.ui.registry.addIcon("bold",'<svg width="12" height="12" viewBox="0 0 12 14" xmlns="http://www.w3.org/2000/svg"><path d="M9.25002 6.8C9.73966 6.50184 10.1529 6.09342 10.4567 5.60729C10.7605 5.12116 10.9466 4.57077 11 4C11.0093 3.48388 10.9168 2.971 10.7278 2.49063C10.5388 2.01027 10.2571 1.57184 9.89864 1.20039C9.54019 0.828938 9.11207 0.531741 8.63874 0.325776C8.16541 0.119811 7.65614 0.00911107 7.14002 0H0.650024V14H7.65002C8.14118 13.9948 8.62649 13.8929 9.07825 13.7001C9.53001 13.5073 9.93937 13.2274 10.283 12.8764C10.6265 12.5253 10.8976 12.1101 11.0807 11.6543C11.2638 11.1985 11.3553 10.7112 11.35 10.22V10.1C11.3504 9.40711 11.1529 8.72852 10.781 8.14395C10.409 7.55939 9.87785 7.09315 9.25002 6.8ZM2.65002 2H6.85002C7.2762 1.98681 7.69621 2.10428 8.0537 2.33665C8.41119 2.56902 8.68906 2.90517 8.85003 3.3C9.0129 3.82779 8.96022 4.39859 8.70351 4.88765C8.4468 5.37672 8.00692 5.74428 7.48002 5.91C7.27541 5.96996 7.06325 6.00027 6.85002 6H2.65002V2ZM7.25002 12H2.65002V8H7.25002C7.6762 7.98681 8.09621 8.10428 8.4537 8.33665C8.81119 8.56902 9.08906 8.90517 9.25002 9.3C9.4129 9.82779 9.36022 10.3986 9.10351 10.8877C8.8468 11.3767 8.40692 11.7443 7.88002 11.91C7.67541 11.97 7.46325 12.0003 7.25002 12Z" fill="currentColor"/></svg>'),e.ui.registry.addIcon("italic",'<svg width="6" height="14" viewBox="0 0 6 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.76006 4H4.76006L2.56006 14H0.560059L2.76006 4ZM4.44006 0C4.24228 0 4.04894 0.0586491 3.88449 0.16853C3.72004 0.278412 3.59187 0.434591 3.51618 0.617317C3.44049 0.800043 3.42069 1.00111 3.45927 1.19509C3.49786 1.38907 3.5931 1.56725 3.73295 1.70711C3.8728 1.84696 4.05099 1.9422 4.24497 1.98079C4.43895 2.01937 4.64002 1.99957 4.82274 1.92388C5.00547 1.84819 5.16165 1.72002 5.27153 1.55557C5.38141 1.39112 5.44006 1.19778 5.44006 1C5.44006 0.734784 5.3347 0.48043 5.14717 0.292893
1C4.95963 0.105357 4.70527 0 4.44006 0Z" fill="currentColor"/></svg>'),e.ui.registry.addIcon("underline",'<svg width="14" height="14" viewBox="0 0 14 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14 15V17H0V15H14ZM11 8.215C10.9671 8.87498 10.7711 9.51653 10.4297 10.0823C10.0883 10.6481 9.61207 11.1205 9.04352 11.4572C8.47497 11.794 7.83184 11.9847 7.17161 12.0122C6.51138 12.0397 5.85461 11.9033 5.26 11.615C4.57464 11.3185 3.99341 10.8241 3.59077 10.1952C3.18813 9.56633 2.98242 8.83154 3 8.085V0.00500011H1V8.215C1.03383 9.15641 1.28885 10.0766 1.74442 10.9012C2.19998 11.7257 2.84329 12.4314 3.62227 12.9611C4.40125 13.4908 5.294 13.8296 6.22827 13.9502C7.16254 14.0707 8.11207 13.9696 9 13.655C10.1811 13.2613 11.2059 12.5012 11.9252 11.485C12.6446 10.4689 13.0211 9.24981 13 8.005V0.00500011H11V8.215ZM11 0H13H11ZM3 0H1H3Z" fill="currentColor"/></svg>'),e.ui.registry.addIcon("strike-through",'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path d="M17.1538 14C17.3846 14.5161 17.5 15.0893 17.5 15.7196C17.5 17.0625 16.9762 18.1116 15.9286 18.867C14.8809 19.6223 13.4335 20 11.5862 20C9.94674 20 8.32335 19.6185 6.71592 18.8555V16.6009C8.23538 17.4783 9.7908 17.917 11.3822 17.917C13.9333 17.917 15.2128 17.1846 15.2208 15.7196C15.2208 15.0939 15.0049 14.5598 14.5731 14.1173C14.5339 14.0772 14.4939 14.0381 14.4531 14H3V12H21V14H17.1538ZM13.076 11H7.62908C7.4566 10.8433 7.29616 10.6692 7.14776 10.4778C6.71592 9.92084 6.5 9.24559 6.5 8.45207C6.5 7.21602 6.96583 6.165 7.89749 5.299C8.82916 4.43299 10.2706 4 12.2219 4C13.6934 4 15.1009 4.32808 16.4444 4.98426V7.13591C15.2448 6.44921 13.9293 6.10587 12.4978 6.10587C10.0187 6.10587 8.77917 6.88793 8.77917 8.45207C8.77917 8.87172 8.99709 9.23796 9.43293 9.55079C9.86878 9.86362 10.4066 10.1135 11.0463 10.3004C11.6665 10.4816 12.3431 10.7148 13.076 11H13.076Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("ordered-list",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20"><path d="M8 4H21V6H8V4ZM5 3V6H6V7H3V6H4V4H3V3H5ZM3 14V11.5H5V11H3V10H6V12.5H4V13H6V14H3ZM5 19.5H3V18.5H5V18H3V17H6V21H3V20H5V19.5ZM8 11H21V13H8V11ZM8 18H21V20H8V18Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("unordered-list",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20"><path d="M8 4H21V6H8V4ZM4.5 6.5C3.67157 6.5 3 5.82843 3 5C3 4.17157 3.67157 3.5 4.5 3.5C5.32843 3.5 6 4.17157 6 5C6 5.82843 5.32843 6.5 4.5 6.5ZM4.5 13.5C3.67157 13.5 3 12.8284 3 12C3 11.1716 3.67157 10.5 4.5 10.5C5.32843 10.5 6 11.1716 6 12C6 12.8284 5.32843 13.5 4.5 13.5ZM4.5 20.4C3.67157 20.4 3 19.7284 3 18.9C3 18.0716 3.67157 17.4 4.5 17.4C5.32843 17.4 6 18.0716 6 18.9C6 19.7284 5.32843 20.4 4.5 20.4ZM8 11H21V13H8V11ZM8 18H21V20H8V18Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("more",'<svg width="16" height="16" width="18" height="18" viewBox="0 0 4 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 12C3.5 12.8 2.8 13.5 2 13.5C1.2 13.5 0.5 12.8 0.5 12C0.5 11.2 1.2 10.5 2 10.5C2.8 10.5 3.5 11.2 3.5 12ZM3.5 7C3.5 7.8 2.8 8.5 2 8.5C1.2 8.5 0.5 7.8 0.5 7C0.5 6.2 1.2 5.5 2 5.5C2.8 5.5 3.5 6.2 3.5 7ZM3.5 2C3.5 2.8 2.8 3.5 2 3.5C1.2 3.5 0.5 2.8 0.5 2C0.5 1.2 1.2 0.5 2 0.5C2.8 0.5 3.5 1.2 3.5 2Z" fill="currentColor"/></svg>'),e.ui.registry.addIcon("text-color",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.2459 14H8.75407L7.15407 18H5L11 3H13L19 18H16.8459L15.2459 14ZM14.4459 12L12 5.88516L9.55407 12H14.4459ZM3 20H21V22H3V20Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("highlight-bg-color",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.24264 18.9964H21V20.9964H3V16.7538L12.8995 6.85431L17.1421 11.0969L9.24264 18.9964ZM14.3137 5.44009L16.435 3.31877C16.8256 2.92825 17.4587 2.92825 17.8492 3.31877L20.6777 6.1472C21.0682 6.53772 21.0682 7.17089 20.6777 7.56141L18.5563 9.68273L14.3137 5.44009Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("align-left",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
1<path d="M3 4H21V6H3V4ZM3 19H17V21H3V19ZM3 14H21V16H3V14ZM3 9H17V11H3V9Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("align-right",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 4H21V6H3V4ZM7 19H21V21H7V19ZM3 14H21V16H3V14ZM7 9H21V11H7V9Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("align-center",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 4H21V6H3V4ZM5 19H19V21H5V19ZM3 14H21V16H3V14ZM5 9H19V11H5V9Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("align-justify",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 4H21V6H3V4ZM3 19H21V21H3V19ZM3 14H21V16H3V14ZM3 9H21V11H3V9Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("indent",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 4H21V6H3V4ZM3 19H21V21H3V19ZM11 14H21V16H11V14ZM11 9H21V11H11V9ZM7 12.5L3 16V9L7 12.5Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("outdent",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 4H21V6H3V4ZM3 19H21V21H3V19ZM11 14H21V16H11V14ZM11 9H21V11H11V9ZM3 12.5L7 9V16L3 12.5Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("remove-formatting",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12.6512 14.0654L11.6047 19.9999H9.57389L10.9247 12.3389L3.51465 4.92886L4.92886 3.51465L20.4852 19.071L19.071 20.4852L12.6512 14.0654ZM11.7727 7.53003L12.0425 5.99993H10.2426L8.24257 3.99993H19.9999V5.99993H14.0733L13.4991 9.25646L11.7727 7.53003Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("link",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.3643 15.5353L16.95 14.1211L18.3643 12.7069C20.3169 10.7543 20.3169 7.58847 18.3643 5.63585C16.4116 3.68323 13.2458 3.68323 11.2932 5.63585L9.87898 7.05007L8.46477 5.63585L9.87898 4.22164C12.6127 1.48797 17.0448 1.48797 19.7785 4.22164C22.5121 6.95531 22.5121 11.3875 19.7785 14.1211L18.3643 15.5353ZM15.5358 18.3638L14.1216 19.778C11.388 22.5117 6.9558 22.5117 4.22213 19.778C1.48846 17.0443 1.48846 12.6122 4.22213 9.87849L5.63634 8.46428L7.05055 9.87849L5.63634 11.2927C3.68372 13.2453 3.68372 16.4112 5.63634 18.3638C7.58896 20.3164 10.7548 20.3164 12.7074 18.3638L14.1216 16.9496L15.5358 18.3638ZM14.8287 7.75717L16.2429 9.17139L9.17187 16.2425L7.75766 14.8282L14.8287 7.75717Z" fill="currentColor"></path></svg>'),e.ui.registry.addGroupToolbarButton("More",{icon:"more",tooltip:"Alignment",items:"forecolor backcolor |           alignleft aligncenter alignright al
1ignjustify |           outdent indent | removeformat link"})}},n={plugins:["quickbars","link","autolink","lists","autoresize","image","table","preview"],statusbar:!1,min_height:400,max_height:400,menubar:!1,toolbar_location:"top",branding:!1,resize:!1,toolbar:"blocks | bold italic underline strikethrough |       bullist numlist image table preview More",quickbars_selection_toolbar:"blocks forecolor backcolor | bold italic underline strikethrough |       alignleft aligncenter alignright alignjustify |       bullist numlist outdent indent | removeformat |       charmap | link",quickbars_insert_toolbar:!1,link_default_target:"_blank",placeholder:"Your message...",content_style:'\n    html, body {\n      cursor: text !important;\n    }\n    body {\n      font-size: 14px;\n    }\n\n    body.dark {\n      color: #fff;\n    }\n    .mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before {\n      color: #a6a6a6 !important;\n    }\n    * {\n      scrollbar-color: #cad5e0 transparent;\n      scrollbar-width: 8px;\n    }\n\n    .dark * {\n      scrollbar-color: #1c2a3a transparent;\n    }\n\n    /* Works on Chrome, Edge, and Safari */\n    *::-webkit-scrollbar {\n      width: 8px;\n      height: 8px;\n    }\n\n    .dark *::-webkit-scrollbar-track {\n      background: transparent;\n    }\n\n    ::-webkit-scrollbar-corner {\n      background-color: transparent;\n    }\n\n    /* *::-webkit-scrollbar-track {\n      background: black;\n    } */\n\n    .dark *::-webkit-scrollbar-thumb {\n      background: #1c2a3a;\n      border-radius: 50px;\n    }\n\n    *::-webkit-scrollbar-thumb {\n      background: #cad5e0;\n      border-radius: 50px;\n    }\n\n    /* Remove table borders */\n    .mce-item-table:not([border]),\n    .mce-item-table:not([border]) caption,\n    .mce-item-table:not([border]) td,\n    .mce-item-table:not([border]) th,\n    .mce-item-table[border="0"],\n    .mce-item-table[border="0"] caption,\n    .mce-item-table[border="0"] td,\n    .mce-item-table[border="0"] th,\n    table[style*="border-width: 0px"],\n    table[style*="border-width: 0px"] caption,\n    table[style*="border-width: 0px"] td,\n    table[style*="border-width: 0px"] th {\n      border: none !important;\n    }\n  ',toolbar_mode:"floating",setup:e=>{e.on("keydown",e=>{e.altKey&&"Enter"===e.code&&(e.preventDefault(),window.parent.postMessage({type:"tinymce-keydown",event:"alt-enter"},"*"))}),e.ui.registry.addIcon("bold",'<svg width="12" height="12" viewBox="0 0 12 14" xmlns="http://www.w3.org/2000/svg"><path d="M9.25002 6.8C9.73966 6.50184 10.1529 6.09342 10.4567 5.60729C10.7605 5.12116 10.9466 4.57077 11 4C11.0093 3.48388 10.9168 2.971 10.7278 2.49063C10.5388 2.01027 10.2571 1.57184 9.89864 1.20039C9.54019 0.828938 9.11207 0.531741 8.63874 0.325776C8.16541 0.119811 7.65614 0.00911107 7.14002 0H0.650024V14H7.65002C8.14118 13.9948 8.62649 13.8929 9.07825 13.7001C9.53001 13.5073 9.93937 13.2274 10.283 12.8764C10.6265 12.5253 10.8976 12.1101 11.0807 11.6543C11.2638 11.1985 11.3553 10.7112 11.35 10.22V10.1C11.3504 9.40711 11.1529 8.72852 10.781 8.14395C10.409 7.55939 9.87785 7.09315 9.25002 6.8ZM2.65002 2H6.85002C7.2762 1.98681 7.69621 2.10428 8.0537 2.33665C8.41119 2.56902 8.68906 2.90517 8.85003 3.3C9.0129 3.82779 8.96022 4.39859 8.70351 4.88765C8.4468 5.37672 8.00692 5.74428 7.48002 5.91C7.27541 5.96996 7.06325 6.00027 6.85002 6H2.65002V2ZM7.25002 12H2.65002V8H7.25002C7.6762 7.98681 8.09621 8.10428 8.4537 8.33665C8.81119 8.56902 9.08906 8.90517 9.25002 9.3C9.4129 9.82779 9.36022 10.3986 9.10351 10.8877C8.8468 11.3767 8.40692 11.7443 7.88002 11.91C7.67541 11.97 7.46325 12.0003 7.25002 12Z" fill="currentColor"/></svg>'),e.ui.registry.addIcon("italic",'<svg width="6" height="14" viewBox="0 0 6 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.76006 4H4.76006L2.56006 14H0.560059L2.76006 4ZM4.44006 0C4.24228 0 4.04894 0.0586491 3.88449 0.16853C3.72004 0.278412 3.59187 0.434591 3.51618 0.617317C3.44049 0.800043 3.42069 1.00111 3.45927 1.19509C3.49786 1.38907 3.5931 1.56725 3.73295 1.70711C3.8728 1.84696 4.05099 1.9422 4.24497 1.98079C4.43895 2.01937 4.64002 1.99957 4.82274 1.92388C5.00547 1.84819 5.16165 1.72002 5.27153 1.55557C5.38141 1.39112 5.44006 1.19778 5.44006 1C5.44006 0.734784 5.3347 0.48043 5.14717 0.292893
1C4.95963 0.105357 4.70527 0 4.44006 0Z" fill="currentColor"/></svg>'),e.ui.registry.addIcon("underline",'<svg width="14" height="14" viewBox="0 0 14 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14 15V17H0V15H14ZM11 8.215C10.9671 8.87498 10.7711 9.51653 10.4297 10.0823C10.0883 10.6481 9.61207 11.1205 9.04352 11.4572C8.47497 11.794 7.83184 11.9847 7.17161 12.0122C6.51138 12.0397 5.85461 11.9033 5.26 11.615C4.57464 11.3185 3.99341 10.8241 3.59077 10.1952C3.18813 9.56633 2.98242 8.83154 3 8.085V0.00500011H1V8.215C1.03383 9.15641 1.28885 10.0766 1.74442 10.9012C2.19998 11.7257 2.84329 12.4314 3.62227 12.9611C4.40125 13.4908 5.294 13.8296 6.22827 13.9502C7.16254 14.0707 8.11207 13.9696 9 13.655C10.1811 13.2613 11.2059 12.5012 11.9252 11.485C12.6446 10.4689 13.0211 9.24981 13 8.005V0.00500011H11V8.215ZM11 0H13H11ZM3 0H1H3Z" fill="currentColor"/></svg>'),e.ui.registry.addIcon("strike-through",'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path d="M17.1538 14C17.3846 14.5161 17.5 15.0893 17.5 15.7196C17.5 17.0625 16.9762 18.1116 15.9286 18.867C14.8809 19.6223 13.4335 20 11.5862 20C9.94674 20 8.32335 19.6185 6.71592 18.8555V16.6009C8.23538 17.4783 9.7908 17.917 11.3822 17.917C13.9333 17.917 15.2128 17.1846 15.2208 15.7196C15.2208 15.0939 15.0049 14.5598 14.5731 14.1173C14.5339 14.0772 14.4939 14.0381 14.4531 14H3V12H21V14H17.1538ZM13.076 11H7.62908C7.4566 10.8433 7.29616 10.6692 7.14776 10.4778C6.71592 9.92084 6.5 9.24559 6.5 8.45207C6.5 7.21602 6.96583 6.165 7.89749 5.299C8.82916 4.43299 10.2706 4 12.2219 4C13.6934 4 15.1009 4.32808 16.4444 4.98426V7.13591C15.2448 6.44921 13.9293 6.10587 12.4978 6.10587C10.0187 6.10587 8.77917 6.88793 8.77917 8.45207C8.77917 8.87172 8.99709 9.23796 9.43293 9.55079C9.86878 9.86362 10.4066 10.1135 11.0463 10.3004C11.6665 10.4816 12.3431 10.7148 13.076 11H13.076Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("ordered-list",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20"><path d="M8 4H21V6H8V4ZM5 3V6H6V7H3V6H4V4H3V3H5ZM3 14V11.5H5V11H3V10H6V12.5H4V13H6V14H3ZM5 19.5H3V18.5H5V18H3V17H6V21H3V20H5V19.5ZM8 11H21V13H8V11ZM8 18H21V20H8V18Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("unordered-list",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20"><path d="M8 4H21V6H8V4ZM4.5 6.5C3.67157 6.5 3 5.82843 3 5C3 4.17157 3.67157 3.5 4.5 3.5C5.32843 3.5 6 4.17157 6 5C6 5.82843 5.32843 6.5 4.5 6.5ZM4.5 13.5C3.67157 13.5 3 12.8284 3 12C3 11.1716 3.67157 10.5 4.5 10.5C5.32843 10.5 6 11.1716 6 12C6 12.8284 5.32843 13.5 4.5 13.5ZM4.5 20.4C3.67157 20.4 3 19.7284 3 18.9C3 18.0716 3.67157 17.4 4.5 17.4C5.32843 17.4 6 18.0716 6 18.9C6 19.7284 5.32843 20.4 4.5 20.4ZM8 11H21V13H8V11ZM8 18H21V20H8V18Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("more",'<svg width="16" height="16" width="18" height="18" viewBox="0 0 4 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 12C3.5 12.8 2.8 13.5 2 13.5C1.2 13.5 0.5 12.8 0.5 12C0.5 11.2 1.2 10.5 2 10.5C2.8 10.5 3.5 11.2 3.5 12ZM3.5 7C3.5 7.8 2.8 8.5 2 8.5C1.2 8.5 0.5 7.8 0.5 7C0.5 6.2 1.2 5.5 2 5.5C2.8 5.5 3.5 6.2 3.5 7ZM3.5 2C3.5 2.8 2.8 3.5 2 3.5C1.2 3.5 0.5 2.8 0.5 2C0.5 1.2 1.2 0.5 2 0.5C2.8 0.5 3.5 1.2 3.5 2Z" fill="currentColor"/></svg>'),e.ui.registry.addIcon("text-color",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.2459 14H8.75407L7.15407 18H5L11 3H13L19 18H16.8459L15.2459 14ZM14.4459 12L12 5.88516L9.55407 12H14.4459ZM3 20H21V22H3V20Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("highlight-bg-color",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.24264 18.9964H21V20.9964H3V16.7538L12.8995 6.85431L17.1421 11.0969L9.24264 18.9964ZM14.3137 5.44009L16.435 3.31877C16.8256 2.92825 17.4587 2.92825 17.8492 3.31877L20.6777 6.1472C21.0682 6.53772 21.0682 7.17089 20.6777 7.56141L18.5563 9.68273L14.3137 5.44009Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("align-left",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
1<path d="M3 4H21V6H3V4ZM3 19H17V21H3V19ZM3 14H21V16H3V14ZM3 9H17V11H3V9Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("align-right",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 4H21V6H3V4ZM7 19H21V21H7V19ZM3 14H21V16H3V14ZM7 9H21V11H7V9Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("align-center",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 4H21V6H3V4ZM5 19H19V21H5V19ZM3 14H21V16H3V14ZM5 9H19V11H5V9Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("align-justify",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 4H21V6H3V4ZM3 19H21V21H3V19ZM3 14H21V16H3V14ZM3 9H21V11H3V9Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("indent",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 4H21V6H3V4ZM3 19H21V21H3V19ZM11 14H21V16H11V14ZM11 9H21V11H11V9ZM7 12.5L3 16V9L7 12.5Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("outdent",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 4H21V6H3V4ZM3 19H21V21H3V19ZM11 14H21V16H11V14ZM11 9H21V11H11V9ZM3 12.5L7 9V16L3 12.5Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("remove-formatting",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12.6512 14.0654L11.6047 19.9999H9.57389L10.9247 12.3389L3.51465 4.92886L4.92886 3.51465L20.4852 19.071L19.071 20.4852L12.6512 14.0654ZM11.7727 7.53003L12.0425 5.99993H10.2426L8.24257 3.99993H19.9999V5.99993H14.0733L13.4991 9.25646L11.7727 7.53003Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("link",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.3643 15.5353L16.95 14.1211L18.3643 12.7069C20.3169 10.7543 20.3169 7.58847 18.3643 5.63585C16.4116 3.68323 13.2458 3.68323 11.2932 5.63585L9.87898 7.05007L8.46477 5.63585L9.87898 4.22164C12.6127 1.48797 17.0448 1.48797 19.7785 4.22164C22.5121 6.95531 22.5121 11.3875 19.7785 14.1211L18.3643 15.5353ZM15.5358 18.3638L14.1216 19.778C11.388 22.5117 6.9558 22.5117 4.22213 19.778C1.48846 17.0443 1.48846 12.6122 4.22213 9.87849L5.63634 8.46428L7.05055 9.87849L5.63634 11.2927C3.68372 13.2453 3.68372 16.4112 5.63634 18.3638C7.58896 20.3164 10.7548 20.3164 12.7074 18.3638L14.1216 16.9496L15.5358 18.3638ZM14.8287 7.75717L16.2429 9.17139L9.17187 16.2425L7.75766 14.8282L14.8287 7.75717Z" fill="currentColor"></path></svg>'),e.ui.registry.addGroupToolbarButton("More",{icon:"more",tooltip:"Alignment",items:"forecolor backcolor |           alignleft aligncenter alignright al
1ignjustify |           outdent indent | removeformat link"})}},s={plugins:["quickbars","link","autolink","lists","autoresize","wordcount"],statusbar:!1,min_height:500,max_height:700,menubar:!1,toolbar_location:"top",branding:!1,resize:!1,toolbar:"blocks | bold italic underline strikethrough |       bullist numlist More",quickbars_selection_toolbar:"blocks forecolor backcolor | bold italic underline strikethrough |       alignleft aligncenter alignright alignjustify |       bullist numlist outdent indent | removeformat |       charmap | link",quickbars_insert_toolbar:!1,link_default_target:"_blank",placeholder:"Your policy goes here...",content_style:"\n    body {\n      font-size: 14px;\n    }\n    body.dark {\n      color: #fff;\n    }\n    .mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before {\n      color: #a6a6a6 !important;\n    }\n    * {\n      scrollbar-color: #cad5e0 transparent;\n      scrollbar-width: 8px;\n    }\n\n    .dark * {\n      scrollbar-color: #1c2a3a transparent;\n    }\n\n    /* Works on Chrome, Edge, and Safari */\n    *::-webkit-scrollbar {\n      width: 8px;\n      height: 8px;\n    }\n\n    .dark *::-webkit-scrollbar-track {\n      background: transparent;\n    }\n\n    ::-webkit-scrollbar-corner {\n      background-color: transparent;\n    }\n\n    /* *::-webkit-scrollbar-track {\n      background: black;\n    } */\n\n    .dark *::-webkit-scrollbar-thumb {\n      background: #1c2a3a;\n      border-radius: 50px;\n    }\n\n    *::-webkit-scrollbar-thumb {\n      background: #cad5e0;\n      border-radius: 50px;\n    }\n  ",toolbar_mode:"floating",setup:e=>{e.ui.registry.addIcon("bold",'<svg width="12" height="12" viewBox="0 0 12 14" xmlns="http://www.w3.org/2000/svg"><path d="M9.25002 6.8C9.73966 6.50184 10.1529 6.09342 10.4567 5.60729C10.7605 5.12116 10.9466 4.57077 11 4C11.0093 3.48388 10.9168 2.971 10.7278 2.49063C10.5388 2.01027 10.2571 1.57184 9.89864 1.20039C9.54019 0.828938 9.11207 0.531741 8.63874 0.325776C8.16541 0.119811 7.65614 0.00911107 7.14002 0H0.650024V14H7.65002C8.14118 13.9948 8.62649 13.8929 9.07825 13.7001C9.53001 13.5073 9.93937 13.2274 10.283 12.8764C10.6265 12.5253 10.8976 12.1101 11.0807 11.6543C11.2638 11.1985 11.3553 10.7112 11.35 10.22V10.1C11.3504 9.40711 11.1529 8.72852 10.781 8.14395C10.409 7.55939 9.87785 7.09315 9.25002 6.8ZM2.65002 2H6.85002C7.2762 1.98681 7.69621 2.10428 8.0537 2.33665C8.41119 2.56902 8.68906 2.90517 8.85003 3.3C9.0129 3.82779 8.96022 4.39859 8.70351 4.88765C8.4468 5.37672 8.00692 5.74428 7.48002 5.91C7.27541 5.96996 7.06325 6.00027 6.85002 6H2.65002V2ZM7.25002 12H2.65002V8H7.25002C7.6762 7.98681 8.09621 8.10428 8.4537 8.33665C8.81119 8.56902 9.08906 8.90517 9.25002 9.3C9.4129 9.82779 9.36022 10.3986 9.10351 10.8877C8.8468 11.3767 8.40692 11.7443 7.88002 11.91C7.67541 11.97 7.46325 12.0003 7.25002 12Z" fill="currentColor"/></svg>'),e.ui.registry.addIcon("italic",'<svg width="6" height="14" viewBox="0 0 6 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M2.76006 4H4.76006L2.56006 14H0.560059L2.76006 4ZM4.44006 0C4.24228 0 4.04894 0.0586491 3.88449 0.16853C3.72004 0.278412 3.59187 0.434591 3.51618 0.617317C3.44049 0.800043 3.42069 1.00111 3.45927 1.19509C3.49786 1.38907 3.5931 1.56725 3.73295 1.70711C3.8728 1.84696 4.05099 1.9422 4.24497 1.98079C4.43895 2.01937 4.64002 1.99957 4.82274 1.92388C5.00547 1.84819 5.16165 1.72002 5.27153 1.55557C5.38141 1.39112 5.44006 1.19778 5.44006 1C5.44006 0.734784 5.3347 0.48043 5.14717 0.292893C4.95963 0.105357 4.70527 0 4.44006 0Z" fill="currentColor"/></svg>'),e.ui.registry.addIcon("underline",'<svg width="14" height="14" viewBox="0 0 14 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14 15V17H0V15H14ZM11 8.215C10.9671 8.87498 10.7711 9.51653 10.4297 10.0823C10.0883 10.6481 9.61207 11.12
105 9.04352 11.4572C8.47497 11.794 7.83184 11.9847 7.17161 12.0122C6.51138 12.0397 5.85461 11.9033 5.26 11.615C4.57464 11.3185 3.99341 10.8241 3.59077 10.1952C3.18813 9.56633 2.98242 8.83154 3 8.085V0.00500011H1V8.215C1.03383 9.15641 1.28885 10.0766 1.74442 10.9012C2.19998 11.7257 2.84329 12.4314 3.62227 12.9611C4.40125 13.4908 5.294 13.8296 6.22827 13.9502C7.16254 14.0707 8.11207 13.9696 9 13.655C10.1811 13.2613 11.2059 12.5012 11.9252 11.485C12.6446 10.4689 13.0211 9.24981 13 8.005V0.00500011H11V8.215ZM11 0H13H11ZM3 0H1H3Z" fill="currentColor"/></svg>'),e.ui.registry.addIcon("strike-through",'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path d="M17.1538 14C17.3846 14.5161 17.5 15.0893 17.5 15.7196C17.5 17.0625 16.9762 18.1116 15.9286 18.867C14.8809 19.6223 13.4335 20 11.5862 20C9.94674 20 8.32335 19.6185 6.71592 18.8555V16.6009C8.23538 17.4783 9.7908 17.917 11.3822 17.917C13.9333 17.917 15.2128 17.1846 15.2208 15.7196C15.2208 15.0939 15.0049 14.5598 14.5731 14.1173C14.5339 14.0772 14.4939 14.0381 14.4531 14H3V12H21V14H17.1538ZM13.076 11H7.62908C7.4566 10.8433 7.29616 10.6692 7.14776 10.4778C6.71592 9.92084 6.5 9.24559 6.5 8.45207C6.5 7.21602 6.96583 6.165 7.89749 5.299C8.82916 4.43299 10.2706 4 12.2219 4C13.6934 4 15.1009 4.32808 16.4444 4.98426V7.13591C15.2448 6.44921 13.9293 6.10587 12.4978 6.10587C10.0187 6.10587 8.77917 6.88793 8.77917 8.45207C8.77917 8.87172 8.99709 9.23796 9.43293 9.55079C9.86878 9.86362 10.4066 10.1135 11.0463 10.3004C11.6665 10.4816 12.3431 10.7148 13.076 11H13.076Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("ordered-list",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20"><path d="M8 4H21V6H8V4ZM5 3V6H6V7H3V6H4V4H3V3H5ZM3 14V11.5H5V11H3V10H6V12.5H4V13H6V14H3ZM5 19.5H3V18.5H5V18H3V17H6V21H3V20H5V19.5ZM8 11H21V13H8V11ZM8 18H21V20H8V18Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("unordered-list",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20"><path d="M8 4H21V6H8V4ZM4.5 6.5C3.67157 6.5 3 5.82843 3 5C3 4.17157 3.67157 3.5 4.5 3.5C5.32843 3.5 6 4.17157 6 5C6 5.82843 5.32843 6.5 4.5 6.5ZM4.5 13.5C3.67157 13.5 3 12.8284 3 12C3 11.1716 3.67157 10.5 4.5 10.5C5.32843 10.5 6 11.1716 6 12C6 12.8284 5.32843 13.5 4.5 13.5ZM4.5 20.4C3.67157 20.4 3 19.7284 3 18.9C3 18.0716 3.67157 17.4 4.5 17.4C5.32843 17.4 6 18.0716 6 18.9C6 19.7284 5.32843 20.4 4.5 20.4ZM8 11H21V13H8V11ZM8 18H21V20H8V18Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("more",'<svg width="16" height="16" width="18" height="18" viewBox="0 0 4 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 12C3.5 12.8 2.8 13.5 2 13.5C1.2 13.5 0.5 12.8 0.5 12C0.5 11.2 1.2 10.5 2 10.5C2.8 10.5 3.5 11.2 3.5 12ZM3.5 7C3.5 7.8 2.8 8.5 2 8.5C1.2 8.5 0.5 7.8 0.5 7C0.5 6.2 1.2 5.5 2 5.5C2.8 5.5 3.5 6.2 3.5 7ZM3.5 2C3.5 2.8 2.8 3.5 2 3.5C1.2 3.5 0.5 2.8 0.5 2C0.5 1.2 1.2 0.5 2 0.5C2.8 0.5 3.5 1.2 3.5 2Z" fill="currentColor"/></svg>'),e.ui.registry.addIcon("text-color",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.2459 14H8.75407L7.15407 18H5L11 3H13L19 18H16.8459L15.2459 14ZM14.4459 12L12 5.88516L9.55407 12H14.4459ZM3 20H21V22H3V20Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("highlight-bg-color",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.24264 18.9964H21V20.9964H3V16.7538L12.8995 6.85431L17.1421 11.0969L9.24264 18.9964ZM14.3137 5.44009L16.435 3.31877C16.8256 2.92825 17.4587 2.92825 17.8492 3.31877L20.6777 6.1472C21.0682 6.53772 21.0682 7.17089 20.6777 7.56141L18.5563 9.68273L14.3137 5.44009Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("align-left",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 4H21V6H3V4ZM3 19H17V21H3V19ZM3 14H21V16H3V14ZM3 9H17V11H3V9Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("align-right",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 4H21V6H3V4ZM7 19H21V21H7V19ZM3 14H21V16H3V14ZM7 9H21V11H7V9Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("align-center",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
1<path d="M3 4H21V6H3V4ZM5 19H19V21H5V19ZM3 14H21V16H3V14ZM5 9H19V11H5V9Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("align-justify",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 4H21V6H3V4ZM3 19H21V21H3V19ZM3 14H21V16H3V14ZM3 9H21V11H3V9Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("indent",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 4H21V6H3V4ZM3 19H21V21H3V19ZM11 14H21V16H11V14ZM11 9H21V11H11V9ZM7 12.5L3 16V9L7 12.5Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("outdent",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 4H21V6H3V4ZM3 19H21V21H3V19ZM11 14H21V16H11V14ZM11 9H21V11H11V9ZM3 12.5L7 9V16L3 12.5Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("remove-formatting",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12.6512 14.0654L11.6047 19.9999H9.57389L10.9247 12.3389L3.51465 4.92886L4.92886 3.51465L20.4852 19.071L19.071 20.4852L12.6512 14.0654ZM11.7727 7.53003L12.0425 5.99993H10.2426L8.24257 3.99993H19.9999V5.99993H14.0733L13.4991 9.25646L11.7727 7.53003Z" fill="currentColor"></path></svg>'),e.ui.registry.addIcon("link",'<svg width="18" height="18" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.3643 15.5353L16.95 14.1211L18.3643 12.7069C20.3169 10.7543 20.3169 7.58847 18.3643 5.63585C16.4116 3.68323 13.2458 3.68323 11.2932 5.63585L9.87898 7.05007L8.46477 5.63585L9.87898 4.22164C12.6127 1.48797 17.0448 1.48797 19.7785 4.22164C22.5121 6.95531 22.5121 11.3875 19.7785 14.1211L18.3643 15.5353ZM15.5358 18.3638L14.1216 19.778C11.388 22.5117 6.9558 22.5117 4.22213 19.778C1.48846 17.0443 1.48846 12.6122 4.22213 9.87849L5.63634 8.46428L7.05055 9.87849L5.63634 11.2927C3.68372 13.2453 3.68372 16.4112 5.63634 18.3638C7.58896 20.3164 10.7548 20.3164 12.7074 18.3638L14.1216 16.9496L15.5358 18.3638ZM14.8287 7.75717L16.2429 9.17139L9.17187 16.2425L7.75766 14.8282L14.8287 7.75717Z" fill="currentColor"></path></svg>'),e.ui.registry.addGroupToolbarButton("More",{icon:"more",tooltip:"Alignment",items:"forecolor backcolor |           alignleft aligncenter alignright al
1ignjustify |           outdent indent | removeformat link"})}},i={indent:!1,inline:!0,newline_behavior:"linebreak",extended_valid_elements:"*[*],i[*]",noneditable_class:"placeholder",placeholder:"Your message...",toolbar:!1,menubar:!1,setup:e=>{e.on("mousedown",function(t){let r=t.target;if(r.classList.contains("placeholder")){t.preventDefault();let a=e.selection.getRng(),n=r.parentNode;return n&&(a.setStartAfter(r),a.setEndAfter(r),e.selection.setRng(a)),!1}}),e.on("keyup",function(t){if("Enter"===t.key){let t=e.getBody(),r=e.selection.getNode(),a=e.selection.getRng(),n=e.getContent({format:"text"}).length,s=a.endOffset===n||a.endOffset+1===n;if(s){let e=t.getBoundingClientRect(),a=r.getBoundingClientRect();a.bottom>e.bottom&&(t.scrollTop=t.scrollTop+(a.bottom-e.bottom)+20)}}}),e.on("keydown",function(t){if("ArrowLeft"===t.key||"ArrowRight"===t.key){let r=e.selection,a=r.getRng();a.startContainer,setTimeout(()=>{let r=e.selection.getNode();r.classList.contains("placeholder")&&(37===t.keyCode?(a.setEndBefore(r),a.setStartBefore(r)):(a.setStartAfter(r),a.setEndAfter(r)),e.selection.setRng(a))},0)}})},content_style:"\n    .placeholder {\n        background-color: #E9F2FF !important;\n        color: #1E75FF !important;\n        height: 16px !important;\n        border-radius: 10px !important;\n        padding: 4px 8px !important;\n        cursor: pointer !important;\n        outline: none !important;\n        display: inline-flex;\n        align-items: center;\n        justify-content: center;\n        width: fit-content !important;\n        gap: 4px !important;\n    }\n\n    .mce-content-body:not([dir=rtl])[data-mce-placeholder]:not(.mce-visualblocks)::before {\n        left: 13px;\n        top: 13px;\n    }\n\n    .mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before {\n      color: #a6a6a6 !important;\n    }\n    * {\n      scrollbar-color: #cad5e0 transparent;\n      scrollbar-width: 8px;\n    }\n\n    .dark * {\n      scrollbar-color: #1c2a3a transparent;\n    }\n\n    /* Works on Chrome, Edge, and Safari */\n    *::-webkit-scrollbar {\n      width: 8px;\n      height: 8px;\n    }\n\n    .dark *::-webkit-scrollbar-track {\n      background: transparent;\n    }\n\n    ::-webkit-scrollbar-corner {\n      background-color: transparent;\n    }\n\n    /* *::-webkit-scrollbar-track {\n      background: black;\n    } */\n\n    .dark *::-webkit-scrollbar-thumb {\n      background: #1c2a3a;\n      border-radius: 50px;\n    }\n\n    *::-webkit-scrollbar-thumb {\n      background: #cad5e0;\n      border-radius: 50px;\n    }\n  "},getCurrentWordAtCursor=e=>{var t;if(!e)return"";let r=null==e?void 0:e.selection,a=r.getRng(),n=(null===(t=a.startContainer.textContent)||void 0===t?void 0:t.slice(0,a.startOffset))||"",s=n.split(/\s/).pop()||"";return s}},42950:function(e,t,r){"use strict";r.d(t,{Dc:function(){return wait},K8:function(){return isUuid},KF:function(){return wordSimilarity},NJ:function(){return getStringLength},P:function(){return getEmojiLength},bJ:function(){return safeStructuredClone},cn:function(){return cn},dE:function(){return getGraphemeLength},hY:function(){return similarity},n9:function(){return getValueType}});var a=r(39991),n=r.n(a),s=r(86010),i=r(50361),l=r.n(i),o=r(98388);function cn(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,o.m6)((0,s.W)(t))}let d=/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|\ud83c[\ude32-\ude3a]|\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/g,splitEmoji=e=>{try{return[...new Intl.Segmenter().segment(e)].map(e=>e.segment)}catch(t){return e.split("")}};function getStringLength(e){let t=splitEmoji(e),r=t.length,a=t.filter(e=>e.match(d)),n=a.length,s=a.reduce((e,t)=>
1e+[...t].length,0);return r-n+s}function getGraphemeLength(e){return splitEmoji(e).length}function getEmojiLength(e){let t=splitEmoji(e);return t.filter(e=>e.match(d)).length}function wordSimilarity(e,t){return parseFloat(function(e,t){let r=Math.pow(10,t);return(Math.floor(e*r)/r).toFixed(t)}(1-n()(e,t)/Math.max(e.length,t.length),2))}function similarity(e,t){let r=e,a=t;e.length<t.length&&(r=t,a=e);let n=r.length;return 0==n?1:(n-function(e,t){e=e.toLowerCase(),t=t.toLowerCase();for(var r=[],a=0;a<=e.length;a++){for(var n=a,s=0;s<=t.length;s++)if(0==a)r[s]=s;else if(s>0){var i=r[s-1];e.charAt(a-1)!=t.charAt(s-1)&&(i=Math.min(Math.min(i,n),r[s])+1),r[s-1]=n,n=i}a>0&&(r[t.length]=n)}return r[t.length]}(r,a))/parseFloat(n+"")}let wait=e=>new Promise(t=>setTimeout(t,e)),safeStructuredClone=e=>{try{return window.structuredClone(e)}catch(t){return l()(e)}},getValueType=e=>{if("string"==typeof e)try{let t=JSON.parse(e);if(Array.isArray(t))return"array";return typeof t}catch(e){}return typeof e};function isUuid(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)}},54053:function(e,t,r){"use strict";r.d(t,{Z:function(){return useAuth}});var a=r(4438),n=r(16318),s=r(67294),i=r(85518),l=r(41248),o=r(40377),d=r(16238),c=r(23671),u=r(63893),h=r(43817),g=r(89645),p=r(76367),x=r(76128);let shouldLogoutAfterSilentAuthError=e=>{var t,r;let a=(null==e?void 0:null===(t=e.response)||void 0===t?void 0:t.status)||(null==e?void 0:e.status)||(null==e?void 0:null===(r=e.data)||void 0===r?void 0:r.status);return 401===a||404===a||/status code (401|404)/i.test((null==e?void 0:e.message)||"")},shouldRetryBootstrapAuthError=e=>{var t,r;let a=(null==e?void 0:null===(t=e.response)||void 0===t?void 0:t.status)||(null==e?void 0:e.status)||(null==e?void 0:null===(r=e.data)||void 0===r?void 0:r.status),n=(null==e?void 0:e.message)||"";return(0,g.P)(e)||400===a||/status code 400/i.test(n)};function useAuth(){var e,t,r,g,m,f,v,b,w,C,y,H,V,j,k,L,M,Z;let{sessionId:N,loading:_,isLoggedIn:B,user:S,business:A,businessLocation:P,settingsLocation:E,updateSettingsLoading:I}=(0,x.v9)(e=>e.auth),T=(0,l.I0)(),F=(0,s.useCallback)(async function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];try{await (0,p.Dm)()}catch(e){}T((0,c.kS)({redirect:e}))},[T]),z=(0,s.useCallback)(async function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];try{await (0,p.Dm)();let n=await T((0,c.x4)({email:e,password:t,bypassToken:r})).unwrap();if(!i.tq){let e=n.navigation_menu_toggle;T((0,a.gJ)(e));let t=n.contact_card_toggle;T((0,a.IW)(t)),e&&T((0,a.Nr)(!0)),t&&T((0,a.N)(!1))}return n}catch(e){if(!r&&(null==e?void 0:e.message))try{let t=JSON.parse(null==e?void 0:e.message);(null==t?void 0:t.status)===404||(null==t?void 0:t.status)===400||(null==t?void 0:t.status)===422?n.ZP.error({message:"Wrong email or password. Please try again."}):n.ZP.error({message:t.message})}catch(e){n.ZP.error({message:"Something went wrong. Please try again in a moment."})}else if(!(0,o.sc)()&&shouldLogoutAfterSilentAuthError(e)){if((0,d.QI)())return null;F()}if(r&&s&&shouldRetryBootstrapAuthError(e))throw e;return null}},[T,F]);return{isLoggedIn:B,user:S,business:A,businessLocation:P,login:z,loading:_,logout:F,isOnAllLocations:!P,businessCountry:P?(null==P?void 0:P.country)||"AU":(null==A?void 0:null===(e=A.locations[0])||void 0===e?void 0:e.country)||"AU",updateSettingsLocation:function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];T((0,u.kJ)(t)),T((0,u.v_)(e)),setTimeout(()=>T((0,u.kJ)(!1)),600)},isSuperAdmin:!!(null==S?void 0:S.super_admin),isBusinessOwner:(null==A?void 0:A.owner_user_id)===(null==S?void 0:S.id),canUseAIFeatures:(null==S?void 0:S.super_admin)||(null==S?void 0:S.id)==="e5b83a44-6190-42b1-8695-bf6262b11e88",canUseMoveBusinessFeature:!h.BB||["c2039f44-3e67-49bb-b300-5579d36a3f04","7d9d2b47-1452-4337-9805-a9391508d8cf","ceb1f663-a042-41cc-b77e-7e0f72887dc6","740f6a96-a703-4f8f-b442-7b9c39546aac","384b3314-c9f8-4ab4-895f-425695db19c1","d3aff10b-cee4-4e1a-b595-200938b39e5b"].includes((null==A?void 0:A.id)||""),isOutboundEnabled:(null==A?void 0:A.id)==="e0b4c1a3-7983-4ffa-8bc0-34e5820efdcc"||!!(null==A?void 0:A.locations.some(e=>e.enable_inbound_calls)),voipEnabled:!!(null==A?void 0:A.locations.some(e=>e.enable_inbound_calls)),settingsLocation:E,updateSettingsLoading:I,sessionId:N,assginedOpenCount:null!==(H=null!==(y=null==P?void 0:P.assigned_count_open)&&void 0!==y?y:null==A?void 0:null===(r=A.locations)||void 0===r?void 0:null===(t=r[0])||void 0===t?void 0:t.assigned_count_open)&&void 0!==H?H:0,assginedClosedCount:null!==(j=null!==(V=null==P?void 0:P.assigned_count_closed)&&void 0!==V?V:null==A?void 0:null===(m=A.locations)||void 0===m?void 0:null===(g=m[0])||void 0===g?void 0:g.assigned_count_closed)&&void 0!==j?j:0,unassignedCountOpen:null!==(L=null!==(k=null==P?void 0:P.unassigned_count_open)&&void 0!==k?k:null==A?void 0:null===(v=A.locations)||void 0===v?void 0:null===(f=v[0])||void 0===f?void 0:f.unassigned_count_open)&&void 0!==L?L:0,unassignedCountClosed:null!==(Z=null!==(M=null==P?void 0:P.unassigned_count_closed)&&void 0!==M?M:null==A?void 0:null===(w=A.locations)||void 0===w?void 0:null===(b=w[0])||void 0===b?void 0:b.unassigned_count_closed)&&void 0!==Z?Z:0,aiOnboardingCompleted:null==S?void 0:null===(C=S.ai_info)||void 0===C?void 0:C.onboarding_completed,coaxBanners:(null==S?void 0:S.coax_banners)||[],msgSendingBehaviour:(null==S?void 0:S.msg_sending_behaviour)||"enter"}}},51113:function(e,t,r){"use strict";r.d(t,{Z:function(){return BriefCase}});var a=r(85893);function BriefCase(e){let{className:t=""}=e;return(0,a.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-sentry-element":"svg","data-sentry-component":"BriefCase","data-sentry-source-file":"Briefcase.tsx",children:[(0,a.jsx)("path",{d:"M20 7H4C2.89543 7 2 7.89543 2 9V19C2 20.1046 2.89543 21 4 21H20C21.1046 21 22 20.1046 22 19V9C22 7.89543 21.1046 7 20 7Z",stroke:"#61758A",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","data-sentry-element":"path","data-sentry-source-file":"Briefcase.tsx"}),(0,a.jsx)("path",{d:"M16 21V5C16 4.46957 15.7893 3.96086 15.4142 3.58579C15.0391 3.21071 14.5304 3 14 3H10C9.46957 3 8.96086 3.21071 8.58579 3.58579C8.21071 3.96086 8 4.46957 8 5V21",stroke:"#61758A",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","data-sentry-element":"path","data-sentry-source-file":"Briefcase.tsx"})]})}r(67294)},52062:function(e,t,r){"use strict";r.d(t,{Z:function(){return EmailOpen}});var a=r(85893);function EmailOpen(e){let{className:t=""}=e;return(0,a.jsx)("svg",{className:"".concat(t),width:"18",height:"18",viewBox:"0 0 18 18",fill:"
1currentColor",xmlns:"http://www.w3.org/2000/svg","data-sentry-element":"svg","data-sentry-component":"EmailOpen","data-sentry-source-file":"EmailOpen.tsx",children:(0,a.jsx)("path",{d:"M0.869187 5.71141L8.57502 1.09141C8.70453 1.01371 8.85273 0.972656 9.00377 0.972656C9.15481 0.972656 9.30301 1.01371 9.43252 1.09141L17.1309 5.71225C17.1926 5.74926 17.2437 5.80165 17.2792 5.8643C17.3147 5.92696 17.3334 5.99774 17.3334 6.06975V16.6664C17.3334 16.8874 17.2456 17.0994 17.0893 17.2557C16.933 17.412 16.721 17.4997 16.5 17.4997H1.50002C1.27901 17.4997 1.06704 17.412 0.910765 17.2557C0.754484 17.0994 0.666687 16.8874 0.666687 16.6664V6.06891C0.666672 5.99691 0.685318 5.92612 0.720808 5.86347C0.756298 5.80081 0.807419 5.74843 0.869187 5.71141ZM2.33335 6.77725V15.8331H15.6667V6.77641L9.00335 2.77641L2.33335 6.77641V6.77725ZM9.05002 11.4147L13.4634 7.69558L14.5367 8.97058L9.06169 13.5847L3.47002 8.97642L4.53002 7.68975L9.05002 11.4147Z","data-sentry-element":"path","data-sentry-source-file":"EmailOpen.tsx"})})}r(67294)},77676:function(e,t,r){"use strict";r.d(t,{Z:function(){return User}});var a=r(85893);function User(e){let{className:t=""}=e;return(0,a.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"data-sentry-element":"svg","data-sentry-component":"User","data-sentry-source-file":"User.tsx",children:[(0,a.jsx)("path",{d:"M20 21V19C20 17.9391 19.5786 16.9217 18.8284 16.1716C18.0783 15.4214 17.0609 15 16 15H8C6.93913 15 5.92172 15.4214 5.17157 16.1716C4.42143 16.9217 4 17.9391 4 19V21",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","data-sentry-element":"path","data-sentry-source-file":"User.tsx"}),(0,a.jsx)("path",{d:"M12 11C14.2091 11 16 9.20914 16 7C16 4.79086 14.2091 3 12 3C9.79086 3 8 4.79086 8 7C8 9.20914 9.79086 11 12 11Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","data-sentry-element":"path","data-sentry-source-file":"User.tsx"})]})}r(67294)},42509:function(e,t,r){"use strict";var a=r(85893),n=r(17864),s=r(51568),i=r(53907),l=r(36492),o=r(65400),d=r.n(o),c=r(10149),u=r(2307),h=r(57460),g=r.n(h),p=r(67294);let CSVRenderer=e=>{var t;let{csvData:r,showSearch:l,tableProps:o}=e,[c,h]=(0,p.useState)([]),[x,m]=(0,p.useState)(50),f=(0,p.useRef)(null),[v,b]=(0,p.useState)(""),[w]=(0,i.c)(v,300);(0,p.useEffect)(()=>{let e=g().parse(r,{header:!1,skipEmptyLines:!0});h(e.data)},[r]);let C=null===(t=c[0])||void 0===t?void 0:t.map((e,t)=>({title:e||"Column ".concat(t+1),dataIndex:e||"Column ".concat(t+1),key:t,render:e=>(0,a.jsx)("p",{className:"truncate text-[13px] text-gray-500 dark:text-gray-400",children:e||"--"}),className:"text-sm font-semibold w-[200px]",filterDropdown:t=>{let{setSelectedKeys:r,selectedKeys:s,confirm:i,clearFilters:l,close:o}=t,c=!!s[0];return(0,a.jsx)("div",{className:"w-[250px] space-y-4 p-3",onKeyDown:e=>{e.stopPropagation(),"Escape"===e.key&&o()},children:(0,a.jsx)(n.default,{size:"large",suffix:(0,a.jsxs)("div",{className:"flex",children:[c&&(0,a.jsx)(d(),{size:"small",type:"text",icon:(0,a.jsx)("i",{className:"ri-close-line cursor-pointer text-gray-500 hover:text-gray-700"}),onClick:()=>{null==l||l(),i({closeDropdown:!1})}}),(0,a.jsx)(d(),{size:"small",type:"text",icon:(0,a.jsx)("i",{className:"ri-search-line cursor-pointer text-gray-500 hover:text-gray-700"}),onClick:()=>{i()}})]}),ref:f,placeholder:"Search ".concat(e),value:s[0],onChange:e=>r(e.target.value?[e.target.value]:[]),onPressEnter:()=>i()})})},onFilterDropdownOpenChange(e){e&&setTimeout(()=>{var e;return null===(e=f.current)||void 0===e?void 0:e.select()},100)},filterIcon:e=>(0,a.jsx)("i",{className:"ri-search-line",style:{color:e?"#1677ff":void 0}}),onFilter:(t,r)=>{let a=null==r?void 0:r[e];return!!a&&a.toString().toLowerCase().includes(t.toLowerCase())},sorter:(t,r)=>{var a,n;let s=null==t?void 0:null===(a=t[e])||void 0===a?void 0:a.toLowerCase(),i=null==r?void 0:null===(n=r[e])||void 0===n?void 0:n.toLowerCase(),l=Number(s),o=Number(i);return isNaN(l)||isNaN(o)?s===i?0:s>i?1:-1:l-o}})),y=(0,p.useMemo)(()=>c.slice(1).map((e,t)=>({id:t.toString(),...e.reduce((e,t,r)=>{if(r<C.length){var a;let n=null===(a=C[r])||void 0===a?void 0:a.title;e[n]=t}return e},{})})),[c]),H=(0,p.useMemo)(()=>y.filter(e=>Object.values(e).some(e=>e.toString().toLowerCase().includes(w.toLowerCase()))),[y,w]);return(0,a.jsxs)("div",{className:"space-y-5","data-sentry-component":"CSVRenderer","data-sentry-source-file":"CSVViewer.tsx",children:[l&&(0,a.jsx)(n.default,{placeholder:"Search rows",onChange:e=>b(e.target.value),size:"large",value:v,prefix:(0,a.jsx)("i",{className:"ri-search-line"}),allowClear:!0}),(0,a.jsx)("div",{className:"rounded-base overflow-hidden",children:(0,a.jsx)(u.Z,{className:"contacts-table h-full w-full duration-500 animate-in fade-in",columns:C,dataSource:H,pagination:{...s.Sr,className:"no-override pt-2 pb-5",pageSizeOptions:[50,100,200,500],pageSize:x,onChange(e,t){m(t)}},scroll:{x:!0},rowKey:e=>e.id,...o,"data-sentry-element":"Table","data-sentry-source-file":"CSVViewer.tsx"})})]})};t.Z=e=>{let{attachment:t,showSearch:r=!1,...n}=e,{data:s,isLoading:i,isError:o}=(0,l.a)({queryKey:["csv",null==t?void 0:t.url],queryFn:async()=>{let e=await fetch((null==t?void 0:t.url)||""),r=await e.text();return r},enabled:!!(null==t?void 0:t.url)}),d=(null==t?void 0:t._csvText)||s;return(null==t?void 0:t._csvText)||(null==t?void 0:t.url)?!i||(null==t?void 0:t._csvText)?o?(0,a.jsx)("div",{className:"dark:text-gray-400",children:"Error loading CSV data"}):d?(0,a.jsx)(CSVRenderer,{csvData:d,showSearch:r,tableProps:n,"data-sentry-element":"CSVRenderer","data-sentry-component":"CSVViewer","data-sentry-source-file":"CSVViewer.tsx"}):(0,a.jsx)("div",{className:"dark:text-gray-400",children:"No data available"}):(0,a.jsx)(c.default.Button,{active:!0,className:"h-full min-h-[400px] w-full"}):(0,a.jsx)("div",{className:"dark:text-gray-400",children:"Couldn't load CSV data"})}},18328:function(e,t,r){"use strict";var a=r(85893),n=r(76128),s=r(67294),i=r(42950),l=r(62092),o=r(41248),d=r(4438);t.Z=s.memo(function(e){var t;let{type:r,attachments:s,className:c,fallbackMessage:u}=e,h=(0,n.v9)(e=>e.auth.business),g=(0,o.I0)(),p=null!=s?s:[],x=p.filter(e=>{var t;return null==e?void 0:null===(t=e.type)||void 0===t?void 0:t.includes("audio")}),m=p.filter(e=>{var t;return!(null==e?void 0:null===(t=e.type)||void 0===t?void 0:t.includes("audio"))}),f=m.length>4,v=f?m.slice(0,4):m,b=m.length-v.length,{cols:w,tile:C}=(t=v.length)<=1?{cols:1,tile:240}:2===t?{cols:2,tile:160}:3===t?{cols:3,tile:130}:{cols:2,tile:160},openPreview=e=>{g((0,d.HK)([e,...p.filter(t=>t.url!==e.url)]))};return(0,a.jsxs)("div",{className:(0,i.cn)("flex flex-col gap-2","default"===r?"items-end":"items-start",c),"data-sentry-component":"AttachmentsList","data-sentry-source-file":"AttachmentsList.tsx",children:[v.length>0&&(0,a.jsx)("div",{className:(0,i.cn)("overflow-hidden rounded-[10px] p-1.5",v.length>1&&"bg-primary-100 dark:bg-gray-800","default"===r?"rounded-br-none":"rounded-bl-none"),children:(0,a.jsx)("div",{className:"grid gap-1",
1style:{gridTemplateColumns:"repeat(".concat(w,", ").concat(C,"px)")},children:v.map((e,t)=>{let r=f&&t===v.length-1;return(0,a.jsxs)("div",{style:{width:C,height:C},className:(0,i.cn)("relative overflow-hidden rounded-lg",(null==h?void 0:h._regulated)&&"pointer-events-none blur-[20px]"),onClick:t=>{t.stopPropagation(),openPreview(e)},children:[(0,a.jsx)(l.default,{attachment:e,mode:"chat",fallbackMessage:u,showPreviewOnClick:!1}),r&&b>0&&(0,a.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-black/60 backdrop-blur-[2px]",children:(0,a.jsxs)("span",{className:"text-4xl font-bold text-white drop-shadow-md",children:["+",b]})})]},e.url)})})}),x.map(e=>(0,a.jsx)("div",{className:(0,i.cn)("overflow-hidden",e.url?"xs:-[w-300px] w-[220px] mxs:w-[350px]":"w-full",(null==h?void 0:h._regulated)&&"pointer-events-none blur-[20px]"),onClick:e=>{e.stopPropagation()},children:(0,a.jsx)(l.default,{attachment:e,mode:"chat",fallbackMessage:u})},e.url))]})})},61885:function(e,t,r){"use strict";r.d(t,{Z:function(){return AttachmentContextMenuWrapper}});var a=r(85893);r(67294);var n=r(41248);function AttachmentContextMenuWrapper(e){let{attachment:t,children:r}=e;return(0,n.I0)(),(0,a.jsx)(a.Fragment,{children:r})}},62092:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return y}});var a=r(85893);function Doc(e){return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",...e,"data-sentry-element":"svg","data-sentry-component":"Doc","data-sentry-source-file":"Doc.tsx",children:(0,a.jsx)("path",{fill:"#1E75FF",d:"M8 2.667a2.684 2.684 0 0 0-2.666 2.667V12a2.666 2.666 0 0 0-2.667 2.667v6.667A2.666 2.666 0 0 0 5.334 24v2.667A2.685 2.685 0 0 0 8 29.334h16a2.685 2.685 0 0 0 2.667-2.667V9.886c0-.354-.14-.693-.39-.943L20.39 3.058a1.34 1.34 0 0 0-.943-.391H8Zm0 2.667h10.667v4c0 .736.597 1.333 1.333 1.333h4V12H8V5.334Zm13.334 9.333A2.666 2.666 0 0 1 24 17.334h-1.333c0-.735-.599-1.334-1.333-1.334-.735 0-1.334.6-1.334 1.334v1.333c0 .735.6 1.333 1.334 1.333.734 0 1.333-.598 1.333-1.333H24a2.666 2.666 0 1 1-5.333 0v-1.333a2.666 2.666 0 0 1 2.667-2.667Zm-16 .031h2.172c2.11 0 3.161 1.269 3.161 2.808v1.028c0 1.558-1.054 2.8-3.18 2.8H5.334v-6.636Zm9.333.055c2.485-.04 2.667 2.37 2.667 2.836v1.078c0 .456-.115 2.802-2.657 2.747-2.72-.056-2.677-2.291-2.677-2.747v-1.078c0-.468.223-2.797 2.667-2.836Zm.003 1.096c-1.26.026-1.336 1.423-1.336 1.732v1.086c0 .296.206 1.679 1.349 1.656 1.096-.02 1.317-1.361 1.317-1.656v-1.086c0-.31-.15-1.756-1.33-1.732Zm-8.003.183V20h.82c.843 0 1.847-.255 1.847-1.466v-1.028c0-1.22-.994-1.474-1.828-1.474h-.839ZM8 24h16v2.667H8V24Z","data-sentry-element":"path","data-sentry-source-file":"Doc.tsx"})})}var n=r(88313),s=r(67586),i=r(65400),l=r.n(i),o=r(10149),d=r(94055),c=r(5152),u=r.n(c),h=r(67294),g=r(56310),p=r(41248),x=r(51568),m=r(42950),f=r(4438);function Archive(e){return(0,a.jsx)("svg",{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30 30",width:"30px",height:"30px",...e,"data-sentry-element":"svg","data-sentry-component":"Archive","data-sentry-source-file":"Archive.tsx",children:(0,a.jsx)("path",{d:"M 7 2 C 5.895 2 5 2.895 5 4 L 5 26 C 5 27.105 5.895 28 7 28 L 23 28 C 24.105 28 25 27.105 25 26 L 25 4 C 25 2.895 24.105 2 23 2 L 17 2 L 17 4 L 15 4 L 15 6 L 17 6 L 17 8 L 15 8 L 15 10 L 17 10 L 17 12 L 15 12 L 15 14 L 17 14 C 17 14 17.936094 17.225953 17.996094 19.751953 C 18.033094 21.301953 17.004656 22.729844 15.472656 22.964844 C 13.610656 23.249844 12 21.809 12 20 C 12 17.443 13 14 13 14 L 13 12 L 15 12 L 15 10 L 13 10 L 13 8 L 15 8 L 15 6 L 13 6 L 13 4 L 15 4 L 15 2 L 7 2 z M 15 18.75 A 1.25 1.25 0 0 0 13.75 20 A 1.25 1.25 0 0 0 15 21.25 A 1.25 1.25 0 0 0 16.25 20 A 1.25 1.25 0 0 0 15 18.75 z","data-sentry-element":"path","data-sentry-source-file":"Archive.tsx"})})}function Audio(e){return(0,a.jsx)("svg",{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30 30",width:"30px",height:"30px",...e,"data-sentry-element":"svg","data-sentry-component":"Audio","data-sentry-source-file":"Audio.tsx",children:(0,a.jsx)("path",{d:"M24.707,8.793l-6.5-6.5C18.019,2.105,17.765,2,17.5,2H7C5.895,2,5,2.895,5,4v22c0,1.105,0.895,2,2,2h16c1.105,0,2-0.895,2-2 V9.5C25,9.235,24.895,8.981,24.707,8.793z M19,14.977c0,0.255-0.192,0.469-0.445,0.497L15,15.869c0,2.281,0,4.888,0,5.23 C15,21.948,14.315,23,12.751,23c-1.397,0-1.749-0.895-1.749-1.5c0-0.743,0.448-1.503,1.751-1.503c1.18,0,1.248-0.3,1.248-0.895 l0-5.01c0-0.331,0.249-0.609,0.578-0.646l3.867-0.43C18.741,12.984,19,13.216,19,13.514V14.977z M18,10c-0.552,0-1-0.448-1-1V3.904 L23.096,10H18z","data-sentry-element":"path","data-sentry-source-file":"Audio.tsx"})})}function Doc_Doc(e){return(0,a.jsx)("svg",{fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30 30",width:"30px",height:"30px",...e,"data-sentry-element":"svg","data-sentry-component":"Doc","data-sentry-source-file":"Doc.tsx",children:(0,a.jsx)("path",{d:"M24.707,8.793l-6.5-6.5C18.019,2.105,17.765,2,17.5,2H7C5.895,2,5,2.895,5,4v22c0,1.105,0.895,2,2,2h16c1.105,0,2-0.895,2-2 V9.5C25,9.235,24.895,8.981,24.707,8.793z M18,21h-8c-0.552,0-1-0.448-1-1c0-0.552,0.448-1,1-1h8c0.552,0,1,0.448,1,1 C19,20.552,18.552,21,18,21z M20,17H10c-0.552,0-1-0.448-1-1c0-0.552,0.448-1,1-1h10c0.552,0,1,0.448,1,1C21,16.552,20.552,17,20,17 z M18,10c-0.552,0-1-0.448-1-1V3.904L23.096,10H18z","data-sentry-element":"path","data-sentry-source-file":"Doc.tsx"})})}var v=r(2601),b=r(61885),w=r(42509);let C=u()(()=>Promise.all([r.e(5975),r.e(3215)]).then(r.bind(r,73215)),{loadableGenerated:{webpack:()=>[73215]},ssr:!1});function AudioPlayer(e){let t=(0,h.useRef)(null),[r,n]=(0,h.useState)(!1),{wavesurfer:i,isReady:d,isPlaying:c,currentTime:u}=(0,s.o)({container:t,waveColor:"#61758A",progressColor:"#1e75ff",barWidth:2,barHeight:3,barRadius:100,barGap:2.5,height:20,dragToSeek:!0,cursorWidth:2}),g=(null==i?void 0:i.getDuration())||0;return((0,h.useEffect)(()=>
1{if(!i||!e.src)return;let t=!1,handleError=()=>{t||n(!0)},r=i.on("error",handleError);return n(!1),i.load(e.src).catch(handleError),()=>{t=!0,r()}},[i,e.src]),r)?(0,a.jsx)("audio",{controls:!0,src:e.src,style:{background:"transparent",width:"100%"}}):(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"flex w-full items-center gap-2 rounded-base border p-4 dark:border-darkBorder dark:bg-gray-800",children:[(0,a.jsx)(l(),{icon:c?(0,a.jsx)("i",{className:"ri-pause-fill"}):(0,a.jsx)("i",{className:"ri-play-fill"}),loading:!d,onClick:()=>{i&&i.playPause()},className:"shrink-0 rounded-full border-inherit text-gray-700 hover:bg-gray-200 dark:text-gray-300 dark:hover:bg-gray-800",size:"small","data-sentry-element":"Button","data-sentry-source-file":"ViewAttachment.tsx"}),(0,a.jsx)("div",{ref:t,className:"relative w-full",children:!d&&(0,a.jsx)(o.default.Button,{className:(0,m.cn)("absolute -top-[3px] left-0 z-10 w-full bg-gray-200 transition-opacity dark:bg-gray-700")})}),(0,a.jsxs)("span",{className:"w-32 text-right text-xs text-gray-500",children:[[u/60,u%60].map(e=>"0".concat(Math.floor(e)).slice(-2)).join(":")," ","/"," ",[g/60,g%60].map(e=>"0".concat(Math.floor(e)).slice(-2)).join(":")]})]})})}var y=h.memo(function(e){var t,r,s,i,o,c,u,y,H;let{className:V,attachment:j,mode:k="default",fallbackMessage:L,showPreviewOnClick:M=!0}=e,Z=(0,p.I0)(),[N,_]=(0,h.useState)(!1);return j?"reel"!==j.type?(null==j?void 0:null===(t=j.type)||void 0===t?void 0:t.includes("image"))&&!(null==j?void 0:null===(r=j.type)||void 0===r?void 0:r.includes("vnd.adobe.photoshop"))?(0,a.jsx)(b.Z,{attachment:j,children:(0,a.jsx)("div",{className:(0,m.cn)("relative aspect-square cursor-pointer overflow-hidden","preview"!==k&&"hover:contrast-75",V),onClick:e=>{M&&(e.stopPropagation(),Z((0,f.HK)(j)))},children:(0,a.jsx)(v.Z,{mimeType:null==j?void 0:j.type,src:j.url,alt:"",className:"rounded-lg object-center text-[10px] ".concat("preview"===k?"object-contain":"object-cover"),unoptimized:!0,fill:!0})})}):(null==j?void 0:null===(s=j.type)||void 0===s?void 0:s.includes("pdf"))||(null==j?void 0:null===(i=j.url)||void 0===i?void 0:i.endsWith(".pdf"))?(0,a.jsx)("div",{onClick:e=>{M&&(e.stopPropagation(),Z((0,f.HK)(j)))},className:(0,m.cn)("flex aspect-square cursor-pointer items-center justify-center","preview"!==k&&"hover:contrast-75",V),children:"chat"===k||"preview"===k?(0,a.jsx)(C,{attachment:{...j,type:"application"===j.type?"application/pdf":j.type},mode:k}):(0,a.jsx)("div",{children:(0,a.jsx)(Doc,{className:(0,m.cn)("h-8 w-8")})})}):(null==j?void 0:null===(o=j.type)||void 0===o?void 0:o.includes("csv"))||(null==j?void 0:null===(c=j.url)||void 0===c?void 0:c.endsWith(".csv"))?(0,a.jsx)("div",{onClick:e=>{M&&(e.stopPropagation(),"preview"!==k&&"inline"!==k&&Z((0,f.HK)(j)))},className:(0,m.cn)("flex aspect-square cursor-pointer items-center justify-center overflow-y-auto rounded-base","chat"===k&&"bg-gray-100 dark:bg-gray-800","preview"!==k&&"inline"!==k&&"overflow-hidden hover:contrast-75","inline"===k&&"aspect-auto",V),children:"chat"===k?(0,a.jsx)(w.Z,{attachment:j,pagination:!1}):"preview"===k||"inline"===k?(0,a.jsx)(w.Z,{attachment:j}):(0,a.jsx)("div",{children:(0,a.jsx)(Doc,{className:(0,m.cn)("h-8 w-8")})})}):x._F.includes(null==j?void 0:j.type)?(0,a.jsx)("div",{onClick:e=>{M&&(e.stopPropagation(),"preview"!==k&&Z((0,f.HK)(j)))},className:(0,m.cn)("relative flex aspect-square cursor-pointer items-center justify-center","preview"!==k&&"hover:contrast-75",V),children:"chat"===k||"preview"===k?(0,a.jsx)(C,{attachment:j,mode:k}):(0,a.jsx)(Doc_Doc,{className:"text-gray-600"})}):(null==j?void 0:null===(u=j.type)||void 0===u?void 0:u.includes("audio"))?(0,a.jsx)(b.Z,{attachment:j,children:(0,a.jsx)("div",{onClick:e=>{"default"===k&&M&&(e.stopPropagation(),Z((0,f.HK)(j)))},className:(0,m.cn)("relative flex cursor-pointer items-center justify-start rounded-base bg-gray-100","preview"!==k&&"hover:opacity-80","default"===k&&"aspect-square justify-center",V),children:"preview"===k||"chat"===k?j.url?(0,a.jsx)(AudioPlayer,{src:j.url}):(0,a.jsx)("section",{className:"text-left text-sm text-gray-400",children:(0,a.jsx)("i",{className:"text-left",children:L||"No audio file found."})}):(0,a.jsx)(Audio,{className:"text-gray-600"})})}):(null==j?void 0:null===(y=j.type)||void 0===y?void 0:y.includes("video"))?(0,a.jsx)(b.Z,{attachment:j,children:(0,a.jsx)(d.default,{title:N&&"This media isn't supported in your browser. Please download to view it.",children:(0,a.jsxs)("div",{onClick:e=>{"default"===k&&(N?(0,n.Ve)(j):M&&(e.stopPropagation(),Z((0,f.HK)(j))))},style:{aspectRatio:"1/1"},className:(0,m.cn)("relative flex cursor-pointer items-center justify-center overflow-hidden rounded-lg",!N&&"preview"!==k&&"hover:contrast-75",V),children:[N?(0,a.jsx)("i",{className:"ri-image-line text-4xl text-primary-200"}):(0,a.jsx)(g.Z,{controls:"preview"===k,width:"100%",height:"100%",url:j.url,style:{background:"#E9F2FF"},onError:()=>_(!0)}),"chat"===k&&!N&&(0,a.jsx)("div",{className:"absolute top-0 flex h-full w-full items-center justify-center text-primary hover:text-black",onClick:e=>{M&&(e.stopPropagation(),Z((0,f.HK)(j)))},children:N?(0,a.jsx)(l(),{shape:"circle",className:"border-none bg-gray-200 hover:bg-gray-800 hover:text-gray-300",size:"large",icon:(0,a.jsx)("i",{className:"ri-download-l
1ine"}),onClick:()=>(0,n.Ve)(j)}):(0,a.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-primary text-white",children:(0,a.jsx)("i",{className:"ri-play-fill relative left-[1.5px] text-2xl"})})}),"chat"===k&&N&&(0,a.jsxs)("div",{className:"absolute top-0 flex h-full w-full items-center justify-center bg-primary-100 text-gray-600 backdrop-brightness-90 hover:text-black",children:[(0,a.jsx)("i",{className:"ri-image-line relative bottom-3 text-4xl text-primary-200"}),(0,a.jsx)(l(),{className:"absolute bottom-2 h-8 bg-white text-gray-600 hover:text-primary",size:"large",icon:(0,a.jsx)("i",{className:"ri-download-line"}),onClick:()=>(0,n.Ve)(j),children:"Download"})]})]})})}):(null==j?void 0:null===(H=j.type)||void 0===H?void 0:H.includes("zip"))?(0,a.jsx)(b.Z,{attachment:j,children:(0,a.jsx)("div",{onClick:()=>(0,n.Ve)(j),className:(0,m.cn)("relative flex aspect-square cursor-pointer items-center justify-center","preview"!==k&&"hover:contrast-75",V),children:(0,a.jsx)(Archive,{className:"text-gray-600"})})}):(0,a.jsx)(b.Z,{attachment:j,"data-sentry-element":"AttachmentContextMenuWrapper","data-sentry-component":"ViewAttachment","data-sentry-source-file":"ViewAttachment.tsx",children:(0,a.jsx)(d.default,{title:"This media isn't supported in your browser. Please download to view it.","data-sentry-element":"Tooltip","data-sentry-source-file":"ViewAttachment.tsx",children:(0,a.jsxs)("div",{className:"relative flex aspect-video h-full w-full cursor-pointer items-center justify-center overflow-hidden rounded-lg",children:[(0,a.jsx)("i",{className:"ri-image-line text-2xl text-primary-200"}),"chat"===k&&(0,a.jsxs)("div",{className:"absolute top-0 flex h-full w-full items-center justify-center bg-primary-100 text-gray-600 backdrop-brightness-90 hover:text-black",children:[(0,a.jsx)("i",{className:"ri-image-line relative bottom-3 text-4xl text-primary-200"}),(0,a.jsx)(l(),{className:"absolute bottom-2 h-8 bg-white text-gray-600 hover:text-primary",size:"large",icon:(0,a.jsx)("i",{className:"ri-download-line"}),onClick:()=>(0,n.Ve)(j),children:"Download"})]})]})})}):void 0:null})},2601:function(e,t,r){"use strict";var a=r(85893),n=r(25675),s=r.n(n),i=r(67294);t.Z=i.memo(function(e){let[t,r]=(0,i.useState)(!0),[n,l]=(0,i.useState)(e.src);return(0,i.useEffect)(()=>l(e.src),[e.src]),(0,a.jsx)(s(),{...e,src:n,alt:e.alt,className:"".concat(e.className," ").concat("image/png"!==e.mimeType?"bg-gray-200 dark:bg-black":"bg-transparent"," ").concat(t?"grayscale":"blur-0 grayscale-0"),onLoadingComplete:async()=>{r(!1)},onError:()=>{l("https://avatar.vercel.sh/".concat(e.alt))},"data-sentry-element":"Image","data-sentry-component":"AppImage","data-sentry-source-file":"AppImage.tsx"})})},17864:function(e,t,r){"use strict";var a=r(85893),n=r(51024),s=r(67294);let{Search:i,TextArea:l,Password:o}=n.default,d=s.forwardRef(function(e,t){return(0,a.jsx)(n.default,{ref:t,"data-hj-allow":!0,...e})});d.Search=s.forwardRef(function(e,t){return(0,a.jsx)(n.default.Search,{ref:t,"data-hj-allow":!0,...e})}),d.TextArea=s.forwardRef(function(e,t){return(0,a.jsx)(n.default.TextArea,{ref:t,"data-hj-allow":!0,spellCheck:!0,autoCorrect:"on",autoCapitalize:"sentences",...e})}),d.Password=s.forwardRef(function(e,t){return(0,a.jsx)(n.default.Password,{ref:t,...e})}),t.default=d},7968:function(e,t,r){"use strict";r.d(t,{Z:function(){return SettingsCard}});var a=r(85893),n=r(42950),s=r(10149);function SettingsCard(e){let{children:t,className:r="",cardLabel:i="",loading:l=!1,disabled:o=!1}=e;return(0,a.jsxs)("div",{className:(0,n.cn)("relative w-full rounded-[12px] border-[1px] border-solid border-[#D2E3FF] bg-[#F8FAFC] px-[10px] py-[10px] dark:border-darkBorder dark:bg-dark md:bg-white md:px-[32px] md:py-[32px]",o&&"pointer-events-none opacity-50",r),"data-sentry-component":"SettingsCard","data-sentry-source-file":"SettingsCard.tsx",children:[i&&(0,a.jsx)("div",{className:"absolute left-[12px] top-[-12px] w-fit rounded-[8px] bg-[#E9F2FF] px-[12px] py-[4px] text-[14px] font-[500] leading-[18px] text-primary dark:bg-gray-800 dark:text-gray-50",children:i}),l?(0,a.jsx)(s.default,{active:!0}):t]})}r(67294)},47232:function(e,t,r){"use strict";r.d(t,{Z:function(){return SettingsHeader}});var a=r(85893),n=r(42950);function SettingsHeader(e){let{icon:t,title:r,className:s="",description:i="",extra:l}=e;return(0,a.jsxs)("div",{className:"space-y-3","data-sentry-component":"SettingsHeader","data-sentry-source-file":"SettingsHeader.tsx",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("header",{className:(0,n.cn)("flex items-center text-lg text-primary md:text-xl md:font-medium",s),children:[t,(0,a.jsx)("span",{children:r})]}),l]}),i&&(0,a.jsx)("p",{className:"border-b pb-5 text-sm leading-[20px] text-gray-600 dark:border-darkBorder dark:text-gray-200",children:i})]})}},87163:function(e,t,r){"use strict";r.d(t,{Lg:function(){return o},vX:function(){return d},EM:function(){return c},KJ:function(){return u}});var a=r(85893),n=r(51113),s=r(52062);r(67294);var i=r(77676),l=r(43817);let o=["11b71188-2dd8-46e5-873f-b84e660ffc22","82a94ef8-b231-45b9-ab00-1512a5e43a15","a726a39e-bb37-417f-936a-342214873a03"],d=l.BB?"d3df4962-8b88-4aaf-9015-d385c2afe173":"a02b1b5c-8213-41de-8c3b-64e20645ab4e",c=[{label:"Your Settings",active:"/settings/profile",href:"/dashboard/settings/profile",icon:(0,a.jsx)(i.Z,{})},{label:"Business",active:"/settings/business",href:"/dashboard/settings/business",icon:(0,a.jsx)(n.Z,{}),activeIcon:(0,a.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M16.667 5.83398H3.33366C2.41318 5.83398 1.66699 6.58018 1.66699 7.50065V15.834C1.66699 16.7545 2.41318 17.5007 3.33366 17.5007H16.667C17.5875 17.5007 18.3337 16.7545 18.3337 15.834V7.50065C18.3337 6.58018 17.5875 5.83398 16.667 5.83398Z",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M13.3337 17.5V4.16667C13.3337 3.72464 13.1581 3.30072 12.8455 2.98816C12.5329 2.67559 12.109 2.5 11.667 2.5H8.33366C7.89163 2.5 7.46771 2.67559 7.15515 2.98816C6.84259 3.30072 6.66699 3.72464 6.66699 4.16667V17.5",stroke:"white",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),primaryIcon:(0,a.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"M16.6665 5.83301H3.33317C2.4127 5.83301 1.6665 6.5792 1.6665 7.49967V15.833C1.6665 16.7535 2.4127 17.4997 3.33317 17.4997H16.6665C17.587 17.4997 18.3332 16.7535 18.3332 15.833V7.49967C18.3332 6.5792 17.587 5.83301 16.6665 5.83301Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M13.3332 17.5V4.16667C13.3332 3.72464 13.1576 3.30072 12.845 2.98816C12.5325 2.67559 12.1085 2.5 11.6665 2.5H8.33317C7.89114 2.5 7.46722 2.67559 7.15466 2.98816C6.8421 3.30072 6.666
15 3.72464 6.6665 4.16667V17.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})},{label:"Channels",active:"/settings/channels",href:"/dashboard/settings/channels",icon:(0,a.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("g",{clipPath:"url(#clip0_696_10397)",children:(0,a.jsx)("path",{d:"M18.3337 10H16.667V4.16667H3.33366V15.3208L4.80283 14.1667H10.0003V15.8333H5.37949L1.66699 18.75V3.33333C1.66699 3.11232 1.75479 2.90036 1.91107 2.74408C2.06735 2.5878 2.27931 2.5 2.50033 2.5H17.5003C17.7213 2.5 17.9333 2.5878 18.0896 2.74408C18.2459 2.90036 18.3337 3.11232 18.3337 3.33333V10ZM11.7878 15.8925C11.6257 15.3085 11.6257 14.6915 11.7878 14.1075L10.9753 13.6383L11.8087 12.195L12.622 12.6642C13.0462 12.2317 13.5804 11.9231 14.167 11.7717V10.8333H15.8337V11.7717C16.4204 11.9229 16.9546 12.2315 17.3787 12.6642L18.192 12.195L19.0253 13.6383L18.2128 14.1075C18.3749 14.6915 18.3749 15.3085 18.2128 15.8925L19.0253 16.3617L18.192 17.805L17.3787 17.3358C16.9612 17.7608 16.4287 18.075 15.8337 18.2283V19.1667H14.167V18.2283C13.5804 18.0769 13.0462 17.7683 12.622 17.3358L11.8087 17.805L10.9753 16.3617L11.7878 15.8925ZM15.0003 16.6667C15.4424 16.6667 15.8663 16.4911 16.1788 16.1785C16.4914 15.8659 16.667 15.442 16.667 15C16.667 14.558 16.4914 14.134 16.1788 13.8215C15.8663 13.5089 15.4424 13.3333 15.0003 13.3333C14.5583 13.3333 14.1344 13.5089 13.8218 13.8215C13.5093 14.134 13.3337 14.558 13.3337 15C13.3337 15.442 13.5093 15.8659 13.8218 16.1785C14.1344 16.4911 14.5583 16.6667 15.0003 16.6667Z",fill:"#61758A"})}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"clip0_696_10397",children:(0,a.jsx)("rect",{width:"20",height:"20",fill:"white"})})})]}),primaryIcon:(0,a.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("g",{clipPath:"url(#clip0_1273_13148)",children:(0,a.jsx)("path",{d:"M18.3332 10H16.6665V4.16667H3.33317V15.3208L4.80234 14.1667H9.99984V15.8333H5.379L1.6665 18.75V3.33333C1.6665 3.11232 1.7543 2.90036 1.91058 2.74408C2.06686 2.5878 2.27882 2.5 2.49984 2.5H17.4998C17.7209 2.5 17.9328 2.5878 18.0891 2.74408C18.2454 2.90036 18.3332 3.11232 18.3332 3.33333V10ZM11.7873 15.8925C11.6252 15.3085 11.6252 14.6915 11.7873 14.1075L10.9748 13.6383L11.8082 12.195L12.6215 12.6642C13.0457 12.2317 13.5799 11.9231 14.1665 11.7717V10.8333H15.8332V11.7717C16.4199 11.9229 16.9541 12.2315 17.3782 12.6642L18.1915 12.195L19.0248 13.6383L18.2123 14.1075C18.3744 14.6915 18.3744 15.3085 18.2123 15.8925L19.0248 16.3617L18.1915 17.805L17.3782 17.3358C16.9607 17.7608 16.4282 18.075 15.8332 18.2283V19.1667H14.1665V18.2283C13.5799 18.0769 13.0457 17.7683 12.6215 17.3358L11.8082 17.805L10.9748 16.3617L11.7873 15.8925ZM14.9998 16.6667C15.4419 16.6667 15.8658 16.4911 16.1783 16.1785C16.4909 15.8659 16.6665 15.442 16.6665 15C16.6665 14.558 16.4909 14.134 16.1783 13.8215C15.8658 13.5089 15.4419 13.3333 14.9998 13.3333C14.5578 13.3333 14.1339 13.5089 13.8213 13.8215C13.5088 14.134 13.3332 14.558 13.3332 15C13.3332 15.442 13.5088 15.8659 13.8213 16.1785C14.1339 16.4911 14.5578 16.6667 14.9998 16.6667Z",fill:"currentColor"})}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"clip0_1273_13148",children:(0,a.jsx)("rect",{width:"20",height:"20",fill:"white"})})})]}),activeIcon:(0,a.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("g",{clipPath:"url(#clip0_696_10397)",children:(0,a.jsx)("path",{d:"M18.3337 10H16.667V4.16667H3.33366V15.3208L4.80283 14.1667H10.0003V15.8333H5.37949L1.66699 18.75V3.33333C1.66699 3.11232 1.75479 2.90036 1.91107 2.74408C2.06735 2.5878 2.27931 2.5 2.50033 2.5H17.5003C17.7213 2.5 17.9333 2.5878 18.0896 2.74408C18.2459 2.90036 18.3337 3.11232 18.3337 3.33333V10ZM11.7878 15.8925C11.6257 15.3085 11.6257 14.6915 11.7878 14.1075L10.9753 13.6383L11.8087 12.195L12.622 12.6642C13.0462 12.2317 13.5804 11.9231 14.167 11.7717V10.8333H15.8337V11.7717C16.4204 11.9229 16.9546 12.2315 17.3787 12.6642L18.192 12.195L19.0253 13.6383L18.2128 14.1075C18.3749 14.6915 18.3749 15.3085 18.2128 15.8925L19.0253 16.3617L18.192 17.805L17.3787 17.3358C16.9612 17.7608 16.4287 18.075 15.8337 18.2283V19.1667H14.167V18.2283C13.5804 18.0769 13.0462 17.7683 12.622 17.3358L11.8087 17.805L10.9753 16.3617L11.7878 15.8925ZM15.0003 16.6667C15.4424 16.6667 15.8663 16.4911 16.1788 16.1785C16.4914 15.8659 16.667 15.442 16.667 15C16.667 14.558 16.4914 14.134 16.1788 13.8215C15.8663 13.5089 15.4424 13.3333 15.0003 13.3333C14.5583 13.3333 14.1344 13.5089 13.8218 13.8215C13.5093 14.134 13.3337 14.558 13.3337 15C13.3337 15.442 13.5093 15.8659 13.8218 16.1785C14.1344 
116.4911 14.5583 16.6667 15.0003 16.6667Z",fill:"white"})}),(0,a.jsx)("defs",{children:(0,a.jsx)("clipPath",{id:"clip0_696_10397",children:(0,a.jsx)("rect",{width:"20",height:"20",fill:"white"})})})]})},{label:"Communications",active:"/settings/communications",href:"/dashboard/settings/communications",icon:(0,a.jsx)("i",{className:"ri-message-3-line text-[20px]"})},{label:"Custom Fields",active:"/dashboard/settings/custom-fields",href:"/dashboard/settings/custom-fields",icon:(0,a.jsx)("div",{className:"flex h-5 w-5 items-center justify-center",children:(0,a.jsx)("i",{className:"ri-input-cursor-move text-xl"})})},{label:"Time Savers",active:"/dashboard/settings/power-ups",href:"/dashboard/settings/power-ups",icon:(0,a.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M4.16631 10.8339C4.16631 6.59395 6.58518 2.9703 9.99966 1.51562C13.4141 2.9703 15.833 6.59395 15.833 10.8339C15.833 11.5197 15.7697 12.1893 15.6492 12.8362L17.2662 14.3634C17.4037 14.4933 17.4365 14.6997 17.3458 14.8658L15.2663 18.6784C15.1561 18.8804 14.903 18.9548 14.701 18.8447C14.6661 18.8256 14.634 18.8017 14.6059 18.7735L12.7437 16.9113C12.5874 16.7551 12.3755 16.6672 12.1545 16.6672H7.84482C7.62381 16.6672 7.41185 16.7551 7.25556 16.9113L5.39341 18.7735C5.23069 18.9362 4.96687 18.9362 4.80415 18.7735C4.77602 18.7453 4.75205 18.7133 4.73299 18.6784L2.65343 14.8658C2.56281 14.6997 2.59553 14.4933 2.73312 14.3634L4.35012 12.8362C4.22959 12.1893 4.16631 11.5197 4.16631 10.8339ZM5.39618 16.4137L6.07706 15.7328C6.5459 15.264 7.18178 15.0006 7.84482 15.0006H12.1545C12.8175 15.0006 13.4534 15.264 13.9222 15.7328L14.6031 16.4137L15.4213 14.9136L14.5048 14.0479C14.0931 13.6591 13.907 13.0877 14.0107 12.531C14.1138 11.9775 14.1663 11.4099 14.1663 10.8339C14.1663 7.60928 12.5037 4.75034 9.99966 3.36757C7.49551 4.75034 5.83298 7.60928 5.83298 10.8339C5.83298 11.4099 5.88546 11.9775 5.98859 12.531C6.09231 13.0877 5.90621 13.6591 5.49448 14.0479L4.57794 14.9136L5.39618 16.4137ZM9.99966 10.8339C9.07916 10.8339 8.33298 10.0877 8.33298 9.16723C8.33298 8.24678 9.07916 7.50058 9.99966 7.50058C10.9201 7.50058 11.6663 8.24678 11.6663 9.16723C11.6663 10.0877 10.9201 10.8339 9.99966 10.8339Z",fill:"currentColor"})})},{label:"Contact Form",active:"/widgets/contact",href:"/dashboard/settings/widgets/contact",icon:(0,a.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M16.6667 18.3346H3.33333C2.8731 18.3346 2.5 17.9616 2.5 17.5013V2.5013C2.5 2.04107 2.8731 1.66797 3.33333 1.66797H16.6667C17.1269 1.66797 17.5 2.04107 17.5 2.5013V17.5013C17.5 17.9616 17.1269 18.3346 16.6667 18.3346ZM15.8333 16.668V3.33464H4.16667V16.668H15.8333ZM6.66667 5.83464H13.3333V7.5013H6.66667V5.83464ZM6.66667 9.16797H13.3333V10.8346H6.66667V9.16797ZM6.66667 12.5013H13.3333V14.168H6.66667V12.5013Z",fill:"#61758A"})}),primaryIcon:(0,a.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M16.6667 18.3346H3.33333C2.8731 18.3346 2.5 17.9616 2.5 17.5013V2.5013C2.5 2.04107 2.8731 1.66797 3.33333 1.66797H16.6667C17.1269 1.66797 17.5 2.04107 17.5 2.5013V17.5013C17.5 17.9616 17.1269 18.3346 16.6667 18.3346ZM15.8333 16.668V3.33464H4.16667V16.668H15.8333ZM6.66667 5.83464H13.3333V7.5013H6.66667V5.83464ZM6.66667 9.16797H13.3333V10.8346H6.66667V9.16797ZM6.66667 12.5013H13.3333V14.168H6.66667V12.5013Z",fill:"currentColor"})}),activeIcon:(0,a.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M16.6667 18.3346H3.33333C2.8731 18.3346 2.5 17.9616 2.5 17.5013V2.5013C2.5 2.04107 2.8731 1.66797 3.33333 1.66797H16.6667C17.1269 1.66797 17.5 2.04107 17.5 2.5013V17.5013C17.5 17.9616 17.1269 18.3346 16.6667 18.3346ZM15.8333 16.668V3.33464H4.16667V16.668H15.8333ZM6.66667 5.83464H13.3333V7.5013H6.66667V5.83464ZM6.66667 9.16797H13.3333V10.8346H6.66667V9.16797ZM6.66667 12.5013H13.3333V14.168H6.66667V12.5013Z",fill:"white"})})},{label:"Chat Widget",active:"/widgets/chat",href:"/dashboard/settings/widgets/chat",icon:(0,a.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M1.66699 10.0013C1.66699 5.39893 5.39795 1.66797 10.0003 1.66797C14.6027 1.66797 18.3337 5.39893 18.3337 10.0013C18.3337 14.6036 14.6027 18.3346 10.0003 18.3346H1.66699L4.10777 15.8939C2.59973 14.3858 1.66699 12.3025 1.66699 10.0013ZM5.69068 16.668H10.0003C13.6822 16.668 16.667 13.6832 16.667 10.0013C16.667 6.3194 13.6822 3.33464 10.0003 3.33464C6.31843 3.33464 3.33366 6.3194 3.33366 10.0013C3.33366 11.795 4.04303 13.4721 5.28628 14.7154L6.46479 15.8939L5.69068 16.668ZM6.66699 10.8346H13.3337C13.3337 12.6756 11.8412 14.168 10.0003 14.168C8.15938 14.168 6.66699 12.6756 6.66699 10.8346Z",fill:"currentColor"})})},{label:"Archived & Spam",active:"/dashboard/settings/archived-s
1pam",href:"/dashboard/settings/archived-spam",icon:(0,a.jsx)("i",{className:"ri-archive-line text-xl"})},{label:"Imports",active:"/settings/imports",href:"/dashboard/settings/imports",icon:(0,a.jsx)(s.Z,{className:"h-[20px] w-[20px]"})},{label:"Payments",active:"/settings/payments",href:"/dashboard/settings/payments",icon:(0,a.jsx)(function(e){let{className:t=""}=e;return(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",className:t,"data-sentry-element":"svg","data-sentry-component":"MoneyOutlined","data-sentry-source-file":"MoneyOutlined.tsx",children:(0,a.jsx)("path",{d:"M12.0049 22.0029C6.48204 22.0029 2.00488 17.5258 2.00488 12.0029C2.00488 6.48008 6.48204 2.00293 12.0049 2.00293C17.5277 2.00293 22.0049 6.48008 22.0049 12.0029C22.0049 17.5258 17.5277 22.0029 12.0049 22.0029ZM12.0049 20.0029C16.4232 20.0029 20.0049 16.4212 20.0049 12.0029C20.0049 7.58465 16.4232 4.00293 12.0049 4.00293C7.5866 4.00293 4.00488 7.58465 4.00488 12.0029C4.00488 16.4212 7.5866 20.0029 12.0049 20.0029ZM8.50488 14.0029H14.0049C14.281 14.0029 14.5049 13.7791 14.5049 13.5029C14.5049 13.2268 14.281 13.0029 14.0049 13.0029H10.0049C8.62417 13.0029 7.50488 11.8836 7.50488 10.5029C7.50488 9.12222 8.62417 8.00293 10.0049 8.00293H11.0049V6.00293H13.0049V8.00293H15.5049V10.0029H10.0049C9.72874 10.0029 9.50488 10.2268 9.50488 10.5029C9.50488 10.7791 9.72874 11.0029 10.0049 11.0029H14.0049C15.3856 11.0029 16.5049 12.1222 16.5049 13.5029C16.5049 14.8836 15.3856 16.0029 14.0049 16.0029H13.0049V18.0029H11.0049V16.0029H8.50488V14.0029Z","data-sentry-element":"path","data-sentry-source-file":"MoneyOutlined.tsx"})})},{className:"h-[20px] w-[20px]"})},{label:"Campaigns",active:"/settings/campaigns",href:"/dashboard/settings/campaigns",icon:(0,a.jsx)("i",{className:"ri-megaphone-line text-[20px]"})},{label:"CSV Processor",active:"/settings/csv-processor",href:"/dashboard/settings/csv-processor",icon:(0,a.jsx)("i",{className:"ri-file-text-line text-[20px]"})},{label:"Policies",active:"/policies",href:"/dashboard/settings/policies",icon:(0,a.jsx)("i",{className:"ri-auction-line text-[20px]"})},{label:"Admin Tools",active:"/settings/troubleshoot",href:"/dashboard/settings/troubleshoot",icon:(0,a.jsx)("i",{className:"ri-shield-keyhole-line text-[20px]"}),validation:["super_admin"]}],u=[{label:"Check Box",value:"checkbox"},{label:"Date",value:"date"},{label:"Date & Time",value:"date_time"},{label:"Drop Down",value:"select"},{label:"Number Field",value:"number"},{label:"Radio",value:"radio"},{label:"Text Field",value:"string"}]},56363:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return CoaxUpdatesAdminPage}});var a=r(85893),n=r(12332),s=r.n(n),i=r(7968),l=r(47232),o=r(18328),d=r(51568),c=r(87163),u=r(57090),h=r(81188),g=r(54053),p=r(51113),x=r(22756);let fetchCoaxUpdateBusinesses=async e=>{let{q:t=""}=e,{data:r}=await x.tc.get("/message/updates/businesses",{params:{q:t,page_size:5e3}});return r.body.data},previewCoaxUpdateAudience=async e=>{let{businessIds:t,allBusinesses:r=!1}=e,{data:a}=await x.tc.post("/message/updates/preview-audience",{business_ids:t,all_businesses:r});return a.body},publishCoaxUpdate=async e=>{let{businessIds:t,allBusinesses:r=!1,body:a,html:n,files:s}=e,i=new FormData;i.append("body",a),n&&i.append("html",n),i.append("business_ids",JSON.stringify(t)),i.append("all_businesses",r?"true":"false"),s.forEach(e=>i.append("files",e));let{data:l}=await x.tc.post("/message/updates/publish",i);return l.body},fetchCoaxUpdatePublishes=async e=>{let{page:t=1,pageSize:r=25}=e,{data:a}=await x.tc.get("/message/updates/publishes",{params:{page:t,page_size:r}});return a.body};var m=r(63893),f=r(85945),v=r(36492),b=r(48228),w=r(90918),C=r(65400),y=r.n(C),H=r(36671),V=r(74806),j=r(10149),k=r(59361),L=r(28465),M=r(16318),Z=r(27484),N=r.n(Z),_=r(67294);let B=["coax-update-publishes"],S="coax_updates.publish_progress";function htmlToText(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!e.trim())return"";let t=new DOMParser().parseFromString(e,"text/html");return t.body.querySelectorAll("address, article, aside, blockquote, br, caption, dd, div, dl, dt, fieldset, figcaption, figure, footer, h1, h2, h3, h4, h5, h6, header, hr, li, main, nav, ol, p, pre, section, table, td, th, tr, ul").forEach(e
1=>{e.before(" "),e.after(" ")}),(t.body.textContent||"").replace(/\s+/g," ").trim()}function formatFileSize(e){if(!e)return"0 B";let t=["B","KB","MB","GB"],r=Math.min(Math.floor(Math.log(e)/Math.log(1024)),t.length-1),a=e/Math.pow(1024,r);return"".concat(a.toFixed(a>=10||0===r?0:1)," ").concat(t[r])}function getPublishTitle(e){var t,r;let a=htmlToText(e.html||e.body);return(null===(t=a.split(/\n|\. /)[0])||void 0===t?void 0:t.trim().slice(0,120))||((null===(r=e.attachments)||void 0===r?void 0:r.length)?"Attachment update":"Untitled update")}function SelectedFiles(e){let{files:t,onRemove:r,disabled:n}=e;return t.length?(0,a.jsx)("div",{className:"flex flex-wrap gap-2","data-sentry-component":"SelectedFiles","data-sentry-source-file":"coax-updates.tsx",children:t.map((e,t)=>(0,a.jsxs)("span",{className:"inline-flex max-w-full items-center gap-2 rounded-[8px] border border-gray-200 bg-gray-50 px-3 py-1.5 text-xs text-gray-700 dark:border-darkBorder dark:bg-gray-800 dark:text-gray-200",children:[(0,a.jsx)("i",{className:"ri-attachment-2 text-primary"}),(0,a.jsx)("span",{className:"max-w-[240px] truncate",children:e.name}),(0,a.jsx)("span",{className:"text-gray-400",children:formatFileSize(e.size)}),(0,a.jsx)("button",{type:"button",className:"text-gray-500 hover:text-danger disabled:cursor-not-allowed disabled:opacity-50",disabled:n,onClick:()=>r(t),"aria-label":"Remove ".concat(e.name),children:(0,a.jsx)("i",{className:"ri-close-line"})})]},"".concat(e.name,"-").concat(t)))}):null}function AudiencePreview(e){let{html:t,files:r,recipientCount:n,businessCount:s}=e,i=htmlToText(t),l=!!(i||r.length);return(0,a.jsxs)("div",{className:"space-y-4","data-sentry-component":"AudiencePreview","data-sentry-source-file":"coax-updates.tsx",children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,a.jsxs)("div",{className:"rounded-[10px] border border-gray-200 bg-gray-50 p-3 dark:border-darkBorder dark:bg-gray-800",children:[(0,a.jsx)("p",{className:"text-xs font-medium uppercase tracking-wide text-gray-500 dark:text-gray-400",children:"Recipients"}),(0,a.jsx)("p",{className:"mt-1 text-xl font-semibold text-gray-900 dark:text-gray-50",children:null!=n?n:"--"})]}),(0,a.jsxs)("div",{className:"rounded-[10px] border border-gray-200 bg-gray-50 p-3 dark:border-darkBorder dark:bg-gray-800",children:[(0,a.jsx)("p",{className:"text-xs font-medium uppercase tracking-wide text-gray-500 dark:text-gray-400",children:"Businesses"}),(0,a.jsx)("p",{className:"mt-1 text-xl font-semibold text-gray-900 dark:text-gray-50",children:null!=s?s:"--"})]})]}),(0,a.jsxs)("div",{className:"rounded-[12px] border border-gray-200 bg-white p-4 dark:border-darkBorder dark:bg-gray-900",children:[(0,a.jsxs)("div",{className:"mb-3 flex items-center gap-2",children:[(0,a.jsx)("div",{className:"flex h-8 w-8 items-center justify-center rounded-[8px] bg-primary-100 text-primary",children:(0,a.jsx)("i",{className:"ri-megaphone-line"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-gray-900 dark:text-gray-50",children:"Coax Updates"}),(0,a.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Inbox preview"})]})]}),l?(0,a.jsxs)("div",{className:"rounded-[10px] bg-primary-50 p-3 text-sm leading-6 text-gray-800 dark:bg-gray-800 dark:text-gray-100",children:[i&&(0,a.jsx)("div",{className:"coax-updates-html-message",dangerouslySetInnerHTML:{__html:(0,u.Z)(t)}}),r.length>0&&(0,a.jsx)("div",{className:"mt-3 space-y-2",children:r.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-[8px] bg-white px-3 py-2 text-xs text-gray-600 dark:bg-gray-900 dark:text-gray-300",children:[(0,a.jsxs)("span",{className:"min-w-0 truncate",children:[(0,a.jsx)("i",{className:"ri-attachment-2 mr-2 text-primary"}),e.name]}),(0,a.jsx)("span",{className:"shrink-0 text-gray-400",children:formatFileSize(e.size)})]},"".concat(e.name,"-").concat(t)))})]}):(0,a.jsx)(H.default,{image:H.default.PRESENTED_IMAGE_SIMPLE,description:"No preview",className:"py-6"})]})]})}function BusinessAudienceSelector(e){let{businesses:t,loading:r,disabled:n,selectedIds:s,allBusinesses:i,onAllBusinessesChange:l,onCh
1ange:o}=e,[d,c]=(0,_.useState)(!1),[u,h]=(0,_.useState)(""),g=(0,_.useRef)(null);(0,_.useEffect)(()=>{let handleMouseDown=e=>{var t;(null===(t=g.current)||void 0===t?void 0:t.contains(e.target))||c(!1)};return document.addEventListener("mousedown",handleMouseDown),()=>document.removeEventListener("mousedown",handleMouseDown)},[]);let x=(0,_.useMemo)(()=>s.map(e=>t.find(t=>t.id===e)).filter(Boolean),[t,s]),m=(0,_.useMemo)(()=>{let e=u.trim().toLowerCase();return t.filter(t=>!e||t.name.toLowerCase().includes(e)||t.id.toLowerCase().includes(e)).sort((e,t)=>e.name.localeCompare(t.name))},[t,u]),toggleBusiness=e=>{if(i){l(!1),o([e.id]);return}if(s.includes(e.id)){o(s.filter(t=>t!==e.id));return}o([...s,e.id])};return(0,a.jsxs)("div",{ref:g,className:"relative","data-sentry-component":"BusinessAudienceSelector","data-sentry-source-file":"coax-updates.tsx",children:[(0,a.jsxs)("button",{type:"button",disabled:n,className:"flex min-h-[46px] w-full items-center justify-between gap-3 rounded-[10px] border border-gray-200 bg-white px-3 py-2 text-left text-sm shadow-sm transition-colors hover:border-primary/40 focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/10 disabled:cursor-not-allowed disabled:opacity-60 dark:border-darkBorder dark:bg-gray-900",onClick:()=>c(e=>!e),children:[(0,a.jsx)("span",{className:"flex min-w-0 flex-1 flex-wrap gap-1.5",children:i?(0,a.jsxs)("span",{className:"flex max-w-[220px] items-center gap-1 rounded-md bg-primary-50 px-2 py-1 text-xs font-medium text-primary dark:bg-gray-800",children:[(0,a.jsx)(p.Z,{className:"h-3 w-3 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:"All businesses"})]}):x.length?(0,a.jsxs)(a.Fragment,{children:[x.slice(0,3).map(e=>(0,a.jsxs)("span",{className:"flex max-w-[180px] items-center gap-1 rounded-md bg-primary-50 px-2 py-1 text-xs font-medium text-primary dark:bg-gray-800",children:[(0,a.jsx)(p.Z,{className:"h-3 w-3 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:e.name})]},e.id)),x.length>3&&(0,a.jsxs)("span",{className:"rounded-md bg-gray-100 px-2 py-1 text-xs font-medium text-gray-500 dark:bg-gray-800 dark:text-gray-300",children:["+",x.length-3]})]}):(0,a.jsx)("span",{className:"text-gray-500",children:"Select businesses"})}),(0,a.jsx)("i",{className:"ri-search-2-line shrink-0 text-gray-400"})]}),d&&!n&&(0,a.jsxs)("div",{className:"absolute left-0 right-0 top-full z-50 mt-2 overflow-hidden rounded-[10px] border border-gray-200 bg-white shadow-xl dark:border-darkBorder dark:bg-gray-900",children:[(0,a.jsx)("div",{className:"border-b border-gray-100 p-2 dark:border-darkBorder",children:(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-[8px] bg-gray-50 px-3 py-2 text-sm dark:bg-gray-900",children:[(0,a.jsx)("i",{className:"ri-search-2-line text-gray-400"}),(0,a.jsx)("input",{autoFocus:!0,className:"min-w-0 flex-1 bg-transparent text-gray-800 outline-none placeholder:text-gray-400 dark:text-gray-100",value:u,placeholder:"Search businesses",onChange:e=>h(e.target.value)})]})}),(i||x.length>0)&&(0,a.jsxs)("div",{className:"border-b border-gray-100 px-3 py-2 dark:border-darkBorder",children:[(0,a.jsxs)("div",{className:"mb-2 flex items-center justify-between gap-3",children:[(0,a.jsxs)("span",{className:"text-xs font-medium text-gray-500",children:["Selected"," ",i?"(all businesses)":"(".concat(x.length,")")]}),(0,a.jsx)("button",{type:"button",className:"text-xs font-medium text-primary hover:underline",onClick:()=>{l(!1),o([])},children:"Clear"})]}),i?(0,a.jsxs)("span",{className:"inline-flex max-w-full items-center gap-1 rounded-md border border-primary/20 bg-primary-50 px-2 py-1 text-xs font-medium text-primary",children:[(0,a.jsx)(p.Z,{className:"h-3 w-3 shrink-0"}),(0,a.jsx)("span",{className:"truncate",children:"Every business"})]}):(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:x.map(e=>(0,a.jsx)(k.Z,{closable:!0,className:"m-0 max-w-[190px] rounded-md border-primary/20 bg-primary-50 text-primary",onClose:t=>{t.preventDefault(),o(s.filter(t=>t!==e.id))},children:(0,a.jsx)("span",{className:"inline-block max-w-[150px] truncate align-bottom",children:e.name})},e.id))})]}),(0,a.jsx)("div",{className:"max-h-72 overflow-y-auto p-2",children:r?(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(j.default.Button,{active:!0,block:!0,className:"!h-10"}),(0,a.jsx)(j.default.Button,{active:!0,block:!0,className:"!h-10"}),(0,a.jsx)(j.default.Button,{active:!0,block:!0,className:"!h-10"})]}):m.length?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("button",{type:"button",className:"mb-1 flex w-full items-center gap-3 rounded-[8px] px-3 py-2 text-left text-sm transition-colors ".concat(i?"bg-primary-50 text-primary dark:bg-gray-800":"text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-900"),onClick:()=>{l(!0),o([])},children:[(0,a.jsx)("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center ".concat(i?"text-primary":"text-gray-500 dark:text-gray-300"),children:(0,a.jsx)(p.Z,{className:"h-4 w-4"})}),(0,a.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,a.jsx)("span",{className:"block truncate font-medium",children:"All businesses"}),(0,a.jsx)("span",{className:"text-xs text-gray-400",children:"Includes every business"})]}),(0,a.jsx)("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center rounded-full border ".concat(i?"border-primary bg-primary text-white":"border-gray-300 text-transparent"),children:(0,a.jsx)("i",{className:"ri-check-line text-xs"})})]}),m.map(e=>{let t=i||s.includes(e.id);return(0,a.jsxs)("button",{type:"button",className:"flex w-full items-center gap-3 rounded-[8px] px-3 py-2 text-left text-sm transition-colors ".concat(t?"bg-primary-50 text-primary dark:bg-gray-800":"text-gray-700 hover:bg-gray-100 dark:text-gray-200 dark:hover:bg-gray-900"),onClick:()=>toggleBusiness(e),children:[(0,a.jsx)("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center ".concat(t?"text-primary":"text-gray-500 dark:text-gray-300"),children:(0,a.jsx)(p.Z,{className:"h-4 w-4"})}),(0,a.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,a.jsx)("span",{className:"block truncate font-medium",children:e.name}),e.blocked&&(0,a.jsx)("span",{className:"text-xs text-gray-400",children:"Blocked"})]}),(0,a.jsx)("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center rounded-full border ".concat(t?"border-primary bg-primary text-white":"border-gray-300 text-transparent"),children:(0,a.jsx)("i",{className:"ri-check-line text-xs"})})]},e.id)})]}):(0,a.jsx)(H.default,{image:H.default.PRESENTED_IMAGE_SIMPLE,description:"No businesses found",className:"py-4"})})]})]})}function PublisherPanel(){var e,t,r,n;let[l,o]=(0,_.useState)(!0),[u,g]=(0,_.useState)([]),[p,x]=(0,_.useState)(""),[m,C]=(0,_.useState)([]),H=(0,f.NL)(),V=(0,_.useMemo)(()=>htmlToText(p),[p]),j=(0,_.useMemo)(()=>({...h.vc,min_height:280,max_height:420,placeholder:"Write an update",content_style:"\n        ".concat(h.vc.content_style||"","\n        body {\n          box-sizing: border-box;\n          padding: 0 !important;\n        }\n      "),toolbar:"blocks | bold italic underline strikethrough | bullist numlist link More"}),[]),{data:k=[],isLoading:Z}=(0,v.a)({queryKey:["coax-update-businesses"],queryFn:()=>fetchCoaxUpdateBusinesses({})}),N=(0,_.useMemo)(()=>k.filter(e=>e.id!==c.vX),[k]),S=(0,b.D)({mutationFn:previewCoaxUpdateAudience}),updateBusinessIds=e=>{S.reset(),g(e.filter(e=>e!==c.vX))},updateAllBusinesses=e=>{S.reset(),o(e),e&&updateBusinessIds([])},A=(0,b.D)({mutationFn:publishCoaxUpdate,onSuccess:()=>{M.ZP.success({message:"Publishing started."}),H.invalidateQueries(B),x(""),C([]),updateAllBusinesses(!0),S.reset()},onError:()=>{M.ZP.error({message:"Could not publish the update."})}}),P=(l||u.length>0)&&!!(V.trim()||m.length);return(0,a.jsxs)(i.Z,{className:"!p-0","data-sentry-element":"SettingsCard","data-sentry-component":"PublisherPanel","data-sentry-source-file":"coax-updates.tsx",children:[(0,a.jsxs)("div",{className:"jsx-fcdc743c8ce5e2d9 grid gap-0 lg:grid-cols-[minmax(0,1fr)_360px]",children:[(0,a.jsxs)("section",{className:"jsx-fcdc743c8ce5e2d9 space-y-5 p-5 md:p-6",children:[(0,a.jsxs)("div",{className:"jsx-fcdc743c8ce5e2d9 flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"jsx-fcdc743c8ce5e2d9 text-sm font-medium text-gray-700 dark:text-gray-200",children:"Audience"}),(0,a.jsx)(BusinessAudienceSelector,{loading:Z,disabled:A.isLoading,businesses:N,selectedIds:u,allBusinesses:l,onAllBusinessesChange:updateAllBusinesses,onChange:updateBusinessIds,"data-sentry-element":"BusinessAudienceSelector","data-sentry-source-file":"coax-updates.tsx"})]}),(0,a.jsxs)("div",{className:"jsx-fcdc743c8ce5e2d9 flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"jsx-fcdc743c8ce5e2d9 flex items-center justify-between gap-3",children:[(0,a.jsx)("label",{className:"jsx-fcdc743c8ce5e2d9 text-sm font-medium text-gray-700 dark:text-gray-200",children:"Update"}),(0,a.jsxs)("span",{className:"jsx-fcdc743c8ce5e2d9 text-xs text-gray-500 dark:text-gray-400",children:[V.length," characters"]})]}),(0,a.jsx)("div",{className:"jsx-fcdc743c8ce5e2d9 coax-updates-rich-editor overflow-hidden rounded-[10px] border border-gray-200 bg-white dark:border-darkBorder dark:bg-gray-900",children:(0,a.jsx)(w.M,{value:p,disabled:A.isLoading,init:j,onEditorChange:x,tinymceScriptSrc:d.f8,"data-sentry-element":"Editor","data-sentry-source-file":"coax-updates.tsx"})})]}),(0,a.jsx)(SelectedFiles,{files:m,disabled:A.isLoading,onRemove:e=>C(t=>t.filter((t,r)=>r!==e)),"data-sentry-element":"SelectedFiles","data-sentry-source-file":"coax-updates.tsx"}),(0,a.jsxs)("div",{className:"jsx-fcdc743c8ce5e2d9 flex flex-wrap items-center justify-between gap-3 border-t border-gray-200 pt-5 dark:border-darkBorder",children:[(0,a.jsxs)("div",{className:"jsx-fcdc743c8ce5e2d9 flex flex-wrap gap-2",children:[(0,a.jsx)(L.default,{multiple:!0,showUploadList:!1,disabled:A.isLoading,beforeUpload:e=>(C(t=>[...t,e]),L.default.LIST_IGNORE),"data-sentry-element":"Upload","data-sentry-source-file":"coax-updates.tsx",children:(0,a.jsx)(y(),{size:"large",icon:(0,a.jsx)("i",{className:"jsx-fcdc743c8ce5e2d9 ri-attachment-2"}),disabled:A.isLoading,"data-sentry-element":"Button","data-sentry-source-file":"coax-updates.tsx",children:"Attach"})}),(0,a.jsx)(y(),{size:"large",disabled:A.isLoading||!l&&!u.length,loading:S.isLoading,icon:(0,a.jsx)("i",{className:"jsx-fcdc743c8ce5e2d9 ri-eye-line"}),onClick:()=>S.mutate({businessIds:u,allBusinesses:l}),"data-sentry-element":"Button","data-sentry-source-file":"coax-updates.tsx",children:"Preview"})]}),(0,a.jsx)(y(),{type:"primary",size:"large",disabled:!P||A.isLoading,loading:A.isLoading,icon:(0,a.jsx)("i",{className:"jsx-fcdc743c8ce5e2d9 ri-send-plane-2-line"}),onClick:()=>{A.mutate({businessIds:u,allBusinesses:l,body:V,html:htmlToText(p)?p.trim():"",files:m})},"data-sentry-element":"Button","data-sentry-source-file":"coax-updates.tsx",children:"Publish"})]})]}),(0,a.jsxs)("aside",{className:"jsx-fcdc743c8ce5e2d9 border-t border-gray-200 bg-gray-50 p-5 dark:border-darkBorder dark:bg-gray-900 md:p-6 lg:border-l lg:border-t-0",children:[(0,a.jsx)(AudiencePreview,{html:p,files:m,recipientCount:null===(e=S.data)||void 0===e?void 0:e.recipient_count,businessCount:null===(t=S.data)||void 0===t?void 0:t.business_count,"data-sentry-element":"AudiencePreview","data-sentry-source-file":"coax-updates.tsx"}),(null===(n=S.data)||void 0===n?void 0:null===(r=n.businesses)||void 0===r?void 0:r.length)?(0,a.jsx)("div",{className:"jsx-fcdc743c8ce5e2d9 mt-4 max-h-48 space-y-2 overflow-auto pr-1",children:S.data.businesses.map(e=>(0,a.jsxs)("div",{className:"jsx-fcdc743c8ce5e2d9 flex items-center justify-between gap-3 rounded-[8px] bg-white px-3 py-2 text-sm dark:bg-gray-900",children:[(0,a.jsx)("span",{className:"jsx-fcdc743c8ce5e2d9 min-w-0 truncate text-gray-700 dark:text-gray-200",children:e.business_name}),(0,a.jsx)("span",{className:"jsx-fcdc743c8ce5e2d9 shrink-0 text-gray-500 dark:text-gray-400",children:e.recipient_count})]},e.business_id))}):null]})]}),(0,a.jsx)(s(),{id:"fcdc743c8ce5e2d9",children:".coax-updates-rich-editor .tox.tox-tinymce{border:0!important}.coax-updates-rich-editor .tox-editor-header{padding:8px 12px 0!important}.coax-updates-rich-editor .tox-toolbar__primary{margin-left:0!important;padding-left:0!important;background-image:none!important}.coax-updates-rich-editor .tox-toolbar__group:first-child{padding-left:0!important}.coax-updates-rich-editor .tox-edit-area{padding:8px 14px 14px!important}"})]})}function PublishStatusTag(e){let{status:t}=e;return(0,a.jsx)(k.Z,{color:{processing:"blue",completed:"green",failed:"red"}[t],className:"m-0 capitalize","data-sentry-element":"Tag","data-sentry-component":"PublishStatusTag","data-sentry-source-file":"coax-updates.tsx",children:t})}function PublishReactionChips(e){let{reactions:t}=e;return(null==t?void 0:t.length)?(0,a.jsx)("div",{className:"mt-2 flex flex-wrap gap-1","data-sentry-component":"PublishReactionChips","data-sentry-source-file":"coax-updates.tsx",children:t.map(e=>(0,a.jsxs)("span",{className:"inline-flex h-6 items-center gap-1 rounded-full border border-gray-200 bg-gray-50 px-2 text-xs text-gray-600 dark:border-darkBorder dark:bg-gray-800 dark:text-gray-200",children:[(0,a.jsx)("span",{children:e.emoji}),(0,a.jsx)("span",{children:e.count})]},e.emoji))}):null}function ChangelogPublishEntry(e){var t;let{publish:r}=e,n=function(e){let t=e.total_recipients||0,r=(e.processed_recipients||0)+(e.failed_recipients||0);return t>0?Math.min(Math.round(r/t*100),100):0}(r),s=function(e){let t=getPublishTitle(e),r=htmlToText(e.html||e.body);return r.replace(t,"").trim()}(r),i=!!(r.html&&htmlToText(r.html)),l=N()(r.created_at),d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(e=>({id:e.id,url:e.url,name:e.name,size:e.size,type:function(e){if(e.mime_type)return e.mime_type;let t="".concat(e.name||e.url).toLowerCase();return/\.(png|jpg|jpeg|gif|webp|avif|heic)$/.test(t)?"image":/\.(mp4|mov|webm|m4v)$/.test(t)?"video":/\.(mp3|wav|m4a|ogg|webm)$/.test(t)?"audio":t.endsWith(".pdf")?"application/pdf":t.endsWith(".csv")?"text/csv":/\.(zip|rar|7z)$/.test(t)?"application/zip":"application/octet-stream"}(e),created_at:e.created_at}))}(r.attachments);return(0,a.jsxs)("article",{className:"grid gap-4 py-5 md:grid-cols-[96px_minmax(0,1fr)_240px] md:py-6","data-sentry-component":"ChangelogPublishEntry","data-sentry-source-file":"coax-updates.tsx",children:[(0,a.jsxs)("div",{className:"relative flex items-start gap-3 md:block",children:[(0,a.jsx)("div",{className:"absolute bottom-[-24px] left-[21px] top-[52px] hidden w-px bg-primary/30 dark:bg-primary/40 md:block"}),(0,a.jsx)("div",{className:"relative z-[1] flex h-11 w-11 shrink-0 items-center justify-center rounded-[8px] border border-gray-200 bg-white text-primary dark:border-darkBorder dark:bg-gray-900",children:(0,a.jsx)("i",{className:"ri-git-commit-line text-lg"})}),(0,a.jsxs)("div",{className:"relative z-[1] bg-white pr-2 dark:bg-gray-900 md:mt-3 md:pr-0",children:[(0,a.jsx)("p",{className:"text-xs font-semibold uppercase tracking-wide text-gray-500 dark:text-gray-400",children:l.format("MMM D")}),(0,a.jsx)("p",{className:"mt-0.5 text-xs text-gray-400",children:l.format("YYYY")})]})]}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("h3",{className:"line-clamp-2 text-[15px] font-semibold leading-6 text-gray-900 dark:text-gray-50",children:getPublishTitle(r)}),(null===(t=r.attachments)||void 0===t?void 0:t.length)?(0,a.jsxs)(k.Z,{className:"m-0 rounded-full",color:"blue",children:[(0,a.jsx)("i",{className:"ri-attachment-2 mr-1"}),r.attachments.length]}):null]}),(0,a.jsxs)("p",{className:"mt-1 text-xs text-gray-500 dark:text-gray-400",children:[r.created_by_user_name||"Coax Admin"," created at"," ",l.format("h:mm A")]}),i?(0,a.jsx)("div",{className:"coax-updates-html-message mt-3 overflow-hidden text-sm leading-6 text-gray-700 dark:text-gray-300",dangerouslySetInnerHTML:{__html:(0,u.Z)(r.html||"")}}):s?(0,a.jsx)("p",{className:"mt-3 line-clamp-3 text-sm leading-6 text-gray-700 dark:text-gray-300",children:s}):null,d.length>0&&(0,a.jsx)(o.Z,{type:"reply",attachments:d,className:"mt-4 items-start"}),(0,a.jsx)(PublishReactionChips,{reac
1tions:r.reactions,"data-sentry-element":"PublishReactionChips","data-sentry-source-file":"coax-updates.tsx"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 rounded-[8px] bg-gray-50 p-3 dark:bg-gray-800/80 md:items-stretch",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,a.jsx)(PublishStatusTag,{status:r.status,"data-sentry-element":"PublishStatusTag","data-sentry-source-file":"coax-updates.tsx"}),(0,a.jsx)("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-200",children:r.published_at?N()(r.published_at).format("h:mm A"):"processing"===r.status?"In progress":"Not completed"})]}),(0,a.jsx)(V.default,{percent:n,size:"small",status:"failed"===r.status?"exception":void 0,"data-sentry-element":"Progress","data-sentry-source-file":"coax-updates.tsx"}),(0,a.jsxs)("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:[r.processed_recipients," / ",r.total_recipients," recipients",r.failed_recipients>0?" - ".concat(r.failed_recipients," failed"):""]})]})]})}function PublishedUpdatesList(e){let{publishes:t,isLoading:r,onRefresh:n,isRefreshing:s}=e;return r?(0,a.jsx)(i.Z,{className:"space-y-4",children:(0,a.jsx)(j.default,{active:!0,paragraph:{rows:5}})}):(0,a.jsxs)(i.Z,{className:"space-y-5","data-sentry-element":"SettingsCard","data-sentry-component":"PublishedUpdatesList","data-sentry-source-file":"coax-updates.tsx",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-base font-semibold text-gray-900 dark:text-gray-50",children:"Published Updates"}),(0,a.jsxs)("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:[t.length," recent updates"]})]}),(0,a.jsx)(y(),{size:"large",icon:(0,a.jsx)("i",{className:"ri-refresh-line"}),loading:s,onClick:n,"data-sentry-element":"Button","data-sentry-source-file":"coax-updates.tsx",children:"Refresh"})]}),t.length?(0,a.jsx)("div",{className:"relative",children:t.map(e=>(0,a.jsx)(ChangelogPublishEntry,{publish:e},e.id))}):(0,a.jsx)(H.default,{image:H.default.PRESENTED_IMAGE_SIMPLE,description:"No published updates yet",className:"py-10"})]})}function CoaxUpdatesAdminPage(){var e;let{business:t,isSuperAdmin:r}=(0,g.Z)(),n=(0,m.sV)(),s=(0,f.NL)(),i=r&&(null==t?void 0:t.id)===c.vX,o=(0,v.a)({queryKey:B,queryFn:()=>fetchCoaxUpdatePublishes({pageSize:25}),enabled:i,refetchInterval:e=>null!=e&&!!e.data.some(e=>"processing"===e.status)&&3e3});return((0,_.useEffect)(()=>{if(!n)return;let handleProgress=e=>{s.setQueryData(B,t=>t?{...t,data:t.data.map(t=>t.id===e.publish_id?{...t,status:e.status,total_recipients:e.total_recipients,processed_recipients:e.processed_recipients,failed_recipients:e.failed_recipients,error:e.error}:t)}:t),("completed"===e.status||"failed"===e.status)&&s.invalidateQueries(B)};return n.on(S,handleProgress),()=>{n.off(S,handleProgress)}},[s,n]),i)?(0,a.jsx)("main",{className:"min-h-full bg-primary-50 px-4 py-6 dark:bg-dark md:px-8","data-sentry-component":"CoaxUpdatesAdminPage","data-sentry-source-file":"coax-updates.tsx",children:(0,a.jsxs)("div",{className:"mx-auto flex max-w-7xl flex-col gap-7 pb-16",children:[(0,a.jsx)(l.Z,{title:"Coax Updates",icon:(0,a.jsx)("i",{className:"ri-broadcast-line pr-2 text-primary"}),description:"Create in-app product updates, choose the tenant audience, and monitor publishing progress.","data-sentry-element":"SettingsHeader","data-sentry-source-file":"coax-updates.tsx"}),(0,a.jsx)(PublisherPanel,{"data-sentry-element":"PublisherPanel","data-sentry-source-file":"coax-updates.tsx"}),(0,a.jsx)(PublishedUpdatesList,{publishes:(null===(e=o.data)||void 0===e?void 0:e.data)||[],isLoading:o.isLoading,isRefreshing:o.isFetching,onRefresh:()=>o.refetch(),"data-sentry-element":"PublishedUpdatesList","data-sentry-source-file":"coax-updates.tsx"})]})}):(0,a.jsx)("main",{className:"flex min-h-full items-center justify-center bg-primary-50 p-6 dark:bg-dark",children:(0,a.jsx)(H.default,{description:"Support business access required"})})}}},function(e){e.O(0,[5055,5400,4737,3217,7206,4104,4055,149,1828,1024,4653,4749,5518,1059,6375,9843,2307,8465,5675,2997,2424,6415,8934,1568,9774,2888,179],function(){return e(e.s=53727)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.