1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9503],{76316:function(e,t,r){var i=r(85893),o=r(67294),n=r(83253),a=r.n(n),s=r(57363),l=r(14640),c=r(60905),d=r(25675),m=r.n(d),p=r(8612),g=r(49845);t.Z=e=>{let t=(0,l.useTranslations)(),{refreshUserInfo:r}=(0,o.useContext)(g.StoreContext),{alreadyGeneratingWarning:n,setAlreadyGeneratingWarning:d}=e,u="object"==typeof n?n?.isOpen||!1:!!n,h=()=>{"function"==typeof d&&("object"==typeof n?d({isOpen:!1,taskName:null}):d(!1))},x=r?.loginMail?.endsWith("@china-motor.com"),f="object"==typeof n?n?.taskName:null,b=f?p.c[f]?.waitTime??t("defaultWaitTime"):t("defaultWaitTime");return(0,i.jsxs)(a(),{isOpen:u,onRequestClose:h,ariaHideApp:!1,style:s.B7,children:[(0,i.jsx)("div",{className:"flex items-center justify-between relative",children:(0,i.jsx)("p",{className:"whitespace-pre-wrap mr-4 mt-2",children:x&&f?t("specialUserGeneratingWarning",{waitTime:b}):t("alreadyGeneratingWarning")})}),(0,i.jsx)(m(),{src:c.Z,alt:"FeedbackCloseBtn",className:"cursor-pointer absolute top-4 right-4",onClick:h})]})}},65464:function(e,t,r){var i=r(85893),o=r(67294),n=r(26601),a=r(14640),s=r(49845),l=r(97640),c=r(50788),d=r(86250),m=r(92208),p=r(34526),g=r(20473),u=r(12515),h=r(3709),x=r(53870),f=r(16711),b=r(11163);let j=[{id:"removeBg",label:"imageEditor.removeBg",icon:p.ErF},{id:"changeBg",label:"imageEditor.changeBg",icon:g.Lwf},{id:"enhance",label:"imageEditor.enhance",icon:c.OMi},{id:"crop",label:"imageEditor.crop",icon:u.ikx},{id:"addText",label:"imageEditor.addText",icon:u.RUS}],w={removeBg:!0,changeBg:!0,enhance:!0,crop:!0,addText:!0,options:!0},v=n.Z.p` 2 color: ${e=>{let{theme:t}=e;return t.textColor4}}; 3`,y=n.Z.div` 4 background-color: ${e=>{let{theme:t}=e;return t.backgroundColor30}}; 5 border-radius: 0.25rem; 6 position: absolute; 7 z-index: 11; 8 bottom: 4rem; 9 right: 0.75rem; 10 padding: 0.5rem; 11 filter: drop-shadow(0px 0px 4px rgba(0, 0, 0, 0.25)); 12 13 @media screen and (min-width: 1440px) { 14 right: 1.25rem; 15 } 16 17 @media screen and (max-width: 640px) { 18 right: 0.5rem; 19 } 20`,C=n.Z.div` 21 display: flex; 22 align-items: center; 23 cursor: pointer; 24 padding: 0.25rem; 25 26 :hover { 27 background-color: ${e=>{let{theme:t}=e;return t.backgroundColor33}}; 28 border-radius: 0.25rem; 29 } 30`,k=(0,n.Z)(m.ziT)` 31 color: ${e=>{let{theme:t}=e;return t.textColor5}}; 32 height: 1.75rem; 33 width: 1.75rem; 34 margin-right: 0.25rem; 35 36 @media screen and (max-width: 640px) { 37 height: 1.25rem; 38 width: 1.25rem; 39 } 40`,N=(0,n.Z)(d.B0q)` 41 color: ${e=>{let{theme:t}=e;return t.textColor5}}; 42 height: 1.75rem; 43 width: 1.75rem; 44 margin-right: 0.25rem; 45 46 @media screen and (max-width: 640px) { 47 height: 1.25rem; 48 width: 1.25rem; 49 } 50`,Z=(0,n.Z)(x.GnT)` 51 color: ${e=>{let{theme:t}=e;return t.textColor5}}; 52 height: 1.75rem; 53 width: 1.75rem; 54 margin-right: 0.25rem; 55 56 @media screen and (max-width: 640px) { 57 height: 1.25rem; 58 width: 1.25rem; 59 } 60`,F=n.Z.div` 61 background-color: rgba(127, 144, 150, 0.5); 62`,T=n.Z.div` 63 position: absolute; 64 bottom: 100%; 65 left: 50%; 66 transform: translateX(-50%); 67 margin-bottom: 0.5rem; 68 padding: 0.25rem 0.5rem; 69 background-color: #1f2937; 70 color: white; 71 font-size: 0.75rem; 72 border-radius: 0.25rem; 73 white-space: nowrap; 74 opacity: 0; 75 pointer-events: none; 76 transition: opacity 0.2s; 77 z-index: 15; 78`,E=n.Z.div` 79 display: flex; 80 align-items: center; 81 justify-content: center; 82 cursor: pointer; 83 color: white; 84 85 &:hover { 86 opacity: 0.85; 87 } 88 89 &:hover + .tooltip-text { 90 opacity: 1; 91 } 92`,z=n.Z.div` 93 position: relative; 94 display: flex; 95`,_=n.Z.div` 96 position: absolute; 97 bottom: 2.75rem; 98 left: 0.5rem; 99 z-index: 5; 100 display: flex; 101 align-items: center; 102 gap: 0.25rem; 103 padding: 0.25rem 0.75rem; 104 background: linear-gradient(-45deg, #872B97, #C4367C, #E93D6C, #FF4163, #FF5350, #FF5D45, #FF7130); 105 color: white; 106 border-radius: 0.5rem; 107 cursor: pointer; 108 font-size: 0.875rem; 109 font-weight: 600; 110 box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2); 111 transition: transform 0.2s; 112 white-space: nowrap; 113 114 &:hover { 115 transform: scale(1.05); 116 opacity: 0.9; 117 } 118 119 @media screen and (max-width: 640px) { 120 padding: 0.2rem 0.5rem; 121 font-size: 0.75rem; 122 } 123`;t.Z=e=>{let{isVisible:t,image:r,onDownload:n,downloadLoading:c,onShare:d,onDelete:m,onSave:p,taskName:u,showConvertToVideo:x=!1,keepMounted:B=!1,toolConfig:P={},onPrepareImage:$=null}=e,M={...w,...P},{currentTheme:O}=(0,o.useContext)(s.StoreContext),D=(0,a.useTranslations)(),{openImageEditor:S}=(0,h.O)(),I=(0,b.useRouter)(),[R,W]=(0,o.useState)(!1),G=(0,o.useRef)(null),L=(0,o.useRef)(null);function H(e){!(G.current&&G.current.contains(e.target))&&(L.current&&L.current.contains(e.target)||W(!1))}(0,o.useEffect)(()=>
123{if(R)return document.addEventListener("click",H,!0),()=>{document.removeEventListener("click",H,!0)}},[R]);let V=t||R;return V||B?(0,i.jsxs)(i.Fragment,{children:[x&&(0,i.jsxs)(_,{className:`${V?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"} transition-opacity duration-150`,onClick:e=>{e.stopPropagation();let t=r?.img_url||r?.image_url||r?.url||r?.src;t&&(localStorage.setItem("videoConfigFromHistory",JSON.stringify({firstImages:[t],source:"imageToolbar"})),I.push("/ai-video-generator"))},children:[(0,i.jsx)(f.ttn,{size:18}),(0,i.jsx)("span",{children:D("imageEditor.convertToVideo")})]}),R&&V&&(0,i.jsxs)(y,{ref:L,onClick:e=>{e.stopPropagation()},children:[(0,i.jsx)(C,{className:"gtm-download",onClick:e=>{e.stopPropagation(),n(r)},children:c?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.FM,{size:20,stroke:2,speed:2,color:"light"===O?"rgba(71, 85, 105)":"rgba(226, 232, 240)"}),(0,i.jsx)(v,{className:"ml-1",children:D("downloading")})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(k,{}),(0,i.jsx)(v,{children:D("download")})]})}),d&&(0,i.jsxs)(C,{className:"gtm-share",onClick:e=>{e.stopPropagation(),d()},children:[(0,i.jsx)(N,{}),(0,i.jsx)(v,{children:D("share")})]}),m&&(0,i.jsxs)(C,{onClick:e=>{e.stopPropagation(),m()},children:[(0,i.jsx)(Z,{}),(0,i.jsx)(v,{children:D("remove")})]})]}),(0,i.jsxs)(F,{className:`absolute bottom-0 left-0 w-full h-9 rounded-b-lg flex items-center justify-around transition-opacity duration-150 ${V?"opacity-100 pointer-events-auto":"opacity-0 pointer-events-none"}`,children:[j.filter(e=>M[e.id]).map(e=>{let t=e.icon;return(0,i.jsxs)(z,{children:[(0,i.jsx)(E,{onClick:async t=>{t.stopPropagation();let i={...r,src:r.img_url};if($)try{let e=await $(r);e&&(i={...e,img_url:e.url})}catch(e){console.error("onPrepareImage failed:",e);return}S({...i,src:i.img_url,id:i.id||i.img_url},e.id,p,u)},children:(0,i.jsx)(t,{size:"outpaint"===e.id?18:22})}),(0,i.jsx)(T,{className:"tooltip-text",children:D(e.label)})]},e.id)}),M.options&&(0,i.jsx)("div",{ref:G,className:"text-white cursor-pointer hover:opacity-85 flex items-center justify-center",onClick:e=>{e.stopPropagation(),W(!R)},children:(0,i.jsx)(g.evw,{size:30})})]})]}):null}},82265:function(e,t,r){var i=r(85893);r(67294);var o=r(83253),n=r.n(o),a=r(57363),s=r(14640),l=r(88303),c=r(26601),d=r(29356),m=r(25675),p=r.n(m);let g=(0,c.Z)(d.Fk5)` 124 color: ${e=>{let{theme:t}=e;return t.textColor1}}; 125`,u=c.Z.p` 126 color: ${e=>{let{theme:t}=e;return t.textColor5}}; 127`;t.Z=e=>{let{downloadFailureWarning:t,setDownloadFailureWarning:r,currentTheme:o,mediaKind:c="image"}=e,d=(0,s.useTranslations)();return(0,i.jsx)(n(),{isOpen:t,ariaHideApp:!1,style:null===o?a.vs:"light"===o?a.vs:a._l,children:(0,i.jsxs)("div",{className:"max-w-sm",children:[(0,i.jsx)("div",{className:"flex items-center justify-end",children:(0,i.jsx)(g,{className:"h-6 w-6 cursor-pointer",onClick:()=>r(!1)})}),(0,i.jsxs)("div",{className:"flex flex-col items-center text-center",children:[(0,i.jsx)(p(),{src:l.Z,alt:"GenapeLogo",className:"h-14 w-14"}),(0,i.jsx)(u,{className:"display-none lg:flex font-medium mt-2",children:d("video"===c?"PCVideoDownloadMsg":"PCImageDownloadMsg")}),(0,i.jsx)(u,{className:"flex lg:display-none font-medium mt-2",children:d("video"===c?"mobileVideoDownloadMsg":"mobileImageDownloadMsg")})]}),(0,i.jsx)("div",{className:"mt-6 flex items-center justify-center",children:(0,i.jsx)("button",{className:"w-full h-8 bg-gradient text-white text-center font-medium cursor-pointer border-none rounded shadow-lg hover:bg-gradient",onClick:()=>r(!1),children:d("ok")})})]})})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.