useblocks 1.3.5 → 1.3.8

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.
Files changed (71) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +21 -0
  3. package/iframe/.vite/manifest.json +4 -4
  4. package/iframe/css/sandbox.css +6 -0
  5. package/iframe/{iframe-eblock.cc33bf3e.html → iframe-eblock.a0b8903e.html} +2 -2
  6. package/iframe/{iframe.cc33bf3e.html → iframe.a0b8903e.html} +2 -2
  7. package/iframe/js/elMarkupHelper.C1NUEUOF.js +279 -0
  8. package/iframe/js/{iframe-eblock.body.cc33bf3e.js → iframe-eblock.body.a0b8903e.js} +1 -1
  9. package/iframe/js/iframe-eblock.js +2 -2
  10. package/iframe/js/iframe.body.a0b8903e.js +129 -0
  11. package/iframe/js/iframe.js +2 -2
  12. package/package.json +1 -1
  13. package/runtime/react/index.js +1 -1
  14. package/static/core/{b99d703d.js → 1b6e3017.js} +1 -1
  15. package/static/core/2ca6f0ad.js +19 -0
  16. package/static/core/{f3f60a1a.js → 2d458997.js} +1 -1
  17. package/static/core/{2a1ca143.js → 31aad6a0.js} +1 -1
  18. package/static/core/3339abc3.js +1 -0
  19. package/static/core/3d73b614.js +1 -0
  20. package/static/core/{bc6678e8.js → 3e55fbd4.js} +1 -1
  21. package/static/core/3fc88c79.js +1 -0
  22. package/static/core/{43ebd972.js → 4a69114d.js} +1 -1
  23. package/static/core/4e869a27.js +1 -0
  24. package/static/core/{875e46a6.js → 4f9f6515.js} +1 -1
  25. package/static/core/55a6e3bc.js +163 -0
  26. package/static/core/{ac9606f9.js → 58b98b23.js} +2 -2
  27. package/static/core/{23b6bc56.js → 5bf0cc25.js} +1 -1
  28. package/static/core/{3b8edeff.js → 64a5118e.js} +1 -1
  29. package/static/core/{70467601.js → 6584ba9a.js} +1 -1
  30. package/static/core/74b30e13.js +1 -0
  31. package/static/core/{61af94af.js → 75b3d05d.js} +2 -2
  32. package/static/core/7a1ca179.js +1 -0
  33. package/static/core/{bb91f8dd.js → 80f29ed0.js} +1 -1
  34. package/static/core/{93382e36.js → 851da4d1.js} +1 -1
  35. package/static/core/{2de2e937.js → 88ed7988.js} +1 -1
  36. package/static/core/91a91433.js +1 -0
  37. package/static/core/9f12c233.js +1 -0
  38. package/static/core/{80391bda.js → a2fb7ae9.js} +1 -1
  39. package/static/core/a7e83e25.js +10 -0
  40. package/static/core/{d98674b7.js → addbb53c.js} +1 -1
  41. package/static/core/{66619f08.js → b1edf5c5.js} +6 -6
  42. package/static/core/{d26051be.js → b79eddad.js} +1 -1
  43. package/static/core/bd188fca.js +1 -0
  44. package/static/core/{100d863a.js → c015f53f.js} +1 -1
  45. package/static/core/c0f26c01.js +1 -0
  46. package/static/core/{95f608ad.js → cad7dc27.js} +1 -1
  47. package/static/core/d4aa63e7.js +1 -0
  48. package/static/core/d5774798.js +1 -0
  49. package/static/core/d5cd129a.js +1 -0
  50. package/static/core/d67c9b4e.js +2 -0
  51. package/static/core/{7d6f6c29.js → d7ccd97b.js} +1 -1
  52. package/static/core/{87aedddb.js → e4ebcc13.js} +1 -1
  53. package/static/core/e6079a68.js +1 -0
  54. package/static/core/{7d879bb5.js → e85778fc.js} +1 -1
  55. package/static/core/ec23adac.js +1 -0
  56. package/static/core/{c0fa9d67.js → f06286dd.js} +1 -1
  57. package/static/core/{cb30c7d7.js → f370243f.js} +1 -1
  58. package/static/core/{2a88a7ce.js → ffabcd69.js} +3 -3
  59. package/static/esm/{3ce60f99.js → b6a1b54a.js} +1 -1
  60. package/static/umd-runtime/{runtime.CpvZ7_Hr.js → runtime.B77pxBrU.js} +1 -1
  61. package/useblocks-core.a0b8903e.js +874 -0
  62. package/useblocks-esm.js +53 -39
  63. package/{useblocks-po.cc33bf3e.js → useblocks-po.a0b8903e.js} +1 -1
  64. package/useblocks.d.ts +95 -5
  65. package/useblocks.js +54 -40
  66. package/vendor/useblocks-ui-kit/package.json +1 -1
  67. package/iframe/js/elMarkupHelper.DXAm8_Hg.js +0 -278
  68. package/iframe/js/iframe.body.cc33bf3e.js +0 -129
  69. package/static/core/5d75a7d6.js +0 -1
  70. package/static/core/9a39a2dd.js +0 -28
  71. package/useblocks-core.cc33bf3e.js +0 -859
