@creaditor/business-ai 1.0.49 → 1.0.50

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.
@@ -24300,7 +24300,6 @@ function bT({
24300
24300
  l(""), i(1);
24301
24301
  },
24302
24302
  variant: "text",
24303
- disabled: !u,
24304
24303
  color: "primary",
24305
24304
  className: f ? Oa.fadeUpDelay4 : "",
24306
24305
  sx: {
@@ -390,7 +390,7 @@ Newsletter creation ✉️, Landing pages 🎯, Digital courses 📇 and more`,s
390
390
  color: rgba(26, 26, 46, 0.65);
391
391
  }
392
392
  `,Ms=v.createContext({shadowRoot:null,activeStep:0,setActiveStep:()=>{},stepBeforeStep3:2,stepBeforeStep1:0,stepBeforeDomainFinder:-1,step2Data:null,setStep2Data:()=>{},step3Draft:null,setStep3Draft:()=>{},openDomainFinder:!1,setOpenDomainFinder:()=>{},openSmsChat:!1,setOpenSmsChat:()=>{},openAnalyzeChat:!1,setOpenAnalyzeChat:()=>{},seriesPromptData:null,setSeriesPromptData:()=>{},seriesFormRequest:null,setSeriesFormRequest:()=>{}}),Va=()=>v.useContext(Ms),Ni=()=>{const{element:e}=v.useContext(Ms);return e},bg=()=>{const{step2Data:e,setStep2Data:t}=v.useContext(Ms);return{step2Data:e,setStep2Data:t}},rx=()=>{const{step3Draft:e,setStep3Draft:t}=v.useContext(Ms);return{step3Draft:e,setStep3Draft:t}},Gc=(e,t)=>{const{shadowRoot:n}=Va();v.useEffect(()=>{if(!n||!e)return;const a=n.querySelector(`style[data-style-id="${t}"]`);if(a){a.textContent!==e&&(a.textContent=e);return}const r=document.createElement("style");r.textContent=e,r.setAttribute("data-style-id",t),n.insertBefore(r,n.firstChild)},[n,e,t])},Mj=({shadowRoot:e,element:t,children:n})=>{const[a,r]=v.useState(0),[l,i]=v.useState(2),o=B=>{B===3&&i(a),B===1&&m(a),r(B)},[s,p]=v.useState(null),[c,u]=v.useState(null),[d,f]=v.useState(!1),[W,m]=v.useState(0),[x,h]=v.useState(-1),g=B=>{B?h(a):(r(x),h(-1)),f(B)},[C,y]=v.useState(!1),[E,S]=v.useState(!1),[k,w]=v.useState(null),[V,b]=v.useState(null);return A.jsx(Ms.Provider,{value:{shadowRoot:e,element:t,activeStep:a,setActiveStep:o,stepBeforeStep3:l,stepBeforeStep1:W,stepBeforeDomainFinder:x,step2Data:s,setStep2Data:p,step3Draft:c,setStep3Draft:u,openDomainFinder:d,setOpenDomainFinder:g,openSmsChat:C,setOpenSmsChat:y,openAnalyzeChat:E,setOpenAnalyzeChat:S,seriesPromptData:k,setSeriesPromptData:w,seriesFormRequest:V,setSeriesFormRequest:b},children:n})};function Hc(e,t){let n=e;return Object.entries(t).forEach(([a,r])=>{const l=new RegExp(`\\.${a}(?![\\w-])`,"g");n=n.replace(l,`.${r}`)}),n}const Ca="https://agent.creaditor.ai",Qj="https://img.creaditor.ai",Ua={BUSINESS_ANALYSIS:`${Ca}/api/v1/business-analysis/analyze`,BUSINESS_ANALYSIS_GET:e=>`${Ca}/api/v1/business-analysis/get?website=${encodeURIComponent(e)}`,BUSINESS_ANALYSIS_PATCH:`${Ca}/api/v1/business-analysis/patch`,DOMAIN_FINDER:`${Ca}/api/v1/domain-finder/find`,GENERATE_NEWSLETTER:`${Ca}/api/v1/generate/generate-newsletter`,GENERATE_NEWSLETTER3:`${Ca}/api/v1/generate/generate-newsletter3`,SERIES_PROMPT:`${Ca}/api/v1/series-prompt`,UPDATE_SERIES_PROMPT:`${Ca}/api/v1/series-prompt/update-one`,ALMOG_CHAT:`${Ca}/api/v1/almog/chat`,ALMOG_HISTORY:e=>`${Ca}/api/v1/almog/history/${e}`,CHAT_SESSION:`${Ca}/api/v1/chat/session`,CHAT_MESSAGE:`${Ca}/api/v1/chat/message`,LOGOS_ANALYZE:e=>`${Qj}/logos/analyze?url=${encodeURIComponent(e)}`},lx=async(e,t,n="",a)=>{const r={mainUrl:e,urls:t,context:n};if(!e)return Promise.resolve({});a&&(r.language=a);const l=await fetch(Ua.BUSINESS_ANALYSIS,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!l.ok)throw new Error(`Failed to analyze business: ${l.statusText}`);return l.json()},Vj=async(e,t)=>{const n=await fetch(Ua.BUSINESS_ANALYSIS_PATCH,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({website:e,...t})});if(!n.ok){const a=await n.text();throw new Error(`Failed to save business analysis: ${n.status} ${a}`)}return n.json()},Uj=async e=>{const t=await fetch(Ua.LOGOS_ANALYZE(e),{method:"GET"});if(!t.ok)throw new Error(`Failed to analyze logo: ${t.statusText}`);return t.json()};async function kg(e){if(!e.prompt)throw new Error("generateNewsletter3: prompt is required and cannot be null or empty");const t={prompt:e.prompt,domain:e.domain,mergeTags:e.mergeTags??[],structureUrl:e.structureUrl??"",textStyleUrl:e.textStyleUrl??""};if(e.language&&(t.language=e.language),e.location&&e.location.trim()&&(t.location=e.location.trim()),e.visibilityRules&&Object.keys(e.visibilityRules).length>0){const a=e.visibilityRules,r=[...a.exclude??[],...a.excludedGenders??[]];r.length>0&&(t.visibilityRules={exclude:r})}e.forceAuthentic&&(t.forceAuthentic=e.forceAuthentic),e.context&&Object.keys(e.context).length>0&&(t.context=e.context);const n=await fetch(Ua.GENERATE_NEWSLETTER3,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){const a=await n.text();throw new Error(`generate-newsletter3 failed: ${n.status} ${a}`)}return n.json()}function Rg(e){return(e||"default").trim().toLowerCase()||"default"}class Fj{constructor(){zn(this,"storageKeyPrefix","sms_chat_token")}storageKey(t){return`${this.storageKeyPrefix}_${Rg(t)}`}getToken(t){try{return localStorage.getItem(this.storageKey(t))}catch(n){return console.warn("Failed to load SMS chat token from localStorage:",n),null}}clearSession(t){try{localStorage.removeItem(this.storageKey(t))}catch(n){console.warn("Failed to clear SMS chat token from localStorage:",n)}}async createSession(t,n){const a={skill:"sms",url:n},r=await fetch(Ua.CHAT_SESSION,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!r.ok){const i=await r.text();throw new Error(`Failed to create SMS chat session: ${r.status} ${i}`)}const l=await r.json();try{localStorage.setItem(this.storageKey(t),l.token)}catch(i){console.warn("Failed to save SMS chat token to localStorage:",i)}return l}async sendMessage(t){const n={token:t.token,message:t.message,skill:"sms",...t.context&&Object.keys(t.context).length>0&&{context:t.context},...t.domain&&{domain:t.domain},...t.forceAnswer!==void 0&&{forceAnswer:t.forceAnswer}},a=await fetch(Ua.CHAT_MESSAGE,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(a.status===404)throw this.clearSession(t.domain),new Error("SESSION_NOT_FOUND");if(!a.ok){const r=await a.json().catch(()=>({})),l=(r==null?void 0:r.error)||a.statusText;throw new Error(`SMS chat error: ${a.status} ${l}`)}return a.json()}}class zj{constructor(){zn(this,"storageKeyPrefix","chat_token_business_analysis")}storageKey(t){return`${this.storageKeyPrefix}_${Rg(t)}`}getToken(t){try{return localStorage.getItem(this.storageKey(t))}catch(n){return console.warn("Failed to load business-analysis chat token from localStorage:",n),null}}clearSession(t){try{localStorage.removeItem(this.storageKey(t))}catch(n){console.warn("Failed to clear business-analysis chat token from localStorage:",n)}}async createSession(t,n){const a={skill:"business-analysis",url:n},r=await fetch(Ua.CHAT_SESSION,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!r.ok){const i=await r.text();throw new Error(`Failed to create business-analysis chat session: ${r.status} ${i}`)}const l=await r.json();try{localStorage.setItem(this.storageKey(t),l.token)}catch(i){console.warn("Failed to save business-analysis chat token to localStorage:",i)}return l}async sendMessage(t){const n={token:t.token,message:t.message,skill:"business-analysis",...t.context&&Object.keys(t.context).length>0&&{context:t.context},...t.domain&&{domain:t.domain}},a=await fetch(Ua.CHAT_MESSAGE,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(a.status===404)throw this.clearSession(t.domain),new Error("SESSION_NOT_FOUND");if(!a.ok){const r=await a.json().catch(()=>({})),l=(r==null?void 0:r.error)||a.statusText;throw new Error(`Business-analysis chat error: ${a.status} ${l}`)}return a.json()}}const wg="sms_chat_messages",Bg="analyze_chat_messages";function Lg(e,t){return`${e}_${Rg(t)}`}function ix(e,t){try{const n=localStorage.getItem(Lg(e,t));if(!n)return[];const a=JSON.parse(n);return Array.isArray(a)?a:[]}catch{return[]}}function ox(e,t,n){try{localStorage.setItem(Lg(e,t),JSON.stringify(n))}catch(a){console.warn("Failed to save chat messages to localStorage:",a)}}function sx(e,t){try{localStorage.removeItem(Lg(e,t))}catch{}}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 qj(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(Ua.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(Ua.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={},Tj=Fe;Object.defineProperty(Mg,"__esModule",{value:!0});var Qg=Mg.default=void 0,Oj=Tj(Oe()),Kj=A;Qg=Mg.default=(0,Oj.default)((0,Kj.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 va({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 Pj({activeStep:e,steps:t,userName:n,websiteUrl:a,hasContext:r,setWebsiteUrl:l,setActiveStep:i,freeSolo:o,businessNameOrDescription:s="",setBusinessNameOrDescription:p,language:c}){const[u,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,w]=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}=Va(),q=v.useRef(T),R=v.useRef(s);R.current=s;const H=v.useRef(L);H.current=L,v.useEffect(()=>{var ae,_,ye,fe;if(T&&e===0&&(z.current=P===2,x(!0),l(""),y([]),w(null),b(null)),T){const ge=((ae=R.current)==null?void 0:ae.trim())||((fe=(ye=(_=H.current)==null?void 0:_.businessData)==null?void 0:ye.business_name)==null?void 0:fe.trim())||"";g(ge),ge&&te(ge)}},[T,e,P]),v.useEffect(()=>{q.current&&!T&&m&&!z.current&&(x(!1),y([]),w(null)),q.current=T},[T,m]);const Y=()=>{j(!1),z.current||(x(!1),y([]),w(null))},Q=ae=>{const _=new CustomEvent("business-ai-buy-domain",{detail:{domain:ae},bubbles:!0,composed:!0});window.dispatchEvent(_)},N=()=>{z.current=!1,x(!0),l(""),p==null||p(""),g(""),y([]),w(null),b(null)},te=ae=>{const _=(ae??h.trim())||"business";p==null||p(_!=="business"?_:h.trim()),S(!0),w(null),b(null),y([]);const ye={prompt:`find domain for ${_}`};c&&(ye.language=c),fetch(Ua.DOMAIN_FINDER,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ye)}).then(async fe=>{var Ke,ze;if(!fe.ok)throw new Error("Failed to fetch domain suggestions");const ge=(Ke=fe.body)==null?void 0:Ke.getReader(),he=new TextDecoder;let ce="",Ze=null;if(!ge)throw new Error("Response body is not readable");let ne=!1;for(;!ne;){const Be=await ge.read();if(ne=Be.done,ne)break;const{value:Te}=Be;ce+=he.decode(Te,{stream:!0});const Pe=ce.split(`
393
- `);ce=Pe.pop()||"";for(const qe of Pe)if(qe.startsWith("data: ")){const ot=qe.slice(6);try{const D=JSON.parse(ot);D.message&&!((ze=D.metadata)!=null&&ze.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(fe=>{if(fe!=null&&fe.suggestions&&Array.isArray(fe.suggestions))y(fe.suggestions.map(ge=>({domain:ge.domain,available:ge.available})));else if(fe!=null&&fe.data){const ge=fe.data;Array.isArray(ge)?y(ge.map(he=>({domain:he}))):ge!=null&&ge.domains&&Array.isArray(ge.domains)?y(ge.domains.map(he=>({domain:he}))):ge!=null&&ge.domain?y([{domain:ge.domain}]):y([])}else y([]);S(!1)}).catch(fe=>{console.error("Error fetching domains:",fe),w("לא הצלחנו לטעון הצעות דומיין"),S(!1)})};v.useEffect(()=>{if(!E){M("");return}let ae=0;M(Vg[ae]);const _=setInterval(()=>{ae=(ae+1)%Vg.length,M(Vg[ae])},2500);return()=>clearInterval(_)},[E]),v.useEffect(()=>{W(!0)},[]),v.useEffect(()=>{F.current=a},[a]),v.useEffect(()=>{g(s)},[s]);const se=ae=>{d(ae)},ve=ae=>{const _=ae.trim();return!_||_.startsWith("http://")||_.startsWith("https://")?_:"https://"+_},ue=ae=>{const _=ae.target.value,ye=F.current;if(!_){F.current=_,l(_);return}if(_.includes("://")){F.current=_,l(_);return}if(_.startsWith("http://")||_.startsWith("https://")){F.current=_,l(_);return}const fe=ye.includes("://"),ge=_.length<ye.length;if(fe&&!_.includes("://")&&(ye.replace(/^https?:\/\//,"").startsWith(_)||ge)){F.current=_,l(_);return}if(_.toLowerCase().startsWith("http")&&_.length<7){F.current=_,l(_);return}if(_.includes(".")||_.length>3){const ce=ve(_);F.current=ce,l(ce)}else F.current=_,l(_)},me=ae=>{if(!ae.trim()||(ae.includes("http")||(ae="https://"+ae),!ae.includes(".")))return!1;try{const _=new URL(ae);return _.protocol==="http:"||_.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(je,{variant:"text",color:"primary",onClick:Y,sx:{mb:2,fontSize:{xs:"0.875rem",sm:"1rem"},textTransform:"none"},children:"חזרה"}),A.jsx(lj,{sx:{display:"none"},activeStep:e,children:t.map(ae=>A.jsx(Qq,{children:A.jsx(TI,{children:ae})},ae))}),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(va,{title:"חיפוש דומיין",description:"תארו את העסק או את שם הדומיין הרצוי — נציע אפשרויות מתאימות.",children:A.jsx(at,{fullWidth:!0,variant:"outlined",placeholder:"שם העסק או תיאור קצר",autoComplete:"off",value:h,onChange:ae=>{g(ae.target.value),p==null||p(ae.target.value.trim())},onKeyDown:ae=>{ae.key==="Enter"&&h.trim()&&(ae.preventDefault(),te())},InputProps:{endAdornment:A.jsx(ug,{position:"end",children:A.jsx(je,{variant:"contained",color:"primary",size:"small",disabled:!h.trim()||E,onClick:()=>te(),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:ae=>un(ae.palette.common.black,.02)},children:[A.jsx(Qa,{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(je,{variant:"text",color:"primary",onClick:()=>{w(null),te()},sx:{fontSize:"0.875rem"},children:"נסה שוב"})}),A.jsx(ct,{item:!0,children:A.jsx(je,{variant:"text",color:"primary",onClick:Y,sx:{fontSize:"0.875rem"},children:"חזרה"})})]})]}):A.jsxs(va,{title:"תוצאות",description:"לחצו על דומיין לפתיחת רכישה. אפשר לחפש מחדש עם ניסוח אחר.",children:[A.jsx(at,{fullWidth:!0,variant:"outlined",placeholder:"שם העסק או תיאור קצר – חיפוש מחדש לתוצאות אחרות",autoComplete:"off",value:h,onChange:ae=>{g(ae.target.value),p==null||p(ae.target.value.trim())},onKeyDown:ae=>{ae.key==="Enter"&&h.trim()&&(ae.preventDefault(),te())},InputProps:{endAdornment:A.jsx(ug,{position:"end",children:A.jsx(je,{variant:"contained",color:"primary",size:"small",disabled:!h.trim()||E,onClick:()=>te(),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((ae,_)=>A.jsxs(K,{onClick:()=>Q(ae.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:ye=>un(ye.palette.common.black,.02),"&:hover":{borderColor:"primary.main",bgcolor:ye=>un(ye.palette.primary.main,.06)}},children:[A.jsx(de,{sx:{fontSize:"0.875rem",fontWeight:500},children:ae.domain}),ae.available!==!1&&A.jsx(de,{variant:"caption",color:"success.main",sx:{fontSize:"0.75rem"},children:"זמין"})]},_))}),A.jsxs(ct,{container:!0,spacing:1,justifyContent:"space-between",children:[A.jsx(ct,{item:!0,children:A.jsx(je,{variant:"text",color:"primary",onClick:Y,sx:{fontSize:"0.875rem"},children:"חזרה"})}),A.jsx(ct,{item:!0,children:A.jsx(je,{variant:"contained",color:"primary",onClick:()=>{p==null||p(h.trim()),i(1)},sx:{fontSize:"0.875rem"},children:"הבא"})})]})]})}):A.jsxs(A.Fragment,{children:[A.jsxs(va,{title:"כתובת האתר",description:"כתובת מלאה כולל https. אין אתר? השתמשו בקישור מתחת לשדה.",children:[A.jsx(at,{fullWidth:!0,label:"URL",variant:"outlined",margin:"normal",placeholder:"https://www.example.com",value:a,onChange:ue,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(je,{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(va,{title:"אישור והמשך",description:"נדרש לאימות הבעלות על האתר ולשימוש במידע ליצירת תכנים.",children:A.jsx(K,{sx:{p:{xs:1.25,sm:1.5},borderRadius:2,border:"1px solid",borderColor:"divider",bgcolor:ae=>un(ae.palette.common.black,.02)},children:A.jsx(Kc,{control:A.jsx(ZU,{size:"small"}),checked:u,onChange:(ae,_)=>se(_),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(je,{onClick:()=>{l(""),i(1)},variant:"text",disabled:!u,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(je,{disabled:!me(a)||!u,variant:"contained",color:"primary",onClick:()=>i(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:o&&A.jsx(ct,{item:!0,xs:12,sm:"auto",children:A.jsx(je,{variant:"text",color:"primary",disabled:!u,onClick:()=>{l(""),i(1)},fullWidth:!0,sx:{fontSize:{xs:"0.875rem",sm:"1rem"},maxWidth:{xs:"100%",sm:"auto"}},children:r?"צפייה במידע על העסק שלי":""})})})]})]})]})}var Ug={},Jj=Fe;Object.defineProperty(Ug,"__esModule",{value:!0});var Fl=Ug.default=void 0,Dj=Jj(Oe()),Yj=A;Fl=Ug.default=(0,Dj.default)((0,Yj.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");var Fg={},Zj=Fe;Object.defineProperty(Fg,"__esModule",{value:!0});var Qs=Fg.default=void 0,Nj=Zj(Oe()),Gj=A;Qs=Fg.default=(0,Nj.default)((0,Gj.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={},Hj=Fe;Object.defineProperty(zg,"__esModule",{value:!0});var px=zg.default=void 0,Xj=Hj(Oe()),_j=A;px=zg.default=(0,Xj.default)((0,_j.jsx)("path",{d:"M5 20h14v-2H5zm0-10h4v6h6v-6h4l-7-7z"}),"Upload");var qg={},$j=Fe;Object.defineProperty(qg,"__esModule",{value:!0});var ux=qg.default=void 0,eT=$j(Oe()),tT=A;ux=qg.default=(0,eT.default)((0,tT.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={},nT=Fe;Object.defineProperty(jg,"__esModule",{value:!0});var cx=jg.default=void 0,aT=nT(Oe()),rT=A;cx=jg.default=(0,aT.default)((0,rT.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={},lT=Fe;Object.defineProperty(Tg,"__esModule",{value:!0});var Ax=Tg.default=void 0,iT=lT(Oe()),oT=A;Ax=Tg.default=(0,iT.default)((0,oT.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={},sT=Fe;Object.defineProperty(Og,"__esModule",{value:!0});var dx=Og.default=void 0,pT=sT(Oe()),uT=A;dx=Og.default=(0,pT.default)((0,uT.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={},cT=Fe;Object.defineProperty(Kg,"__esModule",{value:!0});var fx=Kg.default=void 0,AT=cT(Oe()),dT=A;fx=Kg.default=(0,AT.default)((0,dT.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={},fT=Fe;Object.defineProperty(Pg,"__esModule",{value:!0});var Wx=Pg.default=void 0,WT=fT(Oe()),gT=A;Wx=Pg.default=(0,WT.default)((0,gT.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={},hT=Fe;Object.defineProperty(Jg,"__esModule",{value:!0});var gx=Jg.default=void 0;vT(v);var mT=hT(Oe()),CT=A;function hx(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(hx=function(a){return a?n:t})(e)}function vT(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=hx(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 i=r?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(a,l,i):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}gx=Jg.default=(0,mT.default)((0,CT.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={},yT=Fe;Object.defineProperty(Dg,"__esModule",{value:!0});var mx=Dg.default=void 0;xT(v);var ST=yT(Oe()),IT=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 xT(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 i=r?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(a,l,i):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}mx=Dg.default=(0,ST.default)((0,IT.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={},ET=Fe;Object.defineProperty(Yg,"__esModule",{value:!0});var vx=Yg.default=void 0;RT(v);var bT=ET(Oe()),kT=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 i=r?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(a,l,i):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}vx=Yg.default=(0,bT.default)((0,kT.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={},wT=Fe;Object.defineProperty(Zg,"__esModule",{value:!0});var Sx=Zg.default=void 0;MT(v);var BT=wT(Oe()),LT=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 MT(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 i=r?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(a,l,i):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}Sx=Zg.default=(0,BT.default)((0,LT.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 xx=Ng.default=void 0;FT(v);var VT=QT(Oe()),UT=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 FT(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 i=r?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(a,l,i):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}xx=Ng.default=(0,VT.default)((0,UT.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={},zT=Fe;Object.defineProperty(Gg,"__esModule",{value:!0});var bx=Gg.default=void 0;TT(v);var qT=zT(Oe()),jT=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 TT(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 i=r?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(a,l,i):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}bx=Gg.default=(0,qT.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={},OT=Fe;Object.defineProperty(Hg,"__esModule",{value:!0});var Rx=Hg.default=void 0;JT(v);var KT=OT(Oe()),PT=A;function wx(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(wx=function(a){return a?n:t})(e)}function JT(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=wx(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 i=r?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(a,l,i):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}Rx=Hg.default=(0,KT.default)((0,PT.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={},DT=Fe;Object.defineProperty(Xg,"__esModule",{value:!0});var Bx=Xg.default=void 0;NT(v);var YT=DT(Oe()),ZT=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 NT(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 i=r?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(a,l,i):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}Bx=Xg.default=(0,YT.default)((0,ZT.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={},GT=Fe;Object.defineProperty(_g,"__esModule",{value:!0});var Mx=_g.default=void 0;_T(v);var HT=GT(Oe()),XT=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 i=r?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(a,l,i):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}Mx=_g.default=(0,HT.default)((0,XT.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={},$T=Fe;Object.defineProperty($g,"__esModule",{value:!0});var Vx=$g.default=void 0;nO(v);var eO=$T(Oe()),tO=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 nO(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 i=r?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(a,l,i):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}Vx=$g.default=(0,eO.default)((0,tO.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={},aO=Fe;Object.defineProperty(eh,"__esModule",{value:!0});var Fx=eh.default=void 0,rO=aO(Oe()),lO=A;Fx=eh.default=(0,rO.default)((0,lO.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={},iO=Fe;Object.defineProperty(th,"__esModule",{value:!0});var zx=th.default=void 0,oO=iO(Oe()),sO=A;zx=th.default=(0,oO.default)((0,sO.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 pO({value:e,onChange:t,label:n="מילות מפתח",placeholder:a="הוספת מילת מפתח..."}){const[r,l]=v.useState(""),i=(s,p)=>{t(p)},o=(s,p)=>{l(p)};return A.jsx($W,{multiple:!0,freeSolo:!0,options:[],value:e,onChange:i,inputValue:r,onInputChange:o,renderTags:(s,p)=>s.map((c,u)=>v.createElement(vn,{variant:"outlined",label:c,...p({index:u}),key:u})),renderInput:s=>A.jsx(at,{...s,label:n,placeholder:a,variant:"outlined",margin:"normal"}),sx:{"& .MuiAutocomplete-tag":{margin:"4px"}}})}var nh={},uO=Fe;Object.defineProperty(nh,"__esModule",{value:!0});var ah=nh.default=void 0,cO=uO(Oe()),AO=A;ah=nh.default=(0,cO.default)((0,AO.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");var Gi=255,Fa=100,Vs=e=>{var{r:t,g:n,b:a,a:r}=e,l=Math.max(t,n,a),i=l-Math.min(t,n,a),o=i?l===t?(n-a)/i:l===n?2+(a-t)/i:4+(t-n)/i:0;return{h:60*(o<0?o+6:o),s:l?i/l*Fa:0,v:l/Gi*Fa,a:r}},qx=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}},jx=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))},Tx=e=>{var{r:t,g:n,b:a,a:r}=e,l=typeof r=="number"&&(r*255|256).toString(16).slice(1);return""+jx({r:t,g:n,b:a})+(l||"")},zl=e=>Vs(dO(e)),dO=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,i]=e.match(n).map(o=>parseInt(o,16));return{r:a,g:r,b:l,a:(i??255)/Gi}},Us=e=>{var{h:t,s:n,v:a,a:r}=e,l=t/60,i=n/Fa,o=a/Fa,s=Math.floor(l)%6,p=l-Math.floor(l),c=Gi*o*(1-i),u=Gi*o*(1-i*p),d=Gi*o*(1-i*(1-p));o*=Gi;var f={};switch(s){case 0:f.r=o,f.g=d,f.b=c;break;case 1:f.r=u,f.g=o,f.b=c;break;case 2:f.r=c,f.g=o,f.b=d;break;case 3:f.r=c,f.g=u,f.b=o;break;case 4:f.r=d,f.g=c,f.b=o;break;case 5:f.r=o,f.g=c,f.b=u;break}return f.r=Math.round(f.r),f.g=Math.round(f.g),f.b=Math.round(f.b),I({},f,{a:r})},fO=e=>{var{r:t,g:n,b:a,a:r}=Us(e);return"rgba("+t+", "+n+", "+a+", "+r+")"},WO=e=>{var{r:t,g:n,b:a}=e;return{r:t,g:n,b:a}},gO=e=>{var{h:t,s:n,l:a}=e;return{h:t,s:n,l:a}},lh=e=>jx(Us(e)),hO=e=>Tx(Us(e)),mO=e=>{var{h:t,s:n,v:a}=e;return{h:t,s:n,v:a}},CO=e=>{var{r:t,g:n,b:a}=e,r=function(c){return c<=.04045?c/12.92:Math.pow((c+.055)/1.055,2.4)},l=r(t/255),i=r(n/255),o=r(a/255),s={};return s.x=l*.4124+i*.3576+o*.1805,s.y=l*.2126+i*.7152+o*.0722,s.bri=l*.0193+i*.1192+o*.9505,s},za=e=>{var t,n,a,r,l,i,o,s,p;return typeof e=="string"&&ih(e)?(i=zl(e),s=e):typeof e!="string"&&(i=e),i&&(a=mO(i),l=rh(i),r=Us(i),p=Tx(r),s=lh(i),n=gO(l),t=WO(r),o=CO(t)),{rgb:t,hsl:n,hsv:a,rgba:r,hsla:l,hsva:i,hex:s,hexa:p,xy:o}},ih=e=>/^#?([A-Fa-f0-9]{3,4}){1,2}$/.test(e),vO=rS();const ya=Dl(vO);function Ox(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,Kx=e=>{!Fs(e)&&e.preventDefault&&e.preventDefault()},Px=function(t,n,a){return n===void 0&&(n=0),a===void 0&&(a=1),t>a?a:t<n?n:t},Jx=(e,t)=>{var n=e.getBoundingClientRect(),a=Fs(t)?t.touches[0]:t;return{left:Px((a.pageX-(n.left+window.pageXOffset))/n.width),top:Px((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)}},yO=["prefixCls","className","onMove","onDown"],oh=ht.forwardRef((e,t)=>{var{prefixCls:n="w-color-interactive",className:a,onMove:r,onDown:l}=e,i=ya(e,yO),o=v.useRef(null),s=v.useRef(!1),[p,c]=v.useState(!1),u=Ox(r),d=Ox(l),f=g=>s.current&&!Fs(g)?!1:(s.current=Fs(g),!0),W=v.useCallback(g=>{if(Kx(g),!!o.current){var C=Fs(g)?g.touches.length>0:g.buttons>0;if(!C){c(!1);return}u==null||u(Jx(o.current,g),g)}},[u]),m=v.useCallback(()=>c(!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(),Kx(g.nativeEvent),f(g.nativeEvent)&&o.current&&(d==null||d(Jx(o.current,g.nativeEvent),g.nativeEvent),c(!0))},[d]);return A.jsx("div",I({},i,{className:[n,a||""].filter(Boolean).join(" "),style:I({},i.style,{touchAction:"none"}),ref:o,tabIndex:0,onMouseDown:h,onTouchStart:h}))});oh.displayName="Interactive";var SO=["className","prefixCls","left","top","style","fillProps"],IO=e=>{var{className:t,prefixCls:n,left:a,top:r,style:l,fillProps:i}=e,o=ya(e,SO),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)"},i==null?void 0:i.style,{transform:a?"translate(-9px, -1px)":"translate(-1px, -9px)"});return A.jsx("div",I({className:n+"-pointer "+(t||""),style:s},o,{children:A.jsx("div",I({className:n+"-fill"},i,{style:p}))}))},xO=["prefixCls","className","hsva","background","bgProps","innerProps","pointerProps","radius","width","height","direction","style","onChange","pointer"],EO="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:i={},innerProps:o={},pointerProps:s={},radius:p=0,width:c,height:u=16,direction:d="horizontal",style:f,onChange:W,pointer:m}=e,x=ya(e,xO),h=V=>{W&&W(I({},r,{a:d==="horizontal"?V.left:V.top}),V)},g=qx(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("+EO+") left center",backgroundColor:"var(--alpha-background-color)"},{width:c,height:u},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()},[]),w=m&&typeof m=="function"?m(I({prefixCls:n},s,y)):A.jsx(IO,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({},i,{style:I({inset:0,position:"absolute",background:l||C,borderRadius:p},i.style)})),A.jsx(oh,I({},o,{style:I({},o.style,{inset:0,zIndex:1,position:"absolute",outline:"none"}),onMove:h,onDown:h,onClick:k,onKeyDown:S,children:w}))]}))});eA.displayName="Alpha";var bO=["prefixCls","placement","label","value","className","style","labelStyle","inputStyle","onChange","onBlur","renderInput"],kO=e=>/^#?([A-Fa-f0-9]{3,4}){1,2}$/.test(e),RO=e=>Number(String(e).replace(/%/g,"")),Hi=ht.forwardRef((e,t)=>{var{prefixCls:n="w-color-editable-input",placement:a="bottom",label:r,value:l,className:i,style:o,labelStyle:s,inputStyle:p,onChange:c,onBlur:u,renderInput:d}=e,f=ya(e,bO),[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(/^#/,"");kO(B)&&c&&c(V,B);var M=RO(B);isNaN(M)||c&&c(V,M),m(B)}function y(V){x.current=!1,m(e.value),u&&u(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,o),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),w=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,i||""].filter(Boolean).join(" "),style:S,children:[d?d(w,t):A.jsx("input",I({ref:t},w)),r&&A.jsx("label",{htmlFor:g,style:I({color:"var(--editable-input-label-color)",textTransform:"capitalize"},s),children:r})]})});Hi.displayName="EditableInput";var wO=["prefixCls","className","color","colors","style","rectProps","onChange","addonAfter","addonBefore","rectRender"],Dx=ht.forwardRef((e,t)=>{var{prefixCls:n="w-color-swatch",className:a,color:r,colors:l=[],style:i,rectProps:o={},onChange:s,addonAfter:p,addonBefore:c,rectRender:u}=e,d=ya(e,wO),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},o.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"},i),children:[c&&ht.isValidElement(c)&&c,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=u&&u({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=o.children&&ht.isValidElement(o.children)?ht.cloneElement(o.children,{color:g,checked:C}):null;return A.jsx("div",I({tabIndex:0,title:h,onClick:S=>W(g,S)},o,{children:E,style:I({},f,{background:g})}),x)}),p&&ht.isValidElement(p)&&p]}))});Dx.displayName="Swatch";function BO(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var LO={marginRight:0,marginBottom:0,borderRadius:0,boxSizing:"border-box",height:25,width:25};function MO(e){var{style:t,title:n,checked:a,color:r,onClick:l,rectProps:i}=e,o=v.useRef(null),s=v.useCallback(()=>{o.current.style.zIndex="2",o.current.style.outline="#fff solid 2px",o.current.style.boxShadow="rgb(0 0 0 / 25%) 0 0 5px 2px"},[]),p=v.useCallback(()=>{a||(o.current.style.zIndex="0",o.current.style.outline="initial",o.current.style.boxShadow="initial")},[a]),c=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:o,title:n},i,{onClick:l,onMouseEnter:s,onMouseLeave:p,style:I({},t,{marginRight:0,marginBottom:0,borderRadius:0,boxSizing:"border-box",height:25,width:25},LO,c,i==null?void 0:i.style)}))}var QO=["prefixCls","placement","className","style","color","colors","showTriangle","rectProps","onChange","rectRender"],VO=["#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}({}),Yx=ht.forwardRef((e,t)=>{var{prefixCls:n="w-color-github",placement:a=Pt.TopRight,className:r,style:l,color:i,colors:o=VO,showTriangle:s=!0,rectProps:p={},onChange:c,rectRender:u}=e,d=ya(e,QO),f=typeof i=="string"&&ih(i)?zl(i):i,W=i?lh(f):"",m=E=>c&&c(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({},(BO(E),E)),k=u&&u(I({},S));return k||A.jsx(MO,I({},S,{rectProps:p}))};return A.jsx(Dx,I({ref:t,className:[n,r].filter(Boolean).join(" "),colors:o,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})]})})}))});Yx.displayName="Github";var UO=e=>{var{className:t,color:n,left:a,top:r,prefixCls:l}=e,i={position:"absolute",top:r,left:a},o={"--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:i,children:A.jsx("div",{className:l+"-fill",style:o})}),[r,a,n,t,l])},FO=["prefixCls","radius","pointer","className","hue","style","hsva","onChange"],Zx=ht.forwardRef((e,t)=>{var n,{prefixCls:a="w-color-saturation",radius:r=0,pointer:l,className:i,hue:o=0,style:s,hsva:p,onChange:c}=e,u=ya(e,FO),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)=>{c&&p&&c({h:p.h,s:C.left*100,v:(1-C.top)*100,a:p.a});var E=f.current;E&&E.focus()},[p,c]),x=v.useCallback(C=>{if(!(!p||!c)){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&&c({h:p.h,s:E,v:S,a:p.a})}},[p,c]),h=v.useMemo(()=>{if(!p)return null;var C={top:100-p.v+"%",left:p.s+"%",color:qx(p)};return l&&typeof l=="function"?l(I({prefixCls:a},C)):A.jsx(UO,I({prefixCls:a},C))},[p,l,a]),g=v.useCallback(C=>{C.target.focus()},[]);return A.jsx(oh,I({className:[a,i||""].filter(Boolean).join(" ")},u,{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:o)+", 100%, 50%))"},d,{outline:"none"}),ref:W,onMove:m,onDown:m,onKeyDown:x,onClick:g,children:h}))});Zx.displayName="Saturation";var zO=["prefixCls","className","hue","onChange","direction"],Nx=ht.forwardRef((e,t)=>{var{prefixCls:n="w-color-hue",className:a,hue:r=0,onChange:l,direction:i="horizontal"}=e,o=ya(e,zO);return A.jsx(eA,I({ref:t,className:n+" "+(a||"")},o,{direction:i,background:"linear-gradient(to "+(i==="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:i==="horizontal"?360*p.left:360*p.top})}}))});Nx.displayName="Hue";var qO=["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:i={},bProps:o={},aProps:s={},className:p,style:c,onChange:u}=e,d=ya(e,qO),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),u&&u(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"&&u&&u(za(Vs(I({},f,{r:g})))),C==="g"&&u&&u(za(Vs(I({},f,{g})))),C==="b"&&u&&u(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"},c),children:[A.jsx(Hi,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(Hi,I({label:"G",value:f.g||0,onBlur:W,placement:r,onChange:(g,C)=>x(C,"g",g)},i,{style:I({marginLeft:5},i.style)})),A.jsx(Hi,I({label:"B",value:f.b||0,onBlur:W,placement:r,onChange:(g,C)=>x(C,"b",g)},o,{style:I({marginLeft:5},o.style)})),s&&A.jsx(Hi,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 jO=["prefixCls","hsva","hProps","sProps","lProps","aProps","className","onChange"],Gx=ht.forwardRef((e,t)=>{var{prefixCls:n="w-color-editable-input-hsla",hsva:a,hProps:r={},sProps:l={},lProps:i={},aProps:o={},className:s,onChange:p}=e,c=ya(e,jO),u=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({},u,{h:W}))))),m==="s"&&(W<0&&(W=0),W>100&&(W=100),p&&p(za($c(I({},u,{s:W}))))),m==="l"&&(W<0&&(W=0),W>100&&(W=100),p&&p(za($c(I({},u,{l:W}))))),m==="a"&&(W<0&&(W=0),W>1&&(W=1),p&&p(za($c(I({},u,{a:W}))))))},f=o==!1?!1:I({label:"A",value:Math.round(u.a*100)/100},o,{onChange:(W,m)=>d(m,"a")});return A.jsx(sh,I({ref:t,hsva:a,rProps:I({label:"H",value:Math.round(u.h)},r,{onChange:(W,m)=>d(m,"h")}),gProps:I({label:"S",value:Math.round(u.s)+"%"},l,{onChange:(W,m)=>d(m,"s")}),bProps:I({label:"L",value:Math.round(u.l)+"%"},i,{onChange:(W,m)=>d(m,"l")}),aProps:f,className:[n,s||""].filter(Boolean).join(" ")},c))});Gx.displayName="EditableInputHSLA";var TO=["style"];function OO(e){var{style:t}=e,n=ya(e,TO),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 KO(){return"EyeDropper"in window}function PO(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 JO=["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}({}),Hx=ht.forwardRef((e,t)=>{var{prefixCls:n="w-color-chrome",className:a,style:r,color:l,showEditableInput:i=!0,showEyeDropper:o=!0,showColorPreview:s=!0,showHue:p=!0,showAlpha:c=!0,inputType:u=qa.RGBA,rectProps:d={},onChange:f}=e,W=ya(e,JO),m=typeof l=="string"&&ih(l)?zl(l):l||{h:0,s:0,l:0,a:0},x=B=>f&&f(za(B)),[h,g]=v.useState(u),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:fO(m),boxShadow:"var(--chrome-alpha-box-shadow)"},w=B=>{var M=zl(B);x(I({},M))},V={height:14,width:14},b={style:I({},V),fillProps:{style:V}};return A.jsx(Yx,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(Zx,{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:[KO()&&o&&A.jsx(PO,{onPickColor:w}),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(Nx,{hue:m.h,style:{width:"100%",height:12,borderRadius:2},pointerProps:b,bgProps:{style:{borderRadius:2}},onChange:B=>{x(I({},m,B))}}),c==!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))}})]})]}),i&&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:c==!1?!1:{labelStyle:y,inputStyle:E},onChange:B=>x(B.hsva)}),h===qa.HEXA&&A.jsx(Hi,{label:"HEX",labelStyle:y,inputStyle:E,value:m.a>0&&m.a<1?hO(m).toLocaleUpperCase():lh(m).toLocaleUpperCase(),onChange:(B,M)=>{typeof M=="string"&&x(zl(/^#/.test(M)?M:"#"+M))}}),h===qa.HSLA&&A.jsx(Gx,{hsva:m,hProps:{labelStyle:y,inputStyle:E},sProps:{labelStyle:y,inputStyle:E},lProps:{labelStyle:y,inputStyle:E},aProps:c==!1?!1:{labelStyle:y,inputStyle:E},onChange:B=>x(B.hsva)})]}),A.jsx(OO,{onClick:C})]})]}),rectRender:()=>A.jsx(v.Fragment,{})}))});Hx.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 DO({colors:e,primary:t,secondary:n,onPrimaryChange:a,onSecondaryChange:r,onColorsChange:l}){const{shadowRoot:i}=Va(),o=v.useMemo(()=>i??void 0,[i]),[s,p]=v.useState(null),c=!!s,[u,d]=v.useState(ph),[f,W]=v.useState(""),[m,x]=v.useState(null),h=v.useCallback(w=>{p(w),d(e.length>0?e[e.length-1]:ph)},[e]),g=v.useCallback(()=>{p(null)},[]),C=v.useCallback(()=>{const w=zs(u);if(!w)return;if(e.some(b=>b.toLowerCase()===w.toLowerCase())){g();return}l([...e,w]),g()},[e,u,l,g]),y=v.useCallback(w=>{const V=e[w],b=e.filter((B,M)=>M!==w);V&&t.toLowerCase()===V.toLowerCase()&&a(""),V&&n.toLowerCase()===V.toLowerCase()&&r(""),l(b)},[e,t,n,a,r,l]),E=v.useCallback((w,V)=>{W(V),w.dataTransfer.effectAllowed="copy",w.dataTransfer.setData("text/plain",V)},[]),S=v.useCallback(()=>{x(null),W("")},[]),k=v.useCallback((w,V)=>{V.preventDefault();const b=V.dataTransfer.getData("text/plain"),B=zs(b||f);if(!B){x(null);return}w==="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(je,{variant:"contained",color:"primary",size:"medium",startIcon:A.jsx(Fl,{}),onClick:w=>c?g():h(w.currentTarget),"aria-expanded":c,"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:c?"סגירת לוח בחירת הצבע":"הוספת צבע משלך"}),A.jsxs(SI,{open:c,anchorEl:s,onClose:g,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},disableScrollLock:!0,container:o,disablePortal:!o,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(Hx,{color:zs(u)||ph,onChange:w=>d(w.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(je,{variant:"text",onClick:g,sx:{textTransform:"none"},children:"ביטול"}),A.jsx(je,{variant:"contained",color:"primary",onClick:C,disabled:!zs(u),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:w=>{w.preventDefault(),w.dataTransfer.dropEffect="copy",x("primary")},onDragLeave:()=>{m==="primary"&&x(null)},onDrop:w=>k("primary",w),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:w=>{w.preventDefault(),w.dataTransfer.dropEffect="copy",x("secondary")},onDragLeave:()=>{m==="secondary"&&x(null)},onDrop:w=>k("secondary",w),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((w,V)=>{const b=t.toLowerCase()===w.toLowerCase(),B=n.toLowerCase()===w.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,w),onDragEnd:S,sx:{width:"100%",height:80,backgroundColor:w,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(w),fontWeight:"bold",fontSize:10,textAlign:"center",px:.5},children:w.toUpperCase()})]}),A.jsxs(K,{sx:{display:"flex",gap:.5,mt:1,justifyContent:"center"},children:[A.jsx(mg,{title:b?"הסר מצבע ראשי":"הגדר כצבע ראשי",children:A.jsx(je,{size:"small",variant:b?"contained":"outlined",color:"primary",sx:{minWidth:"auto",px:1,fontSize:10,height:28},onClick:()=>{a(b?"":w)},children:"ראשי"})}),A.jsx(mg,{title:B?"הסר מצבע משני":"הגדר כצבע משני",children:A.jsx(je,{size:"small",variant:B?"contained":"outlined",color:"secondary",sx:{minWidth:"auto",px:1,fontSize:10,height:28},onClick:()=>{r(B?"":w)},children:"משני"})})]})]})},`${w}-${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",Xx="_scan_aogto_10",Ah="_dataBars_aogto_19",dh="_dataBar_aogto_19",_x="_analyze_aogto_1",fh="_dots_aogto_80",Wh="_fadeUp_aogto_98",gh="_fadeUpDelay1_aogto_103",hh="_fadeUpDelay2_aogto_108",$x="_fadeUpDelay3_aogto_113",YO=Object.freeze(Object.defineProperty({__proto__:null,analyze:_x,analyzingContainer:uh,dataBar:dh,dataBars:Ah,default:{analyzingContainer:uh,scanningLine:ch,scan:Xx,dataBars:Ah,dataBar:dh,analyze:_x,dots:fh,fadeUp:Wh,fadeUpDelay1:gh,fadeUpDelay2:hh,fadeUpDelay3:$x},dots:fh,fadeUp:Wh,fadeUpDelay1:gh,fadeUpDelay2:hh,fadeUpDelay3:$x,scan:Xx,scanningLine:ch},Symbol.toStringTag,{value:"Module"})),ZO=`.analyzingContainer {
393
+ `);ce=Pe.pop()||"";for(const qe of Pe)if(qe.startsWith("data: ")){const ot=qe.slice(6);try{const D=JSON.parse(ot);D.message&&!((ze=D.metadata)!=null&&ze.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(fe=>{if(fe!=null&&fe.suggestions&&Array.isArray(fe.suggestions))y(fe.suggestions.map(ge=>({domain:ge.domain,available:ge.available})));else if(fe!=null&&fe.data){const ge=fe.data;Array.isArray(ge)?y(ge.map(he=>({domain:he}))):ge!=null&&ge.domains&&Array.isArray(ge.domains)?y(ge.domains.map(he=>({domain:he}))):ge!=null&&ge.domain?y([{domain:ge.domain}]):y([])}else y([]);S(!1)}).catch(fe=>{console.error("Error fetching domains:",fe),w("לא הצלחנו לטעון הצעות דומיין"),S(!1)})};v.useEffect(()=>{if(!E){M("");return}let ae=0;M(Vg[ae]);const _=setInterval(()=>{ae=(ae+1)%Vg.length,M(Vg[ae])},2500);return()=>clearInterval(_)},[E]),v.useEffect(()=>{W(!0)},[]),v.useEffect(()=>{F.current=a},[a]),v.useEffect(()=>{g(s)},[s]);const se=ae=>{d(ae)},ve=ae=>{const _=ae.trim();return!_||_.startsWith("http://")||_.startsWith("https://")?_:"https://"+_},ue=ae=>{const _=ae.target.value,ye=F.current;if(!_){F.current=_,l(_);return}if(_.includes("://")){F.current=_,l(_);return}if(_.startsWith("http://")||_.startsWith("https://")){F.current=_,l(_);return}const fe=ye.includes("://"),ge=_.length<ye.length;if(fe&&!_.includes("://")&&(ye.replace(/^https?:\/\//,"").startsWith(_)||ge)){F.current=_,l(_);return}if(_.toLowerCase().startsWith("http")&&_.length<7){F.current=_,l(_);return}if(_.includes(".")||_.length>3){const ce=ve(_);F.current=ce,l(ce)}else F.current=_,l(_)},me=ae=>{if(!ae.trim()||(ae.includes("http")||(ae="https://"+ae),!ae.includes(".")))return!1;try{const _=new URL(ae);return _.protocol==="http:"||_.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(je,{variant:"text",color:"primary",onClick:Y,sx:{mb:2,fontSize:{xs:"0.875rem",sm:"1rem"},textTransform:"none"},children:"חזרה"}),A.jsx(lj,{sx:{display:"none"},activeStep:e,children:t.map(ae=>A.jsx(Qq,{children:A.jsx(TI,{children:ae})},ae))}),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(va,{title:"חיפוש דומיין",description:"תארו את העסק או את שם הדומיין הרצוי — נציע אפשרויות מתאימות.",children:A.jsx(at,{fullWidth:!0,variant:"outlined",placeholder:"שם העסק או תיאור קצר",autoComplete:"off",value:h,onChange:ae=>{g(ae.target.value),p==null||p(ae.target.value.trim())},onKeyDown:ae=>{ae.key==="Enter"&&h.trim()&&(ae.preventDefault(),te())},InputProps:{endAdornment:A.jsx(ug,{position:"end",children:A.jsx(je,{variant:"contained",color:"primary",size:"small",disabled:!h.trim()||E,onClick:()=>te(),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:ae=>un(ae.palette.common.black,.02)},children:[A.jsx(Qa,{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(je,{variant:"text",color:"primary",onClick:()=>{w(null),te()},sx:{fontSize:"0.875rem"},children:"נסה שוב"})}),A.jsx(ct,{item:!0,children:A.jsx(je,{variant:"text",color:"primary",onClick:Y,sx:{fontSize:"0.875rem"},children:"חזרה"})})]})]}):A.jsxs(va,{title:"תוצאות",description:"לחצו על דומיין לפתיחת רכישה. אפשר לחפש מחדש עם ניסוח אחר.",children:[A.jsx(at,{fullWidth:!0,variant:"outlined",placeholder:"שם העסק או תיאור קצר – חיפוש מחדש לתוצאות אחרות",autoComplete:"off",value:h,onChange:ae=>{g(ae.target.value),p==null||p(ae.target.value.trim())},onKeyDown:ae=>{ae.key==="Enter"&&h.trim()&&(ae.preventDefault(),te())},InputProps:{endAdornment:A.jsx(ug,{position:"end",children:A.jsx(je,{variant:"contained",color:"primary",size:"small",disabled:!h.trim()||E,onClick:()=>te(),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((ae,_)=>A.jsxs(K,{onClick:()=>Q(ae.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:ye=>un(ye.palette.common.black,.02),"&:hover":{borderColor:"primary.main",bgcolor:ye=>un(ye.palette.primary.main,.06)}},children:[A.jsx(de,{sx:{fontSize:"0.875rem",fontWeight:500},children:ae.domain}),ae.available!==!1&&A.jsx(de,{variant:"caption",color:"success.main",sx:{fontSize:"0.75rem"},children:"זמין"})]},_))}),A.jsxs(ct,{container:!0,spacing:1,justifyContent:"space-between",children:[A.jsx(ct,{item:!0,children:A.jsx(je,{variant:"text",color:"primary",onClick:Y,sx:{fontSize:"0.875rem"},children:"חזרה"})}),A.jsx(ct,{item:!0,children:A.jsx(je,{variant:"contained",color:"primary",onClick:()=>{p==null||p(h.trim()),i(1)},sx:{fontSize:"0.875rem"},children:"הבא"})})]})]})}):A.jsxs(A.Fragment,{children:[A.jsxs(va,{title:"כתובת האתר",description:"כתובת מלאה כולל https. אין אתר? השתמשו בקישור מתחת לשדה.",children:[A.jsx(at,{fullWidth:!0,label:"URL",variant:"outlined",margin:"normal",placeholder:"https://www.example.com",value:a,onChange:ue,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(je,{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(va,{title:"אישור והמשך",description:"נדרש לאימות הבעלות על האתר ולשימוש במידע ליצירת תכנים.",children:A.jsx(K,{sx:{p:{xs:1.25,sm:1.5},borderRadius:2,border:"1px solid",borderColor:"divider",bgcolor:ae=>un(ae.palette.common.black,.02)},children:A.jsx(Kc,{control:A.jsx(ZU,{size:"small"}),checked:u,onChange:(ae,_)=>se(_),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(je,{onClick:()=>{l(""),i(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(je,{disabled:!me(a)||!u,variant:"contained",color:"primary",onClick:()=>i(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:o&&A.jsx(ct,{item:!0,xs:12,sm:"auto",children:A.jsx(je,{variant:"text",color:"primary",disabled:!u,onClick:()=>{l(""),i(1)},fullWidth:!0,sx:{fontSize:{xs:"0.875rem",sm:"1rem"},maxWidth:{xs:"100%",sm:"auto"}},children:r?"צפייה במידע על העסק שלי":""})})})]})]})]})}var Ug={},Jj=Fe;Object.defineProperty(Ug,"__esModule",{value:!0});var Fl=Ug.default=void 0,Dj=Jj(Oe()),Yj=A;Fl=Ug.default=(0,Dj.default)((0,Yj.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");var Fg={},Zj=Fe;Object.defineProperty(Fg,"__esModule",{value:!0});var Qs=Fg.default=void 0,Nj=Zj(Oe()),Gj=A;Qs=Fg.default=(0,Nj.default)((0,Gj.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={},Hj=Fe;Object.defineProperty(zg,"__esModule",{value:!0});var px=zg.default=void 0,Xj=Hj(Oe()),_j=A;px=zg.default=(0,Xj.default)((0,_j.jsx)("path",{d:"M5 20h14v-2H5zm0-10h4v6h6v-6h4l-7-7z"}),"Upload");var qg={},$j=Fe;Object.defineProperty(qg,"__esModule",{value:!0});var ux=qg.default=void 0,eT=$j(Oe()),tT=A;ux=qg.default=(0,eT.default)((0,tT.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={},nT=Fe;Object.defineProperty(jg,"__esModule",{value:!0});var cx=jg.default=void 0,aT=nT(Oe()),rT=A;cx=jg.default=(0,aT.default)((0,rT.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={},lT=Fe;Object.defineProperty(Tg,"__esModule",{value:!0});var Ax=Tg.default=void 0,iT=lT(Oe()),oT=A;Ax=Tg.default=(0,iT.default)((0,oT.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={},sT=Fe;Object.defineProperty(Og,"__esModule",{value:!0});var dx=Og.default=void 0,pT=sT(Oe()),uT=A;dx=Og.default=(0,pT.default)((0,uT.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={},cT=Fe;Object.defineProperty(Kg,"__esModule",{value:!0});var fx=Kg.default=void 0,AT=cT(Oe()),dT=A;fx=Kg.default=(0,AT.default)((0,dT.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={},fT=Fe;Object.defineProperty(Pg,"__esModule",{value:!0});var Wx=Pg.default=void 0,WT=fT(Oe()),gT=A;Wx=Pg.default=(0,WT.default)((0,gT.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={},hT=Fe;Object.defineProperty(Jg,"__esModule",{value:!0});var gx=Jg.default=void 0;vT(v);var mT=hT(Oe()),CT=A;function hx(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(hx=function(a){return a?n:t})(e)}function vT(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=hx(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 i=r?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(a,l,i):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}gx=Jg.default=(0,mT.default)((0,CT.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={},yT=Fe;Object.defineProperty(Dg,"__esModule",{value:!0});var mx=Dg.default=void 0;xT(v);var ST=yT(Oe()),IT=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 xT(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 i=r?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(a,l,i):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}mx=Dg.default=(0,ST.default)((0,IT.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={},ET=Fe;Object.defineProperty(Yg,"__esModule",{value:!0});var vx=Yg.default=void 0;RT(v);var bT=ET(Oe()),kT=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 i=r?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(a,l,i):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}vx=Yg.default=(0,bT.default)((0,kT.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={},wT=Fe;Object.defineProperty(Zg,"__esModule",{value:!0});var Sx=Zg.default=void 0;MT(v);var BT=wT(Oe()),LT=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 MT(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 i=r?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(a,l,i):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}Sx=Zg.default=(0,BT.default)((0,LT.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 xx=Ng.default=void 0;FT(v);var VT=QT(Oe()),UT=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 FT(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 i=r?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(a,l,i):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}xx=Ng.default=(0,VT.default)((0,UT.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={},zT=Fe;Object.defineProperty(Gg,"__esModule",{value:!0});var bx=Gg.default=void 0;TT(v);var qT=zT(Oe()),jT=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 TT(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 i=r?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(a,l,i):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}bx=Gg.default=(0,qT.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={},OT=Fe;Object.defineProperty(Hg,"__esModule",{value:!0});var Rx=Hg.default=void 0;JT(v);var KT=OT(Oe()),PT=A;function wx(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(wx=function(a){return a?n:t})(e)}function JT(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=wx(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 i=r?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(a,l,i):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}Rx=Hg.default=(0,KT.default)((0,PT.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={},DT=Fe;Object.defineProperty(Xg,"__esModule",{value:!0});var Bx=Xg.default=void 0;NT(v);var YT=DT(Oe()),ZT=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 NT(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 i=r?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(a,l,i):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}Bx=Xg.default=(0,YT.default)((0,ZT.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={},GT=Fe;Object.defineProperty(_g,"__esModule",{value:!0});var Mx=_g.default=void 0;_T(v);var HT=GT(Oe()),XT=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 i=r?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(a,l,i):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}Mx=_g.default=(0,HT.default)((0,XT.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={},$T=Fe;Object.defineProperty($g,"__esModule",{value:!0});var Vx=$g.default=void 0;nO(v);var eO=$T(Oe()),tO=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 nO(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 i=r?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(a,l,i):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}Vx=$g.default=(0,eO.default)((0,tO.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={},aO=Fe;Object.defineProperty(eh,"__esModule",{value:!0});var Fx=eh.default=void 0,rO=aO(Oe()),lO=A;Fx=eh.default=(0,rO.default)((0,lO.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={},iO=Fe;Object.defineProperty(th,"__esModule",{value:!0});var zx=th.default=void 0,oO=iO(Oe()),sO=A;zx=th.default=(0,oO.default)((0,sO.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 pO({value:e,onChange:t,label:n="מילות מפתח",placeholder:a="הוספת מילת מפתח..."}){const[r,l]=v.useState(""),i=(s,p)=>{t(p)},o=(s,p)=>{l(p)};return A.jsx($W,{multiple:!0,freeSolo:!0,options:[],value:e,onChange:i,inputValue:r,onInputChange:o,renderTags:(s,p)=>s.map((c,u)=>v.createElement(vn,{variant:"outlined",label:c,...p({index:u}),key:u})),renderInput:s=>A.jsx(at,{...s,label:n,placeholder:a,variant:"outlined",margin:"normal"}),sx:{"& .MuiAutocomplete-tag":{margin:"4px"}}})}var nh={},uO=Fe;Object.defineProperty(nh,"__esModule",{value:!0});var ah=nh.default=void 0,cO=uO(Oe()),AO=A;ah=nh.default=(0,cO.default)((0,AO.jsx)("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");var Gi=255,Fa=100,Vs=e=>{var{r:t,g:n,b:a,a:r}=e,l=Math.max(t,n,a),i=l-Math.min(t,n,a),o=i?l===t?(n-a)/i:l===n?2+(a-t)/i:4+(t-n)/i:0;return{h:60*(o<0?o+6:o),s:l?i/l*Fa:0,v:l/Gi*Fa,a:r}},qx=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}},jx=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))},Tx=e=>{var{r:t,g:n,b:a,a:r}=e,l=typeof r=="number"&&(r*255|256).toString(16).slice(1);return""+jx({r:t,g:n,b:a})+(l||"")},zl=e=>Vs(dO(e)),dO=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,i]=e.match(n).map(o=>parseInt(o,16));return{r:a,g:r,b:l,a:(i??255)/Gi}},Us=e=>{var{h:t,s:n,v:a,a:r}=e,l=t/60,i=n/Fa,o=a/Fa,s=Math.floor(l)%6,p=l-Math.floor(l),c=Gi*o*(1-i),u=Gi*o*(1-i*p),d=Gi*o*(1-i*(1-p));o*=Gi;var f={};switch(s){case 0:f.r=o,f.g=d,f.b=c;break;case 1:f.r=u,f.g=o,f.b=c;break;case 2:f.r=c,f.g=o,f.b=d;break;case 3:f.r=c,f.g=u,f.b=o;break;case 4:f.r=d,f.g=c,f.b=o;break;case 5:f.r=o,f.g=c,f.b=u;break}return f.r=Math.round(f.r),f.g=Math.round(f.g),f.b=Math.round(f.b),I({},f,{a:r})},fO=e=>{var{r:t,g:n,b:a,a:r}=Us(e);return"rgba("+t+", "+n+", "+a+", "+r+")"},WO=e=>{var{r:t,g:n,b:a}=e;return{r:t,g:n,b:a}},gO=e=>{var{h:t,s:n,l:a}=e;return{h:t,s:n,l:a}},lh=e=>jx(Us(e)),hO=e=>Tx(Us(e)),mO=e=>{var{h:t,s:n,v:a}=e;return{h:t,s:n,v:a}},CO=e=>{var{r:t,g:n,b:a}=e,r=function(c){return c<=.04045?c/12.92:Math.pow((c+.055)/1.055,2.4)},l=r(t/255),i=r(n/255),o=r(a/255),s={};return s.x=l*.4124+i*.3576+o*.1805,s.y=l*.2126+i*.7152+o*.0722,s.bri=l*.0193+i*.1192+o*.9505,s},za=e=>{var t,n,a,r,l,i,o,s,p;return typeof e=="string"&&ih(e)?(i=zl(e),s=e):typeof e!="string"&&(i=e),i&&(a=mO(i),l=rh(i),r=Us(i),p=Tx(r),s=lh(i),n=gO(l),t=WO(r),o=CO(t)),{rgb:t,hsl:n,hsv:a,rgba:r,hsla:l,hsva:i,hex:s,hexa:p,xy:o}},ih=e=>/^#?([A-Fa-f0-9]{3,4}){1,2}$/.test(e),vO=rS();const ya=Dl(vO);function Ox(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,Kx=e=>{!Fs(e)&&e.preventDefault&&e.preventDefault()},Px=function(t,n,a){return n===void 0&&(n=0),a===void 0&&(a=1),t>a?a:t<n?n:t},Jx=(e,t)=>{var n=e.getBoundingClientRect(),a=Fs(t)?t.touches[0]:t;return{left:Px((a.pageX-(n.left+window.pageXOffset))/n.width),top:Px((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)}},yO=["prefixCls","className","onMove","onDown"],oh=ht.forwardRef((e,t)=>{var{prefixCls:n="w-color-interactive",className:a,onMove:r,onDown:l}=e,i=ya(e,yO),o=v.useRef(null),s=v.useRef(!1),[p,c]=v.useState(!1),u=Ox(r),d=Ox(l),f=g=>s.current&&!Fs(g)?!1:(s.current=Fs(g),!0),W=v.useCallback(g=>{if(Kx(g),!!o.current){var C=Fs(g)?g.touches.length>0:g.buttons>0;if(!C){c(!1);return}u==null||u(Jx(o.current,g),g)}},[u]),m=v.useCallback(()=>c(!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(),Kx(g.nativeEvent),f(g.nativeEvent)&&o.current&&(d==null||d(Jx(o.current,g.nativeEvent),g.nativeEvent),c(!0))},[d]);return A.jsx("div",I({},i,{className:[n,a||""].filter(Boolean).join(" "),style:I({},i.style,{touchAction:"none"}),ref:o,tabIndex:0,onMouseDown:h,onTouchStart:h}))});oh.displayName="Interactive";var SO=["className","prefixCls","left","top","style","fillProps"],IO=e=>{var{className:t,prefixCls:n,left:a,top:r,style:l,fillProps:i}=e,o=ya(e,SO),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)"},i==null?void 0:i.style,{transform:a?"translate(-9px, -1px)":"translate(-1px, -9px)"});return A.jsx("div",I({className:n+"-pointer "+(t||""),style:s},o,{children:A.jsx("div",I({className:n+"-fill"},i,{style:p}))}))},xO=["prefixCls","className","hsva","background","bgProps","innerProps","pointerProps","radius","width","height","direction","style","onChange","pointer"],EO="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:i={},innerProps:o={},pointerProps:s={},radius:p=0,width:c,height:u=16,direction:d="horizontal",style:f,onChange:W,pointer:m}=e,x=ya(e,xO),h=V=>{W&&W(I({},r,{a:d==="horizontal"?V.left:V.top}),V)},g=qx(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("+EO+") left center",backgroundColor:"var(--alpha-background-color)"},{width:c,height:u},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()},[]),w=m&&typeof m=="function"?m(I({prefixCls:n},s,y)):A.jsx(IO,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({},i,{style:I({inset:0,position:"absolute",background:l||C,borderRadius:p},i.style)})),A.jsx(oh,I({},o,{style:I({},o.style,{inset:0,zIndex:1,position:"absolute",outline:"none"}),onMove:h,onDown:h,onClick:k,onKeyDown:S,children:w}))]}))});eA.displayName="Alpha";var bO=["prefixCls","placement","label","value","className","style","labelStyle","inputStyle","onChange","onBlur","renderInput"],kO=e=>/^#?([A-Fa-f0-9]{3,4}){1,2}$/.test(e),RO=e=>Number(String(e).replace(/%/g,"")),Hi=ht.forwardRef((e,t)=>{var{prefixCls:n="w-color-editable-input",placement:a="bottom",label:r,value:l,className:i,style:o,labelStyle:s,inputStyle:p,onChange:c,onBlur:u,renderInput:d}=e,f=ya(e,bO),[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(/^#/,"");kO(B)&&c&&c(V,B);var M=RO(B);isNaN(M)||c&&c(V,M),m(B)}function y(V){x.current=!1,m(e.value),u&&u(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,o),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),w=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,i||""].filter(Boolean).join(" "),style:S,children:[d?d(w,t):A.jsx("input",I({ref:t},w)),r&&A.jsx("label",{htmlFor:g,style:I({color:"var(--editable-input-label-color)",textTransform:"capitalize"},s),children:r})]})});Hi.displayName="EditableInput";var wO=["prefixCls","className","color","colors","style","rectProps","onChange","addonAfter","addonBefore","rectRender"],Dx=ht.forwardRef((e,t)=>{var{prefixCls:n="w-color-swatch",className:a,color:r,colors:l=[],style:i,rectProps:o={},onChange:s,addonAfter:p,addonBefore:c,rectRender:u}=e,d=ya(e,wO),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},o.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"},i),children:[c&&ht.isValidElement(c)&&c,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=u&&u({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=o.children&&ht.isValidElement(o.children)?ht.cloneElement(o.children,{color:g,checked:C}):null;return A.jsx("div",I({tabIndex:0,title:h,onClick:S=>W(g,S)},o,{children:E,style:I({},f,{background:g})}),x)}),p&&ht.isValidElement(p)&&p]}))});Dx.displayName="Swatch";function BO(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var LO={marginRight:0,marginBottom:0,borderRadius:0,boxSizing:"border-box",height:25,width:25};function MO(e){var{style:t,title:n,checked:a,color:r,onClick:l,rectProps:i}=e,o=v.useRef(null),s=v.useCallback(()=>{o.current.style.zIndex="2",o.current.style.outline="#fff solid 2px",o.current.style.boxShadow="rgb(0 0 0 / 25%) 0 0 5px 2px"},[]),p=v.useCallback(()=>{a||(o.current.style.zIndex="0",o.current.style.outline="initial",o.current.style.boxShadow="initial")},[a]),c=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:o,title:n},i,{onClick:l,onMouseEnter:s,onMouseLeave:p,style:I({},t,{marginRight:0,marginBottom:0,borderRadius:0,boxSizing:"border-box",height:25,width:25},LO,c,i==null?void 0:i.style)}))}var QO=["prefixCls","placement","className","style","color","colors","showTriangle","rectProps","onChange","rectRender"],VO=["#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}({}),Yx=ht.forwardRef((e,t)=>{var{prefixCls:n="w-color-github",placement:a=Pt.TopRight,className:r,style:l,color:i,colors:o=VO,showTriangle:s=!0,rectProps:p={},onChange:c,rectRender:u}=e,d=ya(e,QO),f=typeof i=="string"&&ih(i)?zl(i):i,W=i?lh(f):"",m=E=>c&&c(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({},(BO(E),E)),k=u&&u(I({},S));return k||A.jsx(MO,I({},S,{rectProps:p}))};return A.jsx(Dx,I({ref:t,className:[n,r].filter(Boolean).join(" "),colors:o,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})]})})}))});Yx.displayName="Github";var UO=e=>{var{className:t,color:n,left:a,top:r,prefixCls:l}=e,i={position:"absolute",top:r,left:a},o={"--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:i,children:A.jsx("div",{className:l+"-fill",style:o})}),[r,a,n,t,l])},FO=["prefixCls","radius","pointer","className","hue","style","hsva","onChange"],Zx=ht.forwardRef((e,t)=>{var n,{prefixCls:a="w-color-saturation",radius:r=0,pointer:l,className:i,hue:o=0,style:s,hsva:p,onChange:c}=e,u=ya(e,FO),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)=>{c&&p&&c({h:p.h,s:C.left*100,v:(1-C.top)*100,a:p.a});var E=f.current;E&&E.focus()},[p,c]),x=v.useCallback(C=>{if(!(!p||!c)){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&&c({h:p.h,s:E,v:S,a:p.a})}},[p,c]),h=v.useMemo(()=>{if(!p)return null;var C={top:100-p.v+"%",left:p.s+"%",color:qx(p)};return l&&typeof l=="function"?l(I({prefixCls:a},C)):A.jsx(UO,I({prefixCls:a},C))},[p,l,a]),g=v.useCallback(C=>{C.target.focus()},[]);return A.jsx(oh,I({className:[a,i||""].filter(Boolean).join(" ")},u,{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:o)+", 100%, 50%))"},d,{outline:"none"}),ref:W,onMove:m,onDown:m,onKeyDown:x,onClick:g,children:h}))});Zx.displayName="Saturation";var zO=["prefixCls","className","hue","onChange","direction"],Nx=ht.forwardRef((e,t)=>{var{prefixCls:n="w-color-hue",className:a,hue:r=0,onChange:l,direction:i="horizontal"}=e,o=ya(e,zO);return A.jsx(eA,I({ref:t,className:n+" "+(a||"")},o,{direction:i,background:"linear-gradient(to "+(i==="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:i==="horizontal"?360*p.left:360*p.top})}}))});Nx.displayName="Hue";var qO=["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:i={},bProps:o={},aProps:s={},className:p,style:c,onChange:u}=e,d=ya(e,qO),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),u&&u(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"&&u&&u(za(Vs(I({},f,{r:g})))),C==="g"&&u&&u(za(Vs(I({},f,{g})))),C==="b"&&u&&u(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"},c),children:[A.jsx(Hi,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(Hi,I({label:"G",value:f.g||0,onBlur:W,placement:r,onChange:(g,C)=>x(C,"g",g)},i,{style:I({marginLeft:5},i.style)})),A.jsx(Hi,I({label:"B",value:f.b||0,onBlur:W,placement:r,onChange:(g,C)=>x(C,"b",g)},o,{style:I({marginLeft:5},o.style)})),s&&A.jsx(Hi,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 jO=["prefixCls","hsva","hProps","sProps","lProps","aProps","className","onChange"],Gx=ht.forwardRef((e,t)=>{var{prefixCls:n="w-color-editable-input-hsla",hsva:a,hProps:r={},sProps:l={},lProps:i={},aProps:o={},className:s,onChange:p}=e,c=ya(e,jO),u=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({},u,{h:W}))))),m==="s"&&(W<0&&(W=0),W>100&&(W=100),p&&p(za($c(I({},u,{s:W}))))),m==="l"&&(W<0&&(W=0),W>100&&(W=100),p&&p(za($c(I({},u,{l:W}))))),m==="a"&&(W<0&&(W=0),W>1&&(W=1),p&&p(za($c(I({},u,{a:W}))))))},f=o==!1?!1:I({label:"A",value:Math.round(u.a*100)/100},o,{onChange:(W,m)=>d(m,"a")});return A.jsx(sh,I({ref:t,hsva:a,rProps:I({label:"H",value:Math.round(u.h)},r,{onChange:(W,m)=>d(m,"h")}),gProps:I({label:"S",value:Math.round(u.s)+"%"},l,{onChange:(W,m)=>d(m,"s")}),bProps:I({label:"L",value:Math.round(u.l)+"%"},i,{onChange:(W,m)=>d(m,"l")}),aProps:f,className:[n,s||""].filter(Boolean).join(" ")},c))});Gx.displayName="EditableInputHSLA";var TO=["style"];function OO(e){var{style:t}=e,n=ya(e,TO),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 KO(){return"EyeDropper"in window}function PO(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 JO=["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}({}),Hx=ht.forwardRef((e,t)=>{var{prefixCls:n="w-color-chrome",className:a,style:r,color:l,showEditableInput:i=!0,showEyeDropper:o=!0,showColorPreview:s=!0,showHue:p=!0,showAlpha:c=!0,inputType:u=qa.RGBA,rectProps:d={},onChange:f}=e,W=ya(e,JO),m=typeof l=="string"&&ih(l)?zl(l):l||{h:0,s:0,l:0,a:0},x=B=>f&&f(za(B)),[h,g]=v.useState(u),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:fO(m),boxShadow:"var(--chrome-alpha-box-shadow)"},w=B=>{var M=zl(B);x(I({},M))},V={height:14,width:14},b={style:I({},V),fillProps:{style:V}};return A.jsx(Yx,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(Zx,{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:[KO()&&o&&A.jsx(PO,{onPickColor:w}),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(Nx,{hue:m.h,style:{width:"100%",height:12,borderRadius:2},pointerProps:b,bgProps:{style:{borderRadius:2}},onChange:B=>{x(I({},m,B))}}),c==!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))}})]})]}),i&&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:c==!1?!1:{labelStyle:y,inputStyle:E},onChange:B=>x(B.hsva)}),h===qa.HEXA&&A.jsx(Hi,{label:"HEX",labelStyle:y,inputStyle:E,value:m.a>0&&m.a<1?hO(m).toLocaleUpperCase():lh(m).toLocaleUpperCase(),onChange:(B,M)=>{typeof M=="string"&&x(zl(/^#/.test(M)?M:"#"+M))}}),h===qa.HSLA&&A.jsx(Gx,{hsva:m,hProps:{labelStyle:y,inputStyle:E},sProps:{labelStyle:y,inputStyle:E},lProps:{labelStyle:y,inputStyle:E},aProps:c==!1?!1:{labelStyle:y,inputStyle:E},onChange:B=>x(B.hsva)})]}),A.jsx(OO,{onClick:C})]})]}),rectRender:()=>A.jsx(v.Fragment,{})}))});Hx.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 DO({colors:e,primary:t,secondary:n,onPrimaryChange:a,onSecondaryChange:r,onColorsChange:l}){const{shadowRoot:i}=Va(),o=v.useMemo(()=>i??void 0,[i]),[s,p]=v.useState(null),c=!!s,[u,d]=v.useState(ph),[f,W]=v.useState(""),[m,x]=v.useState(null),h=v.useCallback(w=>{p(w),d(e.length>0?e[e.length-1]:ph)},[e]),g=v.useCallback(()=>{p(null)},[]),C=v.useCallback(()=>{const w=zs(u);if(!w)return;if(e.some(b=>b.toLowerCase()===w.toLowerCase())){g();return}l([...e,w]),g()},[e,u,l,g]),y=v.useCallback(w=>{const V=e[w],b=e.filter((B,M)=>M!==w);V&&t.toLowerCase()===V.toLowerCase()&&a(""),V&&n.toLowerCase()===V.toLowerCase()&&r(""),l(b)},[e,t,n,a,r,l]),E=v.useCallback((w,V)=>{W(V),w.dataTransfer.effectAllowed="copy",w.dataTransfer.setData("text/plain",V)},[]),S=v.useCallback(()=>{x(null),W("")},[]),k=v.useCallback((w,V)=>{V.preventDefault();const b=V.dataTransfer.getData("text/plain"),B=zs(b||f);if(!B){x(null);return}w==="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(je,{variant:"contained",color:"primary",size:"medium",startIcon:A.jsx(Fl,{}),onClick:w=>c?g():h(w.currentTarget),"aria-expanded":c,"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:c?"סגירת לוח בחירת הצבע":"הוספת צבע משלך"}),A.jsxs(SI,{open:c,anchorEl:s,onClose:g,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},disableScrollLock:!0,container:o,disablePortal:!o,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(Hx,{color:zs(u)||ph,onChange:w=>d(w.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(je,{variant:"text",onClick:g,sx:{textTransform:"none"},children:"ביטול"}),A.jsx(je,{variant:"contained",color:"primary",onClick:C,disabled:!zs(u),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:w=>{w.preventDefault(),w.dataTransfer.dropEffect="copy",x("primary")},onDragLeave:()=>{m==="primary"&&x(null)},onDrop:w=>k("primary",w),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:w=>{w.preventDefault(),w.dataTransfer.dropEffect="copy",x("secondary")},onDragLeave:()=>{m==="secondary"&&x(null)},onDrop:w=>k("secondary",w),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((w,V)=>{const b=t.toLowerCase()===w.toLowerCase(),B=n.toLowerCase()===w.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,w),onDragEnd:S,sx:{width:"100%",height:80,backgroundColor:w,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(w),fontWeight:"bold",fontSize:10,textAlign:"center",px:.5},children:w.toUpperCase()})]}),A.jsxs(K,{sx:{display:"flex",gap:.5,mt:1,justifyContent:"center"},children:[A.jsx(mg,{title:b?"הסר מצבע ראשי":"הגדר כצבע ראשי",children:A.jsx(je,{size:"small",variant:b?"contained":"outlined",color:"primary",sx:{minWidth:"auto",px:1,fontSize:10,height:28},onClick:()=>{a(b?"":w)},children:"ראשי"})}),A.jsx(mg,{title:B?"הסר מצבע משני":"הגדר כצבע משני",children:A.jsx(je,{size:"small",variant:B?"contained":"outlined",color:"secondary",sx:{minWidth:"auto",px:1,fontSize:10,height:28},onClick:()=>{r(B?"":w)},children:"משני"})})]})]})},`${w}-${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",Xx="_scan_aogto_10",Ah="_dataBars_aogto_19",dh="_dataBar_aogto_19",_x="_analyze_aogto_1",fh="_dots_aogto_80",Wh="_fadeUp_aogto_98",gh="_fadeUpDelay1_aogto_103",hh="_fadeUpDelay2_aogto_108",$x="_fadeUpDelay3_aogto_113",YO=Object.freeze(Object.defineProperty({__proto__:null,analyze:_x,analyzingContainer:uh,dataBar:dh,dataBars:Ah,default:{analyzingContainer:uh,scanningLine:ch,scan:Xx,dataBars:Ah,dataBar:dh,analyze:_x,dots:fh,fadeUp:Wh,fadeUpDelay1:gh,fadeUpDelay2:hh,fadeUpDelay3:$x},dots:fh,fadeUp:Wh,fadeUpDelay1:gh,fadeUpDelay2:hh,fadeUpDelay3:$x,scan:Xx,scanningLine:ch},Symbol.toStringTag,{value:"Module"})),ZO=`.analyzingContainer {
394
394
  position: relative;
395
395
  width: 200px;
396
396
  height: 80px;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@creaditor/business-ai",
3
3
  "private": false,
4
- "version": "1.0.49",
4
+ "version": "1.0.50",
5
5
  "type": "module",
6
6
  "publishConfig": {
7
7
  "access": "public"