@creaditor/business-ai 1.0.55 → 1.0.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/business-ai.es.js
CHANGED
|
@@ -23746,7 +23746,7 @@ function ET(e, t) {
|
|
|
23746
23746
|
language: t,
|
|
23747
23747
|
theme: r
|
|
23748
23748
|
};
|
|
23749
|
-
return n.logo && (l.logo = n.logo), n.website ? l.website = n.website : n.websiteUrl && (l.website = n.websiteUrl), n.socials && (l.socials = n.socials), n.contacts && (l.contacts = n.contacts), n.industry && (l.industry = n.industry), typeof n.is_haredi_sector == "boolean" && (l.is_haredi_sector = n.is_haredi_sector), n.owner_gender && (l.owner_gender = n.owner_gender), n.businessDesign && (l.businessDesign = n.businessDesign), n.designDescription && (l.designDescription = n.designDescription), n.imageStyleDescription && (l.imageStyleDescription = n.imageStyleDescription), n.keywords && Array.isArray(n.keywords) && (l.keywords = n.keywords), l;
|
|
23749
|
+
return n.logo && (l.logo = n.logo), n.website ? l.website = n.website : n.websiteUrl && (l.website = n.websiteUrl), n.socials && (l.socials = n.socials), n.contacts && (l.contacts = n.contacts), n.industry && (l.industry = n.industry), typeof n.is_haredi_sector == "boolean" && (l.is_haredi_sector = n.is_haredi_sector), n.owner_gender && (l.owner_gender = n.owner_gender), n.businessDesign && (l.businessDesign = n.businessDesign), n.designDescription && (l.designDescription = n.designDescription), n.imageStyleDescription && (l.imageStyleDescription = n.imageStyleDescription), n.keywords && Array.isArray(n.keywords) && (l.keywords = n.keywords), n.contentDiscovery && typeof n.contentDiscovery == "object" && (l.contentDiscovery = n.contentDiscovery), l;
|
|
23750
23750
|
}
|
|
23751
23751
|
function Nu(e) {
|
|
23752
23752
|
if (!e || typeof e != "object") return null;
|
package/dist/business-ai.umd.js
CHANGED
|
@@ -394,7 +394,7 @@ Newsletter creation ✉️, Landing pages 🎯, Digital courses 📇 and more`,s
|
|
|
394
394
|
`);r=c.pop();for(const d of c){const f=d.split(`
|
|
395
395
|
`)[0];if(console.log("[v3-sse] event:",f),d.startsWith("event: done")){const W=d.split(`
|
|
396
396
|
data: `)[1];console.log("[v3-sse] done payload length:",W==null?void 0:W.length),l=JSON.parse(W)}else if(d.startsWith("event: error")){const W=d.split(`
|
|
397
|
-
data: `)[1];throw console.error("[v3-sse] error event:",W),new Error(JSON.parse(W).reason)}}}if(!l)throw console.error("[v3-sse] no done event received. buffer was:",r.slice(0,500)),new Error("studio newsletter v3: stream ended without a done event");return console.log("[v3-sse] success, nodes count:",(i=l.nodes)==null?void 0:i.length),l}function Kj(e,t){const n=e??{},a=n.accountId||n.domain||n.websiteUrl||n.website||"",r=n.theme&&typeof n.theme=="object"?n.theme:{primary:"#1b65a0",secondary:"#841d94",colors:["#1b65a0","#ffffff"]},l={accountId:a,business_name:n.business_name||"",business_tone:n.business_tone||"",business_type:n.business_type||"",description:n.description||"",language:t,theme:r};return n.logo&&(l.logo=n.logo),n.website?l.website=n.website:n.websiteUrl&&(l.website=n.websiteUrl),n.socials&&(l.socials=n.socials),n.contacts&&(l.contacts=n.contacts),n.industry&&(l.industry=n.industry),typeof n.is_haredi_sector=="boolean"&&(l.is_haredi_sector=n.is_haredi_sector),n.owner_gender&&(l.owner_gender=n.owner_gender),n.businessDesign&&(l.businessDesign=n.businessDesign),n.designDescription&&(l.designDescription=n.designDescription),n.imageStyleDescription&&(l.imageStyleDescription=n.imageStyleDescription),n.keywords&&Array.isArray(n.keywords)&&(l.keywords=n.keywords),l}function Xc(e){if(!e||typeof e!="object")return null;const t={};for(const[n,a]of Object.entries(e))a!=null&&(t[n]=a);return Object.keys(t).length>0?t:null}async function Pj(e){if(!e.goal||!e.goal.trim())throw new Error("generateSeriesPrompt: goal is required and cannot be null or empty");const t={goal:e.goal.trim()};e.domain&&e.domain.trim()&&(t.domain=e.domain.trim()),e.totalParts!==void 0&&e.totalParts!==null&&(t.totalParts=e.totalParts),e.language&&e.language.trim()&&(t.language=e.language.trim()),e.targetAction&&e.targetAction.trim()&&(t.targetAction=e.targetAction.trim()),e.daysBetween!==void 0&&e.daysBetween!==null&&(t.daysBetween=e.daysBetween),e.context&&Object.keys(e.context).length>0&&(t.context=e.context);const n=await fetch(ea.SERIES_PROMPT,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){const a=await n.text();throw new Error(`generateSeriesPrompt failed: ${n.status} ${a}`)}return n.json()}async function Jj(e){const t={subject:e.subject,prompt:e.prompt,cta:e.cta,editInstruction:e.editInstruction,goal:e.goal,partNumber:e.partNumber,totalParts:e.totalParts};e.targetAction&&e.targetAction.trim()&&(t.targetAction=e.targetAction.trim()),e.language&&e.language.trim()&&(t.language=e.language.trim());const n=await fetch(ea.UPDATE_SERIES_PROMPT,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){const a=await n.text();throw new Error(`updateSeriesPrompt failed: ${n.status} ${a}`)}return n.json()}var Mg={},Dj=Fe;Object.defineProperty(Mg,"__esModule",{value:!0});var Qg=Mg.default=void 0,Yj=Dj(Oe()),Zj=A;Qg=Mg.default=(0,Yj.default)((0,Zj.jsx)("path",{d:"M15.5 14h-.79l-.28-.27c1.2-1.4 1.82-3.31 1.48-5.34-.47-2.78-2.79-5-5.59-5.34-4.23-.52-7.79 3.04-7.27 7.27.34 2.8 2.56 5.12 5.34 5.59 2.03.34 3.94-.28 5.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"SearchRounded");function _c(e){const t=v.useId().replace(/:/g,""),n=`cdtr-bai-${t}-c0`,a=`cdtr-bai-${t}-c1`;return A.jsxs("svg",{width:"20",height:"23",viewBox:"0 0 24 27",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,focusable:"false",...e,children:[A.jsx("path",{d:"M21 22H23V24H1V22H3V7C3 6.44772 3.44772 6 4 6H14C14.5523 6 15 6.44772 15 7V22H19V14H17V12H20C20.5523 12 21 12.4477 21 13V22ZM5 8V22H13V8H5ZM7 14H11V16H7V14ZM7 10H11V12H7V10Z",fill:"url(#cdtr-brand-gradient)"}),A.jsx("g",{clipPath:`url(#${n})`,children:A.jsx("path",{d:"M19.7134 7.12811L19.4668 7.69379C19.2864 8.10792 18.7136 8.10792 18.5331 7.69379L18.2866 7.12811C17.8471 6.11947 17.0554 5.31641 16.0677 4.87708L15.308 4.53922C14.8973 4.35653 14.8973 3.75881 15.308 3.57612L16.0252 3.25714C17.0384 2.80651 17.8442 1.97373 18.2761 0.930828L18.5293 0.319534C18.7058 -0.106511 19.2942 -0.106511 19.4706 0.319534L19.7238 0.930828C20.1558 1.97373 20.9616 2.80651 21.9748 3.25714L22.6919 3.57612C23.1027 3.75881 23.1027 4.35653 22.6919 4.53922L21.9323 4.87708C20.9445 5.31641 20.1529 6.11947 19.7134 7.12811Z",fill:"black"})}),A.jsx("g",{clipPath:`url(#${a})`,children:A.jsx("path",{d:"M19.7134 7.12811L19.4668 7.69379C19.2864 8.10792 18.7136 8.10792 18.5331 7.69379L18.2866 7.12811C17.8471 6.11947 17.0554 5.31641 16.0677 4.87708L15.308 4.53922C14.8973 4.35653 14.8973 3.75881 15.308 3.57612L16.0252 3.25714C17.0384 2.80651 17.8442 1.97373 18.2761 0.930828L18.5293 0.319534C18.7058 -0.106511 19.2942 -0.106511 19.4706 0.319534L19.7238 0.930828C20.1558 1.97373 20.9616 2.80651 21.9748 3.25714L22.6919 3.57612C23.1027 3.75881 23.1027 4.35653 22.6919 4.53922L21.9323 4.87708C20.9445 5.31641 20.1529 6.11947 19.7134 7.12811Z",fill:"url(#cdtr-brand-gradient)"})}),A.jsxs("defs",{children:[A.jsx("clipPath",{id:n,children:A.jsx("rect",{width:"9",height:"8",fill:"white",transform:"translate(15)"})}),A.jsx("clipPath",{id:a,children:A.jsx("rect",{width:"9",height:"8",fill:"white",transform:"translate(15)"})})]})]})}function Sa({title:e,description:t,children:n}){return A.jsxs(K,{component:"section",sx:{mb:{xs:2.5,sm:3.5}},children:[A.jsx(de,{component:"h2",sx:{fontSize:"0.8125rem",fontWeight:700,color:"text.secondary",letterSpacing:"0.02em",mb:t?.5:1.25,lineHeight:1.3},children:e}),t?A.jsx(de,{variant:"body2",color:"text.secondary",sx:{mb:2,maxWidth:"min(52ch, 100%)",lineHeight:1.55,fontSize:"0.8125rem"},children:t}):null,n]})}const Vg=["נשמע עסק מעניין מאוד!","בואו נמצא את הדומיין המושלם עבורך!","אני מחפש את האפשרויות הטובות ביותר...","מצאתי כמה אפשרויות מעולות!"],tr=Ul;function Nj({activeStep:e,steps:t,userName:n,websiteUrl:a,hasContext:r,setWebsiteUrl:l,setActiveStep:o,freeSolo:i,businessNameOrDescription:s="",setBusinessNameOrDescription:p,language:u}){const[c,d]=v.useState(!!r),[f,W]=v.useState(!1),[m,x]=v.useState(!1),[h,g]=v.useState(s),[C,y]=v.useState([]),[E,S]=v.useState(!1),[k,R]=v.useState(null),[V,b]=v.useState(null),[B,M]=v.useState(""),F=v.useRef(a),z=v.useRef(!1),{openDomainFinder:T,setOpenDomainFinder:j,stepBeforeDomainFinder:P,step2Data:L}=Ua(),q=v.useRef(T),w=v.useRef(s);w.current=s;const G=v.useRef(L);G.current=L,v.useEffect(()=>{var re,H,Ce,ge;if(T&&e===0&&(z.current=P===2,x(!0),l(""),y([]),R(null),b(null)),T){const he=((re=w.current)==null?void 0:re.trim())||((ge=(Ce=(H=G.current)==null?void 0:H.businessData)==null?void 0:Ce.business_name)==null?void 0:ge.trim())||"";g(he),he&&ne(he)}},[T,e,P]),v.useEffect(()=>{q.current&&!T&&m&&!z.current&&(x(!1),y([]),R(null)),q.current=T},[T,m]);const ee=()=>{j(!1),z.current||(x(!1),y([]),R(null))},Q=re=>{const H=new CustomEvent("business-ai-buy-domain",{detail:{domain:re},bubbles:!0,composed:!0});window.dispatchEvent(H)},N=()=>{z.current=!1,x(!0),l(""),p==null||p(""),g(""),y([]),R(null),b(null)},ne=re=>{const H=(re??h.trim())||"business";p==null||p(H!=="business"?H:h.trim()),S(!0),R(null),b(null),y([]);const Ce={prompt:`find domain for ${H}`};u&&(Ce.language=u),fetch(ea.DOMAIN_FINDER,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ce)}).then(async ge=>{var Ke,qe;if(!ge.ok)throw new Error("Failed to fetch domain suggestions");const he=(Ke=ge.body)==null?void 0:Ke.getReader(),ve=new TextDecoder;let ce="",Ze=null;if(!he)throw new Error("Response body is not readable");let le=!1;for(;!le;){const Be=await he.read();if(le=Be.done,le)break;const{value:Te}=Be;ce+=ve.decode(Te,{stream:!0});const Pe=ce.split(`
|
|
397
|
+
data: `)[1];throw console.error("[v3-sse] error event:",W),new Error(JSON.parse(W).reason)}}}if(!l)throw console.error("[v3-sse] no done event received. buffer was:",r.slice(0,500)),new Error("studio newsletter v3: stream ended without a done event");return console.log("[v3-sse] success, nodes count:",(i=l.nodes)==null?void 0:i.length),l}function Kj(e,t){const n=e??{},a=n.accountId||n.domain||n.websiteUrl||n.website||"",r=n.theme&&typeof n.theme=="object"?n.theme:{primary:"#1b65a0",secondary:"#841d94",colors:["#1b65a0","#ffffff"]},l={accountId:a,business_name:n.business_name||"",business_tone:n.business_tone||"",business_type:n.business_type||"",description:n.description||"",language:t,theme:r};return n.logo&&(l.logo=n.logo),n.website?l.website=n.website:n.websiteUrl&&(l.website=n.websiteUrl),n.socials&&(l.socials=n.socials),n.contacts&&(l.contacts=n.contacts),n.industry&&(l.industry=n.industry),typeof n.is_haredi_sector=="boolean"&&(l.is_haredi_sector=n.is_haredi_sector),n.owner_gender&&(l.owner_gender=n.owner_gender),n.businessDesign&&(l.businessDesign=n.businessDesign),n.designDescription&&(l.designDescription=n.designDescription),n.imageStyleDescription&&(l.imageStyleDescription=n.imageStyleDescription),n.keywords&&Array.isArray(n.keywords)&&(l.keywords=n.keywords),n.contentDiscovery&&typeof n.contentDiscovery=="object"&&(l.contentDiscovery=n.contentDiscovery),l}function Xc(e){if(!e||typeof e!="object")return null;const t={};for(const[n,a]of Object.entries(e))a!=null&&(t[n]=a);return Object.keys(t).length>0?t:null}async function Pj(e){if(!e.goal||!e.goal.trim())throw new Error("generateSeriesPrompt: goal is required and cannot be null or empty");const t={goal:e.goal.trim()};e.domain&&e.domain.trim()&&(t.domain=e.domain.trim()),e.totalParts!==void 0&&e.totalParts!==null&&(t.totalParts=e.totalParts),e.language&&e.language.trim()&&(t.language=e.language.trim()),e.targetAction&&e.targetAction.trim()&&(t.targetAction=e.targetAction.trim()),e.daysBetween!==void 0&&e.daysBetween!==null&&(t.daysBetween=e.daysBetween),e.context&&Object.keys(e.context).length>0&&(t.context=e.context);const n=await fetch(ea.SERIES_PROMPT,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){const a=await n.text();throw new Error(`generateSeriesPrompt failed: ${n.status} ${a}`)}return n.json()}async function Jj(e){const t={subject:e.subject,prompt:e.prompt,cta:e.cta,editInstruction:e.editInstruction,goal:e.goal,partNumber:e.partNumber,totalParts:e.totalParts};e.targetAction&&e.targetAction.trim()&&(t.targetAction=e.targetAction.trim()),e.language&&e.language.trim()&&(t.language=e.language.trim());const n=await fetch(ea.UPDATE_SERIES_PROMPT,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){const a=await n.text();throw new Error(`updateSeriesPrompt failed: ${n.status} ${a}`)}return n.json()}var Mg={},Dj=Fe;Object.defineProperty(Mg,"__esModule",{value:!0});var Qg=Mg.default=void 0,Yj=Dj(Oe()),Zj=A;Qg=Mg.default=(0,Yj.default)((0,Zj.jsx)("path",{d:"M15.5 14h-.79l-.28-.27c1.2-1.4 1.82-3.31 1.48-5.34-.47-2.78-2.79-5-5.59-5.34-4.23-.52-7.79 3.04-7.27 7.27.34 2.8 2.56 5.12 5.34 5.59 2.03.34 3.94-.28 5.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"SearchRounded");function _c(e){const t=v.useId().replace(/:/g,""),n=`cdtr-bai-${t}-c0`,a=`cdtr-bai-${t}-c1`;return A.jsxs("svg",{width:"20",height:"23",viewBox:"0 0 24 27",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,focusable:"false",...e,children:[A.jsx("path",{d:"M21 22H23V24H1V22H3V7C3 6.44772 3.44772 6 4 6H14C14.5523 6 15 6.44772 15 7V22H19V14H17V12H20C20.5523 12 21 12.4477 21 13V22ZM5 8V22H13V8H5ZM7 14H11V16H7V14ZM7 10H11V12H7V10Z",fill:"url(#cdtr-brand-gradient)"}),A.jsx("g",{clipPath:`url(#${n})`,children:A.jsx("path",{d:"M19.7134 7.12811L19.4668 7.69379C19.2864 8.10792 18.7136 8.10792 18.5331 7.69379L18.2866 7.12811C17.8471 6.11947 17.0554 5.31641 16.0677 4.87708L15.308 4.53922C14.8973 4.35653 14.8973 3.75881 15.308 3.57612L16.0252 3.25714C17.0384 2.80651 17.8442 1.97373 18.2761 0.930828L18.5293 0.319534C18.7058 -0.106511 19.2942 -0.106511 19.4706 0.319534L19.7238 0.930828C20.1558 1.97373 20.9616 2.80651 21.9748 3.25714L22.6919 3.57612C23.1027 3.75881 23.1027 4.35653 22.6919 4.53922L21.9323 4.87708C20.9445 5.31641 20.1529 6.11947 19.7134 7.12811Z",fill:"black"})}),A.jsx("g",{clipPath:`url(#${a})`,children:A.jsx("path",{d:"M19.7134 7.12811L19.4668 7.69379C19.2864 8.10792 18.7136 8.10792 18.5331 7.69379L18.2866 7.12811C17.8471 6.11947 17.0554 5.31641 16.0677 4.87708L15.308 4.53922C14.8973 4.35653 14.8973 3.75881 15.308 3.57612L16.0252 3.25714C17.0384 2.80651 17.8442 1.97373 18.2761 0.930828L18.5293 0.319534C18.7058 -0.106511 19.2942 -0.106511 19.4706 0.319534L19.7238 0.930828C20.1558 1.97373 20.9616 2.80651 21.9748 3.25714L22.6919 3.57612C23.1027 3.75881 23.1027 4.35653 22.6919 4.53922L21.9323 4.87708C20.9445 5.31641 20.1529 6.11947 19.7134 7.12811Z",fill:"url(#cdtr-brand-gradient)"})}),A.jsxs("defs",{children:[A.jsx("clipPath",{id:n,children:A.jsx("rect",{width:"9",height:"8",fill:"white",transform:"translate(15)"})}),A.jsx("clipPath",{id:a,children:A.jsx("rect",{width:"9",height:"8",fill:"white",transform:"translate(15)"})})]})]})}function Sa({title:e,description:t,children:n}){return A.jsxs(K,{component:"section",sx:{mb:{xs:2.5,sm:3.5}},children:[A.jsx(de,{component:"h2",sx:{fontSize:"0.8125rem",fontWeight:700,color:"text.secondary",letterSpacing:"0.02em",mb:t?.5:1.25,lineHeight:1.3},children:e}),t?A.jsx(de,{variant:"body2",color:"text.secondary",sx:{mb:2,maxWidth:"min(52ch, 100%)",lineHeight:1.55,fontSize:"0.8125rem"},children:t}):null,n]})}const Vg=["נשמע עסק מעניין מאוד!","בואו נמצא את הדומיין המושלם עבורך!","אני מחפש את האפשרויות הטובות ביותר...","מצאתי כמה אפשרויות מעולות!"],tr=Ul;function Nj({activeStep:e,steps:t,userName:n,websiteUrl:a,hasContext:r,setWebsiteUrl:l,setActiveStep:o,freeSolo:i,businessNameOrDescription:s="",setBusinessNameOrDescription:p,language:u}){const[c,d]=v.useState(!!r),[f,W]=v.useState(!1),[m,x]=v.useState(!1),[h,g]=v.useState(s),[C,y]=v.useState([]),[E,S]=v.useState(!1),[k,R]=v.useState(null),[V,b]=v.useState(null),[B,M]=v.useState(""),F=v.useRef(a),z=v.useRef(!1),{openDomainFinder:T,setOpenDomainFinder:j,stepBeforeDomainFinder:P,step2Data:L}=Ua(),q=v.useRef(T),w=v.useRef(s);w.current=s;const G=v.useRef(L);G.current=L,v.useEffect(()=>{var re,H,Ce,ge;if(T&&e===0&&(z.current=P===2,x(!0),l(""),y([]),R(null),b(null)),T){const he=((re=w.current)==null?void 0:re.trim())||((ge=(Ce=(H=G.current)==null?void 0:H.businessData)==null?void 0:Ce.business_name)==null?void 0:ge.trim())||"";g(he),he&&ne(he)}},[T,e,P]),v.useEffect(()=>{q.current&&!T&&m&&!z.current&&(x(!1),y([]),R(null)),q.current=T},[T,m]);const ee=()=>{j(!1),z.current||(x(!1),y([]),R(null))},Q=re=>{const H=new CustomEvent("business-ai-buy-domain",{detail:{domain:re},bubbles:!0,composed:!0});window.dispatchEvent(H)},N=()=>{z.current=!1,x(!0),l(""),p==null||p(""),g(""),y([]),R(null),b(null)},ne=re=>{const H=(re??h.trim())||"business";p==null||p(H!=="business"?H:h.trim()),S(!0),R(null),b(null),y([]);const Ce={prompt:`find domain for ${H}`};u&&(Ce.language=u),fetch(ea.DOMAIN_FINDER,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Ce)}).then(async ge=>{var Ke,qe;if(!ge.ok)throw new Error("Failed to fetch domain suggestions");const he=(Ke=ge.body)==null?void 0:Ke.getReader(),ve=new TextDecoder;let ce="",Ze=null;if(!he)throw new Error("Response body is not readable");let le=!1;for(;!le;){const Be=await he.read();if(le=Be.done,le)break;const{value:Te}=Be;ce+=ve.decode(Te,{stream:!0});const Pe=ce.split(`
|
|
398
398
|
`);ce=Pe.pop()||"";for(const je of Pe)if(je.startsWith("data: ")){const it=je.slice(6);try{const D=JSON.parse(it);D.message&&!((qe=D.metadata)!=null&&qe.token)&&b(D.message),(D.suggestions&&Array.isArray(D.suggestions)||D.status==="complete"&&D.suggestions)&&(Ze=D,b(null))}catch{continue}}}if(ce.startsWith("data: ")){const Be=ce.slice(6);try{const Te=JSON.parse(Be);(Te.suggestions&&Array.isArray(Te.suggestions)||Te.status==="complete"&&Te.suggestions)&&(Ze=Te)}catch{}}return Ze}).then(ge=>{if(ge!=null&&ge.suggestions&&Array.isArray(ge.suggestions))y(ge.suggestions.map(he=>({domain:he.domain,available:he.available})));else if(ge!=null&&ge.data){const he=ge.data;Array.isArray(he)?y(he.map(ve=>({domain:ve}))):he!=null&&he.domains&&Array.isArray(he.domains)?y(he.domains.map(ve=>({domain:ve}))):he!=null&&he.domain?y([{domain:he.domain}]):y([])}else y([]);S(!1)}).catch(ge=>{console.error("Error fetching domains:",ge),R("לא הצלחנו לטעון הצעות דומיין"),S(!1)})};v.useEffect(()=>{if(!E){M("");return}let re=0;M(Vg[re]);const H=setInterval(()=>{re=(re+1)%Vg.length,M(Vg[re])},2500);return()=>clearInterval(H)},[E]),v.useEffect(()=>{W(!0)},[]),v.useEffect(()=>{F.current=a},[a]),v.useEffect(()=>{g(s)},[s]);const ue=re=>{d(re)},_=re=>{const H=re.trim();return!H||H.startsWith("http://")||H.startsWith("https://")?H:"https://"+H},ae=re=>{const H=re.target.value,Ce=F.current;if(!H){F.current=H,l(H);return}if(H.includes("://")){F.current=H,l(H);return}if(H.startsWith("http://")||H.startsWith("https://")){F.current=H,l(H);return}const ge=Ce.includes("://"),he=H.length<Ce.length;if(ge&&!H.includes("://")&&(Ce.replace(/^https?:\/\//,"").startsWith(H)||he)){F.current=H,l(H);return}if(H.toLowerCase().startsWith("http")&&H.length<7){F.current=H,l(H);return}if(H.includes(".")||H.length>3){const ce=_(H);F.current=ce,l(ce)}else F.current=H,l(H)},fe=re=>{if(!re.trim()||(re.includes("http")||(re="https://"+re),!re.includes(".")))return!1;try{const H=new URL(re);return H.protocol==="http:"||H.protocol==="https:"}catch{return!1}};return A.jsxs(K,{sx:{position:"relative",padding:{xs:2,sm:3,md:5},width:{xs:"100%"},maxWidth:"100%",overflowY:"auto",boxSizing:"border-box"},children:[" ",A.jsx(ze,{variant:"text",color:"primary",onClick:ee,sx:{mb:2,fontSize:{xs:"0.875rem",sm:"1rem"},textTransform:"none"},children:"חזרה"}),A.jsx(ij,{sx:{display:"none"},activeStep:e,children:t.map(re=>A.jsx(Uq,{children:A.jsx(TI,{children:re})},re))}),A.jsxs(ut,{spacing:0,sx:{width:"100%"},children:[A.jsx(vn,{label:"Business AI",className:f?tr.fadeUp:"",sx:{p:{xs:1,sm:1.5,md:2},mb:{xs:2,sm:2.25},fontSize:{xs:"0.75rem",sm:"0.875rem",md:"1rem"},alignSelf:"flex-start"},icon:A.jsx(_c,{})}),A.jsxs(K,{className:f?tr.fadeUpDelay1:"",sx:{mb:{xs:2.5,sm:3}},children:[A.jsx(de,{component:"h1",variant:"h4",sx:{fontSize:{xs:"1.5rem",sm:"1.875rem",md:"2rem"},fontWeight:700,letterSpacing:"-0.025em",lineHeight:1.2,color:"text.primary",mb:{xs:1,sm:1.25}},children:"מביאים את המותג שלך למערכת"}),A.jsxs(de,{variant:"body2",color:"text.secondary",className:f?tr.fadeUpDelay2:"",sx:{fontSize:{xs:"0.875rem",sm:"0.9375rem"},maxWidth:"min(48ch, 100%)",lineHeight:1.55},children:[n?`היי ${n} — `:"","הזינו את כתובת האתר כדי שנמשוך לוגו, צבעים ותוכן, או המשיכו בלי אתר ונחפש דומיין מתאים."]})]}),m?A.jsx(K,{className:tr.stepView,sx:{width:"100%"},children:!E&&C.length===0&&!k?A.jsx(Sa,{title:"חיפוש דומיין",description:"תארו את העסק או את שם הדומיין הרצוי — נציע אפשרויות מתאימות.",children:A.jsx(at,{fullWidth:!0,variant:"outlined",placeholder:"שם העסק או תיאור קצר",autoComplete:"off",value:h,onChange:re=>{g(re.target.value),p==null||p(re.target.value.trim())},onKeyDown:re=>{re.key==="Enter"&&h.trim()&&(re.preventDefault(),ne())},InputProps:{endAdornment:A.jsx(ug,{position:"end",children:A.jsx(ze,{variant:"contained",color:"primary",size:"small",disabled:!h.trim()||E,onClick:()=>ne(),sx:{minWidth:0,px:1.25},"aria-label":"חפש דומיין",children:A.jsx(Qg,{fontSize:"small"})})})},className:f?tr.fadeUpDelay3:"",sx:{"& .MuiInputBase-input":{fontSize:{xs:"0.875rem",sm:"1rem"}}}})}):E?A.jsxs(K,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",py:4,minHeight:220,borderRadius:2,border:"1px dashed",borderColor:"divider",bgcolor:re=>un(re.palette.common.black,.02)},children:[A.jsx(va,{sx:{mb:2,width:40,height:40}}),A.jsx(de,{variant:"body1",color:"text.secondary",sx:{fontSize:"0.9375rem",textAlign:"center",px:2},children:V||B})]}):k?A.jsxs(A.Fragment,{children:[A.jsx(Ml,{severity:"error",sx:{mb:2,fontSize:"0.875rem"},children:k}),A.jsxs(ct,{container:!0,spacing:1,children:[A.jsx(ct,{item:!0,children:A.jsx(ze,{variant:"text",color:"primary",onClick:()=>{R(null),ne()},sx:{fontSize:"0.875rem"},children:"נסה שוב"})}),A.jsx(ct,{item:!0,children:A.jsx(ze,{variant:"text",color:"primary",onClick:ee,sx:{fontSize:"0.875rem"},children:"חזרה"})})]})]}):A.jsxs(Sa,{title:"תוצאות",description:"לחצו על דומיין לפתיחת רכישה. אפשר לחפש מחדש עם ניסוח אחר.",children:[A.jsx(at,{fullWidth:!0,variant:"outlined",placeholder:"שם העסק או תיאור קצר – חיפוש מחדש לתוצאות אחרות",autoComplete:"off",value:h,onChange:re=>{g(re.target.value),p==null||p(re.target.value.trim())},onKeyDown:re=>{re.key==="Enter"&&h.trim()&&(re.preventDefault(),ne())},InputProps:{endAdornment:A.jsx(ug,{position:"end",children:A.jsx(ze,{variant:"contained",color:"primary",size:"small",disabled:!h.trim()||E,onClick:()=>ne(),sx:{minWidth:0,px:1.25},"aria-label":"חפש דומיין",children:A.jsx(Qg,{fontSize:"small"})})})},sx:{mb:2,"& .MuiInputBase-input":{fontSize:{xs:"0.875rem",sm:"1rem"}}}}),A.jsx(K,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"repeat(2, 1fr)"},gap:1,mb:3},children:C.map((re,H)=>A.jsxs(K,{onClick:()=>Q(re.domain),sx:{border:"1px solid",borderColor:"divider",borderRadius:2,p:1.25,cursor:"pointer",transition:"border-color 0.2s ease, background-color 0.2s ease",bgcolor:Ce=>un(Ce.palette.common.black,.02),"&:hover":{borderColor:"primary.main",bgcolor:Ce=>un(Ce.palette.primary.main,.06)}},children:[A.jsx(de,{sx:{fontSize:"0.875rem",fontWeight:500},children:re.domain}),re.available!==!1&&A.jsx(de,{variant:"caption",color:"success.main",sx:{fontSize:"0.75rem"},children:"זמין"})]},H))}),A.jsxs(ct,{container:!0,spacing:1,justifyContent:"space-between",children:[A.jsx(ct,{item:!0,children:A.jsx(ze,{variant:"text",color:"primary",onClick:ee,sx:{fontSize:"0.875rem"},children:"חזרה"})}),A.jsx(ct,{item:!0,children:A.jsx(ze,{variant:"contained",color:"primary",onClick:()=>{p==null||p(h.trim()),o(1)},sx:{fontSize:"0.875rem"},children:"הבא"})})]})]})}):A.jsxs(A.Fragment,{children:[A.jsxs(Sa,{title:"כתובת האתר",description:"כתובת מלאה כולל https. אין אתר? השתמשו בקישור מתחת לשדה.",children:[A.jsx(at,{fullWidth:!0,label:"URL",variant:"outlined",margin:"normal",placeholder:"https://www.example.com",value:a,onChange:ae,className:f?tr.fadeUpDelay3:"",sx:{"& .MuiInputBase-input":{fontSize:{xs:"0.875rem",sm:"1rem"},textAlign:"right",direction:"rtl",fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace',fontWeight:500},"& .MuiInputLabel-root":{fontSize:{xs:"0.875rem",sm:"1rem"}}}}),A.jsx(ze,{variant:"text",color:"primary",onClick:N,className:f?tr.fadeUpDelay4:"",sx:{mt:{xs:.5,sm:1},fontSize:{xs:"0.8125rem",sm:"0.875rem"},textAlign:"right",whiteSpace:{xs:"normal",sm:"nowrap"},px:{xs:.5,sm:0},textTransform:"none"},children:"אני רוצה דומיין לעסק שלי"})]}),A.jsx(er,{sx:{my:{xs:1.5,sm:2},borderColor:"divider"}}),A.jsx(Sa,{title:"אישור והמשך",description:"נדרש לאימות הבעלות על האתר ולשימוש במידע ליצירת תכנים.",children:A.jsx(K,{sx:{p:{xs:1.25,sm:1.5},borderRadius:2,border:"1px solid",borderColor:"divider",bgcolor:re=>un(re.palette.common.black,.02)},children:A.jsx(Kc,{control:A.jsx(GU,{size:"small"}),checked:c,onChange:(re,H)=>ue(H),className:f?tr.fadeUpDelay3:"",sx:{m:0,alignItems:"flex-start","& .MuiTypography-root":{fontSize:{xs:"0.75rem",sm:"0.8125rem"},lineHeight:1.45}},label:"אני מאשר.ת שהאתר בבעלותי, ואני מסכימה למערכת שלח מסר לשמור את המידע ולהשתמש בו ליצירת תכנים לעסק שלי"})})}),A.jsx(ze,{onClick:()=>{l(""),o(1)},variant:"text",color:"primary",className:f?tr.fadeUpDelay4:"",sx:{mt:{xs:1,sm:1.5},mb:{xs:1,sm:1.5},fontSize:{xs:"0.75rem",sm:"0.875rem"},textAlign:"center",whiteSpace:{xs:"normal",sm:"nowrap"},px:{xs:.5,sm:1}},children:"אין לי אתר, אני אמלא בעצמי"}),A.jsx(ze,{disabled:!fe(a)||!c,variant:"contained",color:"primary",onClick:()=>o(1),fullWidth:!0,sx:{fontSize:{xs:"0.875rem",sm:"1rem"},maxWidth:{xs:"100%",sm:"auto"}},children:"הבא"}),A.jsx(er,{sx:{my:{xs:1.5,sm:2},borderColor:"divider"}}),A.jsx(ct,{className:f?tr.fadeUpDelay4:"",sx:{width:"100%",mt:{xs:2,sm:2.5,md:3}},justifyContent:{xs:"center",sm:"space-between"},container:!0,spacing:{xs:1,sm:0},children:i&&A.jsx(ct,{item:!0,xs:12,sm:"auto",children:A.jsx(ze,{variant:"text",color:"primary",disabled:!c,onClick:()=>{l(""),o(1)},fullWidth:!0,sx:{fontSize:{xs:"0.875rem",sm:"1rem"},maxWidth:{xs:"100%",sm:"auto"}},children:r?"צפייה במידע על העסק שלי":""})})})]})]})]})}var Ug={},Gj=Fe;Object.defineProperty(Ug,"__esModule",{value:!0});var Fl=Ug.default=void 0,Hj=Gj(Oe()),Xj=A;Fl=Ug.default=(0,Hj.default)((0,Xj.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");var Fg={},_j=Fe;Object.defineProperty(Fg,"__esModule",{value:!0});var Qs=Fg.default=void 0,$j=_j(Oe()),eT=A;Qs=Fg.default=(0,$j.default)((0,eT.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete");var zg={},tT=Fe;Object.defineProperty(zg,"__esModule",{value:!0});var cx=zg.default=void 0,nT=tT(Oe()),aT=A;cx=zg.default=(0,nT.default)((0,aT.jsx)("path",{d:"M5 20h14v-2H5zm0-10h4v6h6v-6h4l-7-7z"}),"Upload");var qg={},rT=Fe;Object.defineProperty(qg,"__esModule",{value:!0});var Ax=qg.default=void 0,lT=rT(Oe()),oT=A;Ax=qg.default=(0,lT.default)((0,oT.jsx)("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Image");var jg={},iT=Fe;Object.defineProperty(jg,"__esModule",{value:!0});var dx=jg.default=void 0,sT=iT(Oe()),pT=A;dx=jg.default=(0,sT.default)((0,pT.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Lock");var Tg={},uT=Fe;Object.defineProperty(Tg,"__esModule",{value:!0});var fx=Tg.default=void 0,cT=uT(Oe()),AT=A;fx=Tg.default=(0,cT.default)((0,AT.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6m6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26"}),"Autorenew");var Og={},dT=Fe;Object.defineProperty(Og,"__esModule",{value:!0});var Wx=Og.default=void 0,fT=dT(Oe()),WT=A;Wx=Og.default=(0,fT.default)((0,WT.jsx)("path",{d:"M9.5 11c1.93 0 3.5 1.57 3.5 3.5S11.43 18 9.5 18 6 16.43 6 14.5 7.57 11 9.5 11m0-2C6.46 9 4 11.46 4 14.5S6.46 20 9.5 20s5.5-2.46 5.5-5.5c0-1.16-.36-2.23-.97-3.12L18 7.42V10h2V4h-6v2h2.58l-3.97 3.97C11.73 9.36 10.66 9 9.5 9"}),"Male");var Kg={},gT=Fe;Object.defineProperty(Kg,"__esModule",{value:!0});var gx=Kg.default=void 0,hT=gT(Oe()),mT=A;gx=Kg.default=(0,hT.default)((0,mT.jsx)("path",{d:"M17.5 9.5C17.5 6.46 15.04 4 12 4S6.5 6.46 6.5 9.5c0 2.7 1.94 4.93 4.5 5.4V17H9v2h2v2h2v-2h2v-2h-2v-2.1c2.56-.47 4.5-2.7 4.5-5.4m-9 0C8.5 7.57 10.07 6 12 6s3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5"}),"Female");var Pg={},CT=Fe;Object.defineProperty(Pg,"__esModule",{value:!0});var hx=Pg.default=void 0,vT=CT(Oe()),yT=A;hx=Pg.default=(0,vT.default)((0,yT.jsx)("path",{d:"M12 8c1.93 0 3.5 1.57 3.5 3.5S13.93 15 12 15s-3.5-1.57-3.5-3.5S10.07 8 12 8m4.53.38 3.97-3.96V7h2V1h-6v2h2.58l-3.97 3.97C14.23 6.36 13.16 6 12 6s-2.23.36-3.11.97l-.65-.65 1.41-1.41-1.41-1.42L6.82 4.9 4.92 3H7.5V1h-6v6h2V4.42l1.91 1.9-1.42 1.42L5.4 9.15l1.41-1.41.65.65c-.6.88-.96 1.95-.96 3.11 0 2.7 1.94 4.94 4.5 5.41V19H9v2h2v2h2v-2h2v-2h-2v-2.09c2.56-.47 4.5-2.71 4.5-5.41 0-1.16-.36-2.23-.97-3.12"}),"Transgender");var Jg={},ST=Fe;Object.defineProperty(Jg,"__esModule",{value:!0});var mx=Jg.default=void 0;ET(v);var IT=ST(Oe()),xT=A;function Cx(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Cx=function(a){return a?n:t})(e)}function ET(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Cx(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if(l!=="default"&&Object.prototype.hasOwnProperty.call(e,l)){var o=r?Object.getOwnPropertyDescriptor(e,l):null;o&&(o.get||o.set)?Object.defineProperty(a,l,o):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}mx=Jg.default=(0,IT.default)((0,xT.jsx)("path",{d:"M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2m13 2h-2.5A3.5 3.5 0 0 0 12 8.5V11h-2v3h2v7h3v-7h3v-3h-3V9a1 1 0 0 1 1-1h2V5z"}),"Facebook");var Dg={},bT=Fe;Object.defineProperty(Dg,"__esModule",{value:!0});var vx=Dg.default=void 0;RT(v);var kT=bT(Oe()),wT=A;function yx(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(yx=function(a){return a?n:t})(e)}function RT(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=yx(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if(l!=="default"&&Object.prototype.hasOwnProperty.call(e,l)){var o=r?Object.getOwnPropertyDescriptor(e,l):null;o&&(o.get||o.set)?Object.defineProperty(a,l,o):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}vx=Dg.default=(0,kT.default)((0,wT.jsx)("path",{d:"M7.8 2h8.4C19.4 2 22 4.6 22 7.8v8.4a5.8 5.8 0 0 1-5.8 5.8H7.8C4.6 22 2 19.4 2 16.2V7.8A5.8 5.8 0 0 1 7.8 2m-.2 2A3.6 3.6 0 0 0 4 7.6v8.8C4 18.39 5.61 20 7.6 20h8.8a3.6 3.6 0 0 0 3.6-3.6V7.6C20 5.61 18.39 4 16.4 4H7.6m9.65 1.5a1.25 1.25 0 0 1 1.25 1.25A1.25 1.25 0 0 1 17.25 8 1.25 1.25 0 0 1 16 6.75a1.25 1.25 0 0 1 1.25-1.25M12 7a5 5 0 0 1 5 5 5 5 0 0 1-5 5 5 5 0 0 1-5-5 5 5 0 0 1 5-5m0 2a3 3 0 0 0-3 3 3 3 0 0 0 3 3 3 3 0 0 0 3-3 3 3 0 0 0-3-3z"}),"Instagram");var Yg={},BT=Fe;Object.defineProperty(Yg,"__esModule",{value:!0});var Sx=Yg.default=void 0;QT(v);var LT=BT(Oe()),MT=A;function Ix(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Ix=function(a){return a?n:t})(e)}function QT(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Ix(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if(l!=="default"&&Object.prototype.hasOwnProperty.call(e,l)){var o=r?Object.getOwnPropertyDescriptor(e,l):null;o&&(o.get||o.set)?Object.defineProperty(a,l,o):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}Sx=Yg.default=(0,LT.default)((0,MT.jsx)("path",{d:"M19 3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14m-.5 15.5v-5.3a3.26 3.26 0 0 0-3.26-3.26c-.85 0-1.84.52-2.32 1.3v-1.11h-2.79v8.37h2.79v-4.93c0-.77.62-1.4 1.39-1.4a1.4 1.4 0 0 1 1.4 1.4v4.93h2.79M6.88 8.56a1.68 1.68 0 0 0 1.68-1.68c0-.93-.75-1.69-1.68-1.69a1.69 1.69 0 0 0-1.69 1.69c0 .93.76 1.68 1.69 1.68m1.39 9.94v-8.37H5.5v8.37h2.77z"}),"LinkedIn");var Zg={},VT=Fe;Object.defineProperty(Zg,"__esModule",{value:!0});var xx=Zg.default=void 0;zT(v);var UT=VT(Oe()),FT=A;function Ex(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Ex=function(a){return a?n:t})(e)}function zT(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Ex(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if(l!=="default"&&Object.prototype.hasOwnProperty.call(e,l)){var o=r?Object.getOwnPropertyDescriptor(e,l):null;o&&(o.get||o.set)?Object.defineProperty(a,l,o):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}xx=Zg.default=(0,UT.default)((0,FT.jsx)("path",{d:"M10 15l5.19-3L10 9v6m11.56-7.83c.13.47.22 1.1.28 1.9.07.8.1 1.49.1 2.09L22 12c0 2.19-.16 3.8-.44 4.83-.25.9-.83 1.48-1.73 1.73-.47.13-1.33.22-2.65.28-1.3.07-2.49.1-3.59.1L12 19c-4.19 0-6.8-.16-7.83-.44-.9-.25-1.48-.83-1.73-1.73-.13-.47-.22-1.1-.28-1.9-.07-.8-.1-1.49-.1-2.09L2 12c0-2.19.16-3.8.44-4.83.25-.9.83-1.48 1.73-1.73.47-.13 1.33-.22 2.65-.28 1.3-.07 2.49-.1 3.59-.1L12 5c4.19 0 6.8.16 7.83.44.9.25 1.48.83 1.73 1.73z"}),"YouTube");var Ng={},qT=Fe;Object.defineProperty(Ng,"__esModule",{value:!0});var bx=Ng.default=void 0;OT(v);var jT=qT(Oe()),TT=A;function kx(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(kx=function(a){return a?n:t})(e)}function OT(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=kx(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if(l!=="default"&&Object.prototype.hasOwnProperty.call(e,l)){var o=r?Object.getOwnPropertyDescriptor(e,l):null;o&&(o.get||o.set)?Object.defineProperty(a,l,o):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}bx=Ng.default=(0,jT.default)((0,TT.jsx)("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"}),"X");var Gg={},KT=Fe;Object.defineProperty(Gg,"__esModule",{value:!0});var wx=Gg.default=void 0;DT(v);var PT=KT(Oe()),JT=A;function Rx(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Rx=function(a){return a?n:t})(e)}function DT(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Rx(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if(l!=="default"&&Object.prototype.hasOwnProperty.call(e,l)){var o=r?Object.getOwnPropertyDescriptor(e,l):null;o&&(o.get||o.set)?Object.defineProperty(a,l,o):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}wx=Gg.default=(0,PT.default)((0,JT.jsx)("path",{d:"M16.75 13.96c.25.13.41.2.46.3.06.11.04.61-.21 1.18-.2.56-1.24 1.1-1.7 1.12-.46.02-.47.36-2.96-.73-2.49-1.09-3.99-3.75-4.11-3.92-.12-.17-.96-1.38-.92-2.61.05-1.22.69-1.8.95-2.04.24-.26.51-.29.68-.26h.47c.15 0 .36-.06.55.45l.69 1.87c.06.13.1.28.01.44l-.27.41-.39.42c-.12.12-.26.25-.12.5.12.26.62 1.09 1.32 1.78.91.88 1.71 1.17 1.95 1.3.24.14.39.12.54-.04l.81-.94c.19-.25.35-.19.58-.11l1.67.88M12 2a10 10 0 0 1 10 10 10 10 0 0 1-10 10c-1.97 0-3.8-.57-5.35-1.55L2 22l1.55-4.65A9.969 9.969 0 0 1 2 12 10 10 0 0 1 12 2m0 2a8 8 0 0 0-8 8c0 1.72.54 3.31 1.46 4.61L4.5 19.5l2.89-.96A7.95 7.95 0 0 0 12 20a8 8 0 0 0 8-8 8 8 0 0 0-8-8z"}),"WhatsApp");var Hg={},YT=Fe;Object.defineProperty(Hg,"__esModule",{value:!0});var Bx=Hg.default=void 0;GT(v);var ZT=YT(Oe()),NT=A;function Lx(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Lx=function(a){return a?n:t})(e)}function GT(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Lx(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if(l!=="default"&&Object.prototype.hasOwnProperty.call(e,l)){var o=r?Object.getOwnPropertyDescriptor(e,l):null;o&&(o.get||o.set)?Object.defineProperty(a,l,o):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}Bx=Hg.default=(0,ZT.default)((0,NT.jsx)("path",{d:"M9.78 18.65l.28-4.23 7.68-6.92c.34-.31-.07-.46-.52-.19L7.74 13.3 3.64 12c-.88-.25-.89-.86.2-1.3l15.97-6.16c.73-.33 1.43.18 1.15 1.3l-2.72 12.81c-.19.91-.74 1.13-1.5.71L12.6 16.3l-1.99 1.93c-.23.23-.42.42-.83.42z"}),"Telegram");var Xg={},HT=Fe;Object.defineProperty(Xg,"__esModule",{value:!0});var Mx=Xg.default=void 0;$T(v);var XT=HT(Oe()),_T=A;function Qx(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Qx=function(a){return a?n:t})(e)}function $T(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Qx(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if(l!=="default"&&Object.prototype.hasOwnProperty.call(e,l)){var o=r?Object.getOwnPropertyDescriptor(e,l):null;o&&(o.get||o.set)?Object.defineProperty(a,l,o):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}Mx=Xg.default=(0,XT.default)((0,_T.jsx)("path",{d:"M22 12.14a2.19 2.19 0 0 0-3.71-1.57 10.93 10.93 0 0 0-5.86-1.87l1-4.7 3.27.71a1.56 1.56 0 1 0 .16-.76l-3.64-.77c-.11-.02-.22 0-.29.06-.09.05-.14.14-.16.26l-1.11 5.22c-2.33.07-4.43.78-5.95 1.86A2.2 2.2 0 0 0 4.19 10a2.16 2.16 0 0 0-.9 4.15 3.6 3.6 0 0 0-.05.66c0 3.37 3.92 6.12 8.76 6.12s8.76-2.73 8.76-6.12c0-.21-.01-.44-.05-.66A2.21 2.21 0 0 0 22 12.14M7 13.7c0-.86.68-1.56 1.54-1.56s1.56.7 1.56 1.56a1.56 1.56 0 0 1-1.56 1.56c-.86.02-1.54-.7-1.54-1.56m8.71 4.14C14.63 18.92 12.59 19 12 19c-.61 0-2.65-.1-3.71-1.16a.4.4 0 0 1 0-.57.4.4 0 0 1 .57 0c.68.68 2.14.91 3.14.91s2.47-.23 3.14-.91a.4.4 0 0 1 .57 0c.14.16.14.41 0 .57m-.29-2.56c-.86 0-1.56-.7-1.56-1.56a1.56 1.56 0 0 1 1.56-1.56c.86 0 1.58.7 1.58 1.56a1.6 1.6 0 0 1-1.58 1.56z"}),"Reddit");var _g={},e6=Fe;Object.defineProperty(_g,"__esModule",{value:!0});var Vx=_g.default=void 0;a6(v);var t6=e6(Oe()),n6=A;function Ux(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Ux=function(a){return a?n:t})(e)}function a6(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Ux(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if(l!=="default"&&Object.prototype.hasOwnProperty.call(e,l)){var o=r?Object.getOwnPropertyDescriptor(e,l):null;o&&(o.get||o.set)?Object.defineProperty(a,l,o):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}Vx=_g.default=(0,t6.default)((0,n6.jsx)("path",{d:"M9.04 21.54c.96.29 1.93.46 2.96.46a10 10 0 0 0 10-10A10 10 0 0 0 12 2 10 10 0 0 0 2 12c0 4.25 2.67 7.9 6.44 9.34-.09-.78-.18-2.07 0-2.96l1.15-4.94s-.29-.58-.29-1.5c0-1.38.86-2.41 1.84-2.41.86 0 1.26.63 1.26 1.44 0 .86-.57 2.09-.86 3.27-.17.98.52 1.84 1.52 1.84 1.78 0 3.16-1.9 3.16-4.58 0-2.4-1.72-4.04-4.19-4.04-2.82 0-4.48 2.1-4.48 4.31 0 .86.28 1.73.74 2.3.09.06.09.14.06.29l-.29 1.09c0 .17-.11.23-.28.11-1.28-.56-2.02-2.38-2.02-3.85 0-3.16 2.24-6.03 6.56-6.03 3.44 0 6.12 2.47 6.12 5.75 0 3.44-2.13 6.2-5.18 6.2-.97 0-1.92-.52-2.26-1.13l-.67 2.37c-.23.86-.86 2.01-1.29 2.7v-.03z"}),"Pinterest");var $g={},r6=Fe;Object.defineProperty($g,"__esModule",{value:!0});var Fx=$g.default=void 0;i6(v);var l6=r6(Oe()),o6=A;function zx(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(zx=function(a){return a?n:t})(e)}function i6(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=zx(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if(l!=="default"&&Object.prototype.hasOwnProperty.call(e,l)){var o=r?Object.getOwnPropertyDescriptor(e,l):null;o&&(o.get||o.set)?Object.defineProperty(a,l,o):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}Fx=$g.default=(0,l6.default)((0,o6.jsx)("path",{d:"M12 1.27a11 11 0 00-3.48 21.46c.55.09.73-.28.73-.55v-1.84c-3.03.64-3.67-1.46-3.67-1.46-.55-1.29-1.28-1.65-1.28-1.65-.92-.65.1-.65.1-.65 1.1 0 1.73 1.1 1.73 1.1.92 1.65 2.57 1.2 3.21.92a2 2 0 01.64-1.47c-2.47-.27-5.04-1.19-5.04-5.5 0-1.1.46-2.1 1.2-2.84a3.76 3.76 0 010-2.93s.91-.28 3.11 1.1c1.8-.49 3.7-.49 5.5 0 2.1-1.38 3.02-1.1 3.02-1.1a3.76 3.76 0 010 2.93c.83.74 1.2 1.74 1.2 2.94 0 4.21-2.57 5.13-5.04 5.4.45.37.82.92.82 2.02v3.03c0 .27.1.64.73.55A11 11 0 0012 1.27"}),"GitHub");var eh={},s6=Fe;Object.defineProperty(eh,"__esModule",{value:!0});var qx=eh.default=void 0,p6=s6(Oe()),u6=A;qx=eh.default=(0,p6.default)((0,u6.jsx)("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link");var th={},c6=Fe;Object.defineProperty(th,"__esModule",{value:!0});var jx=th.default=void 0,A6=c6(Oe()),d6=A;jx=th.default=(0,A6.default)((0,d6.jsx)("path",{d:"M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H3V5h18zM8 15c0-1.66 1.34-3 3-3 .35 0 .69.07 1 .18V6h5v2h-3v7.03c-.02 1.64-1.35 2.97-3 2.97-1.66 0-3-1.34-3-3"}),"MusicVideo");function f6({value:e,onChange:t,label:n="מילות מפתח",placeholder:a="הוספת מילת מפתח..."}){const[r,l]=v.useState(""),o=(s,p)=>{t(p)},i=(s,p)=>{l(p)};return A.jsx($W,{multiple:!0,freeSolo:!0,options:[],value:e,onChange:o,inputValue:r,onInputChange:i,renderTags:(s,p)=>s.map((u,c)=>v.createElement(vn,{variant:"outlined",label:u,...p({index:c}),key:c})),renderInput:s=>A.jsx(at,{...s,label:n,placeholder:a,variant:"outlined",margin:"normal"}),sx:{"& .MuiAutocomplete-tag":{margin:"4px"}}})}var nh={},W6=Fe;Object.defineProperty(nh,"__esModule",{value:!0});var ah=nh.default=void 0,g6=W6(Oe()),h6=A;ah=nh.default=(0,g6.default)((0,h6.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");var Ho=255,Fa=100,Vs=e=>{var{r:t,g:n,b:a,a:r}=e,l=Math.max(t,n,a),o=l-Math.min(t,n,a),i=o?l===t?(n-a)/o:l===n?2+(a-t)/o:4+(t-n)/o:0;return{h:60*(i<0?i+6:i),s:l?o/l*Fa:0,v:l/Ho*Fa,a:r}},Tx=e=>{var{h:t,s:n,l:a,a:r}=rh(e);return"hsla("+t+", "+n+"%, "+a+"%, "+r+")"},$c=e=>{var{h:t,s:n,l:a,a:r}=e;return n*=(a<50?a:Fa-a)/Fa,{h:t,s:n>0?2*n/(a+n)*Fa:0,v:a+n,a:r}},rh=e=>{var{h:t,s:n,v:a,a:r}=e,l=(200-n)*a/Fa;return{h:t,s:l>0&&l<200?n*a/Fa/(l<=Fa?l:200-l)*Fa:0,l:l/2,a:r}},Ox=e=>{var{r:t,g:n,b:a}=e,r=t<<16|n<<8|a;return"#"+(l=>new Array(7-l.length).join("0")+l)(r.toString(16))},Kx=e=>{var{r:t,g:n,b:a,a:r}=e,l=typeof r=="number"&&(r*255|256).toString(16).slice(1);return""+Ox({r:t,g:n,b:a})+(l||"")},zl=e=>Vs(m6(e)),m6=e=>{var t=e.replace("#","");/^#?/.test(e)&&t.length===3&&(e="#"+t.charAt(0)+t.charAt(0)+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2));var n=new RegExp("[A-Za-z0-9]{2}","g"),[a,r,l=0,o]=e.match(n).map(i=>parseInt(i,16));return{r:a,g:r,b:l,a:(o??255)/Ho}},Us=e=>{var{h:t,s:n,v:a,a:r}=e,l=t/60,o=n/Fa,i=a/Fa,s=Math.floor(l)%6,p=l-Math.floor(l),u=Ho*i*(1-o),c=Ho*i*(1-o*p),d=Ho*i*(1-o*(1-p));i*=Ho;var f={};switch(s){case 0:f.r=i,f.g=d,f.b=u;break;case 1:f.r=c,f.g=i,f.b=u;break;case 2:f.r=u,f.g=i,f.b=d;break;case 3:f.r=u,f.g=c,f.b=i;break;case 4:f.r=d,f.g=u,f.b=i;break;case 5:f.r=i,f.g=u,f.b=c;break}return f.r=Math.round(f.r),f.g=Math.round(f.g),f.b=Math.round(f.b),I({},f,{a:r})},C6=e=>{var{r:t,g:n,b:a,a:r}=Us(e);return"rgba("+t+", "+n+", "+a+", "+r+")"},v6=e=>{var{r:t,g:n,b:a}=e;return{r:t,g:n,b:a}},y6=e=>{var{h:t,s:n,l:a}=e;return{h:t,s:n,l:a}},lh=e=>Ox(Us(e)),S6=e=>Kx(Us(e)),I6=e=>{var{h:t,s:n,v:a}=e;return{h:t,s:n,v:a}},x6=e=>{var{r:t,g:n,b:a}=e,r=function(u){return u<=.04045?u/12.92:Math.pow((u+.055)/1.055,2.4)},l=r(t/255),o=r(n/255),i=r(a/255),s={};return s.x=l*.4124+o*.3576+i*.1805,s.y=l*.2126+o*.7152+i*.0722,s.bri=l*.0193+o*.1192+i*.9505,s},za=e=>{var t,n,a,r,l,o,i,s,p;return typeof e=="string"&&oh(e)?(o=zl(e),s=e):typeof e!="string"&&(o=e),o&&(a=I6(o),l=rh(o),r=Us(o),p=Kx(r),s=lh(o),n=y6(l),t=v6(r),i=x6(t)),{rgb:t,hsl:n,hsv:a,rgba:r,hsla:l,hsva:o,hex:s,hexa:p,xy:i}},oh=e=>/^#?([A-Fa-f0-9]{3,4}){1,2}$/.test(e),E6=rS();const Ia=Dl(E6);function Px(e){var t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useCallback((n,a)=>t.current&&t.current(n,a),[])}var Fs=e=>"touches"in e,Jx=e=>{!Fs(e)&&e.preventDefault&&e.preventDefault()},Dx=function(t,n,a){return n===void 0&&(n=0),a===void 0&&(a=1),t>a?a:t<n?n:t},Yx=(e,t)=>{var n=e.getBoundingClientRect(),a=Fs(t)?t.touches[0]:t;return{left:Dx((a.pageX-(n.left+window.pageXOffset))/n.width),top:Dx((a.pageY-(n.top+window.pageYOffset))/n.height),width:n.width,height:n.height,x:a.pageX-(n.left+window.pageXOffset),y:a.pageY-(n.top+window.pageYOffset)}},b6=["prefixCls","className","onMove","onDown"],ih=ht.forwardRef((e,t)=>{var{prefixCls:n="w-color-interactive",className:a,onMove:r,onDown:l}=e,o=Ia(e,b6),i=v.useRef(null),s=v.useRef(!1),[p,u]=v.useState(!1),c=Px(r),d=Px(l),f=g=>s.current&&!Fs(g)?!1:(s.current=Fs(g),!0),W=v.useCallback(g=>{if(Jx(g),!!i.current){var C=Fs(g)?g.touches.length>0:g.buttons>0;if(!C){u(!1);return}c==null||c(Yx(i.current,g),g)}},[c]),m=v.useCallback(()=>u(!1),[]),x=v.useCallback(g=>{g?(window.addEventListener(s.current?"touchmove":"mousemove",W),window.addEventListener(s.current?"touchend":"mouseup",m)):(window.removeEventListener("mousemove",W),window.removeEventListener("mouseup",m),window.removeEventListener("touchmove",W),window.removeEventListener("touchend",m))},[W,m]);v.useEffect(()=>(x(p),()=>{x(!1)}),[p,W,m,x]);var h=v.useCallback(g=>{var C=document.activeElement;C==null||C.blur(),Jx(g.nativeEvent),f(g.nativeEvent)&&i.current&&(d==null||d(Yx(i.current,g.nativeEvent),g.nativeEvent),u(!0))},[d]);return A.jsx("div",I({},o,{className:[n,a||""].filter(Boolean).join(" "),style:I({},o.style,{touchAction:"none"}),ref:i,tabIndex:0,onMouseDown:h,onTouchStart:h}))});ih.displayName="Interactive";var k6=["className","prefixCls","left","top","style","fillProps"],w6=e=>{var{className:t,prefixCls:n,left:a,top:r,style:l,fillProps:o}=e,i=Ia(e,k6),s=I({},l,{position:"absolute",left:a,top:r}),p=I({width:18,height:18,boxShadow:"var(--alpha-pointer-box-shadow)",borderRadius:"50%",backgroundColor:"var(--alpha-pointer-background-color)"},o==null?void 0:o.style,{transform:a?"translate(-9px, -1px)":"translate(-1px, -9px)"});return A.jsx("div",I({className:n+"-pointer "+(t||""),style:s},i,{children:A.jsx("div",I({className:n+"-fill"},o,{style:p}))}))},R6=["prefixCls","className","hsva","background","bgProps","innerProps","pointerProps","radius","width","height","direction","style","onChange","pointer"],B6="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==",eA=ht.forwardRef((e,t)=>{var{prefixCls:n="w-color-alpha",className:a,hsva:r,background:l,bgProps:o={},innerProps:i={},pointerProps:s={},radius:p=0,width:u,height:c=16,direction:d="horizontal",style:f,onChange:W,pointer:m}=e,x=Ia(e,R6),h=V=>{W&&W(I({},r,{a:d==="horizontal"?V.left:V.top}),V)},g=Tx(Object.assign({},r,{a:1})),C="linear-gradient(to "+(d==="horizontal"?"right":"bottom")+", rgba(244, 67, 54, 0) 0%, "+g+" 100%)",y={};d==="horizontal"?y.left=r.a*100+"%":y.top=r.a*100+"%";var E=I({"--alpha-background-color":"#fff","--alpha-pointer-background-color":"rgb(248, 248, 248)","--alpha-pointer-box-shadow":"rgb(0 0 0 / 37%) 0px 1px 4px 0px",borderRadius:p,background:"url("+B6+") left center",backgroundColor:"var(--alpha-background-color)"},{width:u,height:c},f,{position:"relative"}),S=v.useCallback(V=>{var b=.01,B=r.a,M=B;switch(V.key){case"ArrowLeft":d==="horizontal"&&(M=Math.max(0,B-b),V.preventDefault());break;case"ArrowRight":d==="horizontal"&&(M=Math.min(1,B+b),V.preventDefault());break;case"ArrowUp":d==="vertical"&&(M=Math.max(0,B-b),V.preventDefault());break;case"ArrowDown":d==="vertical"&&(M=Math.min(1,B+b),V.preventDefault());break;default:return}if(M!==B){var F={left:d==="horizontal"?M:r.a,top:d==="vertical"?M:r.a,width:0,height:0,x:0,y:0};W&&W(I({},r,{a:M}),F)}},[r,d,W]),k=v.useCallback(V=>{V.target.focus()},[]),R=m&&typeof m=="function"?m(I({prefixCls:n},s,y)):A.jsx(w6,I({},s,{prefixCls:n},y));return A.jsxs("div",I({},x,{className:[n,n+"-"+d,a||""].filter(Boolean).join(" "),style:E,ref:t,children:[A.jsx("div",I({},o,{style:I({inset:0,position:"absolute",background:l||C,borderRadius:p},o.style)})),A.jsx(ih,I({},i,{style:I({},i.style,{inset:0,zIndex:1,position:"absolute",outline:"none"}),onMove:h,onDown:h,onClick:k,onKeyDown:S,children:R}))]}))});eA.displayName="Alpha";var L6=["prefixCls","placement","label","value","className","style","labelStyle","inputStyle","onChange","onBlur","renderInput"],M6=e=>/^#?([A-Fa-f0-9]{3,4}){1,2}$/.test(e),Q6=e=>Number(String(e).replace(/%/g,"")),Xo=ht.forwardRef((e,t)=>{var{prefixCls:n="w-color-editable-input",placement:a="bottom",label:r,value:l,className:o,style:i,labelStyle:s,inputStyle:p,onChange:u,onBlur:c,renderInput:d}=e,f=Ia(e,L6),[W,m]=v.useState(l),x=v.useRef(!1),h=v.useRef(f.id||n+"-"+Math.random().toString(36).slice(2,11)),g=f.id||h.current;v.useEffect(()=>{e.value!==W&&(x.current||m(e.value))},[e.value]);function C(V,b){var B=(b||V.target.value).trim().replace(/^#/,"");M6(B)&&u&&u(V,B);var M=Q6(B);isNaN(M)||u&&u(V,M),m(B)}function y(V){x.current=!1,m(e.value),c&&c(V)}var E={};a==="bottom"&&(E.flexDirection="column"),a==="top"&&(E.flexDirection="column-reverse"),a==="left"&&(E.flexDirection="row-reverse");var S=I({"--editable-input-label-color":"rgb(153, 153, 153)","--editable-input-box-shadow":"rgb(204 204 204) 0px 0px 0px 1px inset","--editable-input-color":"#666",position:"relative",alignItems:"center",display:"flex",fontSize:11},E,i),k=I({width:"100%",paddingTop:2,paddingBottom:2,paddingLeft:3,paddingRight:3,fontSize:11,background:"transparent",boxSizing:"border-box",border:"none",color:"var(--editable-input-color)",boxShadow:"var(--editable-input-box-shadow)"},p),R=I({value:W,onChange:C,onBlur:y,autoComplete:"off",onFocus:()=>x.current=!0},f,{id:g,style:k,onFocusCapture:V=>{var b=V.target;b.setSelectionRange(b.value.length,b.value.length)}});return A.jsxs("div",{className:[n,o||""].filter(Boolean).join(" "),style:S,children:[d?d(R,t):A.jsx("input",I({ref:t},R)),r&&A.jsx("label",{htmlFor:g,style:I({color:"var(--editable-input-label-color)",textTransform:"capitalize"},s),children:r})]})});Xo.displayName="EditableInput";var V6=["prefixCls","className","color","colors","style","rectProps","onChange","addonAfter","addonBefore","rectRender"],Zx=ht.forwardRef((e,t)=>{var{prefixCls:n="w-color-swatch",className:a,color:r,colors:l=[],style:o,rectProps:i={},onChange:s,addonAfter:p,addonBefore:u,rectRender:c}=e,d=Ia(e,V6),f=I({"--swatch-background-color":"rgb(144, 19, 254)",background:"var(--swatch-background-color)",height:15,width:15,marginRight:5,marginBottom:5,cursor:"pointer",position:"relative",outline:"none",borderRadius:2},i.style),W=(m,x)=>{s&&s(zl(m),za(zl(m)),x)};return A.jsxs("div",I({ref:t},d,{className:[n,a||""].filter(Boolean).join(" "),style:I({display:"flex",flexWrap:"wrap",position:"relative"},o),children:[u&&ht.isValidElement(u)&&u,l&&Array.isArray(l)&&l.map((m,x)=>{var h="",g="";typeof m=="string"&&(h=m,g=m),typeof m=="object"&&m.color&&(h=m.title||m.color,g=m.color);var C=r&&r.toLocaleLowerCase()===g.toLocaleLowerCase(),y=c&&c({title:h,color:g,checked:!!C,style:I({},f,{background:g}),onClick:S=>W(g,S)});if(y)return A.jsx(v.Fragment,{children:y},x);var E=i.children&&ht.isValidElement(i.children)?ht.cloneElement(i.children,{color:g,checked:C}):null;return A.jsx("div",I({tabIndex:0,title:h,onClick:S=>W(g,S)},i,{children:E,style:I({},f,{background:g})}),x)}),p&&ht.isValidElement(p)&&p]}))});Zx.displayName="Swatch";function U6(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var F6={marginRight:0,marginBottom:0,borderRadius:0,boxSizing:"border-box",height:25,width:25};function z6(e){var{style:t,title:n,checked:a,color:r,onClick:l,rectProps:o}=e,i=v.useRef(null),s=v.useCallback(()=>{i.current.style.zIndex="2",i.current.style.outline="#fff solid 2px",i.current.style.boxShadow="rgb(0 0 0 / 25%) 0 0 5px 2px"},[]),p=v.useCallback(()=>{a||(i.current.style.zIndex="0",i.current.style.outline="initial",i.current.style.boxShadow="initial")},[a]),u=a?{zIndex:1,outline:"#fff solid 2px",boxShadow:"rgb(0 0 0 / 25%) 0 0 5px 2px"}:{zIndex:0};return A.jsx("div",I({ref:i,title:n},o,{onClick:l,onMouseEnter:s,onMouseLeave:p,style:I({},t,{marginRight:0,marginBottom:0,borderRadius:0,boxSizing:"border-box",height:25,width:25},F6,u,o==null?void 0:o.style)}))}var q6=["prefixCls","placement","className","style","color","colors","showTriangle","rectProps","onChange","rectRender"],j6=["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],Pt=function(e){return e.Left="L",e.LeftTop="LT",e.LeftBottom="LB",e.Right="R",e.RightTop="RT",e.RightBottom="RB",e.Top="T",e.TopRight="TR",e.TopLeft="TL",e.Bottom="B",e.BottomLeft="BL",e.BottomRight="BR",e}({}),Nx=ht.forwardRef((e,t)=>{var{prefixCls:n="w-color-github",placement:a=Pt.TopRight,className:r,style:l,color:o,colors:i=j6,showTriangle:s=!0,rectProps:p={},onChange:u,rectRender:c}=e,d=Ia(e,q6),f=typeof o=="string"&&oh(o)?zl(o):o,W=o?lh(f):"",m=E=>u&&u(za(E)),x=I({"--github-border":"1px solid rgba(0, 0, 0, 0.2)","--github-background-color":"#fff","--github-box-shadow":"rgb(0 0 0 / 15%) 0px 3px 12px","--github-arrow-border-color":"rgba(0, 0, 0, 0.15)",width:200,borderRadius:4,background:"var(--github-background-color)",boxShadow:"var(--github-box-shadow)",border:"var(--github-border)",position:"relative",padding:5},l),h={borderStyle:"solid",position:"absolute"},g=I({},h),C=I({},h);/^T/.test(a)&&(g.borderWidth="0 8px 8px",g.borderColor="transparent transparent var(--github-arrow-border-color)",C.borderWidth="0 7px 7px",C.borderColor="transparent transparent var(--github-background-color)"),a===Pt.TopRight&&(g.top=-8,C.top=-7),a===Pt.Top&&(g.top=-8,C.top=-7),a===Pt.TopLeft&&(g.top=-8,C.top=-7),/^B/.test(a)&&(g.borderWidth="8px 8px 0",g.borderColor="var(--github-arrow-border-color) transparent transparent",C.borderWidth="7px 7px 0",C.borderColor="var(--github-background-color) transparent transparent",a===Pt.BottomRight&&(g.top="100%",C.top="100%"),a===Pt.Bottom&&(g.top="100%",C.top="100%"),a===Pt.BottomLeft&&(g.top="100%",C.top="100%")),/^(B|T)/.test(a)&&((a===Pt.Top||a===Pt.Bottom)&&(g.left="50%",g.marginLeft=-8,C.left="50%",C.marginLeft=-7),(a===Pt.TopRight||a===Pt.BottomRight)&&(g.right=10,C.right=11),(a===Pt.TopLeft||a===Pt.BottomLeft)&&(g.left=7,C.left=8)),/^L/.test(a)&&(g.borderWidth="8px 8px 8px 0",g.borderColor="transparent var(--github-arrow-border-color) transparent transparent",C.borderWidth="7px 7px 7px 0",C.borderColor="transparent var(--github-background-color) transparent transparent",g.left=-8,C.left=-7),/^R/.test(a)&&(g.borderWidth="8px 0 8px 8px",g.borderColor="transparent transparent transparent var(--github-arrow-border-color)",C.borderWidth="7px 0 7px 7px",C.borderColor="transparent transparent transparent var(--github-background-color)",g.right=-8,C.right=-7),/^(L|R)/.test(a)&&((a===Pt.RightTop||a===Pt.LeftTop)&&(g.top=5,C.top=6),(a===Pt.Left||a===Pt.Right)&&(g.top="50%",C.top="50%",g.marginTop=-8,C.marginTop=-7),(a===Pt.LeftBottom||a===Pt.RightBottom)&&(g.top="100%",C.top="100%",g.marginTop=-21,C.marginTop=-20));var y=E=>{var S=I({},(U6(E),E)),k=c&&c(I({},S));return k||A.jsx(z6,I({},S,{rectProps:p}))};return A.jsx(Zx,I({ref:t,className:[n,r].filter(Boolean).join(" "),colors:i,color:W,rectRender:y},d,{onChange:m,style:x,rectProps:{style:{marginRight:0,marginBottom:0,borderRadius:0,height:25,width:25}},addonBefore:A.jsx(v.Fragment,{children:s&&A.jsxs(v.Fragment,{children:[A.jsx("div",{style:g}),A.jsx("div",{style:C})]})})}))});Nx.displayName="Github";var T6=e=>{var{className:t,color:n,left:a,top:r,prefixCls:l}=e,o={position:"absolute",top:r,left:a},i={"--saturation-pointer-box-shadow":"rgb(255 255 255) 0px 0px 0px 1.5px, rgb(0 0 0 / 30%) 0px 0px 1px 1px inset, rgb(0 0 0 / 40%) 0px 0px 1px 2px",width:6,height:6,transform:"translate(-3px, -3px)",boxShadow:"var(--saturation-pointer-box-shadow)",borderRadius:"50%",backgroundColor:n};return v.useMemo(()=>A.jsx("div",{className:l+"-pointer "+(t||""),style:o,children:A.jsx("div",{className:l+"-fill",style:i})}),[r,a,n,t,l])},O6=["prefixCls","radius","pointer","className","hue","style","hsva","onChange"],Gx=ht.forwardRef((e,t)=>{var n,{prefixCls:a="w-color-saturation",radius:r=0,pointer:l,className:o,hue:i=0,style:s,hsva:p,onChange:u}=e,c=Ia(e,O6),d=I({width:200,height:200,borderRadius:r},s,{position:"relative"}),f=v.useRef(null),W=v.useCallback(C=>{f.current=C,typeof t=="function"?t(C):t&&"current"in t&&(t.current=C)},[t]),m=v.useCallback((C,y)=>{u&&p&&u({h:p.h,s:C.left*100,v:(1-C.top)*100,a:p.a});var E=f.current;E&&E.focus()},[p,u]),x=v.useCallback(C=>{if(!(!p||!u)){var y=1,E=p.s,S=p.v,k=!1;switch(C.key){case"ArrowLeft":E=Math.max(0,p.s-y),k=!0,C.preventDefault();break;case"ArrowRight":E=Math.min(100,p.s+y),k=!0,C.preventDefault();break;case"ArrowUp":S=Math.min(100,p.v+y),k=!0,C.preventDefault();break;case"ArrowDown":S=Math.max(0,p.v-y),k=!0,C.preventDefault();break;default:return}k&&u({h:p.h,s:E,v:S,a:p.a})}},[p,u]),h=v.useMemo(()=>{if(!p)return null;var C={top:100-p.v+"%",left:p.s+"%",color:Tx(p)};return l&&typeof l=="function"?l(I({prefixCls:a},C)):A.jsx(T6,I({prefixCls:a},C))},[p,l,a]),g=v.useCallback(C=>{C.target.focus()},[]);return A.jsx(ih,I({className:[a,o||""].filter(Boolean).join(" ")},c,{style:I({position:"absolute",inset:0,cursor:"crosshair",backgroundImage:"linear-gradient(0deg, #000, transparent), linear-gradient(90deg, #fff, hsl("+((n=p==null?void 0:p.h)!=null?n:i)+", 100%, 50%))"},d,{outline:"none"}),ref:W,onMove:m,onDown:m,onKeyDown:x,onClick:g,children:h}))});Gx.displayName="Saturation";var K6=["prefixCls","className","hue","onChange","direction"],Hx=ht.forwardRef((e,t)=>{var{prefixCls:n="w-color-hue",className:a,hue:r=0,onChange:l,direction:o="horizontal"}=e,i=Ia(e,K6);return A.jsx(eA,I({ref:t,className:n+" "+(a||"")},i,{direction:o,background:"linear-gradient(to "+(o==="horizontal"?"right":"bottom")+", rgb(255, 0, 0) 0%, rgb(255, 255, 0) 17%, rgb(0, 255, 0) 33%, rgb(0, 255, 255) 50%, rgb(0, 0, 255) 67%, rgb(255, 0, 255) 83%, rgb(255, 0, 0) 100%)",hsva:{h:r,s:100,v:100,a:r/360},onChange:(s,p)=>{l&&l({h:o==="horizontal"?360*p.left:360*p.top})}}))});Hx.displayName="Hue";var P6=["prefixCls","hsva","placement","rProps","gProps","bProps","aProps","className","style","onChange"],sh=ht.forwardRef((e,t)=>{var{prefixCls:n="w-color-editable-input-rgba",hsva:a,placement:r="bottom",rProps:l={},gProps:o={},bProps:i={},aProps:s={},className:p,style:u,onChange:c}=e,d=Ia(e,P6),f=a?Us(a):{};function W(g){var C=Number(g.target.value);C&&C>255&&(g.target.value="255"),C&&C<0&&(g.target.value="0")}var m=g=>{var C=Number(g.target.value);C&&C>100&&(g.target.value="100"),C&&C<0&&(g.target.value="0")},x=(g,C,y)=>{typeof g=="number"&&(C==="a"&&(g<0&&(g=0),g>100&&(g=100),c&&c(za(Vs(I({},f,{a:g/100}))))),g>255&&(g=255,y.target.value="255"),g<0&&(g=0,y.target.value="0"),C==="r"&&c&&c(za(Vs(I({},f,{r:g})))),C==="g"&&c&&c(za(Vs(I({},f,{g})))),C==="b"&&c&&c(za(Vs(I({},f,{b:g})))))},h=f.a?Math.round(f.a*100)/100:0;return A.jsxs("div",I({ref:t,className:[n,p||""].filter(Boolean).join(" ")},d,{style:I({fontSize:11,display:"flex"},u),children:[A.jsx(Xo,I({label:"R",value:f.r||0,onBlur:W,placement:r,onChange:(g,C)=>x(C,"r",g)},l,{style:I({},l.style)})),A.jsx(Xo,I({label:"G",value:f.g||0,onBlur:W,placement:r,onChange:(g,C)=>x(C,"g",g)},o,{style:I({marginLeft:5},o.style)})),A.jsx(Xo,I({label:"B",value:f.b||0,onBlur:W,placement:r,onChange:(g,C)=>x(C,"b",g)},i,{style:I({marginLeft:5},i.style)})),s&&A.jsx(Xo,I({label:"A",value:parseInt(String(h*100),10),onBlur:m,placement:r,onChange:(g,C)=>x(C,"a",g)},s,{style:I({marginLeft:5},s.style)}))]}))});sh.displayName="EditableInputRGBA";var J6=["prefixCls","hsva","hProps","sProps","lProps","aProps","className","onChange"],Xx=ht.forwardRef((e,t)=>{var{prefixCls:n="w-color-editable-input-hsla",hsva:a,hProps:r={},sProps:l={},lProps:o={},aProps:i={},className:s,onChange:p}=e,u=Ia(e,J6),c=a?rh(a):{h:0,s:0,l:0,a:0},d=(W,m,x)=>{typeof W=="number"&&(m==="h"&&(W<0&&(W=0),W>360&&(W=360),p&&p(za($c(I({},c,{h:W}))))),m==="s"&&(W<0&&(W=0),W>100&&(W=100),p&&p(za($c(I({},c,{s:W}))))),m==="l"&&(W<0&&(W=0),W>100&&(W=100),p&&p(za($c(I({},c,{l:W}))))),m==="a"&&(W<0&&(W=0),W>1&&(W=1),p&&p(za($c(I({},c,{a:W}))))))},f=i==!1?!1:I({label:"A",value:Math.round(c.a*100)/100},i,{onChange:(W,m)=>d(m,"a")});return A.jsx(sh,I({ref:t,hsva:a,rProps:I({label:"H",value:Math.round(c.h)},r,{onChange:(W,m)=>d(m,"h")}),gProps:I({label:"S",value:Math.round(c.s)+"%"},l,{onChange:(W,m)=>d(m,"s")}),bProps:I({label:"L",value:Math.round(c.l)+"%"},o,{onChange:(W,m)=>d(m,"l")}),aProps:f,className:[n,s||""].filter(Boolean).join(" ")},u))});Xx.displayName="EditableInputHSLA";var D6=["style"];function Y6(e){var{style:t}=e,n=Ia(e,D6),a=v.useRef(null),r=v.useCallback(()=>{a.current.style.backgroundColor="var(--chrome-arrow-background-color)"},[]),l=v.useCallback(()=>{a.current.style.backgroundColor="transparent"},[]);return A.jsx("div",I({ref:a,style:I({marginLeft:5,cursor:"pointer",transition:"background-color .3s",borderRadius:2},t)},n,{onMouseEnter:r,onMouseLeave:l,children:A.jsx("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24",style:{display:"block"},children:A.jsx("path",{d:"M373.888 576h276.224c9.322667 0 14.293333 11.178667 9.173333 18.773333l-1.258666 1.557334-138.112 146.858666a10.709333 10.709333 0 0 1-14.293334 1.365334l-1.536-1.365334-138.112-146.858666c-6.592-6.997333-2.666667-18.645333 5.973334-20.16l1.941333-0.170667h276.224-276.224z m146.026667-295.189333l138.112 146.858666c7.04 7.509333 2.069333 20.330667-7.914667 20.330667H373.888c-9.984 0-14.976-12.821333-7.914667-20.330667l138.112-146.858666a10.730667 10.730667 0 0 1 15.829334 0z",fill:"var(--chrome-arrow-fill)"})})}))}function Z6(){return"EyeDropper"in window}function N6(e){var t=()=>{if("EyeDropper"in window){var n=new window.EyeDropper;n.open().then(a=>{e.onPickColor==null||e.onPickColor(a.sRGBHex)}).catch(a=>{a.name})}};return A.jsx("svg",{viewBox:"0 0 512 512",height:"1em",width:"1em",onClick:t,children:A.jsx("path",{fill:"currentColor",d:"M482.8 29.23c38.9 38.98 38.9 102.17 0 141.17L381.2 271.9l9.4 9.5c12.5 12.5 12.5 32.7 0 45.2s-32.7 12.5-45.2 0l-160-160c-12.5-12.5-12.5-32.7 0-45.2s32.7-12.5 45.2 0l9.5 9.4L341.6 29.23c39-38.974 102.2-38.974 141.2 0zM55.43 323.3 176.1 202.6l45.3 45.3-120.7 120.7c-3.01 3-4.7 7-4.7 11.3V416h36.1c4.3 0 8.3-1.7 11.3-4.7l120.7-120.7 45.3 45.3-120.7 120.7c-15 15-35.4 23.4-56.6 23.4H89.69l-39.94 26.6c-12.69 8.5-29.59 6.8-40.377-4-10.786-10.8-12.459-27.7-3.998-40.4L32 422.3v-42.4c0-21.2 8.43-41.6 23.43-56.6z"})})}var G6=["prefixCls","className","style","color","showEditableInput","showEyeDropper","showColorPreview","showHue","showAlpha","inputType","rectProps","onChange"],qa=function(e){return e.HEXA="hexa",e.RGBA="rgba",e.HSLA="hsla",e}({}),_x=ht.forwardRef((e,t)=>{var{prefixCls:n="w-color-chrome",className:a,style:r,color:l,showEditableInput:o=!0,showEyeDropper:i=!0,showColorPreview:s=!0,showHue:p=!0,showAlpha:u=!0,inputType:c=qa.RGBA,rectProps:d={},onChange:f}=e,W=Ia(e,G6),m=typeof l=="string"&&oh(l)?zl(l):l||{h:0,s:0,l:0,a:0},x=B=>f&&f(za(B)),[h,g]=v.useState(c),C=()=>{h===qa.RGBA&&g(qa.HSLA),h===qa.HSLA&&g(qa.HEXA),h===qa.HEXA&&g(qa.RGBA)},y={paddingTop:6},E={textAlign:"center",paddingTop:4,paddingBottom:4},S=I({"--chrome-arrow-fill":"#333","--chrome-arrow-background-color":"#e8e8e8",borderRadius:0,flexDirection:"column",width:230,padding:0},r),k={"--chrome-alpha-box-shadow":"rgb(0 0 0 / 25%) 0px 0px 1px inset",borderRadius:"50%",background:C6(m),boxShadow:"var(--chrome-alpha-box-shadow)"},R=B=>{var M=zl(B);x(I({},M))},V={height:14,width:14},b={style:I({},V),fillProps:{style:V}};return A.jsx(Nx,I({ref:t,color:m,style:S,colors:void 0,className:[n,a].filter(Boolean).join(" "),placement:Pt.TopLeft},W,{addonAfter:A.jsxs(v.Fragment,{children:[A.jsx(Gx,{hsva:m,style:{width:"100%",height:130},onChange:B=>{x(I({},m,B,{a:m.a}))}}),A.jsxs("div",{style:{padding:15,display:"flex",alignItems:"center",gap:10},children:[Z6()&&i&&A.jsx(N6,{onPickColor:R}),s&&A.jsx(eA,{width:28,height:28,hsva:m,radius:2,style:{borderRadius:"50%"},bgProps:{style:{background:"transparent"}},innerProps:{style:k},pointer:()=>A.jsx(v.Fragment,{})}),A.jsxs("div",{style:{flex:1},children:[p==!0&&A.jsx(Hx,{hue:m.h,style:{width:"100%",height:12,borderRadius:2},pointerProps:b,bgProps:{style:{borderRadius:2}},onChange:B=>{x(I({},m,B))}}),u==!0&&A.jsx(eA,{hsva:m,style:{marginTop:6,height:12,borderRadius:2},pointerProps:b,bgProps:{style:{borderRadius:2}},onChange:B=>{x(I({},m,B))}})]})]}),o&&A.jsxs("div",{style:{display:"flex",alignItems:"flex-start",padding:"0 15px 15px 15px",userSelect:"none"},children:[A.jsxs("div",{style:{flex:1},children:[h==qa.RGBA&&A.jsx(sh,{hsva:m,rProps:{labelStyle:y,inputStyle:E},gProps:{labelStyle:y,inputStyle:E},bProps:{labelStyle:y,inputStyle:E},aProps:u==!1?!1:{labelStyle:y,inputStyle:E},onChange:B=>x(B.hsva)}),h===qa.HEXA&&A.jsx(Xo,{label:"HEX",labelStyle:y,inputStyle:E,value:m.a>0&&m.a<1?S6(m).toLocaleUpperCase():lh(m).toLocaleUpperCase(),onChange:(B,M)=>{typeof M=="string"&&x(zl(/^#/.test(M)?M:"#"+M))}}),h===qa.HSLA&&A.jsx(Xx,{hsva:m,hProps:{labelStyle:y,inputStyle:E},sProps:{labelStyle:y,inputStyle:E},lProps:{labelStyle:y,inputStyle:E},aProps:u==!1?!1:{labelStyle:y,inputStyle:E},onChange:B=>x(B.hsva)})]}),A.jsx(Y6,{onClick:C})]})]}),rectRender:()=>A.jsx(v.Fragment,{})}))});_x.displayName="Chrome";const ph="#6366f1";function zs(e){const t=e.trim().replace(/^#/,"");return/^[0-9a-fA-F]{6}$/.test(t)?`#${t.toLowerCase()}`:/^[0-9a-fA-F]{3}$/.test(t)?`#${t.split("").map(a=>a+a).join("").toLowerCase()}`:""}function H6({colors:e,primary:t,secondary:n,onPrimaryChange:a,onSecondaryChange:r,onColorsChange:l}){const{shadowRoot:o}=Ua(),i=v.useMemo(()=>o??void 0,[o]),[s,p]=v.useState(null),u=!!s,[c,d]=v.useState(ph),[f,W]=v.useState(""),[m,x]=v.useState(null),h=v.useCallback(R=>{p(R),d(e.length>0?e[e.length-1]:ph)},[e]),g=v.useCallback(()=>{p(null)},[]),C=v.useCallback(()=>{const R=zs(c);if(!R)return;if(e.some(b=>b.toLowerCase()===R.toLowerCase())){g();return}l([...e,R]),g()},[e,c,l,g]),y=v.useCallback(R=>{const V=e[R],b=e.filter((B,M)=>M!==R);V&&t.toLowerCase()===V.toLowerCase()&&a(""),V&&n.toLowerCase()===V.toLowerCase()&&r(""),l(b)},[e,t,n,a,r,l]),E=v.useCallback((R,V)=>{W(V),R.dataTransfer.effectAllowed="copy",R.dataTransfer.setData("text/plain",V)},[]),S=v.useCallback(()=>{x(null),W("")},[]),k=v.useCallback((R,V)=>{V.preventDefault();const b=V.dataTransfer.getData("text/plain"),B=zs(b||f);if(!B){x(null);return}R==="primary"?a(B):r(B),x(null),W("")},[f,a,r]);return A.jsxs(K,{children:[A.jsx(de,{variant:"subtitle2",sx:{mb:2,fontWeight:600},children:"בחירת צבעי עיצוב"}),A.jsx(de,{variant:"body2",sx:{mb:2,color:"text.secondary"},children:"הוסיפו צבעים משלכם או בחרו מהמאגר. לחצו על גוון או גררו אותו לאזור צבע ראשי/משני כדי להגדיר."}),A.jsx(ze,{variant:"contained",color:"primary",size:"medium",startIcon:A.jsx(Fl,{}),onClick:R=>u?g():h(R.currentTarget),"aria-expanded":u,"aria-controls":"business-ai-color-picker-panel",id:"business-ai-color-picker-trigger",sx:{mb:3,px:2.5,py:1,borderRadius:3,textTransform:"none",fontWeight:600,boxShadow:"0 8px 24px rgba(99, 40, 167, 0.35)","&:hover":{boxShadow:"0 10px 28px rgba(99, 40, 167, 0.42)"}},children:u?"סגירת לוח בחירת הצבע":"הוספת צבע משלך"}),A.jsxs(SI,{open:u,anchorEl:s,onClose:g,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},disableScrollLock:!0,container:i,disablePortal:!i,slotProps:{root:{sx:{zIndex:2e3},disableEnforceFocus:!0,disableAutoFocus:!0},paper:{id:"business-ai-color-picker-panel",elevation:8,role:"region","aria-labelledby":"business-ai-color-picker-trigger",sx:{mt:1,p:2.5,borderRadius:3,maxWidth:340,background:"linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.98) 100%)",border:"1px solid",borderColor:"divider",overflow:"visible"}}},children:[A.jsx(de,{variant:"subtitle2",sx:{mb:1.5,fontWeight:700},children:"בחירת צבע וגוון"}),A.jsx(de,{variant:"caption",color:"text.secondary",sx:{display:"block",mb:1.5},children:"התאמת גוון, רוויה ובהירות, ועריכת HEX / RGB / HSL. אפשר לעבור בין מצבי הקלט בלחיצה על תווית השדות. דיגום צבע מהמסך זמין בדפדפנים שתומכים בכך."}),A.jsx(K,{sx:{display:"flex",justifyContent:"center",mb:2,"& .w-color-chrome":{boxShadow:"none !important",borderRadius:2,border:"1px solid",borderColor:"divider",overflow:"hidden",bgcolor:"background.paper"}},children:A.jsx(_x,{color:zs(c)||ph,onChange:R=>d(R.hex),showAlpha:!1,showHue:!0,showColorPreview:!0,showEditableInput:!0,showEyeDropper:!0,inputType:qa.RGBA,style:{width:"100%",maxWidth:280}})}),A.jsxs(K,{sx:{display:"flex",gap:1,justifyContent:"flex-end"},children:[A.jsx(ze,{variant:"text",onClick:g,sx:{textTransform:"none"},children:"ביטול"}),A.jsx(ze,{variant:"contained",color:"primary",onClick:C,disabled:!zs(c),sx:{textTransform:"none",borderRadius:2,px:2},children:"הוסף ללוח"})]})]}),A.jsxs(K,{sx:{display:"flex",gap:2,mb:3,flexWrap:"wrap"},children:[A.jsxs(Nt,{elevation:0,sx:{p:2,border:"2px solid",borderColor:t?"primary.main":"divider",borderRadius:2,flex:1,minWidth:120},children:[A.jsx(de,{variant:"caption",sx:{display:"block",mb:1},children:"צבע ראשי"}),A.jsxs(K,{sx:{width:"100%",height:60,backgroundColor:t||"#f5f5f5",borderRadius:1,border:"2px dashed",borderColor:m==="primary"?"primary.main":t?"divider":"rgba(99, 40, 167, 0.45)",display:"flex",alignItems:"center",justifyContent:"center",position:"relative",transition:"all 0.15s ease",boxShadow:m==="primary"?"0 0 0 3px rgba(99, 40, 167, 0.16)":"none"},onDragOver:R=>{R.preventDefault(),R.dataTransfer.dropEffect="copy",x("primary")},onDragLeave:()=>{m==="primary"&&x(null)},onDrop:R=>k("primary",R),children:[t&&A.jsxs(A.Fragment,{children:[A.jsx(de,{variant:"caption",sx:{color:qs(t)==="white"?"white":"black",fontWeight:"bold"},children:t.toUpperCase()}),A.jsx(ah,{sx:{position:"absolute",top:4,right:4,fontSize:16,color:qs(t)}})]}),!t&&A.jsx(de,{variant:"caption",color:"text.secondary",children:"גררו לכאן צבע ראשי"})]})]}),A.jsxs(Nt,{elevation:0,sx:{p:2,border:"2px solid",borderColor:n?"secondary.main":"divider",borderRadius:2,flex:1,minWidth:120},children:[A.jsx(de,{variant:"caption",sx:{display:"block",mb:1},children:"צבע משני"}),A.jsxs(K,{sx:{width:"100%",height:60,backgroundColor:n||"#f5f5f5",borderRadius:1,border:"2px dashed",borderColor:m==="secondary"?"secondary.main":n?"divider":"rgba(0, 0, 0, 0.25)",display:"flex",alignItems:"center",justifyContent:"center",position:"relative",transition:"all 0.15s ease",boxShadow:m==="secondary"?"0 0 0 3px rgba(0, 0, 0, 0.14)":"none"},onDragOver:R=>{R.preventDefault(),R.dataTransfer.dropEffect="copy",x("secondary")},onDragLeave:()=>{m==="secondary"&&x(null)},onDrop:R=>k("secondary",R),children:[n&&A.jsxs(A.Fragment,{children:[A.jsx(de,{variant:"caption",sx:{color:qs(n)==="white"?"white":"black",fontWeight:"bold"},children:n.toUpperCase()}),A.jsx(ah,{sx:{position:"absolute",top:4,right:4,fontSize:16,color:qs(n)}})]}),!n&&A.jsx(de,{variant:"caption",color:"text.secondary",children:"גררו לכאן צבע משני"})]})]})]}),A.jsx(de,{variant:"caption",sx:{display:"block",mb:1},children:"לוח צבעים"}),e.length===0?A.jsxs(Nt,{variant:"outlined",sx:{py:4,px:2,textAlign:"center",borderRadius:2,borderStyle:"dashed",bgcolor:"action.hover"},children:[A.jsx(de,{variant:"body2",color:"text.secondary",sx:{mb:.5},children:"עדיין אין צבעים בלוח"}),A.jsx(de,{variant:"caption",color:"text.secondary",children:'לחצו על "הוספת צבע משלך" כדי להתחיל'})]}):A.jsx(K,{sx:{display:"flex",flexWrap:"wrap",gap:2},children:e.map((R,V)=>{const b=t.toLowerCase()===R.toLowerCase(),B=n.toLowerCase()===R.toLowerCase(),M=b||B;return A.jsx(Nt,{elevation:M?4:1,sx:{position:"relative",transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:3}},children:A.jsxs(K,{sx:{width:100,height:130,position:"relative",p:1},children:[A.jsx(mg,{title:"הסר מהלוח",children:A.jsx(Hn,{size:"small",onClick:()=>y(V),sx:{position:"absolute",top:4,left:4,zIndex:2,bgcolor:"rgba(255,255,255,0.92)",width:26,height:26,"&:hover":{bgcolor:"rgba(255,255,255,1)"}},"aria-label":"הסר צבע",children:A.jsx(Nc,{sx:{fontSize:16}})})}),A.jsxs(K,{draggable:!0,onDragStart:F=>E(F,R),onDragEnd:S,sx:{width:"100%",height:80,backgroundColor:R,borderRadius:1,border:"2px solid",borderColor:M?b?"primary.main":"secondary.main":"divider",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",position:"relative",cursor:"grab","&:active":{cursor:"grabbing"}},children:[b&&A.jsx(K,{sx:{position:"absolute",top:4,right:4,backgroundColor:"rgba(0, 0, 0, 0.7)",color:"white",px:.5,py:.25,borderRadius:.5,fontSize:9,fontWeight:"bold"},children:"ראשי"}),B&&!b&&A.jsx(K,{sx:{position:"absolute",top:4,right:4,backgroundColor:"rgba(0, 0, 0, 0.7)",color:"white",px:.5,py:.25,borderRadius:.5,fontSize:9,fontWeight:"bold"},children:"משני"}),A.jsx(de,{variant:"caption",sx:{color:qs(R),fontWeight:"bold",fontSize:10,textAlign:"center",px:.5},children:R.toUpperCase()})]}),A.jsxs(K,{sx:{display:"flex",gap:.5,mt:1,justifyContent:"center"},children:[A.jsx(mg,{title:b?"הסר מצבע ראשי":"הגדר כצבע ראשי",children:A.jsx(ze,{size:"small",variant:b?"contained":"outlined",color:"primary",sx:{minWidth:"auto",px:1,fontSize:10,height:28},onClick:()=>{a(b?"":R)},children:"ראשי"})}),A.jsx(mg,{title:B?"הסר מצבע משני":"הגדר כצבע משני",children:A.jsx(ze,{size:"small",variant:B?"contained":"outlined",color:"secondary",sx:{minWidth:"auto",px:1,fontSize:10,height:28},onClick:()=>{r(B?"":R)},children:"משני"})})]})]})},`${R}-${V}`)})})]})}function qs(e){const t=zs(e);if(!t)return"black";const n=t.replace("#",""),a=parseInt(n.substring(0,2),16),r=parseInt(n.substring(2,4),16),l=parseInt(n.substring(4,6),16);return(.299*a+.587*r+.114*l)/255>.5?"black":"white"}const uh="_analyzingContainer_aogto_1",ch="_scanningLine_aogto_10",$x="_scan_aogto_10",Ah="_dataBars_aogto_19",dh="_dataBar_aogto_19",eE="_analyze_aogto_1",fh="_dots_aogto_80",Wh="_fadeUp_aogto_98",gh="_fadeUpDelay1_aogto_103",hh="_fadeUpDelay2_aogto_108",tE="_fadeUpDelay3_aogto_113",X6=Object.freeze(Object.defineProperty({__proto__:null,analyze:eE,analyzingContainer:uh,dataBar:dh,dataBars:Ah,default:{analyzingContainer:uh,scanningLine:ch,scan:$x,dataBars:Ah,dataBar:dh,analyze:eE,dots:fh,fadeUp:Wh,fadeUpDelay1:gh,fadeUpDelay2:hh,fadeUpDelay3:tE},dots:fh,fadeUp:Wh,fadeUpDelay1:gh,fadeUpDelay2:hh,fadeUpDelay3:tE,scan:$x,scanningLine:ch},Symbol.toStringTag,{value:"Module"})),_6=`.analyzingContainer {
|
|
399
399
|
position: relative;
|
|
400
400
|
width: 200px;
|