@@ -1 +1 @@
1
- __useblocks__.define("static/core/93382e36.js",["require","exports","module","static/core/2ff39ddf.js","static/core/e8499e21.js"],function(i,u,S){const x=i("./2ff39ddf.js"),d=i("./e8499e21.js");var m={items_per_page:"/ página",jump_to:"Ir a",jump_to_confirm:"confirmar",page:"Página",prev_page:"Página anterior",next_page:"Página siguiente",prev_5:"5 páginas previas",next_5:"5 páginas siguientes",prev_3:"3 páginas previas",next_3:"3 páginas siguientes",page_size:"tamaño de página"};function o(r){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(r)}function l(r,e){var a=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function($){return Object.getOwnPropertyDescriptor(r,$).enumerable})),a.push.apply(a,n)}return a}function c(r){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?l(Object(a),!0).forEach(function(n){b(r,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(a)):l(Object(a)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(a,n))})}return r}function b(r,e,a){return e=g(e),e in r?Object.defineProperty(r,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[e]=a,r}function g(r){var e=f(r,"string");return o(e)=="symbol"?e:String(e)}function f(r,e){if(o(r)!="object"||!r)return r;var a=r[Symbol.toPrimitive];if(a!==void 0){var n=a.call(r,e||"default");if(o(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var v=c(c({},d.commonLocale),{},{locale:"es_ES",today:"Hoy",now:"Ahora",backToToday:"Volver a hoy",ok:"Aceptar",clear:"Limpiar",week:"Semana",month:"Mes",year:"Año",timeSelect:"Seleccionar hora",dateSelect:"Seleccionar fecha",monthSelect:"Elegir un mes",yearSelect:"Elegir un año",decadeSelect:"Elegir una década",previousMonth:"Mes anterior (PageUp)",nextMonth:"Mes siguiente (PageDown)",previousYear:"Año anterior (Control + left)",nextYear:"Año siguiente (Control + right)",previousDecade:"Década anterior",nextDecade:"Década siguiente",previousCentury:"Siglo anterior",nextCentury:"Siglo siguiente"}),s={placeholder:"Seleccionar hora",rangePlaceholder:["Hora de inicio","Hora de fin"]},p={lang:{placeholder:"Seleccionar fecha",rangePlaceholder:["Fecha inicial","Fecha final"],shortWeekDays:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],shortMonths:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],...v},timePickerLocale:{...s}},y=p,t="${label} no es un ${type} válido",h={locale:"es",Pagination:m,DatePicker:p,TimePicker:s,Calendar:y,global:{placeholder:"Seleccione",close:"Cerrar",show:"Mostrar",hide:"Ocultar"},Table:{filterTitle:"Filtrar menú",filterConfirm:"Aceptar",filterReset:"Reiniciar",filterEmptyText:"Sin filtros",filterCheckAll:"Seleccionar todo",filterSearchPlaceholder:"Buscar en filtros",emptyText:"Sin datos",selectAll:"Seleccionar todo",selectInvert:"Invertir selección",selectNone:"Vacíe todo",selectionAll:"Seleccionar todos los datos",sortTitle:"Ordenar",expand:"Expandir fila",collapse:"Colapsar fila",triggerDesc:"Click para ordenar en orden descendente",triggerAsc:"Click para ordenar en orden ascendente",cancelSort:"Click para cancelar ordenamiento"},Tour:{Next:"Siguiente",Previous:"Anterior",Finish:"Finalizar"},Modal:{okText:"Aceptar",cancelText:"Cancelar",justOkText:"Aceptar"},Popconfirm:{okText:"Aceptar",cancelText:"Cancelar"},Transfer:{titles:["",""],searchPlaceholder:"Buscar aquí",itemUnit:"elemento",itemsUnit:"elementos",remove:"Eliminar",selectCurrent:"Seleccionar página actual",removeCurrent:"Eliminar página actual",selectAll:"Seleccionar todos los datos",removeAll:"Eliminar todos los datos",selectInvert:"Invertir página actual"},Upload:{uploading:"Subiendo...",removeFile:"Eliminar archivo",uploadError:"Error al subir el archivo",previewFile:"Vista previa",downloadFile:"Descargar archivo"},Empty:{description:"No hay datos"},Icon:{icon:"ícono"},Text:{edit:"Editar",copy:"Copiar",copied:"Copiado",expand:"Expandir"},Form:{optional:"(opcional)",defaultValidateMessages:{default:"Error de validación del campo ${label}",required:"Por favor, rellena ${label}",enum:"${label} debe ser uno de [${enum}]",whitespace:"${label} no puede ser un carácter en blanco",date:{format:"El formato de fecha de ${label} es inválido",parse:"${label} no se puede convertir a una fecha",invalid:"${label} es una fecha inválida"},types:{string:t,method:t,array:t,object:t,number:t,date:t,boolean:t,integer:t,float:t,regexp:t,email:t,url:t,hex:t},string:{len:"${label} debe tener ${len} caracteres",min:"${label} debe tener al menos ${min} caracteres",max:"${label} debe tener hasta ${max} caracteres",range:"${label} debe tener entre ${min}-${max} caracteres"},number:{len:"${label} debe ser igual a ${len}",min:"${label} valor mínimo es ${min}",max:"${label} valor máximo es ${max}",range:"${label} debe ser entre ${min}-${max}"},array:{len:"Debe ser ${len} ${label}",min:"Al menos ${min} ${label}",max:"Como máximo ${max} ${label}",range:"El valor de ${label} debe estar entre ${min}-${max}"},pattern:{mismatch:"${label} no coincide con el patrón ${pattern}"}}}};u.default=h});
1
+ __useblocks__.define("static/core/851da4d1.js",["require","exports","module","static/core/2ff39ddf.js","static/core/a71d1c3a.js"],function(i,u,S){const x=i("./2ff39ddf.js"),d=i("./a71d1c3a.js");var m={items_per_page:"/ página",jump_to:"Ir a",jump_to_confirm:"confirmar",page:"Página",prev_page:"Página anterior",next_page:"Página siguiente",prev_5:"5 páginas previas",next_5:"5 páginas siguientes",prev_3:"3 páginas previas",next_3:"3 páginas siguientes",page_size:"tamaño de página"};function o(r){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(r)}function l(r,e){var a=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function($){return Object.getOwnPropertyDescriptor(r,$).enumerable})),a.push.apply(a,n)}return a}function c(r){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?l(Object(a),!0).forEach(function(n){b(r,n,a[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(a)):l(Object(a)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(a,n))})}return r}function b(r,e,a){return e=g(e),e in r?Object.defineProperty(r,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[e]=a,r}function g(r){var e=f(r,"string");return o(e)=="symbol"?e:String(e)}function f(r,e){if(o(r)!="object"||!r)return r;var a=r[Symbol.toPrimitive];if(a!==void 0){var n=a.call(r,e||"default");if(o(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var v=c(c({},d.commonLocale),{},{locale:"es_ES",today:"Hoy",now:"Ahora",backToToday:"Volver a hoy",ok:"Aceptar",clear:"Limpiar",week:"Semana",month:"Mes",year:"Año",timeSelect:"Seleccionar hora",dateSelect:"Seleccionar fecha",monthSelect:"Elegir un mes",yearSelect:"Elegir un año",decadeSelect:"Elegir una década",previousMonth:"Mes anterior (PageUp)",nextMonth:"Mes siguiente (PageDown)",previousYear:"Año anterior (Control + left)",nextYear:"Año siguiente (Control + right)",previousDecade:"Década anterior",nextDecade:"Década siguiente",previousCentury:"Siglo anterior",nextCentury:"Siglo siguiente"}),s={placeholder:"Seleccionar hora",rangePlaceholder:["Hora de inicio","Hora de fin"]},p={lang:{placeholder:"Seleccionar fecha",rangePlaceholder:["Fecha inicial","Fecha final"],shortWeekDays:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],shortMonths:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],...v},timePickerLocale:{...s}},y=p,t="${label} no es un ${type} válido",h={locale:"es",Pagination:m,DatePicker:p,TimePicker:s,Calendar:y,global:{placeholder:"Seleccione",close:"Cerrar",show:"Mostrar",hide:"Ocultar"},Table:{filterTitle:"Filtrar menú",filterConfirm:"Aceptar",filterReset:"Reiniciar",filterEmptyText:"Sin filtros",filterCheckAll:"Seleccionar todo",filterSearchPlaceholder:"Buscar en filtros",emptyText:"Sin datos",selectAll:"Seleccionar todo",selectInvert:"Invertir selección",selectNone:"Vacíe todo",selectionAll:"Seleccionar todos los datos",sortTitle:"Ordenar",expand:"Expandir fila",collapse:"Colapsar fila",triggerDesc:"Click para ordenar en orden descendente",triggerAsc:"Click para ordenar en orden ascendente",cancelSort:"Click para cancelar ordenamiento"},Tour:{Next:"Siguiente",Previous:"Anterior",Finish:"Finalizar"},Modal:{okText:"Aceptar",cancelText:"Cancelar",justOkText:"Aceptar"},Popconfirm:{okText:"Aceptar",cancelText:"Cancelar"},Transfer:{titles:["",""],searchPlaceholder:"Buscar aquí",itemUnit:"elemento",itemsUnit:"elementos",remove:"Eliminar",selectCurrent:"Seleccionar página actual",removeCurrent:"Eliminar página actual",selectAll:"Seleccionar todos los datos",removeAll:"Eliminar todos los datos",selectInvert:"Invertir página actual"},Upload:{uploading:"Subiendo...",removeFile:"Eliminar archivo",uploadError:"Error al subir el archivo",previewFile:"Vista previa",downloadFile:"Descargar archivo"},Empty:{description:"No hay datos"},Icon:{icon:"ícono"},Text:{edit:"Editar",copy:"Copiar",copied:"Copiado",expand:"Expandir"},Form:{optional:"(opcional)",defaultValidateMessages:{default:"Error de validación del campo ${label}",required:"Por favor, rellena ${label}",enum:"${label} debe ser uno de [${enum}]",whitespace:"${label} no puede ser un carácter en blanco",date:{format:"El formato de fecha de ${label} es inválido",parse:"${label} no se puede convertir a una fecha",invalid:"${label} es una fecha inválida"},types:{string:t,method:t,array:t,object:t,number:t,date:t,boolean:t,integer:t,float:t,regexp:t,email:t,url:t,hex:t},string:{len:"${label} debe tener ${len} caracteres",min:"${label} debe tener al menos ${min} caracteres",max:"${label} debe tener hasta ${max} caracteres",range:"${label} debe tener entre ${min}-${max} caracteres"},number:{len:"${label} debe ser igual a ${len}",min:"${label} valor mínimo es ${min}",max:"${label} valor máximo es ${max}",range:"${label} debe ser entre ${min}-${max}"},array:{len:"Debe ser ${len} ${label}",min:"Al menos ${min} ${label}",max:"Como máximo ${max} ${label}",range:"El valor de ${label} debe estar entre ${min}-${max}"},pattern:{mismatch:"${label} no coincide con el patrón ${pattern}"}}}};u.default=h});
@@ -1 +1 @@
1
- __useblocks__.define("static/core/2de2e937.js",["require","exports","module","static/core/2ff39ddf.js","static/core/100d863a.js"],function(e,t,r){const l=e("./2ff39ddf.js");var o={wordwrap:200,tables:!0,selectors:[...e("./100d863a.js").DEFAULT_OPTIONS.selectors||[],{selector:"table",format:"dataTable"},{selector:"ul",format:"list"},{selector:"ol",format:"list"},{selector:"pre",format:"block"},{selector:"blockquote",format:"blockquote"}],baseElements:{selectors:["body","table"]},preserveNewlines:!1,longWordSplit:{forceWrapOnLimit:!1}};t.EmailTextPlainConvertOptions=o});
1
+ __useblocks__.define("static/core/88ed7988.js",["require","exports","module","static/core/2ff39ddf.js","static/core/c015f53f.js"],function(e,t,r){const l=e("./2ff39ddf.js");var o={wordwrap:200,tables:!0,selectors:[...e("./c015f53f.js").DEFAULT_OPTIONS.selectors||[],{selector:"table",format:"dataTable"},{selector:"ul",format:"list"},{selector:"ol",format:"list"},{selector:"pre",format:"block"},{selector:"blockquote",format:"blockquote"}],baseElements:{selectors:["body","table"]},preserveNewlines:!1,longWordSplit:{forceWrapOnLimit:!1}};t.EmailTextPlainConvertOptions=o});
@@ -0,0 +1 @@
1
+ __useblocks__.define("static/core/91a91433.js",["require","exports","module","static/core/2ff39ddf.js","static/core/cf7d1dd7.js","static/core/a71d1c3a.js","static/core/3fc88c79.js","static/core/d67c9b4e.js","static/core/d5774798.js"],function(c,h,j){const O=c("./2ff39ddf.js"),D=c("./cf7d1dd7.js"),e=c("./a71d1c3a.js"),p=c("./3fc88c79.js"),m=c("./d67c9b4e.js"),y=c("./d5774798.js");var w={8:"error",4:"warning",2:"info",1:"hint"},S=()=>e.err("unavailable","A block is open, not an email; read its code with document.getHtml.");function f(t){return e.isBlockSessionKey(e.peekEmailDocuments(t)?.sessionKey())}function d(t){try{return t.getInstance(D.PLUGIN_COLLECTION_ID)?.use("EmailSettingsApi")}catch{return}}async function g(t,i,o){const{compileEmail:n}=await e.loadEmailCompiler();return n(await i.getEmailSnapshot(),{amp:!1,text:o},e.getTemplateDirectivesPolicy(t).keepWrappedOnOutput)}function v(t){return f(t)?S():e.featureRefusal(t,"export_html","the compiled email")}function k(t){const{id:i,date:o,modified:n,authorName:r,author:s,subject:a,title:u,isAutosave:l}=t;return{id:i===void 0?void 0:String(i),date:o??n,author:r??s,subject:a,title:u,isAutosave:l}}async function R(t,i){const o=e.peekEmailDocuments(t),n=o?.current()?.get().serverId;if(!o||n==null)return e.err("unavailable","The document has no saved revisions yet.");const r=e.featureRefusal(t,"version_history","revision history");if(r)return r;if(e.isBlockSessionKey(o.sessionKey())){if(!e.canReadBlockHistory(t))return{revisions:[],hasMore:!1};const{revisions:u,hasMore:l}=await e.resolveBlockHistoryPort(t).readRevisions(String(n),i,{wpId:e.openDocumentWpId(t,n)});return{revisions:u.map(k),hasMore:l}}if(!await e.isEmailHistoryAvailable(t))return e.planRefusal("Revision history is not available on this plan.");const{revisions:s,hasMore:a}=await e.resolveEmailHistoryPort(t).readRevisions(String(n),i,{wpId:e.openDocumentWpId(t,n)});return{revisions:s.map(k),hasMore:a}}function E(t,i){return e.openDocument(t)?e.isReadOnly(t)?e.readOnlyError():e.featureRefusal(t,"code_editor","the email code")??(e.markupHasContent(i)?void 0:e.err("invalidArgs",'"html" must not be empty: with no text, pictures or other visible elements it would erase the whole email.')):e.noDocument()}function b(t,{caller:i}){return i==="agent"&&e.getAgentService(t).answerOpen?e.err("undoConflict","The edits of this answer are not closed yet, so undo and redo are not possible now. Undo becomes available after the answer ends: tell the user about it."):void 0}function _(t){return{"document.replaceHtml":{precheck:i=>E(t,i.html),consent:i=>{const o=e.agentTranslator(t);return{title:o.__("Replace the whole email with new markup"),...e.detailsOf(e.markupSize(o,i.html))}}}}}function T(t,i){return{"document.getHtml":async({output:o})=>{const n=e.openDocument(t);return n?o!=="email"?n.getContent():v(t)??(await g(t,i,!1)).compiled.html:e.noDocument()},"document.getText":async()=>e.openDocument(t)?v(t)??(await g(t,i,!0)).compiled.text:e.noDocument(),"document.setHeaders":async o=>{const n=e.openDocument(t);if(!n)return e.noDocument();if(f(t))return e.err("unavailable","A block has no subject or preheader; open an email to set them.");if(e.isReadOnly(t))return e.readOnlyError();if(e.getAppConfig(t).lockPreheaderAndTitle===!0)return e.err("disabled","The subject and the preheader are locked in this editor.");const r=(o.subject!==void 0?e.featureRefusal(t,"theme_editing","the subject"):void 0)??(o.preheader!==void 0?e.featureRefusal(t,"preheader_editing","the preheader"):void 0);if(r)return r;const s=Object.fromEntries(Object.entries(o).filter(([,a])=>a!==void 0));return e.writeEmailAttributes(n,s),await e.settleHeaders(t),e.ok()},"document.getSettings":async()=>{const o=await d(t)?.getEmailLayoutSettings();return o?m.editableLayoutSettings(o):e.noDocument()},"document.setSettings":async({settings:o})=>{const n=d(t);if(!n||!e.openDocument(t))return e.noDocument();if(f(t))return e.err("unavailable","A block has no email layout settings; open an email to set them.");if(e.isReadOnly(t))return e.readOnlyError();const r=m.layoutSettingsRefusal(o);return r||(e.isCanvasOpen(t)?(await n.setEmailLayoutSettings(o),e.getMessageService(t).send({operation:e.EVENT_TYPES.SANDBOX_EMAIL_SETTINGS_SET,settings:o}),await e.askCanvasElement(t,{op:"settle"}).then(s=>s.ok,()=>!1)?e.ok():e.ok({canvasPending:!0})):e.err("unavailable","The canvas is not open."))},"document.getContentStyles":async()=>await d(t)?.getEmailContentStyles()??e.noDocument(),"document.setContentStyles":async({styles:o})=>{const n=d(t);if(!n||!e.openDocument(t))return e.noDocument();if(e.isReadOnly(t))return e.readOnlyError();const r=m.contentStylesRefusal(t,o,await n.getEmailContentStyles());return r||(await n.setEmailContentStyles(o),e.openDocument(t)?.markUnsaved(),e.ok())},"document.replaceHtml":({html:o})=>{const n=e.peekEmailDocuments(t),r=n?.current();if(!n||!r)return e.noDocument();const s=E(t,o);return s||(e.replaceDocumentContent(r,n.history(),o,{undoable:!0}),e.ok())},"history.undo":(o,n)=>{const r=e.undoPlanRefusal(t)??b(t,n);if(r)return r;const s=e.peekEmailDocuments(t)?.history();return s?.canUndo()?e.isReadOnly(t)?e.readOnlyError():s.tryUndo()?e.ok():e.err("nothingToUndo","The last step could not be undone: the text changed under it."):e.err("nothingToUndo","There is nothing to undo.")},"history.redo":(o,n)=>{const r=e.undoPlanRefusal(t)??b(t,n);if(r)return r;const s=e.peekEmailDocuments(t)?.history();return s?.canRedo()?e.isReadOnly(t)?e.readOnlyError():s.tryRedo()?e.ok():e.err("nothingToRedo","The step could not be redone: the text changed under it."):e.err("nothingToRedo","There is nothing to redo.")},"history.listRevisions":({page:o})=>R(t,o??1),"check.code":async()=>{const o=e.openDocument(t);return o?(await e.validateEmailCode(o.getContent())).map(({severity:n,message:r,startLineNumber:s,startColumn:a,endLineNumber:u,endColumn:l})=>({severity:w[n]??"error",message:r,startLineNumber:s,startColumn:a,endLineNumber:u,endColumn:l})):e.noDocument()},"check.codeSize":()=>{const o=e.openDocument(t);if(!o)return e.noDocument();const n=e.getCodeSize(o.getContent());return{sizeBytes:n,sizeKb:Math.round(n/1024),limitKb:90,exceeded:e.isCodeSizeExceeded(n,90)}},"block.list":async o=>{if(o.source==="gallery"){const r=await y.galleryBlockList(t);return e.isResult(r)?r:p.blockListPage(r.map(({id:s,title:a,description:u,type:l})=>({id:s,title:a,description:u,type:l})),o)}const n=await y.readProjectBlocks(t);return n?p.blockListPage(n.map(({id:r,title:s,description:a,type:u,global_block:l})=>({id:r,title:s,description:a,type:u,global:l===!0})),o):e.blocksNotLoaded()}}}h.agentDocumentGates=_,h.agentDocumentHandlers=T});
@@ -0,0 +1 @@
1
+ __useblocks__.define("static/core/9f12c233.js",["require","exports","module","static/core/2ff39ddf.js","static/core/a71d1c3a.js","static/core/7a1ca179.js"],function(u,f,j){const R=u("./2ff39ddf.js"),r=u("./a71d1c3a.js"),g=u("./7a1ca179.js");var v={link_check:"link checks",image_check:"image checks",spam_check:"spam checks"},S=t=>r.err("limitExceeded",`The plan limit for ${v[t]} is used up.`),p={ignoreEnabledFlag:!0};function w(t,e){switch(e.reason){case"noStore":return r.err("unavailable","Checks need the editor interface.");case"noDocument":return r.noDocument();case"notSaved":return r.err("unavailable","Save the email first: checks run on a saved email.");case"typeLimit":case"planLimit":case"usageLimit":return S(t);default:{const s=(e.reason==="failed"?e.error:void 0)?.data?.message;return r.err("internal",typeof s=="string"&&s?s:`The ${v[t]} service failed.`)}}}var _=(t,e)=>(e==="spam_check"?r.standaloneRefusal(t,"Spam checks"):void 0)??r.freePlanRefusal(t,"Checks are not available on the current plan.");async function m(t,e){const s=_(t,e);if(s)return s;const a=await g.getOptimiseChecks(t).run(e,p);return a.ok===!1?w(e,a):a}async function C(t,e){const s=_(t,e);if(s)return s;const a=await g.getOptimiseChecks(t).preflight(e,p);return a.ok===!1?w(e,a):a}function y(t){const e=new Map,s=(a,l)=>({precheck:async()=>{const i=C(t,a);e.set(a,i);const n=await i;return n.ok===!1?n:void 0},consent:async()=>{const i=r.agentTranslator(t),{__:n}=i,{title:h,what:k}=l(i),o=e.get(a)??C(t,a);e.delete(a);const c=await o.catch(()=>{}),b=c?.ok?c.remaining:void 0;return{title:h,details:[{label:n("What will be checked"),value:k},...b===void 0?[]:[{label:n("Plan limit"),value:r.sprintf(n("Uses 1 check; %d left"),b)}]]}}});return{"check.links":s("link_check",({__:a})=>({title:a("Check the links in the email"),what:a("Every link of the email is opened over the network.")})),"check.images":s("image_check",({__:a})=>({title:a("Check the images in the email"),what:a("Every image of the email is loaded over the network.")})),"check.spam":s("spam_check",({__:a})=>({title:a("Check the email for spam"),what:a("The email as it is now is scored by a spam filter.")}))}}var d=t=>t===void 0?{}:{limitRemaining:t};function E(t){return{"check.links":async()=>{const e=await m(t,"link_check");if(e.ok===!1)return e;const{links:s,summary:a}=e.value;return{links:s.map(({linkId:l,url:i,text:n,status:h,statusCode:k,resolvedUrl:o,message:c})=>({id:l,url:i,text:n,status:h,statusCode:k,...o?{resolvedUrl:o}:{},...c?{message:c}:{}})),summary:a,...d(e.limitRemaining)}},"check.images":async()=>{const e=await m(t,"image_check");if(e.ok===!1)return e;const{images:s,summary:a,totalKb:l}=e.value;return{images:s.map(({imageId:i,url:n,status:h,statusCode:k,message:o,image:c})=>({id:i,url:n,status:h,statusCode:k,sizeKb:Math.round((c?.bytes??0)/1024),...c?.dimensions?{width:c.dimensions.width,height:c.dimensions.height}:{},...o?{message:o}:{}})),summary:a,totalKb:l,...d(e.limitRemaining)}},"check.spam":async()=>{const e=await m(t,"spam_check");if(e.ok===!1)return e;const{spamScore:s,baseSpamScore:a,report:l}=e.value;return{score:s??null,baseScore:a??null,report:Array.isArray(l)?l.map(({score:i,description:n})=>({score:i,description:n})):[],...d(e.limitRemaining)}}}}f.agentCheckGates=y,f.agentCheckHandlers=E});
@@ -1 +1 @@
1
- __useblocks__.define("static/core/80391bda.js",["require","exports","module","static/core/2ff39ddf.js","static/core/e8499e21.js","vite/preload-helper"],function(a,g,z){const j=a("./2ff39ddf.js"),t=a("./e8499e21.js");let f=a("vite/preload-helper");var h=3e3,S=/\.(woff2?|ttf|otf|eot)(\?|$)/i;function b(e){if(S.test(e.name))return"font";switch(e.initiatorType){case"script":return"script";case"link":case"css":return"style";case"fetch":case"xmlhttprequest":return"fetch";case"img":case"image":return"image";default:return"other"}}function _(e){return e.decodedBodySize===0&&e.transferSize===0?{transferred:null,fromCache:null}:{transferred:e.transferSize,fromCache:e.transferSize===0}}function d(e,r){return{name:e.name,kind:b(e),startedAt:t.toAbsolute(e.startTime,r),finishedAt:t.toAbsolute(e.responseEnd,r),..._(e)}}function y(e){if(!t.isDiagnosticsEnabled()||typeof PerformanceObserver>"u")return null;performance.setResourceTimingBufferSize(h);const{timeOrigin:r}=performance,n=new PerformanceObserver(s=>{s.getEntries().forEach(i=>{e(d(i,r))})});return n.observe({type:"resource",buffered:!0}),()=>n.disconnect()}var k="__emmDiagnostics__";function p(e){return typeof e=="object"&&e!==null}function o(e){return typeof e=="number"&&Number.isFinite(e)?e:null}function R(e){if(!p(e))return null;const r=o(e.startTime),n=o(e.responseEnd),s=o(e.transferSize),i=o(e.decodedBodySize);return typeof e.name!="string"||typeof e.initiatorType!="string"||r===null||n===null||s===null||i===null?null:{name:e.name,initiatorType:e.initiatorType,startTime:r,responseEnd:n,transferSize:s,decodedBodySize:i}}function D(e){if(!p(e)||e.mark!=="__emmDiagnostics__")return null;if(e.type==="paint"||e.type==="settled"){const r=o(e.at);return r===null?null:{type:e.type,at:r}}if(e.type==="resources"){const r=o(e.timeOrigin);return r===null||!Array.isArray(e.items)?null:{type:"resources",records:e.items.map(R).filter(n=>n!==null).map(n=>d(n,r))}}return null}var c=null,m=null,u=!1,l=!1;function E(){return c?!0:(c=y(e=>t.getDiagnosticsStore().resources.push(e)),c!==null)}function w(){if(m!==null)return!0;if(!t.isDiagnosticsEnabled()||typeof window>"u")return!1;const e=r=>{const n=D(r.data);if(!n)return;const s=t.getDiagnosticsStore();if(n.type==="paint"){u||(u=!0,s.marks.push({phase:t.PHASES.canvasPainted,at:n.at}));return}if(n.type==="settled"){l||(l=!0,s.marks.push({phase:t.PHASES.canvasSettled,at:n.at}));return}n.records.forEach(i=>s.resources.push(i))};return window.addEventListener("message",e),m=()=>window.removeEventListener("message",e),!0}function v(){t.clearDiagnostics(),u=!1,l=!1}async function P(){if(!t.isDiagnosticsEnabled()||typeof window>"u")return!1;const{buildReportPayload:e,renderReportHtml:r}=await(0,f.__vitePreload)(async()=>{const{buildReportPayload:i,renderReportHtml:O}=await Promise.resolve().then(()=>a("./43ebd972.js"));return{buildReportPayload:i,renderReportHtml:O}},void 0,{}.url),n=r(e(t.getDiagnosticsSnapshot(),t.getResourcesSnapshot())),s=window.open("","_blank");return s?(s.document.open(),s.document.write(n),s.document.close(),!0):!1}async function T(){const{buildReportPayload:e}=await(0,f.__vitePreload)(async()=>{const{buildReportPayload:r}=await Promise.resolve().then(()=>a("./43ebd972.js"));return{buildReportPayload:r}},void 0,{}.url);return e(t.getDiagnosticsSnapshot(),t.getResourcesSnapshot())}function A(){if(!t.isDiagnosticsEnabled())return!1;t.drainLoaderMarks(),E(),w();const e=t.getBrandNamespace();return e?(e.diagnostics={snapshot:t.getDiagnosticsSnapshot,resources:t.getResourcesSnapshot,report:P,export:T,clear:v},!0):!1}g.installDiagnostics=A});
1
+ __useblocks__.define("static/core/a2fb7ae9.js",["require","exports","module","static/core/2ff39ddf.js","static/core/a71d1c3a.js","vite/preload-helper"],function(a,g,z){const j=a("./2ff39ddf.js"),t=a("./a71d1c3a.js");let f=a("vite/preload-helper");var h=3e3,S=/\.(woff2?|ttf|otf|eot)(\?|$)/i;function b(e){if(S.test(e.name))return"font";switch(e.initiatorType){case"script":return"script";case"link":case"css":return"style";case"fetch":case"xmlhttprequest":return"fetch";case"img":case"image":return"image";default:return"other"}}function _(e){return e.decodedBodySize===0&&e.transferSize===0?{transferred:null,fromCache:null}:{transferred:e.transferSize,fromCache:e.transferSize===0}}function d(e,r){return{name:e.name,kind:b(e),startedAt:t.toAbsolute(e.startTime,r),finishedAt:t.toAbsolute(e.responseEnd,r),..._(e)}}function y(e){if(!t.isDiagnosticsEnabled()||typeof PerformanceObserver>"u")return null;performance.setResourceTimingBufferSize(h);const{timeOrigin:r}=performance,n=new PerformanceObserver(s=>{s.getEntries().forEach(i=>{e(d(i,r))})});return n.observe({type:"resource",buffered:!0}),()=>n.disconnect()}var k="__emmDiagnostics__";function p(e){return typeof e=="object"&&e!==null}function o(e){return typeof e=="number"&&Number.isFinite(e)?e:null}function R(e){if(!p(e))return null;const r=o(e.startTime),n=o(e.responseEnd),s=o(e.transferSize),i=o(e.decodedBodySize);return typeof e.name!="string"||typeof e.initiatorType!="string"||r===null||n===null||s===null||i===null?null:{name:e.name,initiatorType:e.initiatorType,startTime:r,responseEnd:n,transferSize:s,decodedBodySize:i}}function D(e){if(!p(e)||e.mark!=="__emmDiagnostics__")return null;if(e.type==="paint"||e.type==="settled"){const r=o(e.at);return r===null?null:{type:e.type,at:r}}if(e.type==="resources"){const r=o(e.timeOrigin);return r===null||!Array.isArray(e.items)?null:{type:"resources",records:e.items.map(R).filter(n=>n!==null).map(n=>d(n,r))}}return null}var c=null,m=null,u=!1,l=!1;function E(){return c?!0:(c=y(e=>t.getDiagnosticsStore().resources.push(e)),c!==null)}function w(){if(m!==null)return!0;if(!t.isDiagnosticsEnabled()||typeof window>"u")return!1;const e=r=>{const n=D(r.data);if(!n)return;const s=t.getDiagnosticsStore();if(n.type==="paint"){u||(u=!0,s.marks.push({phase:t.PHASES.canvasPainted,at:n.at}));return}if(n.type==="settled"){l||(l=!0,s.marks.push({phase:t.PHASES.canvasSettled,at:n.at}));return}n.records.forEach(i=>s.resources.push(i))};return window.addEventListener("message",e),m=()=>window.removeEventListener("message",e),!0}function v(){t.clearDiagnostics(),u=!1,l=!1}async function P(){if(!t.isDiagnosticsEnabled()||typeof window>"u")return!1;const{buildReportPayload:e,renderReportHtml:r}=await(0,f.__vitePreload)(async()=>{const{buildReportPayload:i,renderReportHtml:O}=await Promise.resolve().then(()=>a("./4a69114d.js"));return{buildReportPayload:i,renderReportHtml:O}},void 0,{}.url),n=r(e(t.getDiagnosticsSnapshot(),t.getResourcesSnapshot())),s=window.open("","_blank");return s?(s.document.open(),s.document.write(n),s.document.close(),!0):!1}async function T(){const{buildReportPayload:e}=await(0,f.__vitePreload)(async()=>{const{buildReportPayload:r}=await Promise.resolve().then(()=>a("./4a69114d.js"));return{buildReportPayload:r}},void 0,{}.url);return e(t.getDiagnosticsSnapshot(),t.getResourcesSnapshot())}function A(){if(!t.isDiagnosticsEnabled())return!1;t.drainLoaderMarks(),E(),w();const e=t.getBrandNamespace();return e?(e.diagnostics={snapshot:t.getDiagnosticsSnapshot,resources:t.getResourcesSnapshot,report:P,export:T,clear:v},!0):!1}g.installDiagnostics=A});
@@ -0,0 +1,10 @@
1
+ __useblocks__.define("static/core/a7e83e25.js",["require","exports","module","static/core/2ff39ddf.js","static/core/cf7d1dd7.js","static/core/a71d1c3a.js","dayjs"],function(E,s,Ce){const z=E("./2ff39ddf.js"),I=E("./cf7d1dd7.js"),T=E("./a71d1c3a.js");let l=E("dayjs");l=z.__toESM(l);var o={PRODUCT_CAROUSEL:"productCarousel",SINGLE_IMAGE_PREVIEW:"singleImagePreview",DEAL_ANNOTATION:"dealAnnotation",DEAL_CARD:"dealCard"},x="emailmaker-gmail-annotations";function b(e){return/^[A-Za-z]{3}$/.test((e??"").trim())}function K(e){return typeof e=="object"&&e!==null}function P(e,n){const t=e[n];return typeof t=="string"?t:""}var B=new Set(["PromotionCard","DiscountOffer","Organization"]);function N(e){let n;try{n=JSON.parse(e)}catch{return!1}const t=Array.isArray(n)?n:[n];return t.length===0?!1:t.every(r=>typeof r=="object"&&r!==null&&B.has(String(r["@type"])))}function V(){let e=new Date().getTime(),n=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let r=Math.random()*16;return e>0?(r=(e+r)%16|0,e=Math.floor(e/16)):(r=(n+r)%16|0,n=Math.floor(n/16)),(t==="x"?r:r&3|8).toString(16)})}function C(e){return e.annotationType||o.PRODUCT_CAROUSEL}function f(e){return!!(e?.image||e?.url||e?.headline||e?.price||e?.priceCurrency||e?.discountValue)}function h(e){return!e.description&&!e.discountCode&&!e.availabilityStarts&&!e.availabilityEnds}function O(e){return typeof e=="string"&&e.trim().length>0}function S(e){return O(e)?/^https?:\/\//i.test(e.trim()):!1}function L(e){return O(e?.image)&&S(e?.url)}function $(e){switch(C(e)){case o.SINGLE_IMAGE_PREVIEW:return L(e.cards?.[0]);case o.DEAL_ANNOTATION:return!h(e);case o.DEAL_CARD:return O(e.description)&&(S(e.offerPageUrl)||S(e.merchantHomepageUrl));case o.PRODUCT_CAROUSEL:default:return!!e.cards?.some(L)}}function Y(e){switch(C(e)){case o.SINGLE_IMAGE_PREVIEW:return!f(e.cards?.[0])&&!O(e.discountCode);case o.DEAL_ANNOTATION:return h(e);case o.DEAL_CARD:return h(e)&&!e.offerPageUrl&&!e.merchantHomepageUrl;case o.PRODUCT_CAROUSEL:default:return!e.cards?.some(f)}}function Z(e){switch(C(e)){case o.DEAL_ANNOTATION:case o.DEAL_CARD:return!!(e.description||e.discountCode||e.availabilityStarts||e.availabilityEnds||e.offerPageUrl||e.merchantHomepageUrl);case o.SINGLE_IMAGE_PREVIEW:return f(e.cards?.[0]);case o.PRODUCT_CAROUSEL:default:return e.logo?!0:!!e.cards?.some(f)}}function q(e){let n=typeof e.price=="string"||typeof e.price=="number"?String(e.price):"",t=typeof e.discountValue=="string"||typeof e.discountValue=="number"?String(e.discountValue):"";const r=typeof e.em_regularPrice=="string"||typeof e.em_regularPrice=="number"?String(e.em_regularPrice):"",i=typeof e.em_price=="string"||typeof e.em_price=="number"?String(e.em_price):"";if(!n&&r&&(n=r),!t&&n&&i){const u=parseFloat(n),c=parseFloat(i);!isNaN(u)&&!isNaN(c)&&u>=c&&(t=String(u-c))}return{id:V(),image:typeof e.image=="string"?e.image:"",url:typeof e.url=="string"?e.url:"",headline:typeof e.headline=="string"?e.headline:"",price:n,priceCurrency:typeof e.priceCurrency=="string"?e.priceCurrency:"",discountValue:t}}function v(e,n){const t={"@context":"http://schema.org/","@type":"PromotionCard",image:e.image};if(e.url&&(t.url=e.url),e.headline&&(t.headline=e.headline),e.price&&(t.price=e.price),e.priceCurrency){const r=e.priceCurrency.trim();t.priceCurrency=b(r)?r.toUpperCase():r}return e.discountValue&&(t.discountValue=e.discountValue),n&&(t.position=n),t}function D(e){const n={"@context":"http://schema.org/","@type":"DiscountOffer"};for(const t of["description","discountCode","availabilityStarts","availabilityEnds","offerPageUrl","merchantHomepageUrl"]){const r=e[t];r&&(n[t]=r)}return n}function j(e){return{"@context":"http://schema.org/","@type":"Organization",logo:e}}function X(e){const n=C(e),t=[];if(n===o.DEAL_CARD)return[D(e)];if(n===o.DEAL_ANNOTATION){const r=[];return e.logo&&r.push(j(e.logo)),r.push(D(e)),r}if(e.logo&&t.push(j(e.logo)),n===o.SINGLE_IMAGE_PREVIEW){const r=e.cards?.[0];return e.discountCode?.trim()&&t.push(D(e)),r&&f(r)&&t.push(v(r)),t}return(e.cards||[]).filter(f).forEach((r,i)=>{t.push(v(r,i+1))}),t}function Q(e){return e.replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function ee(e){if(Y(e))return null;const n=Q(JSON.stringify(X(e),null,2));return`<script type="application/ld+json" id="${x}">
2
+ ${n}
3
+ <\/script>`}function G(e,n){const t=e.toLowerCase().indexOf("<\/script>",n);return t===-1?-1:t+9}function w(e,n,t,r){return{range:{start:n,end:r},contentRange:{start:t,end:r-9}}}function R(e){const n=new RegExp(`<script\\b[^>]*\\bid=["']${x}["']`,"i").exec(e);if(n?.index!==void 0){const i=e.indexOf(">",n.index)+1;if(i<=0)return null;const u=G(e,i);if(u!==-1)return w(e,n.index,i,u)}const t=/<script\b[^>]*type=["']application\/ld\+json["'][^>]*>/gi;let r;for(;(r=t.exec(e))!==null;){const i=r.index+r[0].length,u=G(e,i);if(u!==-1&&N(e.slice(i,u-9)))return w(e,r.index,i,u)}return null}function ne(e){const n=e.indexOf(">")+1,t=e.toLowerCase().lastIndexOf("<\/script>");return n<=0||t===-1?e:e.slice(n,t)}function te(e){const n=/<\/head>/i.exec(e);if(n?.index!==void 0)return n.index;const t=/<head\b[^>]*>/i.exec(e);if(t?.index!==void 0)return t.index+t[0].length;const r=/<body\b[^>]*>/i.exec(e);return r?.index!==void 0?r.index:e.length}function H(e,n){let{start:t,end:r}=n;return t>0&&e[t-1]===`
4
+ `?t-=1:r<e.length&&e[r]===`
5
+ `&&(r+=1),{start:t,end:r}}function re(e,n){const t=R(e),r=ee(n);if(!r&&!t)return null;if(t&&!r){const c=H(e,t.range);return e.slice(c.start,c.end)?{range:c,text:""}:null}if(t&&r){const c=ne(r);return e.slice(t.contentRange.start,t.contentRange.end)===c?null:{range:t.contentRange,text:c}}if(!r)return null;const i=te(e),u=`${i>0&&e[i-1]!==`
6
+ `?`
7
+ `:""}${r}
8
+ `;return{range:{start:i,end:i},text:u}}function ie(e){const n=R(e);return n?e.slice(n.contentRange.start,n.contentRange.end):null}function oe(e){let n=e;for(let t=0;t<50;t++){const r=R(n);if(!r)return n;const{start:i,end:u}=H(n,r.range);n=n.slice(0,i)+n.slice(u)}return n}function ce(e){try{const n=new DOMParser().parseFromString(e,"text/html").querySelectorAll('script[type="application/ld+json"]');for(let t=0;t<n.length;t++){const r=n[t];if(r.id==="emailmaker-gmail-annotations"||N(r.textContent||"")){const i=JSON.parse(r.textContent||"[]"),u=(Array.isArray(i)?i:[i]).filter(K),c={cards:[]};let y=!1,J=!1,W=!1;return u.forEach(g=>{const _=P(g,"@type");if(_==="Organization"){const a=P(g,"logo");a&&(c.logo=a);return}if(_==="DiscountOffer"){J=!0;for(const a of["description","discountCode","availabilityStarts","availabilityEnds"]){const A=P(g,a);A&&(c[a]=A)}for(const a of["offerPageUrl","merchantHomepageUrl"]){const A=P(g,a);A&&(c[a]=A,y=!0)}return}_==="PromotionCard"&&(g.position!==void 0&&(W=!0),c.cards.push(q(g)))}),c.cards.length>1?c.annotationType=o.PRODUCT_CAROUSEL:c.cards.length===1?c.annotationType=W?o.PRODUCT_CAROUSEL:o.SINGLE_IMAGE_PREVIEW:J&&(c.annotationType=y?o.DEAL_CARD:o.DEAL_ANNOTATION),c}}}catch{}return null}function ue(e){return e.replaceAll(`\r
9
+ `,`
10
+ `)}function se(e){if(!e)return"";const n=document.createElement("textarea");return n.innerHTML=e,n.value.replace(/\u00A0/g," ").trim()}var ae=["USD","EUR","GBP","JPY","CNY","CAD","AUD","CHF","INR","BRL","MXN","KRW","RUB","UAH","KZT","PLN","TRY","SEK","NOK","DKK","CZK","ILS","AED","SGD","HKD","NZD","ZAR"];function p(e){let n=(e??"").replace(/[\s\u00A0%]/g,"");return n=n.includes(".")?n.replace(/,/g,""):n.replace(",","."),/^\d+(\.\d+)?$/.test(n)?Number(n):null}function d(e,n=2){return String(Number(e.toFixed(n)))}function m(e){const n=p(e);return n!==null&&n>0&&n<=100?n:null}function F(e,n){const t=p(e),r=m(n);return t===null||t<=0||r===null?"":d(t*r/100)}function le(e,n){if(n?.includes("%")){const c=m(n);return c===null?"":d(c)}const t=p(e),r=p(n);if(t===null||t<=0||r===null||r<=0)return"";const i=r/t*100,u=d(r);for(const c of[0,1,2]){const y=d(i,c);if(F(e,y)===u)return y}return d(i)}function M(){return{id:I.generateUUID(),image:"",url:"",headline:"",price:"",priceCurrency:"",discountPercent:""}}function fe({discountValue:e,...n}){return{...n,discountPercent:le(n.price,e)}}function k(e,n){return n?.length?n.map(fe):e===o.PRODUCT_CAROUSEL||e===o.SINGLE_IMAGE_PREVIEW?[M()]:[]}function pe(e=o.PRODUCT_CAROUSEL){return{annotationType:e,annotationLogo:"",description:"",discountCode:"",availabilityStarts:null,availabilityEnds:null,offerPageUrl:"",merchantHomepageUrl:"",cards:k(e)}}function ge(e){const n=e.annotationType||o.PRODUCT_CAROUSEL;return{annotationType:n,annotationLogo:e.logo||"",description:e.description||"",discountCode:e.discountCode||"",availabilityStarts:e.availabilityStarts?(0,l.default)(e.availabilityStarts):null,availabilityEnds:e.availabilityEnds?(0,l.default)(e.availabilityEnds):null,offerPageUrl:e.offerPageUrl||"",merchantHomepageUrl:e.merchantHomepageUrl||"",cards:k(n,e.cards)}}function de(e){const n=e.cards||[];return{annotationType:typeof e.annotationType=="string"?e.annotationType:o.PRODUCT_CAROUSEL,logo:typeof e.annotationLogo=="string"?e.annotationLogo:"",description:typeof e.description=="string"?e.description:"",discountCode:typeof e.discountCode=="string"?e.discountCode:"",availabilityStarts:e.availabilityStarts&&l.default.isDayjs(e.availabilityStarts)?e.availabilityStarts.toISOString():void 0,availabilityEnds:e.availabilityEnds&&l.default.isDayjs(e.availabilityEnds)?e.availabilityEnds.toISOString():void 0,offerPageUrl:typeof e.offerPageUrl=="string"?e.offerPageUrl:"",merchantHomepageUrl:typeof e.merchantHomepageUrl=="string"?e.merchantHomepageUrl:"",cards:n.map(t=>({id:t.id||I.generateUUID(),image:t.image||"",url:t.url||"",headline:t.headline||"",price:t.price||"",priceCurrency:t.priceCurrency||"",discountValue:F(t.price,t.discountPercent)}))}}function me(e,n){const t=e.getContent();if(!t)return!1;const r=re(t,n);if(!r||t.slice(r.range.start,r.range.end)===r.text)return!1;const i=t.slice(r.range.start,r.range.end);return e.mutate({changes:[new T.TextChange(r.range.start,i,r.range.start,r.text)]},{source:"user"}),!0}function ye(e,n){return e?e.emailId!==n.emailId||e.markup!==n.markup:!0}function Ae(e){const n=e.getContent(),t=oe(n);return t===n?!1:(e.mutate({changes:[new T.TextChange(0,n,0,t)]},{source:"user"}),!0)}function U(e){return!!e&&/^https?:\/\//i.test(e.trim())}function Ee(e,n){const t=e.annotationType??o.PRODUCT_CAROUSEL,r=[];return t===o.PRODUCT_CAROUSEL||t===o.SINGLE_IMAGE_PREVIEW?(e.cards?.some(i=>!!i.image&&U(i.url))||r.push(n("At least one card needs an image and a link starting with https://")),e.cards?.some(i=>!!i.priceCurrency?.trim()&&!b(i.priceCurrency))&&r.push(n("Price currency must be a three-letter ISO 4217 code, for example USD")),r):t===o.DEAL_CARD?(e.description?.trim()||r.push(n("Discount description is required")),!U(e.offerPageUrl)&&!U(e.merchantHomepageUrl)&&r.push(n("Offer page or merchant homepage link starting with https:// is required")),r):(!e.description&&!e.discountCode&&!e.availabilityStarts&&!e.availabilityEnds&&r.push(n("Fill in at least one offer field")),r)}function Pe(e,n){const t=[],r=e.filter(i=>!!i.discountPercent?.trim());return r.some(i=>m(i.discountPercent)===null)&&t.push(n("Discount must be a percentage greater than 0 and up to 100")),r.some(i=>{const u=p(i.price);return m(i.discountPercent)!==null&&(u===null||u<=0)})&&t.push(n("Enter the price as a number to calculate the discount")),t}Object.defineProperty(s,"GMAIL_ANNOTATION_TYPES",{enumerable:!0,get:function(){return o}}),Object.defineProperty(s,"POPULAR_PRICE_CURRENCIES",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(s,"applyAnnotationsEditToDocument",{enumerable:!0,get:function(){return me}}),Object.defineProperty(s,"buildAnnotationsData",{enumerable:!0,get:function(){return de}}),Object.defineProperty(s,"canApplyGmailAnnotations",{enumerable:!0,get:function(){return $}}),Object.defineProperty(s,"createEmptyAnnotationCard",{enumerable:!0,get:function(){return M}}),Object.defineProperty(s,"formatPreviewSubjectLine",{enumerable:!0,get:function(){return se}}),Object.defineProperty(s,"getAnnotationsApplyBlockers",{enumerable:!0,get:function(){return Ee}}),Object.defineProperty(s,"getDiscountPercentBlockers",{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(s,"getEmptyAnnotationsFormValues",{enumerable:!0,get:function(){return pe}}),Object.defineProperty(s,"hasGmailAnnotationsPreviewContent",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(s,"isValidPriceCurrency",{enumerable:!0,get:function(){return b}}),Object.defineProperty(s,"mapParsedAnnotationsToFormValues",{enumerable:!0,get:function(){return ge}}),Object.defineProperty(s,"normalizeEditorHtml",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(s,"parseDecimalInput",{enumerable:!0,get:function(){return p}}),Object.defineProperty(s,"parseDiscountPercent",{enumerable:!0,get:function(){return m}}),Object.defineProperty(s,"parseGmailAnnotations",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(s,"readGmailAnnotationsScript",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(s,"removeAnnotationsFromDocument",{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(s,"shouldReloadAnnotationsForm",{enumerable:!0,get:function(){return ye}})});
@@ -1 +1 @@
1
- __useblocks__.define("static/core/d98674b7.js",["require","exports","module","static/core/2ff39ddf.js","static/core/e8499e21.js"],function(n,u,P){const x=n("./2ff39ddf.js"),p=n("./e8499e21.js");var b={items_per_page:"/ сторінці",jump_to:"Перейти",jump_to_confirm:"підтвердити",page:"",prev_page:"Попередня сторінка",next_page:"Наступна сторінка",prev_5:"Попередні 5 сторінок",next_5:"Наступні 5 сторінок",prev_3:"Попередні 3 сторінки",next_3:"Наступні 3 сторінки",page_size:"Page Size"};function o(r){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(r)}function i(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);e&&(a=a.filter(function(v){return Object.getOwnPropertyDescriptor(r,v).enumerable})),t.push.apply(t,a)}return t}function c(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?i(Object(t),!0).forEach(function(a){d(r,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach(function(a){Object.defineProperty(r,a,Object.getOwnPropertyDescriptor(t,a))})}return r}function d(r,e,t){return e=f(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function f(r){var e=y(r,"string");return o(e)=="symbol"?e:String(e)}function y(r,e){if(o(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var a=t.call(r,e||"default");if(o(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var g=c(c({},p.commonLocale),{},{locale:"uk_UA",today:"Сьогодні",now:"Зараз",backToToday:"Поточна дата",ok:"OK",clear:"Очистити",week:"Тиждень",month:"Місяць",year:"Рік",timeSelect:"Обрати час",dateSelect:"Обрати дату",monthSelect:"Обрати місяць",yearSelect:"Обрати рік",decadeSelect:"Обрати десятиріччя",previousMonth:"Попередній місяць (PageUp)",nextMonth:"Наступний місяць (PageDown)",previousYear:"Попередній рік (Control + left)",nextYear:"Наступний рік (Control + right)",previousDecade:"Попереднє десятиріччя",nextDecade:"Наступне десятиріччя",previousCentury:"Попереднє століття",nextCentury:"Наступне століття"}),s={placeholder:"Оберіть час",rangePlaceholder:["Початковий час","Кінцевий час"]},m={lang:{placeholder:"Оберіть дату",yearPlaceholder:"Оберіть рік",quarterPlaceholder:"Оберіть квартал",monthPlaceholder:"Оберіть місяць",weekPlaceholder:"Оберіть тиждень",rangePlaceholder:["Початкова дата","Кінцева дата"],rangeYearPlaceholder:["Початковий рік","Кінцевий рік"],rangeMonthPlaceholder:["Початковий місяць","Кінцевий місяць"],rangeWeekPlaceholder:["Початковий тиждень","Кінцевий тиждень"],shortWeekDays:["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],shortMonths:["Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","Лис","Гру"],...g},timePickerLocale:{...s}},h=m,l="${label} не є типом ${type}",$={locale:"uk",Pagination:b,DatePicker:m,TimePicker:s,Calendar:h,global:{placeholder:"Будь ласка, оберіть",close:"Закрити",show:"Показати",hide:"Приховати"},Table:{filterTitle:"Фільтрувати",filterConfirm:"OK",filterReset:"Скинути",filterEmptyText:"Фільтри відсутні",filterCheckAll:"Обрати всі",filterSearchPlaceholder:"Пошук у фільтрах",emptyText:"Даних немає",selectAll:"Обрати всі на сторінці",selectInvert:"Інвертувати вибір",selectNone:"Очистити вибір",selectionAll:"Обрати всі",sortTitle:"Сортувати",expand:"Розгорнути рядок",collapse:"Згорнути рядок",triggerDesc:"Сортувати за спаданням",triggerAsc:"Сортувати за зростанням",cancelSort:"Відмінити сортування"},Tour:{Next:"Далі",Previous:"Назад",Finish:"Завершити"},Modal:{okText:"Гаразд",cancelText:"Скасувати",justOkText:"Гаразд"},Popconfirm:{okText:"Гаразд",cancelText:"Скасувати"},Transfer:{titles:["",""],searchPlaceholder:"Введіть текст для пошуку",itemUnit:"елем.",itemsUnit:"елем.",remove:"Видалити",selectCurrent:"Вибрати поточну сторінку",removeCurrent:"Скасувати вибір на сторінці",selectAll:"Вибрати всі дані",deselectAll:"Очистити вибір",removeAll:"Скасувати вибір",selectInvert:"Інвертувати поточну сторінку"},Upload:{uploading:"Завантаження ...",removeFile:"Видалити файл",uploadError:"Помилка завантаження",previewFile:"Попередній перегляд файлу",downloadFile:"Завантажити файл"},Empty:{description:"Даних немає"},Icon:{icon:"іконка"},Text:{edit:"Редагувати",copy:"Скопіювати",copied:"Скопійовано",expand:"Розширити"},Form:{optional:"(опціонально)",defaultValidateMessages:{default:"Помилка валідації для поля ${label}",required:"Будь ласка, заповніть ${label}",enum:"Лише одне зі значень [${enum}] доступне для ${label}",whitespace:"Значення у полі ${label} не може бути пробілом",date:{format:"Не валідний формат дати у ${label}",parse:"Значення ${label} не може бути приведене до дати",invalid:"Не валідна дата у ${label}"},types:{string:l,method:l,array:l,object:l,number:l,date:l,boolean:l,integer:l,float:l,regexp:l,email:l,url:l,hex:l},string:{len:"${label} має містити ${len} символів",min:"${label} має містити не менш, ніж ${min} символів",max:"${label} має містити не більш, ніж ${max} символів",range:"${label} має містити ${min}-${max} символів"},number:{len:"${label} має дорівнювати ${len}",min:"${label} має бути не менш, ніж ${min}",max:"${label} має бути не більш, ніж ${max}",range:"${label} має бути в межах ${min}-${max}"},array:{len:"${label} має містити ${len} елементи",min:"${label} має містити не менш, ніж ${min} елементи",max:"${label} має містити не більш, ніж ${max} елементи",range:"Кількість елементів в ${label} має бути в межах ${min}-${max}"},pattern:{mismatch:"${label} не відповідає шаблону ${pattern}"}}},QRCode:{expired:"QR-код закінчився",refresh:"Оновити"}};u.default=$});
1
+ __useblocks__.define("static/core/addbb53c.js",["require","exports","module","static/core/2ff39ddf.js","static/core/a71d1c3a.js"],function(n,u,P){const x=n("./2ff39ddf.js"),p=n("./a71d1c3a.js");var b={items_per_page:"/ сторінці",jump_to:"Перейти",jump_to_confirm:"підтвердити",page:"",prev_page:"Попередня сторінка",next_page:"Наступна сторінка",prev_5:"Попередні 5 сторінок",next_5:"Наступні 5 сторінок",prev_3:"Попередні 3 сторінки",next_3:"Наступні 3 сторінки",page_size:"Page Size"};function o(r){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(r)}function i(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);e&&(a=a.filter(function(v){return Object.getOwnPropertyDescriptor(r,v).enumerable})),t.push.apply(t,a)}return t}function c(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?i(Object(t),!0).forEach(function(a){d(r,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach(function(a){Object.defineProperty(r,a,Object.getOwnPropertyDescriptor(t,a))})}return r}function d(r,e,t){return e=f(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function f(r){var e=y(r,"string");return o(e)=="symbol"?e:String(e)}function y(r,e){if(o(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var a=t.call(r,e||"default");if(o(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var g=c(c({},p.commonLocale),{},{locale:"uk_UA",today:"Сьогодні",now:"Зараз",backToToday:"Поточна дата",ok:"OK",clear:"Очистити",week:"Тиждень",month:"Місяць",year:"Рік",timeSelect:"Обрати час",dateSelect:"Обрати дату",monthSelect:"Обрати місяць",yearSelect:"Обрати рік",decadeSelect:"Обрати десятиріччя",previousMonth:"Попередній місяць (PageUp)",nextMonth:"Наступний місяць (PageDown)",previousYear:"Попередній рік (Control + left)",nextYear:"Наступний рік (Control + right)",previousDecade:"Попереднє десятиріччя",nextDecade:"Наступне десятиріччя",previousCentury:"Попереднє століття",nextCentury:"Наступне століття"}),s={placeholder:"Оберіть час",rangePlaceholder:["Початковий час","Кінцевий час"]},m={lang:{placeholder:"Оберіть дату",yearPlaceholder:"Оберіть рік",quarterPlaceholder:"Оберіть квартал",monthPlaceholder:"Оберіть місяць",weekPlaceholder:"Оберіть тиждень",rangePlaceholder:["Початкова дата","Кінцева дата"],rangeYearPlaceholder:["Початковий рік","Кінцевий рік"],rangeMonthPlaceholder:["Початковий місяць","Кінцевий місяць"],rangeWeekPlaceholder:["Початковий тиждень","Кінцевий тиждень"],shortWeekDays:["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],shortMonths:["Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","Лис","Гру"],...g},timePickerLocale:{...s}},h=m,l="${label} не є типом ${type}",$={locale:"uk",Pagination:b,DatePicker:m,TimePicker:s,Calendar:h,global:{placeholder:"Будь ласка, оберіть",close:"Закрити",show:"Показати",hide:"Приховати"},Table:{filterTitle:"Фільтрувати",filterConfirm:"OK",filterReset:"Скинути",filterEmptyText:"Фільтри відсутні",filterCheckAll:"Обрати всі",filterSearchPlaceholder:"Пошук у фільтрах",emptyText:"Даних немає",selectAll:"Обрати всі на сторінці",selectInvert:"Інвертувати вибір",selectNone:"Очистити вибір",selectionAll:"Обрати всі",sortTitle:"Сортувати",expand:"Розгорнути рядок",collapse:"Згорнути рядок",triggerDesc:"Сортувати за спаданням",triggerAsc:"Сортувати за зростанням",cancelSort:"Відмінити сортування"},Tour:{Next:"Далі",Previous:"Назад",Finish:"Завершити"},Modal:{okText:"Гаразд",cancelText:"Скасувати",justOkText:"Гаразд"},Popconfirm:{okText:"Гаразд",cancelText:"Скасувати"},Transfer:{titles:["",""],searchPlaceholder:"Введіть текст для пошуку",itemUnit:"елем.",itemsUnit:"елем.",remove:"Видалити",selectCurrent:"Вибрати поточну сторінку",removeCurrent:"Скасувати вибір на сторінці",selectAll:"Вибрати всі дані",deselectAll:"Очистити вибір",removeAll:"Скасувати вибір",selectInvert:"Інвертувати поточну сторінку"},Upload:{uploading:"Завантаження ...",removeFile:"Видалити файл",uploadError:"Помилка завантаження",previewFile:"Попередній перегляд файлу",downloadFile:"Завантажити файл"},Empty:{description:"Даних немає"},Icon:{icon:"іконка"},Text:{edit:"Редагувати",copy:"Скопіювати",copied:"Скопійовано",expand:"Розширити"},Form:{optional:"(опціонально)",defaultValidateMessages:{default:"Помилка валідації для поля ${label}",required:"Будь ласка, заповніть ${label}",enum:"Лише одне зі значень [${enum}] доступне для ${label}",whitespace:"Значення у полі ${label} не може бути пробілом",date:{format:"Не валідний формат дати у ${label}",parse:"Значення ${label} не може бути приведене до дати",invalid:"Не валідна дата у ${label}"},types:{string:l,method:l,array:l,object:l,number:l,date:l,boolean:l,integer:l,float:l,regexp:l,email:l,url:l,hex:l},string:{len:"${label} має містити ${len} символів",min:"${label} має містити не менш, ніж ${min} символів",max:"${label} має містити не більш, ніж ${max} символів",range:"${label} має містити ${min}-${max} символів"},number:{len:"${label} має дорівнювати ${len}",min:"${label} має бути не менш, ніж ${min}",max:"${label} має бути не більш, ніж ${max}",range:"${label} має бути в межах ${min}-${max}"},array:{len:"${label} має містити ${len} елементи",min:"${label} має містити не менш, ніж ${min} елементи",max:"${label} має містити не більш, ніж ${max} елементи",range:"Кількість елементів в ${label} має бути в межах ${min}-${max}"},pattern:{mismatch:"${label} не відповідає шаблону ${pattern}"}}},QRCode:{expired:"QR-код закінчився",refresh:"Оновити"}};u.default=$});
@@ -1,7 +1,7 @@
1
- __useblocks__.define("static/core/66619f08.js",["require","exports","module","static/core/2ff39ddf.js"],function(Ct,Et,nn){const on=Ct("./2ff39ddf.js");function x(t){const e=new Map;return t&&t.split(";").map(n=>n.trim()).filter(Boolean).forEach(n=>{const o=n.indexOf(":");if(o===-1)return;const r=n.slice(0,o).trim().toLowerCase(),i=n.slice(o+1).trim();r&&e.set(r,i)}),e}function R(t){return t.replace(/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])(?![0-9a-fA-F])/g,(e,n,o,r)=>`#${n}${n}${o}${o}${r}${r}`)}function P(t){return Array.from(t.entries()).filter(([,e])=>e!==""&&e!=null).map(([e,n])=>`${e}: ${R(n)};`).join(" ")}function E(t){const e=o=>{if(!o)return null;const r=/^(-?\d+(?:\.\d+)?)px$/.exec(o.trim());return r?Math.round(parseFloat(r[1])):/^0$/.test(o.trim())?0:null},n=t.get("padding");if(n){const o=n.trim().split(/\s+/);if(o.length===1){const r=e(o[0]);return{top:r,right:r,bottom:r,left:r}}if(o.length===2){const r=e(o[0]),i=e(o[1]);return{top:r,right:i,bottom:r,left:i}}if(o.length===3)return{top:e(o[0]),right:e(o[1]),bottom:e(o[2]),left:e(o[1])};if(o.length===4)return{top:e(o[0]),right:e(o[1]),bottom:e(o[2]),left:e(o[3])}}return{top:e(t.get("padding-top")),right:e(t.get("padding-right")),bottom:e(t.get("padding-bottom")),left:e(t.get("padding-left"))}}function T(t,e){return t==null&&e==null?null:(t??0)+(e??0)}function Pt(t,e){return{top:T(t.top,e.top),right:T(t.right,e.right),bottom:T(t.bottom,e.bottom),left:T(t.left,e.left)}}function Q(t,e,n){if(!e&&!n)return;const o=E(t),r=o.top??0,i=(o.right??0)+n,l=o.bottom??0,s=(o.left??0)+e;t.delete("padding"),t.delete("padding-top"),t.delete("padding-right"),t.delete("padding-bottom"),t.delete("padding-left"),t.set("padding",`${r}px ${i}px ${l}px ${s}px`)}function Mt(t){const e=t.top??0,n=t.right??0,o=t.bottom??0,r=t.left??0;return e===0&&n===0&&o===0&&r===0?"":`padding: ${e}px ${n}px ${o}px ${r}px;`}function L(t,e){if(t)return x(t.getAttribute("style")).get(e.toLowerCase())}function M(t){if(!t)return null;const e=t.getAttribute("width");if(e){const o=e.trim();if(/^\d+(\.\d+)?$/.test(o))return Math.round(parseFloat(o));const r=/^(\d+(?:\.\d+)?)px$/i.exec(o);if(r)return Math.round(parseFloat(r[1]))}const n=L(t,"width")??L(t,"max-width");if(n){const o=/^(\d+(?:\.\d+)?)px$/i.exec(n.trim());if(o)return Math.round(parseFloat(o[1]))}return null}function Ft(t,e){const n=M(t);if(n!=null)return n;const o=t.getAttribute("width")?.trim()??"",r=/^(\d+(?:\.\d+)?)%$/.exec(o);return r?Math.round(parseFloat(r[1])/100*e):e}function y(t){return t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Tt(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}var Lt=["font-family","font-size","font-weight","font-style","line-height","letter-spacing","color","direction","text-decoration","text-transform"];function Nt(...t){const e=new Map;return Lt.forEach(n=>{for(const o of t){const r=o?.get(n);if(r!=null&&r!==""){e.set(n,r);break}}}),e}function Bt(t){if(!t)return null;const e=/^(-?\d+(?:\.\d+)?)px$/i.exec(t.trim());return e?parseFloat(e[1]):null}function Rt(t){const e=t.get("line-height")?.trim();if(!e||e==="normal"||e==="inherit")return;const n=/^(-?\d+(?:\.\d+)?)px$/i.exec(e);if(n){t.set("line-height",`${Math.round(parseFloat(n[1]))}px`);return}const o=Bt(t.get("font-size"));if(o==null)return;const r=/^(\d+(?:\.\d+)?)%$/.exec(e);if(r){t.set("line-height",`${Math.round(o*parseFloat(r[1])/100)}px`);return}const i=/^(\d+(?:\.\d+)?)em$/i.exec(e);if(i){t.set("line-height",`${Math.round(o*parseFloat(i[1]))}px`);return}const l=/^(\d+(?:\.\d+)?)$/.exec(e);l&&t.set("line-height",`${Math.round(o*parseFloat(l[1]))}px`)}function zt(t){const e=t.get("letter-spacing")?.trim();e!=null&&(/^-?(?:\d+(?:\.\d+)?|\.\d+)/.test(e)||t.delete("letter-spacing"))}function Ht(t,e){[t,...Array.from(t.querySelectorAll("[style]"))].forEach(n=>{const o=n.getAttribute("style");if(!o||!o.toLowerCase().includes(e.toLowerCase()))return;const r=x(o);if(!r.has(e))return;r.delete(e);const i=P(r);i?n.setAttribute("style",i):n.removeAttribute("style")})}function qt(t){t.get("direction")?.trim().toLowerCase()==="ltr"&&t.delete("direction")}function It(...t){for(const e of t){const n=e?.get("text-align");if(n)return n}}function tt(t){const e=t?/^(\d+(?:\.\d+)?)px$/.exec(t.trim()):null;return e?Math.round(parseFloat(e[1])):null}function et(t,e){const n=tt(t.get(`margin-${e}`));if(n!=null)return n;const o=t.get("margin");if(!o)return null;const r=o.trim().split(/\s+/);return tt(r[e==="top"||r.length<3?0:2])}function jt(t){return et(t,"top")}function Ot(t){return et(t,"bottom")}var D={top:null,right:null,bottom:null,left:null};function Wt(){return{padPadding:{top:null,right:null,bottom:null,left:null},divFontSize:null,divLineHeight:null,divTextAlign:null,btnFontSize:null,btnLineHeight:null,btnWidthPerc:null,spacerHeight:null}}function G(t){if(!t)return null;const e=/^(-?\d+(?:\.\d+)?)px$/i.exec(t.trim());if(e)return Math.round(parseFloat(e[1]));const n=/^(-?\d+(?:\.\d+)?)$/.exec(t.trim());return n?Math.round(parseFloat(n[1])):null}function Dt(t){if(!t)return null;const e=/^(\d+(?:\.\d+)?)%$/.exec(t.trim());return e?Math.round(parseFloat(e[1])):null}function Gt(t){const e=t?.trim().toLowerCase();return e==="left"||e==="center"||e==="right"?e:null}function nt(t,e){let n=0;for(let o=e;o<t.length;o+=1)if(t[o]==="{")n+=1;else if(t[o]==="}"&&(n-=1,n===0))return o;return-1}function U(t,e){["top","right","bottom","left"].forEach(n=>{e[n]!=null&&(t[n]=e[n])})}function Ut(t){const e=x(t.replace(/!important/gi,"")),n=["padding","padding-top","padding-right","padding-bottom","padding-left"].some(o=>e.has(o));return{padding:n?E(e):{...D},hasPadding:n,fontSize:G(e.get("font-size")),lineHeight:G(e.get("line-height")),textAlign:Gt(e.get("text-align")),widthPerc:Dt(e.get("width")),height:G(e.get("height"))}}function Vt(t,e){const n=t.blocks.get(e);if(n)return n;const o=Wt();return t.blocks.set(e,o),o}function Zt(t,e,n){const o=/\.row-(\d+)\b/.exec(t);if(!o)return;const r=o[1],i=/\.column-(\d+)\b/.exec(t),l=/\.block-(\d+)\b/.exec(t);if(t.includes(".row-content")&&!i&&!l){if(e.hasPadding){const b=n.rowContentPadding.get(r)??{...D};U(b,e.padding),n.rowContentPadding.set(r,b)}return}if(i&&!l&&!t.includes(".row-content")){if(e.hasPadding){const b=`${r}|${i[1]}`,d=n.columnPadding.get(b)??{...D};U(d,e.padding),n.columnPadding.set(b,d)}return}if(!i||!l)return;const s=Vt(n,`${r}|${i[1]}|${l[1]}`),c=/td\.pad\s*>\s*div/.test(t)||/\bh[1-6]\b/.test(t),a=/\.button\b/.test(t),h=/\bspan\b/.test(t),f=/\.spacer_block\b/.test(t),g=/td\.pad\b/.test(t);if(f){e.height!=null&&(s.spacerHeight=e.height);return}if(c){e.fontSize!=null&&(s.divFontSize=e.fontSize),e.lineHeight!=null&&(s.divLineHeight=e.lineHeight),e.textAlign!=null&&(s.divTextAlign=e.textAlign);return}if(h){e.fontSize!=null&&(s.btnFontSize=e.fontSize),e.lineHeight!=null&&(s.btnLineHeight=e.lineHeight);return}if(a){e.widthPerc!=null&&(s.btnWidthPerc=e.widthPerc);return}g&&e.hasPadding&&U(s.padPadding,e.padding)}function Kt(t,e){let n=0;for(;n<t.length;){const o=t.indexOf("{",n);if(o===-1)break;const r=t.slice(n,o).trim(),i=nt(t,o);if(i===-1)break;const l=t.slice(o+1,i);if(!r.startsWith("@")){const s=Ut(l);r.split(",").forEach(c=>Zt(c.trim(),s,e))}n=i+1}}function Yt(t){const e={rowContentPadding:new Map,columnPadding:new Map,blocks:new Map},n=Array.from(t.querySelectorAll("style")).map(r=>r.textContent??"").join(`
2
- `);let o=0;for(;o<n.length;){const r=n.indexOf("@media",o);if(r===-1)break;const i=n.indexOf("{",r);if(i===-1)break;const l=n.slice(r,i),s=nt(n,i);if(s===-1)break;/max-width|max-device-width/i.test(l)&&Kt(n.slice(i+1,s),e),o=s+1}return e}function ot(t,e){if(!t)return[];const n=["top","right","bottom","left"],o=[];return n.forEach(r=>{const i=t[r];i!=null&&i!==(e[r]??0)&&o.push(`em-mob-padding_${r}-${i}`)}),o}function Xt(t){const e=/\bblock-(\d+)\b/.exec(t.getAttribute("class")??""),n=t.closest("td.column"),o=n?/\bcolumn-(\d+)\b/.exec(n.getAttribute("class")??""):null,r=t.closest("table.row"),i=r?/\brow-(\d+)\b/.exec(r.getAttribute("class")??""):null;return!i||!o||!e?null:`${i[1]}|${o[1]}|${e[1]}`}var Jt="em-show-td-mobile",Qt="em-show-td-desktop";function rt(t){const e=t.getAttribute("class")??"";return/\bdesktop_hide\b/.test(e)?"mobile":/\bmobile_hide\b/.test(e)?"desktop":"all"}function te(t){return t==="mobile"?{className:Jt,inlineStyle:"display: none;",wrapNonMso:!0}:t==="desktop"?{className:Qt,inlineStyle:"",wrapNonMso:!1}:{className:"",inlineStyle:"",wrapNonMso:!1}}var it="-apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif";function lt(t,e){if(!e)return null;const n=(t.get("font-style")??"").toLowerCase().includes("italic"),o=e.register(t.get("font-family"),t.get("font-weight"),n);return o?(t.set("font-family",o.fallback),o.emClass):null}function ee(t){const e=t.closest("table")?.getAttribute("cellpadding");if(e==null)return null;const n=parseInt(e.trim(),10);return Number.isFinite(n)?n:null}function st(t,e){const n=E(e),o=ee(t);return o==null?n:{top:n.top??o,right:n.right??o,bottom:n.bottom??o,left:n.left??o}}function at(t,e){return t==null?null:(e??0)+t}function ne(t){const e=t.top??0,n=t.right??0,o=t.bottom??0,r=t.left??0;return e===0&&n===0&&o===0&&r===0?"":`padding: ${e}px ${n}px ${o}px ${r}px;`}function ct(t,e,n){const o=n?.left??0,r=n?.right??0,i=n?.mobileLeft??o,l=n?.mobileRight??r,s=t.top??0,c=(t.right??0)+r,a=t.bottom??0,h=(t.left??0)+o,f=[],g=(b,d,w)=>{d!==w&&f.push(`em-mob-padding_${b}-${d}`)};return e?.top!=null&&g("top",e.top,s),e?.bottom!=null&&g("bottom",e.bottom,a),(e?.left!=null||i!==o)&&g("left",(e?.left??t.left??0)+i,h),(e?.right!=null||l!==r)&&g("right",(e?.right??t.right??0)+l,c),{style:ne({top:s,right:c,bottom:a,left:h}),classes:f}}function N(t,e,n=""){const o=[];t.align&&o.push(`align="${y(t.align)}"`),t.valign&&o.push(`valign="${y(t.valign)}"`),t.width&&o.push(`width="${y(t.width)}"`),t.height&&o.push(`height="${y(t.height)}"`),t.className&&o.push(`class="${y(t.className)}"`);let r=t.style??"";if(t.insetX&&(t.insetX.left||t.insetX.right)){const a=x(r);Q(a,t.insetX.left,t.insetX.right),r=P(a)}r&&o.push(`style="${y(r)}"`);const i=o.length?` ${o.join(" ")}`:"",l=["em-mob-width-100perc"];let s="";t.visibility==="desktop"?l.push("em-show-table-desktop"):t.visibility==="mobile"&&(l.push("em-show-table-mobile"),s=' style="display: none;"');const c=`<table cellpadding="0" cellspacing="0" border="0" width="100%" class="${l.join(" ")}"${s} em="atom"${n}><tr><td${i}>${e}</td></tr></table>`;return t.visibility==="mobile"?`<!--[if !mso]><!-->${c}<!--<![endif]-->`:c}function ut(t){return t.querySelector("td.pad")??t.querySelector("td")}function j(t,e){if(!e)return;const n=Xt(t);return n?e.blocks.get(n):void 0}function z(t,e,n,o){const r=ut(t),i=r?st(r,x(r.getAttribute("style"))):{top:null,right:null,bottom:null,left:null},l=i.top==null&&i.right==null&&i.bottom==null&&i.left==null,s=j(t,e);return ct(o&&l?o:i,s?.padPadding,n)}function oe(t){if(!t)return[];const e=[];return t.divFontSize!=null&&e.push(`em-mob-font_size-${t.divFontSize}px`),t.divLineHeight!=null&&e.push(`em-mob-line_height-${t.divLineHeight}px`),e}var O="p, h1, h2, h3, h4, h5, h6",dt="data-em-text-run",re=`${O}, [${dt}]`;function ie(t){const e=t;return t.nodeType===1&&e.querySelector(O)!=null}function le(t){return t.map(e=>e.textContent??"").join("").replace(/\u00a0/g," ").trim()!==""?!0:t.some(e=>{const n=e;return e.nodeType===1&&(n.matches("img")||n.querySelector("img")!=null)})}function se(t){const e=t.ownerDocument;if(!e)return;const n=o=>{let r=[];const i=()=>{const l=r;if(r=[],l.length===0||!le(l))return;const s=e.createElement("div");s.setAttribute(dt,""),o.insertBefore(s,l[0]),l.forEach(c=>s.appendChild(c))};Array.from(o.childNodes).forEach(l=>{if(l.nodeType===1&&l.matches(O)){i();return}if(ie(l)){i(),n(l);return}r.push(l)}),i()};n(t)}function ft(t,e){let n=t;for(;n;){const o=Array.from(n.classList).find(r=>r.startsWith("em-font-"));if(o)return o;if(n===e)return null;n=n.parentElement}return null}function ae(t,e){let n=t.parentElement;for(;n&&n!==e;){const o=x(n.getAttribute("style"));if(o.get("font-family")||o.get("font-size")||o.get("color"))return o;n=n.parentElement}return new Map}function ce(t,e,n,o,r){const i=ut(t);if(!i)return"";const l=x(i.getAttribute("style")),s=st(i,l),c=i.getAttribute("align")??void 0,a=j(t,e),h=oe(a);i.querySelector(O)&&se(i);let f=Array.from(i.querySelectorAll(re));if(f.length===0){const d=i.querySelector("div");d&&(d.textContent??"").trim()!==""?f=[d]:(i.textContent??"").trim()!==""&&(f=[i])}if(f.length===0)return"";const g=/\bheading_block\b/.test(t.getAttribute("class")??""),b=f.length;return f.map((d,w)=>{const m=x(d.getAttribute("style")),u=ae(d,i),p=Nt(m,u,l);g&&!p.get("font-weight")&&p.set("font-weight","700"),p.get("font-family")||p.set("font-family",it),Rt(p),zt(p),qt(p);const A=lt(p,n)??ft(d,i),_=It(m,u,l)??d.getAttribute("align")??c??"left",C=jt(m),$=Ot(m),k={top:T(C,w===0?s.top:null),right:s.right,bottom:T($,w===b-1?s.bottom:null),left:s.left};Ht(d,"word-break");const v=d.innerHTML.trim(),B=A?[...h,A]:h,H=`<div${B.length?` class="${B.join(" ")}"`:""} style="${P(p)}">${v}</div>`,{style:q,classes:I}=ct(k,{top:w===0?at(a?.padPadding.top,C):null,right:a?.padPadding.right??null,bottom:w===b-1?at(a?.padPadding.bottom,$):null,left:a?.padPadding.left??null},o),F=[...I];return a?.divTextAlign!=null&&F.push(`em-mob-text_align-${a.divTextAlign}`),N({align:_??void 0,style:q||void 0,className:F.length?F.join(" "):void 0,visibility:r},H)}).join(`
3
- `)}function ue(t,e,n,o){const r=t.querySelector("img");if(!r)return"";const i=r.getAttribute("src")??"";if(!i)return"";const l=r.getAttribute("alt")??"",s=r.getAttribute("width"),c=x(r.getAttribute("style")),a=r.closest('div[style*="max-width"]'),h=a?L(a,"max-width"):c.get("max-width"),f=new Map;f.set("display","block"),f.set("width","100%"),h&&f.set("max-width",h);const g=c.get("border-radius");g&&f.set("border-radius",g);const b=r.getAttribute("title")??"",d=`<img src="${y(i)}"${s?` width="${y(s)}"`:""} border="0" alt="${y(l)}"${b?` title="${y(b)}"`:""} style="${P(f)}">`,w=r.closest("a")?.getAttribute("href"),m=w?`<a href="${y(w)}" target="_blank">${d}</a>`:d,u=(t.querySelector(".alignment")??t.querySelector("[align]"))?.getAttribute("align")??"center",{style:p,classes:A}=z(t,e,n);return N({align:u,style:p||void 0,className:A.length?A.join(" "):void 0,visibility:o},m)}function V(t,e){for(const n of t){const o=L(n,e);if(o)return o}}function de(t,e){const n=t.querySelector("span.button");if(n)return n;if(x(e.getAttribute("style")).has("background-color"))return e;const o=Array.from(e.querySelectorAll("div, span")).find(r=>x(r.getAttribute("style")).has("background-color"));return o||(Array.from(e.children).find(r=>/^(?:div|span)$/i.test(r.tagName))??e)}function fe(t,e){let n=E(e);return n.top!=null&&n.right!=null&&n.bottom!=null&&n.left!=null||Array.from(t.querySelectorAll("span, div")).forEach(o=>{const r=E(x(o.getAttribute("style")));n={top:n.top??r.top,right:n.right??r.right,bottom:n.bottom??r.bottom,left:n.left??r.left}}),n}function he(t){const e=(t.get("width")??"").trim();if(e===""||e==="auto")return"";const n=/^(\d+(?:\.\d+)?)px$/.exec(e);return n?` width="${n[1]}"`:/^\d+(?:\.\d+)?%$/.test(e)?` width="${e}"`:""}function ge(t){const e=[],n=o=>{Array.from(o.childNodes).forEach(r=>{if(r.nodeType===Node.TEXT_NODE){e.push(Tt((r.textContent??"").replace(/\s+/g," ")));return}if(r instanceof Element){if(r.tagName.toLowerCase()==="br"){e.push("<br>");return}n(r)}})};return n(t),e.join("").replace(/ *<br> */g,"<br>").replace(/^(?:<br>)+|(?:<br>)+$/g,"").trim()||"Button"}function me(t,e,n,o,r){const i=t.querySelector("a[href]");if(!i)return"";const l=i.getAttribute("href")??"",s=de(t,i),c=x(s.getAttribute("style")),a=Array.from(s.querySelectorAll("span")),h=j(t,e),f=R(c.get("background-color")??"#1C52DC"),g=R(c.get("color")??"#FFFFFF"),b=c.get("border-radius")??"5px",d=c.get("font-size")??V(a,"font-size")??"16px",w=c.get("font-family")??it,m=c.get("font-weight")??V(a,"font-weight"),u=fe(s,c),p=u.top!=null||u.right!=null||u.bottom!=null||u.left!=null?`${u.top??0}px ${u.right??0}px ${u.bottom??0}px ${u.left??0}px`:"10px 20px",A=V(a,"line-height")??c.get("line-height")??`${parseInt(d,10)+12}px`,_=ge(s),C=new Map;f&&f!=="transparent"&&C.set("background-color",f),C.set("border-radius",b);const $=new Map;$.set("display","block"),$.set("font-family",w),m&&$.set("font-weight",m),$.set("color",g),$.set("font-size",d),$.set("line-height",A),$.set("padding",p),$.set("text-decoration","none"),c.get("white-space")==="nowrap"&&$.set("white-space","nowrap");const k=lt($,n)??ft(s,t),v=[];k&&v.push(k),h?.btnFontSize!=null&&v.push(`em-mob-font_size-${h.btnFontSize}px`),h?.btnLineHeight!=null&&v.push(`em-mob-line_height-${h.btnLineHeight}px`);const B=v.length?` class="${v.join(" ")}"`:"",H=h?.btnWidthPerc!=null?` class="em-mob-width-${h.btnWidthPerc}perc"`:"",q=`<table cellpadding="0" cellspacing="0" border="0"${he(c)}${H}><tr><td align="center" valign="middle"${f&&f!=="transparent"?` bgcolor="${y(R(f))}"`:""} style="${P(C)}"><a href="${y(l)}" target="_blank"${B} style="${P($)}">${_}</a></td></tr></table>`,I=(t.querySelector(".alignment")??t.querySelector("[align]"))?.getAttribute("align")??"center",{style:F,classes:W}=z(t,e,o,{top:10,right:null,bottom:10,left:null});return N({align:I,style:F||void 0,className:W.length?W.join(" "):void 0,visibility:r},q)}function pe(t,e,n,o){const r=t.querySelector(".divider_inner")??t.querySelector('td[style*="border-top"]'),i=L(r,"border-top")??"1px solid #BFBFBF",{style:l,classes:s}=z(t,e,n,{top:20,right:null,bottom:null,left:null});return N({height:"0",style:`${l}${l?" ":""}border-top: ${i};`,className:s.length?s.join(" "):void 0,visibility:o},"&nbsp;")}function be(t,e,n,o){const r=t.matches(".spacer_block")?t:t.querySelector(".spacer_block"),i=r?L(r,"height"):void 0,l=i?parseInt(i,10):NaN;if(!Number.isFinite(l)||l<=0)return"";const s=j(t,e),c=[];s?.spacerHeight!=null&&s.spacerHeight!==l&&c.push(`em-mob-height-${s.spacerHeight}px`);const{style:a,classes:h}=z(t,e,n);return c.push(...h),N({height:String(l),style:a||void 0,className:c.length?c.join(" "):void 0,visibility:o},"")}function we(t,e,n,o){const r=Array.from(t.querySelectorAll("a")).map(h=>{const f=h.getAttribute("href")??"",g=h.querySelector("img");if(!g)return"";const b=g.getAttribute("src")??"",d=g.getAttribute("width")??"40",w=g.getAttribute("alt")??"",m=g.getAttribute("title")??"",u=Math.round(parseFloat(d))||40,p=Math.round(parseFloat(g.getAttribute("height")??""))||null,A=p?` height="${p}"`:"",_=p?"":"height:auto;";return`<td><a href="${y(f)}" target="_blank"><img src="${y(b)}" width="${u}"${A} border="0" alt="${y(w)}"${m?` title="${y(m)}"`:""} style="display:block;${_}"></a></td>`}).filter(Boolean);if(r.length===0)return"";const i=r.reduce((h,f,g)=>(g>0&&h.push('<td width="5">&nbsp;</td>'),h.push(f),h),[]),l=(t.querySelector(".alignment")??t.querySelector("[align]"))?.getAttribute("align")??"center",s=`<table border="0" cellspacing="0" cellpadding="0"><tr>${i.join("")}</tr></table>`,{style:c,classes:a}=z(t,e,n);return N({align:l,style:c||void 0,className:a.length?a.join(" "):void 0,visibility:o},s,' em-type="social"')}function Z(t,e,n,o){const r=t.getAttribute("class")??"",i=rt(t);return/\bheading_block\b/.test(r)||/\bparagraph_block\b/.test(r)||/\btext_block\b/.test(r)?ce(t,e,n,o,i):/\bimage_block\b/.test(r)?ue(t,e,o,i):/\bbutton_block\b/.test(r)?me(t,e,n,o,i):/\bdivider_block\b/.test(r)?pe(t,e,o,i):/\bspacer_block\b/.test(r)?be(t,e,o,i):/\bsocial_block\b/.test(r)?we(t,e,o,i):""}function ye(t){const e=[];return Array.from(t.children).forEach(n=>{n.tagName.toLowerCase()==="tbody"?e.push(...Array.from(n.children)):e.push(n)}),e.filter(n=>n.tagName.toLowerCase()==="tr")}function ht(t){return ye(t).find(e=>/\bem-structure\b/.test(e.getAttribute("class")??""))??null}function xe(t){return/\brow-content\b/.test(t.getAttribute("class")??"")}function $e(t){return t.tagName.toLowerCase()!=="table"||t.getAttribute("em")!=="block"||xe(t)?!1:ht(t)!==null}function gt(t){const e=ht(t);if(!e)return null;const n=Array.from(e.children).filter(o=>o.tagName.toLowerCase()==="td");return n.length===0?null:`<tr em="block">${n.map(o=>o.outerHTML).join("")}</tr>`}var rn=".paragraph_block, .text_block, .heading_block, .image_block, .button_block, .divider_block, .spacer_block, .social_block";function Ae(t){return t.tagName.toLowerCase()==="table"&&/\brow-content\b/.test(t.getAttribute("class")??"")}function Se(t){return Ae(t)?"row-content":$e(t)?"em-block":t.matches(".paragraph_block, .text_block, .heading_block, .image_block, .button_block, .divider_block, .spacer_block, .social_block")?"beefree-block":null}function K(t){return(t.textContent??"").trim()!==""||t.querySelector("img")!==null}function ke(t){return t.tagName.toLowerCase()!=="table"?!1:K(t)}function mt(t,e){return(t.getAttribute("class")??"").split(/\s+/).includes(e)}function ve(t){return t.tagName.toLowerCase()==="table"&&(mt(t,"row")||mt(t,"row-content"))}function _e(t,e){let n=e;for(;n&&n.parentElement!==t;)n=n.parentElement;return n}function Ce(t){if(t)for(let e=0;e<8;e+=1){const n=new Map;let o=!1;if(Array.from(t.querySelectorAll("table")).forEach(r=>{if(!ve(r)||!r.parentElement?.closest("table.row-content"))return;const i=_e(t,r);!i||i===r||((n.get(i)??i).insertAdjacentElement("afterend",r),n.set(i,r),o=!0)}),!o)return}}function Ee(t){const e=[];if(!t)return e;const n=o=>{if(o.matches(".preheader"))return;const r=Se(o);if(r){e.push({kind:r,element:o});return}const i=e.length;Array.from(o.children).forEach(n),e.length===i&&ke(o)&&e.push({kind:"unknown",element:o})};return Array.from(t.children).forEach(n),e}var Pe=/^\.(em-mob-[A-Za-z0-9_-]+)$/,pt=/([^{}]+)\{([^{}]*)\}/g;function Me(t){return t.split(";").map(e=>e.trim()).filter(e=>e!=="").map(e=>` ${e};`).join(`
4
- `)}function Fe(t){const e=new Map;return t.querySelectorAll('style[em="styles"]').forEach(n=>{const o=n.textContent??"";let r;for(pt.lastIndex=0;(r=pt.exec(o))!==null;){const i=r[1].trim(),l=Pe.exec(i);if(!l||e.has(l[1]))continue;const s=Me(r[2]);s!==""&&e.set(l[1],s)}}),e}var bt={Thin:"100","Thin Italic":"100i",ExtraLight:"200","ExtraLight Italic":"200i",Light:"300","Light Italic":"300i",Regular:"400","Regular Italic":"400i",Medium:"500","Medium Italic":"500i",SemiBold:"600","SemiBold Italic":"600i",Bold:"700","Bold Italic":"700i",ExtraBold:"800","ExtraBold Italic":"800i",Black:"900","Black Italic":"900i"},Te={"Sans Serif":"sans-serif",Serif:"serif"},Le={100:"Thin",200:"ExtraLight",300:"Light",400:"Regular",500:"Medium",600:"SemiBold",700:"Bold",800:"ExtraBold",900:"Black"};function Y(t){return t.replace(/\s+/g," ").trim().toLowerCase()}function wt(t){return(t.split(",")[0]??"").trim().replace(/^['"]/,"").replace(/['"]$/,"").trim()}function yt(t){const e=t.split(",").map(n=>n.trim().replace(/^['"]|['"]$/g,"").toLowerCase());return e.includes("serif")&&!e.includes("sans-serif")?"Serif":"Sans Serif"}function xt(t,e){let n=(t??"").trim().toLowerCase();n==="bold"?n="700":(n==="normal"||n==="")&&(n="400");const o=Le[n]??"Regular";return e?`${o} Italic`:o}function Ne(t,e){return`em-font-${t.replace(/\s/g,"")}-${e.replace(/\s/g,"")}`}function $t(t){const e=[],n=t.split("?")[1];return n&&n.split("&").forEach(o=>{const r=o.indexOf("=");if(r===-1)return;const i=o.slice(0,r),l=o.slice(r+1);if(i!=="family"||!l)return;let s=l;try{s=decodeURIComponent(l.replace(/\+/g," "))}catch{s=l.replace(/\+/g," ")}s.split("|").forEach(c=>{const a=c.split(":")[0].trim();a&&e.push(a)})}),e}function Be(t){const e=new Set;t.querySelectorAll("link[href]").forEach(o=>{const r=o.getAttribute("href")??"";r.includes("fonts.googleapis.com")&&$t(r).forEach(i=>e.add(Y(i)))});const n=/@import\s+(?:url\(\s*)?['"]?(https?:\/\/fonts\.googleapis\.com\/[^'")\s]+)/g;return t.querySelectorAll("style").forEach(o=>{const r=o.textContent??"";let i;for(;(i=n.exec(r))!==null;)$t(i[1]).forEach(l=>e.add(Y(l)))}),e}function Re(t,e){const n=new RegExp(`(?:^|;)\\s*${e}\\s*:([^;]+)`,"i").exec(t)?.[1];return n?n.replace(/!important/gi,"").trim():void 0}function ze(t){const e=new Map,n=/([^{}]+)\{([^{}]*)\}/g;t.querySelectorAll("style").forEach(r=>{const i=r.textContent??"";let l;for(n.lastIndex=0;(l=n.exec(i))!==null;){const s=l[2];l[1].split(",").forEach(c=>{const a=/^\s*\.(em-font-[A-Za-z0-9_-]+)\s*$/.exec(c);if(!a)return;const h=e.get(a[1])??new Map;["font-family","font-weight","font-style"].forEach(f=>{const g=Re(s,f);g&&h.set(f,g)}),e.set(a[1],h)})}});const o=new Map;return e.forEach((r,i)=>{const l=r.get("font-family"),s=l?wt(l):"";if(!l||!s)return;const c=(r.get("font-style")??"").toLowerCase().includes("italic");o.set(i,{emClass:i,family:s,variant:xt(r.get("font-weight"),c),category:yt(l)})}),o}var He=class{imported;emFontRules;used=new Map;constructor(t,e=new Map){this.imported=t,this.emFontRules=e}register(t,e,n=!1){if(!t)return null;const o=wt(t);if(!o||!this.imported.has(Y(o)))return null;const r=yt(t),i=xt(e,n),l=Ne(o,i);return this.used.has(l)||this.used.set(l,{emClass:l,family:o,variant:i,category:r}),{emClass:l,fallback:r==="Serif"?'"Times New Roman", Times, serif':"Helvetica, Arial, sans-serif"}}registerEmFontClasses(t){const e=/em-font-[A-Za-z0-9_-]+/g;let n;for(;(n=e.exec(t))!==null;){const o=this.emFontRules.get(n[0]);o&&!this.used.has(o.emClass)&&this.used.set(o.emClass,o)}}get hasFonts(){return this.used.size>0}linkTags(){return Array.from(this.used.values()).map(({emClass:t,family:e,variant:n})=>{const o=bt[n]??"400",r=o.includes("i"),i=o.replace(/i/g,"");return` <link rel="stylesheet" href="${`https://fonts.googleapis.com/css2?family=${e}:ital,wght@${r?"1":"0"},${i}&display=swap`}" em-class="${t}">`}).join(`
1
+ __useblocks__.define("static/core/b1edf5c5.js",["require","exports","module","static/core/2ff39ddf.js"],function(Ct,Et,nn){const on=Ct("./2ff39ddf.js");function x(t){const e=new Map;return t&&t.split(";").map(n=>n.trim()).filter(Boolean).forEach(n=>{const o=n.indexOf(":");if(o===-1)return;const r=n.slice(0,o).trim().toLowerCase(),i=n.slice(o+1).trim();r&&e.set(r,i)}),e}function R(t){return t.replace(/#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])(?![0-9a-fA-F])/g,(e,n,o,r)=>`#${n}${n}${o}${o}${r}${r}`)}function P(t){return Array.from(t.entries()).filter(([,e])=>e!==""&&e!=null).map(([e,n])=>`${e}: ${R(n)};`).join(" ")}function E(t){const e=o=>{if(!o)return null;const r=/^(-?\d+(?:\.\d+)?)px$/.exec(o.trim());return r?Math.round(parseFloat(r[1])):/^0$/.test(o.trim())?0:null},n=t.get("padding");if(n){const o=n.trim().split(/\s+/);if(o.length===1){const r=e(o[0]);return{top:r,right:r,bottom:r,left:r}}if(o.length===2){const r=e(o[0]),i=e(o[1]);return{top:r,right:i,bottom:r,left:i}}if(o.length===3)return{top:e(o[0]),right:e(o[1]),bottom:e(o[2]),left:e(o[1])};if(o.length===4)return{top:e(o[0]),right:e(o[1]),bottom:e(o[2]),left:e(o[3])}}return{top:e(t.get("padding-top")),right:e(t.get("padding-right")),bottom:e(t.get("padding-bottom")),left:e(t.get("padding-left"))}}function T(t,e){return t==null&&e==null?null:(t??0)+(e??0)}function Pt(t,e){return{top:T(t.top,e.top),right:T(t.right,e.right),bottom:T(t.bottom,e.bottom),left:T(t.left,e.left)}}function J(t,e,n){if(!e&&!n)return;const o=E(t),r=o.top??0,i=(o.right??0)+n,l=o.bottom??0,s=(o.left??0)+e;t.delete("padding"),t.delete("padding-top"),t.delete("padding-right"),t.delete("padding-bottom"),t.delete("padding-left"),t.set("padding",`${r}px ${i}px ${l}px ${s}px`)}function Ft(t){const e=t.top??0,n=t.right??0,o=t.bottom??0,r=t.left??0;return e===0&&n===0&&o===0&&r===0?"":`padding: ${e}px ${n}px ${o}px ${r}px;`}function L(t,e){if(t)return x(t.getAttribute("style")).get(e.toLowerCase())}function F(t){if(!t)return null;const e=t.getAttribute("width");if(e){const o=e.trim();if(/^\d+(\.\d+)?$/.test(o))return Math.round(parseFloat(o));const r=/^(\d+(?:\.\d+)?)px$/i.exec(o);if(r)return Math.round(parseFloat(r[1]))}const n=L(t,"width")??L(t,"max-width");if(n){const o=/^(\d+(?:\.\d+)?)px$/i.exec(n.trim());if(o)return Math.round(parseFloat(o[1]))}return null}function Mt(t,e){const n=F(t);if(n!=null)return n;const o=t.getAttribute("width")?.trim()??"",r=/^(\d+(?:\.\d+)?)%$/.exec(o);return r?Math.round(parseFloat(r[1])/100*e):e}function y(t){return t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Tt(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}var Lt=["font-family","font-size","font-weight","font-style","line-height","letter-spacing","color","direction","text-decoration","text-transform"];function Nt(...t){const e=new Map;return Lt.forEach(n=>{for(const o of t){const r=o?.get(n);if(r!=null&&r!==""){e.set(n,r);break}}}),e}function Bt(t){if(!t)return null;const e=/^(-?\d+(?:\.\d+)?)px$/i.exec(t.trim());return e?parseFloat(e[1]):null}function Rt(t){const e=t.get("line-height")?.trim();if(!e||e==="normal"||e==="inherit")return;const n=/^(-?\d+(?:\.\d+)?)px$/i.exec(e);if(n){t.set("line-height",`${Math.round(parseFloat(n[1]))}px`);return}const o=Bt(t.get("font-size"));if(o==null)return;const r=/^(\d+(?:\.\d+)?)%$/.exec(e);if(r){t.set("line-height",`${Math.round(o*parseFloat(r[1])/100)}px`);return}const i=/^(\d+(?:\.\d+)?)em$/i.exec(e);if(i){t.set("line-height",`${Math.round(o*parseFloat(i[1]))}px`);return}const l=/^(\d+(?:\.\d+)?)$/.exec(e);l&&t.set("line-height",`${Math.round(o*parseFloat(l[1]))}px`)}function zt(t){const e=t.get("letter-spacing")?.trim();e!=null&&(/^-?(?:\d+(?:\.\d+)?|\.\d+)/.test(e)||t.delete("letter-spacing"))}function Ht(t,e){[t,...Array.from(t.querySelectorAll("[style]"))].forEach(n=>{const o=n.getAttribute("style");if(!o||!o.toLowerCase().includes(e.toLowerCase()))return;const r=x(o);if(!r.has(e))return;r.delete(e);const i=P(r);i?n.setAttribute("style",i):n.removeAttribute("style")})}function qt(t){t.get("direction")?.trim().toLowerCase()==="ltr"&&t.delete("direction")}function It(...t){for(const e of t){const n=e?.get("text-align");if(n)return n}}function tt(t){const e=t?/^(\d+(?:\.\d+)?)px$/.exec(t.trim()):null;return e?Math.round(parseFloat(e[1])):null}function et(t,e){const n=tt(t.get(`margin-${e}`));if(n!=null)return n;const o=t.get("margin");if(!o)return null;const r=o.trim().split(/\s+/);return tt(r[e==="top"||r.length<3?0:2])}function jt(t){return et(t,"top")}function Ot(t){return et(t,"bottom")}var D={top:null,right:null,bottom:null,left:null};function Wt(){return{padPadding:{top:null,right:null,bottom:null,left:null},divFontSize:null,divLineHeight:null,divTextAlign:null,btnFontSize:null,btnLineHeight:null,btnWidthPerc:null,spacerHeight:null}}function G(t){if(!t)return null;const e=/^(-?\d+(?:\.\d+)?)px$/i.exec(t.trim());if(e)return Math.round(parseFloat(e[1]));const n=/^(-?\d+(?:\.\d+)?)$/.exec(t.trim());return n?Math.round(parseFloat(n[1])):null}function Dt(t){if(!t)return null;const e=/^(\d+(?:\.\d+)?)%$/.exec(t.trim());return e?Math.round(parseFloat(e[1])):null}function Gt(t){const e=t?.trim().toLowerCase();return e==="left"||e==="center"||e==="right"?e:null}function nt(t,e){let n=0;for(let o=e;o<t.length;o+=1)if(t[o]==="{")n+=1;else if(t[o]==="}"&&(n-=1,n===0))return o;return-1}function U(t,e){["top","right","bottom","left"].forEach(n=>{e[n]!=null&&(t[n]=e[n])})}function Ut(t){const e=x(t.replace(/!important/gi,"")),n=["padding","padding-top","padding-right","padding-bottom","padding-left"].some(o=>e.has(o));return{padding:n?E(e):{...D},hasPadding:n,fontSize:G(e.get("font-size")),lineHeight:G(e.get("line-height")),textAlign:Gt(e.get("text-align")),widthPerc:Dt(e.get("width")),height:G(e.get("height"))}}function Vt(t,e){const n=t.blocks.get(e);if(n)return n;const o=Wt();return t.blocks.set(e,o),o}function Zt(t,e,n){const o=/\.row-(\d+)\b/.exec(t);if(!o)return;const r=o[1],i=/\.column-(\d+)\b/.exec(t),l=/\.block-(\d+)\b/.exec(t);if(t.includes(".row-content")&&!i&&!l){if(e.hasPadding){const b=n.rowContentPadding.get(r)??{...D};U(b,e.padding),n.rowContentPadding.set(r,b)}return}if(i&&!l&&!t.includes(".row-content")){if(e.hasPadding){const b=`${r}|${i[1]}`,d=n.columnPadding.get(b)??{...D};U(d,e.padding),n.columnPadding.set(b,d)}return}if(!i||!l)return;const s=Vt(n,`${r}|${i[1]}|${l[1]}`),c=/td\.pad\s*>\s*div/.test(t)||/\bh[1-6]\b/.test(t),a=/\.button\b/.test(t),h=/\bspan\b/.test(t),f=/\.spacer_block\b/.test(t),g=/td\.pad\b/.test(t);if(f){e.height!=null&&(s.spacerHeight=e.height);return}if(c){e.fontSize!=null&&(s.divFontSize=e.fontSize),e.lineHeight!=null&&(s.divLineHeight=e.lineHeight),e.textAlign!=null&&(s.divTextAlign=e.textAlign);return}if(h){e.fontSize!=null&&(s.btnFontSize=e.fontSize),e.lineHeight!=null&&(s.btnLineHeight=e.lineHeight);return}if(a){e.widthPerc!=null&&(s.btnWidthPerc=e.widthPerc);return}g&&e.hasPadding&&U(s.padPadding,e.padding)}function Kt(t,e){let n=0;for(;n<t.length;){const o=t.indexOf("{",n);if(o===-1)break;const r=t.slice(n,o).trim(),i=nt(t,o);if(i===-1)break;const l=t.slice(o+1,i);if(!r.startsWith("@")){const s=Ut(l);r.split(",").forEach(c=>Zt(c.trim(),s,e))}n=i+1}}function Yt(t){const e={rowContentPadding:new Map,columnPadding:new Map,blocks:new Map},n=Array.from(t.querySelectorAll("style")).map(r=>r.textContent??"").join(`
2
+ `);let o=0;for(;o<n.length;){const r=n.indexOf("@media",o);if(r===-1)break;const i=n.indexOf("{",r);if(i===-1)break;const l=n.slice(r,i),s=nt(n,i);if(s===-1)break;/max-width|max-device-width/i.test(l)&&Kt(n.slice(i+1,s),e),o=s+1}return e}function ot(t,e){if(!t)return[];const n=["top","right","bottom","left"],o=[];return n.forEach(r=>{const i=t[r];i!=null&&i!==(e[r]??0)&&o.push(`em-mob-padding_${r}-${i}`)}),o}function Xt(t){const e=/\bblock-(\d+)\b/.exec(t.getAttribute("class")??""),n=t.closest("td.column"),o=n?/\bcolumn-(\d+)\b/.exec(n.getAttribute("class")??""):null,r=t.closest("table.row"),i=r?/\brow-(\d+)\b/.exec(r.getAttribute("class")??""):null;return!i||!o||!e?null:`${i[1]}|${o[1]}|${e[1]}`}var Qt="em-show-td-mobile",Jt="em-show-td-desktop";function rt(t){const e=t.getAttribute("class")??"";return/\bdesktop_hide\b/.test(e)?"mobile":/\bmobile_hide\b/.test(e)?"desktop":"all"}function te(t){return t==="mobile"?{className:Qt,inlineStyle:"display: none;",wrapNonMso:!0}:t==="desktop"?{className:Jt,inlineStyle:"",wrapNonMso:!1}:{className:"",inlineStyle:"",wrapNonMso:!1}}var it="-apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif";function lt(t,e){if(!e)return null;const n=(t.get("font-style")??"").toLowerCase().includes("italic"),o=e.register(t.get("font-family"),t.get("font-weight"),n);return o?(t.set("font-family",o.fallback),o.emClass):null}function ee(t){const e=t.closest("table")?.getAttribute("cellpadding");if(e==null)return null;const n=parseInt(e.trim(),10);return Number.isFinite(n)?n:null}function st(t,e){const n=E(e),o=ee(t);return o==null?n:{top:n.top??o,right:n.right??o,bottom:n.bottom??o,left:n.left??o}}function at(t,e){return t==null?null:(e??0)+t}function ne(t){const e=t.top??0,n=t.right??0,o=t.bottom??0,r=t.left??0;return e===0&&n===0&&o===0&&r===0?"":`padding: ${e}px ${n}px ${o}px ${r}px;`}function ct(t,e,n){const o=n?.left??0,r=n?.right??0,i=n?.mobileLeft??o,l=n?.mobileRight??r,s=t.top??0,c=(t.right??0)+r,a=t.bottom??0,h=(t.left??0)+o,f=[],g=(b,d,w)=>{d!==w&&f.push(`em-mob-padding_${b}-${d}`)};return e?.top!=null&&g("top",e.top,s),e?.bottom!=null&&g("bottom",e.bottom,a),(e?.left!=null||i!==o)&&g("left",(e?.left??t.left??0)+i,h),(e?.right!=null||l!==r)&&g("right",(e?.right??t.right??0)+l,c),{style:ne({top:s,right:c,bottom:a,left:h}),classes:f}}function N(t,e,n=""){const o=[];t.align&&o.push(`align="${y(t.align)}"`),t.valign&&o.push(`valign="${y(t.valign)}"`),t.width&&o.push(`width="${y(t.width)}"`),t.height&&o.push(`height="${y(t.height)}"`),t.className&&o.push(`class="${y(t.className)}"`);let r=t.style??"";if(t.insetX&&(t.insetX.left||t.insetX.right)){const a=x(r);J(a,t.insetX.left,t.insetX.right),r=P(a)}r&&o.push(`style="${y(r)}"`);const i=o.length?` ${o.join(" ")}`:"",l=["em-mob-width-100perc"];let s="";t.visibility==="desktop"?l.push("em-show-table-desktop"):t.visibility==="mobile"&&(l.push("em-show-table-mobile"),s=' style="display: none;"');const c=`<table cellpadding="0" cellspacing="0" border="0" width="100%" class="${l.join(" ")}"${s} em="atom"${n}><tr><td${i}>${e}</td></tr></table>`;return t.visibility==="mobile"?`<!--[if !mso]><!-->${c}<!--<![endif]-->`:c}function ut(t){return t.querySelector("td.pad")??t.querySelector("td")}function j(t,e){if(!e)return;const n=Xt(t);return n?e.blocks.get(n):void 0}function z(t,e,n,o){const r=ut(t),i=r?st(r,x(r.getAttribute("style"))):{top:null,right:null,bottom:null,left:null},l=i.top==null&&i.right==null&&i.bottom==null&&i.left==null,s=j(t,e);return ct(o&&l?o:i,s?.padPadding,n)}function oe(t){if(!t)return[];const e=[];return t.divFontSize!=null&&e.push(`em-mob-font_size-${t.divFontSize}px`),t.divLineHeight!=null&&e.push(`em-mob-line_height-${t.divLineHeight}px`),e}var O="p, h1, h2, h3, h4, h5, h6",dt="data-em-text-run",re=`${O}, [${dt}]`;function ie(t){const e=t;return t.nodeType===1&&e.querySelector(O)!=null}function le(t){return t.map(e=>e.textContent??"").join("").replace(/\u00a0/g," ").trim()!==""?!0:t.some(e=>{const n=e;return e.nodeType===1&&(n.matches("img")||n.querySelector("img")!=null)})}function se(t){const e=t.ownerDocument;if(!e)return;const n=o=>{let r=[];const i=()=>{const l=r;if(r=[],l.length===0||!le(l))return;const s=e.createElement("div");s.setAttribute(dt,""),o.insertBefore(s,l[0]),l.forEach(c=>s.appendChild(c))};Array.from(o.childNodes).forEach(l=>{if(l.nodeType===1&&l.matches(O)){i();return}if(ie(l)){i(),n(l);return}r.push(l)}),i()};n(t)}function ft(t,e){let n=t;for(;n;){const o=Array.from(n.classList).find(r=>r.startsWith("em-font-"));if(o)return o;if(n===e)return null;n=n.parentElement}return null}function ae(t,e){let n=t.parentElement;for(;n&&n!==e;){const o=x(n.getAttribute("style"));if(o.get("font-family")||o.get("font-size")||o.get("color"))return o;n=n.parentElement}return new Map}function ce(t,e,n,o,r){const i=ut(t);if(!i)return"";const l=x(i.getAttribute("style")),s=st(i,l),c=i.getAttribute("align")??void 0,a=j(t,e),h=oe(a);i.querySelector(O)&&se(i);let f=Array.from(i.querySelectorAll(re));if(f.length===0){const d=i.querySelector("div");d&&(d.textContent??"").trim()!==""?f=[d]:(i.textContent??"").trim()!==""&&(f=[i])}if(f.length===0)return"";const g=/\bheading_block\b/.test(t.getAttribute("class")??""),b=f.length;return f.map((d,w)=>{const m=x(d.getAttribute("style")),u=ae(d,i),p=Nt(m,u,l);g&&!p.get("font-weight")&&p.set("font-weight","700"),p.get("font-family")||p.set("font-family",it),Rt(p),zt(p),qt(p);const A=lt(p,n)??ft(d,i),_=It(m,u,l)??d.getAttribute("align")??c??"left",C=jt(m),$=Ot(m),k={top:T(C,w===0?s.top:null),right:s.right,bottom:T($,w===b-1?s.bottom:null),left:s.left};Ht(d,"word-break");const v=d.innerHTML.trim(),B=A?[...h,A]:h,H=`<div${B.length?` class="${B.join(" ")}"`:""} style="${P(p)}">${v}</div>`,{style:q,classes:I}=ct(k,{top:w===0?at(a?.padPadding.top,C):null,right:a?.padPadding.right??null,bottom:w===b-1?at(a?.padPadding.bottom,$):null,left:a?.padPadding.left??null},o),M=[...I];return a?.divTextAlign!=null&&M.push(`em-mob-text_align-${a.divTextAlign}`),N({align:_??void 0,style:q||void 0,className:M.length?M.join(" "):void 0,visibility:r},H)}).join(`
3
+ `)}function ue(t,e,n,o){const r=t.querySelector("img");if(!r)return"";const i=r.getAttribute("src")??"";if(!i)return"";const l=r.getAttribute("alt")??"",s=r.getAttribute("width"),c=x(r.getAttribute("style")),a=r.closest('div[style*="max-width"]'),h=a?L(a,"max-width"):c.get("max-width"),f=new Map;f.set("display","block"),f.set("width","100%"),h&&f.set("max-width",h);const g=c.get("border-radius");g&&f.set("border-radius",g);const b=r.getAttribute("title")??"",d=`<img src="${y(i)}"${s?` width="${y(s)}"`:""} border="0" alt="${y(l)}"${b?` title="${y(b)}"`:""} style="${P(f)}">`,w=r.closest("a")?.getAttribute("href"),m=w?`<a href="${y(w)}" target="_blank">${d}</a>`:d,u=(t.querySelector(".alignment")??t.querySelector("[align]"))?.getAttribute("align")??"center",{style:p,classes:A}=z(t,e,n);return N({align:u,style:p||void 0,className:A.length?A.join(" "):void 0,visibility:o},m)}function V(t,e){for(const n of t){const o=L(n,e);if(o)return o}}function de(t,e){const n=t.querySelector("span.button");if(n)return n;if(x(e.getAttribute("style")).has("background-color"))return e;const o=Array.from(e.querySelectorAll("div, span")).find(r=>x(r.getAttribute("style")).has("background-color"));return o||(Array.from(e.children).find(r=>/^(?:div|span)$/i.test(r.tagName))??e)}function fe(t,e){let n=E(e);return n.top!=null&&n.right!=null&&n.bottom!=null&&n.left!=null||Array.from(t.querySelectorAll("span, div")).forEach(o=>{const r=E(x(o.getAttribute("style")));n={top:n.top??r.top,right:n.right??r.right,bottom:n.bottom??r.bottom,left:n.left??r.left}}),n}function he(t){const e=(t.get("width")??"").trim();if(e===""||e==="auto")return"";const n=/^(\d+(?:\.\d+)?)px$/.exec(e);return n?` width="${n[1]}"`:/^\d+(?:\.\d+)?%$/.test(e)?` width="${e}"`:""}function ge(t){const e=[],n=o=>{Array.from(o.childNodes).forEach(r=>{if(r.nodeType===Node.TEXT_NODE){e.push(Tt((r.textContent??"").replace(/\s+/g," ")));return}if(r instanceof Element){if(r.tagName.toLowerCase()==="br"){e.push("<br>");return}n(r)}})};return n(t),e.join("").replace(/ *<br> */g,"<br>").replace(/^(?:<br>)+|(?:<br>)+$/g,"").trim()||"Button"}function me(t,e,n,o,r){const i=t.querySelector("a[href]");if(!i)return"";const l=i.getAttribute("href")??"",s=de(t,i),c=x(s.getAttribute("style")),a=Array.from(s.querySelectorAll("span")),h=j(t,e),f=R(c.get("background-color")??"#1C52DC"),g=R(c.get("color")??"#FFFFFF"),b=c.get("border-radius")??"5px",d=c.get("font-size")??V(a,"font-size")??"16px",w=c.get("font-family")??it,m=c.get("font-weight")??V(a,"font-weight"),u=fe(s,c),p=u.top!=null||u.right!=null||u.bottom!=null||u.left!=null?`${u.top??0}px ${u.right??0}px ${u.bottom??0}px ${u.left??0}px`:"10px 20px",A=V(a,"line-height")??c.get("line-height")??`${parseInt(d,10)+12}px`,_=ge(s),C=new Map;f&&f!=="transparent"&&C.set("background-color",f),C.set("border-radius",b);const $=new Map;$.set("display","block"),$.set("font-family",w),m&&$.set("font-weight",m),$.set("color",g),$.set("font-size",d),$.set("line-height",A),$.set("padding",p),$.set("text-decoration","none"),c.get("white-space")==="nowrap"&&$.set("white-space","nowrap");const k=lt($,n)??ft(s,t),v=[];k&&v.push(k),h?.btnFontSize!=null&&v.push(`em-mob-font_size-${h.btnFontSize}px`),h?.btnLineHeight!=null&&v.push(`em-mob-line_height-${h.btnLineHeight}px`);const B=v.length?` class="${v.join(" ")}"`:"",H=h?.btnWidthPerc!=null?` class="em-mob-width-${h.btnWidthPerc}perc"`:"",q=`<table cellpadding="0" cellspacing="0" border="0"${he(c)}${H}><tr><td align="center" valign="middle"${f&&f!=="transparent"?` bgcolor="${y(R(f))}"`:""} style="${P(C)}"><a href="${y(l)}" target="_blank"${B} style="${P($)}">${_}</a></td></tr></table>`,I=(t.querySelector(".alignment")??t.querySelector("[align]"))?.getAttribute("align")??"center",{style:M,classes:W}=z(t,e,o,{top:10,right:null,bottom:10,left:null});return N({align:I,style:M||void 0,className:W.length?W.join(" "):void 0,visibility:r},q)}function pe(t,e,n,o){const r=t.querySelector(".divider_inner")??t.querySelector('td[style*="border-top"]'),i=L(r,"border-top")??"1px solid #BFBFBF",{style:l,classes:s}=z(t,e,n,{top:20,right:null,bottom:null,left:null});return N({height:"0",style:`${l}${l?" ":""}border-top: ${i};`,className:s.length?s.join(" "):void 0,visibility:o},"&nbsp;")}function be(t,e,n,o){const r=t.matches(".spacer_block")?t:t.querySelector(".spacer_block"),i=r?L(r,"height"):void 0,l=i?parseInt(i,10):NaN;if(!Number.isFinite(l)||l<=0)return"";const s=j(t,e),c=[];s?.spacerHeight!=null&&s.spacerHeight!==l&&c.push(`em-mob-height-${s.spacerHeight}px`);const{style:a,classes:h}=z(t,e,n);return c.push(...h),N({height:String(l),style:a||void 0,className:c.length?c.join(" "):void 0,visibility:o},"")}function we(t,e,n,o){const r=Array.from(t.querySelectorAll("a")).map(h=>{const f=h.getAttribute("href")??"",g=h.querySelector("img");if(!g)return"";const b=g.getAttribute("src")??"",d=g.getAttribute("width")??"40",w=g.getAttribute("alt")??"",m=g.getAttribute("title")??"",u=Math.round(parseFloat(d))||40,p=Math.round(parseFloat(g.getAttribute("height")??""))||null,A=p?` height="${p}"`:"",_=p?"":"height:auto;";return`<td><a href="${y(f)}" target="_blank"><img src="${y(b)}" width="${u}"${A} border="0" alt="${y(w)}"${m?` title="${y(m)}"`:""} style="display:block;${_}"></a></td>`}).filter(Boolean);if(r.length===0)return"";const i=r.reduce((h,f,g)=>(g>0&&h.push('<td width="5">&nbsp;</td>'),h.push(f),h),[]),l=(t.querySelector(".alignment")??t.querySelector("[align]"))?.getAttribute("align")??"center",s=`<table border="0" cellspacing="0" cellpadding="0"><tr>${i.join("")}</tr></table>`,{style:c,classes:a}=z(t,e,n);return N({align:l,style:c||void 0,className:a.length?a.join(" "):void 0,visibility:o},s,' em-type="social"')}function Z(t,e,n,o){const r=t.getAttribute("class")??"",i=rt(t);return/\bheading_block\b/.test(r)||/\bparagraph_block\b/.test(r)||/\btext_block\b/.test(r)?ce(t,e,n,o,i):/\bimage_block\b/.test(r)?ue(t,e,o,i):/\bbutton_block\b/.test(r)?me(t,e,n,o,i):/\bdivider_block\b/.test(r)?pe(t,e,o,i):/\bspacer_block\b/.test(r)?be(t,e,o,i):/\bsocial_block\b/.test(r)?we(t,e,o,i):""}function ye(t){const e=[];return Array.from(t.children).forEach(n=>{n.tagName.toLowerCase()==="tbody"?e.push(...Array.from(n.children)):e.push(n)}),e.filter(n=>n.tagName.toLowerCase()==="tr")}function ht(t){return ye(t).find(e=>/\bem-structure\b/.test(e.getAttribute("class")??""))??null}function xe(t){return/\brow-content\b/.test(t.getAttribute("class")??"")}function $e(t){return t.tagName.toLowerCase()!=="table"||t.getAttribute("em")!=="block"||xe(t)?!1:ht(t)!==null}function gt(t){const e=ht(t);if(!e)return null;const n=Array.from(e.children).filter(o=>o.tagName.toLowerCase()==="td");return n.length===0?null:`<tr em="block">${n.map(o=>o.outerHTML).join("")}</tr>`}var rn=".paragraph_block, .text_block, .heading_block, .image_block, .button_block, .divider_block, .spacer_block, .social_block";function Ae(t){return t.tagName.toLowerCase()==="table"&&/\brow-content\b/.test(t.getAttribute("class")??"")}function Se(t){return Ae(t)?"row-content":$e(t)?"em-block":t.matches(".paragraph_block, .text_block, .heading_block, .image_block, .button_block, .divider_block, .spacer_block, .social_block")?"beefree-block":null}function K(t){return(t.textContent??"").trim()!==""||t.querySelector("img")!==null}function ke(t){return t.tagName.toLowerCase()!=="table"?!1:K(t)}function mt(t,e){return(t.getAttribute("class")??"").split(/\s+/).includes(e)}function ve(t){return t.tagName.toLowerCase()==="table"&&(mt(t,"row")||mt(t,"row-content"))}function _e(t,e){let n=e;for(;n&&n.parentElement!==t;)n=n.parentElement;return n}function Ce(t){if(t)for(let e=0;e<8;e+=1){const n=new Map;let o=!1;if(Array.from(t.querySelectorAll("table")).forEach(r=>{if(!ve(r)||!r.parentElement?.closest("table.row-content"))return;const i=_e(t,r);!i||i===r||((n.get(i)??i).insertAdjacentElement("afterend",r),n.set(i,r),o=!0)}),!o)return}}function Ee(t){const e=[];if(!t)return e;const n=o=>{if(o.matches(".preheader"))return;const r=Se(o);if(r){e.push({kind:r,element:o});return}const i=e.length;Array.from(o.children).forEach(n),e.length===i&&ke(o)&&e.push({kind:"unknown",element:o})};return Array.from(t.children).forEach(n),e}var Pe=/^\.(em-mob-[A-Za-z0-9_-]+)$/,pt=/([^{}]+)\{([^{}]*)\}/g;function Fe(t){return t.split(";").map(e=>e.trim()).filter(e=>e!=="").map(e=>` ${e};`).join(`
4
+ `)}function Me(t){const e=new Map;return t.querySelectorAll('style[em="styles"]').forEach(n=>{const o=n.textContent??"";let r;for(pt.lastIndex=0;(r=pt.exec(o))!==null;){const i=r[1].trim(),l=Pe.exec(i);if(!l||e.has(l[1]))continue;const s=Fe(r[2]);s!==""&&e.set(l[1],s)}}),e}var bt={Thin:"100","Thin Italic":"100i",ExtraLight:"200","ExtraLight Italic":"200i",Light:"300","Light Italic":"300i",Regular:"400","Regular Italic":"400i",Medium:"500","Medium Italic":"500i",SemiBold:"600","SemiBold Italic":"600i",Bold:"700","Bold Italic":"700i",ExtraBold:"800","ExtraBold Italic":"800i",Black:"900","Black Italic":"900i"},Te={"Sans Serif":"sans-serif",Serif:"serif"},Le={100:"Thin",200:"ExtraLight",300:"Light",400:"Regular",500:"Medium",600:"SemiBold",700:"Bold",800:"ExtraBold",900:"Black"};function Y(t){return t.replace(/\s+/g," ").trim().toLowerCase()}function wt(t){return(t.split(",")[0]??"").trim().replace(/^['"]/,"").replace(/['"]$/,"").trim()}function yt(t){const e=t.split(",").map(n=>n.trim().replace(/^['"]|['"]$/g,"").toLowerCase());return e.includes("serif")&&!e.includes("sans-serif")?"Serif":"Sans Serif"}function xt(t,e){let n=(t??"").trim().toLowerCase();n==="bold"?n="700":(n==="normal"||n==="")&&(n="400");const o=Le[n]??"Regular";return e?`${o} Italic`:o}function Ne(t,e){return`em-font-${t.replace(/\s/g,"")}-${e.replace(/\s/g,"")}`}function $t(t){const e=[],n=t.split("?")[1];return n&&n.split("&").forEach(o=>{const r=o.indexOf("=");if(r===-1)return;const i=o.slice(0,r),l=o.slice(r+1);if(i!=="family"||!l)return;let s=l;try{s=decodeURIComponent(l.replace(/\+/g," "))}catch{s=l.replace(/\+/g," ")}s.split("|").forEach(c=>{const a=c.split(":")[0].trim();a&&e.push(a)})}),e}function Be(t){const e=new Set;t.querySelectorAll("link[href]").forEach(o=>{const r=o.getAttribute("href")??"";r.includes("fonts.googleapis.com")&&$t(r).forEach(i=>e.add(Y(i)))});const n=/@import\s+(?:url\(\s*)?['"]?(https?:\/\/fonts\.googleapis\.com\/[^'")\s]+)/g;return t.querySelectorAll("style").forEach(o=>{const r=o.textContent??"";let i;for(;(i=n.exec(r))!==null;)$t(i[1]).forEach(l=>e.add(Y(l)))}),e}function Re(t,e){const n=new RegExp(`(?:^|;)\\s*${e}\\s*:([^;]+)`,"i").exec(t)?.[1];return n?n.replace(/!important/gi,"").trim():void 0}function ze(t){const e=new Map,n=/([^{}]+)\{([^{}]*)\}/g;t.querySelectorAll("style").forEach(r=>{const i=r.textContent??"";let l;for(n.lastIndex=0;(l=n.exec(i))!==null;){const s=l[2];l[1].split(",").forEach(c=>{const a=/^\s*\.(em-font-[A-Za-z0-9_-]+)\s*$/.exec(c);if(!a)return;const h=e.get(a[1])??new Map;["font-family","font-weight","font-style"].forEach(f=>{const g=Re(s,f);g&&h.set(f,g)}),e.set(a[1],h)})}});const o=new Map;return e.forEach((r,i)=>{const l=r.get("font-family"),s=l?wt(l):"";if(!l||!s)return;const c=(r.get("font-style")??"").toLowerCase().includes("italic");o.set(i,{emClass:i,family:s,variant:xt(r.get("font-weight"),c),category:yt(l)})}),o}var He=class{imported;emFontRules;used=new Map;constructor(t,e=new Map){this.imported=t,this.emFontRules=e}register(t,e,n=!1){if(!t)return null;const o=wt(t);if(!o||!this.imported.has(Y(o)))return null;const r=yt(t),i=xt(e,n),l=Ne(o,i);return this.used.has(l)||this.used.set(l,{emClass:l,family:o,variant:i,category:r}),{emClass:l,fallback:r==="Serif"?'"Times New Roman", Times, serif':"Helvetica, Arial, sans-serif"}}registerEmFontClasses(t){const e=/em-font-[A-Za-z0-9_-]+/g;let n;for(;(n=e.exec(t))!==null;){const o=this.emFontRules.get(n[0]);o&&!this.used.has(o.emClass)&&this.used.set(o.emClass,o)}}get hasFonts(){return this.used.size>0}linkTags(){return Array.from(this.used.values()).map(({emClass:t,family:e,variant:n})=>{const o=bt[n]??"400",r=o.includes("i"),i=o.replace(/i/g,"");return` <link rel="stylesheet" href="${`https://fonts.googleapis.com/css2?family=${e}:ital,wght@${r?"1":"0"},${i}&display=swap`}" em-class="${t}">`}).join(`
5
5
  `)}styleRules(){return Array.from(this.used.values()).map(({emClass:t,family:e,variant:n,category:o})=>{const r=bt[n]??"400",i=r.includes("i"),l=r.replace(/i/g,"");let s=`font-family: '${e}', ${Te[o]??"sans-serif"}!important; font-weight: ${l}!important;`;return i&&(s+=" font-style: italic!important;"),` .${t} { ${s} }`})}};function At(t,e){const n=new Set;let o;for(;(o=e.exec(t))!==null;)n.add(o[1]);return Array.from(n).sort((r,i)=>Number(r)-Number(i))}function qe(t){const e=new Set;return t.forEach(n=>{(n.split("{")[0].match(/\.[A-Za-z][A-Za-z0-9_-]*/g)??[]).forEach(o=>e.add(o.slice(1)))}),e}function Ie(t,e,n=[],o=new Map){const r=[];r.push(` .em-narrow-table {
6
6
  width: 100%!important;
7
7
  max-width: ${e}px!important;
@@ -87,5 +87,5 @@ ${l}
87
87
  </table>
88
88
  </body>
89
89
  </html>`}var Oe=["background-color","border","border-top","border-right","border-bottom","border-left","border-radius","box-shadow"],We=["padding","padding-top","padding-right","padding-bottom","padding-left"];function St(t,e){const n=new Map;return Oe.forEach(o=>{const r=t.get(o);r&&n.set(o,r)}),e&&We.forEach(o=>{const r=t.get(o);r&&n.set(o,r)}),n}function De(t){const e=t.querySelector(".preheader");if(!e)return"";const n=e.cloneNode(!0);return n.querySelectorAll("vk-snippet-end").forEach(o=>o.remove()),(n.textContent??"").replace(/[\u034F\u200C\u200B\u00AD\uFEFF\u2800]/g,"").replace(/\u00A0/g," ").replace(/\s+/g," ").trim()}function Ge(t){return t.nonWrap?["em-mob-wrap","em-mob-wrap-cancel",`em-mob-width-${t.columnWidthPerc}perc`]:["em-mob-wrap","em-mob-width-100perc"]}function Ue(t,e){const n=t.closest("table.row"),o=n?/\brow-(\d+)\b/.exec(n.getAttribute("class")??""):null,r=/\bcolumn-(\d+)\b/.exec(t.getAttribute("class")??"");if(!(!o||!r))return e.columnPadding.get(`${o[1]}|${r[1]}`)}function Ve(t,e){const n=t?{top:t.top,right:null,bottom:t.bottom,left:null}:void 0,o={top:e.top,right:null,bottom:e.bottom,left:null};return ot(n,o)}function Ze(t,e){const n=t.querySelector("td.col-pad"),o=E(n?x(n.getAttribute("style")):new Map);return Pt(E(e),o)}function Ke(t,e,n,o){const r=[],i=s=>{s.matches(".paragraph_block, .text_block, .heading_block, .image_block, .button_block, .divider_block, .spacer_block, .social_block")&&r.push(Z(s,e,n,o)),Array.from(s.children).forEach(i)},l=s=>{if(s.matches(".paragraph_block, .text_block, .heading_block, .image_block, .button_block, .divider_block, .spacer_block, .social_block")){r.push(Z(s,e,n,o)),Array.from(s.children).forEach(i);return}if(s.querySelector(".paragraph_block, .text_block, .heading_block, .image_block, .button_block, .divider_block, .spacer_block, .social_block")){Array.from(s.children).forEach(l);return}K(s)&&r.push(s.outerHTML)};return Array.from(t.children).forEach(l),r.filter(s=>s.trim()!=="").join(`
90
- `)}function Ye(t,e,n,o,r,i){const l=x(t.getAttribute("style")),s=Ft(t,e),c=St(l,!1),a=Ze(t,l),h=Ue(t,n),f={left:a.left??0,right:a.right??0},g={left:h?.left??null,right:h?.right??null},b={top:a.top,right:null,bottom:a.bottom,left:null},d=i?{left:f.left,right:f.right,mobileLeft:g.left,mobileRight:g.right}:{left:0,right:0},w=[P(c),Mt(b)].filter(Boolean).join(" "),m=Ke(t,n,o,d),u=[...Ge(r),...Ve(h,a)],p=w?` style="${y(w)}"`:"";return{cellHtml:`<td width="${s}" valign="top" class="${u.join(" ")}"${p}>${m||"&nbsp;"}</td>`,hasContent:m.trim()!=="",hoistedHorizontal:i?{left:0,right:0,mobileLeft:null,mobileRight:null}:{left:f.left,right:f.right,mobileLeft:g.left,mobileRight:g.right}}}function kt(t,e){return`<td width="${t}" class="em-mob-wrap${e.nonWrap?" em-mob-wrap-cancel":""} em-mob-height-${t}px">&nbsp;</td>`}function Xe(t,e){const n=t.querySelector("table");return kt(M(n)??M(t)??0,e)}function Je(t,e,n){const o=t.closest("table.row"),r=x(t.getAttribute("style"));if(o&&!r.has("background-color")){const S=x(o.getAttribute("style")).get("background-color")??o.getAttribute("bgcolor")??"";S&&S!=="transparent"&&r.set("background-color",S)}const i=M(t)??660,l=Array.from(t.querySelectorAll("td.column")).filter(S=>!/\bgap\b/.test(S.getAttribute("class")??""));if(l.length===0){const S=gt(t);return S?{html:S,width:i}:null}const s=/\bstack\b/.test(t.getAttribute("class")??""),c=l.length>1,a=!s&&c,h={nonWrap:a,columnWidthPerc:a?Math.round(100/l.length)-2:100},f=l[0].parentElement,g=f?Array.from(f.children):l,b=[];let d=!1,w=!1,m={left:0,right:0,mobileLeft:null,mobileRight:null};if(g.forEach(S=>{if(!(S instanceof Element)||S.tagName.toLowerCase()!=="td")return;const X=S.getAttribute("class")??"";if(/\bcolumn\b/.test(X)&&/\bgap\b/.test(X))b.push(Xe(S,h)),w=!1;else if(/\bcolumn\b/.test(X)){w&&b.push(kt(0,h));const J=Ye(S,i,e,n,h,c);b.push(J.cellHtml),d=d||J.hasContent,m=J.hoistedHorizontal,w=!0}}),!d)return null;const u=`<table cellpadding="0" cellspacing="0" border="0" class="em-mob-width-100perc"><tr>${b.join("")}</tr></table>`,p=St(r,!0);Q(p,m.left,m.right);const A=P(p),_=o?rt(o):"all",C=te(_),$=o?/\brow-(\d+)\b/.exec(o.getAttribute("class")??""):null,k=$?e.rowContentPadding.get($[1]):void 0,v=E(p),B=(v.left??0)-m.left,H=(v.right??0)-m.right,q={top:k?.top??null,bottom:k?.bottom??null,left:m.mobileLeft!=null?(k?.left??B)+m.mobileLeft:k?.left??null,right:m.mobileRight!=null?(k?.right??H)+m.mobileRight:k?.right??null},I=ot(q,v),F=[C.className,...I].filter(Boolean),W=F.length?` class="${F.join(" ")}"`:"",vt=[A,C.inlineStyle].filter(Boolean).join(" "),_t=`<td${W}${vt?` style="${y(vt)}"`:""}>${u}</td>`;return{html:`<tr em="block">${C.wrapNonMso?`<!--[if !mso]><!-->${_t}<!--<![endif]-->`:_t}</tr>`,width:i}}function Qe(t,e,n,o){const r=Z(t,e,n,{left:0,right:0});return r.trim()===""?null:{html:`<tr em="block"><td>${`<table cellpadding="0" cellspacing="0" border="0" class="em-mob-width-100perc"><tr><td width="${o}" valign="top" class="em-mob-wrap em-mob-width-100perc">${r}</td></tr></table>`}</td></tr>`,width:o}}function tn(t){let e=0;return t.querySelectorAll('table.row-content, table[em="block"]').forEach(n=>{e=Math.max(e,M(n)??0)}),e>0?e:660}function en(t){const e=new DOMParser().parseFromString(t,"text/html"),n=x(e.body?.getAttribute("style")),o=R(n.get("background-color")??"#FFFFFF"),r=De(e),i=(e.querySelector("title")?.textContent??"").trim()||"Email";Ce(e.body);const l=Yt(e),s=new He(Be(e),ze(e)),c=[];let a=0;const h=tn(e);Ee(e.body).forEach(d=>{if(d.kind==="row-content"){const m=Je(d.element,l,s);if(m){c.push(m.html),a=Math.max(a,m.width);return}K(d.element)&&(c.push(`<tr em="block"><td>${d.element.outerHTML}</td></tr>`),a=Math.max(a,M(d.element)??0));return}if(d.kind==="beefree-block"){const m=Qe(d.element,l,s,h);m&&(c.push(m.html),a=Math.max(a,m.width));return}if(d.kind==="unknown"){c.push(`<tr em="block"><td>${d.element.outerHTML}</td></tr>`),a=Math.max(a,M(d.element)??0);return}const w=gt(d.element);w&&(c.push(w),a=Math.max(a,M(d.element)??0))});const f=a>0?a:660,g=c.map(d=>` ${d}`).join(`
91
- `);s.registerEmFontClasses(g);const b=Ie(g,f,s.styleRules(),Fe(e));return je({title:i,preheader:r,outerBackground:o,narrowWidth:f,stylesBlock:b,blocksHtml:g,fontLinks:s.linkTags()})}Et.convertBeeFreeToEmailMaker=en});
90
+ `)}function Ye(t,e,n,o,r,i){const l=x(t.getAttribute("style")),s=Mt(t,e),c=St(l,!1),a=Ze(t,l),h=Ue(t,n),f={left:a.left??0,right:a.right??0},g={left:h?.left??null,right:h?.right??null},b={top:a.top,right:null,bottom:a.bottom,left:null},d=i?{left:f.left,right:f.right,mobileLeft:g.left,mobileRight:g.right}:{left:0,right:0},w=[P(c),Ft(b)].filter(Boolean).join(" "),m=Ke(t,n,o,d),u=[...Ge(r),...Ve(h,a)],p=w?` style="${y(w)}"`:"";return{cellHtml:`<td width="${s}" valign="top" class="${u.join(" ")}"${p}>${m||"&nbsp;"}</td>`,hasContent:m.trim()!=="",hoistedHorizontal:i?{left:0,right:0,mobileLeft:null,mobileRight:null}:{left:f.left,right:f.right,mobileLeft:g.left,mobileRight:g.right}}}function kt(t,e){return`<td width="${t}" class="em-mob-wrap${e.nonWrap?" em-mob-wrap-cancel":""} em-mob-height-${t}px">&nbsp;</td>`}function Xe(t,e){const n=t.querySelector("table");return kt(F(n)??F(t)??0,e)}function Qe(t,e,n){const o=t.closest("table.row"),r=x(t.getAttribute("style"));if(o&&!r.has("background-color")){const S=x(o.getAttribute("style")).get("background-color")??o.getAttribute("bgcolor")??"";S&&S!=="transparent"&&r.set("background-color",S)}const i=F(t)??660,l=Array.from(t.querySelectorAll("td.column")).filter(S=>!/\bgap\b/.test(S.getAttribute("class")??""));if(l.length===0){const S=gt(t);return S?{html:S,width:i}:null}const s=/\bstack\b/.test(t.getAttribute("class")??""),c=l.length>1,a=!s&&c,h={nonWrap:a,columnWidthPerc:a?Math.round(100/l.length)-2:100},f=l[0].parentElement,g=f?Array.from(f.children):l,b=[];let d=!1,w=!1,m={left:0,right:0,mobileLeft:null,mobileRight:null};if(g.forEach(S=>{if(!(S instanceof Element)||S.tagName.toLowerCase()!=="td")return;const X=S.getAttribute("class")??"";if(/\bcolumn\b/.test(X)&&/\bgap\b/.test(X))b.push(Xe(S,h)),w=!1;else if(/\bcolumn\b/.test(X)){w&&b.push(kt(0,h));const Q=Ye(S,i,e,n,h,c);b.push(Q.cellHtml),d=d||Q.hasContent,m=Q.hoistedHorizontal,w=!0}}),!d)return null;const u=`<table cellpadding="0" cellspacing="0" border="0" class="em-mob-width-100perc"><tr>${b.join("")}</tr></table>`,p=St(r,!0);J(p,m.left,m.right);const A=P(p),_=o?rt(o):"all",C=te(_),$=o?/\brow-(\d+)\b/.exec(o.getAttribute("class")??""):null,k=$?e.rowContentPadding.get($[1]):void 0,v=E(p),B=(v.left??0)-m.left,H=(v.right??0)-m.right,q={top:k?.top??null,bottom:k?.bottom??null,left:m.mobileLeft!=null?(k?.left??B)+m.mobileLeft:k?.left??null,right:m.mobileRight!=null?(k?.right??H)+m.mobileRight:k?.right??null},I=ot(q,v),M=[C.className,...I].filter(Boolean),W=M.length?` class="${M.join(" ")}"`:"",vt=[A,C.inlineStyle].filter(Boolean).join(" "),_t=`<td${W}${vt?` style="${y(vt)}"`:""}>${u}</td>`;return{html:`<tr em="block">${C.wrapNonMso?`<!--[if !mso]><!-->${_t}<!--<![endif]-->`:_t}</tr>`,width:i}}function Je(t,e,n,o){const r=Z(t,e,n,{left:0,right:0});return r.trim()===""?null:{html:`<tr em="block"><td>${`<table cellpadding="0" cellspacing="0" border="0" class="em-mob-width-100perc"><tr><td width="${o}" valign="top" class="em-mob-wrap em-mob-width-100perc">${r}</td></tr></table>`}</td></tr>`,width:o}}function tn(t){let e=0;return t.querySelectorAll('table.row-content, table[em="block"]').forEach(n=>{e=Math.max(e,F(n)??0)}),e>0?e:660}function en(t){const e=new DOMParser().parseFromString(t,"text/html"),n=x(e.body?.getAttribute("style")),o=R(n.get("background-color")??"#FFFFFF"),r=De(e),i=(e.querySelector("title")?.textContent??"").trim()||"Email";Ce(e.body);const l=Yt(e),s=new He(Be(e),ze(e)),c=[];let a=0;const h=tn(e);Ee(e.body).forEach(d=>{if(d.kind==="row-content"){const m=Qe(d.element,l,s);if(m){c.push(m.html),a=Math.max(a,m.width);return}K(d.element)&&(c.push(`<tr em="block"><td>${d.element.outerHTML}</td></tr>`),a=Math.max(a,F(d.element)??0));return}if(d.kind==="beefree-block"){const m=Je(d.element,l,s,h);m&&(c.push(m.html),a=Math.max(a,m.width));return}if(d.kind==="unknown"){c.push(`<tr em="block"><td>${d.element.outerHTML}</td></tr>`),a=Math.max(a,F(d.element)??0);return}const w=gt(d.element);w&&(c.push(w),a=Math.max(a,F(d.element)??0))});const f=a>0?a:660,g=c.map(d=>` ${d}`).join(`
91
+ `);s.registerEmFontClasses(g);const b=Ie(g,f,s.styleRules(),Me(e));return je({title:i,preheader:r,outerBackground:o,narrowWidth:f,stylesBlock:b,blocksHtml:g,fontLinks:s.linkTags()})}Et.convertBeeFreeToEmailMaker=en});
@@ -1 +1 @@
1
- __useblocks__.define("static/core/d26051be.js",["require","exports","module","static/core/e8499e21.js"],function(u,t,m){const r=u("./e8499e21.js");var n="https://cdn.ampproject.org/v0",i=`${n}.js`,c=`script[src='${i}']`;function a(e){return r.isElement(e)&&(e.tagName.startsWith("AMP")||e.tagName==="FORM"||e.tagName==="TEMPLATE"&&e.getAttribute("type")?.toLowerCase()==="amp-mustache")}function s(e){return r.isScriptElement(e)&&e.src?.startsWith("https://cdn.ampproject.org/v0")}Object.defineProperty(t,"AMP_BASE_SCRIPT",{enumerable:!0,get:function(){return i}}),Object.defineProperty(t,"AMP_BASE_SELECTOR",{enumerable:!0,get:function(){return c}}),Object.defineProperty(t,"AMP_SCRIPTS_PATH",{enumerable:!0,get:function(){return n}}),Object.defineProperty(t,"isAmpElement",{enumerable:!0,get:function(){return a}}),Object.defineProperty(t,"isAmpScript",{enumerable:!0,get:function(){return s}})});
1
+ __useblocks__.define("static/core/b79eddad.js",["require","exports","module","static/core/a71d1c3a.js"],function(u,t,m){const r=u("./a71d1c3a.js");var n="https://cdn.ampproject.org/v0",i=`${n}.js`,c=`script[src='${i}']`;function a(e){return r.isElement(e)&&(e.tagName.startsWith("AMP")||e.tagName==="FORM"||e.tagName==="TEMPLATE"&&e.getAttribute("type")?.toLowerCase()==="amp-mustache")}function s(e){return r.isScriptElement(e)&&e.src?.startsWith("https://cdn.ampproject.org/v0")}Object.defineProperty(t,"AMP_BASE_SCRIPT",{enumerable:!0,get:function(){return i}}),Object.defineProperty(t,"AMP_BASE_SELECTOR",{enumerable:!0,get:function(){return c}}),Object.defineProperty(t,"AMP_SCRIPTS_PATH",{enumerable:!0,get:function(){return n}}),Object.defineProperty(t,"isAmpElement",{enumerable:!0,get:function(){return a}}),Object.defineProperty(t,"isAmpScript",{enumerable:!0,get:function(){return s}})});
@@ -0,0 +1 @@
1
+ __useblocks__.define("static/core/bd188fca.js",["require","exports","module","static/core/2ff39ddf.js","static/core/a71d1c3a.js","static/core/d5774798.js"],function(i,u,h){const g=i("./2ff39ddf.js"),e=i("./a71d1c3a.js");i("./d5774798.js");var c=()=>e.err("unavailable","The template gallery is not available in the plugin.");function m(t){return e.peekEmailDocuments(t)?.current()?e.isReadOnly(t)?e.readOnlyError():c():e.noDocument()}function d(t,l){return e.resolveEmailPort(t).readEmail(l).catch(()=>{})}var p=t=>e.err("notFound",`There is no template "${t}" in the gallery; take an id from gallery.listTemplates.`);function y(t){const l=new WeakMap,o=r=>{const a=l.get(r)??d(t,r.template);return l.set(r,a),a};return{"document.applyTemplate":{precheck:async r=>{const a=m(t);if(a)return a;const n=await o(r);return n===void 0||n?.is_template?void 0:p(r.template)},consent:async r=>{const{__:a}=e.agentTranslator(t),n=await o(r);return{title:a("Replace the email content with a gallery template"),...e.detailsOf({label:a("Template").trim(),value:e.clip(n?.title??"")})}}}}}function f(t){return{"gallery.listTemplates":async({page:l})=>c(),"document.applyTemplate":async({template:l},o)=>{const r=m(t);if(r)return r;const a=e.peekEmailDocuments(t),n=a?.current();if(!a||!n)return e.noDocument();const s=await d(t,l);return o.signal.aborted?e.cancelledError():e.isReadOnly(t)?e.readOnlyError():s===void 0?e.err("unavailable","The template could not be loaded."):s?.is_template?e.peekEmailDocuments(t)?.current()!==n?e.err("unavailable","The open document changed while the template was loading."):s.html?(e.replaceDocumentContent(n,a.history(),s.html,{undoable:!0}),e.ok()):e.err("unavailable","The template has no content."):p(l)},"project.getStyles":async()=>e.err("unavailable","Project styles are not available in the plugin.")}}u.agentGalleryGates=y,u.agentGalleryHandlers=f});
@@ -1,4 +1,4 @@
1
- __useblocks__.define("static/core/100d863a.js",["require","exports","module","static/core/2ff39ddf.js","static/core/e8499e21.js"],function(me,O,hr){const H=me("./2ff39ddf.js"),N=me("./e8499e21.js");var it=/\n/g;function at(e){const n=[...e.matchAll(it)].map((r=>r.index||0));n.unshift(-1);const t=ee(n,0,n.length);return r=>de(t,r)}function ee(e,n,t){if(t-n==1)return{offset:e[n],index:n+1};const r=Math.ceil((n+t)/2),s=ee(e,n,r),i=ee(e,r,t);return{offset:s.offset,low:s,high:i}}function de(e,n){return(function(t){return Object.prototype.hasOwnProperty.call(t,"index")})(e)?{line:e.index,column:n-e.offset}:de(e.high.offset<n?e.high:e.low,n)}function ge(e,n="",t={}){const r=typeof n!="string"?n:t,s=typeof n=="string"?n:"",i=e.map(ot),a=!!r.lineNumbers;return function(o,c=0){const l=a?at(o):()=>({line:0,column:0});let h=c;const g=[];e:for(;h<o.length;){let y=!1;for(const p of i){p.regex.lastIndex=h;const k=p.regex.exec(o);if(k&&k[0].length>0){if(!p.discard){const v=l(h),B=typeof p.replace=="string"?k[0].replace(new RegExp(p.regex.source,p.regex.flags),p.replace):k[0];g.push({state:s,name:p.name,text:B,offset:h,len:k[0].length,line:v.line,column:v.column})}if(h=p.regex.lastIndex,y=!0,p.push){const v=p.push(o,h);g.push(...v.tokens),h=v.offset}if(p.pop)break e;break}}if(!y)break}return{tokens:g,offset:h,complete:o.length<=h}}}function ot(e,n){return{...e,regex:ct(e,n)}}function ct(e,n){if(e.name.length===0)throw new Error(`Rule #${n} has empty name, which is not allowed.`);if((function(t){return Object.prototype.hasOwnProperty.call(t,"regex")})(e))return(function(t){if(t.global)throw new Error(`Regular expression /${t.source}/${t.flags} contains the global flag, which is not allowed.`);return t.sticky?t:new RegExp(t.source,t.flags+"y")})(e.regex);if((function(t){return Object.prototype.hasOwnProperty.call(t,"str")})(e)){if(e.str.length===0)throw new Error(`Rule #${n} ("${e.name}") has empty "str" property, which is not allowed.`);return new RegExp(ke(e.str),"y")}return new RegExp(ke(e.name),"y")}function ke(e){return e.replace(/[-[\]{}()*+!<=:?./\\^$|#\s,]/g,"\\$&")}function I(e,n){return(t,r)=>{let s=r,i;return r<t.tokens.length?(i=e(t.tokens[r],t,r),i!==void 0&&s++):n?.(t,r),i===void 0?{matched:!1}:{matched:!0,position:s,value:i}}}function te(e,n){return e.matched?{matched:!0,position:e.position,value:n(e.value,e.position)}:e}function U(e,n){return e.matched?n(e):e}function L(e,n){return(t,r)=>te(e(t,r),(s,i)=>n(s,t,r,i))}function q(e,n){return(t,r)=>{const s=e(t,r);return s.matched?s:{matched:!0,position:r,value:n}}}function F(...e){return(n,t)=>{for(const r of e){const s=r(n,t);if(s.matched)return s}return{matched:!1}}}function W(e,n){return(t,r)=>{const s=e(t,r);return s.matched?s:n(t,r)}}function lt(e,n){return(t,r)=>{const s=[];let i=!0;do{const a=e(t,r);a.matched&&n(a.value,s.length+1,t,r,a.position)?(s.push(a.value),r=a.position):i=!1}while(i);return{matched:!0,position:r,value:s}}}function ne(e){return lt(e,()=>!0)}function ut(e){return w(e,ne(e),(n,t)=>[n,...t])}function w(e,n,t){return(r,s)=>U(e(r,s),i=>te(n(r,i.position),(a,o)=>t(i.value,a,r,s,o)))}function ft(e,n){return w(e,n,t=>t)}function Le(e,n){return w(e,n,(t,r)=>r)}function re(e,n,t,r){return(s,i)=>U(e(s,i),a=>U(n(s,a.position),o=>te(t(s,o.position),(c,l)=>r(a.value,o.value,c,s,i,l))))}function we(e,n,t){return re(e,n,t,(r,s)=>s)}function ht(...e){return(n,t)=>{const r=[];let s=t;for(const i of e){const a=i(n,s);if(a.matched)r.push(a.value),s=a.position;else return{matched:!1}}return{matched:!0,position:s,value:r}}}function pt(...e){return mt(ht(...e))}function mt(e){return L(e,n=>n.flatMap(t=>t))}function dt(e,n){return(t,r)=>{let s=!0,i=e,a=r;do{const o=n(i,t,a)(t,a);o.matched?(i=o.value,a=o.position):s=!1}while(s);return{matched:!0,position:a,value:i}}}function gt(e,n,t){return dt(e,r=>L(n,(s,i,a,o)=>t(r,s,i,a,o)))}function xe(e,n,t){return kt(e,r=>gt(r,w(n,t,(s,i)=>[s,i]),(s,[i,a])=>i(s,a)))}function kt(e,n){return(t,r)=>U(e(t,r),s=>n(s.value,t,r,s.position)(t,s.position))}var Lt="(?:[ \\t\\r\\n\\f]*)",ve="(?:\\n|\\r\\n|\\r|\\f)",K="[^\\x00-\\x7F]",M="(?:\\\\[0-9a-f]{1,6}(?:\\r\\n|[ \\n\\r\\t\\f])?)",j="(?:\\\\[^\\n\\r\\f0-9a-f])",wt=`(?:[_a-z]|${K}|${M}|${j})`,ye=`(?:[_a-z0-9-]|${K}|${M}|${j})`,xt=`(?:${ye}+)`,vt=`(?:[-]?${wt}${ye}*)`,yt=`'([^\\n\\r\\f\\\\']|\\\\${ve}|${K}|${M}|${j})*'`,Bt=`"([^\\n\\r\\f\\\\"]|\\\\${ve}|${K}|${M}|${j})*"`,_t=ge([{name:"ws",regex:new RegExp(Lt)},{name:"hash",regex:new RegExp(`#${xt}`,"i")},{name:"ident",regex:new RegExp(vt,"i")},{name:"str1",regex:new RegExp(yt,"i")},{name:"str2",regex:new RegExp(Bt,"i")},{name:"*"},{name:"."},{name:","},{name:"["},{name:"]"},{name:"="},{name:">"},{name:"|"},{name:"+"},{name:"~"},{name:"^"},{name:"$"}]),bt=ge([{name:"unicode",regex:new RegExp(M,"i")},{name:"escape",regex:new RegExp(j,"i")},{name:"any",regex:new RegExp("[\\s\\S]","i")}]);function Be([e,n,t],[r,s,i]){return[e+r,n+s,t+i]}function St(e){return e.reduce(Be,[0,0,0])}var It=I(e=>e.name==="unicode"?String.fromCodePoint(parseInt(e.text.slice(1),16)):void 0),Nt=I(e=>e.name==="escape"?e.text.slice(1):void 0),Wt=I(e=>e.name==="any"?e.text:void 0),Et=L(ne(F(It,Nt,Wt)),e=>e.join(""));function se(e){const n=bt(e);return Et({tokens:n.tokens,options:void 0},0).value}function d(e){return I(n=>n.name===e?!0:void 0)}var ie=I(e=>e.name==="ws"?null:void 0),ae=q(ie,null);function A(e){return we(ae,e,ae)}var D=I(e=>e.name==="ident"?se(e.text):void 0),Tt=I(e=>e.name==="hash"?se(e.text.slice(1)):void 0),Ct=I(e=>e.name.startsWith("str")?se(e.text.slice(1,-1)):void 0),_e=ft(q(D,""),d("|")),oe=W(w(_e,D,(e,n)=>({name:n,namespace:e})),L(D,e=>({name:e,namespace:null}))),At=W(w(_e,d("*"),e=>({type:"universal",namespace:e,specificity:[0,0,0]})),L(d("*"),()=>({type:"universal",namespace:null,specificity:[0,0,0]}))),Pt=L(oe,({name:e,namespace:n})=>({type:"tag",name:e,namespace:n,specificity:[0,0,1]})),$t=w(d("."),D,(e,n)=>({type:"class",name:n,specificity:[0,1,0]})),Rt=L(Tt,e=>({type:"id",name:e,specificity:[1,0,0]})),be=I(e=>{if(e.name==="ident"){if(e.text==="i"||e.text==="I")return"i";if(e.text==="s"||e.text==="S")return"s"}}),Ot=W(w(Ct,q(Le(ae,be),null),(e,n)=>({value:e,modifier:n})),w(D,q(Le(ie,be),null),(e,n)=>({value:e,modifier:n}))),Mt=F(L(d("="),()=>"="),w(d("~"),d("="),()=>"~="),w(d("|"),d("="),()=>"|="),w(d("^"),d("="),()=>"^="),w(d("$"),d("="),()=>"$="),w(d("*"),d("="),()=>"*=")),jt=re(d("["),A(oe),d("]"),(e,{name:n,namespace:t})=>({type:"attrPresence",name:n,namespace:t,specificity:[0,1,0]})),Dt=we(d("["),re(A(oe),Mt,A(Ot),({name:e,namespace:n},t,{value:r,modifier:s})=>({type:"attrValue",name:e,namespace:n,matcher:t,value:r,modifier:s,specificity:[0,1,0]})),d("]")),Vt=W(jt,Dt),Ht=W(At,Pt),Se=F(Rt,$t,Vt),Ie=L(W(pt(Ht,ne(Se)),ut(Se)),e=>({type:"compound",list:e,specificity:St(e.map(n=>n.specificity))})),Ut=F(L(d(">"),()=>">"),L(d("+"),()=>"+"),L(d("~"),()=>"~"),w(d("|"),d("|"),()=>"||")),qt=W(A(Ut),L(ie,()=>" ")),ce=xe(Ie,L(qt,e=>(n,t)=>({type:"compound",list:[...t.list,{type:"combinator",combinator:e,left:n,specificity:n.specificity}],specificity:Be(n.specificity,t.specificity)})),Ie),pr=xe(L(ce,e=>({type:"list",list:[e]})),L(A(d(",")),()=>(e,n)=>({type:"list",list:[...e.list,n]})),ce);function Ft(e,n){if(!(typeof n=="string"||n instanceof String))throw new Error("Expected a selector string. Actual input is not a string!");const t=_t(n);if(!t.complete)throw new Error(`The input "${n}" was only partially tokenized, stopped at offset ${t.offset}!
1
+ __useblocks__.define("static/core/c015f53f.js",["require","exports","module","static/core/2ff39ddf.js","static/core/a71d1c3a.js"],function(me,O,hr){const H=me("./2ff39ddf.js"),N=me("./a71d1c3a.js");var it=/\n/g;function at(e){const n=[...e.matchAll(it)].map((r=>r.index||0));n.unshift(-1);const t=ee(n,0,n.length);return r=>de(t,r)}function ee(e,n,t){if(t-n==1)return{offset:e[n],index:n+1};const r=Math.ceil((n+t)/2),s=ee(e,n,r),i=ee(e,r,t);return{offset:s.offset,low:s,high:i}}function de(e,n){return(function(t){return Object.prototype.hasOwnProperty.call(t,"index")})(e)?{line:e.index,column:n-e.offset}:de(e.high.offset<n?e.high:e.low,n)}function ge(e,n="",t={}){const r=typeof n!="string"?n:t,s=typeof n=="string"?n:"",i=e.map(ot),a=!!r.lineNumbers;return function(o,c=0){const l=a?at(o):()=>({line:0,column:0});let h=c;const g=[];e:for(;h<o.length;){let y=!1;for(const p of i){p.regex.lastIndex=h;const k=p.regex.exec(o);if(k&&k[0].length>0){if(!p.discard){const v=l(h),B=typeof p.replace=="string"?k[0].replace(new RegExp(p.regex.source,p.regex.flags),p.replace):k[0];g.push({state:s,name:p.name,text:B,offset:h,len:k[0].length,line:v.line,column:v.column})}if(h=p.regex.lastIndex,y=!0,p.push){const v=p.push(o,h);g.push(...v.tokens),h=v.offset}if(p.pop)break e;break}}if(!y)break}return{tokens:g,offset:h,complete:o.length<=h}}}function ot(e,n){return{...e,regex:ct(e,n)}}function ct(e,n){if(e.name.length===0)throw new Error(`Rule #${n} has empty name, which is not allowed.`);if((function(t){return Object.prototype.hasOwnProperty.call(t,"regex")})(e))return(function(t){if(t.global)throw new Error(`Regular expression /${t.source}/${t.flags} contains the global flag, which is not allowed.`);return t.sticky?t:new RegExp(t.source,t.flags+"y")})(e.regex);if((function(t){return Object.prototype.hasOwnProperty.call(t,"str")})(e)){if(e.str.length===0)throw new Error(`Rule #${n} ("${e.name}") has empty "str" property, which is not allowed.`);return new RegExp(ke(e.str),"y")}return new RegExp(ke(e.name),"y")}function ke(e){return e.replace(/[-[\]{}()*+!<=:?./\\^$|#\s,]/g,"\\$&")}function I(e,n){return(t,r)=>{let s=r,i;return r<t.tokens.length?(i=e(t.tokens[r],t,r),i!==void 0&&s++):n?.(t,r),i===void 0?{matched:!1}:{matched:!0,position:s,value:i}}}function te(e,n){return e.matched?{matched:!0,position:e.position,value:n(e.value,e.position)}:e}function U(e,n){return e.matched?n(e):e}function L(e,n){return(t,r)=>te(e(t,r),(s,i)=>n(s,t,r,i))}function q(e,n){return(t,r)=>{const s=e(t,r);return s.matched?s:{matched:!0,position:r,value:n}}}function F(...e){return(n,t)=>{for(const r of e){const s=r(n,t);if(s.matched)return s}return{matched:!1}}}function W(e,n){return(t,r)=>{const s=e(t,r);return s.matched?s:n(t,r)}}function lt(e,n){return(t,r)=>{const s=[];let i=!0;do{const a=e(t,r);a.matched&&n(a.value,s.length+1,t,r,a.position)?(s.push(a.value),r=a.position):i=!1}while(i);return{matched:!0,position:r,value:s}}}function ne(e){return lt(e,()=>!0)}function ut(e){return w(e,ne(e),(n,t)=>[n,...t])}function w(e,n,t){return(r,s)=>U(e(r,s),i=>te(n(r,i.position),(a,o)=>t(i.value,a,r,s,o)))}function ft(e,n){return w(e,n,t=>t)}function Le(e,n){return w(e,n,(t,r)=>r)}function re(e,n,t,r){return(s,i)=>U(e(s,i),a=>U(n(s,a.position),o=>te(t(s,o.position),(c,l)=>r(a.value,o.value,c,s,i,l))))}function we(e,n,t){return re(e,n,t,(r,s)=>s)}function ht(...e){return(n,t)=>{const r=[];let s=t;for(const i of e){const a=i(n,s);if(a.matched)r.push(a.value),s=a.position;else return{matched:!1}}return{matched:!0,position:s,value:r}}}function pt(...e){return mt(ht(...e))}function mt(e){return L(e,n=>n.flatMap(t=>t))}function dt(e,n){return(t,r)=>{let s=!0,i=e,a=r;do{const o=n(i,t,a)(t,a);o.matched?(i=o.value,a=o.position):s=!1}while(s);return{matched:!0,position:a,value:i}}}function gt(e,n,t){return dt(e,r=>L(n,(s,i,a,o)=>t(r,s,i,a,o)))}function xe(e,n,t){return kt(e,r=>gt(r,w(n,t,(s,i)=>[s,i]),(s,[i,a])=>i(s,a)))}function kt(e,n){return(t,r)=>U(e(t,r),s=>n(s.value,t,r,s.position)(t,s.position))}var Lt="(?:[ \\t\\r\\n\\f]*)",ve="(?:\\n|\\r\\n|\\r|\\f)",K="[^\\x00-\\x7F]",M="(?:\\\\[0-9a-f]{1,6}(?:\\r\\n|[ \\n\\r\\t\\f])?)",j="(?:\\\\[^\\n\\r\\f0-9a-f])",wt=`(?:[_a-z]|${K}|${M}|${j})`,ye=`(?:[_a-z0-9-]|${K}|${M}|${j})`,xt=`(?:${ye}+)`,vt=`(?:[-]?${wt}${ye}*)`,yt=`'([^\\n\\r\\f\\\\']|\\\\${ve}|${K}|${M}|${j})*'`,Bt=`"([^\\n\\r\\f\\\\"]|\\\\${ve}|${K}|${M}|${j})*"`,_t=ge([{name:"ws",regex:new RegExp(Lt)},{name:"hash",regex:new RegExp(`#${xt}`,"i")},{name:"ident",regex:new RegExp(vt,"i")},{name:"str1",regex:new RegExp(yt,"i")},{name:"str2",regex:new RegExp(Bt,"i")},{name:"*"},{name:"."},{name:","},{name:"["},{name:"]"},{name:"="},{name:">"},{name:"|"},{name:"+"},{name:"~"},{name:"^"},{name:"$"}]),bt=ge([{name:"unicode",regex:new RegExp(M,"i")},{name:"escape",regex:new RegExp(j,"i")},{name:"any",regex:new RegExp("[\\s\\S]","i")}]);function Be([e,n,t],[r,s,i]){return[e+r,n+s,t+i]}function St(e){return e.reduce(Be,[0,0,0])}var It=I(e=>e.name==="unicode"?String.fromCodePoint(parseInt(e.text.slice(1),16)):void 0),Nt=I(e=>e.name==="escape"?e.text.slice(1):void 0),Wt=I(e=>e.name==="any"?e.text:void 0),Et=L(ne(F(It,Nt,Wt)),e=>e.join(""));function se(e){const n=bt(e);return Et({tokens:n.tokens,options:void 0},0).value}function d(e){return I(n=>n.name===e?!0:void 0)}var ie=I(e=>e.name==="ws"?null:void 0),ae=q(ie,null);function A(e){return we(ae,e,ae)}var D=I(e=>e.name==="ident"?se(e.text):void 0),Tt=I(e=>e.name==="hash"?se(e.text.slice(1)):void 0),Ct=I(e=>e.name.startsWith("str")?se(e.text.slice(1,-1)):void 0),_e=ft(q(D,""),d("|")),oe=W(w(_e,D,(e,n)=>({name:n,namespace:e})),L(D,e=>({name:e,namespace:null}))),At=W(w(_e,d("*"),e=>({type:"universal",namespace:e,specificity:[0,0,0]})),L(d("*"),()=>({type:"universal",namespace:null,specificity:[0,0,0]}))),Pt=L(oe,({name:e,namespace:n})=>({type:"tag",name:e,namespace:n,specificity:[0,0,1]})),$t=w(d("."),D,(e,n)=>({type:"class",name:n,specificity:[0,1,0]})),Rt=L(Tt,e=>({type:"id",name:e,specificity:[1,0,0]})),be=I(e=>{if(e.name==="ident"){if(e.text==="i"||e.text==="I")return"i";if(e.text==="s"||e.text==="S")return"s"}}),Ot=W(w(Ct,q(Le(ae,be),null),(e,n)=>({value:e,modifier:n})),w(D,q(Le(ie,be),null),(e,n)=>({value:e,modifier:n}))),Mt=F(L(d("="),()=>"="),w(d("~"),d("="),()=>"~="),w(d("|"),d("="),()=>"|="),w(d("^"),d("="),()=>"^="),w(d("$"),d("="),()=>"$="),w(d("*"),d("="),()=>"*=")),jt=re(d("["),A(oe),d("]"),(e,{name:n,namespace:t})=>({type:"attrPresence",name:n,namespace:t,specificity:[0,1,0]})),Dt=we(d("["),re(A(oe),Mt,A(Ot),({name:e,namespace:n},t,{value:r,modifier:s})=>({type:"attrValue",name:e,namespace:n,matcher:t,value:r,modifier:s,specificity:[0,1,0]})),d("]")),Vt=W(jt,Dt),Ht=W(At,Pt),Se=F(Rt,$t,Vt),Ie=L(W(pt(Ht,ne(Se)),ut(Se)),e=>({type:"compound",list:e,specificity:St(e.map(n=>n.specificity))})),Ut=F(L(d(">"),()=>">"),L(d("+"),()=>"+"),L(d("~"),()=>"~"),w(d("|"),d("|"),()=>"||")),qt=W(A(Ut),L(ie,()=>" ")),ce=xe(Ie,L(qt,e=>(n,t)=>({type:"compound",list:[...t.list,{type:"combinator",combinator:e,left:n,specificity:n.specificity}],specificity:Be(n.specificity,t.specificity)})),Ie),pr=xe(L(ce,e=>({type:"list",list:[e]})),L(A(d(",")),()=>(e,n)=>({type:"list",list:[...e.list,n]})),ce);function Ft(e,n){if(!(typeof n=="string"||n instanceof String))throw new Error("Expected a selector string. Actual input is not a string!");const t=_t(n);if(!t.complete)throw new Error(`The input "${n}" was only partially tokenized, stopped at offset ${t.offset}!
2
2
  `+Ne(n,t.offset));const r=A(e)({tokens:t.tokens,options:void 0},0);if(!r.matched)throw new Error(`No match for "${n}" input!`);if(r.position<t.tokens.length){const s=t.tokens[r.position];throw new Error(`The input "${n}" was only partially parsed, stopped at offset ${s.offset}!
3
3
  `+Ne(n,s.offset,s.len))}return r.value}function Ne(e,n,t=1){return`${e.replace(/(\t)|(\r)|(\n)/g,(r,s,i)=>s?"␉":i?"␍":"␊")}
4
4
  ${"".padEnd(n)}${"^".repeat(t)}`}function Kt(e){return Ft(ce,e)}function b(e){if(!e.type)throw new Error("This is not an AST node.");switch(e.type){case"universal":return z(e.namespace)+"*";case"tag":return z(e.namespace)+P(e.name);case"class":return"."+P(e.name);case"id":return"#"+P(e.name);case"attrPresence":return`[${z(e.namespace)}${P(e.name)}]`;case"attrValue":return`[${z(e.namespace)}${P(e.name)}${e.matcher}"${zt(e.value)}"${e.modifier?e.modifier:""}]`;case"combinator":return b(e.left)+e.combinator;case"compound":return e.list.reduce((n,t)=>t.type==="combinator"?b(t)+n:n+b(t),"");case"list":return e.list.map(b).join(",")}}function z(e){return e||e===""?P(e)+"|":""}function X(e){return`\\${e.codePointAt(0).toString(16)} `}function P(e){return e.replace(/(^[0-9])|(^-[0-9])|(^-$)|([-0-9a-zA-Z_]|[^\x00-\x7F])|(\x00)|([\x01-\x1f]|\x7f)|([\s\S])/g,(n,t,r,s,i,a,o,c)=>t?X(t):r?"-"+X(r.slice(1)):s?"\\-":i||(a?"�":o?X(o):"\\"+c))}function zt(e){return e.replace(/(")|(\\)|(\x00)|([\x01-\x1f]|\x7f)/g,(n,t,r,s,i)=>t?'\\"':r?"\\\\":s?"�":X(i))}function G(e){if(!e.type)throw new Error("This is not an AST node.");switch(e.type){case"compound":e.list.forEach(G),e.list.sort((n,t)=>Te(We(n),We(t)));break;case"combinator":G(e.left);break;case"list":e.list.forEach(G),e.list.sort((n,t)=>b(n)<b(t)?-1:1)}return e}function We(e){switch(e.type){case"universal":return[1];case"tag":return[1];case"id":return[2];case"class":return[3,e.name];case"attrPresence":return[4,b(e)];case"attrValue":return[5,b(e)];case"combinator":return[15,b(e)]}}function Ee(e,n){return Te(e,n)}function Te(e,n){if(!Array.isArray(e)||!Array.isArray(n))throw new Error("Arguments must be arrays.");const t=e.length<n.length?e.length:n.length;for(let r=0;r<t;r++)if(e[r]!==n[r])return e[r]<n[r]?-1:1;return e.length-n.length}var Ce=class{constructor(e){this.branches=$(Xt(e))}build(e){return e(this.branches)}};function Xt(e){const n=e.length,t=new Array(n);for(let r=0;r<n;r++){const[s,i]=e[r],a=Gt(Kt(s));t[r]={ast:a,terminal:{type:"terminal",valueContainer:{index:r,value:i,specificity:a.specificity}}}}return t}function Gt(e){return Ae(e),G(e),e}function Ae(e){const n=[];e.list.forEach(t=>{switch(t.type){case"class":n.push({matcher:"~=",modifier:null,name:"class",namespace:null,specificity:t.specificity,type:"attrValue",value:t.name});break;case"id":n.push({matcher:"=",modifier:null,name:"id",namespace:null,specificity:t.specificity,type:"attrValue",value:t.name});break;case"combinator":Ae(t.left),n.push(t);break;case"universal":break;default:n.push(t)}}),e.list=n}function $(e){const n=[];for(;e.length;){const t=Oe(e,a=>!0,Pe),{matches:r,nonmatches:s,empty:i}=Yt(e,t);e=s,r.length&&n.push(Zt(t,r)),i.length&&n.push(...Jt(i))}return n}function Jt(e){const n=[];for(const t of e){const r=t.terminal;if(r.type==="terminal")n.push(r);else{const{matches:s,rest:i}=rn(r.cont,a=>a.type==="terminal");s.forEach(a=>n.push(a)),i.length&&(r.cont=i,n.push(r))}}return n}function Yt(e,n){const t=[],r=[],s=[];for(const i of e){const a=i.ast.list;a.length?(a.some(o=>Pe(o)===n)?t:r).push(i):s.push(i)}return{matches:t,nonmatches:r,empty:s}}function Pe(e){switch(e.type){case"attrPresence":return`attrPresence ${e.name}`;case"attrValue":return`attrValue ${e.name}`;case"combinator":return`combinator ${e.combinator}`;default:return e.type}}function Zt(e,n){if(e==="tag")return Qt(n);if(e.startsWith("attrValue "))return tn(e.substring(10),n);if(e.startsWith("attrPresence "))return en(e.substring(13),n);if(e==="combinator >")return $e(">",n);if(e==="combinator +")return $e("+",n);throw new Error(`Unsupported selector kind: ${e}`)}function Qt(e){const n=le(e,t=>t.type==="tag",t=>t.name);return{type:"tagName",variants:Object.entries(n).map(([t,r])=>({type:"variant",value:t,cont:$(r.items)}))}}function en(e,n){for(const t of n)Re(t,r=>r.type==="attrPresence"&&r.name===e);return{type:"attrPresence",name:e,cont:$(n)}}function tn(e,n){const t=le(n,s=>s.type==="attrValue"&&s.name===e,s=>`${s.matcher} ${s.modifier||""} ${s.value}`),r=[];for(const s of Object.values(t)){const i=s.oneSimpleSelector,a=nn(i),o=$(s.items);r.push({type:"matcher",matcher:i.matcher,modifier:i.modifier,value:i.value,predicate:a,cont:o})}return{type:"attrValue",name:e,matchers:r}}function nn(e){if(e.modifier==="i"){const n=e.value.toLowerCase();switch(e.matcher){case"=":return t=>n===t.toLowerCase();case"~=":return t=>t.toLowerCase().split(/[ \t]+/).includes(n);case"^=":return t=>t.toLowerCase().startsWith(n);case"$=":return t=>t.toLowerCase().endsWith(n);case"*=":return t=>t.toLowerCase().includes(n);case"|=":return t=>{const r=t.toLowerCase();return n===r||r.startsWith(n)&&r[n.length]==="-"}}}else{const n=e.value;switch(e.matcher){case"=":return t=>n===t;case"~=":return t=>t.split(/[ \t]+/).includes(n);case"^=":return t=>t.startsWith(n);case"$=":return t=>t.endsWith(n);case"*=":return t=>t.includes(n);case"|=":return t=>n===t||t.startsWith(n)&&t[n.length]==="-"}}}function $e(e,n){const t=le(n,s=>s.type==="combinator"&&s.combinator===e,s=>b(s.left)),r=[];for(const s of Object.values(t)){const i=$(s.items),a=s.oneSimpleSelector.left;r.push({ast:a,terminal:{type:"popElement",cont:i}})}return{type:"pushElement",combinator:e,cont:$(r)}}function le(e,n,t){const r={};for(;e.length;){const s=Oe(e,n,t),i=h=>n(h)&&t(h)===s,a=h=>h.ast.list.some(i),{matches:o,rest:c}=sn(e,a);let l=null;for(const h of o){const g=Re(h,i);l||(l=g)}if(l==null)throw new Error("No simple selector is found.");r[s]={oneSimpleSelector:l,items:o},e=c}return r}function Re(e,n){const t=e.ast.list,r=new Array(t.length);let s=-1;for(let a=t.length;a-- >0;)n(t[a])&&(r[a]=!0,s=a);if(s==-1)throw new Error("Couldn't find the required simple selector.");const i=t[s];return e.ast.list=t.filter((a,o)=>!r[o]),i}function Oe(e,n,t){const r={};for(const a of e){const o={};for(const c of a.ast.list.filter(n))o[t(c)]=!0;for(const c of Object.keys(o))r[c]?r[c]++:r[c]=1}let s="",i=0;for(const a of Object.entries(r))a[1]>i&&(s=a[0],i=a[1]);return s}function rn(e,n){const t=[],r=[];for(const s of e)n(s)?t.push(s):r.push(s);return{matches:t,rest:r}}function sn(e,n){const t=[],r=[];for(const s of e)n(s)?t.push(s):r.push(s);return{matches:t,rest:r}}var an=class{constructor(e){this.f=e}pickAll(e){return this.f(e)}pick1(e,n=!1){const t=this.f(e),r=t.length;if(r===0)return null;if(r===1)return t[0].value;const s=n?on:cn;let i=t[0];for(let a=1;a<r;a++){const o=t[a];s(i,o)&&(i=o)}return i.value}};function on(e,n){const t=Ee(n.specificity,e.specificity);return t>0||t===0&&n.index<e.index}function cn(e,n){const t=Ee(n.specificity,e.specificity);return t>0||t===0&&n.index>e.index}function Me(e){return new an(R(e))}function R(e){const n=e.map(ln);return(t,...r)=>n.flatMap(s=>s(t,...r))}function ln(e){switch(e.type){case"terminal":return()=>[e.valueContainer];case"tagName":return un(e);case"attrValue":return hn(e);case"attrPresence":return fn(e);case"pushElement":return pn(e);case"popElement":return mn(e);default:return()=>[]}}function un(e){const n={};for(const t of e.variants)n[t.value.toLowerCase()]=R(t.cont);return(t,...r)=>{const s=t.tagName?.toLowerCase(),i=s&&n[s];return i?i(t,...r):[]}}function fn(e){const n=e.name,t=R(e.cont);return(r,...s)=>r.hasAttribute(n)?t(r,...s):[]}function hn(e){const n=[];for(const r of e.matchers){const s=r.predicate,i=R(r.cont);n.push((a,o,...c)=>s(a)?i(o,...c):[])}const t=e.name;return(r,...s)=>{const i=r.getAttribute(t);return i!==null?n.flatMap(a=>a(i,r,...s)):[]}}function pn(e){const n=R(e.cont),t=e.combinator==="+"?dn:gn;return(r,...s)=>{const i=t(r);return i?n(i,r,...s):[]}}function mn(e){const n=R(e.cont);return(t,r,...s)=>n(r,...s)}function dn(e){let n=e.previousSibling;for(;n&&n.nodeType!==Node.ELEMENT_NODE;)n=n.previousSibling;return n}function gn(e){return e.parentElement}var kn=H.__commonJSMin(((e,n)=>{var t=function(f){return r(f)&&!s(f)};function r(u){return!!u&&typeof u=="object"}function s(u){var f=Object.prototype.toString.call(u);return f==="[object RegExp]"||f==="[object Date]"||a(u)}var i=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function a(u){return u.$$typeof===i}function o(u){return Array.isArray(u)?[]:{}}function c(u,f){return f.clone!==!1&&f.isMergeableObject(u)?B(o(u),u,f):u}function l(u,f,m){return u.concat(f).map(function(_){return c(_,m)})}function h(u,f){if(!f.customMerge)return B;var m=f.customMerge(u);return typeof m=="function"?m:B}function g(u){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(u).filter(function(f){return Object.propertyIsEnumerable.call(u,f)}):[]}function y(u){return Object.keys(u).concat(g(u))}function p(u,f){try{return f in u}catch{return!1}}function k(u,f){return p(u,f)&&!(Object.hasOwnProperty.call(u,f)&&Object.propertyIsEnumerable.call(u,f))}function v(u,f,m){var _={};return m.isMergeableObject(u)&&y(u).forEach(function(x){_[x]=c(u[x],m)}),y(f).forEach(function(x){k(u,x)||(p(u,x)&&m.isMergeableObject(f[x])?_[x]=h(x,m)(u[x],f[x],m):_[x]=c(f[x],m))}),_}function B(u,f,m){m=m||{},m.arrayMerge=m.arrayMerge||l,m.isMergeableObject=m.isMergeableObject||t,m.cloneUnlessOtherwiseSpecified=c;var _=Array.isArray(f);return _!==Array.isArray(u)?c(f,m):_?m.arrayMerge(u,f,m):v(u,f,m)}B.all=function(f,m){if(!Array.isArray(f))throw new Error("first argument should be an array");return f.reduce(function(_,x){return B(_,x,m)},{})};var fr=B;n.exports=fr})),je=H.__toESM(kn());function ue(e,n,t=()=>{}){if(e===void 0){const r=function(...s){return n(r,...s)};return r}return e>=0?function(...r){return n(ue(e-1,n,t),...r)}:t}function De(e,n){let t=0,r=e.length;for(;t<r&&e[t]===n;)++t;for(;r>t&&e[r-1]===n;)--r;return t>0||r<e.length?e.substring(t,r):e}function Ln(e,n){let t=e.length;for(;t>0&&e[t-1]===n;)--t;return t<e.length?e.substring(0,t):e}function wn(e){return e.replace(/[\s\S]/g,n=>"\\u"+n.charCodeAt().toString(16).padStart(4,"0"))}function Ve(e,n){const t=new Map;for(let r=e.length;r-- >0;){const s=e[r],i=n(s);t.set(i,t.has(i)?(0,je.default)(s,t.get(i),{arrayMerge:xn}):s)}return[...t.values()].reverse()}var xn=(e,n,t)=>[...n];function J(e,n){for(const t of n){if(!e)return;e=e[t]}return e}function He(e,n="a",t=26){const r=[];do e-=1,r.push(e%t),e=e/t>>0;while(e>0);const s=n.charCodeAt(0);return r.reverse().map(i=>String.fromCharCode(s+i)).join("")}var fe=["I","X","C","M"],Ue=["V","L","D"];function qe(e){return[...e+""].map(n=>+n).reverse().map((n,t)=>n%5<4?(n<5?"":Ue[t])+fe[t].repeat(n%5):fe[t]+(n<5?Ue[t]:fe[t+1])).reverse().join("")}var Fe=class{constructor(e,n=void 0){this.lines=[],this.nextLineWords=[],this.maxLineLength=n||e.wordwrap||Number.MAX_VALUE,this.nextLineAvailableChars=this.maxLineLength,this.wrapCharacters=J(e,["longWordSplit","wrapCharacters"])||[],this.forceWrapOnLimit=J(e,["longWordSplit","forceWrapOnLimit"])||!1,this.stashedSpace=!1,this.wordBreakOpportunity=!1}pushWord(e,n=!1){this.nextLineAvailableChars<=0&&!n&&this.startNewLine();const t=this.nextLineWords.length===0,r=e.length+(t?0:1);if(r<=this.nextLineAvailableChars||n)this.nextLineWords.push(e),this.nextLineAvailableChars-=r;else{const[s,...i]=this.splitLongWord(e);t||this.startNewLine(),this.nextLineWords.push(s),this.nextLineAvailableChars-=s.length;for(const a of i)this.startNewLine(),this.nextLineWords.push(a),this.nextLineAvailableChars-=a.length}}popWord(){const e=this.nextLineWords.pop();if(e!==void 0){const n=this.nextLineWords.length===0,t=e.length+(n?0:1);this.nextLineAvailableChars+=t}return e}concatWord(e,n=!1){if(this.wordBreakOpportunity&&e.length>this.nextLineAvailableChars)this.pushWord(e,n),this.wordBreakOpportunity=!1;else{const t=this.popWord();this.pushWord(t?t.concat(e):e,n)}}startNewLine(e=1){this.lines.push(this.nextLineWords),e>1&&this.lines.push(...Array.from({length:e-1},()=>[])),this.nextLineWords=[],this.nextLineAvailableChars=this.maxLineLength}isEmpty(){return this.lines.length===0&&this.nextLineWords.length===0}clear(){this.lines.length=0,this.nextLineWords.length=0,this.nextLineAvailableChars=this.maxLineLength}toString(){return[...this.lines,this.nextLineWords].map(e=>e.join(" ")).join(`
@@ -0,0 +1 @@
1
+ __useblocks__.define("static/core/c0f26c01.js",["require","exports","module","static/core/2ff39ddf.js","static/core/cf7d1dd7.js","static/core/a71d1c3a.js","vite/preload-helper"],function(i,p,E){const M=i("./2ff39ddf.js"),f=i("./cf7d1dd7.js"),t=i("./a71d1c3a.js");let g=i("vite/preload-helper");var v=10,_=100,c=new WeakMap;function w(r,n){const e=c.get(r)??new Map;for(n.forEach(s=>{e.delete(s.id),e.set(s.id,s)});e.size>_;)e.delete(e.keys().next().value);c.set(r,e)}function k(r){const n=()=>r.getInstance(f.STORE_ID)?.dispatch;return{"image.search":async({keywords:e,orientation:s,page:a})=>{const o=t.standaloneRefusal(r,"Stock photos")??t.featureRefusal(r,"stock_photo","stock photos");if(o)return o;if(!e.trim())return t.err("invalidArgs",'"keywords" must not be empty.');if(a!==void 0&&(!Number.isInteger(a)||a<1))return t.err("invalidArgs",'"page" must be a whole number from 1.');const l=n();if(!l)return t.err("unavailable","Stock photos need the editor interface.");const u={keywords:e.trim(),color:"",orientation:s??""},d=l(t.imageApi.endpoints.getSearchImage.initiate({query:u,page:a??1}));try{const m=await d;if(m.error)return t.err("searchFailed","The stock photo service failed.");const h=(m.data?.results??[]).slice(0,v);return w(r,h),{images:h.map(({id:b,description:y,alt_description:I,user:j,width:A,height:F})=>({id:b,description:y||I||"",author:j?.name??"",width:A,height:F}))}}finally{d.unsubscribe?.()}},"image.pick":({id:e})=>{const s=t.featureRefusal(r,"stock_photo","stock photos");if(s)return s;const a=c.get(r)?.get(e);if(!a)return t.err("notFound",`There is no found photo "${e}": search with \`image.search\` first.`);const o=n()?.(t.imageApi.endpoints.getUnsplashImage.initiate(a.links.download_location));return Promise.resolve(o).catch(()=>{}).finally(()=>o?.unsubscribe?.()),{url:`${a.urls.raw}&w=1200&q=96`}},"file.upload":async({url:e})=>{if(!/^https?:\/\//i.test(e.trim()))return t.err("invalidArgs",'"url" must be an http(s) address.');const{isUploadFailure:s,saveImageFromUrl:a}=await(0,g.__vitePreload)(async()=>{const{isUploadFailure:l,saveImageFromUrl:u}=await Promise.resolve().then(()=>i("./4e869a27.js"));return{isUploadFailure:l,saveImageFromUrl:u}},void 0,{}.url),o=await a(r,e.trim());return s(o)?t.err(o.code,o.message):{url:o}}}}p.agentImageHandlers=k});