PageSourceSearch

https://affinex.com.br/_next/static/chunks/2tqhmxtsfhsrx.js

js affinex.com.br collected 2026-09-24 14:34:18 UTC 51,882 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,998183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={assign:function(){return s},searchParamsToUrlQuery:function(){return i},urlQueryToSearchParams:function(){return l}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});function i(e){let t={};for(let[r,a]of e.entries()){let e=t[r];void 0===e?t[r]=a:Array.isArray(e)?e.push(a):t[r]=[e,a]}return t}function o(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function l(e){let t=new URLSearchParams;for(let[r,a]of Object.entries(e))if(Array.isArray(a))for(let e of a)t.append(r,o(e));else t.set(r,o(a));return t}function s(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,a]of r.entries())e.append(t,a)}return e}},718967,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={DecodeError:function(){return y},MiddlewareNotFoundError:function(){return k},MissingStaticPage:function(){return x},NormalizeError:function(){return b},PageNotFoundError:function(){return v},SP:function(){return m},ST:function(){return g},WEB_VITALS:function(){return i},execOnce:function(){return o},getDisplayName:function(){return u},getLocationOrigin:function(){return c},getURL:function(){return d},isAbsoluteUrl:function(){return s},isResSent:function(){return h},loadGetInitialProps:function(){return f},normalizeRepeatedSlashes:function(){return p},stringifyError:function(){return w}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let i=["CLS","FCP","FID","INP","LCP","TTFB"];function o(e){let t,r=!1;return(...a)=>(r||(r=!0,t=e(...a)),t)}let l=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,s=e=>l.test(e);function c(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function d(){let{href:e}=window.location,t=c();return e.substring(t.length)}function u(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function h(e){return e.finished||e.headersSent}function p(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function f(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await f(t.Component,t.ctx)}:{};let a=await e.getInitialProps(t);if(r&&h(r))return a;if(!a)throw Object.defineProperty(Error(`"${u(e)}.getInitialProps()" should resolve to an object. But found "${a}" instead.`),"__NEXT_ERROR_CODE",{value:"E1025",enumerable:!1,configurable:!0});return a}let m="u">typeof performance,g=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class y extends Error{}class b extends Error{}class v extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class x extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class k extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function w(e){return JSON.stringify({message:e.message,stack:e.stack})}},233525,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},456420,e=>{"use strict";var t=e.i(271645);let r=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim(),a=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var n={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,t.createContext)({}),o=(0,t.forwardRef)(({color:e,size:a,strokeWidth:o,absoluteStrokeWidth:l,className:s="",children:c,iconNode:d,...u},h)=>{let{size:p=24,strokeWidth:f=2,absoluteStrokeWidth:m=!1,color:g="currentColor",className:y=""}=(0,t.useContext)(i)??{},b=l??m?24*Number(o??f)/Number(a??p):o??f;return(0,t.createElement)("svg",{ref:h,...n,width:a??p??n.width,height:a??p??n.height,stroke:e??g,strokeWidth:b,className:r("lucide",y,s),...!c&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(u)&&{"aria-hidden":"true"},...u},[...d.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(c)?c:[c]])});e.s(["default",0,(e,n)=>{let i=(0,t.forwardRef)(({className:i,...l},s)=>(0,t.createElement)(o,{ref:s,iconNode:n,className:r(`lucide-${a(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,i),...l}));return i.displayName=a(e),i}],456420)},167881,991918,225913,e=>{"use strict";var t=e.i(843476),r=e.i(271645);function a(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}
1function n(e){let t=r.forwardRef((t,n)=>{var i;let s,p,{children:f,...m}=t,g=null,y=!1,b=[];c(f)&&"function"==typeof h&&(f=h(f._payload)),r.Children.forEach(f,e=>{var t;if(t=e,r.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===o){y=!0;let t="child"in e.props?e.props.child:e.props.children;c(t)&&"function"==typeof h&&(t=h(t._payload)),g=l(e,t),b.push(g?.props?.children)}else b.push(e)}),g?g=r.cloneElement(g,void 0,b):!y&&1===r.Children.count(f)&&r.isValidElement(f)&&(g=f);let v=g?(i=g,(p=(s=Object.getOwnPropertyDescriptor(i.props,"ref")?.get)&&"isReactWarning"in s&&s.isReactWarning)?i.ref:(p=(s=Object.getOwnPropertyDescriptor(i,"ref")?.get)&&"isReactWarning"in s&&s.isReactWarning)?i.props.ref:i.props.ref||i.ref):void 0,x=function(...e){return r.useCallback(function(...e){return t=>{let r=!1,n=e.map(e=>{let n=a(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){let r=n[t];"function"==typeof r?r():a(e[t],null)}}}}(...e),e)}(n,v);if(!g){if(f||0===f)throw Error(y?u(e):d(e));return f}let k=function(e,t){let r={...t};for(let a in t){let n=e[a],i=t[a];/^on[A-Z]/.test(a)?n&&i?r[a]=(...e)=>{let t=i(...e);return n(...e),t}:n&&(r[a]=n):"style"===a?r[a]={...n,...i}:"className"===a&&(r[a]=[n,i].filter(Boolean).join(" "))}return{...e,...r}}(m,g.props??{});return g.type!==r.Fragment&&(k.ref=n?x:v),r.cloneElement(g,k)});return t.displayName=`${e}.Slot`,t}var i=n("Slot"),o=Symbol.for("radix.slottable"),l=(e,t)=>{if("child"in e.props){let t=e.props.child;return r.isValidElement(t)?r.cloneElement(t,void 0,e.props.children(t.props.children)):null}return r.isValidElement(t)?t:null},s=Symbol.for("react.lazy");function c(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===s&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var d=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,u=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,h=r[" use ".trim().toString()];e.s(["Slot",0,i,"createSlot",0,n],991918);var p=e.i(207670);let f=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,m=p.clsx,g=(e,t)=>r=>{var a;if((null==t?void 0:t.variants)==null)return m(e,null==r?void 0:r.class,null==r?void 0:r.className);let{variants:n,defaultVariants:i}=t,o=Object.keys(n).map(e=>{let t=null==r?void 0:r[e],a=null==i?void 0:i[e];if(null===t)return null;let o=f(t)||f(a);return n[e][o]}),l=r&&Object.entries(r).reduce((e,t)=>{let[r,a]=t;return void 0===a||(e[r]=a),e},{});return m(e,o,null==t||null==(a=t.compoundVariants)?void 0:a.reduce((e,t)=>{let{class:r,className:a,...n}=t;return Object.entries(n).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...i,...l}[t]):({...i,...l})[t]===r})?[...e,r,a]:e},[]),null==r?void 0:r.class,null==r?void 0:r.className)};e.s(["cva",0,g],225913);var y=e.i(945060);let b=g("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium cursor-pointer transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),v=r.forwardRef(({className:e,variant:r,size:a,asChild:n=!1,...o},l)=>(0,t.jsx)(n?i:"button",{className:(0,y.cn)(b({variant:r,size:a,className:e})),ref:l,...o}));v.displayName="Button",e.s(["Button",0,v],167881)},632781,e=>{"use strict";let t=(0,e.i(456420).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",0,t],632781)},195057,(e,t,r)=>{"use strict";
1Object.defineProperty(r,"__esModule",{value:!0});var a={formatUrl:function(){return l},formatWithValidation:function(){return c},urlObjectKeys:function(){return s}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let i=e.r(190809)._(e.r(998183)),o=/https?|ftp|gopher|file/;function l(e){let{auth:t,hostname:r}=e,a=e.protocol||"",n=e.pathname||"",l=e.hash||"",s=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),s&&"object"==typeof s&&(s=String(i.urlQueryToSearchParams(s)));let d=e.search||s&&`?${s}`||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||o.test(a))&&!1!==c?(c="//"+(c||""),n&&"/"!==n[0]&&(n="/"+n)):c||(c=""),l&&"#"!==l[0]&&(l="#"+l),d&&"?"!==d[0]&&(d="?"+d),n=n.replace(/[?#]/g,encodeURIComponent),d=d.replace("#","%23"),`${a}${c}${n}${d}${l}`}let s=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return l(e)}},818581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return n}});let a=e.r(271645);function n(e,t){let r=(0,a.useRef)(null),n=(0,a.useRef)(null);return(0,a.useCallback)(a=>{if(null===a){let e=r.current;e&&(r.current=null,e());let t=n.current;t&&(n.current=null,t())}else e&&(r.current=i(e,a)),t&&(n.current=i(t,a))},[e,t])}function i(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},573668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return i}});let a=e.r(718967),n=e.r(652817);function i(e){if(!(0,a.isAbsoluteUrl)(e))return!0;try{let t=(0,a.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,n.hasBasePath)(r.pathname)}catch(e){return!1}}},284508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},522016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var a={default:function(){return y},useLinkStatus:function(){return v}};for(var n in a)Object.defineProperty(r,n,{enumerable:!0,get:a[n]});let i=e.r(190809),o=e.r(843476),l=i._(e.r(271645)),s=e.r(195057),c=e.r(8372),d=e.r(818581),u=e.r(718967),h=e.r(405550);e.r(233525);let p=e.r(388540),f=e.r(91949),m=e.r(573668),g=e.r(509396);function y(t){var r,a;let n,i,y,[v,x]=(0,l.useOptimistic)(f.IDLE_LINK_STATUS),k=(0,l.useRef)(null),{href:w,as:$,children:C,prefetch:j=null,passHref:A,replace:L,shallow:E,scroll:S,onClick:N,onMouseEnter:M,onTouchStart:T,legacyBehavior:P=!1,onNavigate:_,transitionTypes:O,ref:I,unstable_dynamicOnHover:R,...B}=t;n=C,P&&("string"==typeof n||"number"==typeof n)&&(n=(0,o.jsx)("a",{children:n}));let W=l.default.useContext(c.AppRouterContext),z=!1!==j,F=!1!==j?null===(a=j)||"auto"===a?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,U="string"==typeof(r=$||w)?r:(0,s.formatUrl)(r);if(P){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});i=l.default.Children.only(n)}let D=P?i&&"object"==typeof i&&i.ref:I,V=l.default.useCallback(e=>(null!==W&&(k.current=(0,f.mountLinkInstance)(e,U,W,F,z,x)),()=>{k.current&&((0,f.unmountLinkForCurrentNavigation)(k.current),k.current=null),(0,f.unmountPrefetchableInstance)(e)}),[z,U,W,F,x]),H={ref:(0,d.useMergedRef)(V,D),onClick(t){P||"function"!=typeof N||N(t),P&&i.props&&"function"==typeof i.props.onClick&&i.props.onClick(t),!W||t.defaultPrevented||function(t,r,a,n,i,o,s){if
1("u">typeof window){let c,{nodeName:d}=t.currentTarget;if("A"===d.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){n&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),o){let e=!1;if(o({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:u}=e.r(699781);l.default.startTransition(()=>{u(r,n?"replace":"push",!1===i?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,a.current,s)})}}(t,U,k,L,S,_,O)},onMouseEnter(e){P||"function"!=typeof M||M(e),P&&i.props&&"function"==typeof i.props.onMouseEnter&&i.props.onMouseEnter(e),W&&z&&(0,f.onNavigationIntent)(e.currentTarget,!0===R)},onTouchStart:function(e){P||"function"!=typeof T||T(e),P&&i.props&&"function"==typeof i.props.onTouchStart&&i.props.onTouchStart(e),W&&z&&(0,f.onNavigationIntent)(e.currentTarget,!0===R)}};return(0,u.isAbsoluteUrl)(U)?H.href=U:P&&!A&&("a"!==i.type||"href"in i.props)||(H.href=(0,h.addBasePath)(U)),y=P?l.default.cloneElement(i,H):(0,o.jsx)("a",{...B,...H,children:n}),(0,o.jsx)(b.Provider,{value:v,children:y})}e.r(284508);let b=(0,l.createContext)(f.IDLE_LINK_STATUS),v=()=>(0,l.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},618566,(e,t,r)=>{t.exports=e.r(976562)},503094,251920,e=>{"use strict";let t,r;var a,n,i=e.i(843476),o=e.i(271645);let l="/logo-escuro.png",s="/logo-branco.png",c="/favicon.png";function d(e){return e.trim().normalize("NFD").replace(/\p{M}/gu,"").toLowerCase().replace(/[^a-z0-9]+/g,"").slice(0,48)||"app"}function u(e,t){let r="string"==typeof e?e.trim():"";return r||t}let h={appName:r=(t="string"==typeof(n=(a={}).appName)?n.trim().replace(/\s+/g," "):"")?t.slice(0,64):"ZapOfertas",appSlug:d(r),logoLightUrl:u(a.logoLightUrl,l),logoDarkUrl:u(a.logoDarkUrl,s),faviconUrl:u(a.faviconUrl,c)};e.s(["DEFAULT_FAVICON",0,c,"DEFAULT_LOGO_DARK",0,s,"DEFAULT_LOGO_LIGHT",0,l,"FALLBACK_BRANDING",0,h,"toAppSlug",0,d],251920);let p=(0,o.createContext)({...h,setBranding:()=>{},refreshBranding:async()=>{}});e.s(["BrandingProvider",0,function({initial:e,children:t}){let[r,a]=(0,o.useState)(e??h),n=(0,o.useCallback)(e=>{if(a(e),"u">typeof document){document.title=e.appName;let t=document.querySelector("link[rel='icon']");t&&(t.href=e.faviconUrl)}},[]),l=(0,o.useCallback)(async()=>{try{let e=await fetch("/api/theme",{cache:"no-store"}),t=await e.json().catch(()=>({}));t?.branding&&n(t.branding)}catch{}},[n]);(0,o.useEffect)(()=>{let e=window.location.pathname;if("/login"===e||e.startsWith("/login/")||"/signup"===e||e.startsWith("/signup/"))return;l();let t=e=>{let t=e.detail;t?.appName?n(t):l()};return window.addEventListener("platform-branding-changed",t),()=>window.removeEventListener("platform-branding-changed",t)},[l,n]);let s=(0,o.useMemo)(()=>({...r,setBranding:n,refreshBranding:l}),[r,n,l]);return(0,i.jsx)(p.Provider,{value:s,children:t})},"notifyBrandingChanged",0,function(e){window.dispatchEvent(new CustomEvent("platform-branding-changed",{detail:e}))},"useBranding",0,function(){return(0,o.useContext)(p)}],503094)},574119,e=>{"use strict";var t=e.i(843476),r=e.i(522016),a=e.i(618566),n=e.i(945060),i=e.i(503094),o=e.i(251920);let l={sm:"h-8 max-w-[140px] sm:max-w-[152px]",md:"h-10 max-w-[168px] sm:max-w-[180px]",lg:"h-14 max-w-[220px] sm:h-16 sm:max-w-[260px]"};e.s(["BrandLogo",0,function({href:e="/",className:s,variant:c="auto",size:d="md"}){let u=(0,a.usePathname)(),{appName:h,logoLightUrl:p,logoDarkUrl:f}=(0,i.useBranding)(),m=(0,n.cn)("w-auto object-contain object-left",l[d]),g=p||o.DEFAULT_LOGO_LIGHT,y=f||o.DEFAULT_LOGO_DARK,b=(0,t.jsx)("img",{src:g,alt:h,width:260,height:64,decoding:"async",className:(0,n.cn)(m,"auto"===c&&"block dark:hidden","onLight"===c&&"block","onDark"===c&&"hidden")}),v=(0,t.jsx)("img",{src:y,alt:h,width:260,height:64,decoding:"async",className:(0,n.cn)(m,"auto"===c&&"hidden dark:block","onDark"===c&&"block","onLight"===c&&"hidden")}),x=(0,t.jsxs)(t.Fragment,{children:[v,b]}),k=u===e||"/"!==e&&u.startsWith(`${e}/`);return!e||k?(0,t.jsx)("span",{className:(0,n.cn)("flex min-w-0 items-center",s
1),children:x}):(0,t.jsx)(r.default,{href:e,prefetch:!1,className:(0,n.cn)("flex min-w-0 items-center",s),children:x})}])},363178,e=>{"use strict";var t=e.i(271645),r=(e,t,r,a,n,i,o,l)=>{let s=document.documentElement,c=["light","dark"];function d(t){var r;(Array.isArray(e)?e:[e]).forEach(e=>{let r="class"===e,a=r&&i?n.map(e=>i[e]||e):n;r?(s.classList.remove(...a),s.classList.add(i&&i[t]?i[t]:t)):s.setAttribute(e,t)}),r=t,l&&c.includes(r)&&(s.style.colorScheme=r)}if(a)d(a);else try{let e=localStorage.getItem(t)||r,a=o&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;d(a)}catch(e){}},a=["light","dark"],n="(prefers-color-scheme: dark)",i="u"<typeof window,o=t.createContext(void 0),l={setTheme:e=>{},themes:[]},s=["light","dark"],c=({forcedTheme:e,disableTransitionOnChange:r=!1,enableSystem:i=!0,enableColorScheme:l=!0,storageKey:c="theme",themes:f=s,defaultTheme:m=i?"system":"light",attribute:g="data-theme",value:y,children:b,nonce:v,scriptProps:x})=>{let[k,w]=t.useState(()=>u(c,m)),[$,C]=t.useState(()=>"system"===k?p():k),j=y?Object.values(y):f,A=t.useCallback(e=>{let t=e;if(!t)return;"system"===e&&i&&(t=p());let n=y?y[t]:t,o=r?h(v):null,s=document.documentElement,c=e=>{"class"===e?(s.classList.remove(...j),n&&s.classList.add(n)):e.startsWith("data-")&&(n?s.setAttribute(e,n):s.removeAttribute(e))};if(Array.isArray(g)?g.forEach(c):c(g),l){let e=a.includes(m)?m:null,r=a.includes(t)?t:e;s.style.colorScheme=r}null==o||o()},[v]),L=t.useCallback(e=>{let t="function"==typeof e?e(k):e;w(t);try{localStorage.setItem(c,t)}catch(e){}},[k]),E=t.useCallback(t=>{C(p(t)),"system"===k&&i&&!e&&A("system")},[k,e]);t.useEffect(()=>{let e=window.matchMedia(n);return e.addListener(E),E(e),()=>e.removeListener(E)},[E]),t.useEffect(()=>{let e=e=>{e.key===c&&(e.newValue?w(e.newValue):L(m))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[L]),t.useEffect(()=>{A(null!=e?e:k)},[e,k]);let S=t.useMemo(()=>({theme:k,setTheme:L,forcedTheme:e,resolvedTheme:"system"===k?$:k,themes:i?[...f,"system"]:f,systemTheme:i?$:void 0}),[k,L,e,$,i,f]);return t.createElement(o.Provider,{value:S},t.createElement(d,{forcedTheme:e,storageKey:c,attribute:g,enableSystem:i,enableColorScheme:l,defaultTheme:m,value:y,themes:f,nonce:v,scriptProps:x}),b)},d=t.memo(({forcedTheme:e,storageKey:a,attribute:n,enableSystem:i,enableColorScheme:o,defaultTheme:l,value:s,themes:c,nonce:d,scriptProps:u})=>{let h=JSON.stringify([n,a,l,e,c,s,i,o]).slice(1,-1);return t.createElement("script",{...u,suppressHydrationWarning:!0,nonce:"u"<typeof window?d:"",dangerouslySetInnerHTML:{__html:`(${r.toString()})(${h}
1)`}})}),u=(e,t)=>{let r;if(!i){try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t}},h=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},p=e=>(e||(e=window.matchMedia(n)),e.matches?"dark":"light");e.s(["ThemeProvider",0,e=>t.useContext(o)?t.createElement(t.Fragment,null,e.children):t.createElement(c,{...e}),"useTheme",0,()=>{var e;return null!=(e=t.useContext(o))?e:l}])},196699,235965,e=>{"use strict";var t=e.i(456420);let r=(0,t.default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);e.s(["Moon",0,r],196699);let a=(0,t.default)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);e.s(["Sun",0,a],235965)},62474,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(363178),n=e.i(196699),i=e.i(235965),o=e.i(167881);e.s(["ThemeToggle",0,function({className:e}){let{theme:l,setTheme:s}=(0,a.useTheme)(),[c,d]=(0,r.useState)(!1);if((0,r.useEffect)(()=>d(!0),[]),!c)return(0,t.jsx)(o.Button,{type:"button",variant:"ghost",size:"icon",className:e,"aria-label":"Tema"});let u="light"!==l;return(0,t.jsx)(o.Button,{type:"button",variant:"ghost",size:"icon",className:e,"aria-label":u?"Ativar modo claro":"Ativar modo escuro",onClick:()=>s(u?"light":"dark"),children:u?(0,t.jsx)(i.Sun,{className:"h-4 w-4"}):(0,t.jsx)(n.Moon,{className:"h-4 w-4"})})}])},136037,e=>{"use strict";let t=(0,e.i(456420).default)("scroll-text",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);e.s(["ScrollText",0,t],136037)},96315,e=>{"use strict";let t=(0,e.i(456420).default)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]);e.s(["Mail",0,t],96315)},146387,e=>{"use strict";let t=(0,e.i(456420).default)("building-2",[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]]);e.s(["Building2",0,t],146387)},448953,e=>{"use strict";let t=[{id:"offers",label:"Ofertas",description:"Fila de ofertas, aprovação e publicação"},{id:"categories",label:"Categorias",description:"Árvore de categorias e descoberta ML"},{id:"mercadolivre",label:"Mercado Livre",description:"Conta afiliada ML e geração de links"},{id:"shopee",label:"Shopee",description:"Integração Shopee e descoberta de ofertas"},{id:"awin",label:"AWIN",description:"Rede AWIN (KaBuM, Centauro e outras lojas joined)"},{id:"magalu",label:"Magalu",description:"Influenciador Magalu (Magazine Você) — slug da loja"},{id:"whatsapp",label:"WhatsApp",description:"Conexão Zapgate e envio para grupos"},{id:"groups",label:"Multi-grupo",description:"Vários grupos WhatsApp por workspace"},{id:"auto_approve",label:"Auto-aprovação",description:"Regras inteligentes de curadoria"},{id:"contacts",label:"Contatos",description:"Lista de participantes dos grupos"},{id:"messages",label:"Mensagens",description:"Inbox de mensagens recebidas"},{id:"analytics",label:"Analytics",description:"Cliques e métricas de desempenho"},{id:"settings",label:"Configurações",description:"Limites, janelas e preferências do tenant"},{id:"extension",label:"Extensão Chrome",description:"Token e sessão da extensão de afiliado"}],r=t.map(e=>e.id),a=new Set(r);e.s(["ALL_PLAN_CAPABILITY_IDS",0,r,"PLAN_CAPABILITIES",0,t,"durationLabel",0,function(e,t){let r=!Number.isFinite(e)||e<1?1:Math.min(3650,Math.round(e)),a="day"===t||"year"===t?t:"month";return"day"===a?1===r?"1 dia":`${r} dias`:"year"===a?1===r?"1 ano":`${r} anos`:1===r?"1 mês":`${r} meses`}
1,"formatPriceBRL",0,function(e){return(e/100).toLocaleString("pt-BR",{style:"currency",currency:"BRL"})},"planAllowsCapability",0,function(e,t){return!e||0===e.length||e.includes(t)},"toggleCapability",0,function(e,t,n){return a.has(t)?n?function(e){let t=[];Array.isArray(e)?t=e.map(String):"string"==typeof e&&(t=function(e){if(!e?.trim())return[];try{let t=JSON.parse(e);if(!Array.isArray(t))return[];return t.map(String).map(e=>e.trim()).filter(Boolean)}catch{return e.split("\n").map(e=>e.trim()).filter(Boolean)}}(e));let n=new Set,i=[];for(let e of r)t.includes(e)&&!n.has(e)&&(n.add(e),i.push(e));for(let e of t)!a.has(e)&&e&&n.has(e);return i}([...e,t]):e.filter(e=>e!==t):e}])},284467,e=>{"use strict";function t(e){return{mlChannelActive:e?.mlChannelActive!==!1,shopeeChannelActive:e?.shopeeChannelActive!==!1,awinChannelActive:!!e?.awinChannelActive,magaluChannelActive:!!e?.magaluChannelActive}}e.s(["DEFAULT_CHANNEL_FLAGS",0,{mlChannelActive:!0,shopeeChannelActive:!0,awinChannelActive:!1,magaluChannelActive:!1},"isChannelActive",0,function(e,r){let a=t(e);switch(r){case"mercadolivre":return a.mlChannelActive;case"shopee":return a.shopeeChannelActive;case"awin":return a.awinChannelActive;case"magalu":return a.magaluChannelActive}},"isCredentialHrefActive",0,function(e,r){let a=t(r);if("/credentials"===e||e.startsWith("/credentials/")){if("/credentials"===e)return a.mlChannelActive;if(e.startsWith("/credentials/shopee"))return a.shopeeChannelActive;if(e.startsWith("/credentials/awin"))return a.awinChannelActive;if(e.startsWith("/credentials/magalu"))return a.magaluChannelActive}return!0}])},917308,e=>{"use strict";var t=e.i(448953);let r=[{prefix:"/offers",capability:"offers"},{prefix:"/categories",capability:"categories"},{prefix:"/discovery-logs",capability:"categories"},{prefix:"/whatsapp",capability:"whatsapp"},{prefix:"/contacts",capability:"contacts"},{prefix:"/messages",capability:"messages"},{prefix:"/analytics",capability:"analytics"},{prefix:"/settings",capability:"settings"},{prefix:"/credentials/shopee",capability:"shopee"},{prefix:"/credentials/awin",capability:"awin"},{prefix:"/credentials/magalu",capability:"magalu"},{prefix:"/credentials",capability:"mercadolivre"}];function a(e,r){return(0,t.planAllowsCapability)(e,r)}e.s(["MARKETPLACE_CAPABILITY",0,{mercadolivre:"mercadolivre",shopee:"shopee",awin:"awin",magalu:"magalu"},"allowsCapability",0,a,"isHrefAllowedByPlan",0,function(e,t){if("/"===e||"/billing"===e||e.startsWith("/billing/"))return!0;let n=function(e){for(let t of[...r].sort((e,t)=>t.prefix.length-e.prefix.length))if(e===t.prefix||e.startsWith(`${t.prefix}/`))return t.capability;return null}(e);return!n||a(t,n)}])},270904,e=>{"use strict";let t=(0,e.i(456420).default)("wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]);e.s(["Wallet",0,t],270904)},882303,e=>{"use strict";let t=(0,e.i(456420).default)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);e.s(["Users",0,t],882303)},263448,e=>{"use strict";let t=(0,e.i(456420).default)("shopping-bag",[["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",key:"o988cm"}]]);e.s(["ShoppingBag",0,t],263448)},367784,e=>{"use strict";let t=(0,e.i(456420).default)("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]);e.s(["LogOut",0,t],367784)},868401,e=>{"use strict";let t=(0,e.i(456420).default)("tags",[["path",{d:"M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z",key:"16rjxf"}],["path",{d:"M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193",key:"178nd4"}],["circle",{cx:"10.5",cy:"6.5",r:".5",fill:"currentColor",key:"12ikhr"}]]);e.s(["Tags",0,t],868401)},407921,e=>{"use strict";let t=(0,e.i(456420).default)("network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);e.s(["Network",0,t],407921)},166794,e=>{"use strict";let t=(0,e.i(456420).default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Settings",0,t],166794)},444105,244017,e=>{"use strict";var t=e.i(271645),r=e.i(363178);let a=["violet","indigo","ocean","cyan","teal","emerald","forest","copper","wine","rose","fuchsia","aurora","midnight","graphite"],n={sunset:"copper"},i=[{id:"violet",label:"Violeta",description:"Marca ZapOfertas — profundo e premium",hue:295,chroma:1,primaryC:.22,glowShift:12,swatch:"oklch(0.68 0.22 295)",swatchEnd:"oklch(0.55 0.2 310)"},{id:"indigo",label:"Índigo",description:"Azul-violeta elegante, menos “neon”",hue:275,chroma:.95,primaryC:.19,glowShift:8,swatch:"oklch(0.66 0.19 275)",swatchEnd:"oklch(0.48 0.16 255)"},{id:"ocean",label:"Oceano",description:"Azul limpo e profissional",hue:245,chroma:.9,primaryC:.17,primaryL:.7,glowShift:-8,swatch:"oklch(0.7 0.17 245)",swatchEnd:"oklch(0.5 0.14 220)"},{id:"cyan",label:"Ciano",description:"Azul-água moderno e fresco",hue:210,chroma:.85,primaryC:.14,primaryL:.74,primaryLLight:.48,primaryCLight:.14,glowShift:-5,swatch:"oklch(0.74 0.14 210)",swatchEnd:"oklch(0.52 0.12 195)"},{id:"teal",label:"Teal",description:"Verde-azulado sofisticado",hue:190,chroma:.85,primaryC:.13,primaryL:.72,primaryLLight:.45,primaryCLight:.13,glowShift:6,swatch:"oklch(0.72 0.13 190)",swatchEnd:"oklch(0.5 0.11 175)"},{id:"emerald",label:"Esmeralda",description:"Verde joia, contraste alto",hue:160,chroma:.9,primaryC:.16,primaryL:.72,primaryLLight:.45,primaryCLight:.15,glowShift:8,swatch:"oklch(0.72 0.16 160)",swatchEnd:"oklch(0.48 0.13 145)"},{id:"forest",label:"Floresta",description:"Verde musgo discreto",hue:145,chroma:.7,primaryC:.12,primaryL:.7,primaryLLight:.42,primaryCLight:.12,glowShift:10,swatch:"oklch(0.7 0.12 145)",swatchEnd:"oklch(0.42 0.1 135)"},{id:"copper",label:"Cobre",description:"Quente e contido — sem laranja gritando",hue:48,chroma:.55,primaryC:.13,primaryL:.78,primaryLLight:.52,primaryCLight:.14,glowShift:-6,swatch:"oklch(0.78 0.13 48)",
1swatchEnd:"oklch(0.52 0.11 35)"},{id:"wine",label:"Vinho",description:"Bordô escuro, clima editorial",hue:18,chroma:.6,primaryC:.15,primaryL:.72,primaryLLight:.48,primaryCLight:.16,glowShift:8,swatch:"oklch(0.72 0.15 18)",swatchEnd:"oklch(0.48 0.13 5)"},{id:"rose",label:"Rosa",description:"Rosa-pó moderno",hue:350,chroma:.7,primaryC:.17,primaryL:.74,primaryLLight:.52,primaryCLight:.18,glowShift:-8,swatch:"oklch(0.74 0.17 350)",swatchEnd:"oklch(0.54 0.14 330)"},{id:"fuchsia",label:"Fúcsia",description:"Magenta vibrante, ainda elegante",hue:328,chroma:.85,primaryC:.2,primaryL:.72,glowShift:10,swatch:"oklch(0.72 0.2 328)",swatchEnd:"oklch(0.52 0.18 305)"},{id:"aurora",label:"Aurora",description:"Lilás com brilho suave",hue:310,chroma:.9,primaryC:.18,primaryL:.72,glowShift:18,swatch:"oklch(0.72 0.18 310)",swatchEnd:"oklch(0.55 0.16 285)"},{id:"midnight",label:"Meia-noite",description:"Azul-noite quase monocromático",hue:255,chroma:.55,primaryC:.12,primaryL:.72,glowShift:-5,swatch:"oklch(0.72 0.12 255)",swatchEnd:"oklch(0.35 0.08 250)"},{id:"graphite",label:"Grafite",description:"Neutro com leve tom frio",hue:265,chroma:.35,primaryC:.08,primaryL:.74,primaryLLight:.4,primaryCLight:.06,glowShift:0,swatch:"oklch(0.74 0.08 265)",swatchEnd:"oklch(0.4 0.04 260)"}],o="violet";function l(e){var t;let r=(e||"").trim();return(t=r,a.includes(t))?r:r&&n[r]?n[r]:o}function s(e,t,r){return Math.min(r,Math.max(t,e))}function c(e,t,r){for(let[a,n]of Object.entries(function(e,t="dark"){let r,a=(r=l(e),i.find(e=>e.id===r)||i[0]),n=a.hue,o=a.chroma,c=n+(a.glowShift??10);if("light"===t){let e=a.primaryLLight??.5,t=a.primaryCLight??.26*o,r=s(.012*o,.004,.02);return{"--background":`oklch(0.975 ${r} ${n})`,"--foreground":`oklch(0.2 ${.04*o} ${n})`,"--card":"oklch(1 0 0)","--card-foreground":`oklch(0.2 ${.04*o} ${n})`,"--popover":"oklch(1 0 0)","--popover-foreground":`oklch(0.2 ${.04*o} ${n})`,"--primary":`oklch(${e} ${t} ${n})`,"--primary-foreground":"oklch(0.99 0 0)","--primary-glow":`oklch(${s(e-.02,.35,.6)} ${.9*t} ${c})`,"--secondary":`oklch(0.95 ${.03*o} ${n})`,"--secondary-foreground":`oklch(0.28 ${.06*o} ${n})`,"--muted":`oklch(0.95 ${.018*o} ${n})`,"--muted-foreground":`oklch(0.42 ${.04*o} ${n})`,"--accent":`oklch(0.94 ${.05*o} ${n})`,"--accent-foreground":`oklch(0.3 ${.12*o} ${n})`,"--border":`oklch(0.88 ${.03*o} ${n})`,"--input":`oklch(0.96 ${.018*o} ${n})`,"--ring":`oklch(${e} ${t} ${n})`,"--sidebar":`oklch(0.99 ${.015*o} ${n})`,"--sidebar-foreground":`oklch(0.22 ${.04*o} ${n})`,"--sidebar-primary":`oklch(${e} ${t} ${n})`,"--sidebar-primary-foreground":"oklch(0.99 0 0)","--sidebar-accent":`oklch(0.94 ${.045*o} ${n})`,"--sidebar-accent-foreground":`oklch(0.3 ${.12*o} ${n})`,"--sidebar-border":`oklch(0.9 ${.03*o} ${n})`,"--sidebar-ring":`oklch(${e} ${t} ${n})`,"--gradient-primary":`linear-gradient(135deg, oklch(${e} ${t} ${n}), oklch(${s(e+.08,.4,.65)} ${.85*t} ${c}))`,"--gradient-hero":`radial-gradient(ellipse 80% 60% at 50% -20%, oklch(${e} ${.7*t} ${n} / 22%), transparent 60%), radial-gradient(ellipse 60% 50% at 85% 20%, oklch(${e} ${.5*t} ${c} / 16%), transparent 70%), linear-gradient(180deg, oklch(0.985 ${r} ${n}), oklch(0.96 ${1.2*r} ${n}))`,"--gradient-card":`linear-gradient(135deg, oklch(1 0 0), oklch(0.975 ${.02*o} ${n}))`,"--shadow-glow":`0 0 50px -12px oklch(${e} ${t} ${n} / 35%)`,"--glass-bg":"oklch(1 0 0 / 80%)","--glass-border":`oklch(0.88 ${.03*o} ${n} / 85%)`,"--scrollbar-thumb":`oklch(0.72 ${.05*o} ${n} / 50%)`,"--scrollbar-thumb-hover":`oklch(0.55 ${.08*o} ${n} / 70%)`}}let d=n<100||n>320,u=a.primaryL??(d?.74:.7),h=a.primaryC??s(.2*o,.1,.22),p=d?s(.01*o,.005,.014):s(.016*o,.008,.024),f=d?s(.014*o,.008,.02):s(.022*o,.01,.03),m=s(.45*h,.04,.12);return{"--background":`oklch(0.145 ${p} ${n})`,"--foreground":`oklch(0.97 ${.008*o} ${n})`,"--card":`oklch(0.195 ${f} ${n})`,"--card-foreground":`oklch(0.97 ${.008*o} ${n})`,"--popover":`oklch(0.19 ${f} ${n})`,"--popover-foreground":`oklch(0.97 ${.008*o} ${n})`,"--primary":`oklch(${u} ${h} ${n})`,"--primary-foreground":"oklch(0.99 0 0)","--primary-glow":`oklch(${s(u+.08,.6,.88)} ${.8*h} ${c})`,"--secondary":`oklch(0.24 ${1.1*f} ${n})`,"--secondary-foreground":`oklch(0.96 ${.01*o} ${n})`,"--muted":`oklch(0.22 ${.9*f} ${n})`,"--muted-foreground":`oklch(0.72 ${.02*o} ${n})`,"--accent":`oklch(0.28 ${m} ${n})`,"--accent-foreground":`oklch(0.98 ${.01*o} ${n})`,"--border":`oklch(0.32 ${.9*f} ${n} / 45%)`,"--input":`oklch(0.22 ${f} ${n})`,"--ring":`oklch(${u} ${h} ${n})`,"--sidebar":`oklch(0.16 ${1.05*p} ${n})`,"--sidebar-foreground":`oklch(0.94 ${.01*o} ${n})`,"--sidebar-primary":`oklch(${u} ${h} ${n})`,"--sidebar-primary-foreground":"oklch(0.99 0 0)","--sidebar-accent":`oklch(0.26 ${m} ${n})`,"--sidebar-accent-foreground":`oklch(0.98 ${.01*o} ${n})`,"--sidebar-border":`oklch(0.28 ${.8*f} ${n} / 40%)`,"--sidebar-ring":`oklch(${u} ${h} ${n})`,"--gradient-primary":`linear-gradient(135deg, oklch(${u} ${h} ${n}), oklch(${s(u+.08,.6,.88)} ${.75*h} ${c}))`,"--gradient-hero":`radial-gradient(ellipse 80% 60% at 50% -20%, oklch(${u} ${.75*h} ${n} / 32%), transparent 60%), radial-gradient(ellipse 55% 45% at 90% 15%, oklch(${u}
1 ${.55*h} ${c} / 20%), transparent 70%), linear-gradient(180deg, oklch(0.145 ${p} ${n}), oklch(0.12 ${.85*p} ${n}))`,"--gradient-card":`linear-gradient(135deg, oklch(0.22 ${f} ${n} / 90%), oklch(0.17 ${p} ${n} / 90%))`,"--shadow-glow":`0 0 56px -12px oklch(${u} ${h} ${n} / 38%)`,"--glass-bg":`oklch(0.2 ${f} ${n} / 55%)`,"--glass-border":`oklch(0.42 ${m} ${n} / 16%)`,"--scrollbar-thumb":`oklch(0.36 ${f} ${n} / 50%)`,"--scrollbar-thumb-hover":`oklch(0.5 ${m} ${n} / 70%)`}}(t,r)))e.style.setProperty(a,n);e.dataset.palette=t}e.s(["DEFAULT_UI_PALETTE",0,o,"UI_PALETTES",0,i,"applyPaletteVars",0,c,"normalizePaletteId",0,l],244017),e.s(["PaletteProvider",0,function({initialPalette:e=o,children:a}){let{resolvedTheme:n}=(0,r.useTheme)();return(0,t.useEffect)(()=>{let t=!1,r=e=>{c(document.documentElement,e,"light"===n?"light":"dark")};r(l(document.documentElement.dataset.palette||e));let a=window.location.pathname;"/login"===a||a.startsWith("/login/")||"/signup"===a||a.startsWith("/signup/")||(async()=>{try{let e=await fetch("/api/theme",{cache:"no-store"}),a=await e.json().catch(()=>({}));if(t)return;r(l(a.palette))}catch{}})();let i=e=>{r(l(e.detail))};return window.addEventListener("zapofertas:palette",i),()=>{t=!0,window.removeEventListener("zapofertas:palette",i)}},[e,n]),a},"previewPlatformPalette",0,function(e,t="dark"){c(document.documentElement,e,t),window.dispatchEvent(new CustomEvent("zapofertas:palette",{detail:e}))}],444105)},559665,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(522016),n=e.i(618566),i=e.i(456420);let o=(0,i.default)("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);var l=e.i(263448),s=e.i(868401),c=e.i(882303),d=e.i(96315);let u=(0,i.default)("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);var h=e.i(166794),p=e.i(146387);let f=(0,i.default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);var m=e.i(367784);let g=(0,i.default)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]);var y=e.i(263676),b=e.i(136037),v=e.i(270904),x=e.i(632781),k=e.i(407921),w=e.i(574119),$=e.i(247272),C=e.i(503094);function j(){let{appName:e}=(0,C.useBranding)();return(0,t.jsxs)("footer",{className:"border-t border-border/50 px-4 py-3 text-center text-xs text-muted-foreground sm:px-6",children:[e," · Automação de ofertas e afiliados"]})}var A=e.i(62474),L=e.i(167881),E=e.i(945060),S=e.i(284467),N=e.i(917308);let M=[{label:"Operação",items:[{label:"Dashboard",href:"/",icon:o},{label:"Ofertas",href:"/offers",icon:l.ShoppingBag},{label:"Categorias",href:"/categories",icon:s.Tags},{label:"Logs raspagem",href:"/discovery-logs",icon:b.ScrollText}]},{label:"WhatsApp",items:[{label:"WhatsApp",href:"/whatsapp",icon:$.WhatsAppIcon},{label:"Contatos",href:"/contacts",icon:c.Users},{label:"Mensagens",href:"/messages",icon:d.Mail}]},{label:"Insights",items:[{label:"Analytics",href:"/analytics",icon:u}]},{label:"Conta",items:[{label:"Assinatura",href:"/billing",icon:v.Wallet},{label:"Conta ML",href:"/credentials",icon:$.MercadoLivreIcon},{label:"Conta Shopee",href:"/credentials/shopee",icon:$.ShopeeIcon},{label:"Conta AWIN",href:"/credentials/awin",icon:k.Network},{label:"Conta Magalu",href:"/credentials/magalu",icon:$.MagaluIcon},{label:"Configurações",href:"/settings",icon:h.Settings}]}],T=[{label:"Assinatura",items:[{label:"Assinatura",href:"/billing",icon:v.Wallet}]}];function P(e){let t=e.replace(/\/+$/,"")||"/";return/^\/t\/[^/]+(?:\/(?:join|grupo))?$/.test(t)}function _(e){return"/login"===e||e.startsWith("/login/")||"/signup"===e||e.startsWith("/signup/")||"/plans"===e||e.startsWith("/plans/")||"/billing"===e||e.startsWith("/billing/")||"/privacy"===e||"/privacy-policy"===e||"/politica-de-privacidade"===e||P(e)}e.s(["default",0,function({children:e}){let i=(0,n.usePathname)(),o=(0,n.useRouter)(),[l,s]=(0,r.useState)(!1),[c,d]=(0,r.useState)(!1),[u,h]=(0,r.useState)(""),[b,v]=(0,r.useState)(null),[k,$]=(0,r.useState)(null),[C,O]=(0,r.useState)([]),[I,R]=(0,r.useState)(!1),[B,W]=(0,r.useState)(!1),[z,F]=(0,r.useState)(!1),[U,D]=(0,r.useState)(!1),[V,H]=(0,r.useState)(S.DEFAULT_CHANNEL_FLAGS),[K,q]=(0,r.useState)(null),G="/login"===i||i.startsWith("/login/")||"/signup"===i||i.startsWith("/signup/")||"/plans"===i||i.startsWith("/plans/")||"/privacy"===i||"/privacy-policy"===i||"/politica-de-privacidade"===i||P(i),Z=e
1=>{s(!!e.isPlatformAdmin),d(!!e.requiresPayment),h(e.tenant?.name||e.tenant?.slug||""),v(e.tenantId||e.tenant?.id||null),$(e.tenant?.status||null),O(Array.isArray(e.memberships)?e.memberships:[]),e.channels&&"object"==typeof e.channels&&H({mlChannelActive:!1!==e.channels.mlChannelActive,shopeeChannelActive:!1!==e.channels.shopeeChannelActive,awinChannelActive:!!e.channels.awinChannelActive,magaluChannelActive:!!e.channels.magaluChannelActive}),Array.isArray(e.capabilities)?q(e.capabilities):q([])};(0,r.useEffect)(()=>{if(G)return void F(!0);let e=!1;return fetch("/api/auth/me").then(e=>e.json()).then(t=>{e||(t?.authenticated?Z(t):(d(!1),O([]),v(null),H(S.DEFAULT_CHANNEL_FLAGS),q([])))}).catch(()=>void 0).finally(()=>{e||F(!0)}),()=>{e=!0}},[i,G]),(0,r.useEffect)(()=>{let e=()=>{fetch("/api/auth/me").then(e=>e.json()).then(e=>{e?.authenticated&&Z(e)}).catch(()=>void 0)};return window.addEventListener("zapofertas:channels-changed",e),()=>window.removeEventListener("zapofertas:channels-changed",e)},[]),(0,r.useEffect)(()=>{z&&c&&(_(i)||o.replace("/billing"))},[z,c,i,o]),(0,r.useEffect)(()=>{D(!1)},[i]),(0,r.useEffect)(()=>{if(!U)return;let e=e=>{"Escape"===e.key&&D(!1)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[U]);let J=c&&!l,Q=(0,r.useMemo)(()=>{if(J)return T;let e=K??[],t=M.map(t=>({...t,items:t.items.filter(r=>!!(0,N.isHrefAllowedByPlan)(r.href,e)&&("Conta"!==t.label||(0,S.isCredentialHrefActive)(r.href,V)))})).filter(e=>e.items.length>0);return l?[...t,{label:"Plataforma",items:[{label:"Admin",href:"/admin/tenants",icon:p.Building2}]}]:t},[l,J,V,K]);if((0,r.useEffect)(()=>{!z||J||G||l||null!==K&&((0,N.isHrefAllowedByPlan)(i,K)||o.replace("/"))},[z,J,G,l,K,i,o]),G)return(0,t.jsx)(t.Fragment,{children:e});let X=async()=>{await fetch("/api/auth/logout",{method:"POST"}),window.location.href="/login"},Y=async e=>{if(e&&e!==b&&!B){W(!0);try{let t=await fetch("/api/auth/switch-tenant",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tenantId:e})}),r=await t.json().catch(()=>({}));if(!t.ok)return void console.error("[switch-tenant]",r.error||t.status);R(!1),window.location.href=r.redirectTo||"/"}finally{W(!1)}}};if(!z||J&&!_(i))return(0,t.jsxs)("div",{className:"flex min-h-screen items-center justify-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(x.Loader2,{className:"h-4 w-4 animate-spin"}),J?"Redirecionando para pagamento…":"Carregando…"]});let ee=(0,t.jsx)("nav",{className:"flex flex-1 flex-col overflow-y-auto px-2 py-3",children:Q.map((e,r)=>(0,t.jsxs)("div",{className:(0,E.cn)(r>0&&"mt-5"),children:[(0,t.jsx)("p",{className:"mb-1 px-3 text-[10px] font-semibold uppercase tracking-[0.14em] text-muted-foreground/70",children:e.label}),(0,t.jsx)("div",{className:"flex flex-col gap-0.5",children:e.items.map(e=>{var r;let n=e.icon,o="/"===(r=e.href)?"/"===i:"/credentials"===r?"/credentials"===i:"/credentials/shopee"===r?"/credentials/shopee"===i||i.startsWith("/credentials/shopee/"):"/credentials/awin"===r?"/credentials/awin"===i||i.startsWith("/credentials/awin/"):"/credentials/magalu"===r?"/credentials/magalu"===i||i.startsWith("/credentials/magalu/"):"/admin/tenants"===r?"/admin"===i||i.startsWith("/admin/"):i===r||i.startsWith(`${r}/`);return(0,t.jsxs)(a.default,{href:e.href,"data-active":o,onClick:()=>D(!1),className:(0,E.cn)("flex items-center gap-2.5 rounded-lg px-3 py-2.5 text-sm font-medium transition-colors",o?"border border-primary/35 bg-primary/15 text-primary shadow-sm":"text-sidebar-foreground/75 hover:bg-sidebar-accent hover:text-sidebar-foreground"),children:[(0,t.jsx)(n,{className:"h-4 w-4 shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e.label})]},e.href)})})]},e.label))});return(0,t.jsxs)("div",{className:"flex h-screen flex-col overflow-hidden bg-background",children:[(0,t.jsx)("header",{className:"glass sticky top-0 z-40 shrink-0 border-b border-border/50",children:(0,t.jsxs)("div",{className:"flex h-16 w-full items-center justify-between px-4 sm:px-6",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2 md:gap-4",children:[(0,t.jsx)("button",{type:"button",className:"flex h-8 w-8 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-secondary/60 hover:text-foreground md:hidden","aria-label":"Abrir menu",onClick:()=>D(!0),children:(0,t.jsx)(g,{className:"h-5 w-5"})}),(0,t.jsx)(w.BrandLogo,{}),J?(0,t.jsx)("span",{className:"hidden rounded-full border border-amber-500/35 bg-amber-500/10 px-2.5 py-0.5 text-[11px] font-medium text-amber-800 dark:text-amber-200 sm:inline",children:"suspended"===k?"Conta suspensa":"Pagamento pendente"}):null]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 sm:gap-3",children:[(0,t.jsx)(A.ThemeToggle,{}),(0,t.jsxs)("div",{className:"relative flex items-center gap-2 rounded-full bg-secondary/60 py-1 pl-1 pr-1 md:pl-3",children:[C.length>1?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{type:"button",className:"hidden max-w-[180px] items-center gap-1 truncate text-left text-xs text-muted-foreground md:flex",onClick:()=>R(e=>!e),disabled:B,title:"Trocar de cliente",children:["Cliente"," ",(0,t.jsx)("span",{className:"truncate font-medium text-foreground",children:u||"painel"}),(0,t.jsx)(f,{className:"h-3.5 w-3.5 shrink-0 opacity-70"})]}),(0,t.jsx)("button",{type:"button",className:"flex h-8 w-8 items-center justify-center rounded-full text-muted-foreground hover:bg-secondary md:hidden",onClick:()=>R(e=>!e),disabled:B,"aria-label":"Trocar de cliente",children:(0,t.jsx)(p.Building2,{className:"h-4 w-4"})}),I?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",className:"fixed inset-0 z-40 cursor-default","aria-label":"Fechar seletor",onClick:()=>R(!1)}),(0,t.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-2 w-64 roun
1ded-xl border border-border bg-popover p-1.5 shadow-elegant",children:[(0,t.jsx)("p",{className:"px-2.5 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Seus clientes"}),C.map(e=>{let r=e.tenantId===b;return(0,t.jsxs)("button",{type:"button",disabled:B||r,onClick:()=>void Y(e.tenantId),className:(0,E.cn)("flex w-full items-start gap-2 rounded-lg px-2.5 py-2 text-left text-sm transition-colors",r?"bg-primary/10 text-primary":"hover:bg-secondary/80"),children:[(0,t.jsx)(p.Building2,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,t.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,t.jsx)("span",{className:"block truncate font-medium",children:e.name}),(0,t.jsxs)("span",{className:"block text-[11px] text-muted-foreground",children:["owner"===e.role?"Proprietário":"admin"===e.role?"Administrador":"Membro","active"!==e.status?` \xb7 ${e.status}`:""]})]})]},e.tenantId)})]})]}):null]}):(0,t.jsxs)("span",{className:"hidden text-xs text-muted-foreground md:inline",children:["Cliente"," ",(0,t.jsx)("span",{className:"font-medium text-foreground",children:u||"painel"})]}),(0,t.jsx)(L.Button,{type:"button",variant:"ghost",size:"icon",className:"h-8 w-8 rounded-full hover:bg-destructive/20 hover:text-destructive",title:"Sair","aria-label":"Sair",onClick:()=>void X(),children:(0,t.jsx)(m.LogOut,{className:"h-4 w-4"})})]})]})]})}),(0,t.jsxs)("div",{className:"flex min-h-0 flex-1 overflow-hidden",children:[(0,t.jsxs)("aside",{className:"hidden w-[240px] shrink-0 flex-col border-r border-sidebar-border bg-sidebar md:flex",children:[ee,J?(0,t.jsx)("p",{className:"px-4 pb-4 text-[11px] leading-relaxed text-muted-foreground",children:"Regularize o pagamento para liberar o painel completo."}):null]}),U?(0,t.jsxs)("div",{className:"fixed inset-0 z-50 md:hidden",children:[(0,t.jsx)("button",{type:"button",className:"absolute inset-0 bg-background/70 backdrop-blur-sm","aria-label":"Fechar menu",onClick:()=>D(!1)}),(0,t.jsxs)("aside",{className:"absolute inset-y-0 left-0 flex w-[min(280px,88vw)] flex-col border-r border-sidebar-border bg-sidebar shadow-elegant",children:[(0,t.jsxs)("div",{className:"flex h-16 items-center justify-between border-b border-sidebar-border px-4",children:[(0,t.jsx)("span",{className:"font-display text-sm font-semibold",children:"Menu"}),(0,t.jsx)("button",{type:"button",className:"flex h-8 w-8 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-secondary/60 hover:text-foreground","aria-label":"Fechar menu",onClick:()=>D(!1),children:(0,t.jsx)(y.X,{className:"h-5 w-5"})})]}),ee]})]}):null,(0,t.jsx)("main",{className:(0,E.cn)("flex min-h-0 min-w-0 flex-1 flex-col","/settings"===i?"overflow-hidden":"overflow-y-auto"),children:"/settings"===i?(0,t.jsx)("div",{className:"flex min-h-0 flex-1 flex-col",children:e}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"w-full flex-1 px-5 py-6 sm:px-8 lg:px-10",children:e}),(0,t.jsx)(j,{})]})})]})]})}],559665)},880492,e=>{"use strict";var t=e.i(843476),r=e.i(363178);e.s(["ThemeProvider",0,function({children:e}){return(0,t.jsx)(r.ThemeProvider,{attribute:"class",defaultTheme:"dark",enableSystem:!1,disableTransitionOnChange:!0,children:e})}])},564576,e=>{"use strict";var t=e.i(271645);e.s(["PwaRegister",0,function(){return(0,t.useEffect)(()=>{(async()=>{try{if("serviceWorker"in navigator){let e=await navigator.serviceWorker.getRegistrations();await Promise.all(e.map(e=>e.unregister()))}if("caches"in window){let e=await caches.keys();await Promise.all(e.map(e=>caches.delete(e)))}}catch{}})()},[]),null}])},244198,e=>{"use strict";var t=e.i(843476),r=e.i(363178),a=e.i(846696);e.s(["AppToaster",0,function(){let{resolvedTheme:e}=(0,r.useTheme)();return(0,t.jsx)(a.Toaster,{theme:"light"===e?"light":"dark",position:"top-right",richColors:!0,closeButton:!0,toastOptions:{className:"font-sans text-sm"}})}])}]);

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.