PageSourceSearch

https://yuanlinhaveawalk.com/_next/static/chunks/43184-edad2970ed7a5058.js

js yuanlinhaveawalk.com collected 2026-09-26 09:51:09 UTC 247,174 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[43184],{91976:(e,a,t)=>{t.d(a,{A:()=>i});let i={src:"/_next/static/media/Behance.d16c8766.svg",height:88,width:89,blurWidth:0,blurHeight:0}},12086:(e,a,t)=>{t.d(a,{A:()=>i});let i={src:"/_next/static/media/Dribble.ed745720.svg",height:88,width:89,blurWidth:0,blurHeight:0}},42689:(e,a,t)=>{t.d(a,{A:()=>i});let i={src:"/_next/static/media/Github.c6da39f1.svg",height:88,width:89,blurWidth:0,blurHeight:0}},55464:(e,a,t)=>{t.d(a,{A:()=>i});let i={src:"/_next/static/media/IG.4e2a79b1.svg",height:88,width:88,blurWidth:0,blurHeight:0}},47316:(e,a,t)=>{t.d(a,{A:()=>i});let i={src:"/_next/static/media/Thread.0f68ec48.svg",height:300,width:300,blurWidth:0,blurHeight:0}},80218:(e,a,t)=>{t.d(a,{A:()=>i});let i={src:"/_next/static/media/artstation.17d5b93a.png",height:88,width:88,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAJ1BMVEUWFhYWFhYXFxcXFxcXFBQVX34XGRoXDwwXIicUhrYWP1AVc5oVSmDXnoQQAAAAA3RSTlPV2tH7N/zSAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAN0lEQVR4nB3LMRLAIBDDQCfymQPy//dmQNU20kPsIIG7DYJ8M6CM2rtGRKrWbB/MWo3w7WyB8P4t4wFCCiiaTAAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8}},76296:(e,a,t)=>{t.d(a,{A:()=>i});let i={src:"/_next/static/media/buymeacoffee.fb30d878.png",height:88,width:88,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAARVBMVEX82wGzoznHrxTr7fr/5AD/3wD+4QD/3AD92wD+3ADmyAR5aRH11QHhwwRiVRmYhhqOeQenkg/UtwC+vL26q1OwnB3+/++QLvN/AAAACnRSTlP+////////1drRcfO2YgAAAAlwSFlzAAALEwAACxMBAJqcGAAAAD5JREFUeJwFwYkBgCAMBMEFLkH5FbX/Up3hUOsFZVxzjEuOel2rFsPaFZ+JYRa+FAR4SOkVuOLeUU4W943OH0tlAfadUXXnAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:8}},3450:(e,a,t)=>{t.d(a,{A:()=>i});let i={src:"/_next/static/media/calendly.3349fb4d.svg",height:72,width:72,blurWidth:0,blurHeight:0}},9440:(e,a,t)=>{t.d(a,{A:()=>i});let i={src:"/_next/static/media/figma.10f4831e.svg",height:88,width:88,blurWidth:0,blurHeight:0}},73465:(e,a,t)=>{t.d(a,{A:()=>i});let i={src:"/_next/static/media/gCalendar.f30e18a8.svg",height:96,width:96,blurWidth:0,blurHeight:0}},33948:(e,a,t)=>{t.d(a,{A:()=>i});let i={src:"/_next/static/media/gumroad.ea2304e7.png",height:88,width:88,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAATlBMVEX9/f3U19XEb7OFS3m+i7TofdTSzNHp7urz+PT////phdfh4uG+xMDLdb15VnHWcsPHgLnUfsXBx8KVV4t2RW1tPmNhOFmsYJtRLkrn6+jms6w/AAAACXRSTlPm/////////v4QMmJiAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAQUlEQVR4nBXLxxHAIBAEsAUusGRn91+px/oLoFvIBGhLVSrha15JhbByxxS3ACtneo/ekEWfPoeDVUoc7W857E58TL0COBgmscEAAAAASUVORK5CYII=",blurWidth:8,blurHeight:8}},72934:(e,a,t)=>{t.d(a,{A:()=>i});let i={src:"/_next/static/media/kofi.723d1aee.png",height:88,width:88,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAARVBMVEUmxv4UreKywMl9sMEWtvBCmbhepbslxP0oyf8fxP7/6uYouOwuo86Yqq9shpCAvM+Enqb/tLT9m5kzp9L9XGohvPT/tLqf+gviAAAACHRSTlP+////////1n2ZyiYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAA/SURBVHicHcs5EsAgDANA2dggQe7r/0/NJNVWi0aSYANvMxsilO6+paD6XHtdBlT70ecUcJa1TAKIiPhoxN9fSB4B5Vwf1aoAAAAASUVORK5CYII=",blurWidth:8,blurHeight:8}},56296:(e,a,t)=>{t.d(a,{A:()=>i});let i={src:"/_next/static/media/patreon.80165d3e.png",height:176,width:176,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAM1BMVEX////5+fnFxcVEREQDAwMAAADc3Nz///8YGBj09PR+fn5tbW2RkZEBAQG0tLQjIyMvLy/GMXhKAAAAAXRSTlPbUefTOgAAAAlwSFlzAAAWJQAAFiUBSVIk8AAAADpJREFUeJwVyFsSwCAIBMEFhQHzMPc/bcq/rpZofxMJ3/HMGzFizqhW18HgIOpKZF9UAmLFwkAy7xM/OnEBlCn8fhIAAAAASUVORK5CYII=",blurWidth:8,blurHeight:8}},17830:(e,a,t)=>{t.d(a,{A:()=>i});let i={src:"/_next/static/media/webtoon.371e457f.svg",height:88,width:89,blurWidth:0,blurHeight:0}},44698:(e,a,t)=>{t.d(a,{A:()=>i});let i={src:"/_next/static/media/taiwanBeats.42fafb0a.png",height:634,width:1267,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAECAMAAACEE47CAAAACVBMVEUmHhpbTEk/NjPcuvp1AAAAA3RSTlP//v6U1OMbAAAACXBIWXMAABcRAAAXEQHKJvM/AAAAFUlEQVR4nGNgwAqYmJiYwAxGRkZGAACKAA3+IGKqAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:4}},5560:(e,a,t)=>{t.d(a,{A:()=>i});let i={src:"/_next/static/media/yourator.ddd5022c.png",height:608,width:608,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAVFBMVEX8/fzn7/vIyMihq7js7/HUwfjEw8X09/bi4uLk5uve0Pfj1/y3xdW/0PfU2NrPzvrd3/ry9u/L1Nvb3+rWtvh7j7SstsTGwvvM2/+To7LZ3eHGz9jqsa0HAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAQElEQVR4nAXBhQHAMAzAMBeTlMb8/5+TgLiIAfNUSk3d4Wra03ULsomZmNCOkHN4Bq2fMQanDLyq52WNWdXb9wNQWAJMNrOJPwAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8}},92892:(e,a,t)=>{t.d(a,{A:()=>u});var i=t(2445),l=t(27006),d=t(96540),n=t(38869),o=t(6442);let s=(e,a)=>"string"==typeof e?e:"string"==typeof a||"number"==typeof a?String(a):"",r=(0,d.forwardRef)((e,a)=>{let{children:t,text:d,trackerName:r,scrollable:m,buttonType:u,buttonName:c,buttonProps:g,variant:f,...p}=e,M=!t&&!d,b=(0,o.A)(),{onCopy:h}=(0,l.useClipboard)(s(d,t)),v=(0,l.useToast)();return(0,i.Y)(l.HStack,{ref:a,cursor:"pointer",onClick:()=>
1{h(),v({description:b.formatMessage({defaultMessage:"已複製",id:"admin.shared.copiableText.已複製"}),status:"success",duration:2e3,isClosable:!0})},...p,children:u?(0,i.Y)(l.Button,{size:"sm",variant:null!=f?f:"solid",isDisabled:M,...g,children:null!=c?c:b.formatMessage({defaultMessage:"複製",id:"admin.shared.copiableText.複製"})}):(0,i.FD)(i.FK,{children:[(0,i.Y)(l.Box,{flex:"1",whiteSpace:m?"nowrap":void 0,pos:"relative",overflowX:"auto",overflowY:"hidden",py:m?2.5:void 0,onClick:()=>{r&&window.gtag&&window.gtag("event","click_button",{button_name:"".concat(r,".link")})},children:m?(0,i.Y)(l.Box,{pos:"absolute",top:"0",bottom:"0",children:t}):t}),(0,i.Y)(l.IconButton,{"aria-label":b.formatMessage({defaultMessage:"複製",id:"admin.shared.copiableText.複製"}),onClick:()=>{r&&window.gtag&&window.gtag("event","click_button",{button_name:r})},variant:"ghost",color:"gray.700",p:"0.25em",icon:(0,i.Y)(n.nxz,{size:"1.375em"}),width:"1.5rem",minWidth:"none",height:"1.5rem",isDisabled:M,...g})]})})});r.displayName="CopiableText";let m=Object.assign(r,{Right:(0,d.forwardRef)((e,a)=>(0,i.Y)(r,{justifyContent:"flex-end",ref:a,...e})),Mono:(0,d.forwardRef)((e,a)=>(0,i.Y)(r,{fontFamily:"mono",ref:a,...e}))});m.Right.displayName="CopiableText.Right",m.Mono.displayName="CopiableText.Mono";let u=m},25427:(e,a,t)=>{t.d(a,{A:()=>d});var i=t(2445),l=t(27006);t(96540);let d=e=>{let{children:a,isOnBoarding:t,...d}=e;return(0,i.Y)(l.Box,{display:"flex",sx:{">*:not(style)~*:not(style,.chakra-collapse)":{paddingTop:t?"20px":4},">*:not(style)~.chakra-collapse > *:first-child ":{paddingTop:t?"20px":4}},flexDirection:"column",py:"2",...d,children:a})}},16108:(e,a,t)=>{t.d(a,{A:()=>d});var i=t(2445),l=t(27006);let d=e=>{let{months:a,size:t="sm"}=e;return!a||a<=0?null:(0,i.Y)(l.Tooltip,{label:"本商品為遞延性商品,\n將分 ".concat(a," 個月每月撥款入帳。"),hasArrow:!0,placement:"top",bg:"gray.700",color:"white",whiteSpace:"pre-line",sx:{"--popper-arrow-bg":"var(--chakra-colors-gray-700)"},children:(0,i.FD)(l.Badge,{colorScheme:"orange",variant:"subtle",fontSize:"sm"===t?"0.7em":"0.8em",cursor:"help",children:["遞延 ",a," 個月"]})})}},83893:(e,a,t)=>{t.d(a,{A:()=>m});var i=t(2445),l=t(27006),d=t(38869),n=t(96540),o=t(11335),s=t(7817),r=t(16108);let m=e=>{let{profileId:a,productId:t,productName:m,productHref:u,currentMonths:c,onChanged:g,triggerLabel:f}=e,p=(0,s.A)(),M=(0,o.A)(),b=(0,l.useToast)(),{isOpen:h,onOpen:v,onClose:y}=(0,l.useDisclosure)(),[A,w]=(0,n.useState)(Number(c)||0),[k,x]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{h&&w(Number(c)||0)},[h,c]),!(null==p?void 0:p.isSuperAdmin))return(0,i.Y)(r.A,{months:c});let T=async()=>{if(1===A){b({status:"warning",title:"遞延月數需設定為 2 個月以上",description:"1 月與未遞延無差異;設 0 可取消遞延。",duration:3e3,isClosable:!0});return}x(!0);try{var e;let i=await M("/api/super/products/deferred-months",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({profileId:a,productId:t,deferredMonths:A>0?A:null})});null==g||g(null!==(e=null==i?void 0:i.deferredMonths)&&void 0!==e?e:null),b({status:"success",title:"已更新遞延設定",duration:2e3,isClosable:!0}),y()}catch(a){let e=a instanceof Error?a.message:String(a);try{let a=JSON.parse(e);e=(null==a?void 0:a.message)||(null==a?void 0:a.error)||e}catch(e){}b({status:"error",title:"更新失敗",description:e,duration:4e3,isClosable:!0})}finally{x(!1)}},E=!!(c&&c>0),I=E?"已標記遞延 ".concat(c," 月,點擊編輯"):f||"標記為遞延性商品";return(0,i.FD)(i.FK,{children:[(0,i.Y)(l.Tooltip,{label:I,hasArrow:!0,children:E?(0,i.FD)(l.Button,{size:"xs",variant:"solid",colorScheme:"orange",onClick:v,px:"2",children:[c,"月"]}):(0,i.Y)(l.IconButton,{"aria-label":"標記為遞延性商品",icon:(0,i.Y)(d.Ohp,{}),size:"xs",variant:"outline",colorScheme:"orange",onClick:v})}),(0,i.FD)(l.Modal,{isOpen:h,onClose:y,isCentered:!0,children:[(0,i.Y)(l.ModalOverlay,{}),(0,i.FD)(l.ModalContent,{children:[(0,i.Y)(l.ModalHeader,{children:"遞延性商品設定"}),(0,i.Y)(l.ModalCloseButton,{}),(0,i.FD)(l.ModalBody,{children:[(0,i.FD)(l.Box,{mb:"4",p:"3",bg:"orange.50",borderWidth:"1px",borderColor:"orange.200",borderRadius:"md",children:[(0,i.Y)(l.Text,{fontSize:"xs",color:"gray.600",mb:"1",children:"標記對象(商品)"}),u?(0,i.FD)(l.Link,{href:u,isExternal:!0,fontWeight:"semibold",fontSize:"sm",color:"orange.700",wordBreak:"break-all",display:"inline-flex",alignItems:"center",gap:"1",children:[m||"(無名稱) ".concat(t),(0,i.Y)(d.HaR,{})]}):(0,i.Y)(l.Text,{fontWeight:"semibold",fontSize:"sm",wordBreak:"break-all",children:m||"(無名稱) ".concat(t)}),(0,i.Y)(l.Text,{fontSize:"xs",color:"gray.500",mt:"1",children:"此設定會影響該商品的「所有訂單」,不只當下這筆。"})]}),(0,i.Y)(l.Text,{fontSize:"sm",color:"gray.600",mb:"4",children:"月數需 2 以上;設 0 取消遞延。"}),(0,i.FD)(l.HStack,{children:[(0,i.Y)(l.Text,{fontSize:"sm",children:"遞延月數:"}),(0,i.FD)(l.NumberInput,{value:A,min:0,max:60,onChange:(e,a)=>w(Number.isNaN(a)?0:a),size:"sm",maxW:"6em",children:[(0,i.Y)(l.NumberInputField,{}),(0,i.FD)(l.NumberInputStepper,{children:[(0,i.Y)(l.NumberIncrementStepper,{}),(0,i.Y)(l.NumberDecrementStepper,{})]})]})]})]}),(0,i.Y)(l.ModalFooter,{children:(0,i.FD)(l.HStack,{justify:"flex-end",children:[(0,i.Y)(l.Button,{size:"sm",variant:"ghost",onClick:y,children:"取消"}),(0,i.Y)(l.Button,{size:"sm",colorScheme:"orange",isLoading:k,onClick:T,children:"儲存"})]})})]})]})]})}},81688:(e,a,t)=>{t.d(a,{A:()=>p});var i=t(2445),l=t(27006),d=t(96540),n=t(33877),o=t(6442),s=t(51216),r=t(44995),m=t(84316),u=t(29582);let c=(e,a,t)=>{let i=e.includes("?")?"&":"?";
1return"".concat(e).concat(i).concat(a,"=").concat(t)},g=r.A,f=(0,l.forwardRef)((e,a)=>{let{size:t,height:d,src:n,disableVerticalScroll:o=!1,onLoad:r,isLoading:m}=e,[u,{width:c}]=(0,s.A)(),g=c&&c/t;return(0,i.FD)(l.Box,{pos:"relative",ref:u,children:[m&&(0,i.Y)(l.Center,{pos:"absolute",top:"0",right:"0",left:"0",bottom:"0",children:(0,i.Y)(l.Spinner,{})}),(0,i.Y)(l.Box,{my:"8",h:{md:g<1?"".concat(d*g,"px"):void 0},children:(0,i.Y)(l.AspectRatio,{ratio:t/d,width:{base:"90vw",md:"".concat(t,"px")},mx:"auto",transformOrigin:"top left",transform:{md:g<1?"scale(".concat(g,")"):void 0},children:(0,i.Y)("iframe",{src:n,scrolling:o?"no":void 0,style:{border:"none",overflowY:o?"hidden":void 0},onLoad:r,ref:a})})})]})}),p=e=>{let{isOpen:a,onClose:t,embedUrl:s,title:r,label:p,noModal:M,isDisabled:b}=e,h=(0,o.A)(),v="en"===h.locale,y=(0,u.b)(h,"product-comment"),[A]=(0,d.useState)(y[0]),[w,k]=(0,d.useState)("vertical"),[x,T]=(0,d.useState)(!0),[E,I]=(0,d.useState)(A.height),[F,S]=(0,d.useState)(0),C=(0,d.useRef)(null);(0,l.useUpdateEffect)(()=>{b||(T(!0),S(e=>e+1))},[b]);let Y=c(s,"layout",w),D=(0,m.A)("embed/".concat(Y)),P=c(D,"previewRefresh",String(F)),V="horizontal"===w?A.height:E,B='<iframe src="'.concat(D,'" width="').concat(A.size,'" height="').concat(V,'" style="border:0;" frameborder="0" loading="lazy"').concat("horizontal"===w?' scrolling="no"':"","></iframe>"),{onCopy:O,hasCopied:L,setValue:R}=(0,l.useClipboard)(B);(0,l.useUpdateEffect)(()=>{R(B)},[B]),(0,l.useUpdateEffect)(()=>{T(!0),I(A.height),S(e=>e+1)},[w,A.height]);let N=()=>{var e,a;let t=null===(a=C.current)||void 0===a?void 0:null===(e=a.contentWindow)||void 0===e?void 0:e.document.querySelector(".chakra-stack");if(!t)return;let i=t.scrollHeight+8;if("horizontal"===w)return;let l=Math.max(i,A.height);l!==E&&I(l)},U=(0,i.FD)(l.Flex,{justifyContent:"center",flexDirection:"column",children:[v?"Paste this code to your website to embed the block.":(0,i.FD)(l.Text,{children:["在您的「外部網站」或「部落格」貼上此段程式碼,即可將您的【",p,"】嵌入此網頁。"]}),(0,i.FD)(l.ButtonGroup,{mt:"5",w:"full",size:"md",children:[(0,i.Y)(l.Input,{isReadOnly:!0,value:B,flex:"1"}),(0,i.Y)(l.Button,{onClick:O,w:"7em",children:L?h.formatMessage({id:"admin.embed.已複製",defaultMessage:"已複製"}):h.formatMessage({id:"admin.embed.複製HTML",defaultMessage:"複製HTML"})})]}),(0,i.FD)(l.FormControl,{mt:"5",children:[(0,i.Y)(l.FormLabel,{fontSize:"sm",mb:"2",children:h.formatMessage({id:"admin.embed.評論顯示樣式",defaultMessage:"評論顯示樣式"})}),(0,i.Y)(l.RadioGroup,{value:w,onChange:e=>k(e),children:(0,i.FD)(l.HStack,{spacing:6,children:[(0,i.Y)(l.Radio,{value:"vertical",children:h.formatMessage({id:"admin.embed.垂直",defaultMessage:"垂直"})}),(0,i.Y)(l.Radio,{value:"horizontal",children:h.formatMessage({id:"admin.embed.水平",defaultMessage:"水平"})})]})})]}),(0,i.Y)(l.Flex,{justifyContent:"flex-end",mt:"4",children:(0,i.Y)(l.Button,{size:"sm",variant:"outline",leftIcon:(0,i.Y)(n.joZ,{}),onClick:()=>{b||(T(!0),S(e=>e+1))},isDisabled:b,isLoading:!b&&x,children:h.formatMessage({id:"admin.embed.重新整理預覽",defaultMessage:"重新整理預覽"})})}),(0,i.Y)(f,{size:A.size,height:V,src:b?"":P,ref:C,onLoad:()=>{T(!1),N()},disableVerticalScroll:"horizontal"===w,isLoading:!b&&x},F),(0,i.FD)(l.Text,{children:[h.formatMessage({id:"admin.embed.嵌入此頁面,即表示您同意",defaultMessage:"嵌入此頁面,即表示您同意"}),(0,i.Y)(g,{href:"/terms",isExternal:!0,textDecoration:"underline",children:h.formatMessage({id:"admin.embed.服務條款",defaultMessage:"服務條款"})}),"。"]})]});return M?U:(0,i.FD)(l.Modal,{blockScrollOnMount:!1,isOpen:a,onClose:t,size:"5xl",children:[(0,i.Y)(l.ModalOverlay,{}),(0,i.FD)(l.ModalContent,{py:"6",children:[(0,i.Y)(l.ModalHeader,{children:r}),(0,i.Y)(l.ModalCloseButton,{onClick:()=>{T(!0)}}),(0,i.Y)(l.ModalBody,{children:U})]})]})}},23505:(e,a,t)=>{t.d(a,{A:()=>c});var i=t(2445),l=t(27006),d=t(96540),n=t(6442),o=t(51216),s=t(44995),r=t(84316),m=t(29582);let u=(0,l.forwardRef)((e,a)=>{let{size:t,height:d,src:n,onLoad:s,isLoading:r}=e,[m,{width:u}]=(0,o.A)(),c=u&&u/t;return(0,i.FD)(l.Box,{pos:"relative",ref:m,children:[r&&(0,i.Y)(l.Center,{pos:"absolute",top:"0",right:"0",left:"0",bottom:"0",children:(0,i.Y)(l.Spinner,{})}),(0,i.Y)(l.Box,{my:"8",h:{md:c<1&&"".concat(d*c,"px")}
1,children:(0,i.Y)(l.AspectRatio,{ratio:t/d,width:{base:"90vw",md:"".concat(t,"px")},mx:"auto",transformOrigin:"top left",transform:{md:c<1&&"scale(".concat(c,")")},children:(0,i.Y)("iframe",{src:n,border:"none",onLoad:s,ref:a})})})]})}),c=e=>{let{isOpen:a,onClose:t,isEmpty:o,title:c,label:g,emptyMessage:f,embedUrl:p,content:M,noModal:b,autoHeight:h,type:v,isDisabled:y}=e,A=(0,n.A)(),w="en"===A.locale,k=(0,m.b)(A,v),[x]=(0,d.useState)(k[0]),[T,E]=(0,d.useState)(!0),[I,F]=(0,d.useState)(x.height),[S,C]=(0,d.useState)(0);(0,l.useUpdateEffect)(()=>{y||C(e=>e+1)},[y]);let Y=(0,r.A)("embed/".concat(p)),D='<iframe src="'.concat(Y,'" width="').concat(x.size,'" height="').concat(I,'" style="border:0;" frameborder="0" loading="lazy"></iframe>'),P=(0,d.useRef)(),{onCopy:V,hasCopied:B,setValue:O}=(0,l.useClipboard)(D);(0,l.useUpdateEffect)(()=>{O(D)},[D]);let L=()=>{if(P.current){var e;let a=null===(e=P.current)||void 0===e?void 0:e.contentWindow.document.querySelector(".chakra-stack");if(!a)return;let t=a.scrollHeight+8;t!==I&&F(t)}},R=(0,i.FD)(l.Flex,{justifyContent:"center",flexDirection:"column",children:[null!=M?M:w?"Paste this code to your website to embed the block.":(0,i.FD)(l.Text,{children:["在您的「外部網站」或「部落格」貼上此段程式碼,即可將您的【",g,"】嵌入此網頁。"]}),(0,i.FD)(l.ButtonGroup,{mt:"5",w:"full",size:"md",children:[(0,i.Y)(l.Input,{isReadOnly:!0,value:D,flex:"1"}),(0,i.Y)(l.Button,{onClick:V,w:"7em",children:B?A.formatMessage({id:"admin.embed.已複製",defaultMessage:"已複製"}):A.formatMessage({id:"admin.embed.複製HTML",defaultMessage:"複製HTML"})})]}),o?(0,i.Y)(l.Text,{textAlign:"center",mt:"3em",children:f}):(0,i.FD)(i.FK,{children:[(0,i.Y)(u,{size:x.size,height:I,src:y?"":Y,ref:P,onLoad:()=>{E(!1),h&&L()},isLoading:!y&&T},S),(0,i.FD)(l.Text,{children:[A.formatMessage({id:"admin.embed.嵌入此頁面,即表示您同意",defaultMessage:"嵌入此頁面,即表示您同意"}),(0,i.Y)(s.A,{href:"/terms",isExternal:!0,textDecoration:"underline",children:A.formatMessage({id:"admin.embed.服務條款",defaultMessage:"服務條款"})}),"。"]})]})]});return b?R:(0,i.Y)(i.FK,{children:(0,i.FD)(l.Modal,{blockScrollOnMount:!1,isOpen:a,onClose:t,size:"5xl",isCentered:!!o,children:[(0,i.Y)(l.ModalOverlay,{}),(0,i.FD)(l.ModalContent,{py:"6",h:o&&"50vh",children:[(0,i.Y)(l.ModalHeader,{children:c}),(0,i.Y)(l.ModalCloseButton,{onClick:()=>{E(!0)}}),(0,i.Y)(l.ModalBody,{children:R})]})]})})}},67585:(e,a,t)=>{t.d(a,{A:()=>n,Y:()=>d});var i=t(2445),l=t(27006);t(96540);let d="1.375rem",n=e=>{let{icon:a,title:t,...n}=e;return(0,i.Y)(l.Box,{pt:"2",...n,children:(0,i.Y)(l.Tooltip,{label:t,borderRadius:"xl",bg:"GUI.gray.600",children:(0,i.Y)("span",{children:(0,i.Y)(l.Icon,{width:d,height:d,color:"GUI.gray.300",as:a})})})})}},4756:(e,a,t)=>{t.d(a,{A:()=>g});var i=t(2445),l=t(96540),d=t(49785),n=t(6442),o=t(478),s=t(14120),r=t(26919),m=t(27965);let u=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return a?"".concat(a,".").concat(e):e},c=(e,a,t)=>e?Array.isArray(e[0])?e.map(e=>a(null==e?void 0:e[0])?[t(e[0]),...e.slice(1)]:e):a(null==e?void 0:e[0])?[t(e[0]),...e.slice(1)]:e:null,g=e=>{let{getFields:a,renderFields:t,fieldKeyPrefix:g=null}=e,f=(0,n.A)(),p="en"===f.locale,M=a(f,p),{uid:b,links:h,membershipTier:v}=(0,l.useContext)(s.A),{block:y}=(0,l.useContext)(o.A),{getValues:A,resetField:w}=(0,d.xW)(),{fields:k,defaultValues:x}=(0,m.A)({data:g?y[g]||{}:y,fields:M,slug:b,links:h,tier:v}),T=JSON.stringify(k.map(e=>({name:e.name,type:e.type,defaultValue:e.defaultValue}))),E=new Set([...M.map(e=>e.name)]),I=(0,l.useMemo)(()=>k.map(e=>({...e,name:u(e.name,g),when:c(e.when,e=>E.has(e),e=>u(e,g))})),[g,T]);(0,l.useEffect)(()=>{Object.entries(x).forEach(e=>{let[a,t]=e,i=u(a,g);void 0===A(i)&&w(i,{defaultValue:t})})},[]);let{addSubFields:F,clearSubFields:S}=(0,l.useContext)(r.A);return(0,l.useEffect)(()=>(F(I),()=>{S()}),[F,S,I]),(0,i.Y)(i.FK,{children:I.map(e=>t(e))})}},25327:(e,a,t)=>{t.d(a,{A:()=>u});var i=t(2445),l=t(27006),d=t(96540),n=t(49785),o=t(6442),s=t(92892),r=t(14120),m=t(60792);let u=()=>{let e=(0,o.A)(),{profileId:a}=(0,d.useContext)(r.A),{getValues:t}=(0,n.xW)(),u=t("id"),{isActive:c,data:g}=(0,m.A)(a,u),f=c&&(null==g?void 0:g.meetLink)?g.meetLink:"";return f?(0,i.FD)(l.HStack,{spacing:0,children:[(0,i.Y)(l.Text,{color:"gray.500",fontSize:"sm",children:e.formatMessage({defaultMessage:"會議連結:{meetLink}",id:"admin.liveProduct.會議連結:{meetLink}"},{meetLink:f})}),(0,i.Y)(s.A,{text:f})]}):null}},54346:(e,a,t)=>{t.d(a,{gM:()=>r,qB:()=>c,qo:()=>s,t_:()=>g});var i=t(2445),l=t(96540),d=t(49785),n=t(46479),o=t(8519);let s="form_saved_successfully",r=(0,l.createContext)({isSaved:!0,setIsSaved:()=>{},blockId:"",isSaving:!1}),m=e=>"portaly:formTabs-isSaved-".concat(e),u=e=>"portaly:formTabs-loading-".concat(e),c=e=>{let{children:a,isOpen:t,blockId:c}=e,g=m(c),f=u(c),{formState:p}=(0,d.xW)(),[M,b]=(0,l.useState)(()=>
1{if(t){var e;return"true"===(null===(e=(0,o.A)("session"))||void 0===e?void 0:e.getItem(g))}return!0}),[h,v]=(0,l.useState)(()=>{if(t){var e;return"true"===(null===(e=(0,o.A)("session"))||void 0===e?void 0:e.getItem(f))}return!1});(0,n.M)(s,()=>{b(!0)}),(0,l.useEffect)(()=>{p.isSubmitting?v(!0):M&&v(!1)},[p.isSubmitting,M]);let y=Object.keys(p.dirtyFields).length;return(0,l.useEffect)(()=>{y>0&&b(!1)},[y]),(0,l.useEffect)(()=>{t&&(0,o.F)(g,M.toString(),"session")},[M,t]),(0,l.useEffect)(()=>{t&&(0,o.F)(f,h.toString(),"session")},[h,t]),(0,l.useEffect)(()=>{if(!t){var e,a;null===(e=(0,o.A)("session"))||void 0===e||e.removeItem(g),null===(a=(0,o.A)("session"))||void 0===a||a.removeItem(f)}},[t]),(0,i.Y)(r.Provider,{value:{isSaved:M,setIsSaved:b,blockId:c,isSaving:h},children:a})},g=e=>{let{children:a}=e;return(0,i.Y)(r.Consumer,{children:e=>{let{isSaved:t}=e;return(0,l.cloneElement)(a,{isDisabled:!t})}})}},99006:(e,a,t)=>{t.d(a,{A:()=>d});var i=t(2445),l=t(8548);let d=e=>{let{href:a,buttonName:t,icon:d,isExternal:n=!0,...o}=e;return(0,i.Y)(l.A,{href:a,variant:"outline",colorScheme:"green",size:"sm",borderRadius:"md",leftIcon:d,isExternal:n,...o,children:t})}},19723:(e,a,t)=>{t.d(a,{A:()=>r});var i=t(2445),l=t(27006),d=t(8548),n=t(44995),o=t(75160);let s=(0,l.forwardRef)((e,a)=>{let{href:t,isExternal:l,trackerName:s,onClick:r,...m}=e,u=(0,o.A)(s),c=async e=>{r&&await r(e),u()};return t&&!m.isDisabled?(0,i.Y)(d.A,{ref:a,href:t,as:n.A,isExternal:l,onClick:c,...m}):(0,i.Y)(d.A,{onClick:c,...m,ref:a})}),r=(0,l.forwardRef)((e,a)=>{let{href:t,isExternal:l,trackerName:d,onClick:n,...o}=e;return(0,i.Y)(s,{w:"full",mt:"4",borderRadius:"3xl",bg:"transparent",color:"GUI.purple.500",borderColor:"GUI.purple.500",textTransform:"capitalize",href:t,_hover:{bg:"GUI.purple.500",color:"white"},_active:{bg:"GUI.purple.500",color:"white"},onClick:n,ref:a,isExternal:l,...o,children:o.children})})},50999:(e,a,t)=>{t.d(a,{A:()=>n});var i=t(2445),l=t(27006);t(96540);var d=t(99006);let n=e=>{let{title:a,children:t,button:n,href:o,icon:s}=e;return(0,i.FD)(l.HStack,{justifyContent:"space-between",alignItems:"start",children:[(0,i.FD)(l.Stack,{spacing:3,children:[(0,i.Y)(l.Heading,{as:"h4",size:"sm",children:a}),(0,i.Y)(l.Text,{fontSize:"sm",children:t})]}),n&&(0,i.Y)(d.A,{href:o,buttonName:n,icon:s})]})}},62129:(e,a,t)=>{t.d(a,{A:()=>r});var i=t(2445),l=t(27006),d=t(33877),n=t(6442),o=t(63959),s=t(23505);let r=e=>{let{profileId:a,projectId:t,title:r,label:m,noModal:u,autoHeight:c,getEmbedUrl:g=null,children:f=null,type:p="mailing-list",isDisabled:M}=e,b=(0,n.A)(),h=(0,o.A)(a),{isOpen:v,onClose:y,onOpen:A}=(0,l.useDisclosure)();return(0,i.FD)(i.FK,{children:[u||"function"!=typeof f?!u&&(0,i.Y)(l.Button,{onClick:A,size:"sm",variant:"outline",leftIcon:(0,i.Y)(d.RZ7,{}),children:b.formatMessage({defaultMessage:"設定",id:"admin.account.2fa.設定"})}):f({onClick:A}),(0,i.Y)(s.A,{isOpen:v,onClose:y,embedUrl:"function"==typeof g?g(h,t):"block/".concat(h,"/").concat(t),title:null!=r?r:b.formatMessage({id:"admin.embed.嵌入 E-mail 蒐集區塊",defaultMessage:"嵌入 E-mail 蒐集區塊"}),label:null!=m?m:b.formatMessage({id:"admin.embed.E-mail 蒐集區塊",defaultMessage:"E-mail 蒐集區塊"}),noModal:u,autoHeight:c,type:p,isDisabled:M})]})}},28811:(e,a,t)=>{t.d(a,{A:()=>n});var i=t(22405),l=t(77666),d=t(7817);let n=()=>{let e=(0,d.A)(),a=(0,l.A)();return async function(t,l){let d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"read",n=(0,i.doc)(a,"users",e.uid);try{await (0,i.setDoc)(n,{[d]:{[t]:l}},{merge:!0})}catch(e){console.error(e)}}}},76845:(e,a,t)=>{t.d(a,{A:()=>eI});var i=t(2445),l=t(27006),d=t(57004),n=t(72209),o=t(26923),s=t(77037),r=t(11583),m=t(89571),u=t(94650),c=t(33877),g=t(84961),f=t(22828),p=t(58065),M=t(58156),b=t.n(M),h=t(96540),v=t(49785),y=t(33644),A=t(98523),w=t(25427),k=t(4756),x=t(10582),T=t(53578),E=t(59324),I=t(14120),F=t(84757),S=t(60792),C=t(21158),Y=t(86913),D=t(77381),P=t(6442),V=t(78846),B=t(19723);let O=e=>{let{isLoading:a=!0,withActionConfirm:t=!1,deletedAt:d="",onClick:n=()=>{}}=e,o=(0,P.A)(),s=d?(0,D.A)((0,x.A)(d),"yyyy/MM/dd hh:mm"):null;return(0,i.FD)(l.VStack,{width:"100%",spacing:2,alignItems:"stretch",children:[t?(0,i.Y)(V.A,{CustomComponent:B.A,mt:0,title:o.formatMessage({defaultMessage:"確認建立?",id:"admin.liveProduct.確認建立?"}),body:o.formatMessage({defaultMessage:"將內容建立至您的 Google 行事曆,並發信通知購買者。",id:"admin.liveProduct.將內容建立至您的 Google 行事曆,並發信通知購買者。"}),isLoading:a,onClick:n,children:o.formatMessage({defaultMessage:"建立行事曆",id:"admin.liveProduct.建立行事曆"})}):(0,i.Y)(B.A,{mt:0,isLoading:a,onClick:n,children:o.formatMessage({defaultMessage:"建立行事曆",id:"admin.liveProduct.建立行事曆"})}),s?(0,i.Y)(l.Text,{color:"gray.500",fontSize:"sm",children:o.formatMessage({defaultMessage:"上次刪除時間:{displayDeletedAt}",id:"admin.liveProduct.上次刪除時間:{displayDeletedAt}"},{displayDeletedAt:s})}):(0,i.Y)(i.FK,{children:(0,i.FD)(l.Text,{color:"gray.500",fontSize:"sm",dis
1play:"flex",alignItems:"center",children:[(0,i.Y)(l.Icon,{as:c.ItP,mr:1,color:"red.500"}),(0,i.Y)(l.Text,{as:"span",children:o.formatMessage({defaultMessage:"提醒:你的行事曆尚未建立",id:"admin.liveProduct.提醒:你的行事曆尚未建立"})})]})})]})};var L=t(8548);let R=e=>{let{eventMetaData:a,isLoading:t=!1,isSync:d=!1,showSyncMessage:n=!1,onUpdateButtonClick:o=()=>{},onDeleteButtonClick:r=()=>{}}=e,m=(0,P.A)(),u=a.updatedAt&&n?(0,D.A)((0,x.A)(a.updatedAt),"yyyy/MM/dd hh:mm"):null;return(0,i.FD)(l.VStack,{width:"100%",spacing:2,alignItems:"stretch",children:[(0,i.FD)(l.HStack,{children:[(0,i.Y)(V.A,{CustomComponent:B.A,mt:0,leftIcon:(0,i.Y)(c.Yvo,{}),title:m.formatMessage({defaultMessage:"確認更新?",id:"admin.liveProduct.確認更新?"}),body:m.formatMessage({defaultMessage:"將內容同步至您的 Google 行事曆。",id:"admin.liveProduct.將內容同步至您的 Google 行事曆。"}),isLoading:t,onClick:o,children:m.formatMessage({defaultMessage:"更新行事曆",id:"admin.liveProduct.更新行事曆"})}),(0,i.Y)(L.A,{variant:"link",color:"GUI.purple.500",_hover:{textDecoration:"underline !important"},_focus:{textDecoration:"underline !important"},isExternal:!0,href:a.eventHtmlLink,children:m.formatMessage({defaultMessage:"預覽",id:"admin.liveProduct.預覽"})}),(0,i.Y)(V.A,{title:m.formatMessage({defaultMessage:"確認刪除?",id:"admin.liveProduct.確認刪除?"}),body:m.formatMessage({defaultMessage:"刪除此行事曆,並發信通知購買者。",id:"admin.liveProduct.刪除此 Google 行事曆,並發信通知購買者。"}),variant:"link",colorScheme:"gray",fontWeight:"400",isLoading:t,onClick:r,children:m.formatMessage({defaultMessage:"刪除",id:"admin.liveProduct.刪除"})})]}),u&&(0,i.Y)(l.Text,{color:"gray.500",fontSize:"sm",display:"flex",alignItems:"center",children:d?(0,i.FD)(i.FK,{children:[(0,i.Y)(l.Icon,{as:s.A7C,mr:1,color:"GUI.green.500"}),(0,i.Y)(l.Text,{as:"span",children:m.formatMessage({defaultMessage:"內容已更新,上次更新時間:{displayUpdatedAt}",id:"admin.liveProduct.內容已更新,上次更新時間:{displayUpdatedAt}"},{displayUpdatedAt:u})})]}):(0,i.FD)(i.FK,{children:[(0,i.Y)(l.Icon,{as:c._Jm,mr:1,color:"red.500"}),(0,i.Y)(l.Text,{as:"span",children:m.formatMessage({defaultMessage:"內容未更新,上次更新時間:{displayUpdatedAt}",id:"admin.liveProduct.內容未更新,上次更新時間:{displayUpdatedAt}"},{displayUpdatedAt:u})})]})})]})},N=e=>e?e.replace(/\>[\r\n ]+\</g,"><").replace(/(<br\s*\/?>)/g,"<br>").replace(/(<.*?>)|\s+/g,(e,a)=>a||" ").trim():"",U=e=>{let{providerName:a,getPrefixedFieldKey:t,editingDataUpdatedAt:l=null,onFieldsValidate:d=async()=>{},onEventCreated:n=e=>{},onEventUpdated:o=e=>{}}=e,{profileId:s}=(0,h.useContext)(I.A),{getValues:r,setValue:m}=(0,v.xW)(),u=(0,h.useCallback)(()=>{let e="custom"===r(t("descriptionMode"))?t("description"):"thanks.content";return{title:r(t("title")),description:N(r(e)),startDateTime:r(t("dateTimeRange")).startTime,startTimeZone:r(t("startTimeZone")),endDateTime:r(t("dateTimeRange")).endTime,endTimeZone:r(t("endTimeZone")),enableGoogleMeet:r(t("enableGoogleMeet"))||!1}},[t,r]),{isReady:c,getEvent:g,createEvent:f,patchEvent:p,deleteEvent:M}=(0,F.A)(s,a),b=r("id"),{isSet:y,isActive:A,data:w,createEvent:k,patchEvent:D,deleteEvent:P}=(0,S.A)(s,b),{data:V,isLoading:B,error:L,mutate:U}=(0,E.Ay)(c&&y?"/profiles/".concat(s,"/calendars/primary/events/").concat(w.eventId):null,async()=>g(w.eventId),{revalidateIfStale:!1,revalidateOnMount:!0,refreshInterval:2e4});(0,h.useEffect)(()=>{if(!V)return;let{eventId:e,eventHtmlLink:a,meetLink:t}=V;D({eventId:e,eventHtmlLink:a,meetLink:t}).catch(e=>console.error(e))},[V]),(0,h.useEffect)(()=>{if((null==L?void 0:L.status)===404){let e=(null==L?void 0:L.data)||{};P(e.updatedAt||new Date().toISOString(),e).catch(e=>console.error(e))}},[L]);let{data:_,isLoading:G}=(0,C.Ay)("/getOrders?profileId=".concat(s,"&projectId=product&productId=").concat(b,"&status=paid")),W=(0,h.useMemo)(()=>(null==_?void 0:_.data)?_.data.map(e=>({email:e.email})):[],[null==_?void 0:_.data]),[z,H]=(0,h.useState)(!1),q=(0,h.useMemo)(()=>
1{if(!V)return!1;let{title:e,description:a,enableGoogleMeet:t,startDateTime:i,startTimeZone:l,endDateTime:d,endTimeZone:n}=u(),{title:o,description:s,meetLink:r,start:m,end:c}=V||{};return e===(o||"")&&(0,Y.A)(t)===!!r&&N(a)===s&&(!l||null==m||!m.dateTime||!1!==(0,T.A)((0,x.A)(i),(0,x.A)(null==m?void 0:m.dateTime))&&l===(null==m?void 0:m.timeZone))&&(!d||null==c||!c.dateTime||!1!==(0,T.A)((0,x.A)(d),(0,x.A)(null==c?void 0:c.dateTime))&&n===(null==c?void 0:c.timeZone))},[l,V,u]),j=async()=>{if(await d()===!0){H(!0);try{let e=await f({...u(),attendees:W});await k(e),n(e)}catch(e){console.error(e)}finally{H(!1)}}},X=async()=>{if(await d()===!0)try{let e=await p(w.eventId,u());await D(e),o(e),await U()}catch(e){console.error(e)}},Q=async()=>{try{await M(w.eventId),await P(new Date().toISOString())}catch(e){console.error(e)}};return(0,h.useEffect)(()=>()=>{!1===r("enable-calendar-event")&&A&&Q().catch(e=>{console.error(e)})},[A]),(0,i.Y)(i.FK,{children:A?(0,i.Y)(R,{isLoading:!c,isSync:q,showSyncMessage:!1===B,eventMetaData:w,onUpdateButtonClick:X,onDeleteButtonClick:Q}):(0,i.Y)(O,{isLoading:!c||G||z,withActionConfirm:W.length>0,deletedAt:y&&w.deletedAt||"",onClick:j})})};var _=t(7129),G=t(95132),W=t(81984),z=t(25997),H=t(82042),q=t(70382),j=t(25327),X=t(33898),Q=t(27536);let $=e=>{let{fieldName:a}=e,t=(0,v.FH)({name:a});return(0,i.Y)(l.Box,{ml:"38px",p:4,bg:"GUI.gray.editor",borderRadius:"2xl",children:(0,i.Y)(X.A,{opacity:.4,children:(0,Q.A)(t)})})},J=(e,a)=>[{name:"enableGoogleMeet",type:"confirm-boolean",label:(0,i.FD)(l.HStack,{children:[(0,i.Y)("p",{children:(0,i.Y)(p.A,{defaultMessage:"Google Meet 會議",id:"admin.liveProduct.Google Meet 會議"})}),(0,i.Y)(q.A,{children:(0,i.FD)(l.UnorderedList,{mt:"1",fontSize:"sm",color:"gray.500",children:[(0,i.Y)(l.ListItem,{children:(0,i.Y)(p.A,{defaultMessage:"Google Meet 會議的參與人數上限為 100 人。",id:"admin.liveProduct.Google Meet 會議的參與人數上限為 100 人。"})},"Google Meet 會議的參與人數上限為 100 人。"),(0,i.Y)(l.ListItem,{children:(0,i.Y)(p.A,{defaultMessage:"若您的 Google 帳號未付費升級帳號,且有 3 位以上的參與者時,會議時間將限制 1 小時。",id:"admin.liveProduct.若您的 Google 帳號未付費升級帳號,且有 3 位以上的參與者時,會議時間將限制 1 小時。"})},"若您的 Google 帳號未付費升級帳號,且有 3 位以上的參與者時,會議時間將限制 1 小時。")]})})]}),confirmTitle:e.formatMessage({defaultMessage:"確認關閉?",id:"admin.liveProduct.確認關閉?"}),confirmBody:e.formatMessage({defaultMessage:"每次啟用 Google Meet 會議時,系統將生成全新的會議連結。",id:"admin.liveProduct.每次啟用 Google Meet 會議時,系統將生成全新的會議連結。"}),confirmOnChecked:!1,confirmColorScheme:"red",defaultValue:!1,leftIcon:H.xwM,helper:(0,i.Y)(j.A,{})},{type:"time-range",name:"dateTimeRange",defaultValue:{startTime:(0,_.A)((0,G.A)(new Date,1)).toISOString(),endTime:(0,_.A)((0,G.A)(new Date,2)).toISOString()},minDate:new Date,label:e.formatMessage({defaultMessage:"課程時間",id:"admin.liveProduct.課程時間"}),labelForDate:e.formatMessage({defaultMessage:"日期",id:"admin.liveProduct.日期"}),labelForStartTime:e.formatMessage({defaultMessage:"開始時間",id:"admin.liveProduct.開始時間"}),labelForEndTime:e.formatMessage({defaultMessage:"結束時間",id:"admin.liveProduct.結束時間"}),startTimeCaption:e.formatMessage({defaultMessage:"開始時間",id:"admin.liveProduct.開始時間"}),endTimeCaption:e.formatMessage({defaultMessage:"結束時間",id:"admin.liveProduct.結束時間"}),placeholder:e.formatMessage({defaultMessage:"請選擇日期",id:"admin.liveProduct.請選擇日期"}),placeholderForStartTime:e.formatMessage({defaultMessage:"請選擇開始時間",id:"admin.liveProduct.請選擇開始時間"}),placeholderForEndTime:e.formatMessage({defaultMessage:"請選擇結束時間",id:"admin.liveProduct.請選擇結束時間"}),rules:{validate:{isRequired:a=>{let{startTime:t,endTime:i}=a||{};return!!t&&!!i||e.formatMessage({defaultMessage:"請選擇課程時間",id:"admin.liveProduct.請選擇課程時間"})},isAfterEndDateTime:a=>{let{startTime:t,endTime:i}=a||{};return!!(0,W.A)(new Date(i),new Date(t))||e.formatMessage({defaultMessage:"開始時間不得晚於結束時間",id:"admin.liveProduct.開始時間不得晚於結束時間"})},isBeforeStartDateTime:a=>{let{startTime:t,endTime:i}=a||{};return!!(0,z.A)(new Date(t),new Date(i))||e.formatMessage({defaultMessage:"結束時間不得早於結束時間",id:"admin.liveProduct.結束時間不得早於結束時間"})}}}},{name:"descriptionMode",label:e.formatMessage({defaultMessage:"活動說明",id:"admin.liveProduct.活動說明"}),type:"radio",options:[{value:"custom",label:e.formatMessage({defaultMessage:"自訂說明",id:"admin.liveProduct.自訂說明"})},{value:"use-thanks-content",label:e.formatMessage({defaultMessage:"沿用課程說明",id:"admin.liveProduct.沿用課程說明"})}],defaultValue:"custom",leftIcon:c.sPF},{name:"title",label:e.formatMessage({defaultMessage:"活動標題",id:"admin.liveProduct.活動標題"}),rules:{maxLength:{value:100,message:e.formatMessage({defaultMessage:"上限100字喔",id:"admin.liveProduct.上限100字喔"})}}},{name:"description",label:e.formatMessage({defaultMessage:"活動說明",id:"admin.liveProduct.活動說明"}),type:"richtext-no-image",defaultValue:(a?'<h3 style="text-align:start"><strong>Thank you very much for your purchase.</strong></h3>\n<p></p>\n<p style="text-align:start">Template 1. Below are the products you have purchased, which we will also send to your email. If you have not received it, please check the \'Promotions\' tab</p>\n<p></p>\n<p style="text-align:start">Template 2. Below is the registration link for the event. Please fill it out completely, and we will c
1ontact you.</p>\n<p></p>\n<p>Template 3. We have received your payment and will contact you as soon as possible.</p>\n<p></p>\n<p>Template 4.If you like this product, please consider scrolling to the bottom to give me a \uD83C\uDF1F 5-star rating! It would be a great help and encouragement to me!</p>':"<p>非常感謝您購買 <%= name %> 的課程,以下為本課程完整說明:</p>\n<p></p>\n<p><strong>【課程資訊】</strong></p>\n<ul>\n<li>上課時間:2025 年 OO 月 OO 日(一)19:00 - 21:00</li>\n<li>上課方式:採用 Google Meet 直播,請先自行註冊帳號</li>\n<li>上課連結:</li>\n<li>報名截止:2025 年 OO 月 OO 日(日)23:59</li>\n</ul>\n<p><strong>【課程講義】</strong></p>\n<ul>\n<li>本課程提供講義、投影片、模板</li>\n<li>請點擊本頁下方【OOOO】下載</li>\n</ul>\n<p><strong>【回放影片】</strong></p>\n<ul>\n<li>本課程提供回放影片</li>\n<li>請於上課後,點擊本網頁下方【回放影片】收看</li>\n</ul>\n<p></p>\n<p>期待與你相見!</p>").replace(/\n/g,""),noAnimation:!0,when:["descriptionMode","custom"]},{type:"div",children:(0,i.Y)($,{fieldName:"thanks.content"}),noAnimation:!0,when:["descriptionMode","use-thanks-content"]}],K=()=>Intl.DateTimeFormat().resolvedOptions().timeZone,Z=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return a?"".concat(a,".").concat(e):e},ee=e=>{let{renderFields:a,providerName:t="calendar",fieldKeyPrefix:d="googleCalendar"}=e,n=(0,h.useCallback)(e=>Z(e,d),[d]),{setValue:o,getValues:s,trigger:r,resetField:m}=(0,v.xW)(),{dirtyFields:u}=(0,v.lN)(),c=(0,v.FH)({name:n("title")});(0,h.useEffect)(()=>{if(void 0===c){let e=s("title.text");m(n("title"),{defaultValue:e})}},[]);let g=(0,v.FH)({name:n("dateTimeRange")});(0,h.useEffect)(()=>{let e=K();o(n("startTimeZone"),e),o(n("endTimeZone"),e)},[n,o,g]);let f=[n("title"),n("descriptionMode"),n("description"),n("dateTimeRange"),n("enableGoogleMeet")],p=(0,v.FH)({name:f}),M=(0,y.A)(p);(0,A.A)(()=>{0!==M.filter(Boolean).length&&JSON.stringify(M)!==JSON.stringify(p)&&o(n("updatedAt"),new Date().toISOString())},[p,o,n]);let x=f.some(e=>b()(u,e)),T=(0,v.FH)({name:n("updatedAt")}),E=async()=>await r(f),I=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f.forEach(e=>{m(e,{defaultValue:s(e),...a})}),o(n("updatedAt"),e.updatedAt,{shouldDirty:x})};return(0,i.FD)(l.Box,{mb:4,children:[(0,i.Y)(l.Box,{mb:5,children:(0,i.Y)(U,{providerName:t,editingDataUpdatedAt:T,getPrefixedFieldKey:n,onFieldsValidate:E,onEventCreated:I,onEventUpdated:I})}),(0,i.Y)(w.A,{p:4,bg:"white",borderRadius:"2xl",children:(0,i.Y)(k.A,{renderFields:a,getFields:J,fieldKeyPrefix:d})})]})};var ea=t(54346),et=t(50999),ei=t(62129);let el=e=>{let{projectId:a,profileId:t,noModal:l,title:d=null,label:n=null,children:o=null,isDisabled:s}=e,r=(0,P.A)();return(0,i.Y)(ei.A,{projectId:a,profileId:t,title:null!=d?d:r.formatMessage({id:"admin.embed.嵌入數位商品",defaultMessage:"嵌入數位商品"}),label:null!=n?n:r.formatMessage({id:"admin.index.footerButton.數位商品",defaultMessage:"數位商品"}),noModal:l,getEmbedUrl:(e,a)=>"".concat(e,"/product/").concat(a),type:"product",isDisabled:s,children:o})};var ed=t(19497),en=t(96638),eo=t(22405),es=t(99624);let er=(e,a)=>{let t=(0,es.jt)(),{data:i}=(0,es.rt)((0,eo.doc)(t,"profiles",e,"orderStats",a));return null==i?void 0:i.count},em=()=>{let{watch:e}=(0,v.xW)(),a=(0,P.A)(),[t,l]=e(["id","stock"]),{profileId:d}=(0,h.useContext)(I.A),n=er(d,t)||0;return(0,i.Y)("span",{children:"".concat(a.formatMessage({defaultMessage:"已售",id:"admin.product.已售"})," ").concat(n," ").concat(a.formatMessage({defaultMessage:"組",id:"admin.product.組"})," ; ").concat(a.formatMessage({defaultMessage:"剩餘",id:"admin.product.剩餘"})," ").concat(l-n," ").concat(a.formatMessage({defaultMessage:"組",id:"admin.product.組"}))})};var eu=t(90390);let ec=e=>{var a,t;let{value:i,allData:l,contentType:d,key:n,errorMessage:o,isValueValid:s}=e;if(!(null===(a=l.product)||void 0===a?void 0:a.isProductContent))return!0;
1let r=null===(t=l.productContents)||void 0===t?void 0:t.find(e=>(null==e?void 0:e[n])===i&&e.type===d),m=(null==r?void 0:r.type)===d,u=""!==i||!m;return"function"==typeof s?!m||(""===i?o:!!s(i)||o):!!u||o},eg={type:"div",children:(0,i.FD)(l.VStack,{spacing:3,justifyContent:"space-between",alignItems:"flex-start",children:[(0,i.FD)(l.HStack,{children:[(0,i.Y)(l.Heading,{as:"h4",size:"sm",children:(0,i.Y)(p.A,{defaultMessage:"評論內容",id:"admin.comments.評論內容"})}),(0,i.FD)(q.A,{label:null,width:"16em",bg:"custom.bgGray",color:"custom.textGray",size:5,placement:"bottom",children:[(0,i.Y)(l.Text,{mb:"1",children:(0,i.Y)(p.A,{defaultMessage:"開啟後將寄信邀請評論:",id:"admin.comments.開啟後將寄信邀請評論:"})}),(0,i.FD)(l.UnorderedList,{spacing:1,pl:"2",children:[(0,i.Y)(l.ListItem,{children:(0,i.FD)(l.Text,{children:[(0,i.Y)(l.Text,{as:"span",fontWeight:"bold",children:(0,i.Y)(p.A,{defaultMessage:"數位商品:",id:"admin.comments.數位商品:"})}),(0,i.Y)(p.A,{defaultMessage:"購買日 +7 日後",id:"admin.comments.購買日 +7 日後"})]})}),(0,i.Y)(l.ListItem,{children:(0,i.FD)(l.Text,{children:[(0,i.Y)(l.Text,{as:"span",fontWeight:"bold",children:(0,i.Y)(p.A,{defaultMessage:"直播課:",id:"admin.comments.直播課:"})}),(0,i.Y)(p.A,{defaultMessage:"課後(需行事曆)",id:"admin.comments.課後(需行事曆)"})]})})]})]})]}),(0,i.Y)(l.Text,{children:(0,i.Y)(p.A,{defaultMessage:"以下評論內容會於選取後,顯示於商品畫面上。",id:"admin.comments.以下評論內容會於選取後,顯示於商品畫面上。"})})]})},ef=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,a=arguments.length>1?arguments[1]:void 0;return{type:"mini-form",name:"orderForm",label:a.formatMessage({defaultMessage:"自訂問題",id:"admin.product.自訂問題"}),defaultValue:[{name:"orderForm0",label:""},{name:"orderForm1",label:""}],rules:{maxLength:e},buttonName:a.formatMessage({defaultMessage:"自訂問題",id:"admin.product.自訂問題"}),noIcon:!0,toggleReqrired:!0,noRequire:!0}};var ep=t(45e3),eM=t(59852);let eb=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2,a=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0;return{type:"mini-form",name:"form",label:a.formatMessage({defaultMessage:"自訂問題",id:"admin.product.自訂問題"}),defaultValue:[{name:"",label:t?"Duration":"時間長度",label1:t?"90 mins":"90 分鐘"},{name:"",label:t?"Lecture notes":"課程講義",label1:t?"Two sets":"兩份"}],rules:{maxLength:e},twocolumn:!0,buttonName:a.formatMessage({defaultMessage:"自訂問題",id:"admin.product.自訂問題"})}},eh=(e,a)=>{let t=a?ep.PTTN_FLOAT:ep.PTTN_INTEGEAR,M=a?eM.K1:eM.U9;return[{type:"tab",tabs:[{label:e.formatMessage({defaultMessage:"區塊編輯",id:"admin.product.區塊編輯"}),fields:[{type:"div",children:(0,i.Y)(et.A,{title:e.formatMessage({defaultMessage:"基本設定",id:"admin.product.基本設定"}),children:e.formatMessage({defaultMessage:"設定專案名稱",id:"admin.product.設定專案名稱"})})},{name:"name",label:e.formatMessage({defaultMessage:"專案名稱 (必填)",id:"admin.product.專案名稱 (必填)"}),leftIcon:m.aFU,type:"uniq",helper:"".concat(e.formatMessage({defaultMessage:"專案ID",id:"admin.product.專案ID"}),": <%= id %>"),defaultValue:e.formatMessage({defaultMessage:"新專案",id:"admin.liveProduct.新專案"}),rules:{required:{value:!0,message:e.formatMessage({defaultMessage:"請輸入專案名稱",id:"admin.product.請輸入專案名稱"})}}},{name:"variant",label:e.formatMessage({defaultMessage:"樣式",id:"admin.mailing.樣式"}),type:"radio",leftIcon:g.X$G,options:[{value:"default",label:e.formatMessage({defaultMessage:"看版式",id:"admin.mailing.看版式"})},{value:"collapse",label:e.formatMessage({defaultMessage:"下拉式",id:"admin.mailing.下拉式"})}],defaultValue:"default"},{type:"boolean",name:"isActive",label:e.formatMessage({defaultMessage:"開啟商品",id:"admin.product.開啟商品"}),leftIcon:u.e$p,defaultValue:!0},{type:"boolean",name:"isRepurchasable",label:e.formatMessage({defaultMessage:"可重複購買",id:"admin.product.可重複購買"}),leftIcon:r.mXj},{type:"divider"},{type:"div",children:(0,i.Y)(et.A,{title:e.formatMessage({defaultMessage:"課程封面設定",id:"admin.liveProduct.課程封面設定"}),children:e.formatMessage({defaultMessage:"設定課名與封面圖片",id:"admin.liveProduct.設定課名與封面圖片"})})},{...(0,en.S_)(1280,640,e.formatMessage({defaultMessage:"圖片",id:"admin.product.圖片"}),e),type:"image"},{name:"title.text",label:e.formatMessage({defaultMessage:"課程名稱",id:"admin.liveProduct.課程名稱"}),defaultValue:a?"Live Class Title":"課程名稱",type:"textarea"},{name:"title.align",label:e.formatMessage({defaultMessage:"對齊",id:"admin.index.blockEditor.blockFields.對齊"}),type:"radio",options:[{value:"left",label:e.formatMessage({defaultMessage:"置左對齊",id:"admin.index.blockEditor.blockFields.置左對齊"})},{value:"center",label:e.formatMessage({defaultMessage:"置中對齊",id:"admin.index.blockEditor.blockFields.置中對齊"})},{value:"right",label:e.formatMessage({defaultMessage:"置右對齊",id:"admin.index.blockEditor.blockFields.置右對齊"})}],defaultValue:"left",leftIcon:g.eih},{name:"productMode",label:e.formatMessage({defaultMessage:"課程類型",id:"admin.liveProduct.課程類型"}),type:"radio",options:[{value:"normal",label:e.formatMessage({defaultMessage:"一般課程",id:"admin.liveProduct.一般課程"})},{value:"free",label:e.formatMessage({defaultMessage:"免費課程",id:"admin.liveProduct.免費課程"})}],defaultValue:"normal",leftIcon:n.cMR},{name:"price",leftIcon:n.cMR,label:e.formatMessage({defaultMessage:"課程價格",id:"admin.liveProduct.課程價格"}),placeholder:e.formatMessage({defaultMessage:"課程原價",id:"admin.liveProduct.課程原價"}),defaultValue:"1000",helper:"".concat(e.formatMessage({defaultMessage:"金額最低",id:"admin.product.金額最低"})," $").concat(M),rules:{pattern:{value:t,message:e.formatMessage({defaultMessage:"僅能輸入數字",id:"admin.product.僅能輸入數字"})},validate:(a,t)=>"free"===t.productMode||(a?a<M?"".concat(e.formatMessage({defaultMessage:"最低金額設定",id:"admin.product.最低金額設定"})," $").concat(M):!(a>eM.oc)||"".concat(e.formatMessage({defaultMessage:"最高金額設定",id:"admin.product.最高金額設定"}
1)," $").concat(eM.oc.toLocaleString()).concat(e.formatMessage({defaultMessage:"元",id:"admin.product.元"})):e.formatMessage({defaultMessage:"金額必填",id:"admin.product.金額必填"}))},when:["productMode",["normal"]]},{name:"priceStatus",label:e.formatMessage({defaultMessage:"價格選項",id:"admin.product.價格選項"}),type:"radio",options:[{value:"isOriginal",label:e.formatMessage({defaultMessage:"原價",id:"admin.product.原價"})},{value:"isSale",label:e.formatMessage({defaultMessage:"顯示特價",id:"admin.product.顯示特價"})},{value:"isCountdown",label:e.formatMessage({defaultMessage:"倒數價格",id:"admin.countdownTimer.倒數價格"}),helper:e.formatMessage({defaultMessage:"超過截止時間,會自動更改為「截止價格」",id:"admin.countdownTimer.超過截止時間,會自動更改為「截止價格」"})}],defaultValue:"isOriginal",leftIcon:c.HLW,when:["productMode",["normal"]],lastDependentValue:"isOriginal"},{type:"boolean",name:"isDeadlineDisplay",label:e.formatMessage({defaultMessage:"顯示截止時間",id:"admin.countdownTimer.顯示截止時間"}),leftIcon:null,when:[["priceStatus","isCountdown"],["productMode","normal"]],defaultValue:!0},{type:"boolean",name:"isCountdownDisplay",label:e.formatMessage({defaultMessage:"顯示倒數計時",id:"admin.countdownTimer.顯示倒數計時"}),leftIcon:null,when:[["priceStatus","isCountdown"],["productMode","normal"]],defaultValue:!0},{name:"countdownSetting",type:"fake-group",hint:e.formatMessage({defaultMessage:"截止時間一到,價格顯示會從倒數價格變成截止價格。",id:"admin.countdownTimer.倒數價格區塊說明"}),fields:[{type:"input-label",name:"countdownPrice",label:e.formatMessage({defaultMessage:"倒數價格",id:"admin.countdownTimer.倒數價格"}),leftIcon:null,when:["priceStatus","isCountdown"],defaultValue:"200",helper:e.formatMessage({defaultMessage:"需為 $0 或 ${amount} 以上,且小於截止價格、小於原價",id:"admin.countdownTimer.倒數價格說明"},{amount:M}),rules:{validate:{validate:a=>a&&t.test(a)?0!==Number(a)&&Number(a)<M?"".concat(e.formatMessage({defaultMessage:"金額需為 ${amount} 以上,或為 $0",id:"admin.product.金額需為60以上或為0"},{amount:M})):!(Number(a)>eM.oc)||"".concat(e.formatMessage({defaultMessage:"最高金額設定",id:"admin.product.最高金額設定"})," $").concat(eM.oc.toLocaleString()).concat(e.formatMessage({defaultMessage:"元",id:"admin.product.元"})):e.formatMessage({defaultMessage:"請輸入有效的數字",id:"admin.product.請輸入有效的數字"}),isRequired:(a,t)=>"isCountdown"!==t.priceStatus||null!=a&&""!==a||e.formatMessage({defaultMessage:"請輸入倒數價格",id:"admin.countdownTimer.請輸入倒數價格"}),validateCountdownPrice:(a,t)=>{var i;return Number(t.price)>=Number(a)?null!=t&&null!==(i=t.countdownSetting)&&void 0!==i&&!!i.every(e=>Number(e.deadlinePrice)>Number(a))||e.formatMessage({defaultMessage:"倒數價格需小於『截止價格』",id:"admin.countdownTimer.倒數價格需小於『截止價格』"}):e.formatMessage({defaultMessage:"倒數價格需小於『原價』",id:"admin.countdownTimer.倒數價格需小於『原價』"})}}}},{type:"input-label",name:"deadlinePrice",label:e.formatMessage({defaultMessage:"截止價格",id:"admin.countdownTimer.截止價格"}),leftIcon:null,when:["priceStatus","isCountdown"],defaultValue:"400",helper:e.formatMessage({defaultMessage:"需大於倒數價格,且小於或等於原價",id:"admin.countdownTimer.截止價格說明"}),rules:{validate:{validate:a=>a&&t.test(a)?0!==Number(a)&&Number(a)<M?"".concat(e.formatMessage({defaultMessage:"金額需為 ${amount} 以上,或為 $0",id:"admin.product.金額需為60以上或為0"},{amount:M})):!(Number(a)>eM.oc)||"".concat(e.formatMessage({defaultMessage:"最高金額設定",id:"admin.product.最高金額設定"})," $").concat(eM.oc.toLocaleString()).concat(e.formatMessage({defaultMessage:"元",id:"admin.product.元"})):e.formatMessage({defaultMessage:"請輸入有效的數字",id:"admin.product.請輸入有效的數字"}),isRequired:(a,t)=>"isCountdown"!==t.priceStatus||null!=a&&""!==a||e.formatMessage({defaultMessage:"請輸入截止價格",id:"admin.countdownTimer.請輸入截止價格"}),validateDeadlinePrice:(a,t)=>{if("isCountdown"===t.priceStatus){var i;if(!(Number(t.price)>=Number(a)))return e.formatMessage({defaultMessage:"截止價格需小於『原價』",id:"admin.countdownTimer.截止價格需小於『原價』"});if(!(null==t?void 0:null===(i=t.countdownSetting)||void 0===i?void 0:i.every(e=>Number(e.countdownPrice)<Number(a))))return e.formatMessage({defaultMessage:"倒數價格需小於『截止價格』",id:"admin.countdownTimer.倒數價格需小於『截止價格』"})}return!0}}}},{type:"time-selector",name:"countdownTime",fieldLabel:e.formatMessage({defaultMessage:"截止時間",id:"admin.countdownTimer.截止時間"}),placeholder:e.formatMessage({defaultMessage:"請選擇截止時間",id:"admin.countdownTimer.請選擇截止時間"}),timeCaption:e.formatMessage({defaultMessage:"截止時間",id:"admin.countdownTimer.截止時間"}),compact:!0,minTime:new Date,when:["priceStatus","isCountdown"],rules:{validate:{
1isRequired:(a,t)=>"isCountdown"!==t.priceStatus||!!a||e.formatMessage({defaultMessage:"請輸入截止時間",id:"admin.countdownTimer.請輸入截止時間"})}}}],when:[["priceStatus","isCountdown"],["productMode","normal"]],noAnimation:!0,lastDependentValue:!0,defaultValue:[{countdownPrice:"600",deadlinePrice:"800"}],hideAddButton:!0},{name:"sale",leftIcon:n.cMR,label:e.formatMessage({defaultMessage:"特價價格",id:"admin.product.特價價格"}),placeholder:e.formatMessage({defaultMessage:"特價價格",id:"admin.product.特價價格"}),defaultValue:"600",helper:"".concat(e.formatMessage({defaultMessage:"金額需為 ${amount} 以上,或為 $0",id:"admin.product.金額需為60以上或為0"},{amount:M})),rules:{pattern:{value:t,message:e.formatMessage({defaultMessage:"請輸入有效的數字",id:"admin.product.請輸入有效的數字"})},validate:{isLower:(a,i)=>{if("isOriginal"===i.priceStatus||"isCountdown"===i.priceStatus||"free"===i.productMode)return!0;if(!a||!t.test(a))return e.formatMessage({defaultMessage:"請輸入有效的數字",id:"admin.product.請輸入有效的數字"});let l=Number(a)||0;return 0!==l&&l<M?"".concat(e.formatMessage({defaultMessage:"金額需為 ${amount} 以上,或為 $0",id:"admin.product.金額需為60以上或為0"},{amount:M})):!(l>=+i.price)||e.formatMessage({defaultMessage:"特價金額不能高於原價",id:"admin.product.特價金額不能高於原價"})}}},when:[["priceStatus",["isSale"]],["productMode",["normal"]]]},{name:"description",label:e.formatMessage({defaultMessage:"課程簡介(選填)",id:"admin.liveProduct.課程簡介(選填)"}),type:"richtext",placeholder:e.formatMessage({defaultMessage:"課程簡介(選填)",id:"admin.liveProduct.課程簡介(選填)"}),defaultValue:"zh"===e.locale?'<p style="text-align:start">課程簡介</p><p style="text-align:start">*本課程可開立二/三聯式電子發票</p>':""},{type:"boolean",name:"isRating",label:e.formatMessage({defaultMessage:"學員評論",id:"admin.comments.學員評論"}),defaultValue:!0,leftIcon:g.xe7,rightFields:[{type:"tab-control-button",name:"tabControlButton",buttonName:e.formatMessage({defaultMessage:"評論設定",id:"admin.comments.評論設定"}),tabIndex:4}]},{type:"boolean",name:"isSoldQuantity",label:e.formatMessage({defaultMessage:"銷售數量",id:"admin.product.銷售數量"}),defaultValue:!0,leftIcon:s.AsH},{name:"buttonName",label:e.formatMessage({defaultMessage:"按鈕文字",id:"admin.product.按鈕文字"}),leftFields:[{type:"icon",name:"icon",label:"Icon"}],rules:{maxLength:{value:100,message:e.formatMessage({defaultMessage:"上限100字喔",id:"admin.product.上限100字喔"})}},defaultValue:a?"Awesome, I'll take it":"真棒,我要這個!"},{type:"divider"},{type:"div",children:(0,i.Y)(et.A,{title:e.formatMessage({defaultMessage:"名額限制",id:"admin.liveProduct.名額限制"}),children:e.formatMessage({defaultMessage:"課程名額設定",id:"admin.liveProduct.課程名額設定"})})},{type:"boolean",name:"isStock",label:e.formatMessage({defaultMessage:"名額限制",id:"admin.liveProduct.名額限制"}),defaultValue:"",leftIcon:f.dSh},{name:"stock",leftIcon:d.QXu,placeholder:e.formatMessage({defaultMessage:"名額數量",id:"admin.liveProduct.名額數量"}),defaultValue:1e3,helper:(0,i.Y)(em,{}),rules:{validate:{isRequired:(a,t)=>!t.isStock||!!a||e.formatMessage({defaultMessage:"請輸入名額數量",id:"admin.liveProduct.請輸入名額數量"})}},when:["isStock",!0]},{name:"stockButtonName",leftIcon:c.Yr8,placeholder:e.formatMessage({defaultMessage:"課程完售時顯示文字",id:"admin.liveProduct.課程完售時顯示文字"}),defaultValue:e.formatMessage({defaultMessage:"課程已售完",id:"admin.liveProduct.課程已售完"}),helper:e.formatMessage({defaultMessage:"將會於剩餘數量為 0 時顯示,並且關閉付款按鈕",id:"admin.product.將會於剩餘數量為 0 時顯示,並且關閉付款按鈕"}),when:["isStock",!0]}]},{label:e.formatMessage({defaultMessage:"課程介紹",id:"admin.liveProduct.課程介紹"}),fields:[{type:"div",children:(0,i.Y)(et.A,{title:e.formatMessage({defaultMessage:"圖片設定",id:"admin.liveProduct.圖片設定"}),children:e.formatMessage({defaultMessage:"可選擇沿用封面圖,或自訂多張圖片",id:"admin.product.可選擇沿用封面圖,或自訂多張圖片"})})},{name:"product.imageMode",label:e.formatMessage({defaultMessage:"課程圖片",id:"admin.liveProduct.課程圖片"}),type:"radio",options:[{label:e.formatMessage({defaultMessage:"長方形圖片",id:"admin.product.長方形圖片"}),value:"banner"},{label:e.formatMessage({defaultMessage:"方形圖片",id:"admin.product.方形圖片"}),value:"product-image"}],defaultValue:"banner",leftIcon:g.UXq,parentWhen:["product.imageMode","banner"]},{type:"boolean",name:"product.isCover",label:e.formatMessage({defaultMessage:"沿用封面圖片",id:"admin.product.沿用封面圖片"}),defaultValue:!0,leftIcon:null,when:["product.imageMode",["banner"]]},{name:"items",type:"group",label:e.formatMessage({defaultMessage:"圖片",id:"admin.index.blockEditor.blockFields.圖片"}),fields:[(0,en.S_)(640,320,"",e)],when:["product.imageMode",["banner"]],noAnimation:!0},{name:"items",type:"group",label:e.formatMessage({defaultMessage:"圖片",id:"admin.index.blockEditor.blockFields.圖片"}),fields:[(0,en.S_)(320,320,"",e)],when:["product.imageMode",["product-image"]],noAnimation:!0},{type:"div",children:(0,i.Y)(et.A,{title:e.formatMessage({defaultMessage:"課程影片",id:"admin.liveProduct.課程影片"}),children:e.formatMessage({defaultMessage:"用影片介紹你的課程",id:"admin.liveProduct.用影片介紹你的課程"})})},{type:"boolean",name:"productVideo.isVideo",label:e.formatMessage({defaultMessage:"課程影片",id:"admin.liveProduct.課程影片"}),defaultValue:"",leftIcon:o.QYs,parentWhen:["productVideo.isVideo",[!0]]},{name:"productVideo.url",label:e.formatMessage({defaultMessage:"YouTube 影片連結",id:"admin.mailing.YouTube 影片連結"}),leftIcon:n.I1_,when:["productVideo.isVideo",!0]},{...(0,en.S_)(1920,1080,e.formatMessage({defaultMessage:"自訂縮圖",id:"admin.mailing.自訂縮圖"}),e,"productVideo.image"),when:["productVideo.isVideo",!0]},{name:"productVideo.text",label:e.formatMessage({defaultMessage:"影片說明文字",id:"admin.mailing.影片說明文字"}),when:["productVideo.isVideo",!0]},{type:"divider"},{type:"div",children:(0,i.Y)(et.A,{title:e.formatMessage({defaultMessage:"課程介紹",id:"admin.liveProduct.課程介紹"}),children:e.formatMessage({defaultMessage:"說明課程內容",id:"admin.liveProduct.說明課程內容"})})},{type:"boolean",name:"isSyncDescription",label:e.formatMessage({defaultMessage:"顯示課程簡介",id:"admin.product.顯示課程簡介"}),defaultValue:"",leftIcon:c.sPF},{name:"product.description",label:e.formatMessage({defaultMessage:"課程介紹",id:"admin.liveProduct.課程介紹"}),type:"richtext",defaultValue:a?"Complete Live Class Description":"課程完整說明"},{type:"boolean",name:"product.spec",label:e.formatMessage({defaultMessage:"課程說明",id:"admin.liveProduct.課程說明"}),defaultValue:!0,leftIcon:o.ChF,parentWhen:["product.spec",[!0,!1]]},{...eb(5,e,a)}
1,{type:"divider"},{type:"div",children:(0,i.Y)(et.A,{title:e.formatMessage({defaultMessage:"結帳設定",id:"admin.product.結帳設定"}),children:e.formatMessage({defaultMessage:"設定結帳填寫資訊",id:"admin.product.設定結帳填寫資訊"})})},{type:"boolean",name:"isPhone",label:e.formatMessage({defaultMessage:"聯絡電話",id:"admin.product.聯絡電話"}),defaultValue:!0,leftIcon:d.qd6},{...ef(5,e,a)},{type:"boolean",name:"enableCoupon",label:(0,i.Y)(l.HStack,{children:(0,i.Y)("span",{children:(0,i.Y)(p.A,{defaultMessage:"使用折扣碼",id:"admin.product.使用折扣碼"})})}),leftIcon:g.iRR,rightFields:[{name:"button",type:"button",buttonName:e.formatMessage({defaultMessage:"設定折扣碼",id:"admin.product.設定折扣碼"}),href:"/admin/product/projects"}],when:["productMode",["normal"]],noAnimation:!0},...a?[]:[{type:"divider"},{type:"div",children:(0,i.Y)(et.A,{title:e.formatMessage({defaultMessage:"國際收款",id:"admin.product.國際收款"}),children:e.formatMessage({defaultMessage:"開啟後,可收取國際款項",i
1d:"admin.product.開啟後,可收取國際款項"})})},eu.O]]},{label:e.formatMessage({defaultMessage:"課程設定",id:"admin.liveProduct.課程設定"}),fields:[{type:"div",children:(0,i.Y)(et.A,{title:e.formatMessage({defaultMessage:"課程說明",id:"admin.liveProduct.課程說明"}),children:e.formatMessage({defaultMessage:"以下內容會於購買完成後,顯示於畫面上、並以 E-mail 方式寄送。提醒您:任何內容更動,皆會同步更新至已購買者收到的連結。",id:"admin.product.以下內容會於購買完成後,顯示於畫面上、並以 E-mail 方式寄送。提醒您:任何內容更動,皆會同步更新至已購買者收到的連結。"})})},{name:"thanks.imageMode",label:e.formatMessage({defaultMessage:"課程圖片",id:"admin.liveProduct.課程圖片"}),type:"radio",options:[{label:e.formatMessage({defaultMessage:"無課程圖",id:"admin.liveProduct.無課程圖"}),value:"noImage"},{label:e.formatMessage({defaultMessage:"沿用封面圖",id:"admin.product.沿用封面圖"}),value:"banner"},{label:e.formatMessage({defaultMessage:"自訂圖片",id:"admin.product.自訂圖片"}),value:"thanks-image"}],defaultValue:"banner",leftIcon:g.UXq,parentWhen:["thanks.imageMode",["thanks-image"]]},{...(0,en.S_)(1280,640,e.formatMessage({defaultMessage:"回饋圖片",id:"admin.product.回饋圖片"}),e,"thanks.image"),when:["thanks.imageMode","thanks-image"]},{name:"thanks.content",label:e.formatMessage({defaultMessage:"感謝文字",id:"admin.product.感謝文字"}),type:"richtext",defaultValue:(a?"<p>*This event will also send a Google Calendar invite. Please check your inbox.</p><p>Thank you for purchasing the <%= name %> course. Below are the full course details:</p>\n<p></p><p><strong>[Course Info]</strong></p>\n<ul>\n<li>Time: OO, OO, 2025 (Mon) 19:00 - 21:00</li>\n<li>Format: Google Meet live class. Please register your account first.</li>\n<li>Join link:</li>\n<li>Registration deadline: OO, OO, 2025 (Sun) 23:59</li>\n</ul>\n<p><strong>[Course Materials]</strong></p>\n<ul>\n<li>This course provides handouts, slides, and templates.</li>\n<li>Please click [OOOO] at the bottom of this page to download.</li>\n</ul>\n<p><strong>[Replay]</strong></p>\n<ul>\n<li>A replay will be provided.</li>\n<li>After class, click [Replay] at the bottom of this page to watch.</li>\n</ul>\n<p></p>\n<p>Looking forward to seeing you!</p>":"<p>*本活動同步發送 Google Calendar 行事曆邀請,請留意你的信箱。</p><p>非常感謝您購買 <%= name %> 的課程,以下為本課程完整說明:</p>\n<p></p><p><strong>【課程資訊】</strong></p>\n<ul>\n<li>上課時間:2025 å¹´ OO 月 OO 日(一)19:00 - 21:00</li>\n<li>上課方式:採用 Google Meet 直播,請先自行註冊帳號</li>\n<li>上課連結:</li>\n<li>報名截止:2025 å¹´ OO 月 OO 日(日)23:59</li>\n</ul>\n<p><strong>【課程講義】</strong></p>\n<ul>\n<li>本課程提供講義、投影片、模板</li>\n<li>請點擊本頁下方【OOOO】下載</li>\n</ul>\n<p><strong>【回放影片】</strong></p>\n<ul>\n<li>本課程提供回放影片</li>\n<li>請於上課後,點擊本網頁下方【回放影片】收看</li>\n</ul>\n<p></p>\n<p>期待與你相見!</p>").replace(/\n/g,"")},{type:"divider"},{type:"div",children:(0,i.Y)(et.A,{title:e.formatMessage({defaultMessage:"建立 Google 行事曆",id:"admin.liveProduct.建立 Google 行事曆"}),children:e.formatMessage({defaultMessage:"連結你的 Google 帳號、並建立行事曆;購買完成後,系統將發出行事曆邀請。",id:"admin.liveProduct.此功能將連結你的 Google 帳號,直接建立你的 Google 行事曆,並發送行事曆邀請給購買者。"})})},{type:"confirm-boolean",name:"enable-calendar-event",label:e.formatMessage({defaultMessage:"開啟行事曆",id:"admin.liveProduct.開啟行事曆"}),leftIcon:c.auT,confirmTitle:e.formatMessage({defaultMessage:"確認關閉?",id:"admin.liveProduct.確認關閉?"}),confirmBody:e.formatMessage({defaultMessage:"若已建立 Google 行事曆,將自動刪除並發信通知購買者。",id:"admin.liveProduct.若已建ç«
1‹ Google 行事曆,將自動刪除並發信通知購買者。"}),confirmOnChecked:!1,confirmColorScheme:"red",defaultValue:!1},{type:"hidden",name:"should-confirm-on-disable-calendar-event",defaultValue:!1},{type:"oauth-app",providerName:"calendar",oauthButtonText:e.formatMessage({defaultMessage:"連結 Google 行事曆",id:"admin.liveProduct.連結 Google 行事曆"}),AppEditorComponent:ee,noAnimation:!0,when:["enable-calendar-event",!0]},{type:"divider"},{type:"div",children:(0,i.Y)(et.A,{title:e.formatMessage({defaultMessage:"課程內容",id:"admin.liveProduct.課程內容"}),children:e.formatMessage({defaultMessage:"開啟後,可以提供購買者影片、雲端連結等自訂課程內容。",id:"admin.product.開啟後,可以提供購買者影片、雲端連結等自訂課程內容。"})})},{type:"boolean",name:"product.isProductContent",label:e.formatMessage({defaultMessage:"課程內容",id:"admin.liveProduct.課程內容"}),defaultValue:!1,leftIcon:c.O7Q,parentWhen:["product.isProductContent",!0]},{name:"productContents",type:"group",label:e.formatMessage({defaultMessage:"課程內容",id:"admin.liveProduct.課程內容"}),fields:[{name:"type",type:"radio",label:e.formatMessage({defaultMessage:"課程內容",id:"admin.liveProduct.課程內容"}),options:[{value:"isLink",label:e.formatMessage({defaultMessage:"直播連結",id:"admin.liveProduct.直播連結"})},{value:"isForm",label:e.formatMessage({defaultMessage:"課程資源",id:"admin.liveProduct.課程資源"})},{value:"isEmebedVideo",label:e.formatMessage({defaultMessage:"嵌入影片",id:"admin.product.嵌入影片"})}],defaultValue:"isLink",leftIcon:g.X7T},{name:"emebedVideo",label:e.formatMessage({defaultMessage:"YouTube/Vimeo 影片連結",id:"admin.product.YouTube 影片連結"}),leftIcon:n.I1_,when:[".type","isEmebedVideo"],rules:{validate:{isRequired:(a,t)=>ec({value:a,allData:t,contentType:"isEmebedVideo",key:"emebedVideo",errorMessage:e.formatMessage({defaultMessage:"請輸入影片連結",id:"admin.product.請輸入 youtube 影片連結"}),isValueValid:e=>ep.PTTN_YOUTUBE.test(e)||ep.PTTN_VIMEO.test(e)})}}},{...(0,en.S_)(1920,1080,e.formatMessage({defaultMessage:"自訂縮圖",id:"admin.mailing.自訂縮圖"}),e,"emebedImage",[".type","isEmebedVideo"])},{name:"emebedText",label:e.formatMessage({defaultMessage:"影片說明文字",id:"admin.mailing.影片說明文字"}),when:[".type","isEmebedVideo"],defaultValue:e.formatMessage({defaultMessage:"課程回放",id:"admin.liveProduct.課程回放"})},{name:"linkText",label:e.formatMessage({defaultMessage:"按鈕文字",id:"admin.mailing.按鈕文字"}),leftFields:[{type:"icon",name:"linkIcon",label:"Icon"}],when:[".type","isLink"],defaultValue:a?"Join":e.formatMessage({defaultMessage:"課程連結",id:"admin.liveProduct.課程連結"}),rules:{validate:{isRequired:(a,t)=>ec({value:a,allData:t,contentType:"isLink",key:"linkText",errorMessage:e.formatMessage({defaultMessage:"請輸入按鈕文字",id:"admin.product.請輸入按鈕文字"})})}}},{name:"link",label:e.formatMessage({defaultMessage:"課程連結",id:"admin.liveProduct.課程連結"}),when:[".type","isLink"],leftIcon:d.gwM,rules:{validate:{isRequired:(a,t)=>ec({value:a,allData:t,contentType:"isLink",key:"link",errorMessage:e.formatMessage({defaultMessage:"請輸入課程連結",id:"admin.liveProduct.請輸入課程連結"})})}}},{name:"formText",label:e.formatMessage({defaultMessage:"投影片下載",id:"admin.liveProduct.投影片下載"}),leftFields:[{type:"icon",name:"formIcon",label:"Icon"}],when:[".type","isForm"],defaultValue:a?"Download Slides":"投影片下載",rules:{validate:{isRequired:(a,t)=>ec({value:a,allData:t,contentType:"isForm",key:"formText",errorMessage:e.formatMessage({defaultMessage:"請輸入按鈕文字",id:"admin.product.請輸入按鈕文字"})})}}},{name:"form",label:e.formatMessage({defaultMessage:"投影片下載",id:"admin.liveProduct.投影片下載"}),when:[".type","isForm"],leftIcon:d.gwM,rules:{validate:{isRequired:(a,t)=>ec({value:a,allData:t,contentType:"isForm",key:"form",errorMessage:e.formatMessage({defaultMessage:"請輸入連結",id:"admin.product.請輸入連結"})})}}}],when:["product.isProductContent",!0]},{name:"thanks.alert",label:e.formatMessage({defaultMessage:"版權聲明",id:"admin.product.版權聲明"}),type:"richtext",defaultValue:a?"<p>Copyright Notice: The product you have purchased is copyrighted by <%= name %>, and may not be reproduced, copied, distributed, sold, modified, or used to create similar products without authorization. It may not be publicly disclosed or used for c
1ommercial purposes. This product is protected by national copyright laws, and any violator will be subject to legal liability.</p>":"<p>版權聲明:您購買之本商品為<%= name %>版權所有,未經授權不得轉載、複製、分發、出售、修改或創建類似產品,亦不得自行公開或作為商業使用。本商品受到本國著作權法律的保護,任何違反者都將承擔法律責任。</p>"}],showSaveButton:!0},{label:e.formatMessage({defaultMessage:"嵌入設定",id:"admin.product.嵌入設定"}),fields:[{type:"div",children:(0,i.Y)(ed.A.Consumer,{children:a=>{let{profileId:t,blockId:l}=a;return(0,i.Y)(ea.t_,{children:(0,i.Y)(el,{noModal:!0,profileId:t,projectId:l,title:e.formatMessage({id:"admin.liveProduct.嵌入直播課程",defaultMessage:"嵌入直播課程"}),label:e.formatMessage({id:"admin.liveProduct.直播課程",defaultMessage:"直播課程"})})})}})}],mustSaveBeforeLoad:!0},{label:e.formatMessage({defaultMessage:"評論設定",id:"admin.comments.評論設定"}),fields:[{type:"div",children:(0,i.Y)(et.A,{title:e.formatMessage({defaultMessage:"評論設定",id:"admin.comments.評論設定"}),children:e.formatMessage({defaultMessage:"開啟後,將會於商品頁面顯示星星評價以及「查看評論」按鈕。",id:"admin.comments.開啟後,將會於商品頁面顯示星星評價以及「查看評論」按鈕。"})})},{type:"boolean",leftIcon:s.gt3,name:"isRating",label:e.formatMessage({defaultMessage:"買家評論",id:"admin.comments.買家評論"})},eg,{type:"comment",name:"commentData"}]}].filter(Boolean),when:["category","live"],noAnimation:!0}]};var ev=t(84316),ey=t(7817),eA=t(16108),ew=t(83893);let ek=()=>{var e,a;let t=(0,ey.A)(),d=(0,h.useContext)(ed.A),n=(0,h.useContext)(I.A),o=(0,v.xW)(),s=null==d?void 0:d.profileId,r=null==d?void 0:d.blockId,m=!!(null==t?void 0:t.isSuperAdmin),u=Number(null==o?void 0:null===(e=o.watch)||void 0===e?void 0:e.call(o,"deferredMonths"))||0,c=(null==o?void 0:null===(a=o.watch)||void 0===a?void 0:a.call(o,"name"))||void 0,g=(null==n?void 0:n.slug)&&r?(0,ev.W)("".concat(n.slug,"/product/").concat(r)):void 0;return s&&r&&(m||u)?(0,i.Y)(l.Box,{py:"2",children:(0,i.FD)(l.HStack,{spacing:"3",children:[(0,i.Y)(l.Text,{fontSize:"sm",color:"gray.700",minW:"6em",children:"遞延設定"}),m?(0,i.Y)(ew.A,{profileId:s,productId:r,productName:c,productHref:g,currentMonths:u,onChanged:e=>{var a;return null==o?void 0:null===(a=o.setValue)||void 0===a?void 0:a.call(o,"deferredMonths",e||0)}}):(0,i.Y)(eA.A,{months:u})]})}):null};var ex=t(85247);let eT=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2,a=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0;return{type:"mini-form",name:"form",label:a.formatMessage({defaultMessage:"自訂項目",id:"admin.product.自訂項目"}),defaultValue:[{name:"",label:t?"File Size":"檔案大小",label1:"OOO MB"},{name:"",label:t?"Video Length":"影片長度",label1:t?"OOO min.":"OOO 分鐘"}],rules:{maxLength:e},twocolumn:!0,buttonName:a.formatMessage({defaultMessage:"自訂項目",id:"admin.product.自訂項目"})}},eE=(e,a)=>{let t=a?ep.PTTN_FLOAT:ep.PTTN_INTEGEAR,M=a?eM.K1:eM.U9;return[{type:"tab",tabs:[{label:e.formatMessage({defaultMessage:"區塊編輯",id:"admin.product.區塊編輯"}),fields:[{type:"div",children:(0,i.Y)(et.A,{title:e.formatMessage({defaultMessage:"基本設定",id:"admin.product.基本設定"}),children:e.formatMessage({defaultMessage:"設定專案名稱",id:"admin.product.設定專案名稱"})})},{name:"name",label:e.formatMessage({defaultMessage:"專案名稱 (必填)",id:"admin.product.專案名稱 (必填)"}),leftIcon:m.aFU,type:"uniq",helper:"".concat(e.formatMessage({defaultMessage:"專案ID",id:"admin.product.專案ID"}),": <%= id %>"),rules:{required:{value:!0,message:e.formatMessage({defaultMessage:"請輸入專案名稱",id:"admin.product.請輸入專案名稱"})}},defaultValue:e.formatMessage({defaultMessage:"新專案",id:"admin.product.新專案"})},{name:"variant",label:e.formatMessage({defaultMessage:"樣式",id:"admin.mailing.樣式"}),type:"radio",leftIcon:g.X$G,options:[{value:"default",label:e.formatMessage({defaultMessage:"看版式",id:"admin.mailing.看版式"})}],defaultValue:"default"},{type:"boolean",name:"isActive",label:e.formatMessage({defaultMessage:"開啟商品",id:"admin.product.開啟商品"}),leftIcon:u.e$p,defaultValue:!0},{type:"boolean",name:"isRepurchasable",label:e.formatMessage({defaultMessage:"可重複購買",id:"admin.product.可重複購買"}),leftIcon:r.mXj,helperTooltip:e.formatMessage({defaultMessage:"同意相同的 E-mail 帳號可重複購買商品",id:"admin.product.同意相同的 E-mail 帳號可重複購買商品"})}
1,{type:"div",children:(0,i.Y)(ek,{})},{type:"divider"},{type:"div",children:(0,i.Y)(et.A,{title:e.formatMessage({defaultMessage:"商品封面設定",id:"admin.product.商品封面設定"}),children:e.formatMessage({defaultMessage:"設定品名與封面圖片",id:"admin.product.設定品名與封面圖片"})})},{...(0,en.S_)(1280,640,e.formatMessage({defaultMessage:"圖片",id:"admin.product.圖片"}),e),type:"image"},{name:"title.text",label:e.formatMessage({defaultMessage:"商品標題",id:"admin.product.商品標題"}),defaultValue:a?"Product Title":"商品標題",type:"textarea"},{name:"title.align",label:e.formatMessage({defaultMessage:"對齊",id:"admin.index.blockEditor.blockFields.對齊"}),type:"radio",options:[{value:"left",label:e.formatMessage({defaultMessage:"置左對齊",id:"admin.index.blockEditor.blockFields.置左對齊"})},{value:"center",label:e.formatMessage({defaultMessage:"置中對齊",id:"admin.index.blockEditor.blockFields.置中對齊"})},{value:"right",label:e.formatMessage({defaultMessage:"置右對齊",id:"admin.index.blockEditor.blockFields.置右對齊"})}],defaultValue:"left",leftIcon:g.eih},{name:"productMode",label:e.formatMessage({defaultMessage:"商品類型",id:"admin.index.blockEditor.blockFields.商品類型"}),type:"radio",options:[{value:"normal",label:e.formatMessage({defaultMessage:"一般商品",id:"admin.index.blockEditor.blockFields.一般商品"})},{value:"free",label:e.formatMessage({defaultMessage:"免費商品",id:"admin.index.blockEditor.blockFields.免費商品"})}],defaultValue:"normal",leftIcon:n.cMR,parentWhen:["productMode","normal"]},{name:"price",leftIcon:n.cMR,label:e.formatMessage({defaultMessage:"商品價格",id:"admin.product.商品價格"}),placeholder:e.formatMessage({defaultMessage:"商品原價",id:"admin.product.商品原價"}),defaultValue:"1000",helper:"".concat(e.formatMessage({defaultMessage:"金額最低",id:"admin.product.金額最低"})," $").concat(M),rules:{pattern:{value:t,message:e.formatMessage({defaultMessage:"僅能輸入數字",id:"admin.product.僅能輸入數字"})},validate:(a,t)=>"free"===t.productMode||(a?a<M?"".concat(e.formatMessage({defaultMessage:"最低金額設定",id:"admin.product.最低金額設定"})," $").concat(M):!(a>eM.oc)||"".concat(e.formatMessage({defaultMessage:"最高金額設定",id:"admin.product.最高金額設定"})," $").concat(eM.oc.toLocaleString()).concat(e.formatMessage({defaultMessage:"元",id:"admin.product.元"})):e.formatMessage({defaultMessage:"金額必填",id:"admin.product.金額必填"}))},when:["productMode",["normal"]]},{name:"priceStatus",label:e.formatMessage({defaultMessage:"價格選項",id:"admin.product.價格選項"}),type:"radio",options:[{value:"isOriginal",label:e.formatMessage({defaultMessage:"原價",id:"admin.product.原價"})},{value:"isSale",label:e.formatMessage({defaultMessage:"顯示特價",id:"admin.countdownTimer.顯示特價"})},{value:"isCountdown",label:e.formatMessage({defaultMessage:"倒數價格",id:"admin.countdownTimer.倒數價格"}),helper:e.formatMessage({defaultMessage:"超過截止時間,會自動更改為「截止價格」",id:"admin.countdownTimer.超過截止時間,會自動更改為「截止價格」"})}],defaultValue:"isOriginal",leftIcon:c.HLW,when:["productMode",["normal"]],lastDependentValue:"isOriginal",noLastDependentValues:"isSale"},{type:"boolean",name:"isDeadlineDisplay",label:e.formatMessage({defaultMessage:"顯示截止時間",id:"admin.countdownTimer.顯示截止時間"}),leftIcon:null,when:[["priceStatus","isCountdown"],["productMode","normal"]],defaultValue:!0},{type:"boolean",name:"isCountdownDisplay",label:e.formatMessage({defaultMessage:"顯示倒數計時",id:"admin.countdownTimer.顯示倒數計時"}),leftIcon:null,when:[["priceStatus","isCountdown"],["productMode","normal"]],defaultValue:!0},{name:"countdownSetting",type:"fake-group",hint:e.formatMessage({defaultMessage:"截止時間一到,價格顯示會從倒數價格變成截止價格。",id:"admin.countdownTimer.倒數價格區塊說明"}),fields:[{type:"input-label",name:"countdownPrice",label:e.formatMessage({defaultMessage:"倒數價格",id:"admin.countdownTimer.倒數價格"}),leftIcon:null,when:["priceStatus","isCountdown"],helper:e.formatMessage({defaultMessage:"需為 $0 或 ${amount} 以上,且小於截止價格、小於原價",id:"admin.countdownTimer.倒數價格說明"},{amount:M}),rules:{validate:{validate:a=>a&&t.test(a)?0!==Number(a)&&Number(a)<M?"".concat(e.formatMessage({defaultMessage:"金額需為 ${amount} 以上,或為 $0",id:"admin.product.金額需為60以上或為0"},{amount:M}
1)):!(Number(a)>eM.oc)||"".concat(e.formatMessage({defaultMessage:"最高金額設定",id:"admin.product.最高金額設定"})," $").concat(eM.oc.toLocaleString()).concat(e.formatMessage({defaultMessage:"元",id:"admin.product.元"})):e.formatMessage({defaultMessage:"請輸入有效的數字",id:"admin.product.請輸入有效的數字"}),isRequired:(a,t)=>"isCountdown"!==t.priceStatus||null!=a&&""!==a||e.formatMessage({defaultMessage:"請輸入倒數價格",id:"admin.countdownTimer.請輸入倒數價格"}),validateCountdownPrice:(a,t)=>{var i;return Number(t.price)>=Number(a)?null!=t&&null!==(i=t.countdownSetting)&&void 0!==i&&!!i.every(e=>Number(e.deadlinePrice)>Number(a))||e.formatMessage({defaultMessage:"倒數價格需小於『截止價格』",id:"admin.countdownTimer.倒數價格需小於『截止價格』"}):e.formatMessage({defaultMessage:"倒數價格需小於『原價』",id:"admin.countdownTimer.倒數價格需小於『原價』"})}}}},{type:"input-label",name:"deadlinePrice",label:e.formatMessage({defaultMessage:"截止價格",id:"admin.countdownTimer.截止價格"}),leftIcon:null,when:["priceStatus","isCountdown"],helper:e.formatMessage({defaultMessage:"需大於倒數價格,且小於或等於原價",id:"admin.countdownTimer.截止價格說明"}),rules:{validate:{validate:a=>a&&t.test(a)?0!==Number(a)&&Number(a)<M?"".concat(e.formatMessage({defaultMessage:"金額需為 ${amount} 以上,或為 $0",id:"admin.product.金額需為60以上或為0"},{amount:M})):!(Number(a)>eM.oc)||"".concat(e.formatMessage({defaultMessage:"最高金額設定",id:"admin.product.最高金額設定"})," $").concat(eM.oc.toLocaleString()).concat(e.formatMessage({defaultMessage:"元",id:"admin.product.元"})):e.formatMessage({defaultMessage:"請輸入有效的數字",id:"admin.product.請輸入有效的數字"}),isRequired:(a,t)=>"isCountdown"!==t.priceStatus||null!=a&&""!==a||e.formatMessage({defaultMessage:"請輸入截止價格",id:"admin.countdownTimer.請輸入截止價格"}),validateDeadlinePrice:(a,t)=>{if("isCountdown"===t.priceStatus){var i;if(!(Number(t.price)>=Number(a)))return e.formatMessage({defaultMessage:"截止價格需小於『原價』",id:"admin.countdownTimer.截止價格需小於『原價』"});if(!(null==t?void 0:null===(i=t.countdownSetting)||void 0===i?void 0:i.every(e=>Number(e.countdownPrice)<Number(a))))return e.formatMessage({defaultMessage:"倒數價格需小於『截止價格』",id:"admin.countdownTimer.倒數價格需小於『截止價格』"})}return!0}}}},{type:"time-selector",name:"countdownTime",fieldLabel:e.formatMessage({defaultMessage:"截止時間",id:"admin.countdownTimer.截止時間"}),placeholder:e.formatMessage({defaultMessage:"請選擇截止時間",id:"admin.countdownTimer.請選擇截止時間"}),timeCaption:e.formatMessage({defaultMessage:"截止時間",id:"admin.countdownTimer.截止時間"}),compact:!0,minTime:new Date,when:["priceStatus","isCountdown"],rules:{validate:{isRequired:(a,t)=>"isCountdown"!==t.priceStatus||!!a||e.formatMessage({defaultMessage:"請輸入截止時間",id:"admin.countdownTimer.請輸入截止時間"})}}}],when:[["priceStatus","isCountdown"],["productMode","normal"]],noAnimation:!0,lastDependentValue:!0,defaultValue:[{countdownPrice:"600",deadlinePrice:"800"}],hideAddButton:!0},{name:"sale",leftIcon:n.cMR,label:e.formatMessage({defaultMessage:"特價價格",id:"admin.product.特價價格"}),placeholder:e.formatMessage({defaultMessage:"特價價格",id:"admin.product.特價價格"}),defaultValue:"600",helper:"".concat(e.formatMessage({defaultMessage:"金額需為 ${amount} 以上,或為 $0",id:"admin.product.金額需為60以上或為0"},{amount:M})),rules:{pattern:{value:t,message:e.formatMessage({defaultMessage:"請輸入有效的數字",id:"admin.product.請輸入有效的數字"})},validate:{isLower:(a,i)=>{if("isOriginal"===i.priceStatus||"isCountdown"===i.priceStatus||"free"===i.productMode)return!0;if(!a||!t.test(a))return e.formatMessage({defaultMessage:"請輸入有效的數字",id:"admin.product.請輸入有效的數字"});let l=Number(a)||0;return 0!==l&&l<M?e.formatMessage({defaultMessage:"金額需為 ${amount} 以上,或為 $0",id:"admin.product.金額需為60以上或為0"},{amount:M}):!(l>=+i.price)||e.formatMessage({defaultMessage:"特價金額不能高於原價",id:"admin.product.特價金額不能高於原價"})}}},when:[["priceStatus",["isSale"]],["productMode",["normal"]]]},{name:"description",label:e.formatMessage({defaultMessage:"商品簡介(選填)",id:"admin.product.商品簡介(選填)"}),type:"richtext",placeholder:e.formatMessage({defaultMessage:"商品簡介(選填)",id:"admin.product.商品簡介(選填)"}),defaultValue:"zh"===e.locale?'<div><p style="text-align:start">商品簡介</p><p style="text-align:start">*本商品可開立二/三聯式電子發票</p>\n               </div>':"Product Description"},{type:"boolean",name:"isRating",label:e.formatMessage({defaultMessage:"買家評論",i
1d:"admin.comments.買家評論"}),defaultValue:!0,leftIcon:s.gt3,rightFields:[!a&&{type:"tab-control-button",name:"tabControlButton",buttonName:e.formatMessage({defaultMessage:"評論設定",id:"admin.comments.評論設定"}),tabIndex:4}].filter(Boolean)},{type:"boolean",name:"isSoldQuantity",label:e.formatMessage({defaultMessage:"銷售數量",id:"admin.product.銷售數量"}),defaultValue:!0,leftIcon:s.AsH},{name:"buttonName",label:e.formatMessage({defaultMessage:"按鈕文字",id:"admin.product.按鈕文字"}),leftFields:[{type:"icon",name:"icon",label:"Icon"}],rules:{maxLength:{value:100,message:e.formatMessage({defaultMessage:"上限100字喔",id:"admin.product.上限100字喔"})}},defaultValue:a?"Awesome, I want this!":"真棒,我要這個!"},{type:"divider"},{type:"div",children:(0,i.Y)(et.A,{title:e.formatMessage({defaultMessage:"庫存限制",id:"admin.product.庫存限制"}),children:e.formatMessage({defaultMessage:"商品庫存設定",id:"admin.product.商品庫存設定"})})},{type:"boolean",name:"isStock",label:e.formatMessage({defaultMessage:"庫存限制",id:"admin.product.庫存限制"}),defaultValue:"",leftIcon:f.dSh},{name:"stock",leftIcon:d.QXu,placeholder:e.formatMessage({defaultMessage:"庫存數量",id:"admin.product.庫存數量"}),defaultValue:1e3,helper:(0,i.Y)(em,{}),rules:{validate:{isRequired:(a,t)=>!t.isStock||!!a||e.formatMessage({defaultMessage:"請輸入庫存數量",id:"admin.product.請輸入庫存數量"})}},when:["isStock",!0]},{type:"boolean",name:"isShowStock",label:e.formatMessage({defaultMessage:"顯示庫存",id:"admin.product.顯示庫存"}),defaultValue:"",leftIcon:s.Ny1,when:["isStock",!0]},{name:"stockButtonName",leftIcon:c.Yr8,placeholder:e.formatMessage({defaultMessage:"商品完售時顯示文字",id:"admin.product.商品完售時顯示文字"}),defaultValue:e.formatMessage({defaultMessage:"商品已售完",id:"admin.product.商品已售完"}),helper:e.formatMessage({defaultMessage:"將會於剩餘數量為 0 時顯示,並且關閉付款按鈕",id:"admin.product.將會於剩餘數量為 0 時顯示,並且關閉付款按鈕"}),when:["isStock",!0]}]},{label:e.formatMessage({defaultMessage:"商品介紹",id:"admin.product.商品介紹"}),fields:[{type:"div",children:(0,i.Y)(et.A,{title:e.formatMessage({defaultMessage:"商品圖設定",id:"admin.product.商品圖設定"}),children:e.formatMessage({defaultMessage:"可選擇沿用封面圖,或自訂多張圖片",id:"admin.product.可選擇沿用封面圖,或自訂多張圖片"})})},{name:"product.imageMode",label:e.formatMessage({defaultMessage:"商品圖片",id:"admin.product.商品圖片"}),type:"radio",options:[{label:e.formatMessage({defaultMessage:"長方形圖片",id:"admin.product.長方形圖片"}),value:"banner"},{label:e.formatMessage({defaultMessage:"方形圖片",id:"admin.product.方形圖片"}),value:"product-image"}],defaultValue:"banner",leftIcon:g.UXq,parentWhen:["product.imageMode","banner"]},{type:"boolean",name:"product.isCover",label:e.formatMessage({defaultMessage:"沿用封面圖片",id:"admin.product.沿用封面圖片"}),defaultValue:!0,leftIcon:null,when:["product.imageMode",["banner"]]},{name:"items",type:"group",label:e.formatMessage({defaultMessage:"圖片",id:"admin.index.blockEditor.blockFields.圖片"}),fields:[(0,en.S_)(640,320,"",e)],when:["product.imageMode",["banner"]],noAnimation:!0},{name:"items",type:"group",label:e.formatMessage({defaultMessage:"圖片",id:"admin.index.blockEditor.blockFields.圖片"}),fields:[(0,en.S_)(320,320,"",e)],when:["product.imageMode",["product-image"]],noAnimation:!0},{type:"div",children:(0,i.Y)(et.A,{title:e.formatMessage({defaultMessage:"商品影片",id:"admin.product.商品影片"}),children:e.formatMessage({defaultMessage:"用影片介紹你的商品",id:"admin.product.用影片介紹你的商品"})})},{type:"boolean",name:"productVideo.isVideo",label:e.formatMessage({defaultMessage:"商品影片",id:"admin.product.商品影片"}),defaultValue:"",leftIcon:o.QYs,parentWhen:["productVideo.isVideo",[!0]]},{name:"productVideo.url",label:e.formatMessage({defaultMessage:"YouTube 影片連結",id:"admin.mailing.YouTube 影片連結"}),leftIcon:n.I1_,when:["productVideo.isVideo",!0]},{...(0,en.S_)(1920,1080,e.formatMessage({defaultMessage:"自訂縮圖",id:"admin.mailing.自訂縮圖"}),e,"productVideo.image"),when:["productVideo.isVideo",!0]},{name:"productVideo.text",label:e.formatMessage({defaultMessage:"影片說明文字",id:"admin.mailing.影片說明文字"}),when:["productVideo.isVideo",!0]},{type:"divider"},{type:"div",children:(0,i.Y)(et.A,{title:e.formatMessage({defaultMessage:"商品介紹",id:"admin.product.商品介紹"}),children:e.formatMessage({defaultMessage:"說明商品細節與規格",id:"admin.product.說明商品細節與規格"})})},{type:"boolean",name:"isSyncDescription",label:e.formatMessage({defaultMessage:"顯示商品簡介",id:"admin.product.顯示商品簡介"}),defaultValue:!0,leftIcon:c.sPF},{name:"product.description",label:e.formatMessage({defaultMessage:"商品介紹",id:"admin.product.商品介紹"}),type:"richtext",defaultValue:a?"Product Description":"商品完整說明"},{type:"boolean",name:"product.spec",label:e.formatMessage({defaultMessage:"規格說明",id:"admin.product.規格說明"}),defaultValue:!0,leftIcon:o.ChF,parentWhen:["product.spec",[!0,!1]]},{...eT(5,e,a)}
1,{type:"divider"},{type:"div",children:(0,i.Y)(et.A,{title:e.formatMessage({defaultMessage:"結帳設定",id:"admin.product.結帳設定"}),children:e.formatMessage({defaultMessage:"設定結帳填寫資訊",id:"admin.product.設定結帳填寫資訊"})})},{type:"boolean",name:"isPhone",label:e.formatMessage({defaultMessage:"聯絡電話",id:"admin.product.聯絡電話"}),defaultValue:!0,leftIcon:d.qd6},{...ef(5,e,a)},{type:"boolean",name:"enableCoupon",label:(0,i.Y)(l.HStack,{children:(0,i.Y)("span",{children:(0,i.Y)(p.A,{defaultMessage:"使用折扣碼",id:"admin.product.使用折扣碼"})})}),leftIcon:g.iRR,rightFields:[{name:"button",type:"button",buttonName:e.formatMessage({defaultMessage:"設定折扣碼",id:"admin.product.設定折扣碼"}),href:"/admin/product/projects"}],when:["productMode",["normal"]],noAnimation:!0},...a?[]:[{type:"divider"},{type:"div",children:(0,i.Y)(et.A,{title:e.formatMessage({defaultMessage:"國際收款",id:"admin.product.國際收款"}),children:e.formatMessage({defaultMessage:"開啟後,可收取國際款項",i
1d:"admin.product.開啟後,可收取國際款項"})})},{name:"customLocale",label:"結帳語言",type:"radio",options:[{value:"zh",label:"中文"},{value:"en",label:"英文",helper:eu.s}],defaultValue:"zh",helper:"若選擇英文結帳,會自動啟用 PayPal 收款,且關閉台灣信用卡金流。",tier:ex.fb.PREMIUM,leftIcon:c.ArQ,parentWhen:["customLocale","zh"]},{...eu.O,when:["customLocale","zh"]}]]},{label:e.formatMessage({defaultMessage:"商品設定",id:"admin.product.商品設定"}),fields:[{type:"div",children:(0,i.Y)(et.A,{title:e.formatMessage({defaultMessage:"感謝設定",id:"admin.mailing.感謝設定"}),children:e.formatMessage({defaultMessage:"以下內容會於購買完成後,顯示於畫面上、並以 E-mail 方式寄送。提醒您:任何內容更動,皆會同步更新至已購買者收到的連結。",id:"admin.mailing.以下內容會於購買完成後,顯示於畫面上、並以 E-mail 方式寄送。提醒您:任何內容更動,皆會同步更新至已購買者收到的連結。"})})},{name:"thanks.imageMode",label:e.formatMessage({defaultMessage:"商品圖片",id:"admin.product.商品圖片"}),type:"radio",options:[{label:e.formatMessage({defaultMessage:"無感謝圖",id:"admin.product.無感謝圖"}),value:"noImage"},{label:e.formatMessage({defaultMessage:"沿用封面圖",id:"admin.product.沿用封面圖"}),value:"banner"},{label:e.formatMessage({defaultMessage:"自訂圖片",id:"admin.product.自訂圖片"}),value:"thanks-image"}],defaultValue:"banner",leftIcon:g.UXq,parentWhen:["thanks.imageMode",["thanks-image"]]},{...(0,en.S_)(1280,640,e.formatMessage({defaultMessage:"回饋圖片",id:"admin.product.回饋圖片"}),e,"thanks.image"),when:["thanks.imageMode","thanks-image"]},{name:"thanks.content",label:e.formatMessage({defaultMessage:"感謝文字",id:"admin.product.感謝文字"}),type:"richtext",defaultValue:(a?'<div><h3 style="text-align:start"><strong>Thank you for your purchase.</strong></h3><p></p><p style="text-align:start">Template 1. The following is the product you purchased. We will also send it to your E-mail. If not received, please check the "Promotions" mailbox.</p><p style="text-align:start">Template 2. The following is the registration link for this event. Please complete it, and we will contact you. </p>\n                  <p></p>\n                  <p>Template 3. We have received your payment and will contact you as soon as possible.</p>\n                  <p></p>\n                  <p>Template 4. If you like this product, please scroll to the bottom and give us a \uD83C\uDF1F 5-star review! It will be a great help and encouragement for us!</p></div>':'<div><h3 style="text-align:start"><strong>非常感謝您的購買</strong></h3><p></p><p style="text-align:start">【範本1】以下是您購買的商品,我們將同步寄送到您的 E-mail;如果沒有收到,請於「促銷內容」查看。</p><p style="text-align:start">【範本2】以下是本次活動的報名連結,請完整填寫,我們將與您聯繫。</p><p>【範本3】已經收到您的款項,會盡快與您聯繫。</p><p>【範本4】如果你喜歡此商品,請記得給我一個 \uD83C\uDF1F 5 星好評,對我會是非常大的幫助與鼓勵!</p></div>').replace(/\n/g,"")},{type:"div",children:(0,i.Y)(et.A,{title:e.formatMessage({defaultMessage:"商品內容",id:"admin.product.商品內容"}),children:e.formatMessage({defaultMessage:"開啟後,可以提供使用者影片、雲端連結等自訂商品內容。",id:"admin.product.開啟後,可以提供使用者影片、雲端連結等自訂商品內容。"})})},{type:"boolean",name:"product.isProductContent",label:e.formatMessage({defaultMessage:"商品內容",id:"admin.product.商品內容"}),defaultValue:!0,leftIcon:c.O7Q,parentWhen:["product.isProductContent",!0]},{name:"productContents",type:"group",label:e.formatMessage({defaultMessage:"商品內容",id:"admin.product.商品內容"}),fields:[{name:"type",type:"radio",label:e.formatMessage({defaultMessage:"商品內容",id:"admin.product.商品內容"}),options:[{value:"isLink",label:e.formatMessage({defaultMessage:"雲端連結",id:"admin.mailing.雲端連結"})},{value:"isForm",label:e.formatMessage({defaultMessage:"線上資源",id:"admin.product.線上資源"})},{value:"isEmebedVideo",label:e.formatMessage({defaultMessage:"嵌入影片",id:"admin.product.嵌入影片"})}],defaultValue:"isLink",leftIcon:g.X7T},{name:"emebedVideo",label:e.formatMessage({defaultMessage:"YouTube/Vimeo 影片連結",id:"admin.product.YouTube 影片連結"}),leftIcon:n.I1_,when:[".type","isEmebedVideo"],rules:{validate:{
1isRequired:(a,t)=>ec({value:a,allData:t,contentType:"isEmebedVideo",key:"emebedVideo",errorMessage:e.formatMessage({defaultMessage:"請輸入影片連結",id:"admin.product.請輸入影片連結"}),isValueValid:e=>ep.PTTN_YOUTUBE.test(e)||ep.PTTN_VIMEO.test(e)}),format:(a,t)=>{var i;let l=null===(i=t.productContents)||void 0===i?void 0:i.find(e=>e.emebedVideo===a&&"isEmebedVideo"===e.type);return(null==l?void 0:l.type)!=="isEmebedVideo"||ep.PTTN_YOUTUBE.test(a)||ep.PTTN_VIMEO.test(a)||e.formatMessage({defaultMessage:"請輸入影片連結",id:"admin.product.請輸入影片連結"})}}}},{...(0,en.S_)(1920,1080,e.formatMessage({defaultMessage:"自訂縮圖",id:"admin.mailing.自訂縮圖"}),e,"emebedImage",[".type","isEmebedVideo"])},{name:"emebedText",label:e.formatMessage({defaultMessage:"影片說明文字",id:"admin.mailing.影片說明文字"}),when:[".type","isEmebedVideo"]},{name:"linkText",label:e.formatMessage({defaultMessage:"按鈕文字",id:"admin.mailing.按鈕文字"}),leftFields:[{type:"icon",name:"linkIcon",label:"Icon"}],when:[".type","isLink"],defaultValue:a?"Download File":e.formatMessage({defaultMessage:"檔案下載",id:"admin.product.檔案下載"}),rules:{validate:{isRequired:(a,t)=>ec({value:a,allData:t,contentType:"isLink",key:"linkText",errorMessage:e.formatMessage({defaultMessage:"請輸入按鈕文字",id:"admin.product.請輸入按鈕文字"})})}}},{name:"link",label:e.formatMessage({defaultMessage:"檔案下載",id:"admin.product.檔案下載"}),when:[".type","isLink"],leftIcon:d.gwM,rules:{validate:{isRequired:(a,t)=>ec({value:a,allData:t,contentType:"isLink",key:"link",errorMessage:e.formatMessage({defaultMessage:"請輸入雲端下載連結",id:"admin.product.請輸入雲端下載連結"})})}}},{name:"formText",label:e.formatMessage({defaultMessage:"開啟檔案",id:"admin.product.開啟檔案"}),leftFields:[{type:"icon",name:"formIcon",label:"Icon"}],when:[".type","isForm"],defaultValue:a?"Open File":"開啟檔案",rules:{validate:{isRequired:(a,t)=>ec({value:a,allData:t,contentType:"isForm",key:"formText",errorMessage:e.formatMessage({defaultMessage:"請輸入按鈕文字",id:"admin.product.請輸入按鈕文字"})})}}},{name:"form",label:e.formatMessage({defaultMessage:"開啟檔案",id:"admin.product.開啟檔案"}),when:[".type","isForm"],leftIcon:d.gwM,defaultValue:a?"https://portaly.notion.site/Portaly-x-Notion-Page-Example-ab6405b652ad45b5a33ea84c2504552f":"https://portaly.notion.site/Portaly-x-Notion-ee775ad51cb045488bc429d90ac091bc",rules:{validate:{isRequired:(a,t)=>ec({value:a,allData:t,contentType:"isForm",key:"form",errorMessage:e.formatMessage({defaultMessage:"請輸入連結",id:"admin.product.請輸入連結"})})}}}],when:["product.isProductContent",!0]},{name:"thanks.alert",label:e.formatMessage({defaultMessage:"版權聲明",id:"admin.product.版權聲明"}),type:"richtext",defaultValue:a?"<p>Copyright Notice: The product you purchased is owned by  <%= name %>, and may not be reproduced, copied, distributed, sold, modified, or used to create derivative works without authorization. It may not be publicly disclosed or used for commercial purposes. This product is protected by national copyright laws, and violators will be held legally responsible..</p>":"<p>版權聲明:您購買之本商品為<%= name %>版權所有,未經授權不得轉載、複製、分發、出售、修改或創建類似產品,亦不得自行公開或作為商業使用。本商品受到本國著作權法律的保護,任何違反者都將承擔法律責任。</p>"}],showSaveButton:!0},{label:e.formatMessage({defaultMessage:"嵌入設定",id:"admin.product.嵌入設定"}),fields:[{type:"div",children:(0,i.Y)(ed.A.Consumer,{children:e=>{let{profileId:a,blockId:t}=e;return(0,i.Y)(ea.t_,{children:(0,i.Y)(el,{noModal:!0,profileId:a,projectId:t})})}})}],mustSaveBeforeLoad:!0},{label:e.formatMessage({defaultMessage:"評論設定",id:"admin.comments.評論設定"}),fields:[{type:"div",children:(0,i.Y)(et.A,{title:e.formatMessage({defaultMessage:"評論設定",id:"admin.comments.評論設定"}),children:e.formatMessage({defaultMessage:"開啟後,將會於商品頁面顯示星星評價以及「查看評論」按鈕。",id:"admin.comments.開啟後,將會於商品頁面顯示星星評價以及「查看評論」按鈕。"})})},{type:"boolean",leftIcon:s.gt3,name:"isRating",label:e.formatMessage({defaultMessage:"買家評論",i
1d:"admin.comments.買家評論"})},eg,{type:"comment",name:"commentData"}]}].filter(Boolean),when:["category","default"],noAnimation:!0}]},eI=e=>{let a="en"===e.locale;return{default:eE(e,a),live:eh(e,a)}}},478:(e,a,t)=>{t.d(a,{A:()=>i});let i=(0,t(96540).createContext)({blockId:null,block:{}})},70083:(e,a,t)=>{t.d(a,{A:()=>i});let i=(0,t(96540).createContext)({onUpdate:()=>{},onToggle:()=>{},onDelete:()=>{},onDuplicate:()=>{},canDuplicate:!0,onPin:()=>{},onUnPin:()=>{}})},96638:(e,a,t)=>{t.d(a,{KE:()=>eH,Ay:()=>eJ,To:()=>eX,S_:()=>eU});var i=t(2445),l=t(27006),d=t(86715),n=t(57004),o=t(72209),s=t(26923),r=t(77037),m=t(89571),u=t(94650),c=t(33877),g=t(84961),f=t(6442),p=t(81688),M=t(63959);let b=e=>{let{blockId:a,profileId:t,noModal:d,children:n=null,isDisabled:o}=e,s=(0,f.A)(),r=(0,M.A)(t),{isOpen:m,onClose:u,onOpen:g}=(0,l.useDisclosure)(),b=s.formatMessage({id:"admin.comments.嵌入評論區塊",defaultMessage:"嵌入評論區塊"}),h=s.formatMessage({id:"admin.comments.評論區塊",defaultMessage:"評論區塊"});return(0,i.FD)(i.FK,{children:[d||"function"!=typeof n?!d&&(0,i.Y)(l.Button,{onClick:g,size:"sm",variant:"outline",leftIcon:(0,i.Y)(c.RZ7,{}),children:s.formatMessage({defaultMessage:"設定",id:"admin.account.2fa.設定"})}):n({onClick:g}),(0,i.Y)(p.A,{isOpen:m,onClose:u,embedUrl:"block/".concat(r,"/").concat(a),title:b,label:h,noModal:d,isDisabled:o})]})};var h=t(95132),v=t(58156),y=t.n(v),A=t(96540),w=t(49785),k=t(33644),x=t(98523),T=t(25427),E=t(478),I=t(70083),F=t(47171),S=t(4756),C=t(10582),Y=t(53578),D=t(59324),P=t(14120),V=t(22405),B=t(99624),O=t(79653);let L=e=>Object.entries(e).reduce((e,a)=>{let[t,i]=a;return e[t]=null!=i?i:(0,V.deleteField)(),e},{}),R=(e,a)=>{let t=(0,B.jt)(),i=(0,V.doc)(t,"calendarEvents",e,"limitedTimeEvents",a),{data:l=null}=(0,B.rt)(i),d=async e=>(0,V.setDoc)(i,(0,O.A)(e)),n=async e=>{let a=L(e);return(0,V.setDoc)(i,{...a,deletedAt:(0,V.deleteField)()},{merge:!0})},o=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date().toISOString(),a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=L(a);return(0,V.setDoc)(i,{...t,deletedAt:e},{merge:!0})};return{isSet:!!(null==l?void 0:l.eventId),isActive:(null==l?void 0:l.eventId)&&!l.deletedAt,data:l,createEvent:d,patchEvent:n,deleteEvent:o}};var N=t(95854);let U=e=>{let{data:a,error:t,isLoading:i}=(0,D.Ay)(e?"/api/limitedTimeEvent/".concat(e,"/emails?state=all"):null,async()=>{if(!e)return{emails:[]};let[a,t]=await Promise.all([N.c.getEmails(e,"beforeEvent"),N.c.getEmails(e,"afterEvent")]),i=[...a.emails||[],...t.emails||[]],l=new Map;return i.forEach(e=>{e.email&&!l.has(e.email)&&l.set(e.email,{email:e.email})}),{emails:Array.from(l.values())}},{revalidateOnFocus:!1,revalidateOnReconnect:!1});return{emails:(null==a?void 0:a.emails)||[],isLoading:i,error:t||null}};var _=t(84757),G=t(86913),W=t(77381),z=t(78846),H=t(19723);let q=e=>{let{isLoading:a=!0,withActionConfirm:t=!1,deletedAt:d="",onClick:n=()=>{}}=e,o=(0,f.A)(),s=d?(0,W.A)((0,C.A)(d),"yyyy/MM/dd hh:mm"):null;return(0,i.FD)(l.VStack,{width:"100%",spacing:2,alignItems:"stretch",children:[t?(0,i.Y)(z.A,{CustomComponent:H.A,mt:0,title:o.formatMessage({defaultMessage:"確認建立?",id:"admin.limitedTimeEvent.確認建立?"}),body:o.formatMessage({defaultMessage:"將內容建立至您的 Google 行事曆,並發信通知參與者。",id:"admin.limitedTimeEvent.將內容建立至您的 Google 行事曆,並發信通知參與者。"}),isLoading:a,onClick:n,children:o.formatMessage({defaultMessage:"建立行事曆",id:"admin.limitedTimeEvent.建立行事曆"})}):(0,i.Y)(H.A,{mt:0,isLoading:a,onClick:n,children:o.formatMessage({defaultMessage:"建立行事曆",id:"admin.limitedTimeEvent.建立行事曆"})}),s?(0,i.Y)(l.Text,{color:"gray.500",fontSize:"sm",children:o.formatMessage({defaultMessage:"上次刪除時間:{displayDeletedAt}",id:"admin.limitedTimeEvent.上次刪除時間:{displayDeletedAt}"},{displayDeletedAt:s})}):(0,i.FD)(l.Text,{color:"gray.500",fontSize:"sm",display:"flex",alignItems:"center",children:[(0,i.Y)(l.Icon,{as:c.ItP,mr:1,color:"red.500"}),(0,i.Y)(l.Text,{as:"span",children:o.formatMessage({defaultMessage:"提醒:你的行事曆尚未建立",id:"admin.limitedTimeEvent.提醒:你的行事曆尚未建立"})})]})]})};var j=t(8548);let X=e=>{let{eventMetaData:a,isLoading:t=!1,isSync:d=!1,showSyncMessage:n=!1,onUpdateButtonClick:o=()=>{},onDeleteButtonClick:s=()=>{}}=e,m=(0,f.A)(),u=(null==a?void 0:a.updatedAt)&&n?(0,W.A)((0,C.A)(a.updatedAt),"yyyy/MM/dd hh:mm"):null;return(0,i.FD)(l.VStack,{width:"100%",spacing:2,alignItems:"stretch",children:[(0,i.FD)(l.HStack,{children:[(0,i.Y)(z.A,{CustomComponent:H.A,mt:0,leftIcon:(0,i.Y)(c.Yvo,{}),title:m.formatMessage({defaultMessage:"確認更新?",id:"admin.limitedTimeEvent.確認更新?"}),body:m.formatMessage({defaultMessage:"將內容同步至您的 Google 行事曆。",
1id:"admin.limitedTimeEvent.將內容同步至您的 Google 行事曆。"}),isLoading:t,onClick:o,children:m.formatMessage({defaultMessage:"更新行事曆",id:"admin.limitedTimeEvent.更新行事曆"})}),(0,i.Y)(j.A,{variant:"link",color:"GUI.purple.500",_hover:{textDecoration:"underline !important"},_focus:{textDecoration:"underline !important"},isExternal:!0,href:(null==a?void 0:a.eventHtmlLink)||void 0,children:m.formatMessage({defaultMessage:"預覽",id:"admin.limitedTimeEvent.預覽"})}),(0,i.Y)(z.A,{title:m.formatMessage({defaultMessage:"確認刪除?",id:"admin.limitedTimeEvent.確認刪除?"}),body:m.formatMessage({defaultMessage:"刪除後,系統將無法還原已邀請的使用者。",id:"admin.limitedTimeEvent.刪除後,系統將無法還原已邀請的使用者。"}),variant:"link",colorScheme:"gray",fontWeight:"400",isLoading:t,onClick:s,children:m.formatMessage({defaultMessage:"刪除",id:"admin.limitedTimeEvent.刪除"})})]}),u&&(0,i.Y)(l.Text,{color:"gray.500",fontSize:"sm",display:"flex",alignItems:"center",children:d?(0,i.FD)(i.FK,{children:[(0,i.Y)(l.Icon,{as:r.A7C,mr:1,color:"GUI.green.500"}),(0,i.Y)(l.Text,{as:"span",children:m.formatMessage({defaultMessage:"內容已更新,上次更新時間:{displayUpdatedAt}",id:"admin.limitedTimeEvent.內容已更新,上次更新時間:{displayUpdatedAt}"},{displayUpdatedAt:u})})]}):(0,i.FD)(i.FK,{children:[(0,i.Y)(l.Icon,{as:c._Jm,mr:1,color:"red.500"}),(0,i.Y)(l.Text,{as:"span",children:m.formatMessage({defaultMessage:"內容未更新,上次更新時間:{displayUpdatedAt}",id:"admin.limitedTimeEvent.內容未更新,上次更新時間:{displayUpdatedAt}"},{displayUpdatedAt:u})})]})})]})},Q=e=>e?e.replace(/\>[\r\n ]+\</g,"><").replace(/(<br\s*\/?>)/g,"<br>").replace(/(<.*?>)|\s+/g,(e,a)=>a||" ").trim():"",$=e=>{let{providerName:a="calendar",getPrefixedFieldKey:t,editingDataUpdatedAt:d=null,onFieldsValidate:n=async()=>!0,onEventCreated:o=()=>{},onEventUpdated:s=()=>{},onPersistFormData:r=async()=>{},eventId:m,enableCalendarFieldKey:u}=e,{profileId:c}=(0,A.useContext)(P.A),{getValues:g}=(0,w.xW)(),f=(0,A.useCallback)(()=>{let e=g(t("dateTimeRange"))||{};return{title:g(t("title")),description:Q(g(t("description"))),startDateTime:e.startTime,startTimeZone:g(t("startTimeZone")),endDateTime:e.endTime,endTimeZone:g(t("endTimeZone")),enableGoogleMeet:g(t("enableGoogleMeet"))||!1}},[t,g]),{isReady:p,getEvent:M,createEvent:b,patchEvent:h,deleteEvent:v}=(0,_.A)(c,a),{isSet:y,isActive:k,data:x,createEvent:T,patchEvent:E,deleteEvent:I}=R(c,m),{emails:F,isLoading:S}=U(m),{data:V,isLoading:B,error:O,mutate:L}=(0,D.Ay)(p&&y&&(null==x?void 0:x.eventId)?"/profiles/".concat(c,"/calendars/primary/events/").concat(x.eventId):null,async()=>M(x.eventId),{revalidateIfStale:!1,revalidateOnMount:!0,refreshInterval:2e4});(0,A.useEffect)(()=>{if(!V)return;let{eventId:e,eventHtmlLink:a,meetLink:t}=V;E({eventId:e,eventHtmlLink:a,meetLink:t}).catch(e=>console.error(e))},[V,E]),(0,A.useEffect)(()=>{if((null==O?void 0:O.status)===404){let e=(null==O?void 0:O.data)||{};I(e.updatedAt||new Date().toISOString(),e).catch(e=>console.error(e))}},[O,I]);let[N,W]=(0,A.useState)(!1),z=(0,A.useMemo)(()=>{if(!V)return!1;let{title:e,description:a,enableGoogleMeet:t,startDateTime:i,startTimeZone:l,endDateTime:d,endTimeZone:n}=f(),{title:o,description:s,meetLink:r,start:m,end:u}=V||{};return e===(o||"")&&(0,G.A)(t)===!!r&&Q(a)===s&&(!l||null==m||!m.dateTime||!1!==(0,Y.A)((0,C.A)(i),(0,C.A)(null==m?void 0:m.dateTime))&&l===(null==m?void 0:m.timeZone))&&(!d||null==u||!u.dateTime||!1!==(0,Y.A)((0,C.A)(d),(0,C.A)(null==u?void 0:u.dateTime))&&n===(null==u?void 0:u.timeZone))},[d,V,f]),H=async()=>{if(await n()===!0){W(!0);try{let e=await b({...f(),attendees:F});await T(e),o(e),await r()}catch(e){console.error(e)}finally{W(!1)}}},j=async()=>{if(await n()===!0)try{let e=await h(x.eventId,f());await E(e),s(e),await r(),await L()}catch(e){console.error(e)}},$=async()=>{try{await v(x.eventId),await I(new Date().toISOString())}catch(e){console.error(e)}};return((0,A.useEffect)(()=>()=>{!1===g(u)&&k&&$().catch(e=>{console.error(e)})},[u,g,k]),m)?(0,i.Y)(i.FK,{children:k?(0,i.Y)(X,{isLoading:!p,isSync:z,showSyncMessage:!1===B,eventMetaData:x,onUpdateButtonClick:j,onDeleteButtonClick:$}):(0,i.Y)(q,{isLoading:!p||S||N,withActionConfirm:F.length>0,deletedAt:y&&(null==x?void 0:x.deletedAt)||"",onClick:H})}):(0,i.Y)(l.VStack,{width:"100%",spacing:2,alignItems:"stretch",children:(0,i.Y)(l.Text,{color:"gray.500",fontSize:"sm",children:"建立活動後才能啟用 Google 行事曆。"})})};var J=t(7129),K=t(81984),Z=t(25997),ee=t(82042),ea=t(58065),et=t(70382),ei=t(25327);let el=(e,a)=>[{name:"enableGoogleMeet",type:"confirm-boolean",label:(0,i.FD)(l.HStack,{children:[(0,i.Y)("p",{children:(0,i.Y)(ea.A,{defaultMessage:"Google Meet 會議",id:"admin.limitedTimeEvent.Google Meet 會議"})}),(0,i.Y)(et.A,{children:(0,i.FD)(l.UnorderedList,{mt:"1",fontSize:"sm",color:"gray.500",children:[(0,i.Y)(l.ListItem,{children:(0,i.Y)(ea.A,{defaultMessage:"Google Meet 會議的參與人數上限為 100 人。",id:"admin.limitedTimeEvent.Google Meet 會議的參與人數上限為 100 人。"})},"Google Meet 會議的參與人數上限為 100 人。"),(0,i.Y)(l.ListItem,{children:(0,i.Y)(ea.A,{defaultMessage:"若您的 Google 帳號未付費升級帳號,且有 3 位以上的參與者時,會議時間將限制 1 小時。",id:"admin.limitedTimeEvent.若您的 Google 帳號未付費升級帳號,且有 3 位以上的參與者時,會議時間將限制 1 小時。"})},"若您的 Google 帳號未付費升級帳號,且有 3 位以上的參與者時,會議時間將限制 1 小時。")]})})]}),confirmTitle:e.formatMessage({defaultMessage:"確認關閉?",id:"admin.limitedTimeEvent.確認關閉?"}),confirmBody:e.formatMessage({defaultMessage:"每次啟用 Google Meet 會議時,系統將生成全新的會議連結。",id:"admin.limitedTimeEvent.每次啟用 Google Meet 會議時,系統將生成全新的會議連結。"}),confirmOnChecked:!1,confirmColorScheme:"red",defaultValue:!1,leftIcon:ee.xwM,helper:(0,i.Y)(ei.A,{})},{type:"time-range",name:"dateTimeRange",defaultValue:{startTime:(0,J.A)((0,h.A)(new Date,1)).toISOString(),endTime:(0,J.A)((0,h.A)(new Date,2)).toISOString()},minDate:new Date,label:e.formatMessage({defaultMessage:"課程時間",id:"admin.limitedTimeEvent.課程時間"}),labelForDate:e.formatMessage({defaultMessage:"日期",id:"admin.limitedTimeEvent.日期"}),labelForStartTime:e.formatMessage({defaultMessage:"開始時間",id:"admin.limitedTimeEvent.開始時間"}),labelForEndTime:e.formatMessage({defaultMessage:"結束時間",id:"admin.limitedTimeEvent.結束時間"}),startTimeCaption:e.formatMessage({defaultMessage:"開始時間",id:"admin.limitedTimeEvent.開始時間"}),endTimeCaption:e.formatMessage({defaultMessage:"結束時間",id:"admin.limitedTimeEvent.結束時間"}),placeholder:e.formatMessage({defaultMessage:"請選擇日期",id:"admin.limitedTimeEvent.請選擇日期"}),placeholderForStartTime:e.formatMessage({defaultMessage:"請選擇開始時間",id:"admin.limitedTimeEvent.請選擇開始時間"}),placeholderForEndTime:e.formatMessage({defaultMessage:"請選擇結束時間",id:"admin.limitedTimeEvent.請選擇結束時間"}
1),rules:{validate:{isRequired:a=>{let{startTime:t,endTime:i}=a||{};return!!t&&!!i||e.formatMessage({defaultMessage:"請選擇課程時間",id:"admin.limitedTimeEvent.請選擇課程時間"})},isAfterEndDateTime:a=>{let{startTime:t,endTime:i}=a||{};return!t||!i||!!(0,K.A)(new Date(i),new Date(t))||e.formatMessage({defaultMessage:"開始時間不得晚於結束時間",id:"admin.limitedTimeEvent.開始時間不得晚於結束時間"})},isBeforeStartDateTime:a=>{let{startTime:t,endTime:i}=a||{};return!t||!i||!!(0,Z.A)(new Date(t),new Date(i))||e.formatMessage({defaultMessage:"結束時間不能早於開始時間",id:"admin.limitedTimeEvent.結束時間不能早於開始時間"})}}}},{name:"title",label:e.formatMessage({defaultMessage:"活動標題",id:"admin.limitedTimeEvent.活動標題"}),rules:{maxLength:{value:100,message:e.formatMessage({defaultMessage:"上限100字喔",id:"admin.limitedTimeEvent.上限100字喔"})}}},{name:"description",label:e.formatMessage({defaultMessage:"活動說明",id:"admin.limitedTimeEvent.活動說明"}),type:"richtext-no-image",defaultValue:(a?'<h3 style="text-align:start"><strong>Thank you very much for your purchase.</strong></h3>\n<p></p>\n<p style="text-align:start">Template 1. Below are the products you have purchased, which we will also send to your email. If you have not received it, please check the \'Promotions\' tab</p>\n<p></p>\n<p style="text-align:start">Template 2. Below is the registration link for the event. Please fill it out completely, and we will contact you.</p>\n<p></p>\n<p>Template 3. We have received your payment and will contact you as soon as possible.</p>\n<p></p>\n<p>Template 4.If you like this product, please consider scrolling to the bottom to give me a \uD83C\uDF1F 5-star rating! It would be a great help and encouragement to me!</p>':"<p>非常感謝您購買 <%= name %> 的課程,以下為本課程完整說明:</p>\n<p></p>\n<p><strong>【課程資訊】</strong></p>\n<ul>\n<li>上課時間:2025 年 OO 月 OO 日(一)19:00 - 21:00</li>\n<li>上課方式:採用 Google Meet 直播,請先自行註冊帳號</li>\n<li>上課連結:</li>\n<li>報名截止:2025 年 OO 月 OO 日(日)23:59</li>\n</ul>\n<p><strong>【課程講義】</strong></p>\n<ul>\n<li>本課程提供講義、投影片、模板</li>\n<li>請點擊本頁下方【OOOO】下載</li>\n</ul>\n<p><strong>【回放影片】</strong></p>\n<ul>\n<li>本課程提供回放影片</li>\n<li>請於上課後,點擊本網頁下方【回放影片】收看</li>\n</ul>\n<p></p>\n<p>期待與你相見!</p>").replace(/\n/g,""),noAnimation:!0}],ed=()=>Intl.DateTimeFormat().resolvedOptions().timeZone,en=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return a?"".concat(a,".").concat(e):e},eo=e=>{let{renderFields:a,providerName:t="calendar",fieldKeyPrefix:d="upcoming.googleCalendar",enableCalendarFieldKey:n="upcoming.enableGoogleCalendar"}=e,o=(0,A.useCallback)(e=>en(e,d),[d]),{setValue:s,getValues:r,trigger:m,resetField:u}=(0,w.xW)(),{dirtyFields:c}=(0,w.lN)(),{block:g}=(0,A.useContext)(E.A),{onUpdate:f}=(0,A.useContext)(I.A),p=r("id"),{event:M}=(0,F.Q)(p),b=(null==M?void 0:M.id)||"",v=(0,w.FH)({name:o("title")});(0,A.useEffect)(()=>{if(void 0===v){let e=r("title");u(o("title"),{defaultValue:e})}},[]);let C=(0,w.FH)({name:o("description")});(0,A.useEffect)(()=>{if(void 0===C){let e=r("upcoming.description")||r("description")||"";u(o("description"),{defaultValue:e})}},[]);let Y=(0,w.FH)({name:o("dateTimeRange")}),D=(0,w.FH)({name:"startTime"}),P=!!y()(c,o("dateTimeRange"));(0,A.useEffect)(()=>{let e=!!(null==Y?void 0:Y.startTime)||!!(null==Y?void 0:Y.endTime);if(!D||P||e)return;let a=(0,h.A)(new Date(D),1).toISOString();Y&&Y.startTime===D&&Y.endTime===a||s(o("dateTimeRange"),{startTime:D,endTime:a},{shouldDirty:!1})},[D,Y,o,P,s]),(0,A.useEffect)(()=>{let e=r("timezone")||ed();s(o("startTimeZone"),e),s(o("endTimeZone"),e)},[o,s,Y]);let V=[o("title"),o("description"),o("dateTimeRange"),o("enableGoogleMeet")],B=(0,w.FH)({name:V}),O=(0,k.A)(B);(0,x.A)(()=>{O&&0!==O.filter(Boolean).length&&JSON.stringify(O)!==JSON.stringify(B)&&s(o("updatedAt"),new Date().toISOString())},[B,s,o]);let L=V.some(e=>!!y()(c,e)),R=(0,w.FH)({name:o("updatedAt")}),N=async()=>await m(V),U=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};
1V.forEach(e=>{u(e,{defaultValue:r(e),...a})}),s(o("updatedAt"),e.updatedAt,{shouldDirty:L})},_=(0,A.useCallback)(async()=>{if("function"!=typeof f||!(null==g?void 0:g.id))return;let e=r();await f(g,e)},[g,r,f]);return(0,i.FD)(l.Box,{mb:4,children:[b?(0,i.Y)(l.Box,{mb:5,children:(0,i.Y)($,{providerName:t,editingDataUpdatedAt:R,getPrefixedFieldKey:o,onFieldsValidate:N,onEventCreated:U,onEventUpdated:U,onPersistFormData:_,eventId:b,enableCalendarFieldKey:n})}):(0,i.Y)(l.Text,{color:"gray.500",fontSize:"sm",mb:5,children:"儲存活動後即可建立 Google 行事曆。"}),(0,i.Y)(T.A,{p:4,bg:"white",borderRadius:"2xl",isOnBoarding:!1,children:(0,S.A)({renderFields:a,getFields:el,fieldKeyPrefix:d})})]})};var es=t(54346),er=t(32181),em=t(50999),eu=t(62129),ec=t(19497);let eg=e=>({type:"select",name:"animation",label:e.formatMessage({defaultMessage:"動態效果",id:"admin.index.blockEditor.blockFields.動態效果"}),placeholder:"",leftIcon:o.Roy,options:[{value:"",label:e.formatMessage({defaultMessage:"無動態效果",id:"admin.index.blockEditor.blockFields.無動態效果"})},{value:"wobble",label:e.formatMessage({defaultMessage:"搖晃",id:"admin.index.blockEditor.blockFields.搖晃"})},{value:"shakeX",label:e.formatMessage({defaultMessage:"震動",id:"admin.index.blockEditor.blockFields.震動"})},{value:"pulse",label:e.formatMessage({defaultMessage:"跳動",id:"admin.index.blockEditor.blockFields.跳動"})}]});var ef=t(67585),ep=t(46838),eM=t(92892);let eb=e=>{let{control:a,platforms:t,name:d="platform"}=e,n=(0,w.FH)({control:a,name:d}),o=(0,A.useMemo)(()=>t.find(e=>e.value===n),[n,t]);return o&&(0,i.FD)(l.Box,{pl:"10",pb:"2",children:[o.sampleUrl&&(0,i.FD)(l.Flex,{fontSize:"sm",color:"gray.500",pb:"1",alignItems:"center",children:[(0,i.Y)(l.Text,{children:(0,i.Y)(ea.A,{id:"admin.index.blockEditor.blockFields.sample",defaultMessage:"範例:"})}),(0,i.Y)(eM.A,{children:o.sampleUrl},o.sampleUrl)]}),(0,i.Y)(l.Text,{fontSize:"md",fontWeight:"bold",color:"gray.800",children:o.label}),(0,i.Y)(l.Text,{fontSize:"sm",fontWeight:"medium",color:"gray.500",children:o.description})]})};var eh=t(91976),ev=t(12086),ey=t(42689),eA=t(55464),ew=t(47316),ek=t(80218),ex=t(76296),eT=t(3450),eE=t(9440),eI=t(73465),eF=t(33948),eS=t(72934),eC=t(56296);let eY={src:"/_next/static/media/pixiv.cb310d81.png",height:176,width:176,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAElBMVEX////+//+85f/0+//R7v+n3f+rniXeAAAAAXRSTlPbUefTOgAAAAlwSFlzAAAWJQAAFiUBSVIk8AAAACxJREFUeJxVizEOACAQwijg/79szhgTWdqhSJzpEkZCQGldN4q9bCOS13w3bQ4cAGKcrFpFAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:8};var eD=t(17830);let eP=e=>{let a="en"===e.locale,t=[{label:"Patreon",value:"patreon",description:e.formatMessage({defaultMessage:"邀請粉絲訂閱你的 Patreon",id:"admin.index.blockEditor.blockFields.intergrations.patreon.description"}),src:eC.A,placeholder:"https://www.patreon.com/user?u=xxx",sampleUrl:"https://www.patreon.com/felvelial"},{label:"Kofi",value:"kofi",description:e.formatMessage({defaultMessage:"嵌入 Kofi 贊助小工具",id:"admin.index.blockEditor.blockFields.intergrations.kofi.description"}),src:eS.A,placeholder:"https://ko-fi.com/xxx or xxx",sampleUrl:"https://ko-fi.com/felvelial"},{label:"Buy me a coffee",value:"coffee",description:e.formatMessage({defaultMessage:"嵌入 Buy Me a Coffee 贊助小工具",id:"admin.index.blockEditor.blockFields.intergrations.coffee.description"}),src:ex.A,placeholder:"https://www.buymeacoffee.com/xxx or xxx",sampleUrl:"https://www.buymeacoffee.com/refaubrey"},{label:"Gumroad",value:"gumroad",description:e.formatMessage({defaultMessage:" 銷售你的 Gumroad 產品",id:"admin.index.blockEditor.blockFields.intergrations.gumroad.description"}),src:eF.A,placeholder:"https://{username}.gumroad.com/l/{product}",sampleUrl:"https://philipsue.gumroad.com/l/dycco?layout=profile"},{label:"Behance",value:"behance",description:e.formatMessage({defaultMessage:"嵌入你的 Behance 頁面",id:"admin.index.blockEditor.blockFields.intergrations.behance.description"}),src:eh.A,placeholder:"https://www.behance.net/xxx",sampleUrl:"https://www.behance.net/pixeljeff"},{label:"Pixiv",value:"fanbox",description:e.formatMessage({defaultMessage:"嵌入你的 pixiv 連結",id:"admin.index.blockEditor.blockFields.intergrations.fanbox.description"}),src:eY,variants:[{value:"pixiv",label:"Pixiv",placeholder:"https://www.pixiv.net/en/users/xxx"},{value:"fanbox",label:"PixivFANBOX",placeholder:"https://xxx.fanbox.cc/"}],defaultValue:"pixiv"},{label:"ArtStation",value:"artstation",description:e.formatMessage({defaultMessage:"嵌入你的 ArtStation 連結",id:"admin.index.blockEditor.blockFields.intergrations.artstation.description"}),src:ek.A,placeholder:"https://www.artstation.com/xxx"},{label:"Figma",value:"figma",description:e.formatMessage({defaultMessage:"連結到你的 Figma 頁面",id:"admin.index.blockEditor.blockFields.intergrations.figma.description"}),src:eE.A,sampleUrl:"https://www.figma.com/@figma",variants:[{value:"profile",label:"Profile",placeholder:"https://www.figma.com/xxx"},{value:"file",label:"File",placeholder:"https://www.figma.com/community/file/xxx"}]},{label:"Github",value:"github",description:e.formatMessage({defaultMessage:"連結到你的 Github 頁面",id:"admin.index.blockEditor.blockFields.intergrations.github.description"}
1),src:ey.A,sampleUrl:"https://github.com/Significant-Gravitas/Auto-GPT",variants:[{value:"profile",label:"Profile",placeholder:"https://github.com/xxx"},{value:"repo",label:"Repository",placeholder:"https://github.com/{user}/{repository}"}]},{label:"Threads",value:"threads",description:e.formatMessage({defaultMessage:"連結到你的 Threads 頁面",id:"admin.index.blockEditor.blockFields.intergrations.threads.description"}),src:ew.A,placeholder:"https://www.threads.net/xxx",sampleUrl:"https://www.threads.net/@".concat(a?"portaly.global":"portaly.cc")},{label:"Instagram",value:"instagram",description:e.formatMessage({defaultMessage:"分享你的 Instgram",id:"admin.index.blockEditor.blockFields.intergrations.instagram.description"}),src:eA.A,placeholder:"https://www.instagram.com/xxx",sampleUrl:a?"https://www.instagram.com/instagram/":"https://www.instagram.com/portaly.cc"},{label:"WEBTOON",value:"webtoon",description:e.formatMessage({defaultMessage:"連結到你的 WEBTOON 頁面",id:"admin.index.blockEditor.blockFields.intergrations.webtoon.description"}),src:eD.A,placeholder:"https://www.webtoons.com/xxx",variants:[{value:"series",label:"Series",placeholder:"https://www.webtoons.com/{series}/{profile}"},{value:"profile",label:"Profile",placeholder:"https://www.webtoons.com/{profile}"}],sampleUrl:"https://www.webtoons.com/en/comedy/mage-and-demon-queen/list?title_no=1438"},{label:"Google Calendar",value:"gCalendar",description:e.formatMessage({defaultMessage:"嵌入你的公開日曆",id:"admin.index.blockEditor.blockFields.intergrations.calendar.description"}),src:eI.A,placeholder:"https://calendar.google.com/calendar/embed?src=xxx",sampleUrl:"https://calendar.google.com/calendar/u/1/embed?src=emgtdHcudXNhI2hvbGlkYXlAZ3JvdXAudi5jYWxlbmRhci5nb29nbGUuY29t"},{label:"Calendly",value:"calendly",description:e.formatMessage({defaultMessage:"嵌入你的公開日曆",id:"admin.index.blockEditor.blockFields.intergrations.calendar.description"}),src:eT.A,placeholder:"https://calendly.com/xxx",sampleUrl:"https://calendly.com/portaly/portaly-beta-demo?back=1&month=2023-05"},{label:"Dribbble",value:"dribbble",description:e.formatMessage({defaultMessage:"連結到你的 Dribbble 頁面",id:"admin.index.blockEditor.blockFields.intergrations.dribbble.description"}),src:ev.A,placeholder:"https://dribbble.com/xxx",sampleUrl:"https://dribbble.com/dribbble"}].filter(Boolean);return[{type:"div",children:(0,i.FD)(l.HStack,{py:"2",children:[(0,i.Y)(l.Icon,{as:s.VgF,color:"teal.600",w:ef.Y,h:ef.Y}),(0,i.Y)(l.Text,{fontWeight:800,pl:"2",children:e.formatMessage({defaultMessage:"嵌入",id:"admin.index.footerButton.integrations"})}),!a&&(0,i.Y)(ep.A,{url:"https://portaly.cc/blog/intergration",trackerName:"admin.tutorial.嵌入"})]})},{name:"variant",label:e.formatMessage({defaultMessage:"樣式",id:"admin.mailing.樣式"}),type:"radio",leftIcon:g.X$G,options:[{value:"default",label:e.formatMessage({defaultMessage:"看版式",id:"admin.mailing.看版式"})},{value:"collapse",label:e.formatMessage({defaultMessage:"下拉式",id:"admin.mailing.下拉式"})}],defaultValue:"default",when:["platform",["kofi","coffee","gCalendar","teachify"]]},{name:"variant",label:e.formatMessage({defaultMessage:"樣式",id:"admin.mailing.樣式"}),type:"radio",leftIcon:g.X$G,options:[{value:"default",label:e.formatMessage({defaultMessage:"看版式",id:"admin.mailing.看版式"})},{value:"lightbox",label:e.formatMessage({defaultMessage:"燈箱",id:"admin.index.blockEditor.blockFields.intergrations.variant.燈箱"}),helper:e.formatMessage({defaultMessage:"點擊後,會以燈箱方式展開詳細產品資訊",id:"admin.index.blockEditor.blockFields.intergrations.variant.燈箱說明"})}],defaultValue:"default",when:["platform",["gumroad"]]},...t.reduce((e,a)=>{let t={name:"url-".concat(a.value),label:"URL",leftIcon:o.I1_,placeholder:a.placeholder,when:["platform",a.value],noAnimation:!0,type:"integration"};return a.variants?e.concat({name:"".concat(a.value,"Variant"),leftIcon:g.X$G,type:"radio",options:a.variants,when:["platform",a.value],defaultValue:a.variants[0].value},...a.variants.map(e=>({...t,placeholder:e.placeholder,when:[["platform",a.value],["".concat(a.value,"Variant"),e.value]]}
1))):e.concat(t)},[]),{name:"text",label:e.formatMessage({defaultMessage:"文字",id:"admin.index.blockEditor.blockFields.intergrations.patreon.text"}),when:["platform",["gCalendar"]]},{name:"oneMonth",label:e.formatMessage({defaultMessage:"僅顯示當月",id:"admin.index.blockEditor.blockFields.intergrations.calender.oneMonth"}),type:"boolean",leftIcon:null,when:["platform",["gCalendar"]]},{name:"buttonText",label:e.formatMessage({defaultMessage:"按鈕文字",id:"admin.index.blockEditor.blockFields.intergrations.patreon.buttonText"}),when:[["platform",["kofi","coffee","gumroad","gCalendar","teachify"]],["variant","collapse"]]},{...eg(e),when:[["platform",["kofi","coffee","gumroad","gCalendar","teachify"]],["variant","collapse"]]},{type:"div",children:e=>(0,i.Y)(eb,{control:e,platforms:t})},{name:"platform",label:e.formatMessage({defaultMessage:"平台",id:"admin.index.blockEditor.blockFields.intergrations.platform"}),type:"radioButton",options:t,leftIcon:null,defaultValue:t[0].value},{type:"div",children:(0,i.Y)(l.Box,{py:"10"})}]};var eV=t(84107);let eB=(e,a)=>{let t=e||{formatMessage:e=>e.defaultMessage},d=eV.A.DEFAULT_NOTION_PAGE_URL_BY_LOCALE[t.locale]||eV.A.DEFAULT_NOTION_PAGE_URL_EN;return[{type:"div",children:(0,i.Y)(a,{title:t.formatMessage({defaultMessage:"Notion 分頁",id:"admin.index.blockEditor.blockFields.notionFields.Notion 分頁"}),children:(0,i.FD)(l.VStack,{as:"span",spacing:1,alignItems:"flex-start",children:[(0,i.Y)(l.Text,{as:"span",children:t.formatMessage({defaultMessage:"將 Notion 一鍵嵌入成為傳送門分頁,並且讓 Notion 的內容成為你 Portaly 頁面的 SEO 內容。",id:"admin.index.blockEditor.blockFields.notionFields.可以將您的 Notion 頁面嵌入成為傳送門分頁。請留意只有已經公開分享 (Publish) 的 Notion 頁面才能進行嵌入喔!"})}),(0,i.Y)(l.Text,{as:"span",children:t.formatMessage({defaultMessage:"*注意:網址必須是公開分享 (Publish) 的 Notion 頁面。",id:"admin.index.blockEditor.blockFields.notionFields.*注意:網址必須是公開分享 (Publish) 的 Notion 頁面。"})}),(0,i.Y)(l.Text,{as:"span",children:t.formatMessage({defaultMessage:"*Notion 內容更新會與 Portaly 頁面顯示會有時間差,也可於後台手動更新。",id:"admin.index.blockEditor.blockFields.notionFields.*Notion 內容更新會與 Portaly 頁面顯示會有時間差,也可於後台手動更新。"})})]})})},{name:"notionPageUrl",type:"notion",label:t.formatMessage({defaultMessage:"Notion Page 來源網址",id:"admin.index.blockEditor.blockFields.notionFields.Notion Page 來源網址"}),placeholder:t.formatMessage({defaultMessage:"貼上已發布之 Notion Page 網址",id:"admin.index.blockEditor.blockFields.notionFields.貼上已發布之 Notion Page 網址"})},{type:"div",children:(0,i.FD)(l.Flex,{fontSize:"sm",color:"gray.500",mt:1,pb:"1",alignItems:"center",children:[(0,i.Y)(l.Text,{mr:2,flexShrink:0,children:(0,i.Y)(ea.A,{id:"admin.index.blockEditor.blockFields.sample",defaultMessage:"範例:"})}),(0,i.Y)(eM.A,{maxWidth:{base:64,lg:80},children:d},d)]})}]};var eO=t(52069),eL=t(15709);let eR=e=>[{type:"div",children:(0,i.Y)(em.A,{title:e.formatMessage({defaultMessage:"標題文字",id:"admin.profit.標題文字"}),children:e.formatMessage({defaultMessage:"設定此區塊的標題文字",id:"admin.profit.設定此區塊的標題文字"})})},{name:"showProfitTitle",type:"radio",options:[{value:"display",label:e.formatMessage({defaultMessage:"顯示標題",id:"admin.profit.顯示標題"})},{value:"hide",label:e.formatMessage({defaultMessage:"無標題",id:"admin.profit.無標題"})}],leftIcon:g.Y4v,defaultValue:"display"},{name:"title",when:["showProfitTitle","display"]},{name:"fontSize",type:"radio",options:[{value:"small",label:e.formatMessage({defaultMessage:"小",id:"admin.index.headerEditor.小"})},{value:"medium",label:e.formatMessage({defaultMessage:"中",id:"admin.index.headerEditor.中"})},{value:"large",label:e.formatMessage({defaultMessage:"大",id:"admin.index.headerEditor.大"})}],leftIcon:g.Y4v,when:["showProfitTitle","display"],defaultValue:"medium"},{name:"styles",label:e.formatMessage({defaultMessage:"樣式",i
1d:"admin.index.blockEditor.blockFields.樣式"}),type:"checkbox",options:[{value:"bold",label:e.formatMessage({defaultMessage:"粗體",id:"admin.index.blockEditor.blockFields.粗體"})},{value:"italic",label:e.formatMessage({defaultMessage:"斜體",id:"admin.index.blockEditor.blockFields.斜體"})},{value:"underline",label:e.formatMessage({defaultMessage:"下底線",id:"admin.index.blockEditor.blockFields.下底線"})}],leftIcon:o.Nlp,when:["showProfitTitle","display"],defaultValue:["bold"]},{name:"align",label:e.formatMessage({defaultMessage:"對齊",id:"admin.index.blockEditor.blockFields.對齊"}),type:"radio",options:[{value:"left",label:e.formatMessage({defaultMessage:"置左對齊",id:"admin.index.blockEditor.blockFields.置左對齊"})},{value:"center",label:e.formatMessage({defaultMessage:"置中對齊",id:"admin.index.blockEditor.blockFields.置中對齊"})},{value:"right",label:e.formatMessage({defaultMessage:"置右對齊",id:"admin.index.blockEditor.blockFields.置右對齊"})}],defaultValue:"center",leftIcon:g.eih,when:["showProfitTitle","display"]},{type:"divider"},{type:"div",children:(0,i.Y)(em.A,{title:e.formatMessage({defaultMessage:"營利選品",id:"admin.profit.營利選品"}),button:"觀看成效",href:"/admin/profit",icon:(0,i.Y)(n.LBv,{}),children:e.formatMessage({defaultMessage:"設定此區塊要推薦的商品",id:"admin.profit.設定此區塊要推薦的商品"})})},{name:"profitMode",type:"radio",options:Object.entries("en"===e.locale?eL.$C:eL.NF).map(e=>{let[a,t]=e;return{value:a,label:t}}),defaultValue:"auto"},{name:"profitActiveItems",type:"profit"}],eN=e=>[{type:"tab",tabs:[{label:e.formatMessage({defaultMessage:"區塊編輯",id:"admin.mailing.區塊編輯"}),fields:eR(e),showSaveButton:!0},{label:e.formatMessage({defaultMessage:"嵌入設定",id:"admin.product.嵌入設定"}),fields:[{type:"div",children:(0,i.Y)(ec.A.Consumer,{children:a=>{let{profileId:t,blockId:l}=a;return(0,i.Y)(es.t_,{children:(0,i.Y)(eu.A,{noModal:!0,profileId:t,projectId:l,type:"profit",label:e.formatMessage({defaultMessage:"廣告看板",id:"admin.profit.廣告看板"})})})}})}],mustSaveBeforeLoad:!0}]}],eU=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:640,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:640,t=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"image",d=arguments.length>5?arguments[5]:void 0;return{name:l,label:t||i.formatMessage({defaultMessage:"圖片",id:"admin.index.blockEditor.blockFields.圖片"}),type:"image",placeholder:"".concat(i.formatMessage({defaultMessage:"建議尺寸",id:"admin.index.blockEditor.blockFields.建議尺寸"}),":").concat(e," x ").concat(a),ratio:e/a,when:d}},e_=[{value:"youtube",label:"Youtube"},{value:"youtubeShorts",label:"Youtube Shorts"},{value:"vimeo",label:"Vimeo"},{value:"tiktok",label:"Tiktok"},{value:"twitch",label:"Twitch"}],eG=e=>[eU(1920,1080,e.formatMessage({defaultMessage:"自訂縮圖",id:"admin.index.blockEditor.blockFields.自訂縮圖"}),e),{name:"text",label:e.formatMessage({defaultMessage:"影片說明文字",id:"admin.index.blockEditor.blockFields.影片說明文字"})}].map(e=>({...e,when:["platform",["youtube","vimeo"]]})),eW=e=>[eU(1080,1920,e.formatMessage({defaultMessage:"自訂縮圖",id:"admin.index.blockEditor.blockFields.自訂縮圖"}),e)].map(e=>({...e,when:["platform",["youtubeShorts"]]})),ez=(e,a,t,i)=>{let l=t=>[{name:"linkId",type:"url"},eU(e,a,"",i),{name:"tag.label",label:i.formatMessage({defaultMessage:"標籤文字",id:"admin.index.blockEditor.blockFields.getImageBoxFields.標籤文字"}),leftIcon:o.zEM,rightFields:[{name:"bg",label:i.formatMessage({defaultMessage:"背景顏色",id:"admin.index.blockEditor.blockFields.getImageBoxFields.背景顏色"}),type:"color"},{name:"align",label:i.formatMessage({defaultMessage:"位置",id:"admin.index.blockEditor.blockFields.getImageBoxFields.位置"}),type:"menu",defaultValue:"left",options:[{label:i.formatMessage({defaultMessage:"置左",id:"admin.index.blockEditor.blockFields.getImageBoxFields.置左"}),value:"left"},{label:i.formatMessage({defaultMessage:"置右",id:"admin.index.blockEditor.blockFields.getImageBoxFields.置右"}),value:"right"}]}],rules:{maxLength:{value:100,message:i.formatMessage({defaultMessage:"上限100字喔",id:"admin.index.blockEditor.blockFields.getImageBoxFields.上限100字喔"})}},when:["variant",["frame","gradient","solid"]]},{name:"watermarkStyles",label:i.formatMessage({defaultMessage:"文字樣式",i
1d:"admin.index.blockEditor.blockFields.文字樣式"}),type:"radio",options:[{value:"default",label:i.formatMessage({defaultMessage:"一般",id:"admin.index.blockEditor.blockFields.一般"})},{value:"bold",label:i.formatMessage({defaultMessage:"粗體",id:"admin.index.blockEditor.blockFields.粗體"})}],defaultValue:["default"],leftIcon:o.Nlp,when:["variant",["watermark"]]},{name:"text",label:i.formatMessage({defaultMessage:"簡介文字",id:"admin.index.blockEditor.blockFields.getImageBoxFields.簡介文字"}),type:t?"textarea":"text-emoji",watermark:!0,rightFields:[{name:"align",label:i.formatMessage({defaultMessage:"對齊",id:"admin.index.blockEditor.blockFields.getImageBoxFields.對齊"}),type:"menu",defaultValue:"left",options:[{label:i.formatMessage({defaultMessage:"置左",id:"admin.index.blockEditor.blockFields.getImageBoxFields.置左"}),value:"left"},{label:i.formatMessage({defaultMessage:"置中",id:"admin.index.blockEditor.blockFields.getImageBoxFields.置中"}),value:"center"},{label:i.formatMessage({defaultMessage:"置右",id:"admin.index.blockEditor.blockFields.getImageBoxFields.置右"}),value:"right"}],when:["variant",["frame","gradient","solid"]]},{name:"watermarkTextColor",label:i.formatMessage({defaultMessage:"文字顏色",id:"admin.index.blockEditor.blockFields.getImageBoxFields.文字顏色"}),type:"color",when:["variant",["watermark"]],defaultColor:t?"blocks.bg":null}]}];return[{type:"radio",label:i.formatMessage({defaultMessage:"圖片樣式",id:"admin.index.blockEditor.blockFields.getImageBoxFields.圖片樣式"}),name:"variant",options:[{value:"gradient",label:i.formatMessage({defaultMessage:"漸層",id:"admin.index.blockEditor.blockFields.getImageBoxFields.漸層"})},{value:"solid",label:i&&i.formatMessage({defaultMessage:"色塊",id:"admin.index.blockEditor.blockFields.getImageBoxFields.色塊"})},{value:"frame",label:i&&i.formatMessage({defaultMessage:"相片",id:"admin.index.blockEditor.blockFields.getImageBoxFields.相片"})},{value:"watermark",label:i&&i.formatMessage({defaultMessage:"壓印",id:"admin.index.blockEditor.blockFields.getImageBoxFields.壓印"})}],defaultValue:"gradient",leftIcon:c.RfM,parentWhen:["variant",!0]},{name:"watermark.bgOption",type:"radio",label:i.formatMessage({defaultMessage:"壓印設定",id:"admin.index.blockEditor.blockFields.getImageBoxFields.壓印設定"}),lastDependentValue:"color",options:[{value:"image",label:i.formatMessage({defaultMessage:"圖片",id:"admin.index.blockEditor.blockFields.getImageBoxFields.圖片"})},{value:"color",label:i&&i.formatMessage({defaultMessage:"單色",id:"admin.index.blockEditor.blockFields.getImageBoxFields.單色"})}],defaultValue:"image",when:["variant","watermark"],leftIcon:c.CSN},{name:"watermark.imageMode",type:"radio",options:[{value:"default",label:i.formatMessage({defaultMessage:"標準",id:"admin.index.themeEditor.圖片背景-標準"})},{value:"blur",label:i.formatMessage({defaultMessage:"模糊",id:"admin.index.themeEditor.圖片背景-模糊"})},{value:"bright",label:i.formatMessage({defaultMessage:"刷淡",id:"admin.index.themeEditor.圖片背景-刷淡"})},{value:"dark",label:i.formatMessage({defaultMessage:"加深",id:"admin.index.themeEditor.圖片背景-加深"})}],when:[["variant","watermark"],["watermark.bgOption","image"]],defaultValue:"default",leftIcon:null},{name:"items",type:"group",noAnimation:!0,when:["variant",["solid","gradient","frame"]],label:i&&i.formatMessage({defaultMessage:"圖片",id:"admin.index.blockEditor.blockFields.getImageBoxFields.圖片"}),fields:l()},{name:"items",type:"group",noAnimation:!0,when:[["variant","watermark"],["watermark.bgOption","image"]],label:i&&i.formatMessage({defaultMessage:"圖片",id:"admin.index.blockEditor.blockFields.getImageBoxFields.圖片"}),fields:l("istextArea")},{name:"items",type:"group",when:[["variant","watermark"],["watermark.bgOption","color"]],label:i&&i.formatMessage({defaultMessage:"圖片",id:"admin.index.blockEditor.blockFields.getImageBoxFields.圖片"}),fields:[{name:"linkId",type:"url"},{name:"theme",label:i.formatMessage({defaultMessage:"主題配色",id:"admin.index.themeEditor.主題配色"}),type:"quick-color",leftIcon:null},{name:"watermarkStyles",label:i.formatMessage({defaultMessage:"文字樣式",i
1d:"admin.index.blockEditor.blockFields.文字樣式"}),type:"radio",options:[{value:"default",label:i.formatMessage({defaultMessage:"一般",id:"admin.index.blockEditor.blockFields.一般"})},{value:"bold",label:i.formatMessage({defaultMessage:"粗體",id:"admin.index.blockEditor.blockFields.粗體"})}],defaultValue:["default"],leftIcon:o.Nlp,when:["variant",["watermark"]]},{name:"text",label:i.formatMessage({defaultMessage:"簡介文字",id:"admin.index.blockEditor.blockFields.getImageBoxFields.簡介文字"}),type:"textarea",rightFields:[{name:"watermarkTextColor",label:i.formatMessage({defaultMessage:"文字顏色",id:"admin.index.blockEditor.blockFields.getImageBoxFields.文字顏色"}),type:"color",defaultColor:"blocks.bg"}],rules:{maxLength:{value:100,message:i.formatMessage({defaultMessage:"上限100字喔",id:"admin.index.blockEditor.blockFields.getImageBoxFields.上限100字喔"})}}}]}]},eH=e=>{let a=e||{formatMessage:e=>e.defaultMessage};return[eU(512,512,"",a),{name:"cta",type:"cta",label:a.formatMessage({defaultMessage:"按鍵連結",id:"admin.index.blockEditor.blockFields.collectionFields.按鍵連結"})},{name:"description",label:a.formatMessage({defaultMessage:"敘述",id:"admin.index.blockEditor.blockFields.collectionFields.敘述"}),type:"richtext"}]},eq=e=>[{name:"dotsVisible",label:e.formatMessage({defaultMessage:"輪播點點",id:"admin.index.blockEditor.blockFields.autoplay.輪播點點"}),type:"boolean",leftIcon:s.Ym0,defaultValue:!0},{name:"autoplay",label:e.formatMessage({defaultMessage:"自動輪播",id:"admin.index.blockEditor.blockFields.autoplay.自動輪播"}),type:"boolean",leftIcon:c.XKH,defaultValue:!0},{name:"autoplaySpeed",label:e.formatMessage({defaultMessage:"輪播秒數",id:"admin.index.blockEditor.blockFields.autoplay.輪播秒數"}),type:"radio",options:[3,5,10].map(a=>({value:"".concat(a),label:"".concat(a).concat(e.formatMessage({defaultMessage:"秒",id:"admin.index.blockEditor.blockFields.autoplay.秒"}))})),leftIcon:null,defaultValue:"10",when:["autoplay",!0]}],ej=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2,a=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0;return{type:"mini-form",name:"form",label:a.formatMessage({defaultMessage:"自訂問題",id:"admin.mailing.自訂問題"}),lockedFields:["email"],defaultValue:[{name:"email",label:t?"E-mail":"電子信箱"}],rules:{maxLength:e},toggleReqrired:!0}},eX=e=>{let a="en"===e.locale;return{type:"business-form",name:"form",label:e.formatMessage({defaultMessage:"自訂項目",id:"admin.product.自訂項目"}),defaultValue:[{label:"E-mail",type:"e-mail",value:"[email protected]",icon:"MdEmail",className:"business-card-e-mail",isDisplay:!0},{label:e.formatMessage({defaultMessage:"電話",id:"admin.business.電話"}),type:"phone",value:a?"+1-123-456-7890":"0912-345-678",icon:"AiTwotonePhone",className:"business-card-phone",isDisplay:!0},{label:e.formatMessage({defaultMessage:"社群連結",id:"admin.business.社群連結"}),type:"messenger",value:a?"https://www.facebook.com/facebook":"",icon:"BsGlobe2",iconOption:"Messenger&BsMessenger",menu:!0,options:[{label:"Messenger",icon:"BsMessenger"},{label:"Line@",icon:"BsLine"},{label:"Whatsapp",icon:"BsWhatsapp"},{label:e.formatMessage({defaultMessage:"其他",id:"admin.business.其他"}),icon:"BiLinkExternal"}],placeholder:"https://m.me/xxx",className:"business-card-messenger",isDisplay:!0},{label:e.formatMessage({defaultMessage:"地址",id:"admin.business.地址"}),type:"address",value:a?"Times Square Manhattan, NY 10036 United States":"臺北市中正區黎明里北平西路3號",icon:"MdLocationPin",className:"business-card-address",placeholder:e.formatMessage({defaultMessage:"地址或地點名稱",id:"admin.business.地址或地點名稱"}),isDisplay:!0},{label:"QR Code",name:"qrcode",type:"qrcode",icon:"MdOutlineQrCode",isTitle:!0,qrContent:[{label:"Facebook",value:"http://facebook.com/xxx"},{label:"LinkedIn",value:"http://www.linkedin.com/xxx"},a?{label:"Whatsapp",value:"https://wa.me/xxx"}:{label:"Line@",value:"https://line.me/R/ti/p/@256ipjdm"}],options:[{label:"Line@",placeholder:"https://line.me/R/ti/p/@256ipjdm"},{label:"Facebook",placeholder:"http://facebook.com/xxx"},{label:"Whatsapp",placeholder:"https://wa.me/xxx"},{label:"LinkedIn",placeholder:"http://www.linkedin.com/xxx"},{label:"Instagram",placeholder:"https://www.instagram.com/portaly.cc/"}],className:"business-card-qrcode",isDisplay:!0}]}},eQ=e=>{let{intl:a}=e;return(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"基本設定",id:"admin.mailing.基本設定"}),children:a.formatMessage({defaultMessage:"設定專案名稱,並選擇版型。",id:"admin.mailing.設定專案名稱,並選擇版型。"})})},e$=e=>{let{content:a}=e,t=(0,d.useRouter)();return(0,i.Y)(er.A,{href:"/admin/".concat(a.path).concat(t.query.id?"?id=".concat(t.query.id):""),isExternal:!0,size:"sm",children:a.label})},eJ=e=>{let a=e||{formatMessage:e=>e.defaultMessage},t="en"===a.locale,d=eq(a),f=a.formatMessage({defaultMessage:"按鈕文字",id:"admin.index.blockEditor.blockFields.按鈕文字"}),p=a.formatMessage({defaultMessage:"上限100字喔",id:"admin.index.blockEditor.blockFields.上限100字喔"}),M=[{type:"boolean",name:"fill",label:a.formatMessage({defaultMessage:"按鈕填滿",id:"admin.index.blockEditor.blockFields.按鈕填滿"}),leftIcon:c.BXJ},{type:"boolean",name:"withImage",label:a.formatMessage({defaultMessage:"按鈕圖片",id:"admin.index.blockEditor.blockFields.按鈕圖片"}),leftIcon:g.UXq},{type:"boolean",name:"withDescription",label:a.formatMessage({defaultMessage:"按鈕副標",i
1d:"admin.index.blockEditor.blockFields.按鈕副標"}),leftIcon:g.Itv},{name:"size",type:"radio",label:a.formatMessage({defaultMessage:"大小",id:"admin.index.blockEditor.blockFields.大小"}),options:[{value:"sm",label:a.formatMessage({defaultMessage:"小",id:"admin.index.blockEditor.blockFields.小"})},{value:"md",label:a.formatMessage({defaultMessage:"中",id:"admin.index.blockEditor.blockFields.中"})},{value:"lg",label:a.formatMessage({defaultMessage:"大",id:"admin.index.blockEditor.blockFields.大"})},{value:"xl",label:a.formatMessage({defaultMessage:"特大",id:"admin.index.blockEditor.blockFields.特大"})}],defaultValue:"sm",leftIcon:g.Y4v,parentWhen:["size",!0]},{name:"items",type:"group",label:a.formatMessage({defaultMessage:"按鈕",id:"admin.index.blockEditor.blockFields.按鈕"}),fields:[{name:"text",label:f,leftFields:[{type:"icon",name:"icon",label:"Icon"}],rules:{maxLength:{value:100,message:p}},when:["withImage",!1],noAnimation:!0},{name:"text",label:f,rules:{maxLength:{value:100,message:p}},when:["withImage",!0],noAnimation:!0},{name:"description",label:a.formatMessage({defaultMessage:"說明文字",id:"admin.index.blockEditor.blockFields.說明文字"}),leftIcon:g.Itv,when:["withDescription",!0]},{name:"linkId",type:"url"},eg(a),{...eU(320,320,void 0,a),when:["withImage",!0]}]}],h=[d[0],d[2],{name:"platform",label:a.formatMessage({defaultMessage:"影片平台",id:"admin.index.blockEditor.blockFields.影片平台"}),type:"radio",options:e_,leftIcon:s.QYs,defaultValue:e_[0].value,parentWhen:["platform",!0]},{name:"items",type:"group",label:a.formatMessage({defaultMessage:"影片",id:"admin.index.blockEditor.blockFields.影片"}),fields:[...e_.map(e=>{let{value:t,label:i}=e;return{name:"url".concat(t),label:a.formatMessage({defaultMessage:"來源網址",id:"admin.index.blockEditor.blockFields.來源網址"}),placeholder:a.formatMessage({defaultMessage:"貼上 {label} 網址或嵌入碼",id:"admin.index.blockEditor.blockFields.貼上{label}網址或嵌入碼"},{label:i}),type:"text",leftIcon:o.I1_,when:["platform",t],noAnimation:!0}}),...eG(a),...eW(a)]}],v=[{type:"tab",tabs:[{label:a.formatMessage({defaultMessage:"區塊編輯",id:"admin.mailing.區塊編輯"}),fields:[{type:"div",children:(0,i.Y)(eQ,{intl:a})},{name:"name",label:a.formatMessage({defaultMessage:"專案名稱 (必填)",id:"admin.mailing.專案名稱 (必填)"}),leftIcon:m.aFU,type:"uniq",rules:{required:{value:!0,message:a.formatMessage({defaultMessage:"請輸入專案名稱",id:"admin.mailing.請輸入專案名稱"})}}},{name:"variant",label:a.formatMessage({defaultMessage:"樣式",id:"admin.mailing.樣式"}),type:"radio",leftIcon:g.X$G,options:[{value:"default",label:a.formatMessage({defaultMessage:"看版式",id:"admin.mailing.看版式"})},{value:"collapse",label:a.formatMessage({defaultMessage:"下拉式",id:"admin.mailing.下拉式"})}],defaultValue:"default"},{type:"boolean",name:"isActive",label:a.formatMessage({defaultMessage:"啟用收名單",id:"admin.mailing.啟用收名單"}),leftIcon:u.e$p,defaultValue:!0},{type:"divider"},{type:"div",children:(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"自訂看板",id:"admin.mailing.自訂看板"}),children:a.formatMessage({defaultMessage:"邀請用戶填寫你的表單。",id:"admin.mailing.邀請用戶填寫你的表單。"})})},{name:"title.text",label:a.formatMessage({defaultMessage:"下拉標題",id:"admin.mailing.下拉標題"}),when:["variant","collapse"]},{name:"noImage",type:"invert-boolean",label:a.formatMessage({defaultMessage:"顯示圖片",id:"admin.mailing.顯示圖片"}),when:["variant","collapse"]},{...eU(1280,640,a.formatMessage({defaultMessage:"圖片",id:"admin.mailing.圖片"}),a),when:[["variant","collapse"],["noImage",!1]],type:"image"},{...eU(1280,640,a.formatMessage({defaultMessage:"圖片",id:"admin.mailing.圖片"}),a),when:[["variant","default"]],type:"image"},{name:"title.text",label:a.formatMessage({defaultMessage:"看板標題",id:"admin.mailing.看板標題"}),when:["variant","default"],defaultValue:a.formatMessage({defaultMessage:"標題",id:"admin.mailing.標題"}),rightFields:[{name:"align",label:a.formatMessage({defaultMessage:"對齊",id:"admin.mailing.對齊"}),type:"menu",defaultValue:"left",options:[{label:a.formatMessage({defaultMessage:"置左",id:"admin.mailing.置左"}),value:"left"},{label:a.formatMessage({defaultMessage:"置中",id:"admin.mailing.置中"}),value:"center"},{label:a.formatMessage({defaultMessage:"置右",id:"admin.mailing.置右"}),value:"right"}]},{name:"color",label:a.formatMessage({defaultMessage:"文字顏色",id:"admin.mailing.文字顏色"}),type:"color"}]},{name:"description",label:a.formatMessage({defaultMessage:"敘述",id:"admin.mailing.敘述"}),type:"richtext",when:[["variant","collapse"]]},{type:"divider"},{type:"div",children:(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"自訂問題",id:"admin.mailing.自訂問題"}),children:a.formatMessage({defaultMessage:"除了蒐集電子信箱,你也可以自訂其他問題。",id:"admin.mailing.除了蒐集電子信箱,你也可以自訂其他問題。"})})},{...ej(4,a,t)},{type:"boolean",name:"cta.fill",label:a.formatMessage({defaultMessage:"按鈕填滿",id:"admin.mailing.按鈕填滿"}),leftIcon:c.BXJ},{name:"cta.text",label:a.formatMessage({defaultMessage:"按鈕文字",id:"admin.mailing.按鈕文字"}),leftFields:[{type:"icon",name:"icon",label:"Icon"}],rules:{maxLength:{value:100,message:a.formatMessage({defaultMessage:"上限100字喔",id:"admin.mailing.上限100字喔"})}},defaultValue:a.formatMessage({defaultMessage:"立即訂閱",id:"admin.mailing.立即訂閱"})}]},{label:a.formatMessage({defaultMessage:"訂閱確認",id:"admin.mailing.訂閱確認"}),fields:[{type:"div",children:(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"使用者聲明",id:"admin.mailing.使用者聲明"}),children:a.formatMessage({defaultMessage:"使用者提供 E-mail 後,您可以與他說明未來 E-mail 的使用方式。",id:"admin.mailing.使用者提供 E-mail 後,您可以與他說明未來 E-mail 的使用方式。"})})},{name:"disclaimer",type:"textarea",label:a.formatMessage({defaultMessage:"訂閱確認",id:"admin.mailing.訂閱確認"}),defaultValue:a.formatMessage({defaultMessage:"您同意收到我們後續相關æ´
1»å‹•資訊。",id:"admin.mailing.您同意收到我們後續相關活動資訊。"})},{type:"boolean",name:"withCaptcha",label:a.formatMessage({defaultMessage:"機器人驗證",id:"admin.mailing.機器人驗證"}),helper:a.formatMessage({defaultMessage:"啟用機器人驗證可以避免名單被惡意灌水。",id:"admin.mailing.啟用機器人驗證可以避免名單被惡意灌水。"}),defaultValue:!0,leftIcon:r.y8Q}]},{label:a.formatMessage({defaultMessage:"感謝設定",id:"admin.mailing.感謝設定"}),fields:[{type:"div",children:(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"感謝設定",id:"admin.mailing.感謝設定"}),children:a.formatMessage({defaultMessage:"以下內容會於 E-mail 填寫完成後,顯示於畫面上、並以 E-mail 方式寄送。",id:"admin.mailing.以下內容會於 E-mail 填寫完成後,顯示於畫面上、並以 E-mail 方式寄送。"})})},{name:"thanks.align",label:a.formatMessage({defaultMessage:"對齊",id:"admin.mailing.對齊"}),type:"radio",options:[{label:a.formatMessage({defaultMessage:"置左",id:"admin.mailing.置左"}),value:"left"},{label:a.formatMessage({defaultMessage:"置中",id:"admin.mailing.置中"}),value:"center"},{label:a.formatMessage({defaultMessage:"置右",id:"admin.mailing.置右"}),value:"right"}],defaultValue:"center",leftIcon:g.eih},{name:"thanks.title",label:a.formatMessage({defaultMessage:"感謝標題",id:"admin.mailing.感謝標題"}),defaultValue:a.formatMessage({defaultMessage:"感謝您的訂閱",id:"admin.mailing.感謝您的訂閱"})},{name:"thanks.noImage",type:"invert-boolean",label:a.formatMessage({defaultMessage:"顯示回饋圖片",id:"admin.mailing.顯示回饋圖片"})},{...eU(1280,640,a.formatMessage({defaultMessage:"回饋圖片",id:"admin.mailing.回饋圖片"}),a,"thanks.image"),when:["thanks.noImage",!1]},{name:"thanks.content",label:a.formatMessage({defaultMessage:"感謝文字",id:"admin.mailing.感謝文字"}),type:"richtext",defaultValue:t?"<p>Your support motivates my creation.</p>":"<p>
1你的支持,提供我創作的動力</p>"},{type:"div",children:(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"自訂回饋",id:"admin.mailing.自訂回饋"}),children:a.formatMessage({defaultMessage:"開啟後,可以提供使用者影片、雲端連結等自訂回饋內容。",id:"admin.mailing.開啟後,可以提供使用者影片、雲端連結等自訂回饋內容。"})})},{name:"thanks.rewards",type:"boolean",label:a.formatMessage({defaultMessage:"自訂回饋",id:"admin.mailing.自訂回饋"}),leftIcon:g.X7T,defaultValue:!0},{name:"thanks.rewardsType",label:a.formatMessage({defaultMessage:"訂閱回饋",id:"admin.mailing.訂閱回饋"}),type:"radio",options:[{value:"link",label:a.formatMessage({defaultMessage:"雲端連結",id:"admin.mailing.雲端連結"})},{value:"embed",label:a.formatMessage({defaultMessage:"嵌入影片",id:"admin.mailing.嵌入影片"})}],defaultValue:"link",leftIcon:n.bss,when:["thanks.rewards",!0]},{name:"thanks.rewardsVideo",label:a.formatMessage({defaultMessage:"YouTube 影片連結",id:"admin.mailing.YouTube 影片連結"}),when:[["thanks.rewards",!0],["thanks.rewardsType","embed"]],leftIcon:o.I1_},{...eU(1920,1080,a.formatMessage({defaultMessage:"自訂縮圖",id:"admin.mailing.自訂縮圖"}),a,"thanks.rewardsImage"),when:[["thanks.rewards",!0],["thanks.rewardsType","embed"]]},{name:"thanks.embedText",label:a.formatMessage({defaultMessage:"影片說明文字",id:"admin.mailing.影片說明文字"}),when:[["thanks.rewards",!0],["thanks.rewardsType","embed"]]},{name:"thanks.rewardsText",label:a.formatMessage({defaultMessage:"按鈕文字",id:"admin.mailing.按鈕文字"}),when:[["thanks.rewards",!0],["thanks.rewardsType",["file","link"]]],leftFields:[{type:"icon",name:"rewardsIcon",label:"Icon"}],defaultValue:t?"Download":"檔案下載"},{name:"thanks.rewardsLink",label:a.formatMessage({defaultMessage:"雲端連結",id:"admin.mailing.雲端連結"}),leftIcon:n.gwM,when:[["thanks.rewards",!0],["thanks.rewardsType","link"]]}],showSaveButton:!0},{label:a.formatMessage({defaultMessage:"嵌入設定",id:"admin.product.嵌入設定"}),fields:[{type:"div",children:(0,i.Y)(ec.A.Consumer,{children:e=>{let{profileId:a,blockId:t}=e;return(0,i.Y)(es.t_,{children:(0,i.Y)(eu.A,{noModal:!0,profileId:a,projectId:t,autoHeight:!0})})}})}],mustSaveBeforeLoad:!0}],rightTools:[(0,i.Y)(e$,{intl:a,content:{path:"mailing-list",label:a.formatMessage({defaultMessage:"名單管理",id:"admin.mailing.名單管理"})}},"1")]}],y=eN(a),A=(0,eO.Ay)(a),w=[{type:"div",children:(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"數位名片",id:"admin.business.數位名片"}),children:a.formatMessage({defaultMessage:"展示聯繫資訊與社群 QR Code",id:"admin.business.展示聯繫資訊與社群 QR Code"})})},{name:"variant",label:a.formatMessage({defaultMessage:"樣式",id:"admin.mailing.樣式"}),type:"radio",leftIcon:g.X$G,options:[{value:"default",label:a.formatMessage({defaultMessage:"看版式",id:"admin.mailing.看版式"})},{value:"collapse",label:a.formatMessage({defaultMessage:"下拉式",id:"admin.mailing.下拉式"})}],defaultValue:"default"},{name:"name",label:a.formatMessage({defaultMessage:"聯絡資訊",id:"admin.business.聯絡資訊"}),className:"business-card-name"},{type:"div",children:(0,i.Y)(em.A,{pt:"5",title:a.formatMessage({defaultMessage:"聯繫項目",id:"admin.business.聯繫項目"}),children:a.formatMessage({defaultMessage:"只會顯示有開啟的項目",id:"admin.business.只會顯示有開啟的項目"})})},{...eX(a)}];return{list:M,banner:[...d,...ez(1280,640,"",a)],square:[...d,...ez(1280,1280,"",a)],double:ez(640,640,!0,a),doubleSquare:ez(640,640,!0,a),grid:[{type:"radio",label:a.formatMessage({defaultMessage:"樣式",id:"admin.index.blockEditor.blockFields.樣式"}),name:"variant",options:[{value:"round",label:a.formatMessage({defaultMessage:"圓形",id:"admin.index.blockEditor.blockFields.圓形"})},{value:"square",label:a.formatMessage({defaultMessage:"方形",id:"admin.index.blockEditor.blockFields.方形"})}
1],defaultValue:"round",leftIcon:g.Znn,parentWhen:["variant",!0]},{name:"items",type:"group",label:a.formatMessage({defaultMessage:"圖片",id:"admin.index.blockEditor.blockFields.圖片"}),fields:[{name:"linkId",type:"url",enablePortalyMode:!0},eU(320,320,"",a),{name:"label",label:a.formatMessage({defaultMessage:"預覽文字",id:"admin.index.blockEditor.blockFields.預覽文字"})}]}],collection:[{name:"items",type:"fake-group",label:a.formatMessage({defaultMessage:"圖片",id:"admin.index.blockEditor.blockFields.圖片"}),fields:eH(a)}],notion:eB(a,em.A),player:h,audio:[{name:"url",leftIcon:n.bss,label:a.formatMessage({defaultMessage:"來源網址",id:"admin.index.blockEditor.blockFields.來源網址"}),placeholder:a.formatMessage({defaultMessage:"貼上網址或嵌入碼",id:"admin.index.blockEditor.blockFields.貼上網址或嵌入碼"}),helper:a.formatMessage({defaultMessage:"本功能目前支援 Spotify 、 Apple Podcasts 及 SoundCloud",id:"admin.index.blockEditor.blockFields.本功能目前支援 Spotify 、 Apple Podcasts 及 SoundCloud"})}],title:[{name:"textOptions",type:"radio",options:[{value:"text",label:a.formatMessage({defaultMessage:"標題",id:"admin.index.blockEditor.blockFields.標題"})},{value:"richText",label:a.formatMessage({defaultMessage:"段落",id:"admin.index.blockEditor.blockFields.段落"})}],defaultValue:"text",parentWhen:["textOptions",!0]},{name:"text",type:"textarea",label:a.formatMessage({defaultMessage:"文字",id:"admin.index.blockEditor.blockFields.貼上網址文字"}),placeholder:a.formatMessage({defaultMessage:"標題文字",id:"admin.index.blockEditor.blockFields.標題文字"}),when:["textOptions","text"]},{name:"richText",type:"richtext",label:a.formatMessage({defaultMessage:"文字",id:"admin.index.blockEditor.blockFields.貼上網址文字"}),placeholder:a.formatMessage({defaultMessage:"標題文字",id:"admin.index.blockEditor.blockFields.標題文字"}),when:["textOptions","richText"]},{name:"color",label:a.formatMessage({defaultMessage:"文字顏色",id:"admin.index.blockEditor.blockFields.文字顏色"}),type:"quick-color",when:["textOptions","text"]},{name:"size",label:a.formatMessage({defaultMessage:"大小",id:"admin.index.blockEditor.blockFields.大小"}),type:"radio",options:[{value:"sm",label:a.formatMessage({defaultMessage:"小",id:"admin.index.blockEditor.blockFields.小"})},{value:"md",label:a.formatMessage({defaultMessage:"中",id:"admin.index.blockEditor.blockFields.中"})},{value:"lg",label:a.formatMessage({defaultMessage:"大",id:"admin.index.blockEditor.blockFields.大"})},{value:"xl",label:a.formatMessage({defaultMessage:"特大",id:"admin.index.blockEditor.blockFields.特大"})}],defaultValue:"md",leftIcon:g.Y4v,when:["textOptions","text"]},{name:"styles",label:a.formatMessage({defaultMessage:"樣式",id:"admin.index.blockEditor.blockFields.樣式"}),type:"checkbox",options:[{value:"bold",label:a.formatMessage({defaultMessage:"粗體",id:"admin.index.blockEditor.blockFields.粗體"})},{value:"italic",label:a.formatMessage({defaultMessage:"斜體",id:"admin.index.blockEditor.blockFields.斜體"})},{value:"underline",label:a.formatMessage({defaultMessage:"下底線",id:"admin.index.blockEditor.blockFields.下底線"})}],leftIcon:o.Nlp,when:["textOptions","text"]},{name:"align",label:a.formatMessage({defaultMessage:"對齊",id:"admin.index.blockEditor.blockFields.對齊"}),type:"radio",options:[{value:"left",label:a.formatMessage({defaultMessage:"置左對齊",id:"admin.index.blockEditor.blockFields.置左對齊"})},{value:"center",label:a.formatMessage({defaultMessage:"置中對齊",id:"admin.index.blockEditor.blockFields.置中對齊"})},{value:"right",label:a.formatMessage({defaultMessage:"置右對齊",id:"admin.index.blockEditor.blockFields.置右對齊"})}],defaultValue:"center",leftIcon:g.eih,when:["textOptions","text"]},{name:"headerFill",label:a.formatMessage({defaultMessage:"區塊填塞",id:"admin.index.blockEditor.blockFields.區塊填塞"}),type:"radio",options:[{value:"default",label:a.formatMessage({defaultMessage:"底板",id:"admin.index.blockEditor.blockFields.底板"})},{value:"transparent",label:a.formatMessage({defaultMessage:"透明",id:"admin.index.blockEditor.blockFields.透明"})}],when:["textOptions","richText"],leftIcon:r.wsQ}],divider:[{name:"variant",label:a.formatMessage({defaultMessage:"樣式",i
1d:"admin.index.blockEditor.blockFields.樣式"}),type:"radio",options:[{value:"solid",label:a.formatMessage({defaultMessage:"實線",id:"admin.index.blockEditor.blockFields.實線"})},{value:"dashed",label:a.formatMessage({defaultMessage:"虛線",id:"admin.index.blockEditor.blockFields.虛線"})},{value:"dotted",label:a.formatMessage({defaultMessage:"點點",id:"admin.index.blockEditor.blockFields.點點"})},{value:"double",label:a.formatMessage({defaultMessage:"雙實線",id:"admin.index.blockEditor.blockFields.雙實線"})},{value:"square",label:a.formatMessage({defaultMessage:"方框線",id:"admin.index.blockEditor.blockFields.方框線"})}],defaultValue:"solid",leftIcon:s.tos},{name:"borderWidth",label:a.formatMessage({defaultMessage:"粗度",id:"admin.index.blockEditor.blockFields.粗度"}),type:"radio",options:[{value:"1px",label:a.formatMessage({defaultMessage:"極細",id:"admin.index.blockEditor.blockFields.極細"})},{value:"2px",label:a.formatMessage({defaultMessage:"細",id:"admin.index.blockEditor.blockFields.細"})},{value:"4px",label:a.formatMessage({defaultMessage:"粗",id:"admin.index.blockEditor.blockFields.粗"})},{value:"8px",label:a.formatMessage({defaultMessage:"特粗",id:"admin.index.blockEditor.blockFields.特粗"})}],defaultValue:"2px",rightFields:[{name:"color",label:a.formatMessage({defaultMessage:"顏色",id:"admin.index.blockEditor.blockFields.顏色"}),type:"color"}],leftIcon:s.KC4}],"mailing-list":v,integrations:eP(a),businessCard:w,products:A,profit:y,comments:[{type:"tab",tabs:[{label:a.formatMessage({defaultMessage:"評論設定",id:"admin.comments.評論設定"}),fields:[{type:"div",children:(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"設定標題 ",id:"admin.comments.block.設定標題 "}),children:a.formatMessage({defaultMessage:"敘述說明",id:"admin.comments.block.敘述說明"})})},{name:"text",type:"text",label:a.formatMessage({defaultMessage:"標題",id:"admin.comments.block.標題"}),placeholder:a.formatMessage({defaultMessage:"我的商品評論",id:"admin.comments.block.我的商品評論"}),leftIcon:c.Yvo},{name:"size",label:a.formatMessage({defaultMessage:"大小",id:"admin.index.blockEditor.blockFields.大小"}),type:"radio",options:[{value:"sm",label:a.formatMessage({defaultMessage:"小",id:"admin.index.blockEditor.blockFields.小"})},{value:"md",label:a.formatMessage({defaultMessage:"中",id:"admin.index.blockEditor.blockFields.中"})},{value:"lg",label:a.formatMessage({defaultMessage:"大",id:"admin.index.blockEditor.blockFields.大"})},{value:"xl",label:a.formatMessage({defaultMessage:"特大",id:"admin.index.blockEditor.blockFields.特大"})}],defaultValue:"xl",leftIcon:g.Y4v,when:["text",!0]},{name:"color",label:a.formatMessage({defaultMessage:"文字顏色",id:"admin.index.blockEditor.blockFields.文字顏色"}),type:"quick-color",when:["text",!0]},{type:"divider"},{type:"div",children:(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"我的精選評論",id:"admin.comments.block.我的精選評論"}),children:a.formatMessage({defaultMessage:"選取最多 3 則置頂評論,展示於你的主頁區塊上。",id:"admin.comments.block.選取最多3則置頂評論"})})},{name:"featuredCommentIds",type:"commentsItems"}],showSaveButton:!0},{label:a.formatMessage({defaultMessage:"嵌入設定",id:"admin.product.嵌入設定"}),fields:[{type:"div",children:(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"嵌入設定",id:"admin.product.嵌入設定"}),children:a.formatMessage({defaultMessage:"將此評論區塊嵌入外部網站或部落格。",id:"admin.comments.block.將此評論區塊嵌入外部網站或部落格"})})},{type:"div",children:(0,i.Y)(ec.A.Consumer,{children:e=>{let{profileId:a,blockId:t}=e;return(0,i.Y)(es.t_,{children:(0,i.Y)(b,{noModal:!0,profileId:a,blockId:t})})}})}],mustSaveBeforeLoad:!0}]}],limitedTimeEvent:[{type:"tab",tabs:[{label:a.formatMessage({defaultMessage:"活動編輯",id:"admin.limitedTimeEvent.活動編輯"}),fields:[{type:"div",children:(0,i.FD)(em.A,{title:a.formatMessage({defaultMessage:"限時活動模組說明",id:"admin.limitedTimeEvent.限時活動模組說明"}),children:[(0,i.Y)(l.Text,{children:a.formatMessage({defaultMessage:"本模組分成三個階段,會根據你設定的時間自動於「活動預告、活動期間、活動結束」切換內容。",id:"admin.limitedTimeEvent.模組說明內容"})}),(0,i.Y)(l.Text,{children:a.formatMessage({defaultMessage:"你正在編輯:活動預告頁,你可以設定倒數計時與名單蒐集,為活動暖身。",id:"admin.limitedTimeEvent.模組說明內容2"})})]})},{type:"divider"},{type:"div",children:(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"基礎設定",id:"admin.limitedTimeEvent.基礎設定"}),children:a.formatMessage({defaultMessage:"設定此銷售區塊的名稱與版型",id:"admin.limitedTimeEvent.設定此銷售區塊的名稱與版型"})})},{name:"layout",type:"radio",options:[{value:"kanban",label:a.formatMessage({defaultMessage:"看板",id:"admin.limitedTimeEvent.看板"})},{value:"dropdown",label:a.formatMessage({defaultMessage:"下拉",id:"admin.limitedTimeEvent.下拉"})}],defaultValue:"kanban"},{type:"div",children:(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"活動封面設定",id:"admin.limitedTimeEvent.活動封面設定"}),children:a.formatMessage({defaultMessage:"設定品名與封面圖片",id:"admin.limitedTimeEvent.設定品名與封面圖片"})})},{...eU(1280,640,void 0,a,"mainImage"),type:"image"},{type:"divider"},{type:"div",children:(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"活動預告編輯",id:"admin.limitedTimeEvent.活動預告編輯"}),children:a.formatMessage({defaultMessage:"此區塊為活動開始前預告期間的看版內容",id:"admin.limitedTimeEvent.此區塊為活動開始前預告期間的看版內容"})})},{type:"div",children:(0,i.Y)(l.Text,{fontWeight:"bold",children:a.formatMessage({defaultMessage:"活動標題",id:"admin.limitedTimeEvent.活動標題"})})},{name:"title",label:a.formatMessage({defaultMessage:"活動標題",id:"admin.limitedTimeEvent.活動標題"}),placeholder:a.formatMessage({defaultMessage:"例如:春季特惠活動",id:"admin.limitedTimeEvent.標題Placeholder"}),rules:{required:{value:!0,message:a.formatMessage({defaultMessage:"請輸入活動標題",id:"admin.limitedTimeEvent.請輸入活動標題"})},maxLength:{value:100,message:a.formatMessage({defaultMessage:"標題上限100字",id:"admin.limitedTimeEvent.標題上限100字"})}}},{type:"div",children:(0,i.Y)(l.Text,{fontWeight:"bold",children:a.formatMessage({defaultMessage:"活動標籤",id:"admin.limitedTimeEvent.活動標籤"})})},{name:"upcoming.productLabel",label:a.formatMessage({defaultMessage:"活動標籤",id:"admin.limitedTimeEvent.活動標籤"}),placeholder:a.formatMessage({defaultMessage:"即將開始",id:"admin.limitedTimeEvent.即將開始標籤Placeholder"}),defaultValue:"即將開始"},{type:"div",children:(0,i.Y)(l.Text,{fontWeight:"bold",children:a.formatMessage({defaultMessage:"活動說明",id:"admin.limitedTimeEvent.活動說明"})})},{name:"upcoming.description",label:a.formatMessage({defaultMessage:"說明",id:"admin.limitedTimeEvent.說明"}),type:"richtext",placeholder:a.formatMessage({defaultMessage:"描述活動內容...",id:"admin.limitedTimeEvent.說明Placeholder"})},{type:"div",children:(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"價格設定",id:"admin.limitedTimeEvent.價格設定"}),children:a.formatMessage({defaultMessage:"此區塊可設定活動標價",id:"admin.limitedTimeEvent.設定顯示價格"})})},{name:"price.showPricing",label:a.formatMessage({defaultMessage:"價格設定",id:"admin.limitedTimeEvent.價格設定"}),type:"boolean",defaultValue:!1},{name:"price.sale",label:a.formatMessage({defaultMessage:"特價",id:"admin.limitedTimeEvent.特價"}
1),placeholder:"1,280",helper:a.formatMessage({defaultMessage:"活動優惠價格",id:"admin.limitedTimeEvent.活動優惠價格"}),when:["price.showPricing",!0]},{name:"price.original",label:a.formatMessage({defaultMessage:"原價",id:"admin.limitedTimeEvent.原價"}),placeholder:"1,680",helper:a.formatMessage({defaultMessage:"原始售價",id:"admin.limitedTimeEvent.原始售價"}),when:["price.showPricing",!0]},{type:"divider"},{type:"div",children:(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"名單收集",id:"admin.limitedTimeEvent.名單收集"})})},{name:"upcoming.enableMailingList",label:a.formatMessage({defaultMessage:"開賣前名單",id:"admin.limitedTimeEvent.開賣前名單"}),type:"boolean",defaultValue:!0},{name:"cta.upcoming.emailTitle",label:a.formatMessage({defaultMessage:"名單收集標題",id:"admin.limitedTimeEvent.開賣前名單標題"}),placeholder:a.formatMessage({defaultMessage:"留下你的信箱,開賣第一時間通知你!",id:"admin.limitedTimeEvent.開賣前名單標題Placeholder"}),defaultValue:"留下你的信箱,開賣第一時間通知你!",when:["upcoming.enableMailingList",!0]},{name:"cta.upcoming.collectEmail",type:"hidden",defaultValue:!0},{name:"cta.upcoming.emailPlaceholder",type:"hidden",defaultValue:"留下你的信箱,開賣第一時間通知你!"},{type:"divider"},{type:"div",children:(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"建立 Google 行事曆",id:"admin.limitedTimeEvent.建立Google行事曆"}),children:a.formatMessage({defaultMessage:"連結你的 Google 帳號,並建立行事曆;活動正式開始時,系統將發出行事曆邀請。",id:"admin.limitedTimeEvent.Google行事曆Helper"})})},{name:"upcoming.enableGoogleCalendar",label:a.formatMessage({defaultMessage:"開啟行事曆",id:"admin.limitedTimeEvent.開啟行事曆"}),type:"boolean",defaultValue:!1},{type:"oauth-app",providerName:"calendar",oauthButtonText:a.formatMessage({defaultMessage:"連結 Google 行事曆",id:"admin.limitedTimeEvent.連結 Google 行事曆"}),AppEditorComponent:eo,noAnimation:!0,when:["upcoming.enableGoogleCalendar",!0]},{type:"divider"},{type:"div",children:(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"按鈕設定",id:"admin.limitedTimeEvent.按鈕設定"})})},{name:"cta.upcoming.text",label:a.formatMessage({defaultMessage:"按鈕文字",id:"admin.limitedTimeEvent.即將開始按鈕文字"}),placeholder:a.formatMessage({defaultMessage:"搶先登記",id:"admin.limitedTimeEvent.搶先登記Placeholder"}),defaultValue:"搶先登記"}]},{label:a.formatMessage({defaultMessage:"活動期間",id:"admin.limitedTimeEvent.活動期間"}),fields:[{type:"div",children:(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"活動期間設定說明",id:"admin.limitedTimeEvent.活動期間設定說明"}),children:(0,i.Y)(l.Text,{children:a.formatMessage({defaultMessage:"你正在編輯:正式活動頁可設定活動開始後的畫面,透過倒數計時與限時優惠刺激下單。",id:"admin.limitedTimeEvent.活動期間設定說明內容"})})})},{type:"divider"},{type:"div",children:(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"活動期間編輯",id:"admin.limitedTimeEvent.活動期間編輯"})})},{type:"div",children:(0,i.Y)(l.Text,{children:a.formatMessage({defaultMessage:"此區塊為活動進行期間的看版內容",id:"admin.limitedTimeEvent.活動期間編輯說明內容"})})},{type:"div",children:(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"活動標題",id:"admin.limitedTimeEvent.活動標題"})})},{name:"active.productTitle",label:a.formatMessage({defaultMessage:"活動標題",id:"admin.limitedTimeEvent.活動標題"}),placeholder:a.formatMessage({defaultMessage:"例如:限時優惠開放中",id:"admin.limitedTimeEvent.活動期間標題Placeholder"})},{type:"div",children:(0,i.Y)(l.Text,{fontWeight:"bold",children:a.formatMessage({defaultMessage:"活動標籤",id:"admin.limitedTimeEvent.活動標籤"})})},{name:"active.productLabel",label:a.formatMessage({defaultMessage:"商品標籤",id:"admin.limitedTimeEvent.商品標籤"}),placeholder:a.formatMessage({defaultMessage:"進行中",id:"admin.limitedTimeEvent.進行中標籤Placeholder"}),defaultValue:"進行中"},{type:"div",children:(0,i.Y)(l.Text,{fontWeight:"bold",children:a.formatMessage({defaultMessage:"活動說明",id:"admin.limitedTimeEvent.活動說明"})})},{name:"active.description",label:a.formatMessage({defaultMessage:"說明",id:"admin.limitedTimeEvent.說明"}),type:"richtext",placeholder:a.formatMessage({defaultMessage:"描述活動內容...",id:"admin.limitedTimeEvent.說明Placeholder"})},{type:"div",children:(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"按鈕設定",id:"admin.limitedTimeEvent.按鈕設定"})})},{name:"cta.active.text",label:a.formatMessage({defaultMessage:"按鈕文字",id:"admin.limitedTimeEvent.進行中按鈕文字"}),placeholder:a.formatMessage({defaultMessage:"手刀搶購",id:"admin.limitedTimeEvent.手刀搶購Placeholder"}),defaultValue:"手刀搶購"},{name:"cta.active.linkId",label:a.formatMessage({defaultMessage:"連結",id:"admin.limitedTimeEvent.進行中連結"}),type:"url",disableCaptureImage:!0,enableProductMode:!0,helper:a.formatMessage({defaultMessage:"可輸入網址或選擇一個數位商品",id:"admin.limitedTimeEvent.可輸入網址或選擇一個數位商品"})}]},{label:a.formatMessage({defaultMessage:"活動結束",id:"admin.limitedTimeEvent.活動結束"}),fields:[{type:"div",children:(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"活動結束設定說明",id:"admin.limitedTimeEvent.活動結束設定說明"}),children:(0,i.Y)(l.Text,{children:a.formatMessage({defaultMessage:"你正在編輯:在此設定活動結束後的頁面。可放感謝文案,或者下一波活動預先蒐集名單。",id:"admin.limitedTimeEvent.活動結束設定說明內容"})})})},{type:"divider"},{type:"div",children:(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"活動結束編輯",id:"admin.limitedTimeEvent.活動結束編輯"})})},{type:"div",children:(0,i.Y)(l.Text,{children:a.formatMessage({defaultMessage:"此區塊為活動結束後的看版內容",id:"admin.limitedTimeEvent.活動結束編輯說明內容"})})},{type:"div",children:(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"活動標題",id:"admin.limitedTimeEvent.活動標題"})})},{name:"ended.productTitle",label:a.formatMessage({defaultMessage:"活動標題",id:"admin.limitedTimeEvent.活動標題"}),placeholder:a.formatMessage({defaultMessage:"例如:本次活動已結束",id:"admin.limitedTimeEvent.活動結束標題Placeholder"})},{type:"div",children:(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"活動標籤",id:"admin.limitedTimeEvent.活動標籤"})})},{name:"ended.productLabel",label:a.formatMessage({defaultMessage:"商品標籤",id:"admin.limitedTimeEvent.商品標籤"}),placeholder:a.formatMessage({defaultMessage:"已結束",id:"admin.limitedTimeEvent.已結束標籤Placeholder"}),defaultValue:"已結束"},{type:"div",children:(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"活動說明",id:"admin.limitedTimeEvent.活動說明"})})},{name:"ended.description",label:a.formatMessage({defaultMessage:"說明",id:"admin.limitedTimeEvent.說明"}),type:"richtext",placeholder:a.formatMessage({defaultMessage:"感謝您的參與,敬請期待下次活動!",
1id:"admin.limitedTimeEvent.結束說明Placeholder"})},{type:"divider"},{type:"div",children:(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"名單收集",id:"admin.limitedTimeEvent.名單收集"})})},{name:"ended.enableMailingList",label:a.formatMessage({defaultMessage:"開賣結束名單",id:"admin.limitedTimeEvent.開賣結束名單"}),type:"boolean",defaultValue:!0},{name:"cta.ended.emailTitle",label:a.formatMessage({defaultMessage:"名單收集標題",id:"admin.limitedTimeEvent.開賣結束名單標題"}),placeholder:a.formatMessage({defaultMessage:"留下你的信箱,下次開賣第一時間通知你!",id:"admin.limitedTimeEvent.開賣結束名單標題Placeholder"}),defaultValue:"留下你的信箱,下次開賣第一時間通知你!",when:["ended.enableMailingList",!0]},{type:"divider"},{type:"div",children:(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"按鈕設定",id:"admin.limitedTimeEvent.按鈕設定"})})},{name:"cta.ended.text",label:a.formatMessage({defaultMessage:"按鈕文字",id:"admin.limitedTimeEvent.已結束按鈕文字"}),placeholder:a.formatMessage({defaultMessage:"下次開賣提醒我",id:"admin.limitedTimeEvent.下次開賣提醒我Placeholder"}),defaultValue:"下次開賣提醒我"},{name:"endedMessage",type:"hidden",defaultValue:"本次活動已結束,感謝你的參與"},{name:"cta.ended.collectEmail",type:"hidden",defaultValue:!0},{name:"cta.ended.emailPlaceholder",type:"hidden",defaultValue:"留下你的信箱,下次開賣第一時間通知你!"},{name:"showCountdown",type:"hidden",defaultValue:!0}]},{label:a.formatMessage({defaultMessage:"時間設定",id:"admin.limitedTimeEvent.時間設定"}),fields:[{type:"div",children:(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"正式開賣設定",id:"admin.limitedTimeEvent.正式開賣設定"}),children:a.formatMessage({defaultMessage:"設定活動開始與結束的時間。活動期間內,頁面將顯示「剩餘搶購時間」倒數,直到活動結束。",id:"admin.limitedTimeEvent.設定活動開始與結束時間"})})},{name:"timezone",type:"hidden",defaultValue:"Asia/Taipei"},{name:"limitedTimeEventDateTime",type:"limitedTimeEvent-datetime",helper:a.formatMessage({defaultMessage:"活動開始前會顯示「即將開始」",id:"admin.limitedTimeEvent.開始時間Helper"}),rules:{endTime:{validate:(e,t)=>!(e&&t.startTime&&new Date(e)<=new Date(t.startTime))||a.formatMessage({defaultMessage:"結束時間必須晚於開始時間",id:"admin.limitedTimeEvent.結束時間必須晚於開始時間"})}}},{type:"divider"},{type:"div",children:(0,i.Y)(em.A,{title:a.formatMessage({defaultMessage:"倒數計時器設定",id:"admin.limitedTimeEvent.倒數計時器設定"})})},{name:"upcoming.showCountdown",label:a.formatMessage({defaultMessage:"顯示開賣前倒數",id:"admin.limitedTimeEvent.顯示開賣前倒數"}),type:"boolean",defaultValue:!0},{name:"active.showCountdown",label:a.formatMessage({defaultMessage:"顯示活動期間倒數",id:"admin.limitedTimeEvent.顯示活動期間倒數"}),type:"boolean",defaultValue:!0}]}]}]}}},52069:(e,a,t)=>{t.d(a,{Ay:()=>M,Fw:()=>p,m$:()=>g,zH:()=>f});var i=t(2445);t(96540);
1var l=t(84961),d=t(50999),n=t(58887);let o={src:"/_next/static/media/productContainer_board.f4da3a9a.svg",height:96,width:80,blurWidth:0,blurHeight:0},s={src:"/_next/static/media/productContainer_carousel.ae4715fe.svg",height:96,width:80,blurWidth:0,blurHeight:0},r={src:"/_next/static/media/productContainer_collapse.41dcb6a2.svg",height:96,width:80,blurWidth:0,blurHeight:0},m={src:"/_next/static/media/productContainer_double.456f9fb2.svg",height:96,width:80,blurWidth:0,blurHeight:0},u={src:"/_next/static/media/productContainer_simple.2d613495.svg",height:96,width:80,blurWidth:0,blurHeight:0},c={src:"/_next/static/media/productContainer_square.fb8b5bab.svg",height:96,width:80,blurWidth:0,blurHeight:0},g=e=>[{value:n.ke.SINGLE,label:e.formatMessage({defaultMessage:"單商品",id:"admin.gallery.單商品"})},{value:n.ke.MULTIPLE,label:e.formatMessage({defaultMessage:"多商品",id:"admin.gallery.多商品"})}],f=e=>[{value:n.CW.BOARD,label:e.formatMessage({defaultMessage:"看板",id:"admin.gallery.看板"}),src:o},{value:n.CW.SINGLE_SIMPLE,label:e.formatMessage({defaultMessage:"精簡",id:"admin.gallery.精簡"}),src:u},{value:n.CW.COLLAPSE,label:e.formatMessage({defaultMessage:"下拉式",id:"admin.gallery.下拉式"}),src:r}],p=e=>[{value:n.w9.MULTIPLE_SIMPLE,label:e.formatMessage({defaultMessage:"精簡",id:"admin.gallery.精簡"}),src:c},{value:n.w9.DOUBLE_SQUARE,label:e.formatMessage({defaultMessage:"雙方格",id:"admin.gallery.雙方格"}),src:m},{value:n.w9.CAROUSEL,label:e.formatMessage({defaultMessage:"輪播",id:"admin.gallery.輪播"}),src:s}],M=(e,a)=>[{type:"div",children:(0,i.Y)(d.A,{title:e.formatMessage({defaultMessage:"區塊設定",id:"admin.gallery.區塊設定"}),children:e.formatMessage({defaultMessage:"設定此銷售區塊的名稱與版型",id:"admin.gallery.設定此銷售區塊的名稱與版型"})})},{name:"productDisplayType",type:"radio",options:g(e),defaultValue:a?"multiple":"single"},{name:"productDisplayLayout",type:"big-radio",options:f(e),lastDependentValue:["board","simple","collapse"],leftIcon:l.X$G,py:"4",w:"7em",when:["productDisplayType","single"]},{name:"productDisplayLayout",type:"big-radio",options:p(e),leftIcon:l.X$G,py:"4",w:"7em",when:["productDisplayType","multiple"],className:"step3-open-product-block-editor",defaultValue:a?"doubleSquare":void 0},{type:"divider"},{type:"div",children:(0,i.Y)(d.A,{title:e.formatMessage({defaultMessage:"商品內容",id:"admin.gallery.商品內容"}),children:e.formatMessage({defaultMessage:"選擇要上架在此銷售區塊的專案",id:"admin.gallery.選擇要上架在此銷售區塊的專案"})})},{name:"items",type:"products",label:e.formatMessage({defaultMessage:"商品",id:"admin.index.blockEditor.blockFields.商品"}),className:"step4-choose-product-project"}]},46838:(e,a,t)=>{t.d(a,{A:()=>n});var i=t(2445);t(96540);
1var l=t(6442),d=t(8548);let n=e=>{let{url:a,...t}=e,n="en"===(0,l.A)().locale;return(0,i.Y)(d.A,{isExternal:!0,href:a,variant:"outline",size:"xs",flexShrink:0,_active:{bg:"teal.50"},_focus:{bg:"teal.50"},...t,children:n?"Tutorial":"使用教學"})}},54468:(e,a,t)=>{t.d(a,{A:()=>c});var i=t(2445),l=t(27006),d=t(96540),n=t(6442),o=t(78459),s=t(40090),r=t(69141);let m=e=>{let[a,t]=(0,d.useState)();return(0,d.useEffect)(()=>{let a=!1;if(!e)return t(void 0),()=>{a=!0};t(void 0);let i=(0,r.ref)((0,r.getDatabase)());return(0,r.get)((0,r.child)(i,"upgradeModals/data/".concat(e))).then(e=>{if(a||!e.exists())return;let{title:i,description:l,video:d,hidden:n,description_EN:o,title_EN:s}=e.val();t({title:i,description:l,video:d,hidden:n,description_EN:o,title_EN:s})}).catch(i=>{a||(console.error("[useUpgradeModals] Failed to load upgrade modal data",{name:e,error:i}),t(void 0))}),()=>{a=!0}},[e]),a};var u=t(87260);let c=e=>{var a;let{isOpen:t,onClose:r,tier:c,tierContent:g,tracker:f,onMount:p,isPreview:M,superAdminPreviewData:b}=e,h=(0,n.A)(),v="en"===h.locale,[y]=(0,l.useMediaQuery)("(max-width: 768px)"),A=m(g),w=M?b:A,k=y?220:400,[x,T]=(0,d.useState)(!1);(0,d.useEffect)(()=>{p&&p()},[]);let{emitFeatureModalOpen:E,emitFeatureModalUpgradeButtonClick:I}=(0,s.Ay)();(0,d.useEffect)(()=>{!t||(null==w?void 0:w.hidden)||E()},[t,E,null==w?void 0:w.hidden]);let F=null==w?void 0:null===(a=w.video)||void 0===a?void 0:a.includes("image");return(0,i.FD)(l.Modal,{isOpen:t,onClose:r,isCentered:!0,size:"4xl",portalProps:{appendToParentPortal:!1},trapFocus:!1,children:[(0,i.Y)(l.ModalOverlay,{}),(0,i.FD)(l.ModalContent,{py:y?"1em":"5em",px:y?"1em":"2em",children:[(0,i.Y)(l.ModalCloseButton,{}),(0,i.Y)(l.ModalBody,{children:(0,d.createElement)(y?l.VStack:l.HStack,{spacing:y?"2":"10"},(0,i.FD)(i.FK,{children:[F?(0,i.Y)(l.Box,{w:k,children:(0,i.Y)(o.Ay,{src:(e=>(null==e?void 0:e.startsWith("https"))?e:"/".concat(e.replace(/\.image$/,""),".png"))(null==w?void 0:w.video),ratio:1})}):(0,i.Y)(l.Skeleton,{isLoaded:x,children:(0,i.Y)(l.Box,{w:"".concat(k,"px"),h:"".concat(k,"px"),children:(0,i.Y)("video",{width:k,height:k,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,onCanPlay:()=>T(!0),children:(0,i.Y)("source",{src:(()=>{if(null==w?void 0:w.video){var e;return(null==w?void 0:null===(e=w.video)||void 0===e?void 0:e.startsWith("http"))?null==w?void 0:w.video:v?"/video/".concat(null==w?void 0:w.video,"_en.mp4"):"/video/".concat(null==w?void 0:w.video,".mp4")}})()})})})}),(0,i.FD)(l.VStack,{alignItems:y?"center":"start",textAlign:y&&"center",spacing:y?1:4,w:y?"100%":"50%",children:[(0,i.Y)(l.Text,{fontWeight:"900",fontSize:{base:"16px",md:"20px"},color:"GUI.green.500",children:h.formatMessage({defaultMessage:"頂級會員專屬功能",id:"admin.subscription.頂級會員專屬功能"})}),(0,i.Y)(l.Text,{fontWeight:"900",fontSize:{base:"22px",md:"36px"},color:"gray.700",children:v?null==w?void 0:w.title_EN:null==w?void 0:w.title}),(0,i.Y)(l.Text,{fontWeight:"500",color:"gray.700",w:"100%",fontSize:{base:"14px",md:"16px"},children:v?null==w?void 0:w.description_EN:null==w?void 0:w.description}),(0,i.Y)(l.Box,{pt:{base:"2em",md:"3em"},children:(0,i.Y)(u.A,{tracker:f,colorScheme:"green",subClose:r,requiredTier:c,fontSize:"20px",tierContentButton:!0,skipPremiumModal:!0,tierContentTitle:!(null==w?void 0:w.hidden)&&(v?null==w?void 0:w.title_EN:null==w?void 0:w.title),py:"6",px:"10",size:"md",border:"none",adminIsOpen:(null==w?void 0:w.hidden)&&!M&&!0,onClick:(e,a)=>{a(),I()},children:h.formatMessage({defaultMessage:"立即升級",id:"admin.subscription.立即升級"})})})]})]}))})]})]})}},90390:(e,a,t)=>{t.d(a,{O:()=>u,s:()=>m});var i=t(2445),l=t(27006),d=t(77037),n=t(58065),o=t(70382),s=t(85247),r=t(59852);let m="PayPal 支付功能,方便海外用戶付款。每筆交易將收取交易金額 ".concat(r.nk,"% + NT$").concat(r.aN," 元之手續費"),u={type:"boolean",name:"enablePayPal",label:(0,i.FD)(l.HStack,{children:[(0,i.Y)("span",{children:(0,i.Y)(n.A,{defaultMessage:"使用 Portaly 的 Paypal 收款",id:"admin.product.使用 Portaly 的 Paypal 收款"})}),(0,i.Y)(o.A,{label:null,width:"16em",bg:"custom.bgGray",color:"custom.textGray",size:5,placement:"top",children:m})]}),leftIcon:d.SnG,tier:s.fb.PREMIUM,noAnimation:!0}},86925:(e,a,t)=>{t.d(a,{f:()=>i});let i={assistant:!0,profit:!1,profitVendor:!0,foundry:!0,paymentTeamMode:!0,emailSender:!0}},85593:(e,a,t)=>{t.d(a,{Ay:()=>E,DD:()=>f,Ew:()=>r,Gn:()=>h,JB:()=>k,OC:()=>c,Vg:()=>g,_l:()=>
1o,gM:()=>u,gd:()=>m,p_:()=>M,qM:()=>v,rJ:()=>w,vK:()=>s,x:()=>A,yF:()=>p,z7:()=>b});var i=t(94254),l=t(91486),d=t(85247);let n=()=>{let e=new Date,a=new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours()+1,0,0,0),t=new Date(a.getTime()+864e5);return{startTime:a.toISOString(),endTime:t.toISOString()}},o=[{key:"regular",label:{en:"Basic",zh:"常用"},icon:"regular"},{key:"functional",label:{en:"Tools",zh:"變現工具"},icon:"functional"},{key:"content",label:{en:"Content",zh:"影音內容"},icon:"content"},{key:"integrations",label:{en:"Integrations",zh:"平台整合"},icon:"integrations"}],s=e=>({value:'banner&{"items":[{"link":{"mode":"external"},"text":"'.concat(e.formatMessage({defaultMessage:"我的網站",id:"admin.index.footerButton.我的網站"}),'","variant":"gradient","image":"https://images.unsplash.com/photo-1477948879622-5f16e220fa42?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1170&q=80"}]}'),title:e.formatMessage({defaultMessage:"橫幅看板",id:"admin.index.footerButton.橫幅看板"}),max:5,description:e.formatMessage({defaultMessage:"2:1 橫式看板,具備輪播功能",id:"admin.index.footerButton.2:1 橫式看板,具備輪播功能"}),sub_description:e.formatMessage({defaultMessage:"支援 : jpg/png/gif",id:"admin.index.footerButton.支援 : jpg/png/gif"}),ratio:2,group:"regular",icon:"banner"}),r=e=>({value:'square&{"items":[{"image":"https://images.unsplash.com/photo-1554325139-bbd006cd3e5a"}]}',title:e.formatMessage({defaultMessage:"方形看板",id:"admin.index.footerButton.方形看板"}),max:5,description:e.formatMessage({defaultMessage:"1:1 大型看板,具備輪播功能",id:"admin.index.footerButton.1:1 大型看板,具備輪播功能"}),sub_description:e.formatMessage({defaultMessage:"支援 : jpg/png/gif",id:"admin.index.footerButton.支援 : jpg/png/gif"}),group:"regular",icon:"square"}),m=e=>({value:'double&{"items":[{"image":"https://images.unsplash.com/photo-1463436755683-3f805a9d1192"},{"image":"https://images.unsplash.com/photo-1519052537078-e6302a4968d4"}]}',title:e.formatMessage({defaultMessage:"雙方格看板",id:"admin.index.footerButton.雙方格看板"}),perRow:2,max:6,description:e.formatMessage({defaultMessage:"一組兩個正方形看板",id:"admin.index.footerButton.一組兩個正方形看板"}),sub_description:e.formatMessage({defaultMessage:"支援 : jpg/png/gif",id:"admin.index.footerButton.支援 : jpg/png/gif"}),group:"regular",icon:"double"}),u=(e,a)=>({value:"mailing-list",title:e.formatMessage({defaultMessage:"E-mail 蒐集",id:"admin.mailing.E-mail 蒐集"}),description:e.formatMessage({defaultMessage:"可用來蒐集 E-mail 名單",id:"admin.mailing.可用來蒐集 E-mail 名單"}),defaultHidden:!0,maxCount:[1,3,1/0],tierContent:"mailing",entryPoint:l.A.Mailing,group:a,className:"three-step"}),c=e=>({value:'player&{"platform":"youtube","items":[{"urlyoutube":"https://www.youtube.com/@apple"}],"type":"player"}',title:e.formatMessage({defaultMessage:"影片播放器",id:"admin.index.footerButton.影片播放器"}),description:e.formatMessage({defaultMessage:"支援 Youtube / Vimeo / Twitch / TikTok 播放",id:"admin.index.footerButton.支援 Youtube / TikTok 播放功能"}),icon:"player",group:"regular"}),g=e=>({value:'grid&{"items":[{"image":"/logo1.svg"},{"image":"/logo2.svg"},{"image":"/logo3.svg"},{"image":"/logo4.svg"}]}',title:e.formatMessage({defaultMessage:"Logo 牆",id:"admin.index.footerButton.Logo 牆"}),perRow:4,max:12,description:e.formatMessage({defaultMessage:"可展示合作夥伴 Logo,或其他小圖示與連結",id:"admin.index.footerButton.可展示合作夥伴 Logo,或其他小圖示與連結"}),group:"regular",icon:"grid"}),f=e=>({value:"title",title:e.formatMessage({defaultMessage:"文字",id:"admin.index.footerButton.標題文字"}),description:e.formatMessage({defaultMessage:"文字標題 / 文字段落",id:"admin.index.footerButton.純文字的標題"}),group:"regular"}),p=e=>({value:"divider",title:e.formatMessage({defaultMessage:"分隔線",id:"admin.index.footerButton.分隔線"}),description:e.formatMessage({defaultMessage:"可分隔不同區塊的線段",id:"admin.index.footerButton.可分隔不同區塊的線段"}),group:"regular"}),M=(e,a)=>({value:"list",title:e.formatMessage({defaultMessage:"文字按鈕",id:"admin.index.footerButton.文字按鈕"}),max:7,description:e.formatMessage({defaultMessage:"純文字按鈕,可一次收整多連結",id:"admin.index.footerButton.純文字按鈕,可一次收整多連結"}),group:a}),b=e=>({value:'audio&{"url":"https://open.spotify.com/show/3wBfqov60qDZbEVjPHo0a8","type":"audio"}',title:e.formatMessage({defaultMessage:"音訊播放器",id:"admin.index.footerButton.音訊播放器"}),description:e.formatMessage({defaultMessage:"本功能目前支援 Spotify 、 Apple Podcasts 及 SoundCloud",id:"admin.index.blockEditor.blockFields.本功能目前支援 Spotify 、 Apple Podcasts 及 SoundCloud"}),icon:"audio"}),h=e=>({value:'integrations&{"platform":"kofi","url-kofi":"https://ko-fi.com/felvelial","type":"integrations"}
1',title:e.formatMessage({defaultMessage:"平台整合",id:"admin.index.footerButton.integrations.平台整合"}),description:e.formatMessage({defaultMessage:"可嵌入 Patreon / Kofi / Buy Me a Coffee / Gumroad 等外部服務",id:"admin.index.footerButton.integrations.supports"}),icon:"integrations"}),v=(e,a)=>({value:"products",title:e.formatMessage({defaultMessage:"數位商品",id:"admin.index.footerButton.數位商品"}),max:10,description:e.formatMessage({defaultMessage:"可用來販售數位商品、影片、或其他服務",id:"admin.index.footerButton.可用來販售數位商品、影片、或其他服務"}),group:a,defaultItems:0,className:"step1-product-block",requireProductsData:!0,listener:{productDisplayType:(e,a)=>{"single"===e&&a.setValue("productDisplayLayout","board"),"multiple"===e&&a.setValue("productDisplayLayout","multipleSimple")}}}),y=(e,a)=>({value:'products&{"category":"live"}',title:e.formatMessage({defaultMessage:"直播課程",id:"admin.liveProduct.直播課程"}),max:4,description:e.formatMessage({defaultMessage:"可用來販售直播課程、講座、或其他服務",id:"admin.index.footerButton.可用來販售直播課程、講座、或其他服務"}),group:a,icon:"liveProduct"}),A=e=>({value:"businessCard",title:e.formatMessage({defaultMessage:"數位名片",id:"admin.business.數位名片"}),description:e.formatMessage({defaultMessage:"展示聯繫資訊與社群 QR Code",id:"admin.index.footerButton.展示聯繫資訊與社群 QR Code"}),group:"regular",icon:"businessCard",tierContent:"businessCard",maxCount:[0,1,1],tierContent:"businessCard",upgradeTitle:e.formatMessage({defaultMessage:"升級即可啟用名片功能",id:"admin.index.footerButton.升級即可啟用名片功能"}),featureLocked:e.formatMessage({defaultMessage:"頂級會員專屬功能",id:"admin.subscription.頂級會員專屬功能"}),entryPoint:l.A.BusinessCard}),w=e=>({value:'collection&{"items":[{"image":"https://images.unsplash.com/photo-1554325139-bbd006cd3e5a"}]}',title:e.formatMessage({defaultMessage:"圖文",id:"admin.index.footerButton.圖片"}),max:5,description:e.formatMessage({defaultMessage:"1:1 圖片 + 文字編輯功能",id:"admin.index.footerButton.1:1 圖片 + 文字編輯功能"}),icon:"square"}),k=e=>({value:"profit",title:e.formatMessage({defaultMessage:"廣告看板",id:"admin.index.footerButton.profit.廣告看板"}),description:"放置外部品牌廣告,獲取流量變現收益",icon:"profit",group:"functional",badge:"new"}),x=(e,a)=>{let t=a?"US$":"NT$",i=a?"29":"1,280",l=a?"49":"1,680",o=n();return{value:a?'limitedTimeEvent&{"title":"Limited Time Event","description":"\uD83D\uDED2 Event Details\\nAnnual group buy is back!\\nThis time featuring the classic thermos in limited edition Macaron Pink - now available for the first time.","timezone":"America/New_York","showCountdown":true,"price":{"showPricing":false,"sale":"'.concat(i,'","original":"').concat(l,'","currency":"').concat(t,'"},"cta":{"upcoming":{"text":"Notify Me","collectEmail":true,"emailTitle":"Leave your email to be notified when sales start!"},"active":{"text":"Buy Now","linkId":""},"ended":{"text":"Notify Me Next Time","collectEmail":true,"emailTitle":"Leave your email to be notified first when the next sale starts!"}},"endedMessage":"This event has ended. Thank you for your participation.","mainImage":"","startTime":"').concat(o.startTime,'","endTime":"').concat(o.endTime,'","upcoming":{"productLabel":"Coming Soon","description":"\uD83D\uDED2 Event Details\\nAnnual group buy is back!\\nThis time featuring the classic thermos in limited edition Macaron Pink - now available for the first time.","showCountdown":true,"enableGoogleCalendar":false,"enableMailingList":true},"active":{"productLabel":"Active","description":"\uD83D\uDED2 Event Details\\nLimited time offer, while supplies last!","showCountdown":true},"ended":{"productLabel":"Ended","description":"\uD83D\uDED2 Event Details\\nThank you for your participation. Stay tuned for the next event!","showCountdown":false,"enableMailingList":false}}'):'limitedTimeEvent&{"title":"限時活動名稱","description":"\uD83D\uDED2 活動說明\\n年度活動團購回歸!\\n本次團購商品經典保溫杯限定色馬卡龍粉 - 首次開放購買","timezone":"Asia/Taipei","showCountdown":true,"price":{"showPricing":false,"sale":"'.concat(i,'","original":"').concat(l,'","currency":"').concat(t,'"}
1,"cta":{"upcoming":{"text":"搶先登記","collectEmail":true,"emailTitle":"留下你的信箱,開賣第一時間通知你!"},"active":{"text":"手刀搶購","linkId":""},"ended":{"text":"下次開賣提醒我","collectEmail":true,"emailTitle":"留下你的信箱,下次開賣第一時間通知你!"}},"endedMessage":"本次活動已結束,感謝你的參與","mainImage":"","startTime":"').concat(o.startTime,'","endTime":"').concat(o.endTime,'","upcoming":{"productLabel":"即將開始","description":"\uD83D\uDED2 活動說明\\n年度活動團購回歸!\\n本次團購商品經典保溫杯限定色馬卡龍粉 - 首次開放購買","showCountdown":true,"enableGoogleCalendar":false,"enableMailingList":true},"active":{"productLabel":"進行中","description":"\uD83D\uDED2 活動說明\\n限時優惠,售完為止!","showCountdown":true},"ended":{"productLabel":"已結束","description":"\uD83D\uDED2 活動說明\\n感謝您的參與,敬請期待下次活動!","showCountdown":false,"enableMailingList":false}}'),title:e.formatMessage({defaultMessage:"限時活動",id:"admin.index.footerButton.限時活動"}),description:e.formatMessage({defaultMessage:"可設定自動排程、活動倒數、價格顯示,適合開團、商品銷售、活動宣傳。",id:"admin.index.footerButton.限時活動描述"}),max:3,group:"regular",icon:"limitedTimeEvent",badge:"new",tier:d.fb.PREMIUM,tierContent:"limitedTimeEvent",upgradeTitle:e.formatMessage({defaultMessage:"升級即可啟用限時活動",id:"admin.index.footerButton.升級即可啟用限時活動"}),featureLocked:e.formatMessage({defaultMessage:"頂級會員專屬功能",id:"admin.subscription.頂級會員專屬功能"})}},T=(e,a)=>({value:'list&{"items":[{"link":{"mode":"internal","url":"page/about"},"icon":"pushpin","text":"'.concat(e.formatMessage({defaultMessage:"自我介紹",id:"admin.index.footerButton.自我介紹"}),'"}]}'),icon:"pages",title:e.formatMessage({defaultMessage:"自我介紹",id:"admin.index.footerButton.自我介紹"}),description:e.formatMessage({defaultMessage:"連結至一個分頁,撰寫個人或品牌的描述",id:"admin.index.footerButton.連結至一個分頁,撰寫個人或品牌的描述"}),group:a}),E=(e,a)=>{let t=e||{formatMessage:e=>e.defaultMessage},l="en"===t.locale;return[M(t,"regular"),s(t),r(t),m(t),g(t),c(t),v(t,"regular"),x(t,l),u(t,"regular"),A(t),v(t,"functional"),y(t,"functional"),{value:"comments",title:t.formatMessage({defaultMessage:"評論看板",id:"admin.index.commentsCard.title"}),description:t.formatMessage({defaultMessage:"展示你的商品獲得的精選評論",id:"admin.index.commentsCard.description"}),group:"functional",icon:"comments",maxCount:[1,1,1],badge:"new"},{value:'list&{"items":[{"link":{"mode":"internal","url":"support"},"text":"'.concat(t.formatMessage({defaultMessage:"贊助連結",id:"admin.index.footerButton.贊助連結"}),'","icon":"heart"}]}'),icon:"support",title:t.formatMessage({defaultMessage:"贊助連結",id:"admin.index.footerButton.贊助連結"}),description:t.formatMessage({defaultMessage:"讓粉絲、觀眾可以直接贊助你。",id:"admin.index.footerButton.讓粉絲、觀眾可以直接贊助你。"}),group:"functional"},u(t,"functional"),{value:'list&{"items":[{"link":{"mode":"internal","url":"contact"},"icon":"info","text":"'.concat(t.formatMessage({defaultMessage:"合作表單",id:"admin.index.footerButton.合作表單"}),'"}]}'),icon:"contact",title:t.formatMessage({defaultMessage:"合作表單",id:"admin.index.footerButton.合作表單"}),description:t.formatMessage({defaultMessage:"提供合作、委託、或接案的表單。",id:"admin.index.footerButton.提供合作、委託、或接案的表單。"}),group:"functional"},(0,i.A)(a,"profit")&&k(t),p(t),f(t),T(t,"regular"),y(t,"content"),{value:'player&{"platform":"youtube","items":[{"urlyoutube":"https://www.youtube.com/@apple"}]}',title:"Youtube",description:t.formatMessage({defaultMessage:"支援 Youtube 播放功能",id:"admin.index.footerButton.支援 Youtube 播放功能"}),group:"content",icon:"youtube"},{value:'player&{"platform":"vimeo","items":[{"urlvimeo":"https://vimeo.com/717779857"}]}',icon:"vimeo",title:"Vimeo",description:t.formatMessage({defaultMessage:"支援 Vimeo 播放功能",id:"admin.index.footerButton.支援 Vimeo 播放功能"}),group:"content"},{value:'player&{"platform":"tiktok","items":[{"urltiktok":"https://www.tiktok.com/@disney/video/7168963383226846510"}]}',icon:"tiktok",title:"Tiktok",description:t.formatMessage({defaultMessage:"支援 Tiktok 播放功能",id:"admin.index.footerButton.支援 Tiktok 播放功能"}),group:"content"},{value:'player&{"platform":"twitch","items":[{"urltwitch":"https://www.twitch.tv/twitch"}]}',icon:"twitch",title:"Twitch",description:t.formatMessage({defaultMessage:"支援 Twitch 播放功能",id:"admin.index.footerButton.支援 Twitch 播放功能"}),group:"content"},{value:'audio&{"url":"https://open.spotify.com/show/3wBfqov60qDZbEVjPHo0a8"}',icon:"spotify",title:"Spotify",description:t.formatMessage({defaultMessage:"支援 Spotify 播放功能",id:"admin.index.footerButton.支援 Spotify 播放功能"}),group:"content"},{value:'audio&{"url":"https://podcasts.apple.com/tw/podcast/global-news-podcast/id135067274"}
1',icon:"applePodcast",title:"Apple Podcast",description:t.formatMessage({defaultMessage:"支援 Apple Podcast 播放功能",id:"admin.index.footerButton.支援 Apple Podcast 播放功能"}),group:"content"},{value:'audio&{"url":"https://soundcloud.com/soundcloud"}',icon:"soundCloud",title:"Soundcloud",description:t.formatMessage({defaultMessage:"支援 Soundcloud 播放功能",id:"admin.index.footerButton.支援 Soundcloud 播放功能"}),group:"content"},{value:'integrations&{"platform":"threads","url-threads":"https://www.threads.net/@'.concat(l?"portaly.global":"portaly.cc",'"}'),icon:"threads",title:"Threads",description:t.formatMessage({defaultMessage:"連結到你的 Threads 頁面",id:"admin.index.blockEditor.blockFields.intergrations.threads.description"}),group:"integrations"},{value:'integrations&{"platform":"patreon","url-patreon":"https://www.patreon.com/felvelial"}',icon:"patreon",title:"Patreon",description:t.formatMessage({defaultMessage:"邀請粉絲訂閱你的 Patreon",id:"admin.index.blockEditor.blockFields.intergrations.patreon.description"}),group:"integrations"},{value:'integrations&{"platform":"kofi","url-kofi":"https://ko-fi.com/felvelial"}',icon:"kofi",title:"Kofi",description:t.formatMessage({defaultMessage:"嵌入 Kofi 贊助小工具",id:"admin.index.blockEditor.blockFields.intergrations.kofi.description"}),group:"integrations"},{value:'integrations&{"platform":"gumroad","url-gumroad":"https://krenzcushart.gumroad.com/l/BVpQe","variant":"lightbox"}',icon:"gumroad",title:"Gumroad",description:t.formatMessage({defaultMessage:"銷售你的 Gumroad 產品",id:"admin.index.blockEditor.blockFields.intergrations.gumroad.description"}),group:"integrations"},{value:'integrations&{"platform":"github","url-github":"https://github.com/Significant-Gravitas/Auto-GPT","githubVariant":"repo"}',icon:"github",title:"Github",description:t.formatMessage({defaultMessage:"嵌入你的 Github 頁面",id:"admin.index.footerButton.嵌入你的 Github 頁面"}),group:"integrations"},{value:'integrations&{"platform":"figma","variant":"profile","url-figma":"https://www.figma.com/@figma"}',icon:"figma",title:"Figma",description:t.formatMessage({defaultMessage:"連結到你的 Figma 頁面",id:"admin.index.blockEditor.blockFields.intergrations.figma.description"}),group:"integrations"},{value:'integrations&{"platform":"behance","url-behance":"https://www.behance.net/pixeljeff"}',icon:"behance",title:"Behance",description:t.formatMessage({defaultMessage:"嵌入你的 Behance 頁面",id:"admin.index.footerButton.嵌入你的 Behance 頁面"}),group:"integrations"},{value:l?'integrations&{"platform":"instagram","url-instagram":"https://www.instagram.com/instagram/"}':'integrations&{"platform":"instagram","url-instagram":"https://www.instagram.com/portaly.cc"}',icon:"instagram",title:"Instagram",description:t.formatMessage({defaultMessage:"嵌入你的 instagram 頁面",id:"admin.index.footerButton.可嵌入 instagram 外部服務"}),group:"integrations"},{value:'integrations&{"platform":"coffee","url-coffee":"https://www.buymeacoffee.com/refaubrey"}',icon:"coffee",title:"Buy me a coffee",description:t.formatMessage({defaultMessage:"嵌入 Buy Me a Coffee 贊助小工具",id:"admin.index.blockEditor.blockFields.intergrations.coffee.description"}),group:"integrations"},{value:'integrations&{"platform":"fanbox","url-fanbox":"https://hiko.fanbox.cc/"}',icon:"fanbox",title:"Fanbox",description:t.formatMessage({defaultMessage:"嵌入你的 pixiv 連結",id:"admin.index.blockEditor.blockFields.intergrations.fanbox.description"}),group:"integrations"},{value:'integrations&{"platform":"dribbble","url-dribbble":"https://dribbble.com/dribbble"}',icon:"dribbble",title:"Dribbble",description:t.formatMessage({defaultMessage:"連結到你的 Dribbble 頁面",id:"admin.index.blockEditor.blockFields.intergrations.dribbble.description"}),group:"integrations"},{value:'integrations&{"platform":"webtoon","url-webtoon":"https://www.webtoons.com/en/comedy/mage-and-demon-queen/list?title_no=1438"}',icon:"webtoon",title:"Webtoon",description:t.formatMessage({defaultMessage:"連結到你的 WEBTOON 頁面",id:"admin.index.blockEditor.blockFields.intergrations.webtoon.description"}),group:"integrations"},{value:'integrations&{"platform":"gCalendar","url-gCalendar":"https://calendar.google.com/calendar/u/1/embed?src=emgtdHcudXNhI2hvbGlkYXlAZ3JvdXAudi5jYWxlbmRhci5nb29nbGUuY29t"}',icon:"gCalendar",title:"Google Calendar",description:t.formatMessage({defaultMessage:"嵌入你的公開日曆",id:"admin.index.blockEditor.blockFields.intergrations.calendar.description"}),group:"integrations"},{value:'integrations&{"platform":"calendly","url-calendly":"https://calendly.com/portaly/portaly-beta-demo"}',icon:"calendly",title:"Calendly",description:t.formatMessage({defaultMessage:"嵌入你的公開日曆",id:"admin.index.blockEditor.blockFields.intergrations.calendar.description"}),group:"integrations"},{value:"integrations",title:t.formatMessage({defaultMessage:"嵌入",id:"admin.index.footerButton.integrations"}),description:t.formatMessage({defaultMessage:"可嵌入 Patreon / Kofi / Buy Me a Coffee / Gumroad 等外部服務",id:"admin.index.footerButton.integrations.supports"}),icon:"integrations",group:"integrations"}
1].filter(Boolean)}},29582:(e,a,t)=>{t.d(a,{b:()=>l});let i={sm:e=>{switch(e){case"product":return 620;case"product-comment":return 420;case"profit":return 260;default:return 540}},lg:e=>{switch(e){case"product":return 620;case"product-comment":default:return 600;case"profit":return 310}}},l=(e,a)=>{let t=[{label:e.formatMessage({id:"admin.embed.小",defaultMessage:"小"}),value:"sm",size:400,height:i.sm(a)},{label:e.formatMessage({id:"admin.embed.大",defaultMessage:"大"}),value:"lg",size:600,height:i.lg(a)}];return"product-comment"===a?t.filter(e=>"lg"===e.value):t}},77512:(e,a,t)=>{t.d(a,{fW:()=>i,sw:()=>d});let i="user_login",l={[i]:400,update_block:90,update_product:90},d=e=>{let a=l[e];return a?{expireAt:new Date(Date.now()+864e5*a)}:{}}},2793:(e,a,t)=>{t.d(a,{$U:()=>d,DD:()=>u,H_:()=>n,MA:()=>m,Og:()=>i,bW:()=>o,id:()=>r,tw:()=>s,ur:()=>l});let i=4,l=1,d="default",n=.3,o=["ai","software","career","self-growth","language","mindfulness","social-media","finance","travel","health"],s={ai:"AI 應用",software:"軟體與工具",career:"職涯與工作","self-growth":"自我成長",language:"語言學習",mindfulness:"心靈成長","social-media":"社群經營",finance:"理財與投資",travel:"旅遊",health:"健康與醫療"},r={ai:"purple.500",software:"blue.500",career:"teal.500","self-growth":"orange.300",language:"cyan.600",mindfulness:"pink.500","social-media":"red.400",finance:"green.600",travel:"yellow.600",health:"messenger.500"},m=["social-media","software","finance","career","ai","self-growth","language","mindfulness","travel","health"],u={"social-media":{name:"社群經營",description:"實用社群經營教學與案例解析,協助你建立穩定且有黏著度的社群。"},software:{name:"軟體與工具",description:"精選 Notion、Procreate、Excel 等軟體工具應用,幫你加速創作與工作流程。"},finance:{name:"理財與投資",description:"瀏覽理財講座、財務筆記與投資分析,輕鬆探索理財規劃與被動收入。"},career:{name:"職涯與工作",description:"集結求職、面試與履歷撰寫資源,協助你在職場中穩健成長。"},ai:{name:"AI 應用",description:"從求職技巧到工具應用,瀏覽熱門 AI 應用筆記、實戰教學與延伸課程資源。"},"self-growth":{name:"自我成長",description:"探索職涯規劃、心理調適與自我激勵資源,打造專屬的個人成長路線。"},language:{name:"語言學習",description:"精選英文、日文及多國語言學習資源,陪你建立穩定的語言能力。"},mindfulness:{name:"心靈成長",description:"蒐集冥想練習、情緒管理與心理健康資源,幫助你安定身心、照顧自我。"},travel:{name:"旅遊",description:"彙整旅行規劃、海外生活與數位遊牧經驗,陪你開啟下一段旅程。"},health:{name:"健康與醫療",description:"蒐集運動、飲食與保健資源,幫你建立日常健康的生活節奏。"}}},15709:(e,a,t)=>{t.d(a,{$C:()=>d,NF:()=>l,kh:()=>i});let i=5,l={auto:"全自動",semiAuto:"半自動",manual:"自行選品"},d={auto:"Auto",semiAuto:"Semi-Auto",manual:"Manual"}},65270:(e,a,t)=>{t.d(a,{A:()=>n,a:()=>d});var i=t(44698),l=t(5560);let d=[{slug:"taiccaglobal",profileId:"LN6vpOjEr6bx0vvm1G53"},{slug:"yourator",profileId:"ptUVfMLR9nRXZa78rsD3"}],n=[{slug:"cwl",id:"SUUqEYYJVEkocr2FWYvX",month:2},{slug:"riven",id:"aWhdUBZzOVy0EodMHFSG",month:3},{slug:"lazyabby",id:"MZvyJ5VGMlFL95qucdfe",month:2},{slug:"goldenmelody",id:"AIOCiQVilS4yLRkzxY8K",month:2},{slug:"aapdgo",id:"2VwDmGS9nVnjFVPCjTpc",month:3},{slug:"taiccaglobal",id:"LN6vpOjEr6bx0vvm1G53",month:12,bonusQuota:100,autoGroupMember:!0,withMemberStats:!0,banner:i.A,bannerRatio:2,withTemplates:["artist.professional.temp","company.temp"],templateText:"### 兩款型錄模板 | 打造您的專業形象\n\nA 模板提供音樂串流平台列表區,建議音樂人選用以打造專屬EPK;B 模板設有Showreel區,建議公司或團隊選用以呈現業務實績。敬請依需求選用合適版型。"},{slug:"yourator",id:"ptUVfMLR9nRXZa78rsD3",month:1,banner:l.A,bannerRatio:1,withTemplates:["youratorAIcareerfair_pm","youratorAIcareerfair_designer","youratorAIcareerfair_marketing"],templateText:"### Yourator | 2026 AI 職涯博覽會\n\n累積近 10 年的博覽會經驗、累積參與人數突破 60,000 人次,Yourator AI 職涯博覽會為全台規模最大、最具指標性的職涯盛會。"}]},48030:(e,a,t)=>{t.d(a,{w:()=>i});let i="none"},26919:(e,a,t)=>{t.d(a,{A:()=>i});let i=(0,t(96540).createContext)({addSubFields:()=>{},clearSubFields:()=>{}})},95854:(e,a,t)=>{t.d(a,{Z:()=>i,c:()=>l});class i{async handleResponse(e){if(!e.ok){let a=await e.json().catch(()=>({})),t=a.message||a.error||"HTTP error ".concat(e.status),i=Error(t);
1throw i.code=a.error,i.status=e.status,i.details=a.details,console.error("LimitedTimeEventApiClient error:",t),i}try{return await e.json()}catch(e){return console.error("LimitedTimeEventApiClient JSON parse error:",e),{}}}async getEventById(e){let a=await fetch("".concat(this.baseUrl,"/").concat(e));return this.handleResponse(a)}async getEventByBlockId(e){let a=await fetch("".concat(this.baseUrl,"/byBlockId/").concat(e));return this.handleResponse(a)}async collectEmail(e){let a=await fetch("".concat(this.baseUrl,"/collectEmail"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return this.handleResponse(a)}async getEmails(e,a){let t=new URL("".concat(this.baseUrl,"/").concat(e,"/emails"),window.location.origin);a&&t.searchParams.set("state",a);let i=await fetch(t.toString());return this.handleResponse(i)}async getEmailCounts(e){var a,t,i;let l=await fetch("".concat(this.baseUrl,"/").concat(e,"/emails")),d=await this.handleResponse(l);return{beforeEventCount:null!==(a=d.beforeEventCount)&&void 0!==a?a:0,afterEventCount:null!==(t=d.afterEventCount)&&void 0!==t?t:0,total:null!==(i=d.total)&&void 0!==i?i:0}}async exportEmails(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"json",t=new URL("".concat(this.baseUrl,"/export"),window.location.origin);t.searchParams.set("profileId",e),t.searchParams.set("format",a);let i=await fetch(t.toString());return"csv"===a?i.ok?i.text():(console.error("LimitedTimeEventApiClient error:","HTTP error ".concat(i.status)),""):(await this.handleResponse(i)).emails}constructor(){this.baseUrl="/api/limitedTimeEvent"}}let l=new i},52878:(e,a,t)=>{t.d(a,{A:()=>i});class i{convertToLatestVersion(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.convertersByVersion.slice(a).reduce((e,a)=>a.convert(e),e)}getDefaultValues(e){return{}}constructor(){this.convertersByVersion=[]}}},84107:(e,a,t)=>{t.d(a,{A:()=>l});var i=t(52878);class l extends i.A{getDefaultValues(e){let a=e.locale;return{notionPageUrl:l.DEFAULT_NOTION_PAGE_URL_BY_LOCALE[a]||l.DEFAULT_NOTION_PAGE_URL_EN}}constructor(...e){super(...e),this.convertersByVersion=[]}}l.DEFAULT_NOTION_PAGE_URL_ZH="https://portaly.notion.site/ee775ad51cb045488bc429d90ac091bc",l.DEFAULT_NOTION_PAGE_URL_EN="https://portaly.notion.site/Page-Title-ab6405b652ad45b5a33ea84c2504552f",l.DEFAULT_NOTION_PAGE_URL_BY_LOCALE={zh:l.DEFAULT_NOTION_PAGE_URL_ZH,en:l.DEFAULT_NOTION_PAGE_URL_EN}},63326:(e,a,t)=>{t.d(a,{CD:()=>l,x7:()=>d});var i=t(59576);let l=["creatorPromotionEnabled","adminStoreEnabled","adminProfitEnabled","enablePortalyAds","enableProfit"],d=e=>(0,i.A)(null==e?void 0:e.creatorPromotionEnabled)},78731:(e,a,t)=>{t.d(a,{A:()=>l});var i=t(41195);let l=e=>{let a=(0,i.Ak)();return{itemOrders:[a],itemMap:{[a]:{itemId:a,productId:e,isContainerActive:!0}}}}},95967:(e,a,t)=>{t.d(a,{a:()=>i});let i=e=>e?Array.isArray(e)?e:"object"==typeof e?Object.values(e):[]:[]},10141:(e,a,t)=>{t.d(a,{aS:()=>n,f3:()=>l,gC:()=>o,x_:()=>d});var i=t(95967);let l=(e,a,t)=>{let i=e.filter(e=>e!==a),l=t.indexOf(a),d=-1===l?t:t.slice(0,l),n=0;for(let e=d.length-1;e>=0;e-=1){let a=i.indexOf(d[e]);if(-1!==a){n=a+1;break}}return i.splice(n,0,a),i},d=(e,a,t)=>e.includes(a)?l(e,a,t):e,n=(e,a)=>e.filter(e=>e!==a),o=async(e,a,t)=>{let l=await e.get(a),d={};return Object.entries(t).forEach(e=>{let[a,t]=e,n=l.get(a);null!=n&&"object"!=typeof n&&console.warn("[applyOrders] ".concat(a," 不是 array/map(").concat(typeof n,"),視為空陣列並覆寫")),d[a]=t((0,i.a)(n))}),e.update(a,d),d}},57762:(e,a,t)=>{t.d(a,{L:()=>d});var i=t(22405),l=t(10141);let d=(e,a,t)=>(0,i.runTransaction)(e,e=>(0,l.gC)(e,a,t))},35348:(e,a,t)=>{t.d(a,{A:()=>c});var i=t(40860),l=t.n(i),d=t(63560),n=t.n(d),o=t(8483),s=t.n(o),r=t(23753),m=t(56726);let u=(e,a,t,i)=>{if("group"===a.type)return"items"===a.name||n()(e,a.name,[a.fields.reduce(u,{})]),e;if(a.tabs){if(a.when){let t=i.find(e=>e.name===a.when[0]);if((null==t?void 0:t.type)==="hidden"){var l;if(!(0,r.Q)(a.when,null!==(l=e[a.when[0]])&&void 0!==l?l:t.defaultValue))return e}}return a.tabs.reduce((e,a)=>a.fields.reduce(u,e),e)}let d=(a,t)=>t.map(e=>({...e,name:(0,m.A)(a,e.name)})).reduce(u,e);return a.leftFields&&(e=d(a.name,a.leftFields)),a.rightFields&&(e=d(a.name,a.rightFields)),a.defaultValue&&s()(e,a.name,e=>void 0===e?a.defaultValue:e),e},c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l()(e,u,a)}},67447:(e,a,t)=>{t.d(a,{A:()=>i});let i=(e,a)=>"zh"===e?a:"".concat(a,"_").concat(e)},56726:(e,a,t)=>{t.d(a,{A:()=>i});let i=(e,a)=>a.startsWith(".")?e.replace(/[^.]+\.[^.]+$/,a):e.replace(/[^.]+$/,a)},88590:(e,a,t)=>{t.d(a,{A:()=>n});var i=t(33650),l=t(22405);let d=e=>"number"==typeof e||"string"==typeof e&&!isNaN(e),n=e=>{let a=null;if(e instanceof l.Timestamp)a=e.toDate();else if(d(null==e?void 0:e.nanoseconds)&&d(null==e?void 0:e.seconds))a=new l.Timestamp(+e.seconds,+e.nanoseconds).toDate();else if(d(null==e?void 0:e._nanoseconds)&&d(null==e?void 0:e._seconds))a=new l.Timestamp(+e._seconds,+e._nanoseconds).toDate();else if(e instanceof Date)a=e;else if(d(e)){let t=Number(e);Number.isFinite(t)&&(a=new Date(Math.abs(t)>=1e12?t:1e3*t))}else if("string"==typeof e){let t=Date.parse(e);Number.isNaN(t)||(a=new Date(t))}return(0,i.A)(a)?a:null}},94254:(e,a,t)=>{t.d(a,{A:()=>l});var i=t(86925);let l=(e,a,t)=>!i.f[a]||null!=e&&!!e[a]||!!t&&null!=e&&!!e[t]},16065:(e,a,t)=>{t.d(a,{A:()=>l});var i=t(22405);let l=e=>e instanceof i.FieldValue||'{"_methodName":"deleteField"}'===JSON.stringify(e)},99867:(e,a,t)=>{t.d(a,{$F:()=>p,GW:()=>M,Qh:()=>m,Tv:()=>
1o,bu:()=>c,p2:()=>r,qS:()=>g,ul:()=>h,vY:()=>u,wZ:()=>s}),t(63081);var i=t(48030),l=t(65606);let d=e=>e.replace(/\/+$/,""),n=()=>{try{return JSON.parse('{"apiKey":"AIzaSyBoGsX5nv7EXwB4IV37Jwxzmz3QMbvhtpI","authDomain":"portaly-ca9e1.firebaseapp.com","databaseURL":"https://portaly-ca9e1.firebaseio.com","projectId":"portaly-ca9e1","storageBucket":"portaly-ca9e1.appspot.com","messagingSenderId":"732722605559","appId":"1:732722605559:web:839613a5bb66c4c17ed2f2","measurementId":"G-22RPK6D2NL"}').projectId}catch(e){return}},o=()=>d("https://rewards.portaly.cc"),s=()=>l.env.NEXT_PUBLIC_PORTALY_REWARDS_PROJECT_ID||n()||"",r=e=>{let a=Array.isArray(e)?e[0]:e;return!!a&&("portaly-rewards"===a||a===l.env.NEXT_PUBLIC_PORTALY_REWARDS_PROJECT_ID||a===n())},m="/dashboard?intent=withdraw",u="/dashboard?tab=profitProducts",c=()=>"".concat(o()).concat(m),g=e=>"".concat(o()).concat(u).concat(e?"&offerId=".concat(encodeURIComponent(e)):""),f=()=>"".concat(o(),"/auth/sso/callback"),p=e=>{let a=Array.isArray(e)?e[0]:e;if(!a)return!1;try{return new URL(a).href===new URL(f()).href}catch(e){return!1}},M=function(){let{returnTo:e="/dashboard",silent:a=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=f(),l=new URL("/auth/sso",window.location.origin);return l.searchParams.set("client_id",s()),l.searchParams.set("redirect_uri",t),l.searchParams.set("state",e),a&&l.searchParams.set("prompt",i.w),l.toString()},b=e=>Array.isArray(e)?e[0]:e,h=function(){let{invitationId:e,ref:a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new URLSearchParams({tab:"partner",view:"partner"}),i=b(e),l=b(a);return i&&t.set("invitationId",i),l&&t.set("ref",l),"/dashboard?".concat(t.toString())}},43230:(e,a,t)=>{t.d(a,{A:()=>i});let i=e=>"".concat(e,"-uploader")},84757:(e,a,t)=>{t.d(a,{A:()=>s});var i=t(96540),l=t(27939),d=t(41195);class n{constructor(e,a={gapiScriptId:"gapi"}){this.initialize=async()=>{await this._installGAPIScript();let e=await this._loadCalendarClient();this.calendar=e.calendar},this.createEvent=async e=>{let{title:a,description:t,startDateTime:i,startTimeZone:l,endDateTime:d,endTimeZone:n,enableGoogleMeet:o=!1,calendarId:s="primary",guestsCanInviteOthers:r=!1,guestsCanModify:m=!1,guestsCanSeeOtherGuests:u=!1,attendees:c=[],sendUpdates:g="all"}=e;return this.calendar.events.insert({calendarId:s,sendUpdates:g,resource:{start:{dateTime:i,timeZone:l},end:{dateTime:d,timeZone:n},summary:a,description:t,attendees:c,guestsCanInviteOthers:r,guestsCanModify:m,guestsCanSeeOtherGuests:u,...o&&this._getCreateGoogleMeetPayload()},conferenceDataVersion:1})},this.getEvent=async e=>{let{eventId:a,calendarId:t="primary"}=e;return this.calendar.events.get({eventId:a,calendarId:t})},this.patchEvent=async e=>{var a;let{eventId:t,event:i,calendarId:l="primary",sendUpdates:d="none"}=e,{title:n,description:o,startDateTime:s,startTimeZone:r,endDateTime:m,endTimeZone:u,enableGoogleMeet:c}=i,{result:g}=await this.getEvent({eventId:t}),f=!!(null===(a=g.conferenceData)||void 0===a?void 0:a.conferenceId);return this.calendar.events.patch({calendarId:l,eventId:t,sendUpdates:d,resource:{start:{dateTime:s,timeZone:r},end:{dateTime:m,timeZone:u},summary:n,description:o,...f?!c&&this._getRemoveGoogleMeetPayload():c&&this._getCreateGoogleMeetPayload()},conferenceDataVersion:1})},this.deleteEvent=async e=>{let{eventId:a,calendarId:t="primary",sendUpdates:i="all"}=e;return this.calendar.events.delete({eventId:a,calendarId:t,sendUpdates:i})},this._getCreateGoogleMeetPayload=()=>({conferenceData:{createRequest:{requestId:(0,d.Ak)(),conferenceSolutionKey:{type:"hangoutsMeet"}}}}),this._getRemoveGoogleMeetPayload=()=>({conferenceData:null}),this._installGAPIScript=()=>window.gapi?Promise.resolve(window.gapi):document.getElementById(this.gapiScriptId)?new Promise(e=>{let a=setInterval(()=>{window.gapi&&(clearInterval(a),e(window.gapi))},100)}):new Promise((e,a)=>{let t=document.createElement("script");t.src="https://apis.google.com/js/api.js",t.setAttribute("id",this.gapiScriptId),t.onload=()=>{e(window.gapi)},t.onerror=()=>{a(Error("Failed to load gapi"))},document.body.appendChild(t)}),this._loadCalendarClient=()=>{var e;let a="client";return(null===(e=window.gapi)||void 0===e?void 0:e[a])?(window.gapi[a].setToken({access_token:this.accessToken}),Promise.resolve(window.gapi[a])):new Promise((e,t)=>
1{try{window.gapi.load(a,async()=>{try{window.gapi[a].setToken({access_token:this.accessToken}),await window.gapi[a].init({discoveryDocs:["https://www.googleapis.com/discovery/v1/apis/calendar/v3/rest"]})}catch(e){return t(e)}return e(window.gapi[a])})}catch(e){t(e)}})},this.accessToken=e,this.gapiScriptId=a.gapiScriptId,this.calendar=null}}let o=e=>Object.entries({id:"eventId",htmlLink:"eventHtmlLink",hangoutLink:"meetLink",summary:"title",description:"description",start:"start",end:"end",updated:"updatedAt"}).reduce((a,t)=>{let[i,l]=t;return a[l]=e[i]||null,a},{}),s=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"calendar",[t,d]=(0,i.useState)(null),[s,r]=(0,i.useState)(null),m=(0,l.A)(a,e);(0,i.useEffect)(()=>{if(!m)return;let e=new n(m);e.initialize().then(()=>{d(e)}).catch(e=>{r(e)})},[m]);let u=async e=>{let{result:a}=await t.getEvent({eventId:e});if((null==a?void 0:a.status)==="cancelled")throw{status:404,error:{code:404,message:"Not Found"},data:o(a)};return o(a)},c=async e=>{let{result:a}=await t.createEvent(e);return o(a)},g=async(e,a)=>{let{result:i}=await t.patchEvent({eventId:e,event:a});return o(i)},f=async e=>t.deleteEvent({eventId:e});return{isReady:!!t,getEvent:u,createEvent:c,patchEvent:g,deleteEvent:f,error:s}}},60792:(e,a,t)=>{t.d(a,{A:()=>n});var i=t(22405),l=t(99624),d=t(79653);let n=(e,a)=>{let t=(0,l.jt)(),n=(0,i.doc)(t,"calendarEvents",e,"products",a),{data:o=null}=(0,l.rt)(n),s=e=>Object.entries(e).reduce((e,a)=>{let[t,l]=a;return e[t]=null!=l?l:(0,i.deleteField)(),e},{}),r=async e=>(0,i.setDoc)(n,(0,d.A)(e)),m=async e=>{let a=s(e);return(0,i.setDoc)(n,{...a,deletedAt:(0,i.deleteField)()},{merge:!0})},u=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date().toISOString(),a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=s(a);return(0,i.setDoc)(n,{...t,deletedAt:e},{merge:!0})};return{isSet:!!(null==o?void 0:o.eventId),isActive:(null==o?void 0:o.eventId)&&!o.deletedAt,data:o,createEvent:r,patchEvent:m,deleteEvent:u}}},79198:(e,a,t)=>{t.d(a,{A:()=>d,I:()=>l});var i=t(86715);let l=(e,a)=>{if(!a)return e;let t=new URL(e,window.location.origin);return t.searchParams.set("id",a),"".concat(t.pathname).concat(t.search)},d=e=>{let{query:a}=(0,i.useRouter)();return l(e,a.id)}},21158:(e,a,t)=>{t.d(a,{Ay:()=>m,OS:()=>s,PK:()=>u});var i=t(96540),l=t(59324),d=t(23041),n=t(11335),o=t(67836);let s=n.A,r=(e,a)=>{let t=(0,o.A)();return(0,i.useMemo)(()=>{if(!t)return null;let{region:i,app:{options:{projectId:l}}}=t,d=a?"http://localhost:5001/".concat(l,"/").concat(i):"https://".concat(i,"-").concat(l,".cloudfunctions.net");return t.emulatorOrigin&&(d="".concat(t.emulatorOrigin,"/").concat(l,"/").concat(i)),d+e},[t,e,a])},m=e=>{let a=s(),t=r(e);return(0,l.Ay)(t,a)},u=function(e){var a;let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=s(),n=r(e),{data:o,size:m,setSize:u,isLoading:c,isValidating:g,error:f}=(0,d.Ay)((e,a)=>{if(a&&!a.hasNextPage)return null;let i=new URL(n);if(t.limit&&i.searchParams.set("limit",t.limit),0===e)return i.toString();let l=null==a?void 0:a.cursor;return l&&i.searchParams.append("cursor",l),i.toString()},l,null!==(a=t.swrConfig)&&void 0!==a?a:void 0);return(0,i.useEffect)(()=>{var e;(null===(e=t.autoload)||void 0===e||e)&&(null==o?void 0:o.length)===m&&u(m+1)},[m,null==o?void 0:o.length]),{data:Array.isArray(o)?o.map(e=>e.data).flat():o,isLoading:c,isValidating:g,error:f}}},23753:(e,a,t)=>{t.d(a,{A:()=>o,Q:()=>n});var i=t(96540),l=t(49785);let d=(e,a)=>Array.isArray(e)?e.some(e=>d(e,a)):"boolean"==typeof e?!!a===e:e instanceof RegExp?e.test(a):a==e,n=(e,a)=>Array.isArray(null==e?void 0:e[0])?e.every((e,t)=>d(e[1],null==a?void 0:a[t])):d(e[1],a),o=(e,a)=>{let t=Array.isArray(null==e?void 0:e[0]),d=(0,l.FH)({control:a,name:t?e.map(e=>e[0]):null==e?void 0:e[0],disabled:!e});return(0,i.useMemo)(()=>!e||n(e,d),[e,d])}},27965:(e,a,t)=>{t.d(a,{A:()=>T});var i=t(58156),l=t.n(i),d=t(23805),n=t.n(d),o=t(55378),s=t.n(o),r=t(63560),m=t.n(r),u=t(30872),c=t.n(u),g=t(50014),f=t.n(g),p=t(96540),M=t(14120),b=t(56726),h=t(43230),v=t
1(23753),y=t(85247);let A=(e,a)=>{try{return c()(e)(a)}catch(a){return e}},w=(e,a,t,i)=>e.reduce((e,d)=>{if(!d.name)return d.tabs?d.tabs.reduce((e,a,l)=>w(a.fields,e,t,(e,a)=>i("".concat(l,".").concat(e),a)),e):e;let n=l()(a,d.name);if(d.fields&&(e[d.name]=s()(n,(e,a)=>w(d.fields,e,t,(e,t)=>i("".concat(a,".").concat(e),t)))),"linkId"===d.name){var o;e["linkId-editor"]=a["linkId-editor"],(null===(o=a["linkId-editor"])||void 0===o?void 0:o.mode)==="internal"&&(e["linkId-editor"]={...a["linkId-editor"],url:"/".concat(t,"/").concat(e["linkId-editor"].url)})}if("image"===d.type){let t=l()(a,(0,h.A)(d.name));"undefined"!=typeof FileList&&t instanceof FileList&&(null==t?void 0:t.length)&&m()(e,d.name,i(d.name,t[0])),"undefined"!=typeof Blob&&t instanceof Blob&&(null==t?void 0:t.size)&&m()(e,d.name,i(d.name,t))}return e},{...a}),k=e=>/<%/.test(e)||/\${/.test(e),x=(e,a)=>Array.isArray(a[0])?(0,v.Q)(a,a.map(a=>l()(e,a[0]))):(0,v.Q)(a,l()(e,a[0])),T=e=>{let{data:a,fields:t,slug:i="",links:d={},tier:o=y.fb.FREE}=e,{profileName:r}=(0,p.useContext)(M.A),u=(0,p.useRef)({}),c=(0,p.useMemo)(()=>{let e=i=>{var d,n,s;let m=null!==(s=i.defaultValue)&&void 0!==s?s:null===(d=i.tierDefaultValue)||void 0===d?void 0:d[o],u=(()=>{if(i.tabs){if(i.when){let e=t.find(e=>e.name===i.when[0]);if((null==e?void 0:e.type)==="hidden"){var l;if(!(0,v.Q)(i.when,null!==(l=a[i.when[0]])&&void 0!==l?l:e.defaultValue))return[]}}return i.tabs.map(a=>({...a,fields:a.fields.map(e)}))}})(),c=l()(a,i.name,m);return{...i,tabs:u,lockFields:null===(n=i.lockFields)||void 0===n?void 0:n.map(e),defaultValue:"string"==typeof c&&k(c)?A(c,{name:r,id:a.id}):c,helper:"string"==typeof i.helper&&k(i.helper)?A(i.helper,{name:r,id:a.id}):i.helper}};return t.map(e)},[a,t]),g=(0,p.useMemo)(()=>{let e=(t,i)=>{var l,r;if(!i.name)return i.tabs?i.tabs.reduce((a,t)=>t.fields.reduce(e,a),t):t;let[u]=i.name.split("."),c=null==a?void 0:a[u],g=null!==(r=i.defaultValue)&&void 0!==r?r:null===(l=i.tierDefaultValue)||void 0===l?void 0:l[o];return g&&m()(t,i.name,g),(i.leftFields||i.rightFields)&&[].concat(i.leftFields).concat(i.leftFields).forEach(e=>{(null==e?void 0:e.defaultValue)&&m()(t,(0,b.A)(i.name,e.name),e.defaultValue)}),"linkId"===u&&(t["linkId-editor"]=d[c]),n()(c)&&c[0]&&(t[i.name]=s()(c,e=>e.linkId?{"linkId-editor":d[e.linkId],...e,itemId:e.itemId}:e)),t};return c.reduce(e,JSON.parse(JSON.stringify(a)))},[c,d,a]),h=(0,p.useCallback)((e,a)=>{u.current[e]&&URL.revokeObjectURL(u.current[e]);let t=URL.createObjectURL(a);return u.current[e]=t,t},[]),T=(0,p.useCallback)(e=>{let a=c.filter(a=>!a.when||x(e,a.when));return w(f()(a,"name"),e,i,h)},[c,i]);return(0,p.useEffect)(()=>()=>{Object.values(u.current).forEach(URL.revokeObjectURL)},[JSON.stringify(g)]),{fields:c,defaultValues:g,handlePreviewValues:T}}},47171:(e,a,t)=>{t.d(a,{Q:()=>d});var i=t(96540),l=t(95854);let d=e=>{let[a,t]=(0,i.useState)(null),[d,n]=(0,i.useState)([]),[o,s]=(0,i.useState)(!1),[r,m]=(0,i.useState)(null),[u,c]=(0,i.useState)({before:0,after:0}),g=new l.Z;(0,i.useEffect)(()=>{e&&(async()=>{s(!0),m(null);try{let{event:a,counts:i}=await g.getEventByBlockId(e);t(a),i&&c({before:i.beforeEventCount,after:i.afterEventCount})}finally{s(!1)}})()},[e]);let f=(0,i.useCallback)(async e=>{if(null==a?void 0:a.id){m(null);try{await g.collectEmail({...e,eventId:a.id}),"beforeEvent"===e.collectionState?c(e=>({...e,before:e.before+1})):c(e=>({...e,after:e.after+1}))}catch(e){throw m(e instanceof Error?e:Error("Failed to collect email")),e}}},[null==a?void 0:a.id]),p=(0,i.useCallback)(async()=>{if(null==a?void 0:a.id){m(null);try{let e=await g.getEmails(a.id,"all");e.emails&&n(e.emails)}catch(e){m(e instanceof Error?e:Error("Failed to refresh emails")),console.error("Error refreshing emails:",e)}}},[null==a?void 0:a.id]),M=(0,i.useCallback)(async()=>{if(!(null==a?void 0:a.profileId))return[];m(null);try{let e=await g.exportEmails(a.profileId,"json");return Array.isArray(e)?e:[]}catch(e){return m(e instanceof Error?e:Error("Failed to export emails")),console.error("Error exporting emails:",e),[]}},[null==a?void 0:a.profileId]);return{event:a,emails:d,isLoading:o,error:r,beforeEventCount:u.before,afterEventCount:u.after,collectEmail:f,refreshEmails:p,exportEmails:M}}},82419:(e,a,t)=>{t.d(a,{A:()=>o});var i=t(22405),l=t(96540),d=t(77666),n=t(85247);let o=e=>{let[a,t]=(0,l.useState)({}),o=(0,d.A)();return(0,l.useEffect)(()=>
1{if(o&&e){let a=(0,i.doc)(o,"profiles",e);return(0,i.onSnapshot)(a,e=>{let a=e.data();t({value:null==a?void 0:a.vipStatus,tier:(0,n.Zx)(null==a?void 0:a.vipStatus),isVip:null==a?void 0:a.isVip,subscription:(null==a?void 0:a.activeSubscription)||"",lastFailedSubscription:(null==a?void 0:a.lastFailedSubscription)||""})})}},[o,e]),a}},27939:(e,a,t)=>{t.d(a,{A:()=>o});var i=t(15790),l=t(96540),d=t(99624),n=t(77666);let o=function(e,a){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"access_token",o=(0,n.A)(),{data:s=[]}=(0,d.dg)((0,i.P)((0,i.rJ)(o,"tokens"),(0,i._M)("profileId","==",a||"__no_profile__")));return(0,l.useMemo)(()=>{var a,i;return 0===s.length?null:(null===(i=s.find(a=>a.platform===e&&!a.refreshAbandonedAt))||void 0===i?void 0:null===(a=i.token)||void 0===a?void 0:a[t])||null},[t,e,s])}},23488:(e,a,t)=>{t.d(a,{A:()=>d});var i=t(79198),l=t(99867);let d=e=>{let a=(0,i.A)(e);return()=>{window.open((0,l.GW)({returnTo:a}),"_blank","noopener")}}},63959:(e,a,t)=>{t.d(a,{A:()=>l});var i=t(47378);let l=e=>(0,i.A)(e,"slug")},72129:(e,a,t)=>{t.d(a,{A:()=>n});var i=t(96540),l=t(60653),d=t(11335);let n=e=>{let a=(0,d.A)(),[t,n]=(0,i.useState)(),o=()=>a("/api/save?profileId=".concat(e),{method:"POST"}).catch(e=>console.error(e));return(0,l.A)(()=>{t&&(o(),n(""))},500,[t]),e=>e?o():Promise.resolve(n(Date.now()))}},70934:(e,a,t)=>{t.d(a,{F:()=>J,A:()=>el});var i=t(22405),l=t(56449),d=t.n(l),n=t(69843),o=t.n(n),s=t(23805),r=t.n(s),m=t(55378),u=t.n(m),c=t(73916),g=t.n(c),f=t(90179),p=t.n(f),M=t(71086),b=t.n(M),h=t(23181),v=t.n(h),y=t(47091),A=t.n(y),w=t(41195),k=t(96540),x=t(6442),T=t(99624),E=t(59324),I=t(76845),F=t(96638),S=t(14120),C=t(8929),Y=t(38133),D=t(63326),P=t(78731),V=t(10141),B=t(57762),O=t(35348),L=t(16065);let R=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(0===e.length)return e;let a=String.fromCodePoint(e.slice(-1).codePointAt(0)+1);return e.slice(0,-1)+a};var N=t(85593),U=t(77512),_=t(71884),G=t(27536),W=t(11335),z=t(77666),H=t(72129),q=t(63972),j=t(23281),X=t(2793),Q=t(22138);let $=async function(e,a){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:async(e,a)=>"".concat(e,"(Copy)");for(let i of e){if(i.tabs)for(let e of i.tabs)await $(e.fields,a,t);"uniq"===i.type&&(a[i.name]=await t(a[i.name]||"",i.name))}},J=async(e,a)=>{let t=("function"==typeof F.Ay?(0,F.Ay)():F.Ay)[e.type];return t&&await $(t,e,e=>"".concat(e,"(").concat(a.formatMessage({defaultMessage:"副本",id:"admin.shared.副本"}),")")),e},K=function(e,a){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=("function"==typeof F.Ay?(0,F.Ay)(a):F.Ay)[e];return(0,O.A)(i,t)};async function Z(e,a,t,l,d){let n=(await (0,i.getDocs)((0,i.query)(e,(0,i.where)("name",">=",a),(0,i.where)("name","<",t)))).docs.map(e=>{let a=e.data().name.match(l);return a?parseInt(a[1],10):0});return d(a,n.length>0?Math.max(...n)+1:0)}let ee=async(e,a,t)=>{let i=("function"==typeof I.A?(0,I.A)(t):I.A)[e],l=(0,O.A)(i,{});return await $(i,l,async(e,t)=>"name"===t?await Z(a,e,R(e),/\((\d+)\)$/,(e,a)=>e+(a>0?" (".concat(a,")"):"")):e),l},ea=e=>"number"==typeof e||"string"==typeof e&&/^-?\d+(\.\d+)?$/.test(e),et=e=>{if(!r()(e)||d()(e)||e instanceof i.Timestamp)return null;let a=Object.keys(e),t=e=>a.every(a=>e.includes(a));return ea(e.seconds)&&ea(e.nanoseconds)&&t(["seconds","nanoseconds","type"])?new i.Timestamp(Number(e.seconds),Number(e.nanoseconds)):ea(e._seconds)&&ea(e._nanoseconds)&&t(["_seconds","_nanoseconds","type"])?new i.Timestamp(Number(e._seconds),Number(e._nanoseconds)):null},ei=e=>{let a={...e};return void 0===a.personalTag||(Array.isArray(a.personalTag)?a.personalTag={tag1:a.personalTag[0]||"",tag2:a.personalTag[1]||"",tag3:a.personalTag[2]||""}:a.personalTag&&"object"==typeof a.personalTag||(a.personalTag={tag1:"",tag2:"",tag3:""})),a},el=function(e){let{ownedBlocksDocPath:a,blocksPath:t,productsPath:l}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ownedBlocksDocPath:[],blocksPath:["blocks"],productsPath:["products"]},n=(0,x.A)(),s="en"===n.locale,m=(0,z.A)(),c=(0,q.A)(),{data:f}=(0,T.aB)(),M=(0,H.A)(e),{links:h,profileName:y,uid:F,betaTester:O}=(0,k.useContext)(S.A),R=(0,j.A)(),{products:ea}=(0,k.useContext)(S.A),el=(0,W.A)(),{mutate:ed}=(0,E.iX)(),en=e?"/api/product/".concat(e,"/product-stats"):null,eo=(0,k.useCallback)(e=>{en&&ed(en,a=>a&&e?e(a):a,{revalidate:!0})},[en,ed]),es=(0,k.useMemo)(()=>e?(0,i.doc)(m,"profiles",e):null,[m,e]),er=(0,k.useMemo)(()=>e?(null==a?void 0:a.length)>0?(0,i.doc)(es,...a):es:null,[a,e,es]),em=(0,k.useMemo)(()=>e?(0,i.collection)(es,...t):null,[t,e,es]),eu=(0,k.useMemo)(()=>e?(0,i.collection)(es,...l):null,[l,e,es]),ec=async e=>{if(!e.url)return null;let a=(0,G.A)(b()(e,e=>!!e)),t=(0,i.collection)(es,"links");return(await (0,i.addDoc)(t,a)).id},eg=async(a,t)=>
1{if(a&&(null==t?void 0:t.type)==="limitedTimeEvent")try{await el("/api/limitedTimeEvent",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({blockId:a,profileId:e,title:t.title,startTime:t.startTime,endTime:t.endTime})})}catch(e){console.error("[useUpdateTools] Failed to create limited time event:",e)}},ef=async function(e,a){var t,l,d,o;let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=!(arguments.length>3)||void 0===arguments[3]||arguments[3],u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},[c,...g]=e.split("&"),f=g.join("&"),p=(0,N.Ay)(n,O),b=p.find(e=>e.value===c);b||(b=p.find(a=>a.value===e));let h=JSON.parse(f||"{}"),A=K(c,n,h),k=v()(null!==(l=null!==(t=null==b?void 0:b.defaultItems)&&void 0!==t?t:null==b?void 0:b.perRow)&&void 0!==l?l:1).map(()=>(0,w.Ak)()),x={itemOrders:k,itemMap:null==k?void 0:k.reduce((e,a)=>(e[a]={itemId:a},e),{})};if("products"===c){let a=(()=>{if(e.includes("category")){var a;return null===(a=JSON.parse(e.split("&")[1]))||void 0===a?void 0:a.category}return X.$U})(e),t=e=>Object.values(e).find(e=>e.category===a);if(t(ea)){let e=null===(o=t(ea))||void 0===o?void 0:o.id;x=(0,P.A)(e)}else{let e=await eT({category:a})||(null===(d=t(ea))||void 0===d?void 0:d.id);x=(0,P.A)(e)}}"profit"===c&&(A.title="".concat(y||F," 的專屬優惠"));let T={type:c,...x,createdAt:(0,i.serverTimestamp)(),...A,hidden:r,initial:!0,...u};f&&(await Promise.all(Object.entries(h).map(async e=>{let[a,t]=e;"items"===a&&await Promise.all(t.map(async(e,a)=>{if(e.link){let a=e.link;delete e.link,e.linkId=await ec(a)}Object.assign(T.itemMap[k[a]],e)}))})),T.itemOrders.forEach((e,a)=>{T.itemMap[e].originalIndex=a}));let E=await (0,i.addDoc)(em,T),I=[...a];return I.splice(s,0,E.id),await Promise.all([(0,B.L)(m,er,{blockOrders:e=>(0,V.f3)(e,E.id,I)}),M()]),await eg(E.id,{type:c,title:T.title,startTime:T.startTime,endTime:T.endTime}),E.id},ep=async function(e,a){let t=!(arguments.length>2)||void 0===arguments[2]||arguments[2];return arguments.length>3&&arguments[3],ef(e,a,a.length,t)},eM=async function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=(0,i.collection)(es,"links"),l=await (0,i.addDoc)(t,{mode:"internal",url:"/contact"}),d=await (0,i.addDoc)(t,{mode:"internal",url:"/pages/about"});await (0,i.updateDoc)((0,i.doc)(es,"links",l.id),{id:l.id}),await (0,i.updateDoc)((0,i.doc)(es,"links",d.id),{id:d.id});let o=await Promise.all(e.map(async(a,t)=>{let o=(0,N.Ay)(n).find(e=>e.value===a.type),r=v()(a.itemCount||(null==o?void 0:o.perRow)||1).map(()=>(0,w.Ak)()),m=t===e.length-1;return(await (0,i.addDoc)(em,{type:a.type,itemOrders:r,itemMap:r.reduce((e,a,t)=>(e[a]={itemId:a},m&&(0===t?(e[a].text=s?"About Me":"關於我",e[a].linkId=d.id,e[a].icon="pushpin"):(e[a].text=s?"Contact":"合作洽詢",e[a].linkId=l.id,e[a].icon="info")),e),{}),createdAt:(0,i.serverTimestamp)()})).id}));await Promise.all([(0,i.updateDoc)(es,{blockOrders:o.concat(a),initialBlocksRequired:!1}),M()])},eb=async(a,t,l,n)=>{let{links:o=null,...s}=a;if(m&&c){let a=ei(s),l={},o=async a=>{let i=a.match(/<img[^>]+src="data:([^;]+);base64,([^"]+)"[^>]*>/g)||[];if(i.length){let l=await Promise.all(i.map(async a=>{try{let[,i,l]=a.match(/src="([^"]+)"\sdata-ratio="([^"]+)"/),d=i.match(/^data:([^;]+);base64/)[1],o="".concat((0,w.Ak)(),".").concat(d.split("/")[1]),s="".concat([].concat(t).join("/"),"/").concat(o);return{src:await c.upload(e,o,i,s,"images",n,!0),ratio:l}}catch(e){return null}}));return i.reduce((e,a,t)=>l[t]?e.replace(a,'<img src="'.concat(l[t].src,'" data-ratio="').concat(l[t].ratio,'">')):e.replace(a,""),a)}return a},u=Symbol("omit"),g=Symbol("hole"),f=async(a,l)=>{if(void 0===a)return g;if(a instanceof i.FieldValue)return u;if(a instanceof i.Timestamp)return a;let s=et(a);if(s)return s;if(d()(a))return(await Promise.all(a.map((e,a)=>f(e,"".concat(l,".").concat(a))))).filter(e=>e!==u).map(e=>e===g?null:e);if(r()(a))return(0,L.A)(a)?u:a.publicURL?"images/".concat(a.id):(await Promise.all(Object.keys(a).map(async i=>{if(i.includes("-uploader")){let d=i.replace("-uploader",""),o="".concat([].concat(t).join("/"),"/").concat(l,".").concat(d);try{let t=await R(e,a[i],o,n);return[d,null!=t?t:u]}catch(e){throw Error("".concat(l,".").concat(d,":").concat(e.code?"".concat(e.code," => "):"").concat(e.message))}}return[i,await f(a[i],"".concat(l,".").concat(i))]}))).reduce((e,a)=>{let[t,i]=a;return i!==u&&i!==g&&(e[t]=i),e},{});
1if("string"==typeof a){if(/^<[^>]+>/.test(a))return o((0,G.A)(a));if(!a.includes("\n")){let e=/^\s*$/.test(a);return(0,G.A)(e?a:a.trim())}}return(0,G.A)(a)},p=a=>async(s,m)=>{let c=a?"".concat(a,".").concat(m):m;if(void 0===s)return;try{if(null==c?void 0:c.includes("-uploader")){let a=c.replace("-uploader",""),d="".concat([].concat(t).join("/"),"/").concat(a);s instanceof File&&(a=a.replace(/\.0$/,""));let o=await R(e,s,d,n);o&&(l[a]=o),null===s&&(l[a]=(0,i.deleteField)());return}}catch(e){throw Error("".concat(c,":").concat(e.code?"".concat(e.code," => "):"").concat(e.message))}if(s instanceof i.FieldValue||s instanceof i.Timestamp){l[c]=s;return}let M=et(s);if(M){l[c]=M;return}if(d()(s)){let e=await Promise.all(s.map((e,a)=>f(e,"".concat(c,".").concat(a))));l[c]=e.filter(e=>e!==u).map(e=>e===g?null:e);return}if(r()(s)){if((0,L.A)(s)){l[c]=(0,i.deleteField)();return}if(s.publicURL){l[c]="images/".concat(s.id);return}return Promise.all(Object.keys(s).map(e=>p(c)(s[e],e)))}if("string"==typeof s){if(/^<[^>]+>/.test(s)){l[c]=await o((0,G.A)(s));return}if(!s.includes("\n")){let e=/^\s*$/.test(s);l[c]=(0,G.A)(e?s:s.trim());return}}c&&(l[c]=(0,G.A)(s))};await p()(a),l.updatedAt=(0,i.serverTimestamp)(),!0===a.initial&&(l.hidden=!1,l.initial=!1);let b=(0,i.doc)(m,"profiles",e);t&&(b=(0,i.doc)(b,...t)),await Promise.all([(0,i.updateDoc)(b,l),M()])}},eh=(0,k.useCallback)(async a=>{if(m){let t=(0,i.doc)(m,"profiles",e);a&&(t=(0,i.doc)(t,...a),await Promise.all([(0,i.deleteDoc)(t),M()]))}},[m,e]),ev=(0,k.useCallback)(async(e,a)=>{if(!m)return e;if(!a)return await Promise.all([(0,i.updateDoc)(er,{blockOrders:e}),M()]),e;let[t]=await Promise.all([(0,B.L)(m,er,{blockOrders:t=>(0,V.x_)(t,a,e)}),M()]);return t.blockOrders},[m,er,M]),ey=(e,a)=>{let{items:t,...l}=a,d={},n=[],s=A()(e.items),r=(0,_.A)(e.items,"linkId"),m=(e,a)=>b()(e,(t,i)=>i.startsWith("linkId-")?(t&&(e.linkId?d[e.linkId]=t:Object.values(t).some(Boolean)&&n.push({index:a,value:t})),!1):!!i.includes("-uploader")||!o()(t)),c=u()(t,(e,a)=>{var t;let i={...e.linkId?r[e.linkId]:{},...m(e,a)};return(null===(t=i.image)||void 0===t?void 0:t.id)&&(i.image="images/".concat(i.image.id)),i});if(s>c.length){let e=Array(s-c.length).fill((0,i.deleteField)());c=c.concat(e)}return{linksUpdater:()=>Promise.all(Object.keys(d).map(e=>eb(d[e],["links",e]).catch(e=>{}))),newValue:{items:c,...m(l)},newLinks:n}},eA=async(e,a,t,l)=>{let{newValue:d,newLinks:n,linksUpdater:o}=ey(e,a),s=d;n.length&&(s=(await Promise.all(n.map(async e=>{let{value:a,index:t}=e;return{index:t,linkId:await ec(a)}}))).reduce((e,a)=>(e.items[a.index]=e.items[a.index]||{},e.items[a.index].linkId=a.linkId,e),{...d}));let r=s.items.reduce((e,a)=>((null==a?void 0:a._methodName)!=="deleteField"&&a.itemId&&(e.itemOrders.push(a.itemId),e.itemMap[a.itemId]=a),e),{itemOrders:[],itemMap:g()(e.itemMap,()=>(0,i.deleteField)())});Object.assign(s,r),delete s.items;try{await o(),await eb(s,t,e,l)}catch(i){let[a,t]=i.message.split(":");if(a.startsWith("itemMap.")){let[,i,l]=a.split("."),d=e.items.findIndex(e=>e.itemId===i);if(d>-1)throw Error("items[".concat(d,"].").concat(l,":").concat(t))}throw i}await M()},ew=async(a,l,d)=>{if(("mailing-list"===l.type||"product"===l.type)&&l.name!==(null==a?void 0:a.name)){let e=(0,i.query)(em,(0,i.where)("type","==",l.type),(0,i.where)("name","==",l.name));if((await (0,i.getDocs)(e)).size)throw Error("name:專案名稱重複")}"profit"===l.type&&"auto"===l.profitMode&&Array.isArray(l.profitActiveItems)&&(l.profitActiveItems=[]),await eA(a,l,[...t,a.id],d),"limitedTimeEvent"===l.type&&await eg(a.id,l),await (0,i.addDoc)((0,i.collection)(m,"logs"),{type:"update_block",timestamp:(0,i.serverTimestamp)(),uid:f.uid,blockType:l.type,profileId:e,...(0,U.sw)("update_block")})},ek=async e=>{let a=e.items;return"products"===e.type&&(a=await Promise.all(a.map(async e=>{if(!e.productId)return e;let a=ea[e.productId],t=await eI(a);return{...e,productId:t}}))),{...e,items:a}},ex=async(e,a)=>{let l=await (0,i.addDoc)(em,{createdAt:(0,i.serverTimestamp)()});await J(e,n);let d=await ek({...p()(e,["createdAt","updatedAt","contentTagsUpdatedAt"]),isPin:!1,id:l.id,items:u()(e.itemOrders,a=>{let t=e.itemMap[a];return t.linkId?{...t,"linkId-editor":{...h[t.linkId],id:""},linkId:""}:t})});await eA({},d,[...t,l.id]);let o=a.findIndex(a=>a===e.id),s=[...a.slice(0,o+1),l.id,...a.slice(o+1)];await Promise.all([(0,B.L)(m,er,{blockOrders:e=>(0,V.f3)(e,l.id,s)}),M()]),await eg(l.id,d)},eT=async a=>{let{category:t}=a,l=await ee(t,eu,n),d={category:t,itemOrders:[],itemMap:{},createdAt:(0,i.serverTimestamp)(),...l,initial:!0},[o]=await Promise.all([(0,i.addDoc)(eu,d),M()]);return d.name&&el("/api/product/".concat(e,"/").concat(o.id,"/classify"),{method:"POST"}).catch(()=>{}),eo(e=>({...e,products:[{id:o.id,...d,createdAt:new Date().toISOString()},...e.products]})),o.id},eE=async(a,t)=>{if(t.name!==(null==a?void 0:a.name)){let e=(0,i.query)(eu,(0,i.where)("name","==",t.name));if((await (0,i.getDocs)(e)).size)throw Error("name:專案名稱重複")}let{deferredMonths:d,...n}=t;await eA(a,n,[...l,a.id]),await (0,i.addDoc)((0,i.collection)(m,"logs"),{type:"update_product",timestamp:(0,i.serverTimestamp)(),uid:f.uid,productCategory:t.category,profileId:e,...(0,U.sw)("update_product")}),(t.name!==(null==a?void 0:a.name)||t.description!==(null==a?void 0:a.description))&&el("/api/product/".concat(e,"/").concat(a.id,"/classify"),{method:"POST"}).catch(()=>{}),eo(e=>({...e,products:e.products.map(e=>e.id===a.id?{...e,...t}:e)}))},eI=async e=>{let a=async e=>{let a=("function"==typeof I.A?(0,I.A)(n):I.A)[e.category||X.$U];return a&&await $(a,e,async(e,a)=>{if("name"===a){let a=n.formatMessage({defaultMessage:"副本",id:"admin.shared.副本"}),t=e.replace(RegExp("^\\(".concat(a,"\\d*\\) "),"g"),""),i="(".concat(a,") ").concat(t),l="(".concat(a).concat("￿"," ").concat(t);return await Z(eu,i,l,new RegExp("^\\(".concat(a,"(\\d+)\\) ").concat(t,"$")),(e,i)=>{let l=i>0?"(".concat(a).concat(i,")"):"(".concat(a,")");return"".concat(l," ").concat(t)})}return e}),e},t=await (0,i.addDoc)(eu,{createdAt:(0,i.serverTimestamp)()});await a(e);let d="(".concat(n.formatMessage({defaultMessage:"副本",id:"admin.shared.副本"}),")");e.title={...e.title,text:"".concat(d," ").concat(e.title.text||"")};
1let o={...e,id:t.id};delete o.blocks,delete o.stats,delete o.createdAt,delete o.updatedAt,delete o.contentTagsUpdatedAt,D.CD.forEach(e=>delete o[e]);try{await eA({},o,[...l,t.id])}catch(e){throw await (0,i.deleteDoc)((0,i.doc)(eu,t.id)).catch(()=>{}),e}return eo(e=>({...e,products:[{...o,createdAt:new Date().toISOString()},...e.products]})),t.id},eF=async(e,a)=>{try{var t,l,d;let n=await Promise.all((null===(t=e.tabs)||void 0===t?void 0:t.map(async(e,t)=>{if(e.tabType===Q.B.PRODUCT){var l;let d=e.productDisplayType||"single",n=e.productDisplayLayout||("multiple"===d?"multipleSimple":"board"),{itemOrders:o,itemMap:s}=(0,C.n1)(e.items,d),r=null==a?void 0:null===(l=a.tabs)||void 0===l?void 0:l[t],m=(null==r?void 0:r.productItemMap)||{},u={...g()(m,()=>(0,i.deleteField)()),...s};return{tabText:e.tabText,tabType:e.tabType,productDisplayType:d,productDisplayLayout:n,productItemOrders:o,productItemMap:u}}let d=e["linkId-editor"];if(d&&d.url&&!e.linkId){let a=await ec({mode:d.mode||Y.A.INTERNAL_PAGE,url:d.url});return{tabText:e.tabText,tabType:e.tabType,id:a}}return d&&d.url&&e.linkId&&await eb({mode:d.mode||Y.A.INTERNAL_PAGE,url:d.url},["links",e.linkId]),{tabText:e.tabText,tabType:e.tabType,id:e.linkId||""}}))||[]),o={hidden:e.hidden,homeText:(null===(d=e.homeTextFakeGroup)||void 0===d?void 0:null===(l=d[0])||void 0===l?void 0:l.homeText)||"主頁",tabs:n};return await eb({tab:o},void 0,a?{tab:a}:void 0),o}catch(e){throw console.error("Tab update failed:",e),e}};return{handleUpdate:eb,handleDocUpdate:eA,handleBlockUpdate:ew,handleAddBlock:ep,handleAddBlockAtIndex:ef,handleToggleBlock:(e,a)=>eb({hidden:a},["blocks",e]),handleDeleteBlock:async e=>{await Promise.all([eh([...t,e]),(0,B.L)(m,er,{blockOrders:a=>(0,V.aS)(a,e),pinBlockOrders:a=>(0,V.aS)(a,e)})])},handleReorderBlocks:ev,handleAddOnboardBlocks:eM,handleDuplicateBlock:ex,handlePinBlock:async e=>{let a=(0,i.doc)(em,e);await Promise.all([(0,i.updateDoc)(a,{isPin:!0}),(0,B.L)(m,er,{pinBlockOrders:a=>(0,V.f3)(a,e,[])}),M()])},handleUnPinBlock:async e=>{let a=(0,i.doc)(em,e);await Promise.all([(0,i.updateDoc)(a,{isPin:!1}),(0,B.L)(m,er,{pinBlockOrders:a=>(0,V.aS)(a,e)}),M()])},handleAddProduct:eT,handleProductUpdate:eE,handleDuplicateProduct:eI,handleDeleteProduct:async e=>{await eh([...l,e]),eo(a=>({...a,products:a.products.filter(a=>a.id!==e)}))},mutateProductStats:eo,handleTabUpdate:eF}}},23281:(e,a,t)=>{t.d(a,{A:()=>n});var i=t(41195),l=t(96540),d=t(63972);let n=()=>{let e=(0,d.A)();return(0,l.useCallback)(async(a,t,l,d)=>{if(t instanceof FileList&&t[0])return null==e?void 0:e.upload(a,t[0].name,t[0],l,"images",d);if(t instanceof Blob){let[,n]=t.type.split("/"),o=t.filename||"".concat((0,i.Ak)(),".").concat(n);return null==e?void 0:e.upload(a,o,t,l,"images",d)}if("string"==typeof t&&t.startsWith("data:")){let n="".concat((0,i.Ak)(),".png");return null==e?void 0:e.upload(a,n,t,l,"images",d)}},[e])}}}]);

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.