import{j as t,_ as W,b9 as Ne,ba as Me,ad as fe,bb as pe,bc as Pe,bd as ze,I as ge,be as Te,bf as _e,ab as te,p as re,Q as ne}from"./v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b225080910.js";import{p as me,E as xe,B as ve,aH as Be,o as $e,aI as He,a2 as Qe,$ as he}from"./v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b225080923.js";import{u as D,a as Z}from"./v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b225080998.js";import{u as q}from"./v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b225080919.js";import{u as be}from"./v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b225080935.js";import{a as y,d as Ue}from"./v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b22508094.js";import{a as Xe,g as We,e as qe,i as ae,m as Ke,b as Ve,c as Ge,d as Ye,f as z,h as Ze,j as Je,k as ye}from"./v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b2250809188.js";import{r as V,g as et,m as G,o as tt,c as J,d as Se,e as U,a as rt,b as Ee,s as je,f as oe}from"./v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b2250809189.js";import{_ as k,e as nt,r as at}from"./v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b22508095.js";import{i as R}from"./v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b22508099.js";import{a as Ce}from"./v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b225080921.js";import{b as ot}from"./v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b225080980.js";const it=y.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b2250809184.js")),[]));function st(){return t.jsx(y.Suspense,{fallback:t.jsx(t.Fragment,{}),children:t.jsx(it,{})})}const lt=y.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b2250809185.js")),[]));function ie({model:e}){return t.jsx(y.Suspense,{fallback:t.jsx(t.Fragment,{}),children:t.jsx(lt,{model:e})})}function ct(){const{categories:e}=be(),{language:r}=q(),{open:n}=me(),{filter:f,setFilter:o}=D(),p=[{id:"all",name:r.tab_all,action:()=>o("model",{id:"all"})},{id:"type",name:r.filterQuickReplyPerType,action:i=>n(t.jsx(ie,{model:"type"}),{placement:"left-end"},i.target)},{id:"not_cat",name:r.filterQuickReplyNotPerCategorie,action:()=>o("model",{id:"not_cat"})},{id:"cat",name:r.filterQuickReplyPerCategorie,action:i=>n(t.jsx(ie,{model:"cat"}),{placement:"left-end"},i.target)},{id:"most_used",name:r.filterQuickReplyMostUsed,action:()=>o("model",{id:"most_used"})}],u=t.jsxs("div",{className:"flex justify-center gap-2",children:[t.jsx(Ne,{value:f.search,setValue:i=>o("search",i),placeholder:r.searchQuickReply}),t.jsx("span",{className:"cursor-pointer pulse lg:tooltip lg:tooltip-left","data-tip":r.createQuickReply,onClick:i=>n(t.jsx(st,{}),{placement:"bottom-end"},i.target,5),children:t.jsx(Me,{className:"!w-[30px] !h-[30px] text-[var(--primaria)]"})})]}),g=t.jsx("div",{className:"flex gap-1 flex-wrap",children:p.map(i=>{var c;return t.jsxs("div",{className:`flex gap-1 badge border border-[var(--secundaria)] border-solid  font-medium rounded-lg shadow-lg text-nowrap pulse cursor-pointer 
                            ${f.model.id===i.id?"bg-label-gradient text-[var(--letra)]":"text-[var(--primaria)]"}`,onClick:x=>i.action(x),children:[i.id==="type"&&f.model.id===i.id&&t.jsx(fe,{type:f.model.parm,style:"w-4 h-4 text-[var(--letra)]"}),i.id==="cat"&&f.model.id===i.id&&t.jsx(pe,{size:18,color:(c=e.find(x=>x.id===f.model.parm))==null?void 0:c.hexColor}),t.jsx("span",{children:i.name}),(i.id==="type"||i.id==="cat")&&t.jsx("span",{children:t.jsx(Pe,{size:15})})]})})});return t.jsxs("div",{className:"flex flex-col gap-2 p-2",children:[u,g]})}function dt(e){var r=e.list,n=e.startIndex,f=e.closestEdgeOfTarget,o=e.indexOfTarget,p=e.axis;return V({list:r,startIndex:n,finishIndex:et({closestEdgeOfTarget:f,startIndex:n,indexOfTarget:o,axis:p})})}function T(e){var r=e.axis,n=e.side;return function(o){var p,u,g=o.clientRect,i=o.overflow,c=o.config,x=Xe[r],a=x.mainAxis,l=x.crossAxis,d=a[n],m=i[d],s=We[d]({clientRect:g,config:c}),h=DOMRect.fromRect((p={},k(p,a.point,s[a.point]),k(p,a.size,s[a.size]),k(p,l.point,s[l.point]-m[l.start]),k(p,l.size,s[l.size]+m[l.start]+m[l.end]),p)),b=DOMRect.fromRect((u={},k(u,a.point,n==="start"?g[a.point]-m[a.start]:g[a.end]),k(u,l.point,g[l.point]-m[l.start]),k(u,a.size,n==="start"?m[a.start]:m[a.end]),k(u,l.size,m[l.start]+g[l.size]+m[l.end]),u));return{insideOfEdge:h,outsideOfEdge:b}}}var ut={top:T({axis:"vertical",side:"start"}),right:T({axis:"horizontal",side:"end"}),bottom:T({axis:"vertical",side:"end"}),left:T({axis:"horizontal",side:"start"})};function _(e){return e.type==="inside-of-edge"}function B(e){var r,n,f,o;return{top:(r=e==null?void 0:e.top)!==null&&r!==void 0?r:0,right:(n=e==null?void 0:e.right)!==null&&n!==void 0?n:0,bottom:(f=e==null?void 0:e.bottom)!==null&&f!==void 0?f:0,left:(o=e==null?void 0:e.left)!==null&&o!==void 0?o:0}}function ft(e){return{top:B(e.fromTopEdge),right:B(e.fromRightEdge),bottom:B(e.fromBottomEdge),left:B(e.fromLeftEdge)}}function pt(e){var r=e.entry,n=e.timeSinceLastFrame,f=e.input,o=e.config,p=e.allowedAxis,u={x:f.clientX,y:f.clientY},g=r.element.getBoundingClientRect(),i=ft(r.getOverflow()),c=qe.map(function(s){var h=ut[s]({clientRect:g,overflow:i,config:o}),b=h.insideOfEdge,S=h.outsideOfEdge;return ae({client:u,clientRect:S})?{edge:s,hitbox:S,type:"outside-of-edge"}:ae({client:u,clientRect:b})?{edge:s,hitbox:b,type:"inside-of-edge"}:!1}).filter(function(s){return!!s});if(!c.length)return null;var x=Ke(r.element),a=c.filter(function(s){return Ve(Ye[s.edge],p)&&Ge[s.edge](r.element)});if(!a.length)return null;var l=new Map(a.map(function(s){return[s.edge,s]})),d=function(){var s="horizontal",h=l.get("left");if(h)return z({client:u,isDistanceDampeningEnabled:_(h),hitbox:h.hitbox,edge:"left",axis:s,timeSinceLastFrame:n,engagement:x,config:o});var b=l.get("right");return b?z({client:u,isDistanceDampeningEnabled:_(b),hitbox:b.hitbox,edge:"right",axis:s,timeSinceLastFrame:n,engagement:x,config:o}):0}(),m=function(){var s="vertical",h=l.get("bottom");if(h)return z({client:u,isDistanceDampeningEnabled:_(h),hitbox:h.hitbox,edge:"bottom",axis:s,timeSinceLastFrame:n,engagement:x,config:o});var b=l.get("top");return b?z({client:u,isDistanceDampeningEnabled:_(b),hitbox:b.hitbox,edge:"top",axis:s,timeSinceLastFrame:n,engagement:x,config:o}):0}();return{left:d,top:m}}function gt(e,r){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=mt(e))||r){n&&(e=n);var f=0,o=function(){};return{s:o,n:function(){return f>=e.length?{done:!0}:{done:!1,value:e[f++]}},e:function(c){throw c},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var p=!0,u=!1,g;return{s:function(){n=n.call(e)},n:function(){var c=n.next();return p=c.done,c},e:function(c){u=!0,g=c},f:function(){try{!p&&n.return!=null&&n.return()}finally{if(u)throw g}}}}function mt(e,r){if(e){if(typeof e=="string")return se(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return se(e,r)}}function se(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,f=new Array(r);n<r;n++)f[n]=e[n];return f}function xt(e){var r=e.input,n=e.source,f=e.entries,o=e.timeSinceLastFrame,p=e.underUsersPointer,u=gt(f),g;try{for(u.s();!(g=u.n()).done;){var i,c,x,a=g.value;if(!a.element.contains(p)){var l={input:r,source:n,element:a.element};if(!(a.canScroll&&!a.canScroll(l))){var d=Ze((i=a.getConfiguration)===null||i===void 0?void 0:i.call(a,l)),m=(c=(x=a.getAllowedAxis)===null||x===void 0?void 0:x.call(a,l))!==null&&c!==void 0?c:"all",s=pt({entry:a,input:r,timeSinceLastFrame:o,allowedAxis:m,config:d});s&&a.element.scrollBy(s)}}}}catch(h){u.e(h)}finally{u.f()}}function vt(e){var r=e.monitor,n=new Map;function f(p){return n.set(p.element,p),function(){return n.delete(p.element)}}function o(p){var u=p.latestArgs,g=p.underUsersPointer,i=p.timeSinceLastFrame;xt({input:u.location.current.input,source:u.source,entries:Array.from(n).map(function(c){var x=nt(c,2);x[0];var a=x[1];return a}),underUsersPointer:g,timeSinceLastFrame:i})}return Je(r).onFrame(o),{unsafeOverflowAutoScroll:f}}var ht=vt({monitor:G}),Re=ht.unsafeOverflowAutoScroll;function Oe(e){var r=e.element,n=e.input;return function(f){var o=f.container,p=r.getBoundingClientRect(),u=o.getBoundingClientRect(),g=Math.min(n.clientX-p.x,u.width),i=Math.min(n.clientY-p.y,u.height);return{x:g,y:i}}}const bt=y.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b2250809186.js")),[]));function yt({card:e}){return t.jsx(y.Suspense,{fallback:t.jsx(t.Fragment,{}),children:t.jsx(bt,{card:e})})}const St=y.lazy(() => __vitePreload(()=>import(chrome.runtime.getURL("content/assets/js/v_7_4_1_21_73d2acb1-b7f3-47a2-a8fe-3772b2250809187.js")),[]));function Et({card:e}){return t.jsx(y.Suspense,{fallback:t.jsx(t.Fragment,{}),children:t.jsx(St,{card:e})})}const we=tt(function(){const{userAgent:r}=navigator;return r.includes("AppleWebKit")&&!r.includes("Chrome")}),jt=Ue.div`
    -webkit-transform: perspective(1px) translateZ(0);
    transform: perspective(1px) translateZ(0);
    -webkit-transition-duration: 0.5s;
    transition-duration: 0.5s;
    -webkit-transition-property: color, background-color;
    transition-property: color, background-color;

    &:hover,
    &[activated] {
        background-color: ${e=>e.hexColor};
        border-radius: 4px;
    }
`;function X({dragging:e,hexColor:r}){return t.jsx("div",{className:"flex-shrink-0 skeleton rounded-md ",style:{height:e.height,backgroundColor:r+"40"}})}const le=async(e,r)=>{e.stopPropagation();const{setUsedRespostaRapida:n}=Z.getState(),{sendAction:f}=ve.getState(),{open:o,setAcaoEnvioEmMassa:p}=Ce.getState();await Qe("respostasRapidas")!==!0&&(n(r.id),o?p(r):f(r))};function ce({card:e,state:r,outerRef:n,innerRef:f,hexColor:o}){const{menuContent:p}=xe(),{open:u}=me(),{open:g}=Ce(),{getAction:i}=ve(),{setAcao:c}=Be(),{open:x}=$e(),a=d=>{d.stopPropagation(),close(),c(i(e.id)),x(t.jsx(Et,{card:e}))},l=d=>{d.stopPropagation(),u(t.jsx(yt,{card:e}),{placement:"left-end"},n.current,25,{mounted:()=>{var m,s;return(s=(m=n.current)==null?void 0:m.parentNode)==null?void 0:s.setAttribute("activated","")},desmouted:()=>{var m,s;return(s=(m=n.current)==null?void 0:m.parentNode)==null?void 0:s.removeAttribute("activated","")}})};return t.jsx(jt,{hexColor:o+"70",children:t.jsxs("div",{ref:n,className:"flex flex-shrink-0 flex-col gap-2 ",onClick:d=>le(d,e),children:[r.type==="is-over"&&r.closestEdge==="top"?t.jsx(X,{dragging:r.dragging,hexColor:o}):null,t.jsx("div",{className:"px-1 py-[5px] border-t border-solid",ref:f,style:{borderColor:`${o}60`,...r.type==="preview"&&{width:r.dragging.width,height:r.dragging.height,transform:we()?void 0:"rotate(4deg)",backgroundColor:`${o}60`,borderRadius:"4px"}},children:t.jsxs("div",{className:"flex justify-between",children:[t.jsxs("div",{className:"flex gap-1 items-center",children:[t.jsx("div",{children:t.jsx(fe,{type:e.type})}),t.jsx("div",{className:"truncate",style:{maxWidth:`calc(${p.width}px - 139px)`},children:e.titulo})]}),t.jsxs("div",{className:"flex gap-1 items-center",children:[t.jsx("span",{className:"text-[var(--icon)] cursor-pointer pulse",onClick:l,children:t.jsx(ze,{size:18})}),!g&&t.jsx("span",{className:"text-[var(--icon)] cursor-pointer pulse",onClick:a,children:t.jsx(He,{size:20})}),t.jsx("span",{className:"text-[var(--icon)] cursor-pointer pulse",onClick:d=>le(d,e),children:t.jsx(ot,{size:18})})]})]})}),r.type==="is-over"&&r.closestEdge==="bottom"?t.jsx(X,{dragging:r.dragging,hexColor:o}):null]})})}const Ae=Symbol("card");function Ct({card:e,rect:r,columnId:n}){return{[Ae]:!0,rect:r,card:e,columnId:n}}function A(e){return!!e[Ae]}function L({source:e}){return!D.getState().activeFilter&&A(e.data)}const ke=Symbol("card-drop-target");function De(e){return!!e[ke]}function Rt({card:e,columnId:r}){return{[ke]:!0,card:e,columnId:r}}const Ie=Symbol("column");function Ot({column:e}){return{[Ie]:!0,column:e}}function N(e){return!!e[Ie]}function Q({source:e}){var r;return!D.getState().activeFilter&&((r=e.data.column)==null?void 0:r.id)!=="not_cat"&&N(e.data)}function Fe(e,r){const n=Object.keys(e),f=Object.keys(r);return n.length!==f.length?!1:n.every(o=>Object.is(e[o],r[o]))}const $={type:"idle"};function wt({card:e,columnId:r,hexColor:n}){const{activeFilter:f}=D(),{language:o}=q(),p=y.useRef(null),u=y.useRef(null),[g,i]=y.useState($);return y.useEffect(()=>{const c=p.current,x=u.current;return R(c&&x),J(Ee({element:x,getInitialData:({element:a})=>Ct({card:e,columnId:r,rect:a.getBoundingClientRect()}),onGenerateDragPreview({nativeSetDragImage:a,location:l,source:d}){const m=d.data;R(A(m)),je({nativeSetDragImage:a,getOffset:Oe({element:x,input:l.current.input}),render({container:s}){i({type:"preview",container:s,dragging:x.getBoundingClientRect()})}})},onDragStart(){f&&ge({type:"Info",message:o.dragAndDropNotMoveInActiveFilter,position:"top-right"}),i({type:"is-dragging"})},onDrop(){i($)}}),Se({element:c,getIsSticky:()=>!0,canDrop:L,getData:({element:a,input:l})=>{const d=Rt({card:e,columnId:r});return rt(d,{element:a,input:l,allowedEdges:["top","bottom"]})},onDragEnter({source:a,self:l}){if(!A(a.data)||a.data.card.id===e.id)return;const d=U(l.data);d&&i({type:"is-over",dragging:a.data.rect,closestEdge:d})},onDrag({source:a,self:l}){if(!A(a.data)||a.data.card.id===e.id)return;const d=U(l.data);if(!d)return;const m={type:"is-over",dragging:a.data.rect,closestEdge:d};i(s=>Fe(m,s)?s:m)},onDragLeave({source:a}){if(A(a.data)){if(a.data.card.id===e.id){i({type:"is-dragging-and-left-self"});return}i($)}},onDrop(){i($)}}))},[e,r,f]),t.jsxs(t.Fragment,{children:[t.jsx(ce,{outerRef:p,innerRef:u,state:g,card:e,hexColor:n}),g.type==="preview"?at.createPortal(t.jsx(ce,{state:g,card:e,hexColor:n}),g.container):null]})}const Y="data-block-board-panning",At={isBoardMoreObvious:{type:"boolean",title:"Make board more obvious",description:"Add extra spacing and borders to the board scroll container to make it easier to see and play with"},isFPSPanelEnabled:{type:"boolean",title:"FPS Panel",description:"Display a panel with Frame Per Second (FPS) information"},isCPUBurnEnabled:{type:"boolean",title:"Drop FPS 🔥",description:"Start heavy process that will cause the frame rate on the page to drop"},isOverElementAutoScrollEnabled:{type:"boolean",title:"Over element auto scrolling",description:"Should elements automatically scroll when over them"},isOverflowScrollingEnabled:{type:"boolean",title:"Overflow scrolling",description:"Should overflow scrolling be enabled"},boardScrollSpeed:{type:"select",title:"Board auto scroll speed",description:"What should the max horizontal scroll speed the board be?",options:["fast","standard"]},columnScrollSpeed:{type:"select",title:"Column auto scroll speed",description:"What should the max vertical scroll speed for columns be?",options:["fast","standard"]}},kt={isBoardMoreObvious:!1,isOverElementAutoScrollEnabled:!0,boardScrollSpeed:"fast",columnScrollSpeed:"standard",isFPSPanelEnabled:!1,isCPUBurnEnabled:!1,isOverflowScrollingEnabled:!0},Le=y.createContext({fields:At,settings:kt,update:()=>{},reset:()=>{}}),Dt={idle:"","is-card-over":"","is-dragging":"","is-column-over":"skeleton"},H={type:"idle"},de=y.memo(function({column:r}){return r.cards.map(n=>t.jsx(wt,{card:n,columnId:r.id,hexColor:r.hexColor},n.id))});function It({column:e}){const{categoriaOpen:r,setCategoriaOpen:n}=Z(),{menuContent:f}=xe(),{activeFilter:o}=D(),{language:p}=q(),u=y.useRef(null),g=y.useRef(null),i=y.useRef(null),c=y.useRef(null),{settings:x}=y.useContext(Le),[a,l]=y.useState(H),d=!o&&r.includes(e.id);y.useEffect(()=>{const h=g.current,b=u.current,S=i.current,O=c.current;R(h),R(b),R(S),R(O);const M=Ot({column:e});function w({data:v,location:j}){const C=j.current.dropTargets[0],E=!!(C&&De(C.data)),P={type:"is-card-over",dragging:v.rect,isOverChildCard:E};l(I=>Fe(P,I)?I:P)}return J(Ee({element:S,getInitialData:()=>M,onGenerateDragPreview({source:v,location:j,nativeSetDragImage:C}){const E=v.data;R(N(E)),je({nativeSetDragImage:C,getOffset:Oe({element:S,input:j.current.input}),render({container:P}){const I=O.getBoundingClientRect(),F=O.cloneNode(!0);R(F instanceof HTMLElement),F.style.width=`${I.width}px`,F.style.height=`${I.height}px`,we()||(F.style.transform="rotate(4deg)"),P.appendChild(F)}})},onDragStart(){o&&ge({type:"Info",message:p.dragAndDropNotMoveInActiveFilter,position:"top-right"}),l({type:"is-dragging"})},onDrop(){l(H)}}),Se({element:h,getData:()=>M,canDrop({source:v}){return L({source:v})||Q({source:v})},getIsSticky:()=>!0,onDragStart({source:v,location:j}){A(v.data)&&w({data:v.data,location:j})},onDragEnter({source:v,location:j}){if(A(v.data)){w({data:v.data,location:j});return}N(v.data)&&v.data.column.id!==e.id&&l({type:"is-column-over"})},onDropTargetChange({source:v,location:j}){if(A(v.data)){w({data:v.data,location:j});return}},onDragLeave({source:v}){N(v.data)&&v.data.column.id===e.id||l(H)},onDrop(){l(H)}}),ye({canScroll({source:v}){return x.isOverElementAutoScrollEnabled?L({source:v}):!1},getConfiguration:()=>({maxScrollSpeed:x.columnScrollSpeed}),element:b}),Re({element:b,getConfiguration:()=>({maxScrollSpeed:x.columnScrollSpeed}),canScroll({source:v}){return!x.isOverElementAutoScrollEnabled||!x.isOverflowScrollingEnabled?!1:L({source:v})},getOverflow(){return{forTopEdge:{top:1e3},forBottomEdge:{bottom:1e3}}}}))},[e,x]);const m=t.jsx("div",{ref:g,children:t.jsx("div",{ref:c,[Y]:!0,children:t.jsx("div",{className:`flex max-h-full flex-col ${a.type==="is-column-over"?"invisible":""}`,children:t.jsx("div",{ref:i,children:t.jsx("div",{className:`flex flex-col overflow-y-auto min-h-9 cursor-default
              ${!d&&e.cards.length!==0?"pb-2":""}  
            `,ref:u,children:t.jsxs(t.Fragment,{children:[t.jsx(de,{column:e}),a.type==="is-card-over"&&!a.isOverChildCard&&t.jsx("div",{className:"flex-shrink-0 px-3 py-1",children:t.jsx(X,{dragging:a.dragging,hexColor:e.hexColor})})]})})})})})}),s=t.jsx("div",{className:"flex w-full flex-shrink-0 select-none flex-col",ref:g,children:t.jsx("div",{className:`flex max-h-full flex-col rounded-lg border border-solid border-[var(--conversation-header-border)] ${Dt[a.type]}`,ref:c,style:!d||a.type==="is-column-over"?{backgroundColor:`${e.hexColor}30`,borderColor:`${e.hexColor}60`}:{},[Y]:!0,children:t.jsxs("div",{className:`flex max-h-full flex-col ${a.type==="is-column-over"?"invisible":""}`,children:[t.jsxs("div",{className:"flex flex-row items-center justify-between p-1 gap-1",ref:i,onClick:()=>n(e.id),children:[t.jsxs("div",{className:"flex gap-1 items-center",children:[t.jsx("div",{children:t.jsx(pe,{size:20,style:{color:e.hexColor}})}),t.jsx("span",{className:"truncate font-semibold",style:{maxWidth:`calc(${f.width}px - 90px)`},children:e.name})]}),t.jsx("div",{children:t.jsx("span",{className:"text-[var(--icon)]",children:d?t.jsx(Te,{size:22,stroke:"0.3"}):t.jsx(_e,{size:22,stroke:"0.3"})})})]}),t.jsx("div",{className:`flex flex-col overflow-y-auto px-1 ml-4 
              ${!d&&e.cards.length!==0?"pb-2":""}  
            `,ref:u,children:!d&&t.jsxs(t.Fragment,{children:[t.jsx(de,{column:e}),a.type==="is-card-over"&&!a.isOverChildCard&&t.jsx("div",{className:"flex-shrink-0 px-3 py-1",children:t.jsx(X,{dragging:a.dragging,hexColor:e.hexColor})})]})})]})})});return e.id==="not_cat"?m:s}function ue(){const{sortCategories:e,categories:r}=be(),{sortQuickReply:n,quickReplies:f}=he(),{list:o,updateFilter:p}=D();y.useEffect(p,[r,f]);const u=y.useRef(null),{settings:g}=y.useContext(Le);return y.useEffect(()=>{const i=u.current;return R(i),J(G({canMonitor:L,onDrop({source:c,location:x}){const a=c.data;if(!A(a))return;const l=x.current.dropTargets[0];if(!l)return;const d=l.data,m=o.columns.findIndex(b=>b.id===a.columnId),s=o.columns[m];if(!s)return;const h=s.cards.findIndex(b=>b.id===a.card.id);if(De(d)){const b=o.columns.findIndex(E=>E.id===d.columnId),S=o.columns[b];if(s===S){const E=s.cards.findIndex(K=>K.id===d.card.id);if(h===-1||E===-1||h===E)return;const P=U(d),I=dt({axis:"vertical",list:s.cards,startIndex:h,indexOfTarget:E,closestEdgeOfTarget:P}),F={...s,cards:I},ee=Array.from(o.columns);ee[m]=F,n(ee.flatMap(K=>K.cards));return}if(!S)return;const O=S.cards.findIndex(E=>E.id===d.card.id),w=U(d)==="bottom"?O+1:O,v=Array.from(s.cards);v.splice(h,1),S.id==="not_cat"?delete a.card.categoria:a.card.categoria=S.id;const j=Array.from(S.cards);j.splice(w,0,a.card);const C=Array.from(o.columns);C[m]={...s,cards:v},C[b]={...S,cards:j},n(C.flatMap(E=>E.cards));return}if(N(d)){const b=o.columns.findIndex(v=>v.id===d.column.id),S=o.columns[b];if(!S)return;if(s===S){const v=V({list:s.cards,startIndex:h,finishIndex:s.cards.length-1}),j={...s,cards:v},C=Array.from(o.columns);C[m]=j,n(C.flatMap(E=>E.cards));return}const O=Array.from(s.cards);O.splice(h,1),S.id==="not_cat"?delete a.card.categoria:a.card.categoria=S.id;const M=Array.from(S.cards);M.splice(S.cards.length,0,a.card);const w=Array.from(o.columns);w[m]={...s,cards:O},w[b]={...S,cards:M},n(w.flatMap(v=>v.cards));return}}}),G({canMonitor:Q,onDrop({source:c,location:x}){const a=c.data;if(!N(a))return;const l=x.current.dropTargets[0];if(!l||l.data.column.id==="not_cat")return;const d=l.data;if(!N(d))return;const m=o.columns.findIndex(h=>h.id===a.column.id),s=o.columns.findIndex(h=>h.id===d.column.id);m===-1||s===-1||m!==s&&(V({list:o.columns,startIndex:m,finishIndex:s}),e({oldIndex:m,newIndex:s}))}}),ye({canScroll({source:c}){return g.isOverElementAutoScrollEnabled?L({source:c})||Q({source:c}):!1},getConfiguration:()=>({maxScrollSpeed:g.boardScrollSpeed}),element:i}),Re({element:i,getConfiguration:()=>({maxScrollSpeed:g.boardScrollSpeed}),canScroll({source:c}){return!g.isOverElementAutoScrollEnabled||!g.isOverflowScrollingEnabled?!1:L({source:c})||Q({source:c})},getOverflow(){return{forLeftEdge:{top:1e3,left:1e3,bottom:1e3},forRightEdge:{top:1e3,right:1e3,bottom:1e3}}}}))},[o,g]),y.useEffect(()=>{let i=null;const c=u.current;R(c);function x({startX:l}){let d=l;const m=oe.bindAll(window,[{type:"pointermove",listener(s){const h=s.clientX,b=d-h;d=h,c==null||c.scrollBy({left:b})}},...["pointercancel","pointerup","pointerdown","keydown","resize","click","visibilitychange"].map(s=>({type:s,listener:()=>m()}))],{capture:!0});i=m}const a=oe.bindAll(c,[{type:"pointerdown",listener(l){l.target instanceof HTMLElement&&(l.target.closest(`[${Y}]`)||x({startX:l.clientX}))}}]);return function(){a(),i==null||i()}},[]),t.jsx("div",{className:`flex h-full flex-col ${g.isBoardMoreObvious?"px-32 py-20":""}`,children:t.jsx("div",{className:`flex h-full flex-col gap-2 overflow-x-auto ${g.isBoardMoreObvious?"rounded border-2 border-dashed":""}`,ref:u,children:o.columns.map(i=>t.jsx(It,{column:i},i.id))})})}function Ft({listSize:e}){const{quickReplies:r}=he(),{list:n,activeFilter:f}=D(),{language:o}=q(),{setActiveCreateOrEdit:p}=Z(),u=t.jsxs("div",{className:"grid gap-2 mb-2 pb-4",children:[t.jsx(te,{icon:t.jsx(re,{size:26,className:"text-[var(--primaria)]"}),title:o.quickRepltEmpty,description:o.quickReplyEmptyDes}),t.jsx(ne,{name:o.createQuickReply,funcao:()=>p({type:"create",model:"respostaRapida"})})]}),g=t.jsxs("div",{className:"grid gap-2 mb-2 pb-4",children:[t.jsx(te,{icon:t.jsx(re,{size:26,className:"text-[var(--primaria)]"}),title:o.noQuickReply,description:o.searchQuickReplyNotFilter}),t.jsx(ne,{name:o.clear_filter,funcao:()=>D.setState({activeFilter:!1,filter:{search:"",model:{id:"all",parm:""}}})})]});return t.jsxs("div",{children:[t.jsx(ct,{}),t.jsx("div",{className:"overflow-auto pl-2 pr-1",style:{maxHeight:`calc(100vh - ${e}px)`},children:f?n.columns.length===0?g:t.jsx(ue,{}):r.length===0?u:t.jsx(ue,{})})]})}const Xt=Object.freeze(Object.defineProperty({__proto__:null,default:Ft},Symbol.toStringTag,{value:"Module"}));export{Et as E,Xt as i};
