PageSourceSearch

https://chatboxai.app/_next/static/chunks/1942-5f7845ded4150ffb.js

js chatboxai.app collected 2026-10-02 03:59:48 UTC 15,418 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="87475c0d-7fda-4eea-a436-244023386b98",e._sentryDebugIdIdentifier="sentry-dbid-87475c0d-7fda-4eea-a436-244023386b98")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1942],{11973:function(e,t,r){r.d(t,{X:function(){return s}});var n=r(11527),a=r(50959),o=r(67118),l=r(75848),i=r(97988);let s=a.forwardRef((e,t)=>{let{className:r,...a}=e;return(0,n.jsx)(o.fC,{ref:t,className:(0,i.cn)("grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-gray-300 shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary-600 data-[state=checked]:border-primary-600 data-[state=checked]:text-white hover:border-primary-400 transition-colors",r),...a,children:(0,n.jsx)(o.z$,{className:(0,i.cn)("grid place-content-center text-current"),children:(0,n.jsx)(l.Z,{className:"h-3 w-3",strokeWidth:3})})})});s.displayName=o.fC.displayName},16875:function(e,t,r){r.d(t,{Z:function(){return SurveyStep}});var n=r(11527),a=r(50959),o=r(59948),l=r(91367),i=r(14784),s=r(11973),u=r(73931);function OtherInput(e){let{value:t,onChange:r,placeholder:o,className:l,ariaLabel:i,maxLength:s=20}=e,u=(0,a.useCallback)(e=>{r(e.target.value.slice(0,s))},[s,r]),c=(0,a.useCallback)(e=>{let t=e.target.value;t.length>s&&r(t.slice(0,s))},[s,r]);return(0,n.jsx)("input",{type:"text",value:t,onChange:u,onCompositionEnd:c,placeholder:o,maxLength:s,"aria-label":i,className:null!=l?l:"mt-2 w-full px-3 py-2 text-sm border border-gray-200 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"})}var c=r(69730);function normalizeName(e){return e.normalize("NFKC").toLowerCase().replace(RegExp("[^\\p{L}\\p{N}]","gu"),"")}function canSearchCreators(e){let t=e.normalize("NFKC").trim();return t.length>=(/^[a-z\d]+$/i.test(t)?2:1)}function CreatorInput(e){let{candidates:t=[],platform:r,value:l,selectedId:i,rewardPoints:s,onChange:u}=e,{t:d,i18n:p}=(0,o.$G)(),m=(0,a.useId)(),[f,g]=(0,a.useState)(""),[h,b]=(0,a.useState)(!1),[x,y]=(0,a.useState)(!1),[v,C]=(0,a.useState)(-1);(0,a.useEffect)(()=>{if(x)return;let e=setTimeout(()=>{g(l),C(-1)},500);return()=>clearTimeout(e)},[l,x]);let w=f===l&&!x&&canSearchCreators(f),_=w?function(e,t,r){if(!canSearchCreators(r))return[];let n=r.trim(),a=normalizeName(n);return e.filter(e=>e.platform===t).map(e=>{var t,r;let o=e.platform_user_id===n,l=[null!==(t=e.normalized_creator_name)&&void 0!==t?t:e.creator_name,...null!==(r=e.normalized_aliases)&&void 0!==r?r:[]].map(normalizeName),i=3;return o||e.creator_name===n||a&&l.includes(a)?i=0:a&&l.some(e=>e.startsWith(a))?i=1:a&&l.some(e=>e.includes(a))&&(i=2),{candidate:e,accountMatch:o,rank:i}}).filter(e=>{let{rank:t}=e;return t<3}).sort((e,t)=>e.rank-t.rank)}(t,r,f):[],S=h&&!i&&w;function select(e){let t=_[e];t&&(u(t.accountMatch?t.candidate.platform_user_id:t.candidate.creator_name,t.candidate.id),C(-1))}let j=s?d("\uD83C\uDF81 Paste the correct creator name / ID to get {{points}} reward points.",{points:new Intl.NumberFormat(p.language,{notation:"compact"}).format(s)}):void 0;return(0,n.jsxs)("div",{className:"relative mt-2",children:[(0,n.jsx)("input",{id:m,role:"combobox","aria-autocomplete":"list","aria-expanded":S,"aria-controls":S?"".concat(m,"-list"):void 0,"aria-activedescendant":S&&v>=0?"".concat(m,"-").concat(v):void 0,"aria-label":d("Creator name or account ID (optional)"),autoComplete:"off",value:l,maxLength:255,placeholder:null!=j?j:d("Paste the full creator name or account ID"),onChange:e=>{b(!0),g(""),u(e.target.value,"")},onCompositionStart:()=>y(!0),onCompositionEnd:()=>y(!1),onFocus:()=>b(!0),onBlur:()=>b(!1),onKeyDown:e=>{if(!e.nativeEvent.isComposing){if(S&&_.length>0&&("ArrowDown"===e.key||"ArrowUp"===e.key)){e.preventDefault();let t="ArrowDown"===e.key?1:-1;C(e=>e<0?1===t?0:_.length-1:(e+t+_.length)%_.length)}else S&&"Enter"===e.key&&v>=0?(e.preventDefault(),select(v)):"Escape"===e.key&&b(!1)}},className:"h-10 w-full rounded-md border border-gray-200 bg-white px-3 py-2 pr-8 text-sm placeholder:text-gray-500 focus:outline-none focus:ring-2 focus:ring-blue-500 sm:h-9"}),(0,n.jsx)(c._Ve,{"aria-hidden":"true",className:"pointer-events-none absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400"}),S&&(0,n.jsxs)("ul",{id:"".concat(m,"-list"),role:"listbox","aria-label":d("Matching creators"),className:"absolute top-full z-10 mt-1 max-h-40 w-full overflow-y-auto rounded-lg border border-gray-200 bg-white shadow-lg",children:[_.map((e,t)=>{let{candidate:r}=e;return(0,n.jsx)("li",{id:"".concat(m,"-").concat(t),role:"option","aria-selected":t===v,onMouseDown:e=>e.preventDefault(),onClick:()=>select(t),className:"cursor-pointer px-3 py-3 text-center text-sm text-blue-600 hover:bg-blue-100 ".concat(t===v?"bg-blue-100":"bg-blue-50"),children:r.creator_name},r.id)}),0===_.length&&(0,n.jsx)("li",{role:"presentation",className:"px-3 py-3 text-sm text-gray-500",children:(0,n.jsx)("span",{role:"status",children:d("Creator not recognized. Please paste the correct name or ID.")})})]})]})}var d=r(73639);let p=new Set(["tiktok","youtube","instagram","x","rednote"]);function isCreatorAccountOption(e,t,r){if("q_channel"!==t.id)return!1;if(e.id===d.r6){var n;return!!(null===(n=e.creator_candidates)||void 0===n?void 0:n.some(e=>e.platform===r))}return e.id===d.Hk&&p.has(r)}function optionShowsInput(e,t,r){return"other"===r||isCreatorAccountOption(e,t,r)}function selectionShowsInput(e,t,r){return"single"===t.type?"string"==typeof r&&""!==r&&optionShowsInput(e,t,r):"multiple"===t.type&&Array.isArray(r)&&r.some(r=>optionShowsInput(e,t,r))}function inputPlaceholder(e,t,r,n){return n(isCreatorAccountOption(e,t,r)?"Specific creator name (optional)":"Please specify (optional)")}function inlineInputMaxLength(e,t,r){return isCreatorAccountOption(e,t,r)?50:t.max_length}
1function SurveyStep(e){let{config:t,isSubmitting:r,onSubmit:l,onCancel:s,title:c,description:p,submitLabel:m,cancelLabel:f,hideCancel:g,errorMessage:h,secondaryAction:b}=e,{t:x}=(0,o.$G)(),y=(0,a.useRef)(null),v=(0,a.useMemo)(()=>{let e={};for(let r of t.questions)e[r.id]="multiple"===r.type?[]:"";return e},[t.questions]),[C,w]=(0,a.useState)(v),[_,S]=(0,a.useState)({}),[j,N]=(0,a.useState)(""),[k,I]=(0,a.useState)(""),A=t.id===d.r6;(0,a.useEffect)(()=>{var e;let t=null===(e=y.current)||void 0===e?void 0:e.querySelector('button[role="radio"], input[type="text"], button[role="checkbox"]');null==t||t.focus({preventScroll:!0})},[]),(0,a.useEffect)(()=>{S(e=>{let r=!1,n={...e};for(let e of t.questions)n[e.id]&&!selectionShowsInput(t,e,C[e.id])&&(delete n[e.id],r=!0);return r?n:e})},[C,t]);let q=(0,a.useCallback)((e,t)=>{w(r=>({...r,[e]:t})),A&&"q_channel"===e&&(S(t=>({...t,[e]:""})),N(""),I(""))},[A]),F=(0,a.useCallback)((e,t,r)=>{w(n=>{var a;let o=null!==(a=n[e])&&void 0!==a?a:[];return r?o.includes(t)?n:{...n,[e]:[...o,t]}:{...n,[e]:o.filter(e=>e!==t)}})},[]),D=(0,a.useCallback)((e,t)=>{w(r=>({...r,[e]:t}))},[]),O=(0,a.useCallback)((e,t)=>{S(r=>({...r,[e]:t}))},[]),E=(0,a.useMemo)(()=>{for(let e of t.questions){if(!e.required)continue;let t=C[e.id];if("multiple"===e.type){if(!Array.isArray(t)||0===t.length)return!1}else if("string"!=typeof t||""===t.trim())return!1}return!0},[C,t.questions]),L=(0,a.useCallback)(()=>{var e,r;let n={};for(let e of t.questions){let a=C[e.id];if("multiple"===e.type?Array.isArray(a)&&a.length>0&&(n[e.id]=a):"string"==typeof a&&""!==a.trim()&&(n[e.id]=a),selectionShowsInput(t,e,a)){let t=(null!==(r=_[e.id])&&void 0!==r?r:"").trim();t&&(n["".concat(e.id,"_text")]=t)}}A&&j&&n.q_channel_text&&(n.q_channel_blogger_id=j),A&&k&&(null===(e=t.creator_candidates)||void 0===e?void 0:e.some(e=>e.platform===C.q_channel))&&(n.q_channel_raw_text=k),l(n)},[C,t,_,l,A,j,k]),z=!E||r;return(0,n.jsxs)("div",{ref:y,className:"flex flex-col flex-1 min-h-0",children:[(0,n.jsx)("div",{className:"mb-1 text-lg font-semibold text-gray-900",children:null!=c?c:x("Survey")}),(0,n.jsx)("div",{className:"mb-5 text-sm text-gray-500 leading-relaxed",children:null!=p?p:x("To help us improve your experience, please fill out this anonymous survey.")}),(0,n.jsx)("div",{className:"flex-1 min-h-0 overflow-y-auto pr-1 -mr-1 space-y-3 sm:space-y-4",children:(0,n.jsx)("fieldset",{disabled:r,className:"min-w-0 space-y-4",children:t.questions.map(e=>{var r,a;return(0,n.jsx)(QuestionField,{config:t,question:e,value:C[e.id],otherText:null!==(r=_[e.id])&&void 0!==r?r:"",t:x,onSingleChange:q,onMultiToggle:F,onTextChange:D,onOtherTextChange:O,creatorInput:A&&isCreatorAccountOption(t,e,String(C[e.id]))?(0,n.jsx)(CreatorInput,{candidates:t.creator_candidates,platform:String(C[e.id]),value:null!==(a=_[e.id])&&void 0!==a?a:"",selectedId:j,rewardPoints:t.blogger_reward&&Date.parse(t.blogger_reward.expires_at)>Date.now()?t.blogger_reward.token_limit:void 0,onChange:(t,r)=>{O(e.id,t),N(r),r||I(t)}},String(C[e.id])):void 0},e.id)})})}),h&&(0,n.jsx)("p",{role:"alert",className:"mt-3 text-sm text-red-600",children:h}),(0,n.jsxs)(i.k,{justify:"end",gap:"2",wrap:"wrap",className:"flex-shrink-0 bg-white pt-3 mt-2 border-t border-gray-100",children:[!g&&(0,n.jsx)("button",{type:"button",onClick:s,disabled:r,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-gray-100 hover:bg-gray-200 rounded-lg disabled:opacity-60",children:null!=f?f:x("Cancel")}),b&&(0,n.jsx)("button",{type:"button",onClick:b.onClick,disabled:r||b.disabled,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-gray-100 hover:bg-gray-200 rounded-lg disabled:opacity-60",children:b.label}),(0,n.jsx)("button",{type:"button",onClick:L,disabled:z,className:(0,u.q)("px-4 py-2.5 text-sm font-medium rounded-lg",z?"bg-gray-200 text-gray-400 cursor-not-allowed":"bg-blue-600 text-white hover:bg-blue-700"),children:r?x("Submitting..."):null!=m?m:x("Get Free Access")})]})]})}function QuestionField(e){var t,r;let{config:a,question:o,value:l,otherText:i,t:s,onSingleChange:u,onMultiToggle:c,onTextChange:d,onOtherTextChange:p,creatorInput:m}=e;if("text"===o.type){let e="string"==typeof l?l:"",t=o.max_length;return t&&t>80?(0,n.jsx)(FieldGroup,{label:o.title,children:(0,n.jsx)("textarea",{value:e,onCh
1ange:e=>d(o.id,e.target.value.slice(0,t)),onCompositionEnd:e=>{let r=e.currentTarget.value;r.length>t&&d(o.id,r.slice(0,t))},maxLength:t,"aria-label":o.title,rows:3,className:"w-full resize-none px-3 py-2 text-sm border border-gray-200 rounded-md focus:outline-none focus:ring-2 focus:ring-inset focus:ring-blue-500 focus:border-transparent"})}):(0,n.jsx)(FieldGroup,{label:o.title,children:(0,n.jsx)(OtherInput,{value:e,onChange:e=>d(o.id,e),ariaLabel:o.title,maxLength:t,className:"w-full px-3 py-2 text-sm border border-gray-200 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"})})}if("multiple"===o.type){let e=Array.isArray(l)?l:[];return(0,n.jsx)(FieldGroup,{label:"q_ai_scenarios"===o.id?s("AI usage scenarios (multiple choice)"):o.title,children:(0,n.jsx)("div",{className:"space-y-1.5",children:(null!==(t=o.options)&&void 0!==t?t:[]).map(t=>{let r=e.includes(t.id),l=r&&optionShowsInput(a,o,t.id);return(0,n.jsx)(CheckboxOption,{checked:r,onCheckedChange:e=>c(o.id,t.id,e),label:t.label,extra:l?(0,n.jsx)(OtherInput,{value:i,onChange:e=>p(o.id,e),placeholder:inputPlaceholder(a,o,t.id,s),ariaLabel:"".concat(o.title," — ").concat(t.label),maxLength:inlineInputMaxLength(a,o,t.id),className:"mt-2 w-full px-3 py-2 text-sm border border-gray-200 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"}):null},t.id)})})})}let f="string"==typeof l?l:"";return(0,n.jsx)(RadioGroupField,{name:o.id,label:o.title,value:f,onValueChange:e=>u(o.id,e),children:(null!==(r=o.options)&&void 0!==r?r:[]).map(e=>{let t=f===e.id&&optionShowsInput(a,o,e.id);return(0,n.jsx)(RadioOption,{value:e.id,label:e.label,extra:t?null!=m?m:(0,n.jsx)(OtherInput,{value:i,onChange:e=>p(o.id,e),placeholder:inputPlaceholder(a,o,e.id,s),ariaLabel:"".concat(o.title," — ").concat(e.label),maxLength:inlineInputMaxLength(a,o,e.id),className:"mt-2 w-full px-3 py-2 text-sm border border-gray-200 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"}):null},e.id)})})}function FieldGroup(e){let{label:t,children:r}=e;return(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"mb-1.5 text-[13px] sm:text-sm font-semibold text-gray-900",children:t}),r]})}let m=a.createContext("radio");function RadioGroupField(e){let{name:t,label:r,value:a,onValueChange:o,children:i}=e;return(0,n.jsx)(FieldGroup,{label:r,children:(0,n.jsx)(l.fC,{"aria-label":r,value:null!=a?a:"",onValueChange:o,className:"space-y-1.5",children:(0,n.jsx)(m.Provider,{value:t,children:i})})})}function RadioOption(e){let{value:t,label:r,extra:o}=e,i=a.useContext(m),s="radio-".concat(i,"-").concat(t);return(0,n.jsxs)("div",{className:"flex flex-col gap-0 px-3 py-2 border border-gray-200 rounded-md hover:border-gray-300 transition-colors",onClick:e=>e.stopPropagation(),children:[(0,n.jsxs)("label",{htmlFor:s,className:"flex items-center gap-2.5 cursor-pointer",children:[(0,n.jsx)(l.ck,{id:s,value:t,className:"w-4 h-4 rounded-full border border-gray-300 bg-white outline-none focus-visible:ring-2 focus-visible:ring-blue-500 data-[state=checked]:border-blue-600 flex items-center justify-center flex-shrink-0",children:(0,n.jsx)(l.z$,{className:"w-2 h-2 rounded-full bg-blue-600"})}),(0,n.jsx)("span",{className:"text-[13px] sm:text-sm text-gray-900",children:r})]}),o]})}function CheckboxOption(e){let{checked:t,onCheckedChange:r,label:a,extra:o}=e;return(0,n.jsxs)("div",{className:"flex flex-col gap-0 px-3 py-2 border border-gray-200 rounded-md hover:border-gray-300 transition-colors",onClick:e=>e.stopPropagation(),children:[(0,n.jsxs)("label",{className:"flex items-center gap-2.5 cursor-pointer",children:[(0,n.jsx)(s.X,{checked:t,onCheckedChange:e=>r(!0===e),className:"flex-shrink-0"}),(0,n.jsx)("span",{className:"text-[13px] sm:text-sm text-gray-900",children:a})]}),o]})}},47329:function(e,t,r){r.d(t,{C:function(){return useSurveyConfig}});var n=r(89069),a=r(73639);let o=["surveyConfig"];function useSurveyConfig(e,t){return(0,n.a)({queryKey:[...o,null!=t?t:"default"],queryFn:()=>(0,a.iN)(t),enabled:e,staleTime:1/0,retry:1,refetchOnWindowFocus:!1})}},73639:function(e,t,r){r.d(t,{Hk:function(){return o},UO:function(){return getFreeClaimSurveyId},iN:function(){return getSurveyConfig},iW:function(){return l},r6:function(){return a},xc:function(){return submitSurvey},zs:function(){return getSurveyStatus}});var n=r(56840);let a="free_claim_cn_survey",o="free_claim_overseas_survey",l="after_buy_survey";function getFreeClaimSurveyId(e){return e?a:o}function getSurveyApiClient(){return localStorage.getItem(n.Lx.ACCESS_TOKEN_KEY)?n.ZP:n.uv}
1let getSurveyConfig=async e=>{let t=await n.uv.get("/survey/config",{params:e?{survey_id:e}:void 0});return t.data},getSurveyStatus=async e=>{let t=await getSurveyApiClient().get("/survey/status",{params:{survey_id:e}});return t.data},submitSurvey=async e=>{let t=await getSurveyApiClient().post("/survey/submit",e);return t.data}}}]);

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.