/*! For license information please see 46750.e08c16ae.js.LICENSE.txt */ !function(e,r){"object"==typeof module&&"object"==typeof module.exports?r():"function"==typeof define&&define.amd?define([],r):(e="undefined"!=typeof globalThis?globalThis:e||self)&&r()}(this,function(){"use strict";"object"==typeof window&&(window.openRedirect={version:"1.2.20",webpackPluginVersion:"3.4.22",reportOnly:!1})}),!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).xss={})}(this,function(e){"use strict";var r=function(){return(r=Object.assign||function(e){for(var r,n=1,t=arguments.length;n/g,s=/&#([a-zA-Z0-9]*);?/gim,l=/"/g,d=/:?/gim,h=/&newline;?/gim,a=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,m=/u\s*r\s*l\s*\(.*/gi,v=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,c=/"/g,b=function(e){return e.replace(o,"<").replace(i,">")},u={indexOf:function(e,r){var n,t;for(n=0,t=e.length;n127&&t<2048?r+=String.fromCharCode(t>>6|192)+String.fromCharCode(63&t|128):r+=String.fromCharCode(t>>12|224)+String.fromCharCode(t>>6&63|128)+String.fromCharCode(63&t|128)}return r}(e);a>2,i=(3&r)<<4|(n=e.charCodeAt(a++))>>4,s=(15&n)<<2|(t=e.charCodeAt(a++))>>6,l=63&t,isNaN(n)?s=l=64:isNaN(t)&&(l=64),h=h+d.charAt(o)+d.charAt(i)+d.charAt(s)+d.charAt(l);return h}function g(e){var r,n,t,o,i,s,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",d="",h=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");h>4,n=(15&o)<<4|(i=l.indexOf(e.charAt(h++)))>>2,t=(3&i)<<6|(s=l.indexOf(e.charAt(h++))),d+=String.fromCharCode(r),64!==i&&(d+=String.fromCharCode(n)),64!==s&&(d+=String.fromCharCode(t));return function(e){for(var r="",n=0,t=0,o=0,i=0;n191&&t<224?(r+=String.fromCharCode((31&t)<<6|63&(i=e.charCodeAt(n+1))),n+=2):(i=e.charCodeAt(n+1),r+=String.fromCharCode((15&t)<<12|(63&i)<<6|63&(o=e.charCodeAt(n+2))),n+=3);return r}(d)}function y(e,r,n){var t="",o=0,i=!1,s=!1,l=0,d=e.length,h="",a="";e:for(l=0;l"===m||l===d-1){t+=n(e.slice(o,i)),h=function(e){var r,n=u.spaceIndex(e);return r=-1===n?e.slice(1,-1):e.slice(1,n+1),"/"===(r=u.trim(r).toLowerCase()).slice(0,1)&&(r=r.slice(1)),"/"===r.slice(-1)&&(r=r.slice(0,-1)),r}(a=e.slice(i,l+1)),t+=r(i,t.length,h,a,"0;r--){var n=e[r];if(" "!==n)return"="===n?r:-1}return -1}(e,h-1))){d(s,f(u.trim(e.slice(n,h)))),s=!1,n=h+1;continue}}}else{if(-1===(m=e.indexOf(a,h+1)))break;d(s,u.trim(e.slice(o+1,m))),s=!1,n=(h=m)+1}}else s=e.slice(n,h),n=h+1,o='"'===e.charAt(n)||"'"===e.charAt(n)?n:function(e,r){for(;re.charCodeAt(n)?" ":e.charAt(n);return u.trim(r)}(e=(e=(e=e.replace(l,'"')).replace(s,function(e,r){return"x"===r[0]||"X"===r[0]?String.fromCharCode(parseInt(r.substr(1),16)):String.fromCharCode(parseInt(r,10))})).replace(d,":").replace(h," "))}(n),"href"===r||"src"===r){if("#"===(n=u.trim(n)))return"#";if("http://"!==n.substr(0,7)&&"https://"!==n.substr(0,8)&&"mailto:"!==n.substr(0,7)&&"tel:"!==n.substr(0,4)&&"data:image/"!==n.substr(0,11)&&"ftp://"!==n.substr(0,6)&&"./"!==n.substr(0,2)&&"../"!==n.substr(0,3)&&"#"!==n[0]&&"/"!==n[0])return""}else if("background"===r){if(a.lastIndex=0,a.test(n))return""}else if("style"===r&&(v.lastIndex=0,v.test(n)||(m.lastIndex=0,m.test(n)&&(a.lastIndex=0,a.test(n)))))return"";return n=function(e){return e=b(e=e.replace(c,"""))}(n)}var k=function(e){return"string"==typeof e?e.replace(/'/g,'"').replace('=""',"").replace(/\s+/g,"").toLowerCase():""},S=function(){function e(e){var r=function(e){var r={};for(var n in e)r[n]=e[n];return r}(e||{});r.stripIgnoreTag&&(r.onIgnoreTag,r.onIgnoreTag=function(){return""}),r.whiteList={},r.onTag=function(){},r.onTagAttr=function(){},r.onIgnoreTag=function(){},r.onIgnoreTagAttr=function(){},r.safeAttrValue=w,r.escapeHtml=b,this.options=Object.assign(r,e)}return e.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var r,n,t,o,i,s,l=this.options,d=l.whiteList,h=l.onTag,a=l.onIgnoreTag,m=l.onTagAttr,v=l.onIgnoreTagAttr,c=l.safeAttrValue,b=l.escapeHtml;l.stripBlankChar&&(e=(r=(r=e.split("")).filter(function(e){var r=e.charCodeAt(0);return!(127===r||r<=31&&10!==r&&13!==r)})).join("")),l.allowCommentTag||(e=function(e){for(var r="",n=0;n");var l=function(e){var r=u.spaceIndex(e);if(-1===r)return{html:"",closing:"/"===e[e.length-2]};var n="/"===(e=u.trim(e.slice(r+1,-1)))[e.length-1];return n&&(e=u.trim(e.slice(0,-1))),{html:e,closing:n}}(t),P=d[n],f=x(l.html,function(e,r){var t=-1!==u.indexOf(P,e),o=m(n,e,r,t);return null==o?t?(r=c(n,e,r,null))?"".concat(e,'="').concat(r,'"'):e:null==(o=v(n,e,r,t))?void 0:o:o});return t="<".concat(n),f&&(t+=" ".concat(f)),l.closing&&(t+=" /"),t+=">"}return null==(s=a(n,t,i))?b(t):s},b);return P&&(f=P.remove(f)),f},e}(),C=Function("\nvar _checkXSS = function (it) {\n return it && it.Math == Math && it;\n};\nreturn _checkXSS(typeof globalThis === 'object' && globalThis) ||\n_checkXSS(typeof window === 'object' && window) ||\n_checkXSS(typeof self === 'object' && self) ||\n_checkXSS(typeof global === 'object' && global) ||\nFunction('return this')();\n")(),E=new(function(){function e(){var e=this;this.batchData=[],this.uniqKeys=new Set,this.timeout=2e3,this.lock=!1,this.getSlardarBid=function(){var r,n,t="douyin_web";if(!u.includes(t,"bid"))return t;if(e.config&&e.config.bid)return e.config.bid;if(C&&C._xssBid)return C._xssBid;if(C&&C.slardar&&"function"==typeof C.slardar.config){var o=(C.slardar.config()||{}).bid;if(o)return o}if(C&&C.Slardar&&"function"==typeof C.Slardar.config){var i=(C.Slardar.config()||{}).bid;if(i)return i}return(null===(n=null===(r=null==C?void 0:C.Slardar)||void 0===r?void 0:r._baseParams)||void 0===n?void 0:n.bid)||"argus"},this.getConfigRegion=function(){var r;return u.includes("cn","region")?e.config&&e.config.region?e.config.region:((null===(r=null==C?void 0:C.gfdatav1)||void 0===r?void 0:r.region)||"cn").toLowerCase():"cn"},this.gerReportUrl=function(){var r={cn:g("aHR0cHM6Ly9tb24uemlqaWVhcGkuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),boe:g("aHR0cHM6Ly9tb24uemlqaWVhcGkuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),ttp:g("aHR0cHM6Ly9tb24udXMudGlrdG9rdi5jb20vbW9uaXRvcl9icm93c2VyL2NvbGxlY3QvYmF0Y2gvc2VjdXJpdHkvP2JpZD0="),va:g("aHR0cHM6Ly9tb24tdmEuYnl0ZW92ZXJzZWEuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),maliva:g("aHR0cHM6Ly9tb24tdmEuYnl0ZW92ZXJzZWEuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),sg:g("aHR0cHM6Ly9tb24tdmEuYnl0ZW92ZXJzZWEuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),boei18n:g("aHR0cHM6Ly9tb24tdmEuYnl0ZW92ZXJzZWEuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9")}[e.getConfigRegion()];if(r)return r+e.getSlardarBid()}}return e.prototype.setConfig=function(e){this.config=e},e.prototype.upload=function(){var e=this,r=this.gerReportUrl();!this.lock&&r&&0!==this.batchData.length&&(this.lock=!0,setTimeout(function(){var n=e.batchData.slice(0,100);e.batchData=e.batchData.slice(100),C.fetch(r,{method:"post",body:JSON.stringify(n),headers:{"Content-Type":"application/json"}}).catch(function(e){}),e.lock=!1,e.upload()},this.timeout))},e.prototype.generateKey=function(e){return e.collectKey?[e.collectMode,e.collectKey].join("___"):""},e.prototype.push=function(e){this.batchData.push(e),this.upload()},e.prototype.report=function(e){var r=this.generateKey(e);if(C.fetch&&e.collectKey){var n="object"==typeof window?window.location.href:"SSR";e.documentUrl=n;var t={age:Math.floor(Date.now()),type:"xss",url:n,body:e,"user-agent":""};"enforce"===e.disposition&&"SSR"!==n||(t.url=r),"SSR"===n&&(t.url="SSR___".concat(t.url),t.body.ssr=!0),this.push(t)}},e}()),L=function(e){for(var r=0,n=function(n){Array.isArray(e[n])?0===e[n].length?delete e[n]:(e[n]=u.from(u.uniq(e[n])),r+=e[n].length):0===u.keys(e[n]).length?delete e[n]:u.keys(e[n]).forEach(function(t){e[n][t]=u.from(u.uniq(e[n][t])),r+=e[n][t].length})},t=0,o=u.keys(e);t0)return r&&r("javascript:"),!1;if(/^javascript:/i.test(e)){var o=e.slice(11).replace(/\s/g,"").trim();return!!u.some(["void","void(0)","void0","false","undefined",";"],function(e){return e===o})||(r&&r("javascript:"),!1)}return!0}var A=function(e,r){var n,t,o="<%= isSaveValidUrl =>";if("string"!=typeof e||(t=Number("<%= urlLimit =>"),void 0!==n&&(t=n),"NaN"!==e.toString()&&-1!==t&&e.length>=t)||_(e,r))return e;try{if(!0===(o=JSON.parse(o))||"true"===o){var i=new URL(e);return i.origin+i.pathname}}catch(e){}return"#"};function N(e,r,t){if(void 0===e&&(e=""),void 0===r&&(r=[]),"string"!=typeof e)return!0;if(!_(e=T(e)))return!1;var o,i={url:(o=e.match(/^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/)||[])[0],scheme:o[1],slash:o[2],host:o[3],port:o[4],path:o[5],query:o[6],hash:o[7]},s=i.scheme,l=i.host;return t?!!t(e):!(!s||!l)&&(!u.includes(["http","https","file"],s)||("object"==typeof window&&window&&(r=n(n([],r,!0),[location.host],!1)),u.some(r,function(e){return!!(e instanceof RegExp&&e.test(l))||e===l})))}var R={a:["target","title","spellcheck","rel"],canvas:[],abbr:["title"],address:[],area:["shape","coords","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:["dir"],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["alt","title","width","height","decoding"],ins:["datetime"],li:[],mark:[],nav:[],ol:["start"],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],delete:[],form:[],strong:[],mask:["maskunits","x","y","width","height","fill"],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],wbr:[],video:["autoplay","controls","loop","preload","height","width"],svg:["viewBox","version","xmlns","fill","width","height","stroke","stroke-width","style"],path:["d","fill","opacity","stroke","p-id","fill-rule","clip-rule","stroke-width","stroke-linecap","stroke-linejoin","fill-opacity","mask"],rect:["x","y","width","height","fill","stroke","rx"],g:[]},M={collect:null,initCollect:function(){this.collect={whiteList:{},filterProtocol:[]}},removeCollect:function(){var e=L(this.collect),r=e.count,n=e.ret;return this.collect=null,{collectKey:0===r?null:JSON.stringify(n),collectMode:"white"}},onIgnoreTagAttr:function(e,r,t){return e&&u.indexOf(["href","src"],r)>-1?M.domainWhiteList&&Array.isArray(M.domainWhiteList)&&M.domainWhiteList.length>0&&!N(t,n([],M.domainWhiteList,!0))?"":"".concat(r,'="').concat(A(t,function(e){var r;null===(r=M.collect)||void 0===r||r.filterProtocol.push(e)}),'"'):e&&(u.indexOf(["style","class","id"],r)>-1||r.indexOf("data-")>-1)?"".concat(r,'="').concat(t,'"'):(M.collect.whiteList[e]=M.collect.whiteList[e]||[],void M.collect.whiteList[e].push(r))},onIgnoreTag:function(e,r){if("style"===e)return r;y(r,function(e,r,n,t){x(j(t).html.replace("/",""),function(e){M.collect.whiteList[n]=M.collect.whiteList[n]||[],M.collect.whiteList[n].push(e)})},b)},whiteList:R,mergeWhiteList:function(e){for(var r,n={},t=0,o=u.keys(R);t");var i=j(t),s=x(i.html,function(e,r){var t,o=0;if(B.blackList[n]&&u.includes(B.blackList[n],e)&&(W.collect.blackList[n]=W.collect.blackList[n]||[],W.collect.blackList[n].push(e),o++),B.blackAttrRegExps.length&&B.blackAttrRegExps.some(function(r){return r.test(e)})&&u.forEach(B.blackAttrRegExps,function(r){r.test(e)&&(W.collect.blackAttrRegExps.push("".concat(r.toString(),"->").concat(e)),o++)}),B.blackAttrs.length&&u.includes(B.blackAttrs,e)&&(B.blackAttrs.push(e),o++),!o){if(B.filterList&&B.filterList[n]&&u.includes(B.filterList[n],e)){var i=A(r,function(e){var r;null===(r=W.collect)||void 0===r||r.filterProtocol.push(e)});return i!==r&&(W.collect.filterList[n]=W.collect.filterList[n]||[],W.collect.filterList[n].push(e)),r?"".concat(e,"='").concat(i,"'"):e}return B.filterAttrs&&u.includes(B.filterAttrs,e)?((i=A(r,function(e){var r;null===(r=W.collect)||void 0===r||r.filterProtocol.push(e)}))!==r&&(null===(t=W.collect)||void 0===t||t.filterAttrs.push(e)),r?"".concat(e,"='").concat(i,"'"):e):r?"".concat(e,"='").concat(r,"'"):e}});return t="<".concat(n),s&&(t+=" ".concat(s)),i.closing&&(t+=" /"),t+=">"},b);null===(n=W.collect)||void 0===n||n.blackTags.push(e)}},J=function(e){var r=e.reportOnly,n=void 0===r||r,t=e.block;return n&&"all"===n?"report":("string"==typeof n&&("true"===n&&(n=!0),"false"===n&&(n=!1)),t?"enforce":n?"report":"enforce")},V=function(e){return function(n,t,o){if(!n||"string"!=typeof n)return n;var i=t;e===O&&(i=M).initCollect();var s=e(n,i);if(k(s)===k(n))return n;if(!o)return s;var l=o.logType,d=J(o),h=i.removeCollect();return E.report(r(r({type:l,disposition:d},h),{sourceText:p(n),filterText:p(s)})),"enforce"===d?s:n}},F=V(function(e,r){return void 0===r&&(r={}),r&&r.whiteList||(r.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}),new S(r).process(e)}),Y=V(O),U=function(e,r,n){var t=[],o=A(e,function(e){t.push(e)});if(o===e)return e;t=u.from(u.uniq(t));var i=r||n||{};if(!i)return o;var s=i.logType,l=J(n);return E.report({type:s,disposition:l,collectKey:t.join("___"),collectData:JSON.stringify(t),collectMode:"black",sourceText:p(e),filterText:p(o)}),"enforce"===l?o:e},X=C._xssProject||{},$=C.xssNamespace||{},G="3.0.26",q={FilterXSS:S,version:G,webpackPluginVersion:"<%= webpackPluginVersion =>",reportOnly:"<%= reportOnly =>",filterXSS:F,_filterXSS:Y,filterUrl:U,Config:M,BlackConfig:W,project:X,setProjectName:function(e){X[e]=this,C._xssProjectName=e}};$.douyin_web=q,C.xssNamespace=$,C.Math&&!C.Math.xssNamespace&&(C.Math.xssNamespace=$),X[G]=q,C.globalThis=C,C.getFilterXss=function(){return void 0!==this._xssProjectName?this._xssProject[this._xssProjectName]:q},C.xss=q,C.isSafeUrl=N,C.isSafeDomain=N,C.isSafeProtocol=_,C._xssProject=X,C._xssProjectName&&(X[C._xssProjectName]=q);var K=q.setProjectName.bind(q);e.BlackConfig=W,e.Config=M,e.FilterXSS=S,e._filterXSS=Y,e.filterUrl=U,e.filterXSS=F,e.isSafeDomain=N,e.isSafeProtocol=_,e.isSafeUrl=N,e.project=X,e.setProjectName=K,e.setXssNamespace=function(e){var r=e.appId,n=e.bid,t=e.region;$[r]=q;M.bid=n,M.region=t,M.enabled=!0},e.xssNamespace=$,Object.defineProperty(e,"__esModule",{value:!0})}),(self.webpackChunkdouyin_web=self.webpackChunkdouyin_web||[]).push([["46750"],{222601:function(e,r,n){"use strict";n.d(r,{d:function(){return b}});var t=n(315355),o=n(919209),i=n(732905),s=n(625813),l=n(92833),d=n(272787),h=n(483803),a=n(443826),m=n(19470),v=n(299372),c=n(667954),b=function(e){(0,s.Z)(n,e);var r=(0,l.Z)(n);function n(){var e;(0,t.Z)(this,n);for(var o=arguments.length,s=Array(o),l=0;l=1&&r<=53}},{key:"set",value:function(e,r,n){return(0,c.Z)((0,v.Z)(e,n))}}]),n}(h._)},340378:function(e,r,n){var t=n(216766),o=n(247494);e.exports=function(e,r){return e&&t(e,r,o)}},881504:function(e,r,n){var t=n(187232);e.exports=function(){this.__data__=t?t(null):{},this.size=0}},489527:function(e){e.exports=function(){this.__data__=[],this.size=0}},89063:function(e,r,n){"use strict";r.default=void 0;var t=l(n(195195)),o=l(n(101199)),i=l(n(622689)),s=l(n(549431));function l(e){return e&&e.__esModule?e:{default:e}}function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,r){for(var n=0;n=0)&&(o[n]=e[n]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0))Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}}return o}(r,["children","noWrapper","tag"]);return t?o.default.createElement(o.default.Fragment,null,o.default.Children.map(n,function(r,n){return"string"==typeof r?r:(e.childrenRefs[n]=e.childrenRefs[n]||o.default.createRef(),o.default.cloneElement(r,{ref:e.childrenRefs[n]}))})):(delete s.options,o.default.createElement(i,function(e){for(var r=1;r0&&void 0!==arguments[0]?arguments[0]:{};super(e)}}l.__SemiComponentName__="Button",l.propTypes=Object.assign(Object.assign({},o.Z.propTypes),i.Z.propTypes),l.defaultProps=(0,s.GW)(l.__SemiComponentName__),l.elementType="Button",r.Z=l},314215:function(e,r,n){"use strict";n(932651),n(706056),n(374954);var t=n(101199),o=n(622689),i=n.n(o),s=n(562085),l=n(319693),d=n(904960),h=n(204342),a=n(648682),m=n(48795),v=n(145621),c=n.n(v),b=n(228968),u=n(571553),P=n(209873),f=n(469935),p=n.n(f);let{PREFIX_CHAT_BOX_ACTION:g}=b.U,{ROLE:y,MESSAGE_STATUS:x}=b.j;class w extends m.BaseComponent{componentDidMount(){this.copySuccessNode=t.createElement(P.Z,{componentName:"Chat"},e=>e.copySuccess)}componentWillUnmount(){this.foundation.destroy()}get adapter(){return Object.assign(Object.assign({},super.adapter),{notifyDeleteMessage:()=>{let{message:e,onMessageDelete:r}=this.props;null==r||r(e)},notifyMessageCopy:()=>{let{message:e,onMessageCopy:r}=this.props;null==r||r(e)},copyToClipboardAndToast:()=>{var e;let{message:r={},toast:n}=this.props;if("string"==typeof r.content)c()(r.content);else if(Array.isArray(r.content)){let n=null===(e=r.content)||void 0===e?void 0:e.map(e=>e.text).join("");c()(n)}n.success({content:this.copySuccessNode})},notifyLikeMessage:()=>{let{message:e,onMessageGoodFeedback:r}=this.props;null==r||r(e)},notifyDislikeMessage:()=>{let{message:e,onMessageBadFeedback:r}=this.props;null==r||r(e)},notifyResetMessage:()=>{let{message:e,onMessageReset:r}=this.props;null==r||r(e)},setVisible:e=>{this.setState({visible:e})},setShowAction:e=>{this.setState({showAction:e})},registerClickOutsideHandler:e=>{this.clickOutsideHandler&&this.adapter.unregisterClickOutsideHandler(),this.clickOutsideHandler=r=>{let n=this.popconfirmTriggerRef&&this.popconfirmTriggerRef.current,t=r.target,o=r.composedPath&&r.composedPath()||[t];n&&!n.contains(t)&&!o.includes(n)&&e()},window.addEventListener("mousedown",this.clickOutsideHandler)},unregisterClickOutsideHandler:()=>{this.clickOutsideHandler&&(window.removeEventListener("mousedown",this.clickOutsideHandler),this.clickOutsideHandler=null)}})}render(){let{message:e={},lastChat:r}=this.props,{showAction:n}=this.state,{role:o,status:i=x.COMPLETE}=e,s=i===x.COMPLETE,l=o!==y.USER&&s,d=r&&o===y.ASSISTANT,h=i!==x.LOADING&&i!==x.INCOMPLETE,a=p()(g,{[`${g}-show`]:d&&h||n,[`${g}-hidden`]:!h}),{customRenderFunc:m}=this.props;if(m){let r=[],n={};if(s){let e=this.copyNode();r.push(e),n.copyNode=e}if(l){let e=this.likeNode();r.push(e),n.likeNode=e;let t=this.dislikeNode();r.push(t),n.dislikeNode=t}if(d){let e=this.resetNode();r.push(e),n.resetNode=e}let t=this.deleteNode();return r.push(t),n.deleteNode=t,m({message:e,defaultActions:r,className:a,defaultActionsObj:n})}return t.createElement("div",{className:a,ref:this.containerRef},s&&this.copyNode(),l&&this.likeNode(),l&&this.dislikeNode(),d&&this.resetNode(),this.deleteNode())}constructor(e){super(e),this.copyNode=()=>t.createElement(m.Button,{key:"copy",theme:"borderless",icon:t.createElement(s.Z,null),type:"tertiary",onClick:this.foundation.copyMessage,className:`${g}-btn`}),this.likeNode=()=>{let{message:e={}}=this.props,{like:r}=e;return t.createElement(m.Button,{key:"like",theme:"borderless",icon:r?t.createElement(l.Z,null):t.createElement(d.Z,null),type:"tertiary",className:`${g}-btn`,onClick:this.foundation.likeMessage})},this.dislikeNode=()=>{let{message:e={}}=this.props,{dislike:r}=e;return t.createElement(m.Button,{theme:"borderless",key:"dislike",icon:r?t.createElement(l.Z,{className:`${g}-icon-flip`}):t.createElement(d.Z,{className:"semi-chat-chatBox-action-icon-flip"}),type:"tertiary",className:`${g}-btn`,onClick:this.foundation.dislikeMessage})},this.resetNode=()=>t.createElement(m.Button,{key:"reset",theme:"borderless",icon:t.createElement(h.Z,{className:`${g}-icon-redo`}),type:"tertiary",onClick:this.foundation.resetMessage,className:`${g}-btn`}),this.deleteNode=()=>{let e=t.createElement(P.Z,{componentName:"Chat"},e=>e.deleteConfirm);return t.createElement(m.Popconfirm,{trigger:"custom",visible:this.state.visible,key:"delete",title:e,onConfirm:this.foundation.deleteMessage,onCancel:this.foundation.hideDeletePopup,position:"top"},t.createElement("span",{ref:this.popconfirmTriggerRef,className:`${g}-delete-wrap`},t.createElement(m.Button,{theme:"borderless",icon:t.createElement(a.Z,null),type:"tertiary",className:`${g}-btn`,onClick:this.foundation.showDeletePopup})))},this.foundation=new u.Z(this.adapter),this.copySuccessNode=null,this.state={visible:!1,showAction:!1},this.clickOutsideHandler=null,this.containerRef=t.createRef(),this.popconfirmTriggerRef=t.createRef()}}w.propTypes={role:i().object,message:i().object,showReset:i().bool,onMessageBadFeedback:i().func,onMessageGoodFeedback:i().func,onMessageCopy:i().func,onChatsChange:i().func,onMessageDelete:i().func,onMessageReset:i().func,customRenderFunc:i().func},r.Z=w},96158:function(e,r,n){"use strict";n.d(r,{Z:function(){return g}}),n(932651);var t=n(390063),o=n.n(t),i=n(198412),s=n.n(i),l=n(101199),d=n(469935),h=n.n(d),a=n(622689),m=n.n(a),v=n(668833),c=n(426337),b=n(844949),u=n(786202),P=function(e,r){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&0>r.indexOf(t)&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,t=Object.getOwnPropertySymbols(e);or.indexOf(t[o])&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(n[t[o]]=e[t[o]]);return n};let f=v.UX.PREFIX,p=v.j2.SIZE;class g extends c.Z{renderGroupWithLabel(e){let r=this.props,{size:n,className:t,label:o,labelPosition:i}=r;P(r,["size","className","label","labelPosition"]);let s=h()({[`${f}-group-wrapper`]:!0,[`${f}-group-wrapper-with-top-label`]:"top"===i,[`${f}-group-wrapper-with-left-label`]:"left"===i}),d=h()(`${f}-group`,t,{[`${f}-${n}`]:"default"!==n}),a="input-group";return l.createElement("div",{className:s},o&&o.text?l.createElement(b.Z,Object.assign({name:a},o)):null,l.createElement("span",{role:"group","aria-disabled":this.props.disabled,id:o&&o.name||a,className:d,style:this.props.style,onFocus:this.props.onFocus,onBlur:this.props.onBlur},e))}render(){let e;let r=this.props,{size:n,style:t,className:i,children:d,label:a,onBlur:m,onFocus:v,disabled:c}=r,b=P(r,["size","style","className","children","label","onBlur","onFocus","disabled"]),u=h()(`${f}-group`,{[`${f}-${n}`]:"default"!==n},i);return(d&&(e=(Array.isArray(d)?d:[d]).map((e,r)=>{if(e){let{onBlur:t,onFocus:i,disabled:d}=e.props,h=o()(t)&&"noop"!==s()(t,"name")?t:m,a=o()(i)&&"noop"!==s()(i,"name")?i:v,u="boolean"==typeof d?d:c;return l.cloneElement(e,Object.assign(Object.assign({key:r},b),{size:n,onBlur:h,onFocus:a,disabled:u}))}return null})),a&&a.text)?this.renderGroupWithLabel(e):l.createElement("span",{role:"group","aria-label":"Input group","aria-disabled":this.props.disabled,className:u,style:t,onFocus:this.props.onFocus,onBlur:this.props.onBlur},e)}}g.propTypes={className:m().string,children:m().node,size:m().oneOf(p),style:m().object,onBlur:m().func,onFocus:m().func,label:m().object,labelPosition:m().string},g.defaultProps={size:"default",className:"",onBlur:u.Z,onFocus:u.Z}},831714:function(e,r,n){"use strict";n(706056),n(932651);var t=n(390063),o=n.n(t),i=n(22186),s=n.n(i),l=n(243392),d=n.n(l),h=n(5784),a=n.n(h),m=n(795233),v=n.n(m),c=n(856445),b=n(668833),u=n(108220),P=n(850672);class f extends c.Z{static get inputDefaultAdapter(){return{notifyChange:v(),setValue:v()}}destroy(){this._timer&&(clearTimeout(this._timer),this._timer=null)}setDisable(){}setValue(e){this._adapter.setValue(e)}handleChange(e,r){let{maxLength:n,minLength:t,getValueLength:i}=this._adapter.getProps(),s=e;n&&o()(i)&&(s=this.handleVisibleMaxLength(e)),t&&o()(i)&&this.handleVisibleMinLength(s),this._isControlledComponent()||this._adapter.setValue(s),this._adapter.notifyChange(s,r)}handleVisibleMinLength(e){let{minLength:r,getValueLength:n}=this._adapter.getProps(),{minLength:t}=this._adapter.getStates();if(d()(r)&&r>=0&&o()(n)&&s()(e)){let o=n(e);if(o=0&&o()(n)&&s()(e)&&n(e)>r?this.handleTruncateValue(e,r):e}handleTruncateValue(e,r){let{getValueLength:n}=this._adapter.getProps();return(0,P.Z)({value:e,maxLength:r,getValueLength:n})}handleClear(e){let r=e;this._isControlledComponent("value")?this._adapter.setState({isFocus:!1}):this._adapter.setState({value:"",isFocus:!1}),(!r||"object"!=typeof r)&&(r={}),a()(r,b.j2.CLEARBTN_CLICKED_EVENT_FLAG,!0),this._adapter.notifyChange("",r),this._adapter.notifyClear(r),r&&this.stopPropagation(r)}handleClick(e){let{disabled:r}=this._adapter.getProps(),{isFocus:n}=this._adapter.getStates();if(!r&&!n)this._adapter.isEventTarget(e)&&(this._adapter.focusInput(),this._adapter.toggleFocusing(!0))}handleModeChange(e){"password"===e?this._adapter.setEyeClosed(!0):this._adapter.setEyeClosed(!1)}handleClickEye(e){let r=this._adapter.getState("eyeClosed");this._adapter.focusInput(),this._adapter.toggleFocusing(!0),this._adapter.setEyeClosed(!r)}handleInputType(e){let r=this._adapter.getProp("mode"),n=this._adapter.getState("eyeClosed");return"password"===r?n?"password":"text":e}handleMouseDown(e){e.preventDefault()}handleMouseUp(e){e.preventDefault()}handleBlur(e){let{value:r}=this.getStates();this._adapter.toggleFocusing(!1),this._adapter.notifyBlur(r,e)}handleFocus(e){let{value:r}=this.getStates();this._adapter.toggleFocusing(!0),this._adapter.notifyFocus(r,e)}handleInput(e){this._adapter.notifyInput(e)}handleKeyDown(e){this._adapter.notifyKeyDown(e)}handleKeyUp(e){this._adapter.notifyKeyUp(e)}handleKeyPress(e){this._adapter.notifyKeyPress(e),e.key===u.q7&&this._adapter.notifyEnterPress(e)}isAllowClear(){let{value:e,isFocus:r,isHovering:n}=this._adapter.getStates(),{showClear:t,disabled:o,showClearIgnoreDisabled:i}=this._adapter.getProps();return e&&t&&(!o||i)&&(r||n)}handleClickPrefixOrSuffix(e){let{disabled:r}=this._adapter.getProps(),{isFocus:n}=this._adapter.getStates();!r&&!n&&(this._adapter.focusInput(),this._adapter.toggleFocusing(!0))}handlePreventMouseDown(e){e&&o()(e.preventDefault)&&e.preventDefault()}handleModeEnterPress(e){["Enter"," "].includes(null==e?void 0:e.key)&&(this.handlePreventMouseDown(e),this.handleClickEye(e))}constructor(e){super(Object.assign(Object.assign({},f.inputDefaultAdapter),e))}}r.Z=f},762849:function(e,r,n){"use strict";n(932651);var t=n(101199);function o(){return(o=Object.assign||function(e){for(var r=1;re.includes("client-entry")&&/\.js$/.test(e),er=e=>!!e.includes("https://lf-douyin-pc-web.douyinstatic.com/obj/douyin-pc-web/ies/douyin_web/")&&!Q.test(e),en=function(){let{debug:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{debug:!1},r=(0,l.useRef)({perfTiming:!1}),n=(0,l.useRef)({resourceCacheCount:0,resourcePreloadCount:0,resourcePrefetchCount:0,resourceBlockCount:0,resourceBlockStart:0,resourceBlockEnd:0,resourceBlockDuration:0,resourceBlockRawDuration:0,resourceCount:0,resourceInitialCount:0,resourceSize:0,resourceInitialSize:0,resourceStart:0,resourceEnd:0,resourceDuration:0,resourceRawDuration:0,resourceInitialStart:0,resourceInitialEnd:0,resourceEntryStart:0,resourceInitialDuration:0,resourceInitialRawDuration:0}),t=(0,l.useRef)({navigationType:"",redirectStart:0,domInteractive:0,domContentLoadedEventStart:0,domContentLoadedEventEnd:0,loadEventStart:0,fetchStart:0,domainLookupStart:0,domainLookupEnd:0,responseEnd:0,domParseDuration:0,htmlLoadDuration:0,domReadyDuration:0,remainResourceLoadDuration:0,deferJsDuration:0,navigationDuration:0}),o=(0,l.useRef)({resourceBlockList:new Set}),a=(0,l.useRef)({middlewares:new Map,fetchers:new Map,components:new Map}),m=(0,l.useRef)(new Map),v=(0,l.useRef)(new Map),c=()=>{a.current.middlewares.clear(),a.current.fetchers.clear(),a.current.components.clear(),m.current.clear(),v.current.clear(),Object.keys(r.current).forEach(e=>{r.current[e]=!1}),Object.keys(n.current).forEach(e=>{n.current[e]=0}),Object.keys(t.current).forEach(e=>{t.current[e]="number"==typeof t.current[e]?0:""}),o.current.resourceBlockList.clear()},b=()=>{var e;(null!==(e=performance.getEntriesByType("resource").filter(e=>e.name&&K.test(e.name)))&&void 0!==e?e:[]).forEach(e=>{var r,t,i;n.current.resourceCount+=1,n.current.resourceSize+=e.encodedBodySize,n.current.resourceStart=Math.min(n.current.resourceStart||e.startTime,e.startTime),n.current.resourceEnd=Math.max(null!==(r=n.current.resourceEnd)&&void 0!==r?r:0,e.responseEnd),n.current.resourceRawDuration+=e.duration,n.current.resourceDuration=Math.max(n.current.resourceEnd-n.current.resourceStart,0),(0===e.transferSize||0!==e.transferSize&&0===e.duration||0!==e.transferSize&&0===e.encodedBodySize)&&(n.current.resourceCacheCount+=1),"blocking"===e.renderBlockingStatus&&(n.current.resourceBlockCount+=1,n.current.resourceBlockStart=Math.min(n.current.resourceBlockStart||e.startTime,e.startTime),n.current.resourceBlockEnd=Math.max(null!==(t=n.current.resourceBlockEnd)&&void 0!==t?t:0,e.responseEnd),n.current.resourceBlockRawDuration+=e.duration,n.current.resourceBlockDuration=Math.max(n.current.resourceBlockEnd-n.current.resourceBlockStart,0),o.current.resourceBlockList.add(e.name)),ee(e.name)&&(n.current.resourceEntryStart=Math.min(n.current.resourceEntryStart||e.startTime,e.startTime)),er(e.name)&&(n.current.resourceInitialSize+=e.encodedBodySize,n.current.resourceInitialCount+=1,n.current.resourceInitialStart=Math.min(n.current.resourceInitialStart||e.startTime,e.startTime),n.current.resourceInitialEnd=Math.max(null!==(i=n.current.resourceInitialEnd)&&void 0!==i?i:0,e.responseEnd),n.current.resourceInitialRawDuration+=e.duration,n.current.resourceInitialDuration=Math.max(n.current.resourceInitialEnd-n.current.resourceInitialStart,0))});let r=document.querySelectorAll("[rel=preload]"),t=document.querySelectorAll("[rel=prefetch]");n.current.resourcePreloadCount=r.length,n.current.resourcePrefetchCount=t.length},u=()=>{let e=document.querySelector('[data-id="pace-perf-timing"]');((null==e?void 0:e.textContent)?JSON.parse(e.textContent):[]).forEach(e=>{"fetcher"===e.entryType&&a.current.fetchers.set(e.name,e),"middleware"===e.entryType&&a.current.middlewares.set(e.name,e),"component"===e.entryType&&a.current.components.set(e.name,e)})},P=()=>{var e;(null!==(e=d.z.takeRecords())&&void 0!==e?e:[]).forEach(e=>{var r;e.detail&&"component"===e.detail.entryType&&m.current.set(e.name,e),(null==e?void 0:null===(r=e.detail)||void 0===r?void 0:r.entryType)!=="component"&&v.current.set(e.name,e)})},f=()=>{var e;let r=null===(e=performance.getEntriesByType("navigation"))||void 0===e?void 0:e[0];if(!!r)t.current.navigationType=r.type,t.current.domContentLoadedEventEnd=r.domContentLoadedEventEnd,t.current.domContentLoadedEventStart=r.domContentLoadedEventStart,t.current.domInteractive=r.domInteractive,t.current.loadEventStart=r.loadEventStart,t.current.fetchStart=r.fetchStart,t.current.redirectStart=r.redirectStart,t.current.domainLookupStart=r.domainLookupStart,t.current.domainLookupEnd=r.domainLookupEnd,t.current.responseEnd=r.responseEnd,t.current.domParseDuration=Math.max(r.domInteractive-r.responseEnd,0),t.current.htmlLoadDuration=Math.max(r.responseEnd-r.redirectStart,0),t.current.domReadyDuration=Math.max(r.domContentLoadedEventEnd-r.fetchStart,0),t.current.remainResourceLoadDuration=Math.max(r.loadEventStart-r.domContentLoadedEventEnd,0),t.current.deferJsDuration=Math.max(r.domContentLoadedEventStart-r.domInteractive,0),t.current.navigationDuration=Math.max(r.loadEventStart-r.redirectStart,0)},p=(0,s.a)(),g=()=>(0,h.g)()?(b(),u(),P(),f(),r.current.perfTiming=!0,{resource:(0,i._)({},n.current,o.current),middlewares:a.current.middlewares,fetchers:a.current.fetchers,component:m.current,navigation:t.current}):{},y=()=>{!r.current.perfTiming&&g()},x=()=>{if(!(0,h.g)())return{};y();let e={};return a.current.middlewares.forEach(r=>{var n,t;if(!!r.name)if(null===(n=r.detail)||void 0===n?void 0:n.markEnd){let{durationMark:n,startMark:o,endMark:i}=(0,h.e)(r.name,{entryType:"middleware"});e[o]=r.startTime,e[i]=r.endTime,e[n]=null!==(t=r.duration)&&void 0!==t?t:0}else e[r.name]=r.startTime}),a.current.components.forEach(r=>{var n,t;if(!r.name)return;let{durationMark:o,startMark:i,endMark:s}=(0,h.e)(r.name,{entryType:"component",renderStage:"ssr"});(null===(n=r.detail)||void 0===n?void 0:n.markEnd)?(e[i]=r.startTime,e[s]=r.endTime,e[o]=null!==(t=r.duration)&&void 0!==t?t:0):e[i]=r.startTime}),a.current.fetchers.forEach(r=>{var n;if(!r.name)return;let{durationMark:t,startMark:o,endMark:i}=(0,h.e)(r.name,{entryType:"fetcher"});e[o]=r.startTime,e[i]=r.endTime,e[t]=null!==(n=r.duration)&&void 0!==n?n:0}),m.current.forEach(r=>{if(!!r.name)"measure"===r.entryType?e[r.name]=r.duration:e[r.name]=r.startTime}),v.current.forEach(r=>{if(!!r.name)"measure"===r.entryType?e[r.name]=r.duration:e[r.name]=r.startTime}),Object.keys(n.current).forEach(r=>{e[q(r)]=n.current[r]}),Object.keys(t.current).forEach(r=>{e[q(r)]=t.current[r]}),e[q("resourceBlockList")]=Array.from(o.current.resourceBlockList),e};return(0,l.useEffect)(()=>{c()},[p.pathname]),(0,l.useEffect)(()=>{if(!(0,h.g)())return;let e=new PerformanceObserver(()=>{});return["navigation","resource"].forEach(r=>{try{e.observe({type:r,buffered:!0})}catch(e){}}),()=>{e.disconnect(),c()}},[]),{perfTiming:{get current(){return g()},get json(){return x()}},clear:c}}},776246:function(e,r,n){"use strict";n.d(r,{HA:function(){return l},YC:function(){return i},ZS:function(){return o},dH:function(){return t},gq:function(){return d},mZ:function(){return h},uK:function(){return s}});let t="data-preload-code",o="data-prefetch-code",i="to",s="preloadCode",l="prefetchCode",d="viewport",h="hover"},68154:function(e,r,n){"use strict";n.d(r,{g:function(){return o}}),n(112459),n(759943);var t=n(846430);function o(e){let r="string"==typeof e?(0,t.p)(e):e;return{pathname:r.pathname||"",search:r.search||"",hash:r.hash||""}}}}]);