PageSourceSearch

https://master.euleinstitute.com/_next/static/chunks/9868.a87f5db0d455be00.js

js euleinstitute.com collected 2026-10-09 22:26:01 UTC 5,520 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9868],{59868:function(e,t,s){s.r(t),s.d(t,{SendFoxIntegrationCard:function(){return d}});var l=s(42620),a=s(40740),n=s(29012),i=s(25634);let r="rounded-lg border border-[rgb(var(--border-default))] bg-[rgb(var(--surface-base))] p-5",o="mt-1.5 block w-full rounded-md border border-[rgb(var(--border-default))] bg-[rgb(var(--surface-base))] px-3 py-2 text-sm focus:border-[rgb(var(--focus-ring))] focus:outline-none focus:ring-2 focus:ring-[rgb(var(--focus-ring))]/30";function d(e){let{paths:t,initial:s}=e,d=(0,n.T)("settings"),[c,u]=(0,a.useState)(s),[m,h]=(0,a.useState)(""),[x,g]=(0,a.useState)(null),[p,v]=(0,a.useState)(""),[f,b]=(0,a.useState)(""),[j,N]=(0,a.useState)("both"),[y,k]=(0,a.useState)(!1),[S,C]=(0,a.useState)(!1),[w,I]=(0,a.useState)(null),T=(0,a.useMemo)(()=>new Map(t.map(e=>[e.id,e.name])),[t]),F=async()=>{I(null),k(!0),g(null),v("");try{var e,t,s;let l=await fetch("/api/integrations/sendfox/lists",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:m.trim()})}),a=await l.json().catch(()=>null);if(!l.ok){I(null!==(t=null==a?void 0:a.error)&&void 0!==t?t:d("couldNotLoadLists"));return}let n=null!==(s=null===(e=a.data)||void 0===e?void 0:e.lists)&&void 0!==s?s:[];g(n),n.length&&v(String(n[0].id))}finally{k(!1)}},O=async()=>{I(null),C(!0);try{var e,t,s,l,a;let n=null!==(s=null==x?void 0:null===(e=x.find(e=>String(e.id)===p))||void 0===e?void 0:e.name)&&void 0!==s?s:"",i=await fetch("/api/integrations/sendfox",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:m.trim(),listId:Number(p),label:n,pathId:f||null,trigger:j})}),r=await i.json().catch(()=>null);if(!i.ok){I(null!==(l=null==r?void 0:r.error)&&void 0!==l?l:d("couldNotSaveIntegration"));return}let o=null!==(a=null===(t=r.data)||void 0===t?void 0:t.integrations)&&void 0!==a?a:[];u(e=>[...o,...e]),h(""),g(null),v(""),b(""),N("both")}finally{C(!1)}},E=async e=>{confirm(d("confirmRemoveIntegration"))&&(await fetch("/api/integrations/sendfox/".concat(e),{method:"DELETE"})).ok&&u(t=>t.filter(t=>t.id!==e))};return(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsxs)("section",{className:r,children:[(0,l.jsx)("h2",{className:"text-base font-semibold",children:"SendFox"}),(0,l.jsx)("p",{className:"mt-1 text-sm text-[rgb(var(--text-secondary))]",children:d("sendfoxIntro")}),(0,l.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{htmlFor:"sf-key",className:"block text-sm font-medium",children:d("sendfoxApiToken")}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)("input",{id:"sf-key",type:"password",autoComplete:"off",placeholder:d("sendfoxApiTokenPlaceholder"),value:m,onChange:e=>h(e.target.value),className:o}),(0,l.jsx)(i.z,{onClick:F,loading:y,disabled:m.trim().length<10,className:"mt-1.5 shrink-0",children:d("loadLists")})]}),(0,l.jsx)("p",{className:"mt-1 text-xs text-[rgb(var(--text-muted))]",children:d("sendfoxApiTokenHint")})]}),x?0===x.length?(0,l.jsx)("p",{className:"text-sm text-[rgb(var(--text-muted))]",children:d("sendfoxNoLists")}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{htmlFor:"sf-list",className:"block text-sm font-medium",children:d("list")}),(0,l.jsx)("select",{id:"sf-list",value:p,onChange:e=>v(e.target.value),className:o,children:x.map(e=>(0,l.jsx)("option",{value:e.id,children:e.name},e.id))})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{htmlFor:"sf-path",className:"block text-sm font-medium",children:d("appliesTo")}),(0,l.jsxs)("select",{id:"sf-path",value:f,onChange:e=>b(e.target.value),className:o,children:[(0,l.jsx)("option",{value:"",children:d("allPathsWholeAcademy")}),t.map(e=>(0,l.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{htmlFor:"sf-trigger",className:"block text-sm font-medium",children:d("addTheContact")}),(0,l.jsxs)("select",{id:"sf-trigger",value:j,onChange:e=>N(e.target.value),className:o,children:[(0,l.jsx)("option",{value:"both",children:d("triggerOptionBoth")}),(0,l.jsx)("option",{value:"signup",children:d("triggerOptionSignup")}),(0,l.jsx)("option",{value:"enrollment",children:d("triggerOptionEnrollment")})]})]}),(0,l.jsx)(i.z,{onClick:O,loading:S,disabled:!p,children:d("addIntegration")})]}):null,w?(0,l.jsx)("p",{role:"alert",className:"text-sm text-[rgb(var(--danger))]",children:w}):null]})]}),(0,l.jsxs)("section",{className:r,children:[(0,l.jsx)("h2",{className:"text-base font-semibold",children:d("connected",{count:c.length})}),0===c.length?(0,l.jsx)("p",{className:"mt-3 text-sm text-[rgb(var(--text-muted))]",children:d("noIntegrationsYet")}):(0,l.jsx)("ul",{className:"mt-3 divide-y divide-[rgb(var(--border-default))]",children:c.map(e=>{var t;return(0,l.jsxs)("li",{className:"flex items-center justify-between gap-3 py-3",children:[(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("p",{className:"truncate text-sm font-medium text-[rgb(var(--text-primary))]",children:["SendFox → ",e.label||d("listFallback",{id:e.listId})]}),(0,l.jsxs)("p",{className:"mt-0.5 text-xs text-[rgb(var(--text-muted))]",children:[e.pathId?null!==(t=T.get(e.pathId))&&void 0!==t?t:d("path"):d("allPaths")," \xb7 ",d("trigger_".concat(e.trigger))]})]}),(0,l.jsx)("button",{type:"button",onClick:()=>E(e.id),className:"shrink-0 text-sm font-medium text-[rgb(var(--danger))] hover:underline",children:d("remove")})]},e.id)})})]})]})}}}]);

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.