"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[203],{68182:(e,t,r)=>{r.d(t,{A:()=>g});var i,n=r(24643),a=r(40099),o=r(62186),l=r(39522),s=r(72153);!function(e){e[e.OneColumn=0]="OneColumn",e[e.OneColumnDarkOnly=1]="OneColumnDarkOnly",e[e.OneColumnShare=2]="OneColumnShare",e[e.BrowserMode=3]="BrowserMode"}(i||(i={}));const d=(e,t)=>1===e?l.J:t;function c({styleType:e,shouldOptimizeCta:t,colors:r,disabled:i}){switch(e){case 0:case 1:case 2:return{flexDirection:"column"};case 3:return[{flexDirection:"row"},t&&[{borderRadius:"40px",padding:"8px 12px 8px 12px",height:"40px",backgroundColor:r.BGInput},!i&&{"&:hover":{backgroundColor:r.BGInput2},"&:active":{backgroundColor:"rgba(22, 24, 35, .14)"}}]];default:return null}}const u=(0,o.default)("button",{target:"e1hk3hf90"})((({styleType:e,shouldOptimizeCta:t,theme:{direction:r,colors:i}})=>[s.WA,{position:"relative",display:"flex",alignItems:"center",cursor:"pointer",":disabled":{cursor:"default",color:d(e,i).TextPrimary}},c({styleType:e,direction:r,shouldOptimizeCta:t,colors:d(e,i)})]),"label:ButtonActionItem;");function p({styleType:e,direction:t,shouldOptimizeCta:r}){switch(e){case 1:case 0:return[{marginTop:"8px",marginBottom:"6px"},(0,s.jJ)({max:768,style:{width:"32px",height:"32px",padding:"6px",svg:{width:"20px",height:"20px"}}})];case 2:return[{padding:"0",marginTop:"8px",marginBottom:"6px"}];case 3:return[!r&&{padding:"6px"},(0,s.mp)({direction:t,marginEnd:r?"8px":"6px"})];default:return null}}const m=(0,o.default)("span",{target:"e1hk3hf91"})((({shouldOptimizeCta:e,styleType:t,theme:{direction:r,colors:i}})=>[{display:"flex",justifyContent:"center",alignItems:"center",fontSize:"0px",borderRadius:"50%",transition:"all ease-in-out 200ms",cursor:"pointer"},(!e||3!==t)&&{width:3===t?"32px":"48px",height:3===t?"32px":"48px"},2===t||e&&3===t?null:{backgroundColor:d(t,i).BGInput,[`${u}:not(:disabled) &:hover`]:{backgroundColor:d(t,i).BGInput2},[`${u}:not(:disabled) &:active`]:{backgroundColor:"rgba(22, 24, 35, .14)"}},p({styleType:t,direction:r,shouldOptimizeCta:e})]),"label:SpanIconWrapper;"),h=(0,o.default)("strong",{target:"e1hk3hf92"})((({theme:e,styleType:t})=>[(0,s.zy)({theme:e,typography:"P4"}),{color:d(null!=t?t:0,e.colors).TextSecondary}]),{textAlign:"center"},"label:StrongText;");var b=r(88920);const g=(0,a.memo)((0,a.forwardRef)((function(e,t){const{text:r,Icon:i,styleType:o,disabled:l,children:s,e2eTag:d,style:c,ariaLabel:p,ariaPressed:g,ariaExpanded:f}=e,x=(0,a.useRef)(null),{shouldOptimizeCta:y}=(0,b.kb)(),v=(0,a.useCallback)((()=>{var e,t;return null===(t=Array.from(null===(e=x.current)||void 0===e?void 0:e.querySelectorAll("*")))||void 0===t?void 0:t.includes(document.activeElement)}),[]),w=(0,a.useCallback)((()=>{var e;null===(e=x.current)||void 0===e||e.focus()}),[]);return(0,a.useImperativeHandle)(t,(()=>({hasFocusForChildren:v,setFocus:w}))),(0,n.jsxs)(u,{styleType:o,type:"button",onClick:t=>{e.onClick&&(e.onClick(t),t.stopPropagation())},onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onKeyDown:e.onKeyDown,onBlur:e.onBlur,disabled:l,"aria-label":p,"aria-pressed":g,"aria-expanded":f,ref:x,shouldOptimizeCta:y,children:[(0,n.jsx)(m,{style:null!=c?c:{},styleType:o,"data-e2e":`${d}-icon`,shouldOptimizeCta:y,children:i}),(0,n.jsx)(h,{"data-e2e":`${d}-count`,styleType:o,children:r}),s]})})))},89221:(e,t,r)=>{r.d(t,{f:()=>B});var i=r(24643),n=r(41271),a=r(40099),o=r(73635),l=r(25616),s=r(50970),d=r(49057),c=r(44935),u=r(62186);const p=(0,u.default)("div",{target:"echcjyx0"})({width:"322px",borderRadius:"9px",height:"389px;",margin:"0px"},"label:DivPreviewContainer;"),m=(0,u.default)("iframe",{target:"echcjyx1"})({display:"block",visibility:"unset",width:"100%",height:"389px"},"label:IframePlaylistEmbedPreview;"),h="https://www.tiktok.com",b=function(e){var t;const{language:r}=null!==(t=(0,d.W)((()=>["language"]),[]))&&void 0!==t?t:{},{uniqueId:n,tagTitle:a,musicId:o,musicTitle:l,type:s}=e;if(!s||!n&&!a&&!o)return(0,i.jsx)("div",{});const u=null!=r?r:"en",b=(0,c.iB)(u);let g;switch(s){case 1:g=`${h}/embed/@${n}${b}`;break;case 3:g=`${h}/embed/tag/${a}${b}`;break;case 2:g=`${h}/embed/music/${l}-${o}${b}`}return(0,i.jsx)(p,{style:{pointerEvents:"none"},children:(0,i.jsx)(m,{src:g,frameBorder:"0"})})};var g=r(72153);const f=(0,u.default)("div",{target:"e172cezw0"})((({theme:e,isVideoEmbedPreview:t})=>[(0,g.mp)({direction:e.direction}),{width:t?"550px":"700px"}]),{borderRadius:"9px","@media(max-width: 1000px)":{width:"400px"}},"label:DivModalContainer;"),x=(0,u.default)("div",{target:"e172cezw2"})((({theme:{colors:e}})=>({padding:"24px 24px 12px 24px",borderBottom:`0.5px solid ${e.LineSecondary}`})),"label:DivEmbedTitle;"),y=(0,u.default)("h3",{target:"e172cezw3"})((({theme:e})=>(0,g.zy)({theme:e,typography:"P1",fontWeight:"bold"})),{fontSize:"20px",lineHeight:"24px",textAlign:"start"},"label:H3EmbedTitle;"),v=(0,u.default)("div",{target:"e172cezw4"})((({theme:{direction:e}})=>(0,g.mp)({direction:e,end:"23px"})),{display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",top:23,cursor:"pointer"},"label:DivXMarkWrapper;"),w=(0,u.default)("div",{target:"e172cezw5"})({display:"flex",justifyContent:"space-between",padding:"24px","@media(max-width: 1000px)":{paddingTop:0}},"label:DivModalInnerContainer;"),k=(0,u.default)("div",{target:"e172cezw6"})({width:310,paddingTop:10,"@media(max-width: 1000px)":{width:"400px"}},"label:DivTextArea;"),$=(0,u.default)("div",{target:"e172cezw7"})((({theme:e})=>[(0,g.zy)({theme:e,fontWeight:"semiBold"}),{fontSize:16,lineHeight:"24px"}]),{display:"block",width:"100%",marginBottom:"20px",border:"none",resize:"none",outline:"none",wordBreak:"break-all",overflowWrap:"break-word"},"label:DivAreaDescription;"),_=(0,u.default)("textarea",{target:"e172cezw8"})((({theme:e})=>[(0,g.zy)({theme:e,typography:"P2",color:"TextTertiary"}),{display:"block",padding:"12px 12px 12px 12px",width:"100%",height:148,marginBottom:20,border:"none",resize:"none",outline:"none",wordBreak:"break-all",overflowWrap:"break-word",background:"rgba(22, 24, 35, 0.06)",borderRadius:2}]),"label:TextareaEmbedCode;"),T=(0,u.default)("button",{target:"e172cezw9"})(g.WA,(({theme:e,primary:t})=>[(0,g.zy)({theme:e,fontWeight:t?"semiBold":"normal",color:"TextPrimary"}),{fontSize:16,border:`1px solid ${e.colors.LineSecondary}`,background:e.colors.BGTertiary},{":after":{content:'""',width:"100%",height:"1px",position:"absolute",left:0,top:0,background:e.colors.LineSecondary,transform:"scaleY(0.5)"}}]),{borderRadius:2,display:"block",width:"100%",textAlign:"center",cursor:"pointer",height:"36px",marginBottom:"20px"},"label:Button;"),C=(0,u.default)("p",{target:"e172cezw10"})((({theme:e})=>[(0,g.zy)({theme:e,typography:"P2",color:"TextTertiary"}),{a:{textDecoration:"underline","&, &:hover, &:active, &:link":{color:e.colors.TextTertiary}}}]),{fontSize:"12px",lineHeight:"18px"},"label:PHint;"),j=(0,u.default)("div",{target:"e1rggtg60"})({borderRadius:"4.5px",width:"163px",height:"379px",overflow:"hidden"},"label:DivPreviewContainer;"),I="scale(0.5)",z=e=>"rtl"===e?"top right":"top left",O=(0,u.default)("iframe",{target:"e1rggtg61"})((({theme:e})=>[{display:"block",visibility:"unset",width:"326px",height:"758px",msTransform:I,msTRANSFORM_ORIGIN_ZERO:z(e.direction),MozTransform:I,MozTRANSFORM_ORIGIN_ZERO:z(e.direction),WebkitTransform:I,WebkitTRANSFORM_ORIGIN_ZERO:z(e.direction),transform:I,transformOrigin:z(e.direction),border:"none"}]),"label:IframeVideoEmbedPreview;"),E=function(e){var t;const{videoId:r}=e,{language:n}=null!==(t=(0,d.W)((()=>["language"]),[]))&&void 0!==t?t:{};return(0,i.jsx)(j,{style:{pointerEvents:"none"},children:(0,i.jsx)(O,{src:(()=>{const e=null!=n?n:"en",t=(0,c.iB)(e);return`https://www.tiktok.com/embed/v2/${r}${t}`})(),frameBorder:"0"})})},B=function(e){const{code:t,onCopy:r,uniqueId:d,videoId:c,type:u,musicId:p,tagTitle:m,musicTitle:h}=e,g=(0,l.s)(),j=(0,n.P)(s.L,{selector:e=>e.lang,dependencies:[]}),I=(0,a.useRef)(null),z=(0,a.useCallback)((()=>{var e;null===(e=I.current)||void 0===e||e.select(),document.execCommand&&document.execCommand("copy"),null==r||r()}),[r]),O=`"https://www.tiktok.com/legal/terms-of-service?lang=${j}" target="_blank"`,B='"https://www.tiktok.com/legal/privacy-policy" target="_blank"';let S;const P=1===u||3===u||2===u;let A,D;switch(u){case 1:A=g("embed_profile_popup_title"),D=g("embed_profile_popup_desc");break;case 3:A=g("embeds_popup_hashtag_header"),D=g("embeds_popup_hashtag_body");break;case 2:A=g("embeds_popup_sound_header"),D=g("embeds_popup_sound_body");break;default:A=g("Embed video"),D=g("embed_popup_embed_body")}try{S=P?g("embeds_popup_tns").replace("{Terms of Service}",`${g("embed_profile_popup_bottom_desc_tos")}`).replace("{Privacy Policy}",`${g("embed_profile_card_desc_privacy_policy")}`):g("By embedding this video, you confirm that you agree to our Terms of Use and acknowledge you have read and understood our Privacy Policy.").replace("{TermsHref}",O).replace("{PolicyHref}",B)}catch(e){S=`By embedding this page, you confirm that you agree to our Terms of Service and acknowledge that you have read and understood our Privacy Policy.`}const[R,M]=(0,a.useState)(!0);return(0,a.useEffect)((()=>{var e;const t=window.matchMedia("(max-width: 1000px)");null===(e=null==t?void 0:t.addEventListener)||void 0===e||e.call(t,"change",(e=>M(e.matches))),M(null==t?void 0:t.matches)}),[]),(0,i.jsxs)(f,{isVideoEmbedPreview:!R&&!P,children:[(0,i.jsxs)(x,{children:[(0,i.jsx)(y,{children:A}),(0,i.jsx)(v,{onClick:e.onClose,children:(0,i.jsx)(o.A,{width:20,height:20})})]}),(0,i.jsxs)(w,{children:[!R&&(0,i.jsx)(i.Fragment,{children:P?(0,i.jsx)(b,{type:u,uniqueId:d,tagTitle:m,musicId:p,musicTitle:h}):(0,i.jsx)(E,{videoId:c})}),(0,i.jsxs)(k,{children:[(0,i.jsx)($,{children:D}),(0,i.jsx)(_,{defaultValue:t,readOnly:!0,rows:7,ref:I}),(0,i.jsx)(T,{primary:!0,onClick:z,children:g("embed_profile_popup_btn")}),(0,i.jsx)(C,{dangerouslySetInnerHTML:{__html:S}})]})]})]})}},44935:(e,t,r)=>{r.d(t,{AP:()=>u,CE:()=>p,MI:()=>h,iB:()=>b,jS:()=>m});var i=r(41271),n=r(72688),a=r(17566),o=r(52333),l=r(32125),s=r(84908);const d="https://www.tiktok.com";function c(e){const t={"<":"<",">":">",'"':""","'":"'","&":"&","/":"/"};let r=`(${Object.keys(t).toString()})`;r=r.replace(/,/g,")|(");const i=new RegExp(r,"g");return e.replace(i,(e=>t[e]))}function u(e){var t,r,u;const p=(0,i.P)(o.k,{selector:t=>t[e],dependencies:[e]}),m=(0,s.nW)((e=>{var t;return e.users[null!==(t=null==p?void 0:p.author)&&void 0!==t?t:""]}),l.bN),{music:h,textExtra:b,desc:g}=null!=p?p:{},{uniqueId:f="",secUid:x}=null!=m?m:{},y=null!==(t=null==h?void 0:h.title)&&void 0!==t?t:"",v=null!==(r=null==h?void 0:h.id)&&void 0!==r?r:"",w=null!==(u=null==h?void 0:h.authorName)&&void 0!==u?u:"",k=(0,n.fJR)({uniqueId:f,secUid:x}),$=(0,n.pHc)({musicName:y,musicId:v}),_=(0,a._u)()(p),T=y.replace(`- ${w}`,"")+(w?` - ${w}`:""),C=`${d}${k.split("?")[0]}`,j=`${d}${$.split("?")[0]}`,I=`${d}${_.split("?")[0]}`,z=`${d}/embed.js`,O=`@${f}`,E=`♬ ${c(T)}`;return`\n
\n\n\n ${O}\n ${function(e,t=[]){return t.length?[...t].sort(((e,t)=>e.start-t.start)).reduce(((t,r,i,a)=>{const{start:o,end:l,hashtagName:s,type:u}=r,p=0===i?0:a[i-1].end,m=o,h=e.substring(p,m);h&&(t+=c(h));const b=e.substring(o,l);return t+(1===u&&s?`${c(b)}`:c(b))}),""):` \n${c(e)}
`}(null!=g?g:"",b)}\n ${E}\n