1import{o as e}from"./chunk-DjMLQNh_.js";import{Ca as t,Za as n}from"./components-D-qr2fXp.js";import{t as r}from"./react-DzvcXMfQ.js";import{n as i,o as a}from"./useEnv-DIoTNmJx.js";var o=e(r()),s=200,c=class e{constructor(e){this.pathEditor=`api/v2.1/editor`,this.api=e}catchErrors(e,t){let{message:n}=e;console.error(`â EM_Error RulesService[${t}]:`,n)}static create(t){return new e(t)}async getRuleById(e){try{return(await this.api.post(`/Services/Campanias.svc/ObtenerResumenElementoTriggerActividad`,{elementoId:e})).data}catch(e){return this.catchErrors(e,`getRuleDetail`),{}}}async saveRule(e){try{return(await this.api.post(`/Services/Campanias.svc/SetearDatosTriggerActividad`,e)).status===s?{statusOK:!0}:{statusOK:!1}}catch(e){return this.catchErrors(e,`saveRules`),{statusOK:!1}}}async setTouchRules(e){try{return(await this.api.post(`/Services/Campanias.svc/SetEnvioTouchRules`,{activo:e.active,elementoId:e.actionId})).status===s?{statusOK:!0}:{statusOK:!1}}catch(e){return this.catchErrors(e,`setTouchRules`),{statusOK:!1}}}async activateRule(e){try{return(await this.api.post(`/Services/Campanias.svc/ActivarTrigger`,{elementoId:e})).status===s?{statusOK:!0}:{statusOK:!1}}catch(e){return this.catchErrors(e,`activateRule`),{statusOK:!1}}}async inactivateRule(e){try{return(await this.api.post(`/Services/Campanias.svc/DesactivarTrigger`,{elementoId:e})).status===s?{statusOK:!0}:{statusOK:!1}}catch(e){return this.catchErrors(e,`inactivateRule`),{statusOK:!1}}}async saveCloseDate(e){try{let t=await this.api.post(`/Services/Campanias.svc/SetearDatosTriggerFechaCierre`,e);return t.status===s?{statusOK:t.data===`FECHA_TRIGGER_ACTIVIDAD_OK`}:{statusOK:!1}}catch(e){return this.catchErrors(e,`saveRules`),{statusOK:!1}}}async getRedirectRulePageHtml(e){try{let{data:t}=await this.api.post(`/Services/Campanias.svc/ObtenerHTMLTriggerPaginaEmblue`,{finalizadoOk:e});return typeof t.html==`string`?t.html:``}catch(e){return this.catchErrors(e,`getRedirectRulePage`),``}}};Object.getOwnPropertyNames(c.prototype).reduce((e,t)=>(e[t]=t,e),{});var l=` 2<!DOCTYPE html> 3<html lang="es"> 4<head> 5 <meta charset="UTF-8"> 6 <title>¡El formulario se completó correctamente!</title> 7 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 8 <!-- Inclusión de la fuente Roboto --> 9 <link href="https://fonts.googleapis.com/css?family=Roboto:400&display=swap" rel="stylesheet"> 10 <style> 11 body { 12 margin: 0; 13 padding: 0; 14 font-family: 'Roboto', Arial, sans-serif; 15 background-color: #f4f4f4; 16 } 17 .container { 18 max-width: 748px; 19 margin: 0 auto; 20 background-color: #ffffff; 21 border: 1px solid #cccccc; 22 border-radius: 8px; 23 overflow: hidden; 24 } 25 .header { 26 background-color: #0056B8; 27 padding: 20px 36px; 28 text-align: left; 29 } 30 .header img { 31 width: 147px; 32 height: auto; 33 display: block; 34 border: 0; 35 } 36 .content { 37 padding: 24px 30px; 38 text-align: center; 39 } 40 .content h1 { 41 color: #111827; 42 font-size: 24px; 43 font-weight: 400; 44 margin: 0 0 24px; 45 } 46 .content img { 47 width: 72px; 48 height: 66px; 49 border: 0; 50 } 51 .footer { 52 padding: 20px 0; 53 text-align: center; 54 font-size: 10px; 55 color: #625B71; 56 } 57 .footer a { 58 color: #0056B8; 59 text-decoration: none; 60 } 61 @media (max-width: 768px) { 62 .container { 63 width: 100%; 64 } 65 .content { 66 padding: 16px 20px; 67 } 68 } 69 </style> 70</head> 71<body> 72 <div class="container"> 73 <!-- Encabezado --> 74 <div class="header"> 75 <img src="https://files.embluemail.com/uo/5971/rulesEmblueLogo.png" alt="Logo de emBlue"> 76 </div> 77 <!-- Contenido --> 78 <div class="content"> 79 <h1>¡El formulario se completó correctamente!</h1> 80 <img src="https://files.embluemail.com/uo/5971/rulesFormSuccess.png" alt="Icono de éxito"> 81 </div> 82 <!-- Pie de página --> 83 <div class="footer"> 84 <p>Formulario creado a través de <a href="https://www.embluemail.com" target="_blank">emBluemail</a></p> 85 </div> 86 </div> 87</body> 88</html> 89`,u=class e{static create(){return new e}async saveRule(e){try{return await n(2e3),{statusOK:!0}}catch{return{statusOK:!1}}}async getRuleById(e){try{return await n(2e3),{}}catch{return{}}}async setTouchRules(e){try{return await n(2e3),{statusOK:!0}}catch{return{statusOK:!1}}}async activateRule(e){try{return console.log(`activating rule`,e),await n(2e3),{statusOK:!0}}catch{return{statusOK:!1}}}async inactivateRule(e){try{return console.log(`inactivating rule`,e),await n(2e3),{statusOK:!0}}catch{return{statusOK:!1}}}async saveCloseDate(e){try{return await n(2e3),{statusOK:!0}}catch{return{statusOK:!1}}}async getRedirectRulePageHtml(e){try{return await n(2e3),l}catch{return``}}},d=()=>{let{env:e}=i();return(0,o.useMemo)(()=>
89{if(e!==`storybook`){let{URL_EMA_APP:n,JWT_DEV_TOKEN:r}=a.endpoints[e],i=r===``?window.__JWTToken:r;return c.create(new t(n,i))}else return u.create()},[e])};export{d as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.