react-email 4.0.0-alpha.4 → 4.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/cli/index.js +1175 -2658
- package/dist/cli/index.mjs +18 -12
- package/dist/preview/.next/BUILD_ID +1 -1
- package/dist/preview/.next/app-build-manifest.json +31 -34
- package/dist/preview/.next/app-path-routes-manifest.json +6 -1
- package/dist/preview/.next/build-manifest.json +14 -14
- package/dist/preview/.next/cache/.rscinfo +1 -1
- package/dist/preview/.next/cache/webpack/client-production/0.pack +0 -0
- package/dist/preview/.next/cache/webpack/client-production/index.pack +0 -0
- package/dist/preview/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/dist/preview/.next/cache/webpack/server-production/0.pack +0 -0
- package/dist/preview/.next/cache/webpack/server-production/index.pack +0 -0
- package/dist/preview/.next/diagnostics/framework.json +1 -1
- package/dist/preview/.next/export-marker.json +6 -1
- package/dist/preview/.next/images-manifest.json +57 -1
- package/dist/preview/.next/next-minimal-server.js.nft.json +1 -1
- package/dist/preview/.next/next-server.js.nft.json +1 -1
- package/dist/preview/.next/prerender-manifest.json +41 -1
- package/dist/preview/.next/required-server-files.json +310 -1
- package/dist/preview/.next/routes-manifest.json +64 -1
- package/dist/preview/.next/server/app/_not-found/page.js +1 -1
- package/dist/preview/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/dist/preview/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/preview/.next/server/app/favicon.ico/route.js +1 -1
- package/dist/preview/.next/server/app/favicon.ico/route.js.nft.json +1 -1
- package/dist/preview/.next/server/app/page.js +1 -1
- package/dist/preview/.next/server/app/page.js.nft.json +1 -1
- package/dist/preview/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/preview/.next/server/app/preview/[...slug]/page.js +47 -10
- package/dist/preview/.next/server/app/preview/[...slug]/page.js.nft.json +1 -1
- package/dist/preview/.next/server/app/preview/[...slug]/page_client-reference-manifest.js +1 -1
- package/dist/preview/.next/server/app-paths-manifest.json +1 -1
- package/dist/preview/.next/server/chunks/171.js +14 -0
- package/dist/preview/.next/server/chunks/446.js +6 -0
- package/dist/preview/.next/server/chunks/600.js +8 -0
- package/dist/preview/.next/server/chunks/811.js +13 -0
- package/dist/preview/.next/server/chunks/833.js +1 -0
- package/dist/preview/.next/server/functions-config-manifest.json +4 -1
- package/dist/preview/.next/server/middleware-build-manifest.js +1 -1
- package/dist/preview/.next/server/next-font-manifest.js +1 -1
- package/dist/preview/.next/server/next-font-manifest.json +1 -1
- package/dist/preview/.next/server/pages/500.html +1 -1
- package/dist/preview/.next/server/pages/_app.js +1 -1
- package/dist/preview/.next/server/pages/_app.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/_document.js +1 -1
- package/dist/preview/.next/server/pages/_document.js.nft.json +1 -1
- package/dist/preview/.next/server/pages/_error.js +1 -1
- package/dist/preview/.next/server/pages/_error.js.nft.json +1 -1
- package/dist/preview/.next/server/pages-manifest.json +5 -1
- package/dist/preview/.next/server/server-reference-manifest.js +1 -1
- package/dist/preview/.next/server/server-reference-manifest.json +1 -1
- package/dist/preview/.next/server/webpack-runtime.js +1 -1
- package/dist/preview/.next/static/chunks/416-56f79fc7e689f06f.js +1 -0
- package/dist/preview/.next/static/chunks/683-8bbfd191e5105f01.js +1 -0
- package/dist/preview/.next/static/chunks/744-79730358b37b2212.js +1 -0
- package/dist/preview/.next/static/chunks/781-5f16c6bc9d9d4cc1.js +1 -0
- package/dist/preview/.next/static/chunks/832ad4be-cb988facfb8f955f.js +1 -0
- package/dist/preview/.next/static/chunks/87-38e35f08507de015.js +1 -0
- package/dist/preview/.next/static/chunks/{afa401a5-9ebf2515b1397993.js → afa401a5-3e949a1cfd317dd3.js} +3 -3
- package/dist/preview/.next/static/chunks/app/_not-found/page-09d694081cc9d4dc.js +1 -0
- package/dist/preview/.next/static/chunks/app/layout-a6640e62690d8fd6.js +1 -0
- package/dist/preview/.next/static/chunks/app/page-ba68f50b287e7478.js +1 -0
- package/dist/preview/.next/static/chunks/app/preview/[...slug]/page-4a5b026ab543e27f.js +1 -0
- package/dist/preview/.next/static/chunks/framework-c2bd6d936e3077bc.js +1 -0
- package/dist/preview/.next/static/chunks/main-44463a8301435b64.js +1 -0
- package/dist/preview/.next/static/chunks/main-app-c2e686acf8d370d7.js +1 -0
- package/dist/preview/.next/static/chunks/pages/_app-f3011d3f00bb8dba.js +1 -0
- package/dist/preview/.next/static/chunks/pages/_error-39a87dee2e97a2a3.js +1 -0
- package/dist/preview/.next/static/chunks/{webpack-9255716c9496e606.js → webpack-41e2667c9f086a4f.js} +1 -1
- package/dist/preview/.next/static/css/d7df9cfc3e182163.css +3 -0
- package/dist/preview/.next/static/gFk9UfWL8joM4iD7-wlKF/_buildManifest.js +1 -0
- package/dist/preview/.next/static/media/05613964ce6c782e-s.p.otf +0 -0
- package/dist/preview/.next/static/media/11c6126b9369e85e-s.p.otf +0 -0
- package/dist/preview/.next/static/media/26cb97734d8cb717-s.p.otf +0 -0
- package/dist/preview/.next/static/media/bb6462617151f6b7-s.p.otf +0 -0
- package/dist/preview/.next/static/media/cf6daef822ab0142-s.p.otf +0 -0
- package/dist/preview/.next/static/media/e4051546b3043204-s.p.otf +0 -0
- package/dist/preview/.next/trace +26 -22
- package/dist/preview/.next/types/cache-life.d.ts +3 -3
- package/package.json +17 -11
- package/scripts/build-preview-server.mjs +32 -0
- package/scripts/fill-caniemail-data.mjs +36 -0
- package/src/actions/email-validation/caniemail-data.ts +85993 -0
- package/src/actions/email-validation/check-compatibility.ts +322 -0
- package/src/actions/email-validation/check-images.spec.tsx +21 -12
- package/src/actions/email-validation/check-images.ts +88 -86
- package/src/actions/email-validation/check-links.spec.tsx +24 -14
- package/src/actions/email-validation/check-links.ts +59 -56
- package/src/actions/get-email-path-from-slug.ts +1 -1
- package/src/actions/render-email-by-path.tsx +2 -1
- package/src/{utils/emails-directory-absolute-path.ts → app/env.ts} +2 -0
- package/src/app/fonts/SFMono/SFMonoBold.otf +0 -0
- package/src/app/fonts/SFMono/SFMonoBoldItalic.otf +0 -0
- package/src/app/fonts/SFMono/SFMonoHeavy.otf +0 -0
- package/src/app/fonts/SFMono/SFMonoHeavyItalic.otf +0 -0
- package/src/app/fonts/SFMono/SFMonoLight.otf +0 -0
- package/src/app/fonts/SFMono/SFMonoLightItalic.otf +0 -0
- package/src/app/fonts/SFMono/SFMonoMedium.otf +0 -0
- package/src/app/fonts/SFMono/SFMonoMediumItalic.otf +0 -0
- package/src/app/fonts/SFMono/SFMonoRegular.otf +0 -0
- package/src/app/fonts/SFMono/SFMonoRegularItalic.otf +0 -0
- package/src/app/fonts/SFMono/SFMonoSemibold.otf +0 -0
- package/src/app/fonts/SFMono/SFMonoSemiboldItalic.otf +0 -0
- package/src/app/fonts.ts +39 -0
- package/src/app/layout.tsx +6 -3
- package/src/app/page.tsx +4 -4
- package/src/app/preview/[...slug]/page.tsx +73 -16
- package/src/app/preview/[...slug]/preview.tsx +49 -77
- package/src/components/code.tsx +0 -1
- package/src/components/icons/icon-base.tsx +4 -2
- package/src/components/icons/icon-reload.tsx +19 -0
- package/src/components/icons/icon-scanner.tsx +19 -0
- package/src/components/icons/icon-scissors.tsx +19 -0
- package/src/components/icons/icon-warning.tsx +31 -0
- package/src/components/send.tsx +1 -2
- package/src/components/shell.tsx +52 -88
- package/src/components/sidebar/file-tree-directory-children.tsx +1 -1
- package/src/components/sidebar/file-tree.tsx +1 -1
- package/src/components/sidebar/sidebar.tsx +23 -378
- package/src/components/toolbar/linter.tsx +310 -0
- package/src/components/toolbar/results-table.tsx +0 -0
- package/src/components/toolbar/results.tsx +48 -0
- package/src/components/toolbar/spam-assassin.tsx +144 -0
- package/src/components/toolbar/toolbar-button.tsx +50 -0
- package/src/components/toolbar/use-cached-state.ts +33 -0
- package/src/components/toolbar.tsx +197 -0
- package/src/components/tooltip-content.tsx +1 -2
- package/src/components/topbar/view-size-controls.tsx +1 -0
- package/src/components/topbar.tsx +29 -48
- package/src/contexts/emails.tsx +2 -1
- package/src/contexts/preview.tsx +81 -0
- package/src/hooks/use-email-rendering-result.ts +2 -1
- package/src/utils/__snapshots__/get-email-component.spec.ts.snap +1 -1
- package/src/utils/caniemail/all-css-properties.ts +358 -0
- package/src/utils/caniemail/ast/get-object-variables.ts +61 -0
- package/src/utils/caniemail/ast/get-used-style-properties.ts +91 -0
- package/src/utils/caniemail/get-compatibility-stats-for-entry.ts +118 -0
- package/src/utils/caniemail/get-css-functions.ts +25 -0
- package/src/utils/caniemail/get-css-property-names.ts +32 -0
- package/src/utils/caniemail/get-css-property-with-value.ts +14 -0
- package/src/utils/caniemail/get-css-unit.ts +3 -0
- package/src/utils/caniemail/get-element-attributes.ts +7 -0
- package/src/utils/caniemail/get-element-names.ts +20 -0
- package/src/utils/caniemail/tailwind/generate-tailwind-rules.ts +30 -0
- package/src/utils/caniemail/tailwind/get-tailwind-config.ts +205 -0
- package/src/utils/caniemail/tailwind/get-tailwind-metadata.spec.ts +25 -0
- package/src/utils/caniemail/tailwind/get-tailwind-metadata.ts +45 -0
- package/src/utils/caniemail/tailwind/setup-tailwind-context.ts +15 -0
- package/src/utils/get-email-component.ts +34 -67
- package/src/utils/linting.ts +85 -0
- package/src/utils/result.ts +49 -0
- package/src/utils/run-bundled-code.ts +64 -0
- package/tailwind-internals.d.ts +133 -0
- package/tailwind.config.ts +1 -0
- package/tsconfig.json +9 -3
- package/build-preview-server.mjs +0 -25
- package/dist/preview/.next/server/chunks/196.js +0 -5
- package/dist/preview/.next/server/chunks/300.js +0 -13
- package/dist/preview/.next/server/chunks/631.js +0 -6
- package/dist/preview/.next/server/chunks/644.js +0 -1
- package/dist/preview/.next/server/chunks/734.js +0 -15
- package/dist/preview/.next/static/Pt6wqIrWnQxbiyqaKNFOx/_buildManifest.js +0 -1
- package/dist/preview/.next/static/chunks/285-dbf6306a0d45c33d.js +0 -1
- package/dist/preview/.next/static/chunks/447-886131c35ca42b91.js +0 -1
- package/dist/preview/.next/static/chunks/490-d5745684930d49e0.js +0 -1
- package/dist/preview/.next/static/chunks/5fec7a0a-5179023f3f5a9421.js +0 -1
- package/dist/preview/.next/static/chunks/603-36207c8905355e23.js +0 -1
- package/dist/preview/.next/static/chunks/797-46f6c20952f0a280.js +0 -2
- package/dist/preview/.next/static/chunks/app/_not-found/page-96d3eac723be3ee2.js +0 -1
- package/dist/preview/.next/static/chunks/app/layout-d06046b8a368df3b.js +0 -1
- package/dist/preview/.next/static/chunks/app/page-ef1c23b954fbd0b5.js +0 -1
- package/dist/preview/.next/static/chunks/app/preview/[...slug]/page-ea8e1ae2b5a4a0ec.js +0 -1
- package/dist/preview/.next/static/chunks/framework-e7cae9cecd5c9ba2.js +0 -1
- package/dist/preview/.next/static/chunks/main-app-9f2fb5ea26e2765b.js +0 -1
- package/dist/preview/.next/static/chunks/main-df761fde212f9cda.js +0 -1
- package/dist/preview/.next/static/chunks/pages/_app-203a61b355820ccf.js +0 -1
- package/dist/preview/.next/static/chunks/pages/_error-1764ca54938748c8.js +0 -1
- package/dist/preview/.next/static/css/e4822d5ba3082a95.css +0 -3
- package/dist/preview/.next/static/css/ec5d7e66bd3b6cb8.css +0 -1
- package/src/app/inter.ts +0 -7
- package/src/components/icons/icon-circle-check.tsx +0 -21
- package/src/components/icons/icon-circle-close.tsx +0 -17
- package/src/components/icons/icon-circle-warning.tsx +0 -17
- package/src/components/sidebar/image-checker.tsx +0 -162
- package/src/components/sidebar/link-checker.tsx +0 -151
- package/src/components/sidebar/spam-assassin.tsx +0 -158
- /package/dist/preview/.next/static/{Pt6wqIrWnQxbiyqaKNFOx → gFk9UfWL8joM4iD7-wlKF}/_ssgManifest.js +0 -0
- /package/src/components/{sidebar → toolbar}/checking-results.tsx +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[492],{3149:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let l=r(9842),n=r(5774);function o(){return(0,l.jsx)(n.HTTPAccessErrorFallback,{status:404,message:"This page could not be found."})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4357:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/_not-found/page",function(){return r(3149)}])},5774:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HTTPAccessErrorFallback",{enumerable:!0,get:function(){return o}}),r(5692);let l=r(9842);r(730);let n={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{display:"inline-block"},h1:{display:"inline-block",margin:"0 20px 0 0",padding:"0 23px 0 0",fontSize:24,fontWeight:500,verticalAlign:"top",lineHeight:"49px"},h2:{fontSize:14,fontWeight:400,lineHeight:"49px",margin:0}};function o(e){let{status:t,message:r}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("title",{children:t+": "+r}),(0,l.jsx)("div",{style:n.error,children:(0,l.jsxs)("div",{children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}),(0,l.jsx)("h1",{className:"next-error-h1",style:n.h1,children:t}),(0,l.jsx)("div",{style:n.desc,children:(0,l.jsx)("h2",{style:n.h2,children:r})})]})})]})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},e=>{var t=t=>e(e.s=t);e.O(0,[860,781,358],()=>t(4357)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[177],{372:e=>{e.exports={style:{fontFamily:"'Inter', 'Inter Fallback'",fontStyle:"normal"},className:"__className_d65c78",variable:"__variable_d65c78"}},2009:(e,t,a)=>{"use strict";a.d(t,{a:()=>i});var r=a(730),l=a(9487);let i=e=>{let t=(0,r.useRef)(null);(0,r.useEffect)(()=>{t.current||(t.current=(0,l.io)());let a=t.current;return a.on("reload",t=>{console.debug("Reloading..."),e(t)}),()=>{a.off()}},[e])}},6427:(e,t,a)=>{Promise.resolve().then(a.t.bind(a,6665,23)),Promise.resolve().then(a.t.bind(a,372,23)),Promise.resolve().then(a.t.bind(a,9687,23)),Promise.resolve().then(a.bind(a,6691))},6665:()=>{},6691:(e,t,a)=>{"use strict";a.d(t,{EmailsProvider:()=>_,J:()=>d});var r=a(9842),l=a(730),i=a(326);let o=(0,i.createServerReference)("7f1e597e2c34f308d1c653d80ad406af0454e4eb72",i.callServer,void 0,i.findSourceMapURL,"getEmailsDirectoryMetadataAction");var s=a(7352),n=a(2009);let c=(0,l.createContext)(void 0),d=()=>{let e=(0,l.useContext)(c);if(void 0===e)throw Error("Cannot call `useEmail()` outside of an EmailsContext provider!");return e},_=e=>{let[t,a]=(0,l.useState)(e.initialEmailsDirectoryMetadata);return s.Hf||(0,n.a)(async()=>{let t=await o(e.initialEmailsDirectoryMetadata.absolutePath);if(t)a(t);else throw Error("Hot reloading: unable to find the emails directory to update the sidebar")}),(0,r.jsx)(c.Provider,{value:{emailsDirectoryMetadata:t},children:e.children})}},7352:(e,t,a)=>{"use strict";a.d(t,{Hf:()=>l});var r=a(320);r.env.EMAILS_DIR_RELATIVE_PATH,r.env.USER_PROJECT_LOCATION,r.env.EMAILS_DIR_ABSOLUTE_PATH;let l="true"===r.env.NEXT_PUBLIC_IS_BUILDING},9687:e=>{e.exports={style:{fontFamily:"'sfMono', 'sfMono Fallback'"},className:"__className_a0e4c0",variable:"__variable_a0e4c0"}}},e=>{var t=t=>e(e.s=t);e.O(0,[425,744,860,781,358],()=>t(6427)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{558:(e,s,n)=>{Promise.resolve().then(n.t.bind(n,9811,23)),Promise.resolve().then(n.t.bind(n,1412,23)),Promise.resolve().then(n.bind(n,3700)),Promise.resolve().then(n.bind(n,6987)),Promise.resolve().then(n.bind(n,382)),Promise.resolve().then(n.bind(n,4181)),Promise.resolve().then(n.bind(n,2739))}},e=>{var s=s=>e(e.s=s);e.O(0,[486,744,87,416,860,781,358],()=>s(558)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[719],{1668:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,9811,23)),Promise.resolve().then(r.t.bind(r,1412,23)),Promise.resolve().then(r.bind(r,3700)),Promise.resolve().then(r.bind(r,8277)),Promise.resolve().then(r.bind(r,6987)),Promise.resolve().then(r.bind(r,382)),Promise.resolve().then(r.bind(r,4181)),Promise.resolve().then(r.bind(r,4914)),Promise.resolve().then(r.bind(r,2739)),Promise.resolve().then(r.bind(r,4106))},4106:(e,t,r)=>{"use strict";r.d(t,{o:()=>x,PreviewProvider:()=>p});var a=r(9842),s=r(8804),n=r(730),l=r(7352),o=r(326);let i=(0,o.createServerReference)("7f6f5354c018120ec501a1efdb1fbe905540f7f08e",o.callServer,void 0,o.findSourceMapURL,"getEmailPathFromSlug"),c=(0,o.createServerReference)("7f6be10b8485889f5d9271fa93d146a75daf4627dc",o.callServer,void 0,o.findSourceMapURL,"renderEmailByPath");var d=r(2009);let u=(e,t)=>{let[r,a]=(0,n.useState)(t);return l.Hf||(0,d.a)(async t=>{for await(let r of t){let t=r.filename,s=await i(t),n=await c(s,!0);s===e&&a(n)}}),r},h={},m=(e,t,r)=>((0,n.useEffect)(()=>{"markup"in t?h[e]=t:void 0!==r&&"markup"in r&&void 0===h[e]&&(h[e]=r)},[t,e,r]),"error"in t?h[e]:t),x=(0,n.createContext)(void 0),p=e=>{let{emailSlug:t,emailPath:r,serverRenderingResult:n,children:o}=e,i=(0,s.useRouter)(),c=u(r,n),h=m(r,c,n);return l.Hf||(0,d.a)(e=>{let r=e.find(e=>e.filename.includes(t));void 0!==r&&"unlink"===r.event&&i.push("/")}),(0,a.jsx)(x.Provider,{value:{emailPath:r,emailSlug:t,renderedEmailMetadata:h,renderingResult:c},children:o})}},4914:(e,t,r)=>{"use strict";r.d(t,{Toolbar:()=>V});var a=r(9842),s=r(5936),n=r(3029),l=r(8804),o=r(730),i=r(7352),c=r(4106),d=r(75),u=r(2855);let h=e=>(0,a.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.52 6C10.52 3.73168 8.75221 1.48 6.00006 1.48C3.77741 1.48 2.67886 3.1251 2.21074 3.99999H3.60005C3.82096 3.99999 4.00005 4.17908 4.00005 4.39999C4.00005 4.6209 3.82096 4.79999 3.60005 4.79999H1.20005C0.979137 4.79999 0.800049 4.6209 0.800049 4.39999V1.99999C0.800049 1.77908 0.979137 1.59999 1.20005 1.59999C1.42096 1.59999 1.60005 1.77908 1.60005 1.99999V3.45056C2.16367 2.45702 3.4673 0.679993 6.00006 0.679993C9.25029 0.679993 11.32 3.34831 11.32 6C11.32 8.65169 9.25029 11.32 6.00006 11.32C4.44499 11.32 3.15027 10.7047 2.22843 9.76673C1.73486 9.26449 1.34939 8.67121 1.08658 8.03257C1.0025 7.8283 1.09995 7.59453 1.30424 7.51046C1.50853 7.42638 1.7423 7.52384 1.82637 7.72812C2.05104 8.27401 2.38001 8.77961 2.79901 9.20593C3.57646 9.99705 4.66802 10.52 6.00006 10.52C8.75221 10.52 10.52 8.26833 10.52 6Z",fill:"currentColor"})}),m=e=>(0,a.jsx)("svg",{width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.5 1.5C1.22386 1.5 1 1.72386 1 2V8C1 8.27614 1.22386 8.5 1.5 8.5H11.5C11.7761 8.5 12 8.27614 12 8V2C12 1.72386 11.7761 1.5 11.5 1.5H1.5ZM0 8C0 8.6531 0.4174 9.2087 1 9.4146V10C1 10.8284 1.67157 11.5 2.5 11.5H10.5C11.3284 11.5 12 10.8284 12 10V9.4146C12.5826 9.2087 13 8.6531 13 8V2C13 1.17157 12.3284 0.5 11.5 0.5H1.5C0.67157 0.5 0 1.17157 0 2V8ZM11 10V9.5H2V10C2 10.2761 2.22386 10.5 2.5 10.5H10.5C10.7761 10.5 11 10.2761 11 10ZM4.5 4.5C4.22386 4.5 4 4.72386 4 5C4 5.27614 4.22386 5.5 4.5 5.5H8.5C8.77614 5.5 9 5.27614 9 5C9 4.72386 8.77614 4.5 8.5 4.5H4.5Z",fill:"currentColor"})}),x=e=>(0,a.jsx)("svg",{width:"12",height:"10",viewBox:"0 0 12 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.760039 2.58762C0.760039 3.27246 1.31521 3.82762 2.00004 3.82762C2.68487 3.82762 3.24004 3.27246 3.24004 2.58762C3.24004 1.90278 2.68487 1.34762 2.00004 1.34762C1.31521 1.34762 0.760039 1.90278 0.760039 2.58762ZM2.00004 4.54762C0.917561 4.54762 0.0400391 3.6701 0.0400391 2.58762C0.0400391 1.50514 0.917561 0.627625 2.00004 0.627625C3.08252 0.627625 3.96004 1.50514 3.96004 2.58762C3.96004 2.84649 3.90986 3.09364 3.81868 3.31986L4.58929 3.83529C4.58359 3.85323 4.5782 3.8713 4.57313 3.88949L4.45035 4.32947L4.16809 4.51817L3.37248 3.98691C3.0189 4.33374 2.53445 4.54762 2.00004 4.54762ZM0.760042 7.39998C0.760042 6.71514 1.31521 6.15997 2.00004 6.15997C2.68487 6.15997 3.24004 6.71514 3.24004 7.39998C3.24004 8.08478 2.68487 8.63999 2.00004 8.63999C1.31521 8.63999 0.760042 8.08478 0.760042 7.39998ZM2.00004 5.43997C0.917561 5.43997 0.0400415 6.31749 0.0400415 7.39998C0.0400415 8.48246 0.917561 9.35998 2.00004 9.35998C3.08252 9.35998 3.96004 8.48246 3.96004 7.39998C3.96004 7.14422 3.91106 6.89996 3.82199 6.67598L12 1.20588L11.2389 1.28588C10.1662 1.39862 9.12733 1.72714 8.18485 2.25167L5.72522 3.6205C5.5385 3.72441 5.40112 3.8987 5.34369 4.10451L5.14127 4.82988L3.37954 6.00764C3.02538 5.65671 2.53802 5.43997 2.00004 5.43997ZM5.71553 6.3719L5.72522 6.37739L8.18485 7.74622C9.12733 8.27071 10.1662 8.59927 11.2389 8.71199L12 8.79198L7.04863 5.48022L5.71553 6.3719Z",fill:"currentColor"})});var p=r(8295);let g={family:{gmail:"Gmail",outlook:"Outlook",yahoo:"Yahoo! Mail","apple-mail":"Apple Mail",aol:"AOL",thunderbird:"Mozilla Thunderbird",microsoft:"Microsoft","samsung-email":"Samsung Email",sfr:"SFR",orange:"Orange",protonmail:"ProtonMail",hey:"HEY","mail-ru":"Mail.ru",fastmail:"Fastmail",laposte:"LaPoste.net","t-online-de":"T-online.de","free-fr":"Free.fr",gmx:"GMX","web-de":"WEB.DE","ionos-1and1":"1&1",rainloop:"RainLoop","wp-pl":"WP.pl"}};var f=r(326);let v=(0,f.createServerReference)("7ff7cbf079981d6da914c47609f61f4dd892541012",f.callServer,void 0,f.findSourceMapURL,"checkCompatibility"),b=(0,f.createServerReference)("7f4f469e63c7b002aa6df5fe0f33a658ef72c07c8d",f.callServer,void 0,f.findSourceMapURL,"checkImages"),j=(0,f.createServerReference)("7f3d1c67f0ee13b6f321982360f6f82e4f11bae59e",f.callServer,void 0,f.findSourceMapURL,"checkLinks");async function*w(e){for await(let t of e){let e=(await t.getStream()).getReader();try{for(;;){let{value:r,done:a}=await e.read();if(a)break;let s=t.mapValue(r);s&&(yield s)}}finally{e.releaseLock()}}}let C=e=>(0,a.jsxs)("svg",{width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,a.jsx)("path",{d:"M10.8777 8.99999L6.87766 1.99999C6.79044 1.84609 6.66396 1.71808 6.51112 1.62902C6.35828 1.53997 6.18455 1.49304 6.00766 1.49304C5.83077 1.49304 5.65704 1.53997 5.5042 1.62902C5.35136 1.71808 5.22488 1.84609 5.13766 1.99999L1.13766 8.99999C1.0495 9.15267 1.00327 9.32594 1.00366 9.50224C1.00405 9.67855 1.05105 9.85161 1.13988 10.0039C1.22872 10.1562 1.35623 10.2823 1.50951 10.3694C1.66278 10.4565 1.83636 10.5016 2.01266 10.5H10.0127C10.1881 10.4998 10.3604 10.4535 10.5123 10.3656C10.6642 10.2778 10.7903 10.1515 10.8779 9.99955C10.9656 9.84756 11.0117 9.67518 11.0116 9.49973C11.0116 9.32428 10.9654 9.15193 10.8777 8.99999Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M6.0127 4.5V6.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,a.jsx)("path",{d:"M6.0127 8.5H6.01853",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]});C.displayName="IconCircleWarning";let y=e=>{let{children:t,className:r,...s}=e;return(0,a.jsx)("table",{className:(0,d.cn)("group relative w-full border-collapse text-left text-slate-10 text-xs",r),children:(0,a.jsx)("tbody",{children:t})})};y.Row=e=>{let{children:t,className:r,...s}=e;return(0,a.jsx)("tr",{className:(0,d.cn)("border-collapse align-bottom border-slate-6 border-b",r),...s,children:t})},y.Column=e=>{let{children:t,className:r,...s}=e;return(0,a.jsx)("td",{className:(0,d.cn)("py-1 align-bottom font-medium",r),...s,children:t})};let k=e=>{let{markup:t,reactMarkup:a,emailPath:s,initialRows:n}=e,[l,i]=(0,o.useState)(n),c=function(e,t,r,a){return[{getStream:()=>b(e,a),mapValue(e){if(e&&"success"!==e.status)return{result:e,source:"image"}}},{getStream:()=>j(e),mapValue(e){if(e&&"success"!==e.status)return{result:e,source:"link"}}},{getStream:()=>v(t,r),mapValue(e){if(e&&"success"!==e.status)return{result:e,source:"compatibility"}}}]}(t,a,s,"location"in r.g?"".concat(r.g.location.protocol,"//").concat(r.g.location.host):""),[d,u]=(0,o.useState)(!1),h=(0,o.useRef)(!1);return[l,{loading:d,load:async()=>{if(!h.current){h.current=!0,u(!0),i([]);try{let e=[];for await(let t of w(c))i(r=>{if(!r)return[t];let a=[...r,t];return a.sort((e,t)=>"error"===e.result.status&&"warning"===t.result.status?-1:+("warning"===e.result.status&&"error"===t.result.status)),e=a,a});return e}finally{u(!1),h.current=!1}}}}]},N=e=>{let{rows:t}=e;return void 0===t?null:(0,a.jsx)(y,{children:t.map((e,t)=>{if("link"===e.source){let r=e.result.checks.find(e=>!1===e.passed);return(0,a.jsxs)(S,{status:e.result.status,children:[(0,a.jsx)(S.Name,{children:r.type}),(0,a.jsxs)(S.Description,{children:["security"===r.type?"Insecure URL, use HTTPS insted of HTTP":null,"fetch_attempt"===r.type&&r.metadata.fetchStatusCode&&r.metadata.fetchStatusCode>=300&&r.metadata.fetchStatusCode<400?"There was a redirect, the content may have been moved":null,"fetch_attempt"===r.type&&r.metadata.fetchStatusCode&&r.metadata.fetchStatusCode>=400?"The link is broken":null,"syntax"===r.type?"The link is broken due to invalid syntax":null,(0,a.jsx)("span",{className:"font-mono float-right text-ellipsis overflow-hidden text-nowrap max-w-[30ch]",children:e.result.link})]}),(0,a.jsx)(S.Metadata,{children:"fetch_attempt"===r.type?r.metadata.fetchStatusCode:""})]},t)}if("compatibility"===e.source){let r=Object.entries(e.result.statsPerEmailClient).filter(e=>{let[,t]=e;return"error"===t.status}),s=Object.entries(e.result.statsPerEmailClient).filter(e=>{let[,t]=e;return"warning"===t.status}),n=r.map(e=>{let[t]=e;return g.family[t]}).join(", "),l=s.map(e=>{let[t]=e;return g.family[t]}).join(", ");return(0,a.jsxs)(S,{status:e.result.status,children:[(0,a.jsx)(S.Name,{children:e.result.entry.title}),(0,a.jsxs)(S.Description,{children:[r.length>0?"Not supported in ".concat(n):null,s.length>0&&r.length>0?". ":null,s.length>0?"Partially supported in ".concat(l):null]}),(0,a.jsxs)(S.Metadata,{children:[e.result.location.start.line.toString().padStart(2,"0"),":",e.result.location.start.column.toString().padStart(2,"0"),(0,a.jsx)("a",{href:e.result.entry.url,className:"underline ml-2",rel:"noreferrer",target:"_blank",children:"See more info"})]})]},t)}if("image"===e.source){let r=e.result.checks.find(e=>!1===e.passed);return(0,a.jsxs)(S,{status:e.result.status,children:[(0,a.jsx)(S.Name,{children:r.type}),(0,a.jsxs)(S.Description,{children:["security"===r.type?"Insecure URL, use HTTPS insted of HTTP":null,"fetch_attempt"===r.type&&r.metadata.fetchStatusCode&&r.metadata.fetchStatusCode>=300&&r.metadata.fetchStatusCode<400?"There was a redirect, the image may have been moved":null,"fetch_attempt"===r.type&&r.metadata.fetchStatusCode&&r.metadata.fetchStatusCode>=400?"The image is broken":null,"syntax"===r.type?"The image is broken due to an invalid source":null,"accessibility"===r.type?"Missing alt text":null,"image_size"===r.type&&r.metadata.byteCount?"This image is too large, keep it under 1mb":null,(0,a.jsx)("span",{className:"font-mono float-right text-ellipsis overflow-hidden text-nowrap max-w-[30ch]",children:e.result.source})]}),(0,a.jsx)(S.Metadata,{children:e.result.checks.map(e=>"fetch_attempt"===e.type&&e.metadata.fetchStatusCode?e.metadata.fetchStatusCode:"image_size"===e.type&&e.metadata.byteCount?(0,p.A)(e.metadata.byteCount):void 0).filter(Boolean).join("—")})]},t)}})})},S=e=>{let{children:t,className:r,status:s,...n}=e;return(0,a.jsx)(y.Row,{"data-status":s,...n,className:(0,d.cn)("group/result",r),children:t})};S.Name=e=>{let{children:t,...r}=e;return(0,a.jsx)(y.Column,{...r,children:(0,a.jsxs)("span",{className:"flex uppercase gap-1 items-center group-data-[status=error]/result:text-red-400 group-data-[status=warning]/result:text-orange-300",children:[(0,a.jsx)(C,{}),t]})})},S.Description=e=>{let{children:t,className:r,...s}=e;return(0,a.jsx)(y.Column,{...s,children:t})},S.Metadata=e=>{let{children:t,className:r,...s}=e;return(0,a.jsx)(y.Column,{align:"right",...s,className:(0,d.cn)("font-mono text-slate-11",r),children:t})};var L=r(4180);let M=e=>{let{markup:t,plainText:r,initialResult:a}=e,[s,n]=(0,o.useState)(a),[l,i]=(0,o.useState)(!1),c=(0,o.useRef)(!1);return[s,{loading:l,load:async()=>{if(!c.current){c.current=!0,i(!0);try{let e=await fetch("https://react.email/api/check-spam",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({html:t,plainText:r})}),a=await e.json();if(!("error"in a))return n(a),a;L.oR.error(a.error)}catch(e){console.error(e),L.oR.error(JSON.stringify(e))}finally{i(!1),c.current=!1}}}}]},R=e=>{let{result:t}=e;return(0,a.jsx)(a.Fragment,{children:t?(0,a.jsxs)(y,{children:[(0,a.jsxs)(y.Row,{className:"sticky border-b-2 top-0 bg-black",children:[(0,a.jsx)(y.Column,{className:"uppercase",children:(0,a.jsxs)("span",{className:"flex gap-1 items-center",children:[(0,a.jsx)(C,{className:(0,d.cn)(t.points>1.5?"text-yellow-200":null,t.points>3?"text-orange-300":null,t.points>=5?"text-red-400":null)}),"Score"]})}),(0,a.jsx)(y.Column,{children:"Lower scores are better"}),(0,a.jsx)(y.Column,{className:(0,d.cn)("text-right text-2xl tracking-tighter font-mono",t.points>1.5?"text-yellow-200":null,t.points>3?"text-orange-300":null,t.points>=5?"text-red-400":null),children:t.points.toFixed(1)})]}),(function(e,t){let r=[...e];return r.sort(t),r})(t.checks,(e,t)=>t.points-e.points).map(e=>(0,a.jsxs)(y.Row,{children:[(0,a.jsx)(y.Column,{className:"uppercase",children:(0,a.jsxs)("span",{className:"flex gap-1 items-center",children:[(0,a.jsx)(C,{className:(0,d.cn)(e.points>1?"text-yellow-200":null,e.points>2?"text-orange-300":null,e.points>3?"text-red-400":null)}),e.name]})}),(0,a.jsx)(y.Column,{children:e.description}),(0,a.jsx)(y.Column,{className:(0,d.cn)("text-right font-mono tracking-tighter",e.points>1?"text-yellow-200":null,e.points>2?"text-orange-300":null,e.points>3?"text-red-400":null),children:e.points.toFixed(1)})]},e.name))]}):null})};var P=r(3468),H=r(699);let E=e=>{let{children:t,className:r,active:s,tooltip:n,...l}=e;return(0,a.jsx)(H.m.Provider,{children:(0,a.jsxs)(H.m,{children:[(0,a.jsx)(H.m.Trigger,{asChild:!0,children:(0,a.jsxs)("button",{type:"button",...l,className:(0,d.cn)("h-full w-fit font-medium flex text-sm text-slate-10 items-center align-middle justify-center px-1 py-2 gap-1 relative","hover:text-slate-12 transition-colors",s&&"data-[state=active]:text-cyan-11",r),children:[t,s?(0,a.jsx)(P.P.span,{className:"-bottom-px absolute rounded-sm left-0 w-full bg-cyan-11 h-px",layoutId:"active-toolbar-button",transition:{type:"spring",bounce:.2,duration:.6}}):null]})}),n?(0,a.jsx)(H.m.Content,{children:n}):null]})})},T=e=>{let t;if("localStorage"in r.g){let a=r.g.localStorage.getItem(e);if(null!==a)try{t=JSON.parse(a)}catch(r){console.warn("Failed to load stored value for",e,"with value",t)}}return[(0,o.useSyncExternalStore)(()=>()=>{},()=>t,()=>void 0),function(t){"localStorage"in r.g&&r.g.localStorage.setItem(e,JSON.stringify(t))}]},I=e=>{var t;let{serverLintingRows:r,serverSpamCheckingResult:c,markup:p,reactMarkup:g,plainText:f,emailPath:v,emailSlug:b}=e,j=(0,l.usePathname)(),w=(0,l.useSearchParams)(),C=(0,l.useRouter)(),y=null!==(t=w.get("toolbar-panel"))&&void 0!==t?t:void 0,S=e=>{let t=new URLSearchParams(w);void 0===e?t.delete("toolbar-panel"):t.set("toolbar-panel",e),C.push("".concat(j,"?").concat(t.toString()))},[L,P]=T("spam-assassin-".concat(b.replaceAll("/","-"))),[H,{load:I}]=M({markup:p,plainText:f,initialResult:null!=c?c:L}),[V,D]=T("linter-".concat(b.replaceAll("/","-"))),[z,{load:F}]=k({reactMarkup:g,emailPath:v,markup:p,initialRows:null!=r?r:V});return i.Hf||(0,o.useEffect)(()=>{(async()=>{D(await F()),P(await I())})()},[]),(0,a.jsx)("div",{"data-toggled":void 0!==y,className:(0,d.cn)("bg-black group/toolbar text-xs text-slate-11 h-48 transition-all","data-[toggled=false]:h-8"),children:(0,a.jsx)(s.bL,{value:y,onValueChange:e=>{S(e)},asChild:!0,children:(0,a.jsxs)("div",{className:"flex flex-col h-full",children:[(0,a.jsxs)(s.B8,{className:"flex gap-4 px-2 border-b border-solid border-slate-6 h-7 w-full",children:[(0,a.jsxs)(n.o,{id:"toolbar",children:[(0,a.jsx)(s.l9,{asChild:!0,value:"spam-assassin",children:(0,a.jsxs)(E,{active:"spam-assassin"===y,children:[(0,a.jsx)(x,{}),"Spam Assassin"]})}),(0,a.jsx)(s.l9,{asChild:!0,value:"linter",children:(0,a.jsxs)(E,{active:"linter"===y,children:[(0,a.jsx)(m,{}),"Linter"]})})]}),(0,a.jsxs)("div",{className:"flex gap-1 ml-auto",children:[i.Hf?null:(0,a.jsx)(E,{tooltip:"Reload",onClick:async()=>{void 0===y&&S("linter"),"spam-assassin"===y?await I():await F()},children:(0,a.jsx)(h,{})}),(0,a.jsx)(E,{tooltip:"Toggle toolbar",onClick:()=>{void 0===y?S("linter"):S(void 0)},children:(0,a.jsx)(u.R,{className:"transition-transform group-data-[toggled=false]/toolbar:rotate-180"})})]})]}),(0,a.jsxs)("div",{className:"flex-grow transition-opacity opacity-100 group-data-[toggled=false]/toolbar:opacity-0 overflow-y-auto px-2",children:[(0,a.jsx)(s.UC,{value:"linter",children:(0,a.jsx)(N,{rows:z})}),(0,a.jsx)(s.UC,{value:"spam-assassin",children:(0,a.jsx)(R,{result:H})})]})]})})})},V=e=>{let{serverLintingRows:t,serverSpamCheckingResult:r}=e,{emailPath:s,emailSlug:n,renderedEmailMetadata:l}=(0,o.use)(c.o);if(void 0===l)return null;let{markup:i,plainText:d,reactMarkup:u}=l;return(0,a.jsx)(I,{emailPath:s,emailSlug:n,markup:i,reactMarkup:u,plainText:d,serverLintingRows:t,serverSpamCheckingResult:r})}},8277:(e,t,r)=>{"use strict";r.d(t,{default:()=>$});var a=r(9842),s=r(8804),n=r(730),l=r(3063),o=r(4180),i=r(7537),c=r(6987),d=r(3591),u=r(75);let h={plain:{color:"#EDEDEF",fontSize:13,fontFamily:"MonoLisa, Menlo, monospace"},styles:[{types:["comment"],style:{color:"#706F78"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#7E7D86"}},{types:["punctuation","operator"],style:{color:"#706F78"}},{types:["class-name","function","tag","key-white"],style:{color:"#EDEDEF"}}]},m=e=>{let{children:t,language:r="html"}=e,s=t.trim();return(0,a.jsx)(d.f4,{code:s,language:r,theme:h,children:e=>{let{tokens:t,getLineProps:s,getTokenProps:l}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"absolute right-0 top-0 h-px w-[200px]",style:{background:"linear-gradient(90deg, rgba(56, 189, 248, 0) 0%, rgba(56, 189, 248, 0) 0%, rgba(232, 232, 232, 0.2) 33.02%, rgba(143, 143, 143, 0.6719) 64.41%, rgba(236, 72, 153, 0) 98.93%)"}}),(0,a.jsx)("pre",{className:"h-[650px] overflow-auto p-4",children:t.map((e,o)=>{let i=s({line:e,key:o});return(0,n.createElement)("div",{...i,className:(0,u.cn)("whitespace-pre",{"before:mr-2 before:text-slate-11 before:content-['$']":"bash"===r&&1===t.length}),key:o},e.map((t,r)=>{var s;let o=l({token:t}),i="from"===t.content&&(null===(s=e[r+1])||void 0===s?void 0:s.content)===":"?[...t.types,"key-white"]:t.types;return t.types=i,(0,a.jsx)(n.Fragment,{children:(0,a.jsx)("span",{...o})},r)}))})}),(0,a.jsx)("div",{className:"absolute bottom-0 left-0 h-px w-[200px]",style:{background:"linear-gradient(90deg, rgba(56, 189, 248, 0) 0%, rgba(56, 189, 248, 0) 0%, rgba(232, 232, 232, 0.2) 33.02%, rgba(143, 143, 143, 0.6719) 64.41%, rgba(236, 72, 153, 0) 98.93%)"}})]})}})};r(8846),r(1221),r(745);var x=r(768);let p=n.forwardRef((e,t)=>{let{as:r="span",size:s="2",color:n="gray",transform:l,weight:o="normal",className:i,children:c,...d}=e;return(0,a.jsx)(x.DX,{className:(0,u.cn)(i,l,g(s),f(n),v(o)),ref:t,...d,children:(0,a.jsx)(r,{children:c})})}),g=e=>{switch(e){case"1":return"text-xs";case void 0:case"2":return"text-sm";case"3":return"text-base";case"4":return"text-lg";case"5":return["text-17px","md:text-xl tracking-[-0.16px]"];case"6":return"text-2xl tracking-[-0.288px]";case"7":return"text-[28px] leading-[34px] tracking-[-0.416px]";case"8":return"text-[35px] leading-[42px] tracking-[-0.64px]";case"9":return"text-6xl leading-[73px] tracking-[-0.896px]";default:return(0,u.H)(e)}},f=e=>{switch(e){case"white":return"text-slate-12";case void 0:case"gray":return"text-slate-11";default:return(0,u.H)(e)}},v=e=>{switch(e){case void 0:case"normal":return"font-normal";case"medium":return"font-medium";default:return(0,u.H)(e)}};p.displayName="Text";var b=r(2739),j=r(3029),w=r(3468);let C={type:"spring",stiffness:2e3,damping:80,mass:1};var y=r(9086);let k=n.forwardRef((e,t)=>{let{children:r,className:s,...n}=e;return(0,a.jsx)("button",{type:"button",...n,className:(0,u.cn)("focus:ring-gray-8 rounded text-slate-11 transition duration-200 ease-in-out hover:text-slate-12 focus:text-slate-12 focus:outline-none focus:ring-2",s),ref:t,children:r})});k.displayName="IconButton";var N=r(3428);let S=n.forwardRef((e,t)=>{let{...r}=e;return(0,a.jsx)(N.z,{ref:t,...r,children:(0,a.jsx)("path",{d:"M16.25 8.75L10.406 15.25L7.75 12.75",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})})});S.displayName="IconCheck";let L=n.forwardRef((e,t)=>{let{...r}=e;return(0,a.jsxs)(N.z,{ref:t,...r,children:[(0,a.jsx)("path",{d:"M9 6.75H7.75C6.64543 6.75 5.75 7.64543 5.75 8.75V17.25C5.75 18.3546 6.64543 19.25 7.75 19.25H16.25C17.3546 19.25 18.25 18.3546 18.25 17.25V8.75C18.25 7.64543 17.3546 6.75 16.25 6.75H15",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),(0,a.jsx)("path",{d:"M14 8.25H10C9.44772 8.25 9 7.80228 9 7.25V5.75C9 5.19772 9.44772 4.75 10 4.75H14C14.5523 4.75 15 5.19772 15 5.75V7.25C15 7.80228 14.5523 8.25 14 8.25Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),(0,a.jsx)("path",{d:"M9.75 12.25H14.25",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),(0,a.jsx)("path",{d:"M9.75 15.25H14.25",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})]})});L.displayName="IconClipboard";let M=n.forwardRef((e,t)=>{let{...r}=e;return(0,a.jsx)(N.z,{ref:t,...r,children:(0,a.jsx)("path",{d:"M4.75 14.75v1.5a3 3 0 0 0 3 3h8.5a3 3 0 0 0 3-3v-1.5M12 14.25v-9.5M8.75 10.75l3.25 3.5 3.25-3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5})})});M.displayName="IconDownload";var R=r(699);let P=e=>{let{markups:t,activeLang:r,setActiveLang:s}=e,[l,o]=n.useState(!1);return n.useEffect(()=>{o(!1)},[r]),(0,a.jsxs)("div",{className:"relative w-full items-center whitespace-pre rounded-md border border-slate-6 text-sm backdrop-blur-md",style:{lineHeight:"130%",background:"linear-gradient(145.37deg, rgba(255, 255, 255, 0.09) -8.75%, rgba(255, 255, 255, 0.027) 83.95%)",boxShadow:"rgb(0 0 0 / 10%) 0px 5px 30px -5px"},children:[(0,a.jsxs)("div",{className:"h-9 border-b border-slate-6",children:[(0,a.jsx)("div",{className:"flex",children:(0,a.jsx)(j.o,{id:"code",children:t.map(e=>{let{language:t}=e,n=r===t;return(0,a.jsxs)(w.P.button,{className:"relative px-4 py-[8px] font-sans text-sm font-medium transition duration-200 ease-in-out hover:text-slate-12 ".concat(r!==t?"text-slate-11":"text-slate-12"),onClick:()=>{s(t)},children:[n?(0,a.jsx)(w.P.span,{animate:{opacity:1},className:"absolute bottom-0 left-0 right-0 top-0 bg-slate-4",exit:{opacity:0},initial:{opacity:0},layoutId:"code",transition:C}):null,y.A[t]]},t)})})}),(0,a.jsxs)(R.m,{children:[(0,a.jsx)(R.m.Trigger,{asChild:!0,className:"absolute right-2 top-2 hidden md:block",children:(()=>{let e=async()=>{let e=t.filter(e=>{let{language:t}=e;return r===t});o(!0),await (0,u.e)(e[0].content),setTimeout(()=>{o(!1)},3e3)};return(0,a.jsx)(k,{onClick:()=>void e(),children:l?(0,a.jsx)(S,{}):(0,a.jsx)(L,{})})})()}),(0,a.jsx)(R.m.Content,{children:"Copy to Clipboard"})]}),(0,a.jsxs)(R.m,{children:[(0,a.jsx)(R.m.Trigger,{asChild:!0,className:"text-gray-11 absolute right-8 top-2 hidden md:block",children:(()=>{let e=t.filter(e=>e.language===r);if(void 0===e[0])return;let s=new File([e[0].content],"email.".concat(e[0].language)),n=URL.createObjectURL(s);return(0,a.jsx)("a",{className:"text-slate-11 transition duration-200 ease-in-out hover:text-slate-12",download:s.name,href:n,children:(0,a.jsx)(M,{})})})()}),(0,a.jsx)(R.m.Content,{children:"Download"})]})]}),t.map(e=>{let{language:t,content:s}=e;return(0,a.jsx)("div",{className:"".concat(r!==t&&"hidden"),children:(0,a.jsx)(m,{language:t,children:s})},t)})]})},H=e=>{var t,r;let a=t=>{let r=e.getBoundingClientRect();document.dispatchEvent(new MouseEvent("mousemove",{...t,clientX:t.clientX+r.x,clientY:t.clientY+r.y}))},s=e=>{document.dispatchEvent(new MouseEvent("mouseup",e))};return null===(t=e.contentDocument)||void 0===t||t.addEventListener("mousemove",a),null===(r=e.contentDocument)||void 0===r||r.addEventListener("mouseup",s),()=>{var t,r;null===(t=e.contentDocument)||void 0===t||t.removeEventListener("mousemove",a),null===(r=e.contentDocument)||void 0===r||r.removeEventListener("mouseup",s)}},E=e=>{let{width:t,height:r,onResize:s,onResizeEnd:l,children:o,maxHeight:i,maxWidth:c,minHeight:d,minWidth:h,...m}=e,p=(0,n.useRef)(null),g=(0,n.useRef)(null),f=(0,n.useCallback)(()=>{g.current&&document.removeEventListener("mousemove",g.current),document.removeEventListener("mouseup",f),null==l||l()},[]),v=e=>{g.current=t=>{if(0===t.button&&p.current){let r="east"===e||"west"===e,a=r?t.clientX:t.clientY,n=p.current.getBoundingClientRect();s(2*Math.abs(a-(r?n.x+n.width/2:n.y+n.height/2)),e)}else f()},document.addEventListener("mouseup",f),document.addEventListener("mousemove",g.current)};return(0,n.useEffect)(()=>{if(window.document)return()=>{f()}},[]),(0,a.jsxs)("div",{...m,className:(0,u.cn)("relative mx-auto my-auto box-content px-4 py-2",m.className),children:[(0,a.jsx)("div",{"aria-label":"resize-west","aria-valuenow":t,"aria-valuemin":h,"aria-valuemax":c,className:"-translate-x-1/2 -translate-y-1/2 absolute top-1/2 left-2 cursor-w-resize p-2 [user-drag:none]",onDragStart:e=>e.preventDefault(),draggable:"false",onMouseDown:()=>{v("west")},role:"slider",tabIndex:0,children:(0,a.jsx)("div",{className:"h-8 w-1 rounded-md bg-black/30"})}),(0,a.jsx)("div",{"aria-label":"resize-east","aria-valuenow":t,"aria-valuemin":h,"aria-valuemax":c,onDragStart:e=>e.preventDefault(),className:"-translate-x-full -translate-y-1/2 absolute top-1/2 left-full cursor-e-resize p-2 [user-drag:none]",draggable:"false",onMouseDown:()=>{v("east")},role:"slider",tabIndex:0,children:(0,a.jsx)("div",{className:"h-8 w-1 rounded-md bg-black/30"})}),(0,a.jsx)("div",{"aria-label":"resize-north","aria-valuenow":r,"aria-valuemin":d,"aria-valuemax":i,onDragStart:e=>e.preventDefault(),className:"-translate-x-1/2 -translate-y-1/2 absolute top-0 left-1/2 cursor-n-resize p-2 [user-drag:none]",draggable:"false",onMouseDown:()=>{v("north")},role:"slider",tabIndex:0,children:(0,a.jsx)("div",{className:"h-1 w-8 rounded-md bg-black/30"})}),(0,a.jsx)("div",{"aria-label":"resize-south","aria-valuenow":r,"aria-valuemin":d,"aria-valuemax":i,onDragStart:e=>e.preventDefault(),className:"-translate-x-1/2 -translate-y-1/2 absolute top-full left-1/2 cursor-s-resize p-2 [user-drag:none]",draggable:"false",onMouseDown:()=>{v("south")},role:"slider",tabIndex:0,children:(0,a.jsx)("div",{className:"h-1 w-8 rounded-md bg-black/30"})}),(0,a.jsx)(x.DX,{ref:p,children:o})]})};var T=r(4260);let I=e=>{let{markup:t}=e,[r,s]=n.useState(""),[l,i]=n.useState("Testing React Email"),[d,u]=n.useState(!1),[h,m]=n.useState(!1),x=async e=>{try{e.preventDefault(),u(!0);let a=await fetch("https://react.email/api/send/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({to:r,subject:l,html:t})});if(429===a.status){let{error:e}=await a.json();o.oR.error(e)}o.oR.success("Email sent! Check your inbox.")}catch(e){o.oR.error("Something went wrong. Please try again.")}finally{u(!1)}};return(0,a.jsxs)(T.bL,{onOpenChange:()=>{h?(document.body.classList.remove("popup-open"),m(!1)):(document.body.classList.add("popup-open"),m(!0))},open:h,children:[(0,a.jsx)(T.l9,{asChild:!0,children:(0,a.jsx)("button",{className:"box-border flex h-5 w-20 items-center justify-center self-center rounded-lg border border-slate-6 bg-slate-2 px-4 py-4 text-center font-sans text-sm text-slate-11 outline-none transition duration-300 ease-in-out hover:border-slate-10 hover:text-slate-12",type:"submit",children:"Send"})}),(0,a.jsx)(T.Mz,{}),(0,a.jsx)(T.ZL,{children:(0,a.jsx)(T.UC,{align:"end",className:"-mt-10 w-80 rounded-lg border border-slate-6 bg-black/70 p-3 font-sans text-slate-11 shadow-md backdrop-blur-lg font-sans",sideOffset:48,children:(0,a.jsxs)("form",{className:"mt-1",onSubmit:e=>void x(e),children:[(0,a.jsx)("label",{className:"mb-2 block text-xs uppercase text-slate-10",htmlFor:"to",children:"Recipient"}),(0,a.jsx)("input",{autoFocus:!0,className:"mb-3 w-full appearance-none rounded-lg border border-slate-6 bg-slate-3 px-2 py-1 text-sm text-slate-12 placeholder-slate-10 outline-none transition duration-300 ease-in-out focus:ring-1 focus:ring-slate-10",defaultValue:r,id:"to",onChange:e=>{s(e.target.value)},placeholder:"you@example.com",required:!0,type:"email"}),(0,a.jsx)("label",{className:"mb-2 mt-1 block text-xs uppercase text-slate-10",htmlFor:"subject",children:"Subject"}),(0,a.jsx)("input",{className:"mb-3 w-full appearance-none rounded-lg border border-slate-6 bg-slate-3 px-2 py-1 text-sm text-slate-12 placeholder-slate-10 outline-none transition duration-300 ease-in-out focus:ring-1 focus:ring-slate-10",defaultValue:l,id:"subject",onChange:e=>{i(e.target.value)},placeholder:"My Email",required:!0,type:"text"}),(0,a.jsx)("input",{className:"appearance-none checked:bg-blue-500",type:"checkbox"}),(0,a.jsxs)("div",{className:"mt-3 flex items-center justify-between",children:[(0,a.jsxs)(p,{className:"inline-block",size:"1",children:["Powered by"," ",(0,a.jsx)("a",{className:"text-white/85 transition duration-300 ease-in-out hover:text-slate-12",href:"https://resend.com",rel:"noreferrer",target:"_blank",children:"Resend"})]}),(0,a.jsx)(c.Button,{className:"disabled:border-transparent disabled:bg-slate-11",disabled:0===l.length||0===r.length||d,type:"submit",children:"Send"})]})]})})})]})};var V=r(382),D=r(6452);let z=n.forwardRef((e,t)=>{let{...r}=e;return(0,a.jsx)(N.z,{ref:t,...r,children:(0,a.jsx)("path",{d:"M9.75 15.25H17.25C18.3546 15.25 19.25 14.3546 19.25 13.25V6.75C19.25 5.64543 18.3546 4.75 17.25 4.75H6.75C5.64543 4.75 4.75 5.64543 4.75 6.75V13.25C4.75 14.3546 5.64543 15.25 6.75 15.25H9.75ZM9.75 15.25C9.75 15.25 10 18.25 8 19.25H16C14 18.25 14.25 15.25 14.25 15.25",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})})});z.displayName="IconMonitor";let F=n.forwardRef((e,t)=>{let{...r}=e;return(0,a.jsx)(N.z,{ref:t,...r,children:(0,a.jsx)("path",{d:"M17.4 15L21 11.5L17.4 8M6.6 8L3 11.5L6.6 15M14.25 4.5L9.75 18.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})})});F.displayName="IconSource";let O=e=>{let{activeView:t,setActiveView:r}=e;return(0,a.jsxs)(D.bL,{"aria-label":"View mode",className:"inline-block items-center bg-slate-2 border border-slate-6 rounded-md overflow-hidden h-[36px]",onValueChange:e=>{e&&r(e)},type:"single",value:t,children:[(0,a.jsx)(D.q7,{value:"preview",children:(0,a.jsxs)(R.m,{children:[(0,a.jsx)(R.m.Trigger,{asChild:!0,children:(0,a.jsxs)("div",{className:(0,u.cn)("px-3 py-2 transition ease-in-out duration-200 relative hover:text-slate-12",{"text-slate-11":"desktop"!==t,"text-slate-12":"desktop"===t}),children:["preview"===t&&(0,a.jsx)(w.P.span,{animate:{opacity:1},className:"absolute left-0 right-0 top-0 bottom-0 bg-slate-4",exit:{opacity:0},initial:{opacity:0},layoutId:"topbar-tabs",transition:C}),(0,a.jsx)(z,{})]})}),(0,a.jsx)(R.m.Content,{children:"Preview"})]})}),(0,a.jsx)(D.q7,{value:"source",children:(0,a.jsxs)(R.m,{children:[(0,a.jsx)(R.m.Trigger,{asChild:!0,children:(0,a.jsxs)("div",{className:(0,u.cn)("px-3 py-2 transition ease-in-out duration-200 relative hover:text-slate-12",{"text-slate-11":"source"!==t,"text-slate-12":"source"===t}),children:["source"===t&&(0,a.jsx)(w.P.span,{animate:{opacity:1},className:"absolute left-0 right-0 top-0 bottom-0 bg-slate-4",exit:{opacity:0},initial:{opacity:0},layoutId:"topbar-tabs",transition:C}),(0,a.jsx)(F,{})]})}),(0,a.jsx)(R.m.Content,{children:"Code"})]})})]})};var B=r(3197),W=r(2855);let _=[{name:"Desktop",dimensions:{width:600,height:1024}},{name:"Mobile",dimensions:{width:375,height:812}}],U={active:{width:"3.5rem",padding:"0 0 0 0.5rem"},inactive:{width:"0"}},Z=e=>{let{icon:t,isActive:r,label:s,onBlur:l,onChange:o,setIsActive:i,value:c,hasBorder:d}=e,h=n.useRef(null);return n.useEffect(()=>{r&&h.current&&h.current.focus()},[r]),(0,a.jsx)(R.m.Provider,{children:(0,a.jsxs)(R.m,{children:[(0,a.jsx)(R.m.Trigger,{asChild:!0,children:(0,a.jsxs)(w.P.button,{onClick:()=>{r?i(!1):i(!0)},className:(0,u.cn)("relative flex items-center justify-center p-2",{"border-slate-6 border-r":d}),children:[t,(0,a.jsx)(w.P.input,{ref:h,initial:!1,animate:r?"active":"inactive",className:"arrow-hide relative flex h-8 items-center justify-center bg-black text-sm outline-none",onChange:e=>o(Number.parseInt(e.currentTarget.value)),onBlur:l,type:"number",value:c,variants:U})]})}),(0,a.jsxs)(R.m.Content,{children:[(0,a.jsxs)("span",{children:[s,": "]}),(0,a.jsxs)("span",{className:"font-mono",children:[c,"px"]})]})]})})},A=e=>{let{name:t,dimensions:r,onSelect:s}=e;return(0,a.jsxs)(B.q7,{className:"group flex w-full cursor-pointer select-none items-center justify-between rounded-md py-1.5 pr-1 pl-2 text-sm outline-none transition-colors data-[highlighted]:bg-slate-5",onClick:()=>s(r),children:[t,(0,a.jsxs)("span",{className:"flex h-fit items-center rounded-full bg-slate-6 px-1.5 py-0.5 font-bold text-white text-xs",children:[r.width,"x",r.height]})]})},Y=e=>{let{viewWidth:t,viewHeight:r,setViewWidth:s,setViewHeight:l}=e,[o,i]=n.useState(!1),[c,d]=n.useState(null),h=e=>{s(e.width),l(e.height)},m=()=>{d(null)};return(0,a.jsxs)("div",{className:"relative flex h-9 w-fit overflow-hidden rounded-lg border border-slate-6 text-sm transition-colors duration-300 ease-in-out focus-within:border-slate-8 hover:border-slate-8",children:[(0,a.jsx)(Z,{icon:(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("path",{d:"M21 8V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v3"}),(0,a.jsx)("path",{d:"M21 16v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-3"}),(0,a.jsx)("path",{d:"M4 12H2"}),(0,a.jsx)("path",{d:"M10 12H8"}),(0,a.jsx)("path",{d:"M16 12h-2"}),(0,a.jsx)("path",{d:"M22 12h-2"})]}),value:t,onChange:s,isActive:"width"===c,setIsActive:e=>d(e?"width":null),onBlur:m,label:"Width",hasBorder:!0}),(0,a.jsx)(Z,{icon:(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("path",{d:"M8 3H5a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h3"}),(0,a.jsx)("path",{d:"M16 3h3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-3"}),(0,a.jsx)("path",{d:"M12 20v2"}),(0,a.jsx)("path",{d:"M12 14v2"}),(0,a.jsx)("path",{d:"M12 8v2"}),(0,a.jsx)("path",{d:"M12 2v2"})]}),value:r,onChange:l,isActive:"height"===c,setIsActive:e=>d(e?"height":null),onBlur:m,label:"Height"}),(0,a.jsxs)(B.bL,{open:o,onOpenChange:i,children:[(0,a.jsx)(B.l9,{asChild:!0,children:(0,a.jsxs)("button",{type:"button",className:"relative flex items-center justify-center overflow-hidden bg-slate-5 p-2 text-slate-11 text-sm leading-none outline-none transition-colors ease-linear focus-within:text-slate-12 hover:text-slate-12 focus:text-slate-12",children:[(0,a.jsx)("span",{className:"sr-only",children:"View presets"}),(0,a.jsx)(W.R,{className:(0,u.cn)("transform transition-transform duration-200 ease-[cubic-bezier(.36,.66,.6,1)]",{"-rotate-180":o})})]})}),(0,a.jsx)(B.ZL,{children:(0,a.jsx)(B.UC,{align:"end",className:"flex min-w-[12rem] flex-col gap-2 rounded-md border border-slate-8 border-solid bg-black px-2 py-2 text-white",sideOffset:5,children:_.map(e=>(0,a.jsx)(A,{name:e.name,dimensions:e.dimensions,onSelect:h},e.name))})})]})]})};var X=r(4106);let q=(e,t,r)=>Math.min(Math.max(e,t),r),J=(e,t,r)=>{let[a,s]=(0,n.useState)(e);return[q(a,t,r),e=>{"function"==typeof e?s(a=>{let s=q(a,t,r);return q(e(s),t,r)}):s(q(e,t,r))}]},G=e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"absolute inset-0 z-50 bg-black/80"}),(0,a.jsx)("div",{className:"absolute left-[50%] top-[50%] z-50 grid min-h-[50vh] w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 rounded-t-sm border border-t-4 bg-white p-6 text-black shadow-lg duration-200 sm:rounded-lg md:max-w-[568px] lg:max-w-[968px]",children:(0,a.jsxs)("div",{className:"flex min-w-0 max-w-full flex-col space-y-1.5",children:[(0,a.jsxs)("h2",{className:"flex flex-shrink items-center gap-4 pb-2 text-lg font-semibold leading-none tracking-tight",children:[(0,a.jsxs)("svg",{className:"h-6 w-6 font-extrabold text-red-600",fill:"none",height:"24",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"}),(0,a.jsx)("path",{d:"M12 9v4"}),(0,a.jsx)("path",{d:"M12 17h.01"})]}),e.error.name,": ",e.error.message]}),e.error.stack?(0,a.jsx)("div",{className:"flex-grow scroll-px-4 overflow-x-auto rounded-lg bg-red-500 p-2 text-sm text-gray-100",children:(0,a.jsx)("pre",{className:"w-full min-w-0 font-mono leading-7",children:e.error.stack})}):void 0]})})]}),$=e=>{var t,r;let{emailTitle:c}=e,{renderingResult:d,renderedEmailMetadata:u}=(0,n.use)(X.o),h=(0,s.useRouter)(),m=(0,s.usePathname)(),x=(0,s.useSearchParams)(),p=null!==(t=x.get("view"))&&void 0!==t?t:"preview",g=null!==(r=x.get("lang"))&&void 0!==r?r:"jsx",f=void 0!==u,v="error"in d,[j,w]=(0,n.useState)(Number.POSITIVE_INFINITY),[C,y]=(0,n.useState)(Number.POSITIVE_INFINITY),k=x.get("width"),N=x.get("height"),[S,L]=J(k?Number.parseInt(k):600,350,j),[M,T]=J(N?Number.parseInt(N):1024,600,C),D=(0,i.YQ)(()=>{let e=new URLSearchParams(x);e.set("width",S.toString()),e.set("height",M.toString()),h.push("".concat(m,"?").concat(e.toString()))},300);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(b.Topbar,{emailTitle:c,children:[(0,a.jsx)(Y,{setViewHeight:e=>{T(e),(0,l.flushSync)(()=>{D()})},setViewWidth:e=>{L(e),(0,l.flushSync)(()=>{D()})},viewHeight:M,viewWidth:S}),(0,a.jsx)(O,{activeView:p,setActiveView:e=>{let t=new URLSearchParams(x);t.set("view",e),h.push("".concat(m,"?").concat(t.toString()))}}),f?(0,a.jsx)("div",{className:"flex justify-end",children:(0,a.jsx)(I,{markup:u.markup})}):null]}),(0,a.jsxs)(V.ShellContent,{className:"relative flex bg-gray-200",ref:e=>{let t=new ResizeObserver(e=>{let[t]=e;t&&(w(t.contentRect.width-80),y(t.contentRect.height-80))});return e&&t.observe(e),()=>{t.disconnect()}},children:[v?(0,a.jsx)(G,{error:d.error}):null,f?(0,a.jsxs)(a.Fragment,{children:["preview"===p&&(0,a.jsx)(E,{minHeight:600,minWidth:350,maxHeight:C,maxWidth:j,height:M,onResizeEnd:()=>{D()},onResize:(e,t)=>{"east"===t||"west"===t?L(e):T(e)},width:S,children:(0,a.jsx)("iframe",{className:"solid max-h-full rounded-lg bg-white",ref:e=>{if(e)return H(e)},srcDoc:u.markup,style:{width:"".concat(S,"px"),height:"".concat(M,"px")},title:c})}),"source"===p&&(0,a.jsx)("div",{className:"h-full w-full bg-black",children:(0,a.jsx)("div",{className:"m-auto flex max-w-3xl p-6",children:(0,a.jsx)(R.m.Provider,{children:(0,a.jsx)(P,{activeLang:g,markups:[{language:"jsx",content:u.reactMarkup},{language:"markup",content:u.markup},{language:"markdown",content:u.plainText}],setActiveLang:e=>{let t=new URLSearchParams(x);t.set("view","source"),t.set("lang",e),h.push("".concat(m,"?").concat(t.toString()))}})})})})]}):null,(0,a.jsx)(o.l$,{})]})]})}}},e=>{var t=t=>e(e.s=t);e.O(0,[486,744,87,683,416,860,781,358],()=>t(1668)),_N_E=e.O()}]);
|