PageSourceSearch

https://ethicsprofile.ai/assets/AIConnections-BJs0eE9Q.js

js ethicsprofile.ai collected 2026-10-04 12:30:37 UTC 55,908 bytes, 38 lines download raw bytes

1import{j as e}from"./ui-vendor-BnjFRKYr.js";import{r as h}from"./react-vendor-BNoTEEtH.js";import{w as N,a as ce,b as de,O as U,T as o,a6 as V,h as we,i as b,ae as Ae,u as ke,m as Ne,H as Ce,s as k,at as z,av as X,aw as D,ar as H,ax as Ie,a9 as O,ai as Pe,l as ee,al as Se,ay as Te,az as Me,aA as ze,N as _e,P as Ge,q as te,t as Re,C as Ee,d as Fe,e as Le,f as qe,B as se,g as Ve,c as He,aB as Oe,aC as $e,L as _,aD as Ue,aE as Be,aF as Ye,aG as We,Z as Je,v as Qe}from"./index-5GNVmBYn.js";import{D as me,b as pe,c as he,d as ue,a as Ze,e as Ke}from"./dialog-CTi1ZvwH.js";import{S as oe,a as ne,b as ie,c as re,d as y}from"./select-B98r0SVW.js";import{P as ae}from"./palette-BOr8lFNT.js";import{S as le}from"./settings-BO-jadxD.js";import"./supabase-vendor-BEnviLYm.js";import"./utils-vendor-CYC2HZ_g.js";import"./router-vendor-Bhtjn1Ng.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const Xe=N("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/**
7 * @license lucide-react v0.462.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const De=N("Film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);/**
12 * @license lucide-react v0.462.0 - ISC
13 *
14 * This source code is licensed under the ISC license.
15 * See the LICENSE file in the root directory of this source tree.
16 */const $=N("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
17 * @license lucide-react v0.462.0 - ISC
18 *
19 * This source code is licensed under the ISC license.
20 * See the LICENSE file in the root directory of this source tree.
21 */const et=N("Music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);/**
22 * @license lucide-react v0.462.0 - ISC
23 *
24 * This source code is licensed under the ISC license.
25 * See the LICENSE file in the root directory of this source tree.
26 */const tt=N("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/**
27 * @license lucide-react v0.462.0 - ISC
28 *
29 * This source code is licensed under the ISC license.
30 * See the LICENSE file in the root directory of this source tree.
31 */const st=N("Thermometer",[["path",{d:"M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",key:"17jzev"}]]);function ot({isOpen:v,onClose:a,aiName:g,aiLogo:i}){const{toast:t}=ce(),p=de(),[c,d]=h.useState({issueType:"",description:"",severity:""}),[A,j]=h.useState(!1),G=async u=>{if(u.preventDefault(),!c.issueType||!c.severity){t({title:p("Missing Information","Missing Information","toast title"),description:p("Please select the issue type and severity level","Please select the issue type and severity level","toast message"),variant:"destructive"});return}j(!0);try{await new Promise(m=>setTimeout(m,1e3)),t({title:p("Report Submitted","Report Submitted","toast title"),description:p("Thank you for reporting the issue with","Thank you for reporting the issue with","toast message")+` ${g}. `+p("We'll investigate and follow up with them about respecting EthicsProfile standards.","We'll investigate and follow up with them about respecting EthicsProfile standards.","toast message")}),d({issueType:"",description:"",severity:""}),a()}catch{t({title:p("Submission Failed","Submission Failed","toast title"),description:p("There was an error submitting your report. Please try again.","There was an error submitting your report. Please try again.","toast message"),variant:"destructive"})}finally{j(!1)}};return e.jsx(me,{open:v,onOpenChange:a,children:e.jsxs(pe,{className:"w-[85vw] max-w-md max-h-[85vh] overflow-hidden flex flex-col",children:[e.jsx(he,{className:"flex-shrink-0 pb-4",children:e.jsxs(ue,{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 bg-red-100 dark:bg-red-900/20 rounded-lg",children:e.jsx(U,{className:"h-5 w-5 text-red-600 dark:text-red-400"})}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("img",{src:i,alt:`${g} logo`,className:"h-6 w-6 object-contain"}),e.jsxs("span",{children:[e.jsx(o,{context:"modal title",children:"Report Issue with"})," ",g]})]})]})}),e.jsx("div",{className:"flex-1 overflow-y-auto px-1",children:e.jsxs("form",{onSubmit:G,className:"space-y-6",children:[e.jsx("div",{className:"bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-lg p-4",children:e.jsxs("p",{className:"text-sm text-amber-800 dark:text-amber-200",children:[e.jsx(o,{context:"modal description",children:"Help us ensure AI systems respect your EthicsProfile. We'll investigate your report and communicate with"})," ",g," ",e.jsx(o,{context:"modal description",children:"about compliance issues."})]})}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(V,{htmlFor:"issueType",children:[e.jsx(o,{context:"form label",children:"Type of Violation"})," *"]}),e.jsxs(oe,{value:c.issueType,onValueChange:u=>d(m=>({...m,issueType:u})),children:[e.jsx(ne,{children:e.jsx(ie,{placeholder:p("Select the type of issue","Select the type of issue","form placeholder")})}),e.jsxs(re,{children:[e.jsx(y,{value:"ignored-values",children:e.jsx(o,{context:"violation type",children:"Ignored my ethical values"})}
31),e.jsx(y,{value:"content-restrictions",children:e.jsx(o,{context:"violation type",children:"Violated content restrictions"})}),e.jsx(y,{value:"parental-controls",children:e.jsx(o,{context:"violation type",children:"Ignored parental controls"})}),e.jsx(y,{value:"inappropriate-content",children:e.jsx(o,{context:"violation type",children:"Provided inappropriate content"})}),e.jsx(y,{value:"harmful-advice",children:e.jsx(o,{context:"violation type",children:"Gave harmful advice"})}),e.jsx(y,{value:"other",children:e.jsx(o,{context:"violation type",children:"Other ethics violation"})})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(V,{htmlFor:"severity",children:[e.jsx(o,{context:"form label",children:"Severity Level"})," *"]}),e.jsxs(oe,{value:c.severity,onValueChange:u=>d(m=>({...m,severity:u})),children:[e.jsx(ne,{children:e.jsx(ie,{placeholder:p("How serious was this violation?","How serious was this violation?","form placeholder")})}),e.jsxs(re,{children:[e.jsx(y,{value:"minor",children:e.jsx(o,{context:"severity level",children:"Minor - Small oversight"})}),e.jsx(y,{value:"moderate",children:e.jsx(o,{context:"severity level",children:"Moderate - Clear violation"})}),e.jsx(y,{value:"major",children:e.jsx(o,{context:"severity level",children:"Major - Serious breach"})}),e.jsx(y,{value:"critical",children:e.jsx(o,{context:"severity level",children:"Critical - Potentially harmful"})})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(V,{htmlFor:"description",children:e.jsx(o,{context:"form label",children:"Describe what happened (optional)"})}),e.jsx(we,{id:"description",placeholder:p("Please provide details about how this AI violated your EthicsProfile. Include what you asked for and how the AI responded inappropriately...","Please provide details about how this AI violated your EthicsProfile. Include what you asked for and how the AI responded inappropriately...","form placeholder"),value:c.description,onChange:u=>d(m=>({...m,description:u.target.value})),className:"min-h-[120px] resize-none",maxLength:1e3}),e.jsxs("p",{className:"text-xs text-muted-foreground text-right",children:[c.description.length,"/1000 ",e.jsx(o,{context:"form label",children:"characters"})]})]}),e.jsxs("div",{className:"flex gap-3 pt-4",children:[e.jsx(b,{type:"button",variant:"outline",onClick:a,className:"flex-1",disabled:A,children:e.jsx(o,{context:"button",children:"Cancel"})}),e.jsx(b,{type:"submit",className:"flex-1",disabled:A,children:A?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white mr-2"}),e.jsx(o,{context:"loading",children:"Submitting..."})]}):e.jsxs(e.Fragment,{children:[e.jsx(Ae,{className:"h-4 w-4 mr-2"}),e.jsx(o,{context:"button",children:"Submit Report"})]})})]})]})})]})})}const nt="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml:space='preserve'%20width='814'%20height='1000'%3e%3cpath%20d='M788.1%20340.9c-5.8%204.5-108.2%2062.2-108.2%20190.5%200%20148.4%20130.3%20200.9%20134.2%20202.2-.6%203.2-20.7%2071.9-68.7%20141.9-42.8%2061.6-87.5%20123.1-155.5%20123.1s-85.5-39.5-164-39.5c-76.5%200-103.7%2040.8-165.9%2040.8s-105.6-57-155.5-127C46.7%20790.7%200%20663%200%20541.8c0-194.4%20126.4-297.5%20250.8-297.5%2066.1%200%20121.2%2043.4%20162.7%2043.4%2039.5%200%20101.1-46%20176.3-46%2028.5%200%20130.9%202.6%20198.3%2099.2zm-234-181.5c31.1-36.9%2053.1-88.1%2053.1-139.3%200-7.1-.6-14.3-1.9-20.1-50.6%201.9-110.8%2033.7-147.1%2075.8-28.5%2032.4-55.1%2083.6-55.1%20135.5%200%207.8%201.3%2015.6%201.9%2018.1%203.2.6%208.4%201.3%2013.6%201.3%2045.4%200%20102.5-30.4%20135.5-71.3z'/%3e%3c/svg%3e",it="data:image/svg+xml,%3csvg%20width='2500'%20height='2432'%20viewBox='0%200%20256%20249'%20xmlns='http://www.w3.org/2000/svg'%20preserveAspectRatio='xMinYMin%20meet'%3e%3cg%20fill='%23161614'%3e%3cpath%20d='M127.505%200C57.095%200%200%2057.085%200%20127.505c0%2056.336%2036.534%20104.13%2087.196%20120.99%206.372%201.18%208.712-2.766%208.712-6.134%200-3.04-.119-13.085-.173-23.739-35.473%207.713-42.958-15.044-42.958-15.044-5.8-14.738-14.157-18.656-14.157-18.656-11.568-7.914.872-7.752.872-7.752%2012.804.9%2019.546%2013.14%2019.546%2013.14%2011.372%2019.493%2029.828%2013.857%2037.104%2010.6%201.144-8.242%204.449-13.866%208.095-17.05-28.32-3.225-58.092-14.158-58.092-63.014%200-13.92%204.981-25.295%2013.138-34.224-1.324-3.212-5.688-16.18%201.235-33.743%200%200%2010.707-3.427%2035.073%2013.07%2010.17-2.826%2021.078-4.242%2031.914-4.29%2010.836.048%2021.752%201.464%2031.942%204.29%2024.337-16.497%2035.029-13.07%2035.029-13.07%206.94%2017.563%202.574%2030.531%201.25%2033.743%208.175%208.929%2013.122%2020.303%2013.122%2034.224%200%2048.972-29.828%2059.756-58.22%2062.912%204.573%203.957%208.648%2011.717%208.648%2023.612%200%2017.06-.148%2030.791-.148%2034.991%200%203.393%202.295%207.369%208.759%206.117%2050.634-16.879%2087.122-64.656%2087.122-120.973C255.009%2057.085%20197.922%200%20127.505%200'/%3e%3cpath%20d='M47.755%20181.634c-.28.633-1.278.823-2.185.389-.925-.416-1.445-1.28-1.145-1.916.275-.652%201.273-.834%202.196-.396.927.415%201.455%201.287%201.134%201.923M54.027%20187.23c-.
31608.564-1.797.302-2.604-.589-.834-.889-.99-2.077-.373-2.65.627-.563%201.78-.3%202.616.59.834.899.996%202.08.36%202.65M58.33%20194.39c-.782.543-2.06.034-2.849-1.1-.781-1.133-.781-2.493.017-3.038.792-.545%202.05-.055%202.85%201.07.78%201.153.78%202.513-.019%203.069M65.606%20202.683c-.699.77-2.187.564-3.277-.488-1.114-1.028-1.425-2.487-.724-3.258.707-.772%202.204-.555%203.302.488%201.107%201.026%201.445%202.496.7%203.258M75.01%20205.483c-.307.998-1.741%201.452-3.185%201.028-1.442-.437-2.386-1.607-2.095-2.616.3-1.005%201.74-1.478%203.195-1.024%201.44.435%202.386%201.596%202.086%202.612M85.714%20206.67c.036%201.052-1.189%201.924-2.705%201.943-1.525.033-2.758-.818-2.774-1.852%200-1.062%201.197-1.926%202.721-1.951%201.516-.03%202.758.815%202.758%201.86M96.228%20206.267c.182%201.026-.872%202.08-2.377%202.36-1.48.27-2.85-.363-3.039-1.38-.184-1.052.89-2.105%202.367-2.378%201.508-.262%202.857.355%203.049%201.398'/%3e%3c/g%3e%3c/svg%3e",rt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='168px'%20width='168px'%20version='1.1'%20viewBox='0%200%20168%20168'%3e%3cpath%20fill='%231ED760'%20d='m83.996%200.277c-46.249%200-83.743%2037.493-83.743%2083.742%200%2046.251%2037.494%2083.741%2083.743%2083.741%2046.254%200%2083.744-37.49%2083.744-83.741%200-46.246-37.49-83.738-83.745-83.738l0.001-0.004zm38.404%20120.78c-1.5%202.46-4.72%203.24-7.18%201.73-19.662-12.01-44.414-14.73-73.564-8.07-2.809%200.64-5.609-1.12-6.249-3.93-0.643-2.81%201.11-5.61%203.926-6.25%2031.9-7.291%2059.263-4.15%2081.337%209.34%202.46%201.51%203.24%204.72%201.73%207.18zm10.25-22.805c-1.89%203.075-5.91%204.045-8.98%202.155-22.51-13.839-56.823-17.846-83.448-9.764-3.453%201.043-7.1-0.903-8.148-4.35-1.04-3.453%200.907-7.093%204.354-8.143%2030.413-9.228%2068.222-4.758%2094.072%2011.127%203.07%201.89%204.04%205.91%202.15%208.976v-0.001zm0.88-23.744c-26.99-16.031-71.52-17.505-97.289-9.684-4.138%201.255-8.514-1.081-9.768-5.219-1.254-4.14%201.08-8.513%205.221-9.771%2029.581-8.98%2078.756-7.245%20109.83%2011.202%203.73%202.209%204.95%207.016%202.74%2010.733-2.2%203.722-7.02%204.949-10.73%202.739z'/%3e%3c/svg%3e",at="/assets/images/instagram-logo-BODjoKo1.png",lt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2016.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='500px'%20height='145.6895px'%20viewBox='0%200%201000%20291.379'%20enable-background='new%200%200%201000%20291.379'%20xml:space='preserve'%3e%3cg%3e%3cpath%20fill='%23FF004F'%20d='M191.102,105.182c18.814,13.442,41.862,21.351,66.755,21.351V78.656c-4.711,0.001-9.41-0.49-14.019-1.466%20v37.686c-24.891,0-47.936-7.909-66.755-21.35v97.703c0,48.876-39.642,88.495-88.54,88.495c-18.245,0-35.203-5.513-49.29-14.968%20c16.078,16.431,38.5,26.624,63.306,26.624c48.901,0,88.545-39.619,88.545-88.497v-97.701H191.102z%20M208.396,56.88%20c-9.615-10.499-15.928-24.067-17.294-39.067v-6.158h-13.285C181.161,30.72,192.567,47.008,208.396,56.88L208.396,56.88z%20M70.181,227.25c-5.372-7.04-8.275-15.652-8.262-24.507c0-22.354,18.132-40.479,40.502-40.479%20c4.169-0.001,8.313,0.637,12.286,1.897v-48.947c-4.643-0.636-9.329-0.906-14.013-0.807v38.098c-3.976-1.26-8.122-1.9-12.292-1.896%20c-22.37,0-40.501,18.123-40.501,40.48C47.901,206.897,56.964,220.583,70.181,227.25z'/%3e%3cpath%20d='M177.083,93.525c18.819,13.441,41.864,21.35,66.755,21.35V77.189c-13.894-2.958-26.194-10.215-35.442-20.309%20c-15.83-9.873-27.235-26.161-30.579-45.225h-34.896v191.226c-0.079,22.293-18.18,40.344-40.502,40.344%20c-13.154,0-24.84-6.267-32.241-15.975c-13.216-6.667-22.279-20.354-22.279-36.16c0-22.355,18.131-40.48,40.501-40.48%20c4.286,0,8.417,0.667,12.292,1.896v-38.098c-48.039,0.992-86.674,40.224-86.674,88.474c0,24.086,9.621,45.921,25.236,61.875%20c14.087,9.454,31.045,14.968,49.29,14.968c48.899,0,88.54-39.621,88.54-88.496V93.525L177.083,93.525z'/%3e%3cpath%20fill='%2300F2EA'%20d='M243.838,77.189V66.999c-12.529,0.019-24.812-3.488-35.442-10.12%20C217.806,67.176,230.197,74.276,243.838,77.189z%20M177.817,11.655c-0.319-1.822-0.564-3.656-0.734-5.497V0h-48.182v191.228%20c-0.077,22.29-18.177,40.341-40.501,40.341c-6.554,0-12.742-1.555-18.222-4.318c7.401,9.707,19.087,
3115.973,32.241,15.973%20c22.32,0,40.424-18.049,40.502-40.342V11.655H177.817z%20M100.694,114.408V103.56c-4.026-0.55-8.085-0.826-12.149-0.824%20C39.642,102.735,0,142.356,0,191.228c0,30.64,15.58,57.643,39.255,73.527c-15.615-15.953-25.236-37.789-25.236-61.874%20C14.019,154.632,52.653,115.4,100.694,114.408z'/%3e%3cpath%20fill='%23FF004F'%20d='M802.126,239.659c34.989,0,63.354-28.136,63.354-62.84c0-34.703-28.365-62.844-63.354-62.844h-9.545%20c34.99,0,63.355,28.14,63.355,62.844s-28.365,62.84-63.355,62.84H802.126z'/%3e%3cpath%20fill='%2300F2EA'%20d='M791.716,113.975h-9.544c-34.988,0-63.358,28.14-63.358,62.844s28.37,62.84,63.358,62.84h9.544%20c-34.993,0-63.358-28.136-63.358-62.84C728.357,142.116,756.723,113.975,791.716,113.975z'/%3e%3cpath%20d='M310.062,85.572v31.853h37.311v121.374h37.326V118.285h30.372l10.414-32.712H310.062z%20M615.544,85.572v31.853h37.311%20v121.374h37.326V118.285h30.371l10.413-32.712H615.544z%20M432.434,103.648c0-9.981,8.146-18.076,18.21-18.076%20c10.073,0,18.228,8.095,18.228,18.076c0,9.982-8.15,18.077-18.228,18.077C440.58,121.72,432.434,113.63,432.434,103.648z%20M432.434,134.641h36.438v104.158h-36.438V134.641z%20M484.496,85.572v153.226h36.452v-39.594l11.283-10.339l35.577,50.793h39.05%20l-51.207-74.03l45.997-44.768h-44.258l-36.442,36.153V85.572H484.496z%20M877.623,85.572v153.226h36.457v-39.594l11.278-10.339%20l35.587,50.793H1000l-51.207-74.03l45.995-44.768h-44.256l-36.452,36.153V85.572H877.623z'/%3e%3cpath%20d='M792.578,239.659c34.988,0,63.358-28.136,63.358-62.84c0-34.703-28.37-62.844-63.358-62.844h-0.865%20c-34.99,0-63.355,28.14-63.355,62.844s28.365,62.84,63.355,62.84H792.578z%20M761.336,176.819c0-16.881,13.8-30.555,30.817-30.555%20c17.005,0,30.804,13.674,30.804,30.555s-13.799,30.563-30.804,30.563C775.136,207.379,761.336,193.7,761.336,176.819z'/%3e%3c/g%3e%3c/svg%3e",bt=()=>{const{toast:v}=ce(),{user:a,isGuest:g}=ke(),i=de();Ne(),h.useEffect(()=>{window.scrollTo({top:0,behavior:"smooth"})},[]);const{userEthicsData:t,selectedRegulations:p,ethicsProfileText:c,aiTextInstructions:d,loading:A}=Ce(),[j,G]=h.useState(""),u=!A&&c&&c.trim()!=="",[m,I]=h.useState([]),[xe,B]=h.useState(!0),[ge,Y]=h.useState(!1),[R,W]=h.useState(null),[E,P]=h.useState({}),[F,J]=h.useState({}),[S,Q]=h.useState({});h.useEffect(()=>{(async()=>{var r;if(!d&&c&&c.trim()!==""&&!j){console.log("🤖 Generating AI instructions from existing profile...");try{const n=await k.functions.invoke("generate-ethics-profile",{body:{generateAiInstructions:!0,existingProfile:c}});(r=n.data)!=null&&r.aiInstructions&&(G(n.data.aiInstructions),console.log("✅ AI instructions generated successfully"))}catch(n){console.error("Error generating AI instructions:",n)}}})()},[d,c,j]),h.useEffect(()=>{console.log("🔗 Loading connections effect triggered",{user:a==null?void 0:a.id,isGuest:g}),fe()},[a,g]);const fe=async()=>{if(B(!0),a&&!g)try{const{data:s,error:r}=await k.from("ai_connections").select("ai_system_name").eq("user_id",a.id);if(r){console.error("Error loading AI connections:",r);return}const n=(s==null?void 0:s.map(l=>l.ai_system_name))||[];console.log("🔗 Loaded AI connections from database:",n),I(n)}catch(s){console.error("Error loading AI connections:",s)}else I([]);B(!1)},ye=async s=>{if(!(E[s]||F[s])){J(r=>({...r,[s]:!0}));try{const r=L(s),n=await k.functions.invoke("generate-integration-email",{body:{aiName:s}});if(n.error){console.error("Error generating email:",n.error);const l=T(s,r);P(x=>({...x,[s]:l}))}else{const{subject:l,body:x}=n.data,w=`mailto:${r}?subject=${encodeURIComponent(l)}&body=${encodeURIComponent(x)}`;P(f=>({...f,[s]:w}))}}catch(r){console.error("Error generating personalized email:",r);const n=L(s),l=T(s,n);P(x=>({...x,[s]:l}))}finally{J(r=>({...r,[s]:!1}))}}},be=async(s,r)=>{if(E[s])return E[s];try{const n=await k.functions.invoke("generate-integration-email",{body:{aiName:s}});if(n.error)return console.error("Error generating email:",n.error),T(s,r);const{subject:l,body:x}=n.data,w=`mailto:${r}?subject=${encodeURIComponent(l)}&body=${encodeURIComponent(x)}`;return P(f=>({...f,[s]:w})),w}catch(n){return console.error("Error generating personalized email:",n),T(s,r)}},Z=async s=>{const r=L(s);Q(n=>({...n,[s]:!0}));try{const[n]=await Promise.all([be(s,r),new Promise(l=>setTimeout(l,500))]);window.open(n,"_blank"),v({title:i("Email opening...","Email opening...","toast title"),description:i("Your default email client should open with the pre-filled message.","Your default email client should open with the pre-filled message.","toast message")})}catch(n){console.error("Error opening email:",n),v({title:i("Error","Error","toast title"),description:i("Failed to open email client. Please try again.","Failed to open email client. Please try again.","toast message"),variant:"destructive"})}finally{setTimeout(()=>{Q(n=>({...n,[s]:!1}))},1500)}},T=(s,r)=>{const n="EthicsProfile Integration Request",l=`I'd like to connect ${s} to EthicsProfile but I see it's not available yet.
32
33Could you let me know when you plan to make this integration available?
34
35Thanks!`;return`mailto:${r}?subject=${encodeURIComponent(n)}&body=${encodeURIComponent(l)}`},L=s=>({ChatGPT:"[email protected]",Claude:"[email protected]","Google Gemini":"[email protected]","Microsoft Copilot":"[email protected]","Google Assistant":"[email protected]","Amazon Alexa":"[email protected]","Apple Siri":"[email protected]","Tesla Autopilot":"[email protected]",Waymo:"[email protected]","Uber AI":"[email protected]","Tesla Optimus":"[email protected]","Boston Dynamics":"[email protected]","Figure AI Robot":"[email protected]","iRobot Roomba":"[email protected]","Google Nest":"[email protected]","Amazon Ring":"[email protected]",Midjourney:"[email protected]","DALL-E":"[email protected]","GitHub Copilot":"[email protected]","Netflix Algorithm":"[email protected]","Spotify AI":"[email protected]","Amazon AI":"[email protected]","Instagram Algorithm":"[email protected]","TikTok Algorithm":"[email protected]"})[s]||"[email protected]",je=[{id:"chatgpt",name:"ChatGPT",category:"Chat AI",description:i("Apply your ethical framework to AI conversations and content generation","Apply your ethical framework to AI conversations and content generation","ai description"),status:"Available",icon:z,logo:X}
35,{id:"claude",name:"Claude",category:"Chat AI",description:i("Ensure AI assistance aligns with your personal values and ethical standards","Ensure AI assistance aligns with your personal values and ethical standards","ai description"),status:"Available",icon:z,logo:"/lovable-uploads/30e8ab00-c328-4c5f-864a-f2d3c83fdaf4.png"},{id:"gemini",name:"Google Gemini",category:"Chat AI",description:i("Guide AI responses based on your ethical preferences and decision-making style","Guide AI responses based on your ethical preferences and decision-making style","ai description"),status:"Available",icon:z,logo:D},{id:"copilot",name:"Microsoft Copilot",category:"Chat AI",description:i("Integrate ethical guidelines into AI-powered productivity and assistance","Integrate ethical guidelines into AI-powered productivity and assistance","ai description"),status:"Available",icon:z,logo:"/lovable-uploads/e4093e68-1c35-4c53-abf2-77caf7ee0610.png"},{id:"siri",name:"Apple Siri",category:"Assistant",description:i("Customize AI behavior according to your personal ethics and privacy values","Customize AI behavior according to your personal ethics and privacy values","ai description"),status:"Available",icon:$,logo:nt},{id:"tesla",name:"Tesla Autopilot",category:"Auto",description:i("Influence decision-making in self-driving scenarios based on your values","Influence decision-making in self-driving scenarios based on your values","ai description"),status:"Available",icon:H,logo:Ie},{id:"waymo",name:"Waymo",category:"Transport",description:i("Integrate your ethical preferences into autonomous vehicle routing and decisions","Integrate your ethical preferences into autonomous vehicle routing and decisions","ai description"),status:"Available",icon:H,logo:"/lovable-uploads/427b502f-dacd-464f-acda-48859ff99122.png"},{id:"uber-ai",name:"Uber AI",category:"Transport",description:i("Apply ethical guidelines to ride-sharing algorithms and route optimization","Apply ethical guidelines to ride-sharing algorithms and route optimization","ai description"),status:"Available",icon:H,logo:"/lovable-uploads/c3da161d-9ce7-41b1-9907-0d4003307a64.png"},{id:"tesla-optimus",name:"Tesla Optimus",category:"Robots",description:i("Guide humanoid robot behavior and human-robot interactions with your ethics","Guide humanoid robot behavior and human-robot interactions with your ethics","ai description"),status:"Available",icon:O,logo:"/lovable-uploads/c79c1ed4-c49f-4d0a-ab12-f0d7aaaee8f3.png"},{id:"boston-dynamics",name:"Boston Dynamics",category:"Robotics",description:i("Guide robotic behavior and human-robot interactions with your EthicsProfile","Guide robotic behavior and human-robot interactions with your EthicsProfile","ai description"),status:"Available",icon:O,logo:"/lovable-uploads/450ec370-810a-4308-9efc-481417275bed.png"},{id:"figure-ai",name:"Figure AI Robot",category:"Robots",description:i("Ensure workplace robots operate according to your ethical standards","Ensure workplace robots operate according to your ethical standards","ai description"),status:"Available",icon:O,logo:"/lovable-uploads/5821993d-673d-4dda-af61-0b11709898b0.png"},{id:"google-assistant",name:"Google Assistant",category:"Assistant",description:i("Personalize AI assistance based on your ethical values and decision-making style","Personalize AI assistance based on your ethical values and decision-making style","ai description"),status:"Available",icon:$,logo:D},{id:"alexa",name:"Amazon Alexa",category:"Assistant",description:i("Apply privacy and interaction preferences to smart home AI responses","Apply privacy and interaction preferences to smart home AI responses","ai description"),status:"Available",icon:$,logo:"/lovable-uploads/5916a627-b230-450b-a155-5a58b41c2c1b.png"},{id:"roomba",name:"iRobot Roomba",category:"Home",description:i("Customize household AI behavior according to your privacy and efficiency preferences","Customize household AI behavior according to your privacy and efficiency preferences","ai description"),status:"Available",icon:Pe,logo:"/lovable-uploads/e4aaf8f1-788f-47ae-97ce-5d27fc409513.png"},{id:"nest",name:"Google Nest",category:"Home",description:i("Apply energy and privacy ethics to smart home climate and security systems","Apply energy and privacy ethics to smart home climate and security systems","ai description"),status:"Available",icon:st,logo:"/lovable-uploads/b45e40d9-da3c-4b19-8075-082ae827a0a3.png"},{id:"ring",name:"Amazon Ring",category:"Security",description:i("Configure security AI according to your privacy and safety value priorities","Configure security AI according to your privacy and safety value priorities","ai description"),status:"Available",icon:ee,logo:"/lovable-uploads/9486a247-8315-4334-ae13-1af3ae50f44e.png"},{id:"midjourney",name:"Midjourney",category:"Creative",description:i("Apply ethical guidelines to AI-generated art and creative content","Apply ethical guidelines to AI-generated art and creative content","ai description"),status:"Available",icon:ae,logo:"/lovable-uploads/c430afe9-0aac-4359-828e-1800ab714e49.png"},{id:"dall-e",name:"DALL-E",category:"Creative",description:i("Ensure AI image generation aligns with your creative and ethical standards","Ensure AI image generation aligns with your creative and ethical standards","ai description"),status:"Available",icon:ae,logo:X},{id:"github-copilot",name:"GitHub Copilot",category:"Developer",description:i("Guide AI code generation with your software ethics and best practices","Guide AI code generation with your software ethics and best practices","ai description"),status:"Available",icon:Se,logo:it},{id:"netflix",name:"Netflix Algorithm",category:"Media",description:i("Influence content recommendations based on your values and preferences","Influence content recommendations based on your values and preferences","ai description"),status:"Available",icon:De,logo:Te},{id:"spotify",name:"Spotify AI",category:"Media",description:i("Apply ethical preferences to music discovery and playlist generation","Apply ethical preferences to music discovery and playlist generation","ai description"),status:"Available",icon:et,logo:rt},{id:"amazon-recommendations",name:"Amazon AI",category:"Shopping",description:i("Guide shopping recommendations according to your ethical consumption values","Guide shopping recommendations according to your ethical consumption values","ai description"),status:"Available",icon:tt,logo:Me},{id:"instagram-ai",name:"Instagram Algorithm",category:"Social",description:i("Apply ethical guidelines to content curation and social interactions","Apply ethical guidelines to content curation and social interactions","ai description"),status:"Available",icon:Xe,logo:at},{id:"tiktok-ai",name:"TikTok Algorithm",category:"Social",description:i("Influence content recommendations based on your ethical preferences","Influence content recommendations based on your ethical preferences","ai description"),status:"Available",icon:ze,logo:lt}],ve=async s=>{console.log("🔗 handleConnection called for:",s),console.log("🔗 Current connections before:",m),console.log("🔗 User state:",{user:a==null?void 0:a.id,isGuest:g});const r=m.includes(s);if(a&&!g)try{if(r){const{error:n}=await k.from("ai_connections").delete().eq("user_id",a.id).eq("ai_system_name",s);if(n){console.error("Error disconnecting from database:",n);return}const l=m.filter(x=>x!==s);console.log("🔗 Disconnected from database, new connections:",l),I(l)}else{const{error:n}=await k.from("ai_connections").insert({user_id:a.id,ai_system_name:s});if(n){console.error("Error connecting to database:",n);return}const l=[...m,s];console.log("🔗 Connected to database, new connections:",l),I(l)}}catch(n){console.error("Error managing AI connection:",n);return}else console.log("⚠️ Guest connection toggle skipped — no persistence");console.log("🔗 Emitting connectionsChanged event"),window.dispatchEvent(new CustomEvent("connectionsChanged"))},q=s=>m.includes(s);return e.jsxs("div",{className:`min-h-screen bg-background ${g||!a?"page-with-floating-bar":"page-with-fixed-header"}`,children:[e.jsx(_e,{}),e.jsxs("main",{children:[e.jsx(Ge,{icon:te,title:i("Connect","Connect","page title"),description:i("Here you can finally connect your completed EthicsProfile to all the AI systems you use daily. Apply EthicsProfile, your personalized ethical framework, across 25+ leading AI platforms including ChatGPT, Tesla Autopilot, Google AI, and many more to ask them to respect your values in every decision","Here you can finally connect your completed EthicsProfile to all the AI systems you use daily. Apply EthicsProfile, your personalized ethical framework, across 25+ leading AI platforms including ChatGPT, Tesla Autopilot, Google AI, and many more to ask them to respect your values in every decision","page description")}),e.jsxs("div",{className:"mx-auto max-w-6xl px-6",children:[!u&&e.jsx("div",{className:"bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-lg p-6 mb-8",children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx(U,{className:"h-6 w-6 text-amber-600 dar
35k:text-amber-400 flex-shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-amber-900 dark:text-amber-100 mb-2",children:e.jsx(o,{context:"warning title",children:"Complete Your Analysis First"})}),e.jsx("p",{className:"text-amber-800 dark:text-amber-200 mb-4",children:e.jsx(o,{context:"warning message",children:"Before connecting to AI systems, you need to complete your EthicsProfile analysis. This generates the personalized ethical guidelines that will be applied to your AI connections."})}),e.jsxs(b,{variant:"outline",className:"border-amber-300 text-amber-800 hover:bg-amber-100 dark:border-amber-600 dark:text-amber-200 dark:hover:bg-amber-900/20",onClick:()=>window.location.href="/analysis",children:[e.jsx(Re,{className:"h-4 w-4 mr-2"}),e.jsx(o,{context:"button",children:"Go to Analysis"})]})]})]})}),e.jsx("div",{className:`grid md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4 mb-16 ${u?"":"opacity-50 pointer-events-none"}`,children:je.map((s,r)=>{var x,w;const n=q(s.name);console.log(`🔗 Rendering ${s.name}: connected=${n}, loadingConnections=${xe}, connectedSystems=${JSON.stringify(m)}`);const l=s.icon;return e.jsxs(Ee,{className:`relative group transition-all duration-300 ${n?"ring-2 ring-primary shadow-lg":"hover:shadow-lg"}`,children:[e.jsxs(Fe,{className:"pb-3",children:[e.jsxs("div",{className:"flex items-start justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[e.jsxs("div",{className:`relative p-2 rounded-lg ${n?"bg-primary/10":"bg-muted"}`,children:[e.jsx("img",{src:s.logo,alt:`${s.name} logo`,className:"h-10 w-10 object-contain",onError:f=>{const M=f.currentTarget,C=M.nextElementSibling;M.style.display="none",C&&(C.style.display="block")}}),e.jsx(l,{className:"h-6 w-6 text-muted-foreground hidden"})]}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs(Le,{className:"text-sm sm:text-base flex items-center gap-2 min-w-0 mb-1",children:[n&&e.jsx(qe,{className:"h-4 w-4 text-azure flex-shrink-0"}),e.jsx("span",{className:"break-words",children:s.name})]})})]}),e.jsxs("div",{className:"flex flex-col gap-1 ml-2",children:[e.jsx(se,{variant:"outline",className:"text-xs font-medium px-2 py-1 rounded-md bg-muted/50 text-muted-foreground border-border/60 text-center leading-tight h-auto whitespace-nowrap",children:s.category.includes(`
36`)?e.jsxs(e.Fragment,{children:[s.category.split(`
37`)[0],e.jsx("br",{}),s.category.split(`
38`)[1]]}):s.category}),n&&e.jsx(se,{variant:"default",className:"text-xs",children:e.jsx(o,{context:"status",children:"Connected"})})]})]}),e.jsx(Ve,{className:"text-sm leading-relaxed",children:s.description})]}),e.jsx(He,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(me,{children:[e.jsx(Ze,{asChild:!0,children:e.jsx(b,{variant:n?"default":"outline",size:"sm",className:"flex-1 transition-colors",onClick:()=>ye(s.name),children:n?e.jsxs(e.Fragment,{children:[e.jsx(Oe,{className:"h-4 w-4 mr-2"}),e.jsx(o,{context:"button",children:"Connected"})]}):e.jsxs(e.Fragment,{children:[e.jsx($e,{className:"h-4 w-4 mr-2"}),e.jsx(o,{context:"button",children:"Connect"})]})})}),e.jsxs(pe,{className:"w-[85vw] max-w-xl max-h-[85vh] p-0 flex flex-col",children:[e.jsxs(he,{className:"p-4 pb-0 flex-shrink-0",children:[e.jsxs(ue,{className:"flex items-center gap-3",children:[e.jsx("img",{src:s.logo,alt:`${s.name} logo`,className:"h-12 w-12 object-contain"}),e.jsx(o,{context:"modal title",children:"Connect to"})," ",s.name]}),e.jsxs(Ke,{children:[e.jsx(o,{context:"modal description",children:"Follow these steps to integrate your EthicsProfile with"})," ",s.name]})]}),e.jsx("div",{className:"space-y-4 w-full overflow-hidden p-4 overflow-y-auto flex-1",children:s.name==="ChatGPT"||s.name==="Claude"||s.name==="Google Gemini"||s.name==="Microsoft Copilot"||s.name==="Midjourney"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"bg-blue-50 dark:bg-blue-950/20 p-2 sm:p-3 rounded-lg border border-blue-200 dark:border-blue-800 w-full overflow-hidden",children:[e.jsx("h4",{className:"font-medium mb-2 text-blue-900 dark:text-blue-100 text-sm break-words hyphens-auto",children:e.jsx(o,{context:"modal section",children:"Preferred: Request Official Integration"})}),e.jsxs("p",{className:"text-xs text-blue-700 dark:text-blue-300 mb-3 leading-relaxed break-words hyphens-auto overflow-wrap-anywhere",children:[e.jsx(o,{context:"modal description",children:"Help us get direct EthicsProfile integration into"})," ",s.name,"! ",e.jsx(o,{context:"modal description",children:"Send a professional request to the company."})]}),e.jsx(b,{className:"w-full mb-4 text-xs px-2 py-3 whitespace-normal h-auto min-h-[3rem] text-center",onClick:()=>Z(s.name),disabled:S[s.name],children:S[s.name]?e.jsxs(e.Fragment,{children:[e.jsx(_,{className:"h-4 w-4 mr-2 animate-spin"}),e.jsx(o,{context:"loading",children:"Opening email..."})]}):F[s.name]?e.jsxs(e.Fragment,{children:[e.jsx(_,{className:"h-4 w-4 mr-2 animate-spin"}),e.jsx(o,{context:"loading",children:"Preparing..."})]}):e.jsxs("span",{className:"break-words hyphens-auto overflow-wrap-anywhere leading-tight",children:["📧 ",e.jsx(o,{context:"button",children:"Request Official Integration from"})," ",s.name.split(" ")[0]]})})]}),e.jsxs("div",{className:"border-t pt-6",children:[e.jsxs("div",{className:"bg-amber-50 dark:bg-amber-950/20 p-2 sm:p-3 rounded-lg border border-amber-200 dark:border-amber-800 w-full overflow-hidden",children:[e.jsx("h4",{className:"font-medium mb-2 text-amber-900 dark:text-amber-100 text-sm break-words hyphens-auto",children:e.jsx(o,{context:"modal section",children:"Alternative: Try It Now (Temporary)"})}),e.jsxs("p",{className:"text-xs text-amber-700 dark:text-amber-300 mb-3 leading-relaxed break-words hyphens-auto overflow-wrap-anywhere",children:[e.jsx(o,{context:"modal description",children:"While we wait for official integration, you can manually add your EthicsProfile to"})," ",s.name,e.jsx(o,{context:"modal description",children:"'s personalization settings."})]})]}),e.jsxs("div",{className:"bg-muted/50 p-4 rounded-lg mt-4",children:[e.jsxs("h4",{className:"font-medium mb-2 flex items-center gap-2",children:[e.jsx(le,{className:"h-4 w-4"}
38),e.jsx(o,{context:"modal section",children:"Quick Setup Instructions for"})," ",s.name]}),s.name==="ChatGPT"&&e.jsxs("ol",{className:"space-y-2 text-sm",children:[e.jsxs("li",{className:"flex gap-3",children:[e.jsx("span",{className:"flex-shrink-0 w-6 h-6 bg-primary text-primary-foreground rounded-full flex items-center justify-center text-xs font-medium",children:"1"}),e.jsx("span",{children:e.jsx(o,{context:"instruction",children:"Copy your EthicsProfile text using the button below"})})]}),e.jsxs("li",{className:"flex gap-3",children:[e.jsx("span",{className:"flex-shrink-0 w-6 h-6 bg-primary text-primary-foreground rounded-full flex items-center justify-center text-xs font-medium",children:"2"}),e.jsx("span",{className:"break-words hyphens-auto overflow-wrap-anywhere text-xs",children:e.jsx(o,{context:"instruction",children:'Go to ChatGPT → Settings → Personalization → "Customize ChatGPT"'})})]}),e.jsxs("li",{className:"flex gap-3",children:[e.jsx("span",{className:"flex-shrink-0 w-6 h-6 bg-primary text-primary-foreground rounded-full flex items-center justify-center text-xs font-medium",children:"3"}),e.jsx("span",{children:e.jsx(o,{context:"instruction",children:'Paste your EthicsProfile in the "Custom instructions" field'})})]}),e.jsxs("li",{className:"flex gap-3",children:[e.jsx("span",{className:"flex-shrink-0 w-6 h-6 bg-primary text-primary-foreground rounded-full flex items-center justify-center text-xs font-medium",children:"4"}),e.jsx("span",{children:e.jsx(o,{context:"instruction",children:"Save settings - ChatGPT will now follow your ethical guidelines!"})})]})]}),s.name==="Claude"&&e.jsxs("ol",{className:"space-y-2 text-sm",children:[e.jsxs("li",{className:"flex gap-3",children:[e.jsx("span",{className:"flex-shrink-0 w-6 h-6 bg-primary text-primary-foreground rounded-full flex items-center justify-center text-xs font-medium",children:"1"}),e.jsx("span",{children:"Copy your EthicsProfile text using the button below"})]}),e.jsxs("li",{className:"flex gap-3",children:[e.jsx("span",{className:"flex-shrink-0 w-6 h-6 bg-primary text-primary-foreground rounded-full flex items-center justify-center text-xs font-medium",children:"2"}),e.jsx("span",{children:"Go to Claude.ai → Settings (gear icon) → Profile Preferences"})]}),e.jsxs("li",{className:"flex gap-3",children:[e.jsx("span",{className:"flex-shrink-0 w-6 h-6 bg-primary text-primary-foreground rounded-full flex items-center justify-center text-xs font-medium",children:"3"}),e.jsx("span",{children:'Paste your EthicsProfile in the "Tell Claude about yourself" field'})]}),e.jsxs("li",{className:"flex gap-3",children:[e.jsx("span",{className:"flex-shrink-0 w-6 h-6 bg-primary text-primary-foreground rounded-full flex items-center justify-center text-xs font-medium",children:"4"}),e.jsx("span",{children:"Save settings - Claude will now apply your ethical guidelines!"})]})]}),s.name==="Google Gemini"&&e.jsxs("ol",{className:"space-y-2 text-sm",children:[e.jsxs("li",{className:"flex gap-3",children:[e.jsx("span",{className:"flex-shrink-0 w-6 h-6 bg-primary text-primary-foreground rounded-full flex items-center justify-center text-xs font-medium",children:"1"}),e.jsx("span",{children:"Copy your EthicsProfile text using the button below"})]}),e.jsxs("li",{className:"flex gap-3",children:[e.jsx("span",{className:"flex-shrink-0 w-6 h-6 bg-primary text-primary-foreground rounded-full flex items-center justify-center text-xs font-medium",children:"2"}),e.jsx("span",{children:"Go to Gemini.google.com → Settings → Personalization"})]}),e.jsxs("li",{className:"flex gap-3",children:[e.jsx("span",{className:"flex-shrink-0 w-6 h-6 bg-primary text-primary-foreground rounded-full flex items-center justify-center text-xs font-medium",children:"3"}),e.jsx("span",{children:"Create a custom Gem or add to personal instructions"})]}),e.jsxs("li",{className:"flex gap-3",children:[e.jsx("span",{className:"flex-shrink-0 w-6 h-6 bg-primary text-primary-foreground rounded-full flex items-center justify-center text-xs font-medium",children:"4"}),e.jsx("span",{children:"Paste your EthicsProfile and save - Gemini will follow your guidelines!"})]})]}),s.name==="Microsoft Copilot"&&e.jsxs("ol",{className:"space-y-2 text-sm",children:[e.jsxs("li",{className:"flex gap-3",children:[e.jsx("span",{className:"flex-shrink-0 w-6 h-6 bg-primary text-primary-foreground rounded-full flex items-center justify-center text-xs font-medium",children:"1"}),e.jsx("span",{children:"Copy your EthicsProfile text using the button below"})]}),e.jsxs("li",{className:"flex gap-3",children:[e.jsx("span",{className:"flex-shrink-0 w-6 h-6 bg-primary text-primary-foreground rounded-full flex items-center justify-center text-xs font-medium",children:"2"}),e.jsx("span",{children:'Open Copilot Chat → Click "..." menu → Personal Instructions'})]}),e.jsxs("li",{className:"flex gap-3",children:[e.jsx("span",{className:"flex-shrink-0 w-6 h-6 bg-primary text-primary-foreground rounded-full flex items-center justify-center text-xs font-medium",children:"3"}),e.jsx("span",{children:"Paste your EthicsProfile in the personal instructions field"})]}),e.jsxs("li",{className:"flex gap-3",children:[e.jsx("span",{className:"flex-shrink-0 w-6 h-6 bg-primary text-primary-foreground rounded-full flex items-center justify-center text-xs font-medium",children:"4"}),e.jsx("span",{children:"Save settings - Copilot will now incorporate your ethical preferences!"})]})]}),s.name==="Midjourney"&&e.jsxs("ol",{className:"space-y-2 text-sm",children:[e.jsxs("li",{className:"flex gap-3",children:[e.jsx("span",{className:"flex-shrink-0 w-6 h-6 bg-primary text-primary-foreground rounded-full flex items-center justify-center text-xs font-medium",children:"1"}),e.jsx("span",{children:"Copy your EthicsProfile text using the button below"})]}),e.jsxs("li",{className:"flex gap-3",children:[e.jsx("span",{className:"flex-shrink-0 w-6 h-6 bg-primary text-primary-foreground rounded-full flex items-center justify-center text-xs font-medium",children:"2"}),e.jsx("span",{children:'In Midjourney Discord or Web → type "/personalize" to start personalization'})]}),e.jsxs("li",{className:"flex gap-3",children:[e.jsx("span",{className:"flex-shrink-0 w-6 h-6 bg-primary text-primary-foreground rounded-full flex items-center justify-center text-xs font-medium",children:"3"}),e.jsx("span",{children:"Include your EthicsProfile guidelines in your style preferences"})]}),e.jsxs("li",{className:"flex gap-3",children:[e.jsx("span",{className:"flex-shrink-0 w-6 h-6 bg-primary text-primary-foreground rounded-full flex items-center justify-center text-xs font-medium",children:"4"}),e.jsx("span",{children:"Your art generation will reflect your ethical preferences!"})]})]})]}),e.jsxs("div",{className:"bg-muted/30 p-4 rounded-lg mt-4 border",children:[e.jsx("h4",{className:"font-medium mb-2 flex items-center gap-2",children:e.jsx(o,{context:"modal section",children:"👁️ Preview: Your EthicsProfile JSON Script"})}
38),(!d||d.trim()==="")&&(!j||j.trim()==="")?e.jsx("div",{className:"text-center py-6",children:e.jsxs("div",{className:"bg-background p-4 rounded border",children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:e.jsx(o,{context:"modal description",children:"Your EthicsProfile exists but needs to be updated to generate AI instructions. Click below to regenerate your profile with the latest features."})}),e.jsx(b,{onClick:()=>window.location.href="/analysis",className:"w-full",children:e.jsx(o,{context:"button",children:"Regenerate Your EthicsProfile"})})]})}):A?e.jsx("div",{className:"bg-background p-3 rounded border text-sm max-h-40 overflow-y-auto",children:e.jsx("pre",{className:"whitespace-pre-wrap text-xs text-muted-foreground font-mono",children:e.jsx(o,{context:"loading",children:"Loading AI instructions..."})})}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"bg-background p-3 rounded border text-sm max-h-40 overflow-y-auto",children:e.jsx("pre",{className:"whitespace-pre-wrap text-xs text-muted-foreground font-mono",children:JSON.stringify({ethicsProfile:{version:"2.0",source:"EthicsProfile.ai",appliedTo:s.name,generatedAt:new Date().toISOString(),userId:a==null?void 0:a.id,ethicsProfileText:c,aiInstructions:d&&d.trim()!==""?d:j,ethicalArchetype:(t==null?void 0:t.ethical_archetype)||null,valueProfile:(t==null?void 0:t.value_profile)||{},assessmentProgress:{status:(t==null?void 0:t.status)||"in_progress",progress:(t==null?void 0:t.progress)||0,questionsAnswered:(t==null?void 0:t.questions_answered)||0,totalQuestions:(t==null?void 0:t.total_questions)||20,skippedQuestions:(t==null?void 0:t.skipped_questions)||[]},selectedRegulations:p||[],visualQuizData:(t==null?void 0:t.visual_quiz_data)||{},freeTextData:(t==null?void 0:t.free_text_data)||{},parentalControls:(t==null?void 0:t.parental_controls)||{},personalInsights:((x=t==null?void 0:t.ai_generated_analytics)==null?void 0:x.complex_questions)||[],complexDecisionInsights:((w=t==null?void 0:t.ai_generated_analytics)==null?void 0:w.progress_over_time)||[],aiGeneratedAnalytics:(t==null?void 0:t.ai_generated_analytics)||{},assessmentMetadata:{createdAt:t==null?void 0:t.created_at,updatedAt:t==null?void 0:t.updated_at,title:(t==null?void 0:t.title)||"Value Profile Assessment"}}},null,2)})}),e.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:e.jsx(o,{context:"modal description",children:"Copy this text into your AI system's custom instructions or personalization settings."})}),e.jsxs(b,{variant:"outline",className:"w-full mt-4",onClick:()=>{var C,K;const f={ethicsProfile:{version:"2.0",source:"EthicsProfile.ai",appliedTo:s.name,generatedAt:new Date().toISOString(),userId:a==null?void 0:a.id,ethicsProfileText:c,aiInstructions:d&&d.trim()!==""?d:j,ethicalArchetype:(t==null?void 0:t.ethical_archetype)||null,valueProfile:(t==null?void 0:t.value_profile)||{},assessmentProgress:{status:(t==null?void 0:t.status)||"in_progress",progress:(t==null?void 0:t.progress)||0,questionsAnswered:(t==null?void 0:t.questions_answered)||0,totalQuestions:(t==null?void 0:t.total_questions)||20,skippedQuestions:(t==null?void 0:t.skipped_questions)||[]},selectedRegulations:p||[],visualQuizData:(t==null?void 0:t.visual_quiz_data)||{},freeTextData:(t==null?void 0:t.free_text_data)||{},parentalControls:(t==null?void 0:t.parental_controls)||{},personalInsights:((C=t==null?void 0:t.ai_generated_analytics)==null?void 0:C.complex_questions)||[],complexDecisionInsights:((K=t==null?void 0:t.ai_generated_analytics)==null?void 0:K.progress_over_time)||[],aiGeneratedAnalytics:(t==null?void 0:t.ai_generated_analytics)||{},assessmentMetadata:{createdAt:t==null?void 0:t.created_at,updatedAt:t==null?void 0:t.updated_at,title:(t==null?void 0:t.title)||"Value Profile Assessment"}}},M=JSON.stringify(f,null,2);navigator.clipboard.writeText(M),v({title:i("JSON script copied to clipboard!","JSON script copied to clipboard!","toast title"),description:i("Your EthicsProfile JSON script is ready to paste into","Your EthicsProfile JSON script is ready to paste into","toast message")+` ${s.name}`+i("'s settings.","'s settings.","toast message")})},children:["📋 ",e.jsx(o,{context:"button",children:"Copy Your EthicsProfile Instructions"})]})]})]}),e.jsx(b,{className:"w-full mt-3",disabled:!u,onClick:()=>
38{if(!u){v({title:i("Analysis Required","Analysis Required","toast title"),description:i("Please complete your EthicsProfile analysis before connecting AI systems.","Please complete your EthicsProfile analysis before connecting AI systems.","toast message")});return}const f=q(s.name);ve(s.name),v(f?{title:i("Disconnected!","Disconnected!","toast title"),description:`${s.name} `+i("has been disconnected from your EthicsProfile.","has been disconnected from your EthicsProfile.","toast message")}:{title:i("Connected!","Connected!","toast title"),description:`${s.name} `+i("is now marked as connected to your EthicsProfile.","is now marked as connected to your EthicsProfile.","toast message")})},children:q(s.name)?e.jsx(o,{context:"button",children:"Mark as Disconnected"}):e.jsx(o,{context:"button",children:"Mark as Connected"})})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"bg-yellow-50 dark:bg-yellow-950/20 p-4 rounded-lg border border-yellow-200 dark:border-yellow-800",children:[e.jsx("h4",{className:"font-medium mb-2 text-yellow-900 dark:text-yellow-100",children:e.jsx(o,{context:"modal section",children:"Direct Connection Not Yet Available"})}),e.jsxs("p",{className:"text-sm text-yellow-700 dark:text-yellow-300 mb-3",children:[e.jsx(o,{context:"modal description",children:"Unfortunately, we don't have a direct connection to"})," ",s.name," ",e.jsx(o,{context:"modal description",children:"yet. However, you can help us make this happen! Click the button below to send a pre-written email requesting EthicsProfile integration."})]}),e.jsx("p",{className:"text-xs text-yellow-600 dark:text-yellow-400",children:e.jsx(o,{context:"modal description",children:"The more users who request this feature, the more likely companies are to implement it."})})]}),e.jsxs("div",{className:"bg-muted/50 p-4 rounded-lg",children:[e.jsx("h4",{className:"font-medium mb-2",children:e.jsx(o,{context:"modal section",children:"What the email will do:"})}),e.jsxs("ul",{className:"text-sm space-y-1 text-muted-foreground",children:[e.jsxs("li",{children:["• ",e.jsx(o,{context:"email feature",children:"Explain EthicsProfile and its benefits"})]}),e.jsxs("li",{children:["• ",e.jsx(o,{context:"email feature",children:"Request"})," ",s.name," ",e.jsx(o,{context:"email feature",children:"to add integration support"})]}),e.jsxs("li",{children:["• ",e.jsx(o,{context:"email feature",children:"Show user demand for ethical AI features"})]}),e.jsxs("li",{children:["• ",e.jsx(o,{context:"email feature",children:"Provide contact information for partnerships"})]})]})]}),e.jsx(b,{className:"w-full",onClick:()=>Z(s.name),disabled:S[s.name],children:S[s.name]?e.jsxs(e.Fragment,{children:[e.jsx(_,{className:"h-4 w-4 mr-2 animate-spin"}),e.jsx(o,{context:"loading",children:"Opening email..."})]}):F[s.name]?e.jsxs(e.Fragment,{children:[e.jsx(_,{className:"h-4 w-4 mr-2 animate-spin"}),e.jsx(o,{context:"loading",children:"Preparing..."})]}):e.jsxs(e.Fragment,{children:["📧 ",e.jsx(o,{context:"button",children:"Send Request Email to"})," ",s.name]})})]})})]})]}),e.jsx(Ue,{children:e.jsxs(Be,{children:[e.jsx(Ye,{asChild:!0,children:e.jsx(b,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-muted-foreground hover:text-red-600 hover:bg-red-50 dark:hover:bg-red-950/20",onClick:f=>{f.stopPropagation(),W({name:s.name,logo:s.logo}),Y(!0)},children:e.jsx(U,{className:"h-4 w-4"})})}),e.jsx(We,{children:e.jsx("p",{className:"max-w-xs text-center",children:e.jsx(o,{context:"tooltip",children:"This AI didn't respect your EthicsProfile? Tell us and we'll complain with them"})})})]})})]})})]},r)})}),e.jsxs("section",{className:"relative overflow-hidden rounded-3xl bg-gradient-to-br from-background via-background to-muted/30 p-6 md:p-12 lg:p-16",children:[e.jsx("div",{className:"absolute inset-0 bg-grid-pattern opacity-5"}),e.jsxs("div",{className:"relative mx-auto max-w-4xl text-center",children:[e.jsxs("div",{className:"mb-6 inline-flex items-center rounded-full border border-primary/20 bg-primary/5 px-4 py-2 text-sm font-medium text-primary",children:[e.jsx(te,{className:"mr-2 h-4 w-4"}),e.jsx(o,{context:"section label",children:"Universal Ethics Layer"})]}),e.jsxs("h2",{className:"text-3xl font-bold tracking-tight text-foreground sm:text-4xl lg:text-5xl mb-6",children:[e.jsx(o,{context:"section title",children:"One Profile,"})," ",e.jsx("span",{className:"bg-gradient-to-r from-primary via-primary/80 to-primary bg-clip-text text-transparent",children:e.jsx(o,{context:"section title",children:"Infinite Applications"})})]}),e.jsx("p",{className:"mx-auto max-w-3xl text-lg leading-relaxed text-muted-foreground mb-12",children:e.jsx(o,{context:"section description",children:"EthicsProfile acts as a universal layer that translates your personal values into machine-readable instructions. Whether it's an autonomous vehicle deciding on a route, a chatbot responding to sensitive topics, a home robot prioritizing tasks, or a recommendation algorithm curating content, your EthicsProfile ensures AI systems act according to your values across 25+ different platforms and devices."})}),e.jsxs("div",{className:"grid gap-8 sm:grid-cols-3",children:[e.jsxs("div",{className:"rounded-2xl border border-border/50 bg-background/50 p-6 backdrop-blur-sm",children:[e.jsx("div",{className:"mb-4 inline-flex h-12 w-12 items-center justify-center rounded-xl bg-primary/10",children:e.jsx(Je,{className:"h-6 w-6 text-primary"})}),e.jsx("h3",{className:"mb-2 text-lg font-semibold text-foreground",children:e.jsx(o,{context:"feature title",children:"Real-time Decisions"})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:e.jsx(o,{context:"feature description",children:"AI systems make ethical choices aligned with your values in real-time, without delay or c
38ompromise."})})]}),e.jsxs("div",{className:"rounded-2xl border border-border/50 bg-background/50 p-6 backdrop-blur-sm",children:[e.jsx("div",{className:"mb-4 inline-flex h-12 w-12 items-center justify-center rounded-xl bg-primary/10",children:e.jsx(le,{className:"h-6 w-6 text-primary"})}),e.jsx("h3",{className:"mb-2 text-lg font-semibold text-foreground",children:e.jsx(o,{context:"feature title",children:"Cross-platform"})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:e.jsx(o,{context:"feature description",children:"One unified ethical framework works seamlessly across all your AI-powered devices and services."})})]}),e.jsxs("div",{className:"rounded-2xl border border-border/50 bg-background/50 p-6 backdrop-blur-sm",children:[e.jsx("div",{className:"mb-4 inline-flex h-12 w-12 items-center justify-center rounded-xl bg-primary/10",children:e.jsx(ee,{className:"h-6 w-6 text-primary"})}),e.jsx("h3",{className:"mb-2 text-lg font-semibold text-foreground",children:e.jsx(o,{context:"feature title",children:"Transparent Values"})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:e.jsx(o,{context:"feature description",children:"Always know why AI made specific choices, with clear alignment to your personal ethical principles."})})]})]})]})]})]})]}),e.jsx(Qe,{}),R&&e.jsx(ot,{isOpen:ge,onClose:()=>{Y(!1),W(null)},aiName:R.name,aiLogo:R.logo})]})};export{bt as default};

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.