PageSourceSearch

https://vapetasia.com/_next/static/chunks/3671.949452c13ca10bfe.js

js vapetasia.com collected 2026-10-06 10:57:14 UTC 8,989 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3671],{3671:(e,t,n)=>{n.r(t),n.d(t,{default:()=>l});var r=n(77949),o=n(5849),a=n(6476),i=n(95155),d=n(12115),s=n(67113),c=n(54360);function l(e){var t=e.designJson,n=e.onReady,l=e.onChange,u=(e.onExport,e.editorRef),f=(0,d.useRef)(null),m=u||f,p=(0,d.useRef)(!1),h=(0,o._)((0,d.useState)(!1),2),v=h[0],y=h[1],g=(0,s.D)(),E=(g.theme,g.resolvedTheme);g.systemTheme;var b="dark"===E,_=(0,d.useCallback)(function(){if((null===(e=m.current)||void 0===e?void 0:e.editor)&&m.current.editor.registerCallback("image",(s=(0,r._)(function(e,t){var n,r,o;return(0,a.YH)(this,function(a){switch(a.label){case 0:(n=new FormData).append("file",e.attachments[0]),n.append("category","newsletter"),a.label=1;case 1:return a.trys.push([1,4,,5]),[4,fetch("/api/admin/media/upload",{method:"POST",body:n})];case 2:return[4,a.sent().json()];case 3:return(o=a.sent()).success&&(null===(r=o.data)||void 0===r?void 0:r.cdnUrl)?t({progress:100,url:o.data.cdnUrl}):(console.error("Image upload failed:",o.error),t({progress:100,url:""})),[3,5];case 4:return console.error("Image upload failed:",a.sent()),t({progress:100,url:""}),[3,5];case 5:return[2]}})}),function(e,t){return s.apply(this,arguments)})),t&&(null===(o=m.current)||void 0===o?void 0:o.editor)&&!p.current&&(m.current.editor.loadDesign(t),p.current=!0),null===(i=m.current)||void 0===i?void 0:i.editor){var e,o,i,d,s,c=document.documentElement.classList.contains("dark")?"modern_dark":"modern_light",u=m.current.editor;try{u.getAppearance,u.setTheme(c),u.getAppearance,u.setAppearance({theme:c}),u.getAppearance}catch(e){console.error("[UnlayerEditor] Error setting theme:",e)}}(null===(d=m.current)||void 0===d?void 0:d.editor)&&l&&m.current.editor.addEventListener("design:updated",l),y(!0),null==n||n()},[t,m,n,l]),w=(0,d.useCallback)(function(){return new Promise(function(e,t){var n;if(!(null===(n=m.current)||void 0===n?void 0:n.editor)){t(Error("Editor not ready"));return}m.current.editor.exportHtml(function(t){e({html:t.html,design:t.design})})})},[m]);return(0,d.useEffect)(function(){m.current&&(m.current.exportContent=w)},[m,w]),(0,d.useEffect)(function(){var e;if(v&&(null===(e=m.current)||void 0===e?void 0:e.editor)){var t=b?"modern_dark":"modern_light",n=m.current.editor;try{n.setTheme(t),n.setAppearance({theme:t})}catch(e){console.error("[UnlayerEditor] Error in dynamic theme update:",e)}}},[b,v,m]),(0,i.jsx)("div",{className:"border border-gray-300 dark:border-gray-600 rounded-md overflow-hidden bg-white dark:bg-gray-800",children:(0,i.jsx)(c.default,{ref:m,onReady:_,options:{displayMode:"email",features:{textEditor:{spellChecker:!0}},tools:{image:{enabled:!0}},appearance:{theme:b?"modern_dark":"modern_light"}},style:{minHeight:"700px"}})})}},54360:(e,t,n)=>{e.exports=n(62631)},62631:(e,t,n)=>{var r=n(12115),o=r&&"object"==typeof r&&"default"in r?r.default:r;function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var i=[],d=!1,s=function(){if(d)for(var e;e=i.shift();)e()},c="undefined"==typeof window?{__unlayer_lastEditorId:0}:window;c.__unlayer_lastEditorId=c.__unlayer_lastEditorId||0;var l=o.forwardRef(function(e,t){var n,l,u,f,m,p,h,v,y,g=e.onLoad,E=e.onReady,b=e.scriptUrl,_=e.minHeight,w=e.style,k=r.useState(null),C=k[0],S=k[1],T=r.useState(!1),I=T[0],j=T[1],x=r.useMemo(function(){return e.editorId||"editor-"+ ++c.__unlayer_lastEditorId},[e.editorId]),A=a({},e.options||{},{appearance:null!=(n=e.appearance)?n:null==(l=e.options)?void 0:l.appearance,displayMode:(null==e?void 0:e.displayMode)||(null==(u=e.options)?void 0:u.displayMode)||"email",locale:null!=(f=e.locale)?f:null==(m=e.options)?void 0:m.locale,projectId:null!=(p=e.projectId)?p:null==(h=e.options)?void 0:h.projectId,tools:null!=(v=e.tools)?v:null==(y=e.options)?void 0:y.tools,id:x,source:{name:"react-email-editor",version:"1.7.11"}});r.useImperativeHandle(t,function(){return{editor:C}},[C]),r.useEffect(function(){return function(){null==C||C.destroy()}},[]),r.useEffect(function(){j(!1),function(e,t){if(void 0===t&&(t="https://editor.unlayer.com/embed.js?2"),i.push(function(){return j(!0)}),n=t,r=document.querySelectorAll("script"),o=!1,r.forEach(function(e){e.src.includes(n)&&(o=!0)}),o)s();else{var n,r,o,a=document.createElement("script");a.setAttribute("src",t),a.onload=function(){d=!0,s()},document.head.appendChild(a)}}(0,b)},[b]),r.useEffect(function(){I&&(null==C||C.destroy(),S(unlayer.createEditor(A)))},[JSON.stringify(A),I]);var L=Object.keys(e).filter(function(e){return/^on/.test(e)});
1return r.useEffect(function(){C&&(null==g||g(C),L.forEach(function(t){/^on/.test(t)&&"onLoad"!==t&&"onReady"!==t&&"function"==typeof e[t]&&C.addEventListener(t,e[t])}),E&&C.addEventListener("editor:ready",function(){E(C)}))},[C,Object.keys(L).join(",")]),o.createElement("div",{style:{flex:1,display:"flex",minHeight:void 0===_?500:_}},o.createElement("div",{id:x,style:a({},void 0===w?{}:w,{flex:1})}))});t.default=l},67113:(e,t,n)=>{n.d(t,{D:()=>p,N:()=>h});var r=n(25742),o=n(65843),a=n(5849),i=n(20106),d=n(12115),s=function(e,t,n,r,o,a,d,s){var c=function(t){(Array.isArray(e)?e:[e]).forEach(function(e){var n,r="class"===e,d=r&&a?o.map(function(e){return a[e]||e}):o;r?((n=u.classList).remove.apply(n,(0,i._)(d)),u.classList.add(a&&a[t]?a[t]:t)):u.setAttribute(e,t)}),l(t)},l=function(e){s&&f.includes(e)&&(u.style.colorScheme=e)},u=document.documentElement,f=["light","dark"];if(r)c(r);else try{var m=localStorage.getItem(t)||n,p=d&&"system"===m?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":m;c(p)}catch(e){}},c=["light","dark"],l="(prefers-color-scheme: dark)",u="undefined"==typeof window,f=d.createContext(void 0),m={setTheme:function(e){},themes:[]},p=function(){var e;return null!=(e=d.useContext(f))?e:m},h=function(e){return d.useContext(f)?d.createElement(d.Fragment,null,e.children):d.createElement(y,(0,r._)({},e))},v=["light","dark"],y=function(e){var t=e.forcedTheme,n=e.disableTransitionOnChange,r=void 0!==n&&n,o=e.enableSystem,s=void 0===o||o,u=e.enableColorScheme,m=void 0===u||u,p=e.storageKey,h=void 0===p?"theme":p,y=e.themes,w=void 0===y?v:y,k=e.defaultTheme,C=void 0===k?s?"system":"light":k,S=e.attribute,T=void 0===S?"data-theme":S,I=e.value,j=e.children,x=e.nonce,A=e.scriptProps,L=(0,a._)(d.useState(function(){return E(h,C)}),2),O=L[0],M=L[1],H=(0,a._)(d.useState(function(){return"system"===O?_():O}),2),R=H[0],N=H[1],P=I?Object.values(I):w,U=d.useCallback(function(e){var t=e;if(t){"system"===e&&s&&(t=_());var n=I?I[t]:t,o=r?b(x):null,a=document.documentElement,d=function(e){var t;"class"===e?((t=a.classList).remove.apply(t,(0,i._)(P)),n&&a.classList.add(n)):e.startsWith("data-")&&(n?a.setAttribute(e,n):a.removeAttribute(e))};if(Array.isArray(T)?T.forEach(d):d(T),m){var l=c.includes(C)?C:null,u=c.includes(t)?t:l;a.style.colorScheme=u}null==o||o()}},[x]),D=d.useCallback(function(e){var t="function"==typeof e?e(O):e;M(t);try{localStorage.setItem(h,t)}catch(e){}},[O]),J=d.useCallback(function(e){N(_(e)),"system"===O&&s&&!t&&U("system")},[O,t]);d.useEffect(function(){var e=window.matchMedia(l);return e.addListener(J),J(e),function(){return e.removeListener(J)}},[J]),d.useEffect(function(){var e=function(e){e.key===h&&(e.newValue?M(e.newValue):D(C))};return window.addEventListener("storage",e),function(){return window.removeEventListener("storage",e)}},[D]),d.useEffect(function(){U(null!=t?t:O)},[t,O]);var K=d.useMemo(function(){return{theme:O,setTheme:D,forcedTheme:t,resolvedTheme:"system"===O?R:O,themes:s?(0,i._)(w).concat(["system"]):w,systemTheme:s?R:void 0}},[O,D,t,R,s,w]);return d.createElement(f.Provider,{value:K},d.createElement(g,{forcedTheme:t,storageKey:h,attribute:T,enableSystem:s,enableColorScheme:m,defaultTheme:C,value:I,themes:w,nonce:x,scriptProps:A}),j)},g=d.memo(function(e){var t=e.forcedTheme,n=e.storageKey,a=e.attribute,i=e.enableSystem,c=e.enableColorScheme,l=e.defaultTheme,u=e.value,f=e.themes,m=e.nonce,p=e.scriptProps,h=JSON.stringify([a,n,l,t,f,u,i,c]).slice(1,-1);return d.createElement("script",(0,o._)((0,r._)({},p),{suppressHydrationWarning:!0,nonce:"undefined"==typeof window?m:"",dangerouslySetInnerHTML:{__html:"(".concat(s.toString(),")(").concat(h,")")}}))}),E=function(e,t){var n;if(!u){try{n=localStorage.getItem(e)||void 0}catch(e){}return n||t}},b=function(e){var 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),function(){window.getComputedStyle(document.body),setTimeout(function(){document.head.removeChild(t)},1)}},_=function(e){return e||(e=window.matchMedia(l)),e.matches?"dar
1k":"light"}}}]);

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.