@choiceform/os-client-core 3.6.57 → 3.6.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +12 -0
- package/dist/core.js +1 -1
- package/dist/infer.js +1 -1
- package/dist/support/atcp.js +1 -1
- package/dist/web-core.js +1 -1
- package/index.d.ts +174 -185
- package/package.json +17 -12
package/dist/core.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
(()=>{var t={9141:(t,e,n)=>{"use strict";var i=n(9591),r=n(9575),o=":CF_PD:",a={inflateBase64:function(t){return t=r.Base64.atob(t),(0,i.inflate)(t,{to:"string"})},deflateBase64:function(t){return t=(0,i.deflate)(t,{to:"string"}),r.Base64.btoa(t)},inflatePrefix:function(t){return t=t.substr(o.length),(0,i.inflate)(t,{to:"string"})},deflatePrefix:function(t){return t=(0,i.deflate)(t,{to:"string"}),o+t},langTable:[{locale:"ar_sa",value:"العربية",bdCode:"ara",direction:"rtl",comment:"阿拉伯语"},{locale:"az_az",value:"azərbaycan",bdCode:"aze",comment:"阿塞拜疆语"},{locale:"be_by",value:"беларуская",bdCode:"bel",comment:"白俄罗斯语"},{locale:"bg_bg",value:"български",bdCode:"bul",comment:"保加利亚语"},{locale:"bn_bd",value:"বাংলা",bdCode:"ben",comment:"孟加拉语"},{locale:"cs_cz",value:"čeština",bdCode:"cs",comment:"捷克语"},{locale:"da_dk",value:"dansk",bdCode:"dan",comment:"丹麦语"},{locale:"de_de",value:"Deutsch",bdCode:"de",comment:"德语"},{locale:"el_gr",value:"Ελληνικά",bdCode:"el",comment:"希腊语"},{locale:"en_us",value:"English",bdCode:"en",comment:"英语"},{locale:"es_es",value:"español",bdCode:"spa",comment:"西班牙语"},{locale:"et_ee",value:"eesti",bdCode:"est",comment:"爱沙尼亚语"},{locale:"fa_ir",value:"فارسی",bdCode:"per",direction:"rtl",comment:"波斯语"},{locale:"fi_fi",value:"suomi",bdCode:"fin",comment:"芬兰语"},{locale:"fil_ph",value:"Filipino",bdCode:"fil",comment:"菲律宾语"},{locale:"fr_fr",value:"français",bdCode:"fra",comment:"法语"},{locale:"he_il",value:"עברית",bdCode:"heb",direction:"rtl",comment:"希伯来语"},{locale:"hi_in",value:"हिन्दी",bdCode:"hi",comment:"印地语"},{locale:"hu_hu",value:"magyar",bdCode:"hu",comment:"匈牙利语"},{locale:"hy_am",value:"հայերեն",bdCode:"arm",comment:"亚美尼亚语"},{locale:"id_id",value:"Indonesia",comment:"印度尼西亚语"},{locale:"it_it",value:"italiano",bdCode:"it",comment:"意大利语"},{locale:"ja_jp",value:"日本語",bdCode:"jp",comment:"日本语"},{locale:"kk_kz",value:"қазақ тілі",comment:"哈萨克语"},{locale:"km_kh",value:"ខ្មែរ",bdCode:"hkm",comment:"高棉语"},{locale:"ko_kr",value:"한국어",bdCode:"kor",comment:"韩语"},{locale:"ky_kg",value:"кыргызча",comment:"柯尔克孜语"},{locale:"lo_la",value:"ລາວ",bdCode:"lao",comment:"老挝语"},{locale:"mg_mg",value:"Malagasy",bdCode:"mg",comment:"马达加斯加语"},{locale:"mn_mn",value:"монгол",comment:"蒙古语"},{locale:"my_mm",value:"မြန်မာ",bdCode:"bur",comment:"缅甸语"},{locale:"ne_np",value:"नेपाली",bdCode:"nep",comment:"尼泊尔语"},{locale:"nl_nl",value:"Nederlands",bdCode:"nl",comment:"荷兰语"},{locale:"pl_pl",value:"polski",bdCode:"pl",comment:"波兰语"},{locale:"ps_af",value:"پښتو",bdCode:"pus",comment:"普什图语",direction:"rtl"},{locale:"pt_pt",value:"português",bdCode:"pt",comment:"葡萄牙语"},{locale:"ro_ro",value:"română",bdCode:"rom",comment:"罗马尼亚语"},{locale:"ru_ru",value:"русский",bdCode:"ru",comment:"俄语"},{locale:"rw_rw",value:"Kinyarwanda",bdCode:"kin",comment:"卢旺达语"},{locale:"so_so",value:"Soomaali",bdCode:"som",comment:"索马里语"},{locale:"sr_rs",value:"српски",bdCode:"srp",comment:"塞尔维亚语"},{locale:"sv_se",value:"svenska",bdCode:"swe",comment:"瑞典语"},{locale:"sw_ke",value:"Kiswahili",bdCode:"swa",comment:"斯瓦希里语"},{locale:"tg_tj",value:"тоҷикӣ",bdCode:"tgk",comment:"塔吉克语"},{locale:"th_th",value:"ไทย",bdCode:"th",comment:"泰语"},{locale:"tr_tr",value:"Türkçe",bdCode:"tr",comment:"土耳其语"},{locale:"uk_ua",value:"українська",bdCode:"ukr",comment:"乌克兰语"},{locale:"ur_pk",value:"اردو",bdCode:"urd",direction:"rtl",comment:"乌尔都语"},{locale:"uz_uz",value:"ўзбекча",comment:"乌兹别克语"},{locale:"zh_cn",bdCode:"zh",value:"简体中文",comment:"中文"},{locale:"zh_tw",bdCode:"cht",value:"繁體中文",comment:"中文"},{locale:"vi_vn",value:"Tiếng Việt",bdCode:"vie",comment:"越南语"}]};e.Z=a},5159:(t,e,n)=>{"use strict";n.d(e,{bn:()=>o,BH:()=>u,zH:()=>s,tV:()=>a,i_:()=>c});const i={zh_cn:{upload:{name:"上传",amountLimit:"最少上传{min}个文件,最多上传{max}个文件",amountLimitMin:"最少上传{min}个文件",amountLimitMax:"最多上传{max}个文件",fileSizeLimit:"文件大小不能超过{size}。",invalidImage:"图片已破损或无法识别。",uploadRequired:"上传项必须完成上传"},verify:{name:"验证",invalidFailed:"输入内容无效,验证失败。",failed:"验证失败。",sendSuccess:"短信发送成功",sendFailed:"短信发送失败,请稍后再试.",tooFrequent:"操作太过频繁,请稍后再试。"},region:{name:"地域"},locate:{name:"定位",required:"必须定位后才能继续。"},weight:{name:"权重",total:"权重总值{total}",relax:"各项打分之和可以小于权重总值",strict:"各项打分之和必须等于权重总值",totalLimitMin:"各项分值总和不能小于{min}分"},previewBookmark:{existed:"该书签已经存在",importSuccess:"导入成功",importFailure:"导入失败",importFailed:"导入书签失败:"},previewTime:{uploadSuccess:"上传回复时间成功",uploadFailed:"上传回复时间失败"},lottery:{congratulation:"恭喜你",pity:"很遗憾",goal:"获得了",fail:"没有中奖,谢谢您的参与!"},icon:{name:"图标题"},imageSelect:{name:"图片选择题"},site:{name:"范围定位题"},hotSpot:{name:"图片框选题",tips:"请在图片上选择你感兴趣的区域。"},heatMap:{name:"图片热力题"},maxDiff:{name:"MaxDiff问题",all:"请完成所有任务的作答"},cascade:{name:"级联菜单",selectSome:"选择{amount}项",selectBetween:"选择{min}到{max}项"},menu:{name:"菜单",clickToSelect:"请点击选择...",required:"{text}: 列表中必须选择。",inputRule:"{text}:{rule}",inputReq:"{text}: 必须填写内容。",requiredBetween:"{text}: 列表中必须选择{min}到{max}项。",topList:"顶层列表",listItem:"列表项",limitMax:"{text}:最多只能选中{max}项"},select:{single:"单选",multi:"多选",limitBetween:"最少选择{min}项,最多选择{max}项。",limitMax:"最多选择{max}项",limitMin:"最少选择{min}项"},slideRate:{name:"连续评价题"},fill:{name:"填空 ",itemsLimit:"请输入{min}到{max}个项目",charsLimit:"请输入{min}到{max}个字",inputDecimal:"请输入小数",inputDecimalDigits:"请输入小数位数为{scale}的数字",inputInteger:"请输入整数",valueLimit:"请输入{min}到{max}之间的数值",needEmail:"请输入有效的Email",needPhoneNumber:"请输入有效的手机号码",needZipCode:"请输入有效的邮编。",needUrl:"请输入有效的网址。",itemInputRequired:"该项必须填写。",inputRequired:"输入项中必须完成填写",inputLimitMin:"至少输入{min}项。",onlyAllow:"仅限:{text}",number:"数字",alphabet:"英文字母",chinese:"中文",atcpLabelOnly:"只能输入提示的标签"},rank:{name:"排序",limitMin:"必须排出前{min}项的顺序。",limitAll:"必须排出所有选项的顺序。",tips:"将项目拖放到您喜欢的顺序中。"},mark:{graph:"打分",value:"打分"},matrix:{single:"单选矩阵",multi:"多选矩阵",multiRow:"行多选矩阵",multiCol:"列多选矩阵",singleRow:"行单选矩阵",singleCol:"列单选矩阵",singleRowCol:"行列单选矩阵",eachRowOne:"每行选择一项",eachColOne:"每列选择一项",eachRowColOne:"每行每列选择一项",rowLimitBetween:"每行最少选择{min}项,最多选择{max}项。",colLimitBetween:"每列最少选择{min}项,最多选择{max}项。",rowLimitMax:"每行最多选择{max}项。",colLimitMax:"每列最多选择{max}项。",rowLimitMin:"每行最少选择{min}项。",colLimitMin:"每列最少选择{min}项。"},preview:{noMessage:"预览模式下不提供验证服务",noLink:"预览模式不进行链接跳转。"},video:{watchAll:"请认真观看完视频。"},reward:{get:"领取奖励",yuan:"元",weChatName:"微信名称示例"},global:{invalidReward:"分享的链接无法获取奖励",upgrade:"数据版本发生变化,到设计端重新保存后才能继续访问。",timeOver:"问卷回复时长超时,未能按时完成答题!",answerRequired:"必答题,答题后继续。",antiAgain:"不允许再次回复",authFailed:"授权失败",downloadError:"下载数据失败,请确保网络良好后再重试。",start:"开始",next:"下一题",previous:"上一题",go:"前往",done:"完成",notTarget:"抱歉,您暂时不符合当前调查的条件。我们真诚地感谢您的参与,并期望您继续参与我们的在线调查活动!",backTest:"返回测试",invalidUrl:"不是有效问卷地址",tryAgain:"操作失败,请稍后重试。",clientError:"问卷指定的调研终端与本终端不一致,请确认你的链接地址是否正确。"},memory:{title:"记录恢复",message:"检测到未完成的回复记录,是否恢复记录?",sure:"恢复记录",deny:"重新开始"},langResume:{title:"正在切换语言,请稍候..."},backEnd:{response_overflow:"抱歉,当前调查问卷的收集器已经达到最大回复数。我们真诚地感谢您的参与,并期望您继续参与我们的在线调查活动!",collector_full:"抱歉,当前调查问卷的收集器已经达到最大回复数。我们真诚地感谢您的参与,并期望您继续参与我们的在线调查活动!",survey_not_exist:"抱歉,这个调查可能已经关闭、重命名或删除。",response_status_error:"操作被拒绝",quota_not_match:"配额失败",internal_server_error:"服务器未知错误",survey_offline:"本次调查可能已经结束并关闭,感谢您的参与。",diagram_has_errors:"部分逻辑存在错误,请修正后再发布调查问卷。",interviewee_missing_error:"渠道不匹配",interviewee_invalid_error:"该渠道下不允许回复,请使用微信打开链接。",multi_responses_error:"您已参与过本次调研活动,无法再次回复。感谢您的参与。",api_rate_limit_error:"API 连接过于频繁",response_already_examined:"抱歉,您不符合这项调查的条件。我们真诚地感谢您为此付出的时间,并期望您继续参与我们的在线调查活动!",question_missing_error:"没找到验证对象",gen_validation_error:"获取验证码图片失败",invalid_phone_number_error:"提供的电话号码格式不正确。",sms_gateway_error:"短信发送失败",invalid_code_error:"输入内容无效,验证失败。",quota_full:"抱歉,这个调查问卷的配额已经达到最大设定数。我们真诚地感谢您的参与,并期望您继续参与我们的在线调查活动!",reward_type_error:"无效的奖励类型",already_been_verificated:"奖品已核销,不可再次使用",red_envelope_duplicated:"您已参与过本活动,不能重复领取。感谢您的参与。",red_envelope_expired:"奖励码超时过期。",red_envelope_received_by_yourself:"不能重复扫码领取奖励。",red_envelope_received_by_others:"不能扫取他人奖励码。",red_envelope_intercepted:"微信账号可能存在异常导致红包发放操作失败。",red_envelope_send_error:"微信账号可能存在异常。",oauth_error:"授权失败"}},en_us:{upload:{name:"Upload",amountLimit:"Upload minimum {min, plural, =0 {no pictures} one {# picture} other {# pictures} } and maximum {max, plural, =0 {no pictures} one {# picture} other {# pictures} }",amountLimitMin:"Upload minimum {min, plural, =0 {no pictures} one {# picture} other {# pictures} }",amountLimitMax:"Upload maximum {max, plural, =0 {no pictures} one {# picture} other {# pictures} }",fileSizeLimit:"File size cannot exceed {size}。",invalidImage:"The picture is damaged or unrecognized.",uploadRequired:"Upload items must be completed"},verify:{name:"Verification",invalidFailed:"Invalid input",failed:"verification failed",sendSuccess:"Successful message sending",sendFailed:"Message sending failed, please try again later",tooFrequent:"The operation is too frequent, please try again later"},region:{name:"District"},locate:{name:"Location",required:"Continue after positioned"},weight:{name:"Weight Slider",total:"Total Weight: {total}",relax:"Sum of scores may be less than the total weight",strict:"Sum of scores must be equal to the total weight",totalLimitMin:"Sum of scores should not be less than {min, plural, =0 { no points} one {# point} other {# points} }"},previewBookmark:{existed:"This bookmark already exists",importFailed:"Failed to import bookmark:",importSuccess:"Import successfully",importFailure:"Import failed"},previewTime:{uploadSuccess:"Upload success",uploadFailed:"Upload failed"},lottery:{congratulation:"Congratulations!",pity:"It's a pity",goal:"You got it",fail:"Did not win. Thanks for your participation!"},icon:{name:"Icon"},imageSelect:{name:"Image Choice"},site:{name:"Site Location"},hotSpot:{name:"Picture Selection",tips:"Please select the picture of your choice"},heatMap:{name:"Heat Map"},maxDiff:{name:"MaxDiff question",all:"Please complete all tasks"},cascade:{name:"Cascade Menu",selectSome:"Please select {amount, plural, =0 {no options} one {# option} other {# options} }",selectBetween:"Please select minimum {min, plural, =0 {no options} one {# option} other {# options} } maximum {max, plural, =0 {no options} one {# option} other {# options} }"},menu:{name:"Dropdown menu",clickToSelect:"Click to select...",required:"{text}: Requires selection",inputRule:"{text}:{rule}",inputReq:"{text}: Requires input",requiredBetween:"{text}: Please select minimum {min, plural, =0 {no items} one {# item} other {# items} } maximum {max, plural, =0 {no items} one {# item} other {# items} }",topList:"Top list",listItem:"List item",limitMax:"{text}:Please select maximum {max, plural, =0 {no items} one {# item} other {# items} }"},select:{single:"Single Answer",multi:"Multiple Answer",limitBetween:" Please answer minimum {min, plural, one {# choice} other {# choices} } maximum {max, plural, one {# choice} other {# choices} }",limitMax:"Maximum selection {max, plural, one {# choice may be answered.} other {# choices may be answered.} }",limitMin:"Minimum selection {min, plural, one {# choice.} other {# choices.} }"},slideRate:{name:"Slide Rating"},fill:{name:"Text Entry",itemsLimit:"Please enter item between {min} and {max}.",charsLimit:"Please enter text between {min} and {max}.",inputDecimal:"Please enter decimal",inputDecimalDigits:"Please enter decimal number with {scale} digits",inputInteger:"Please enter integer",valueLimit:"Please enter a number between {min} and {max}.",needEmail:"Please enter a valid email address.",needPhoneNumber:"Please enter a valid mobile phone number.",needZipCode:"Please enter a valid postcode.",needUrl:"Please enter valid a URL address.",itemInputRequired:"Please answer this question",inputRequired:"Answer required",inputLimitMin:"Please enter at least {min, plural, one {# item} other {# items} }",onlyAllow:"Please enter a valid {text}",number:"number",alphabet:"alphabet",chinese:"chinese character",atcpLabelOnly:"Can only input pop up label"},rank:{name:"Ranking",limitMin:"Please rank at least {min, plural, one {# choice.} other {# choices.} }",limitAll:"Please rank all options",tips:"Drag and drop items into you preferred order."},mark:{graph:"Rating",value:"Slider"},matrix:{single:"Single Choice Matrix",multi:"Multiple Choice Matrix",multiRow:"Multiple Row Choice Matrix",multiCol:"Multiple Column Choice Matrix",singleRow:"Single Row Choice Matrix",singleCol:"Single Column Choice Matrix",singleRowCol:"Single Row Column Choice Matrix",eachRowOne:"Must select one option in each row",eachColOne:"Must select one option in each column",eachRowColOne:"Must select one option in each row & column",rowLimitBetween:"Select minimum {min, plural, =0 {no options} one {# option} other {# options} } maximum {max, plural, =0 {no options} one {# option} other {# options} } in each row",colLimitBetween:"Select minimum {min, plural, =0 {no options} one {# option} other {# options} } maximum {max, plural, =0 {no options} one {# option} other {# options} } in each column",rowLimitMax:"Select maximum {max, plural, =0 {no options} one {# option} other {# options} } in each row",colLimitMax:"Select maximum {max, plural, =0 {no options} one {# option} other {# options} } in each column",rowLimitMin:"Select minimum {min, plural, =0 {no options} one {# option} other {# options} } in each row",colLimitMin:"Select minimum {min, plural, =0 {no options} one {# option} other {# options} } in each column"},preview:{noMessage:"No message service in preview mode",noLink:"No linking in preview mode"},video:{watchAll:"Please watch the video completely"},reward:{get:"Get Reward",yuan:"yuan",weChatName:"WeChat demo name"},global:{invalidReward:"Can not access gift via shared link",upgrade:"Data version changed, can continue to access it only after the design side saves it again.",timeOver:"Exceeded time limit",answerRequired:"This question requires an answer.",antiAgain:"You have already taken this survey.",authFailed:"Authorization failed",downloadError:"Download data failed, please make sure the network is good and try again.",start:"Start",next:"Next",previous:"Previous",go:"Proceed",done:"Done",notTarget:"Sorry, you do not match the criteria for this survey. We sincerely thank you and appreciate your time, look forward to your future participation in our online surveys!",backTest:"Back Test",invalidUrl:"Invalid survey url",tryAgain:"Operation failed,try again later.",clientError:"The survey terminal specified in the questionnaire is inconsistent with this terminal. Please confirm whether your link address is correct."},memory:{title:"Recover",message:"Previous unfinished answer, Do we recover it?",sure:"Recover",deny:"Start new"},langResume:{title:"Switching language, please wait."},backEnd:{response_overflow:"Sorry, this survey has reached maximum number of responses. We sincerely thank you and appreciate your time and look forward to your future participation in our online surveys!",collector_full:"Sorry, this survey has reached maximum number of responses. We sincerely thank you and appreciate your time and look forward to your future participation in our online surveys!",survey_not_exist:"Sorry, this survey may already been closed, you can renamed or delete it.",response_status_error:"Submition has been declined. Please try again.",quota_not_match:"quota_not_match",internal_server_error:"An error occurred with the server.",survey_offline:"Sorry, this survey may already be closed. Thanks for your participation",diagram_has_errors:"Some parts have logic error. please correct the error and launch the survey again.",interviewee_missing_error:"Channel mismatch",interviewee_invalid_error:"Reply is not allowed under this channel, please open this link in wechat app.",multi_responses_error:"You have already taken this survey. Thanks for your participation.",api_rate_limit_error:"Pinging the API too often.",response_already_examined:"Sorry, you do not match the criteria for this survey. We sincerely thank you, appreciate your time and look forward to your future participation in our online surveys!",question_missing_error:"Validation object not found",gen_validation_error:"Failed to get the verification code picture",invalid_phone_number_error:"The format of the phone number provided is incorrect.",sms_gateway_error:"SMS could not be sent",invalid_code_error:"Invalid data has been entered into the form, the validation fails.",quota_full:"Sorry, this survey has reached the maximum number of responses. We sincerely thank you, appreciate your time and look forward to your future participation in our online surveys!",reward_type_error:"Invalid reward type",already_been_verificated:"The reward has been verificated and cannot be used again",red_envelope_duplicated:"You have participated in this activity and cannot claim it again. Thank you for your participation.",red_envelope_expired:"Reward Code has expired.",red_envelope_received_by_yourself:"You can't scan the code repeatedly to get rewards.",red_envelope_received_by_others:"You cannot scan other people's reward codes.",red_envelope_intercepted:"There may be irregularity in the wechat account, resulting in the failure of red envelope issuance.",red_envelope_send_error:"Wechat account may be abnormal.",oauth_error:"failed to authorize"}}};let r="en_us",o=i[r];function a(t){t&&(Object.keys(t).forEach((e=>{i[e.toLowerCase()]=t[e]})),o=i[r])}function s(){return{...i}}function c(t){r=t.toLowerCase(),o=i[r]||i.en_us}function u(){return r}},3768:(t,e,n)=>{"use strict";n.d(e,{F2:()=>I,JH:()=>k,gS:()=>O,py:()=>x,zJ:()=>T}),n(5306);var i=n(1128),r=n(9481),o=n(9310),a=n(2812),s=n(3656),c=n(6935),u=n(9564),l=n(1881),d=n(6539),f=n(6064),p=n(3877);const g=["select","icon_mark","value_mark","upload","menu","slide_rate"],m=["fill","verify"];function h(t){const{type:e}=t;return"region"===e?"predef":e}function v(t,e){const{origin:n}=e;let i;if(e.isOtherOpt)i=n.optionType;else if(!0===n.useComment)i="option_comment";else{const{type:e}=t;i="region"===e?"predef_region":g.includes(e)?"option":m.includes(e)?"comment":e}return i}function y(t,e){const n=function(t){const{loop:e}=t;let n;return e&&(n=e.replacements.map((t=>({node_id:t.loopNodeId.toLowerCase(),index:t.index,option_id:t.uuid.toLowerCase()})))),n}(t),{nodeUuid:i}=t,r=e&&e(t);return{type:h(t),node_id:i.toLowerCase(),items:r,start_time:t.startTime,cost_time:Math.round(t.costTime||0),loop_ctxs:n}}function _(t,e){const n=(0,i.Lb)(e),r=(0,p.Df)(e,t),o={value:(0,f.O2)(r)?"":r,other:!!e.isOtherOpt,type:v(t,e)};if(o.option_id=e.uuid.toLowerCase(),(0,s.is)(e,"xid"in e)){const{optionY:t,optionX:n,xid:i,yid:r}=e;o.row_option_id=r.toLowerCase(),o.col_option_id=i.toLowerCase(),o.row_content=(0,c.mP)(t.text),o.col_content=(0,c.mP)(n.text),o.content=o.col_content+"-"+o.row_content}else o.content=n||(0,c.mP)(e.text);return e.visible||(o.hidden=!0),o}function w(t){return(0,i.Kn)(t).reduce(((e,n)=>{var i;return(n.selected||(0,p.Zy)(n,t)||void 0===n.selected&&!0===(null===(i=null==n?void 0:n.__cache)||void 0===i?void 0:i.selected))&&e.push(_(t,n)),e}),[])}const b={};function x(t){const e=b[t.type];return e&&e(t)}function T(t){return"object"==typeof t.value?JSON.stringify(t.value):t.value}function I(t,e){return"all"===e||(t?"check"===e:"normal"===e)}async function O(t,e="all",n="committed_url",i=!1){const a=function(t,e){const n=[];return t.renderList.forEach((t=>{if(!I(t.checkMode,e))return;if("data"===t.type)return;const i=x(t);i&&n.push(i)})),n}(t,e),c=i?void 0:await(0,l.Xs)(t,n),u={backend_request_params:await(0,l.u)(t),webhook_params:c,answers:a,var_map_info:(0,o.Zt)(t,e),options_display_info:(0,r.De)(t,e),query_params:(0,d.ZI)(),time_consuming:Math.ceil((Date.now()-t.startTime)/1e3),status:t.responseStatus};return(0,s.Tm)(u.answers,((t,e)=>{"string"==typeof t[e]&&(t[e]=t[e].replace(/,/g,",").replace(/[\r\n]/g," "))})),u}function k(t){switch(t.type){case"verify":return!!t.code;case"location":case"region":case"area":return!!t.value;case"describe":case"lottery":case"end":return!0;default:return(0,i.eK)(t)||(0,i.My)(t)}}b.select=b.select_image=b.menu=b.select_icon=b.hot_spot=t=>{const e=y(t,w);if((0,u.Ir)(t.origin)&&e.items){let t=!1,n=!1;e.items.forEach((e=>{"comment"!==e.type&&(e.hidden?t=!0:n=!0),delete e.hidden})),t&&n&&(e.items=e.items.filter((t=>!t.hidden)))}return e},b.cascade=b.icon_mark=b.value_mark=b.matrix=b.weight=b.slide_rate=b.sequence=b.upload=b.heat_map=b.fill=b.max_diff=t=>{const e=y(t,w);return e.items&&e.items.forEach((t=>{delete t.hidden})),e},b.location=t=>{const e=y(t,(e=>{const n=(0,i.Kn)(t).find((t=>t.selected));return n?[_(e,n)]:[]})),{position:n,indexes:r}=t;return n&&(n.indexes=r,e.location=n),e},b.region=t=>{const e=b.location(t);return e.region=(0,a.BT)(t.value),e},b.area=t=>b.location(t),b.data=t=>y(t,(t=>(0,i.Kn)(t).reduce(((e,n)=>(n.selected&&e.push(_(t,n)),e)),[]))),b.verify=t=>{const e=y(t),{phoneNumber:n,validateType:i,code:r}=t;return"sms"===i&&(e.phone_num=n),e.code=r,e},b.end=t=>({type:h(t),node_id:t.nodeUuid.toLowerCase(),start_time:t.startTime,cost_time:0}),b.logic=t=>{const e=y(t);return e.logic_result=t.logicResult,e}},9192:(t,e,n)=>{"use strict";n.d(e,{h:()=>u,t:()=>p}),n(2707),n(3948);var i=n(1128),r=n(45),o=n(3151),a=n(9564),s=n(4248),c=n(3877);function u(){return{value:"",miniValue:"",filePath:"",progress:0,isImage:!1,fileType:"",fileName:"",fileLimits:[]}}function l(t){(0,s.Pg)(t,{selected:!1,value:""})}function d(t,e,n){const o=(0,i.eu)(e);let a=!1,s=!1;return o.forEach((e=>{e!==t&&(0,r.i1)(e,t)&&(e.isOtherOpt?(s=!0,l(e)):(a=!0,n(e)))})),{normalPushed:a,otherPushed:s}}const f={};async function p(t,e){if(!(0,c.hZ)(t,e))return;const n=f[e.type];n?await n(t,e):function(t,e){d(t,e,l)}(t,e)}f.heat_map=(t,e)=>{d(t,e,(t=>{(0,s.Pg)(t,{point:null,value:""})}))},f.upload=async(t,e)=>{const{normalPushed:n}=d(t,e,(t=>{(0,s.Pg)(t,{value:"",miniValue:"",filePath:"",progress:0,isImage:!1,fileType:"",fileName:"",fileLimits:[],image:null})}));n&&await(0,a.YC)(e)},f.weight=(t,e)=>{const{normalPushed:n}=d(t,e,(t=>{(0,s.Pg)(t,{value:""})}));n&&e.options.forEach((t=>{(0,s.Pg)(t,{percent:(0,i.ad)(Number(t.value),e.weightTotal)})}))},f.sequence=(t,e)=>{const{normalPushed:n}=d(t,e,(t=>{(0,s.Pg)(t,{selected:!1,sortNo:-1})}));n&&e.options.sort(((t,e)=>t.number>e.number?1:-1))},f.matrix=(t,e)=>{(0,i.eu)(e).forEach((e=>{if(e===t)return;const n=(0,r.Cp)(t.origin)||(0,r.Rv)(t,e),i=(0,r.Cp)(e.origin)||(0,r.Rv)(e,t),o=(0,r.tl)(t,e)||(0,r.tl)(t,e.optionX)||(0,r.tl)(t,e.optionY)||(0,r.tl)(t.optionX,e)||(0,r.tl)(t.optionY,e)||(0,r.W_)(t,e);(n||i||o)&&l(e)}))},f.cascade=(t,e)=>{const n=(t,e)=>{if(!e||!e.list)return[];if(e.list.find((e=>e.option===t)))return[...e.list];for(const i of e.list){const e=n(t,i);if(e.length>0)return e}return[]},i=e.otherOptions,a=i.includes(t)?[...e.cascade.list]:n(t,e.cascade);i.forEach((t=>{a.push({option:t})})),a.forEach((n=>{n.option!==t&&(0,r.i1)(n.option,t)&&(n.display?(0,o.j9)(n,e):l(n.option))}))}},1028:(t,e,n)=>{"use strict";n.d(e,{JG:()=>i,kI:()=>o,vv:()=>r});const i={refresh:!1,result:!1},r={refresh:!0,result:!0},o={refresh:!1,result:!0}},565:(t,e,n)=>{"use strict";n.d(e,{a:()=>a,y:()=>s});var i=n(9564),r=n(4248),o=n(3768);function a(t,e){const{nodes:n}=t.parent;return!n.includes(t)&&(e&&(0,r.vW)().uploadLog("".concat(t.runtimeNodeName,": try to change answer after question leaving and rejected"),"warning"),!0)}function s(t,e){const n=t.renderList.filter((t=>!((0,i.$X)(t)||!(0,o.F2)(t.checkMode,e)||!(0,i.ZA)(t.origin)||(0,o.JH)(t))));if(n.length>0){const t=n.map((t=>t.runtimeNodeName)).join();(0,r.vW)().uploadLog("answer lack for: ".concat(t),"warning")}}},277:(t,e,n)=>{"use strict";n.d(e,{M:()=>d}),n(1817);var i=n(7529),r=n(9564),o=n(4248),a=n(8413),s=n(6935),c=n(3768);function u(t){return t.code?t.phone_num?t.phone_num+" "+t.code:t.code:t.location?(0,a.L)(t.location.address):""}function l(t,e){const n=(0,o.vW)().startState,a=[{title:(0,s.mP)(n.title),description:(0,s.mP)(n.description)}];return e.forEach((e=>{const n=(0,i.Sl)(t,e);if(!(0,r.$X)(n)){const t={title:(0,s.mP)(n.title)||n.runtimeNodeName,description:(0,s.mP)(n.description),value:u(e),options:e.items?e.items.map((t=>({text:t.row_content||t.col_content?t.row_content+"-"+t.col_content:t.content,value:(0,c.zJ)(t).toString()}))):[]};a.push(t)}})),a}async function d(){const{surveyState:t}=(0,o.vW)();if(!t)return null;const e=await(0,c.gS)(t,"all");return{result:e,progress:t.progress,nodes:l(t,e.answers)}}},2629:(t,e,n)=>{"use strict";n.d(e,{Gl:()=>g,Rv:()=>m,lq:()=>h});var i=n(5015),r=n(5838),o=n(3892),a=n(9026),s=n(6935),c=n(7550),u=n(4248),l=n(5159);const d={valid:!0,message:""},f="vital:",p="alert:";async function g(t,e){if(t){const{parent:n}=e;return(0,i.LO)(n,t,null,!1)}return d}async function m(t,e){if(t){const{message:n}=t;return await(0,r.Q3)(e,t)?d:{valid:!1,message:n||(0,c.Iu)(l.bn.verify.invalidFailed)}}return d}async function h(t,e=!1){if(!t.parent.nextLoading&&!e)return d;t.validateFailed=!1;const{origin:n,parent:i}=t,{validation:r}=n;if(!r)return d;const{request:c,logic:l,noPreventNext:h}=r;let v=await g(c,t);return v.valid&&(v=await m(l,i)),!v.valid&&(t.validateFailed=!0,h&&(v=d,(0,a.L$)(i,t)),v.dueToNode=t,await async function(t,e){return"string"!=typeof t.message||(t.message=await(0,s.sb)(t.message,{state:e}),(0,o.PX)(t.message)||(t.message=await(0,s.Ur)(t.message,{state:e})),t.message.startsWith(f)?(t.type="vital",t.message=t.message.substring(f.length)):t.message.startsWith(p)&&(t.type="alert",t.message=t.message.substring(p.length))),t}(v,i),t.validateFailTimes+=1,(0,o.PX)(v.message))?((0,u.dU)().hook.beforeForceLeave(),(0,u.dU)().app.openWebLink(v.message),(0,u.vW)().customAbort(),v):v}},7679:(t,e,n)=>{"use strict";n.d(e,{Dn:()=>N,Jh:()=>P,jY:()=>C}),n(2707),n(3210),n(3948);var i=n(1128),r=n(3892),o=n(9564),a=n(2629),s=n(6935),c=n(3656),u=n(4248),l=n(7550),d=n(5159),f=n(5142),p=n(3877),g=n(45),m=n(6866),h=n(5905);const v={valid:!0,message:""};function y(t){if(!(0,o.ZA)(t.origin))return v;const e=(0,i.My)(t)||(0,i.eK)(t);return{valid:e,message:e?"":(0,l.Iu)(d.bn.global.answerRequired),dueToNode:t}}function _(t,e){if((0,h.sy)(t)){const{otherOptions:e}=t;if(e.some((t=>t.selected)))return 0}return e}async function w(t){if(!(0,o.ZA)(t.origin)&&!(0,i.eK)(t))return v;const{options:e}=t,{parent:n}=t;let r=await(0,s.Ob)(t.origin.fillMin,{state:n});r=r||e.length,r>e.length&&(r=e.length),r=_(t,r);let a=0;const c=(0,l.Iu)(d.bn.fill.itemInputRequired);let u=!1;for(const n of e)(0,p.Zy)(n,t)?(E(n,c),a+=1):!0===n.origin.fillRequired&&(S(n,c),u=!0);return r>a?{valid:!1,message:(0,l.Iu)(d.bn.fill.inputLimitMin,{min:r}),dueToNode:t}:u?{valid:!1,message:(0,l.Iu)(d.bn.fill.inputRequired),dueToNode:t}:v}function b(t,e=!1){const n=(0,h.sy)(t)?t.otherOptions:[],r=e?n:(0,i.eu)(t),a=(0,o.ZA)(t.origin),s=(0,l.Iu)(d.bn.fill.itemInputRequired),c=r.filter((e=>{const n=function(t,e){const n=!0===t.origin.fillRequired,r=t.selected;return n&&(r||(0,i.c1)(t.origin)&&e)}(e,a)&&!(0,p.Zy)(e,t);return n?S(e,s):E(e,s),n}))[0],u=!c;return u?v:{valid:u,message:(0,l.Iu)(d.bn.fill.inputRequired),dueToNode:t,dueToOption:c}}async function x(t,e=!1){const n=e?t.options:(0,i.eu)(t),o=[];for(const e of n){let n={valid:!0};(0,p.Zy)(e,t)&&(n=await(0,r.b0)(e,t)),n.valid?E(e,n.message):(S(e,n.message),o.push(n))}return o[0]||v}async function T(t){return(0,o.qX)(t.origin)&&(0,i.My)(t)?I(t):v}async function I(t){if(function(t){if("matrix"===t.type)return!1;const e=(0,i.eu)(t).find((t=>t.selected));return!(!e||!(0,g.Cp)(e.origin))}(t))return v;const{min:e}=await(0,o.gx)(t,t.parent);return(0,i.eu)(t).filter((t=>!(0,i.c1)(t.origin))).filter((t=>t.selected)).length>=e?v:{valid:!1,message:(0,l.Iu)(d.bn.select.limitMin,{min:e}),dueToNode:t}}const O={};async function k(t,e){if(!e.list)return v;const{multiple:n,min:i,max:o,required:a}=e,s=e.text?(0,l.Iu)(d.bn.menu.listItem)+e.text:(0,l.Iu)(d.bn.menu.topList),c=e.list.filter((t=>t.selected));for(const e of c){const{option:n}=e;if(n.origin.fillRequired&&!(n.value||"").toString().trim())return{valid:!1,dueToNode:t,message:(0,l.Iu)(d.bn.menu.inputReq,{text:n.text})};const i=await(0,r.b0)(n,t);if(!i.valid)return{...i,message:(0,l.Iu)(d.bn.menu.inputRule,{text:n.text,rule:i.message})}}const u=c.length;if(a&&0===u)return{valid:!1,dueToNode:t,message:(0,l.Iu)(d.bn.menu.required,{text:s})};if(n&&u<i&&u>0)return{valid:!1,dueToNode:t,message:(0,l.Iu)(d.bn.menu.requiredBetween,{text:s,min:i,max:o})};for(const n of e.list){if(!n.selected)continue;const e=await k(t,n);if(!e.valid)return e}return v}function S(t,e){t.errorMessage!==e&&(0,u.Pg)(t,{errorMessage:e})}function E(t,e){t.errorMessage===e&&(0,u.Pg)(t,{errorMessage:""})}function P(t,e){(0,u.vW)().locateError(t,e)}async function L(t,e){if((0,o.$X)(t)||t.readonly)return v;const n=function(t){const{origin:{canSkipVideo:e},video:n}=t;return e||!n||n.ended?v:{valid:!1,message:(0,l.Iu)(d.bn.video.watchAll),dueToNode:t}}(t);if(!n.valid)return n;const i=O[t.type];let r=i?await i(t):v;return r.valid&&e&&(r=await(0,a.lq)(t)),r.valid&&S(t,r.message),r}O.select=async t=>{const e=y(t);if(!e.valid)return e;let n=await T(t);return n.valid?(n=b(t,!1),n.valid?x(t,!1):n):n},O.select_image=t=>O.select(t),O.fill=async t=>{const e=y(t);if(!e.valid)return e;let n=await w(t);return n.valid?(n=b(t,!0),n.valid?x(t,!1):n):n},O.value_mark=async t=>{const e=y(t);if(!e.valid)return e;let n=await w(t);return n.valid?(n=b(t,!0),n.valid?x(t,!0):n):n},O.icon_mark=async t=>{const e=await O.value_mark(t);return e.valid?(0,o.ZA)(t.origin)&&t.options.some((t=>!("rating-nps"===t.iconName)&&"0"===t.value))?{valid:!1,message:(0,l.Iu)(d.bn.global.answerRequired),dueToNode:t}:v:e},O.sequence=async t=>{let e=y(t);if(!e.valid)return e;const{options:n,origin:i}=t;let r=(0,o.ZA)(i)?i.rankCount||n.length:0;const a=n.length;r>a&&(r=a),r=_(t,r);let s=0;const c=n.filter((t=>t.sortNo>0)).sort(((t,e)=>t.sortNo>e.sortNo?1:-1));for(let t=0;t<c.length&&c[t].sortNo===t+1;t++)s++;return r>s?{valid:!1,message:(0,l.Iu)(d.bn.rank.limitMin,{min:r}),dueToNode:t}:(e=b(t,!0),e.valid?x(t,!0):e)},O.matrix=async t=>{const e=y(t);if(!e.valid)return e;let n=await async function(t){const{origin:e}=t;return(0,o.Ir)(e)?v:(0,o.ZA)(e)||(0,i.My)(t)?(0,o.Zu)(e)?I(t):(0,o.Lk)(e)||(0,o.zR)(e)||(0,o.Rx)(e)?function(t){let e,n,i;(0,o.Lk)(t.origin)?(e="yid",n=t.renderOptionsY,i=!1):(0,o.zR)(t.origin)?(e="xid",n=t.renderOptionsX,i=!0):(0,o.Rx)(t.origin)&&(t.renderOptionsX.length>t.renderOptionsY.length?(e="yid",n=t.renderOptionsY,i=!1):(e="xid",n=t.renderOptionsX,i=!0));const r=t.options;for(const o of n){const n=o.uuid;if(!r.some((t=>t.selected&&(0,c.RC)(t[e],n))))return{valid:!1,message:i?(0,l.Iu)(d.bn.matrix.colLimitMin,{min:1}):(0,l.Iu)(d.bn.matrix.rowLimitMin,{min:1}),dueToNode:t}}return v}(t):async function(t){const e=(0,o.lE)(t.origin);let{min:n}=await(0,o.gx)(t,t.parent);const i=e?"xid":"yid",r=t[e?"renderOptionsX":"renderOptionsY"],a=t[e?"renderOptionsY":"renderOptionsX"];n>a.length&&(n=a.length);const s=t.options;for(const o of r){const r=o.uuid;if(s.filter((t=>t.selected&&(0,c.RC)(t[i],r))).length<n)return{valid:!1,message:e?(0,l.Iu)(d.bn.matrix.colLimitMin,{min:n}):(0,l.Iu)(d.bn.matrix.rowLimitMin,{min:n}),dueToNode:t}}return v}(t):v}(t);return n.valid?(n=b(t,!0),n.valid?x(t,!0):n):n},O.region=async t=>!(0,o.ZA)(t.origin)||t.value?v:{valid:!1,message:(0,l.Iu)(d.bn.global.answerRequired),dueToNode:t},O.location=async t=>{const e=await O.region(t);return e.valid||(e.message=(0,l.Iu)(d.bn.locate.required)),e},O.upload=async t=>{const e=y(t),{options:n}=t;if(!e.valid)return e;let r=!0,a="";const s=(0,i.C4)(t,!0);if(!(0,o.ZA)(t.origin)&&0===s)return v;const c=await(0,o.Fy)(t,t.parent),{max:u}=c,f=_(t,c.min);let g=0;a=(0,l.Iu)(d.bn.upload.uploadRequired);let m=!1;for(const e of n)(0,p.Zy)(e,t)?(E(e,a),g+=1):!0===e.origin.fillRequired&&(S(e,a),m=!0);return s<f?(r=!1,a=(0,l.Iu)(d.bn.upload.amountLimitMin,{min:f})):s>u?(r=!1,a=(0,l.Iu)(d.bn.upload.amountLimitMax,{max:u})):(r=!0,a=""),f>g?{valid:!1,message:(0,l.Iu)(d.bn.upload.amountLimitMin,{min:f}),dueToNode:t}:m?{valid:!1,message:(0,l.Iu)(d.bn.upload.uploadRequired),dueToNode:t}:{valid:r,message:a,dueToNode:t}},O.verify=async t=>{if((0,u.vW)().preview||(0,u.dU)().dev.infer){if(!t.code)return{valid:!1,message:(0,l.Iu)(d.bn.global.answerRequired),dueToNode:t}}else{const e={valid:!1,message:(0,l.Iu)(d.bn.verify.invalidFailed),dueToNode:t},{validateType:n}=t,{code:i,parent:r,nodeUuid:o}=t,a=()=>(t.validateFailTimes+=1,e);if("image"===n){const{serverValidations:n}=t;if(!n)return e;{const{id:t}=n;try{return await(0,f.Rq)({code:i},t),v}catch(t){return a()}}}else if("password"===n){const{transactionID:t}=r,e={response_id:t,question_id:o,code:i};try{return await(0,f.bp)(e),v}catch(t){return a()}}else if("sms"===n){const{serverValidations:n}=t;if(!n)return e;{const{id:t}=n;try{return await(0,f.Rq)({code:i},t),v}catch(t){return a()}}}}return v},O.menu=O.select,O.area=async t=>y(t),O.select_icon=async t=>{const e=y(t);return e.valid?T(t):e},O.weight=async t=>{if(!(0,o.ZA)(t.origin)&&!(0,i.eK)(t))return v;const e=y(t);if(!e.valid)return e;let{weightTotal:n}=t;n=_(t,n);const{options:r}=t,a=r.reduce(((t,e)=>t+Number(e.value)),0);if(0===n){const e=b(t,!1);if(!e.valid)return e}return n>a&&!0!==t.origin.relax?{valid:!1,message:(0,l.Iu)(d.bn.weight.totalLimitMin,{min:n}),dueToNode:t}:v},O.cascade=async t=>{if(!(0,o.ZA)(t.origin)&&!(0,i.My)(t))return v;const{cascade:e}=t,n=y(t);return n.valid?k(t,e):n},O.hot_spot=O.select,O.heat_map=async t=>y(t),O.slide_rate=O.value_mark,O.max_diff=async t=>{const e=t.tasks.every((t=>t.done));return{valid:e,dueToNode:e?null:t,message:e?"":(0,l.Iu)(d.bn.maxDiff.all)}};const C=(0,c.Ds)((async(t,e)=>{if(e&&S(e,(await(0,r.b0)(e,t)).message),t){const e=await N([t]);e.message||S(t,e.message),(0,m.pI)(t)}}),250);async function N(t,e=!1,n=!1){const i=[];for(const r of t){const t=await L(r,e);t.valid||(n&&S(t.dueToNode,t.message),i.push(t),(0,m.pI)(r))}return i[0]||v}},3892:(t,e,n)=>{"use strict";n.d(e,{PX:()=>u,_2:()=>l,b0:()=>m,xT:()=>c}),n(5306),n(3210);var i=n(6935),r=n(7550),o=n(1128),a=n(5159),s=n(6064);function c(t){return/^1[0-9][0-9]\d{8}$/i.test(t)}function u(t){return/[-a-zA-Z0-9@:%_+.~#?&/=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_+.~#?&/=]*)?/gi.test(t)}async function l(t,e){const{parent:n}=e,{origin:r}=t;let o=await(0,i.Ob)(r.fillStart,{state:n}),a=await(0,i.Ob)(r.fillEnd,{state:n});return(0,s.O2)(o)&&(o=-1/0),(0,s.O2)(a)&&(a=1/0),{start:o,end:a}}function d(t,e,n){return e<=t&&n>=t}function f(t,e,n){return d(t,e,n)?"":(0,r.Iu)(a.bn.fill.valueLimit,{min:e,max:n})}const p={};async function g(t,e,n){const{itemsMax:i,itemsMin:s}=await(0,o.y4)(e,n),c=t.split(/[,,]/).reduce(((t,e)=>e.trim()?t+1:t),0);let u="";return(c<s||c>i)&&(u=(0,r.Iu)(a.bn.fill.itemsLimit,{min:s,max:i})),{valid:!u,message:u}}async function m(t,e){const n=(0,s.KF)(t.value),{origin:i}=t,r=i.fillType,o=p[r];if(!o||(0,s.O2)(n)&&"auto_complete"!==r)return{valid:!0,message:""};const{parent:a}=e;a.context.option=t;const c=await o(n,t,e);return a.context.option=null,c.valid||(c.dueToOption=t,c.dueToNode=e),c}p.chars=async(t,e,n)=>{const{start:i,end:o}=await l(e,n);let{tolerance:s}=e.origin;s=s||[];const c=function(t,e=[]){if(0===e.length)return"";t=t.replace(/[\s,,]/g,"");let n="";const i=[];e.includes("number")&&(n+="0-9.",i.push((0,r.Iu)(a.bn.fill.number))),e.includes("alphabet")&&(n+="a-zA-Z",i.push((0,r.Iu)(a.bn.fill.alphabet))),e.includes("chinese")&&(n+="一-龥",i.push((0,r.Iu)(a.bn.fill.chinese)));const o=i.join(" "),s=new RegExp("^["+n+"]+$");return t.match(s)?"":(0,r.Iu)(a.bn.fill.onlyAllow,{text:o})}(t,s)||function(t,e,n){return d(t.length,e,n)?"":(0,r.Iu)(a.bn.fill.charsLimit,{min:e,max:n})}(t,i,o);return{valid:!c,message:c}},p.email=async t=>{const e=function(t){return/^[\w-\.]+@([\w-]+\.)+[\w-]+$/i.test(t)}(t);return{valid:e,message:e?"":(0,r.Iu)(a.bn.fill.needEmail)}},p.float=async(t,e,n)=>{if(!function(t){return/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(t)}(t))return{valid:!1,message:(0,r.Iu)(a.bn.fill.inputDecimal)};const{origin:i}=e;if(i.scale&&!function(t,e){return new RegExp("\\d+\\.\\d{".concat(e,"}$")).test(t)}(t,i.scale))return{valid:!1,message:(0,r.Iu)(a.bn.fill.inputDecimalDigits,{scale:i.scale})};const{start:o,end:s}=await l(e,n),c=f(Number(t),o,s);return{valid:!c,message:c}},p.integer=async(t,e,n)=>{if(!function(t){return/^[-]?\d+$/.test(t)}(t=t.replace(/\s/g,"")))return{valid:!1,message:(0,r.Iu)(a.bn.fill.inputInteger)};const i=Number(t),{start:o,end:s}=await l(e,n),c=f(i,o,s);return{valid:!c,message:c}},p.none=async()=>({valid:!0,message:""}),p.phone_number=async t=>{const e=c(t);return{valid:e,message:e?"":(0,r.Iu)(a.bn.fill.needPhoneNumber)}},p.postcode=async t=>{const e=function(t){return/^[0-9][0-9]{5}$/.test(t)}(t);return{valid:e,message:e?"":(0,r.Iu)(a.bn.fill.needZipCode)}},p.url=async t=>{const e=u(t);return{valid:e,message:e?"":(0,r.Iu)(a.bn.fill.needUrl)}},p.auto_complete=async(t,e,n)=>!t&&e.atcpTrigger?{valid:!1,message:(0,r.Iu)(a.bn.fill.atcpLabelOnly),dueToNode:n,dueToOption:e}:g(t,e,n),p.list_select=(t,e,n)=>g(t,e,n)},3877:(t,e,n)=>{"use strict";n.d(e,{Df:()=>s,Zy:()=>l,hZ:()=>o}),n(3210);var i=n(6064),r=n(6935);function o(t,e){return t.selected||l(t,e)}const a={};function s(t,e){let n="";const i=a[e.type];return n=t.isOtherOpt||!i?t.value:i(t),"string"==typeof n&&(n=(0,r.mP)(n)),n}function c(t,e){let n=s(t,e);return"string"==typeof n&&(n=n.trim()),!(0,i.O2)(n)}a.upload=t=>t.filePath,a.sequence=t=>t.sortNo,a.heat_map=t=>t.point,a.max_diff=t=>t.records;const u={};function l(t,e){return(u[e.type]||c)(t,e)}u.sequence=(t,e)=>-1!==t.sortNo&&c(t,e)},4725:(t,e,n)=>{"use strict";n.d(e,{Gi:()=>m,kw:()=>p,n0:()=>f}),n(3948);var i=n(9564),r=n(3656),o=n(7952),a=n(6451),s=n(5750),c=n(6935),u=n(1128),l=n(7552),d=n(9310);async function f(t,e){const{options:n,passRefs:i,refMaps:r}=await(0,a.P)(t,e.origin,null,!0);(0,d.sB)(e,r);const o=await(0,l.gk)(e,n,i);return(0,s.uR)(e,o)}function p(t,e,n=!1){const{loopStack:i}=e;return i.find(((e,o)=>(!n||o===i.length-1)&&(0,r.RC)(e.node.nodeUuid,t.nodeUuid)))}async function g(t,e,n,i,r,o){const a=(0,u.WA)(r),s={state:t,usage:{node:e,optionId:r.uuid}},l=await(0,c.e_)(a.text,s,"WRAPPED_URL"),d=await(0,c.e_)(r.text,s,"WRAPPED_URL"),f=await(0,c.e_)(a.value+"",s,"WRAPPED_URL");return{loopNodeId:n,outerIndex:o&&o.currentIndex,outerLoopId:o&&o.node.nodeUuid,index:i,uuid:r.uuid,refOptId:r.refOptId,refText:l||void 0,text:d||"",value:f,number:a.number,image:a.image,label:r.label,mapping:r.origin.isRef?a.mapping:r.mapping}}const m={_skip:(t,e,n)=>o.P.findNext(t,e,n),async _init(t,e,n){const{varList:o,origin:{loopStart:a,destList:s}}=e;if(0===o.length)return m._skip(t,e,n);const{loopStack:c}=n,u=s.find((t=>(0,r.RC)(t.selfPortId,a.uuid))).destInputId,l=(0,i.Cf)(t,u),d=o[0],{origin:f}=e,p=c[c.length-1],h=await g(n,e,f.nodeUuid,0,d,p),v={destInputId:u,node:f,varList:o,replacements:p?[...p.replacements,h]:[h],currentIndex:0};return c.push(v),{target:l,loop:(0,r.p$)(v),loopStack:(0,r.p$)(c)}},async _increase(t,e,n){const{nodeUuid:o}=e,{loopStack:a}=n,s=a[a.length-1],{varList:c,replacements:u,destInputId:l}=s,d=s.currentIndex+=1,f=c[d],p=a[a.length-2],m=await g(n,e,o,d,f,p),h=(0,i.Cf)(t,l);return u[u.length-1]=m,{target:h,loop:(0,r.p$)(s),loopStack:(0,r.p$)(a)}},async _end(t,e,n){const{loopStack:i}=n;i.pop();const a=await o.P.findNext(t,e,n);if(i.length>0){const t=(0,r.p$)(i);a.loop=t[t.length-1],a.loopStack=t}return a},findNext(t,e,n){const i=p(e,n,!0);if(i){const{currentIndex:r,varList:o}=i;return r===o.length-1?m._end(t,e,n):m._increase(t,e,n)}return m._init(t,e,n)}}},6492:(t,e,n)=>{"use strict";n.d(e,{tP:()=>T,Pf:()=>O});var i=n(9564);function r(t,e,n,r,o){return o||(o=(0,i.CE)(t,e,n.uuid)),o||r.origin.parentRandomId||e.length&&(o=(0,i.Cf)(t,e[e.length-1].destInputId)),o}var o=n(1128),a=n(5905);const s=["weight","slide_rate","upload","value_mark","icon_mark","fill","sequence"],c={async findNext(t,e){const{destList:n,output:c}=e.origin,u=(0,a.sy)(e)?e.otherOptions:[],l=s.indexOf(e.type)>-1?u:(0,o.eu)(e),d=l&&l.find((t=>t.selected));return{target:r(t,n,c,e,d&&(0,i.CE)(t,n,d.uuid))}}},u={async findNext(t,e,n){const{origin:{destList:r,parentRandomId:a}}=e,s=(0,o.fi)(e);let u=s&&(0,i.CE)(t,r,s.uuid);return u||(u=(await c.findNext(t,e,n)).target),u||!r.length||a||(u=(0,i.Cf)(t,r[0].destInputId)),{target:u}}};var l=n(7952),d=(n(5069),n(5838));const f={async findNext(t,e){const{origin:n,parent:r}=e,{options:o,output:a,destList:s,logicType:c,reverse:u,outputN:l}=n,f={logicType:c,reverse:u,options:o},p=await(0,d.Q3)(r,f);e.logicResult=p;const g=p?a:l;return{target:(0,i.CE)(t,s,g.uuid)}}};var p=n(5721),g=n(4725);n(2707),n(3948);const m={async findNext(t,e){const{origin:n,options:o,otherOptions:a}=e,{destList:s,output:c}=n,u=[...o.filter((t=>t.selected)).sort(((t,e)=>t.cascadePath.length<e.cascadePath.length?1:-1)),...a.filter((t=>t.selected))];let l;for(const e of u)if(l=(0,i.CE)(t,s,e.uuid),l)break;return{target:r(t,s,c,e,l)}}};var h=n(7529),v=n(3656),y=n(8351);const _={cascade:m,logic:f,loop:g.Gi,sequence:u,random:p.GN};function w(t){const e=_[t];if(!e)throw new Error("lack next rules for this type of node...");return e}["describe","check","end","start","verify","data","max_diff"].forEach((t=>{_[t]=l.P})),["weight","slide_rate","upload","value_mark","icon_mark","fill","select_image","select","region","location","lottery","matrix","menu","area","select_icon","hot_spot","heat_map"].forEach((t=>{_[t]=c}));const b=["check","break_point"];function x(t,e){return"loop"===t.type?!(0,g.kw)(t,e):b.indexOf(t.type)<0}function T(t,e,n){return O(t,(0,y.qG)({target:n},e),e)}async function I(t,e,n,r){const{target:o,loop:a,random:s}=r,c=e.random;if(o){const t=e.loop,{loopStack:n}=e;!a&&t&&(0,i.NU)(o,e.origin)&&(r.loopStack=n,r.loop=t),o.parentRandomId&&c&&!s&&(r.random=c)}else if(c){const e=(0,v.am)(c.node.nodeUuid,n.loopStack);return O(t,(0,h.JL)(n.renderList,e),n)}return r}async function O(t,e,n){let i,r,o=e,a=w(o.type),s=!0;for(;s&&(r=await I(t,o,n,await a.findNext(t,o,n)),i=r.target,i);)x(i,n)?s=!1:(o=(0,y.qG)(r,n),a=w(i.type));return r}},7952:(t,e,n)=>{"use strict";n.d(e,{P:()=>r});var i=n(9564);const r={async findNext(t,e){const{destList:n,output:r}=e.origin;return{target:(0,i.CE)(t,n,r&&r.uuid)}}}},5029:(t,e,n)=>{"use strict";n.d(e,{u:()=>r,y:()=>o}),n(8921),n(6248),n(3599),n(1477),n(4362),n(5389),n(401),n(5164),n(1238),n(4837),n(7485),n(465),n(6651),n(1437),n(5285),n(9865),n(3948);const i=new Set;function r(t){return i.has(t)}function o(t){i.add(t)}},5721:(t,e,n)=>{"use strict";n.d(e,{GN:()=>f,Ns:()=>d,Ym:()=>u}),n(8921),n(6248),n(3599),n(1477),n(4362),n(5389),n(401),n(5164),n(1238),n(4837),n(7485),n(465),n(6651),n(1437),n(5285),n(9865),n(3948);var i=n(3656),r=n(9564),o=n(7952),a=n(6866),s=n(5029);let c=[];function u(){return c}const l=new Set;function d(t,e){t&&0!==t.length&&(c=t,e.forEach((n=>{if(t.includes(n.nodeUuid)){(0,s.y)(n.nodeUuid);const t=e.find((t=>t.nodeUuid===n.parentRandomId));t&&l.add(t.nodeUuid)}})))}const f={async _init(t,e,n){const{origin:o}=e;let u=function(t,e){const{destList:n,randomStart:o}=e.origin,a={};n.forEach(((e,n)=>{if((0,i.RC)(e.selfPortId,o.uuid)){const o=(0,r.Cf)(t,e.destInputId).groupNumber||"N/A_"+n,s=a[o];if(s){const t=(0,i.XJ)(s.length+1);s.splice(t,0,e.destInputId)}else a[o]=[e.destInputId]}}));const s=function(t,e){const{customDestCount:n}=e.origin;if(!n||n>=t.length)return t;for(;t.length>n;)t.splice((0,i.XJ)(t.length),1);return t}(Object.keys(a),e);let c=[];for(;s.length>0;){const t=(0,i.XJ)(s.length);c=c.concat(a[s[t]]),s.splice(t,1)}return c}(t,e);!function(t,e){const{parent:{nodeList:n},origin:{customNodeCount:o,nodeUuid:a}}=e;l.has(a)||o&&(t.forEach((t=>{const e=[];let a=(0,r.Cf)(n,t);for(;a;)e.push(a),a=(0,r.CE)(n,a.destList,a.output.uuid);for(;e.length>o;){const t=(0,i.XJ)(e.length),n=e[t].nodeUuid;(0,s.y)(n),c.push(n),e.splice(t,1)}})),l.add(a))}(u,e),u=(0,a.p8)(u,e);let d=[];e.random&&(d=e.random.stack.concat(e.random));const f={stack:d,node:o,destPortIds:u,currentIndex:0};return n.push(f),{target:(0,r.Cf)(t,u[0]),random:{...f}}},async _increase(t,e){e.currentIndex+=1;const{currentIndex:n,destPortIds:i}=e;return{target:(0,r.Cf)(t,i[n]),random:{...e}}},_end:(t,e,n)=>o.P.findNext(t,e,n),findNext(t,e,n){const{randomList:r}=n,{nodeUuid:o}=e,a=r.find((t=>(0,i.RC)(t.node.nodeUuid,o)));if(a){const{currentIndex:i,destPortIds:r}=a;return i===r.length-1?f._end(t,e,n):f._increase(t,a)}return f._init(t,e,r)}}},9758:(t,e,n)=>{"use strict";n.d(e,{Ko:()=>c,WM:()=>o}),n(3948);var i=n(2872),r=n(7089);function o(t){const e=t.split(":"),n={};if(1===e.length)n.baseId=e[0];else if(2===e.length)n.nodeId=e[0],n.nodePartId=e[1];else if(3===e.length){n.nodeId=e[0];const t=e[1];t.match(/^[a-z0-9]{8}$/)?n.optId=t:n.optFilterId=t,n.optPartId=e[2]}return n}function a(t){const e=[],n=t.getAttribute("data-ph-cfg");if(n){const t=JSON.parse(n);Object.keys(t).forEach((n=>{e.push({name:n,value:c(t[n])})}))}const i=t.getAttribute("data-img-size")||":",[r,o]=i.split(":").map((t=>Number(t))),a={phParams:e,limitSrc:Number(t.getAttribute("data-limit-src"))||0,limitRnd:t.getAttribute("data-limit-rnd")||"-1",imgHeight:o,imgWidth:r,outOfResult:!!t.getAttribute("data-out-of-result"),disorder:!!t.getAttribute("data-disorder")},s=t.getAttribute("data-limit");if(s){const[t,e,n]=s.split(":");a.limitType=Number(t)||1,a.limitStart=c(e),a.limitEnd=c(n)}return a}function s(t){["data-id","data-limit","data-limit-src","data-limit-rnd","data-ph-cfg","data-img-size","data-disorder","data-out-of-result"].forEach((e=>{t.removeAttribute(e)}))}function c(t){if(!t)return t;if(!function(t){return t.includes("var-tag")&&t.includes("data-id".concat("="))}(t=String(t)))return t;const e=document.createElement("div");e.innerHTML=t;const n=e.querySelectorAll(".var-tag");for(const t of n)if(!t.hasAttribute("data-v-config")){const e=o(t.getAttribute("data-id")),n=a(t);s(t);const c=(0,r.c)(e);t.setAttribute("data-v-id",c);const u=(0,i.BB)(n);u&&t.setAttribute("data-v-config",u)}return e.innerHTML}},9698:(t,e,n)=>{"use strict";n.d(e,{V:()=>o,q:()=>a});var i=n(3656),r=n(9758);function o(t){const e=t;return e.referUuid?{index:e.index,config:{phParams:[],limitEnd:e.limitEnd,limitSrc:e.limitSrc,limitStart:e.limitStart,limitType:e.limitType,disorder:e.disorder,limitRnd:e.limitRnd},identity:(0,r.WM)(e.uuid),uuid:e.referUuid}:e}function a(t,e){const n=t;if(n.limit){const t=e.find((t=>t.uuid===n.referId));return(0,i.pC)(t.referUuid)}return n.referId}},6539:(t,e,n)=>{"use strict";n.d(e,{FC:()=>u,Mw:()=>f,Xs:()=>d,Y8:()=>l,ZI:()=>s,zZ:()=>c}),n(5306),n(3210);var i=n(5159),r=n(4248),o=n(7550);let a;function s(){return a||(a=(0,r.dU)().app.getParams()),a}function c(){a=null}function u(t){const e={...t};return delete e.appid,delete e.code,delete e.state,e}function l(t){const e=Object.create(null);return"string"!=typeof t?e:(t=t.trim().replace(/^([?#&])/,""))?(t.split("&").forEach((t=>{const n=t.replace(/\+/g," ").split("=");let i=n.shift(),r=n.length>0?n.join("="):void 0;i=decodeURIComponent(i),r=void 0===r?null:decodeURIComponent(r),void 0===e[i]?e[i]=r:Array.isArray(e[i])?e[i].push(r):e[i]=[e[i],r]})),{...e}):e}function d(t){(0,r.vW)().preview||(0,r.dU)().dev.autoRun?(0,r.vW)().notify((0,o.Iu)(i.bn.preview.noLink)):((0,r.dU)().hook.beforeForceLeave(),(0,r.dU)().app.openWebLink(t))}function f(t,e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){}const n=function(t){const e=[];return Object.keys(t).forEach((n=>{if(void 0!==t[n]){const i="".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(t[n]));e.push(i)}})),e.join("&")}(e),i=t.match(/\?/)?"&":"?";return t+i+n}},8343:(t,e,n)=>{"use strict";n.d(e,{v:()=>o}),n(3948);var i=n(6866),r=n(4248);async function o(t){const{currentStartTime:e,nodes:n}=t,o=(new Date).getTime(),a=Math.abs(o-e)/n.length;for(const t of n){const e=t.costTime||0;(0,r.Pg)(t,{costTime:e+a,endTime:o}),await(0,i.p9)(t)}(0,r.Pg)(t,{currentStartTime:o})}},6060:(t,e,n)=>{"use strict";n.d(e,{b:()=>s});var i=n(4248),r=n(68),o=n(7433),a=n(4588);async function s(t){const e=(0,a.VE)(t);(0,i.Pg)(t,{nodes:e});let n=null;if((0,a.Fr)(t)){const e=(0,a.zY)(t);n=e&&t.parsedPayload.nodeGroups.find((t=>t.id===e.origin.groupId))}if((0,i.Pg)(t,{inSingleGroup:n}),n&&n.renderAsTable){const o=(0,r.g)(e,n);(0,i.Pg)(t,{groupTable:o})}else(0,i.Pg)(t,{groupTable:void 0});const s=await(0,o.FK)(t);(0,i.Pg)(t,{prevButton:(0,o.ve)(t),nextButton:s,needProgressBar:t.progressBarRequired&&"lottery"!==t.current.type})}},3251:(t,e,n)=>{"use strict";n.d(e,{cs:()=>u,s$:()=>s,yp:()=>c});var i=n(9564),r=n(4248);let o,a={};const s={on(t,e){a[t]||(a[t]=[]),a[t].push(e)},off(t,e){t||(a={}),a[t]&&(a[t]=e?a[t].filter((t=>t!==e)):[])},one(t,e){const n=i=>{e(i),s.off(t,n)};s.on(t,n)},trigger(t,e={}){if(a[t])try{a[t].forEach((n=>n({type:t,...e,data:e},e)))}catch(t){(0,r.vW)().uploadLog(t)}}};function c(t){"gift"!==t.type&&(s.trigger("ANSWER_CHANGE",t),(0,i.qK)(t))}function u(t,e=!1){t!==o&&(s.trigger("SWITCH_NODE",t),o=t,e&&(0,r.dU)().hook.onSwitchPage())}},68:(t,e,n)=>{"use strict";n.d(e,{g:()=>r});var i=n(3656);function r(t,e){if(0===t.length)return;const n=t[0].loop.varList.map((e=>{const{text:n,uuid:i}=e,r=t.filter((t=>t.loop.replacements[0].uuid===i));return{uuid:i,title:n,cells:o(r)}})),i=n.reduce(((t,e)=>e.cells.length>t.cells.length?e:t),{cells:[]}),r=i.cells;n.forEach((t=>{t.cells=r.map((e=>t.cells.find((t=>t.node.nodeUuid===e.node.nodeUuid))||a(void 0)))}));const s=i.cells.map((t=>({uuid:t.node.nodeUuid,title:t.node.title})));return{title:e.tableTitle,header:s,rows:n}}function o(t){return t.map(a)}function a(t){const e=(null==t?void 0:t.renderId)||(0,i.M8)();return t.headHidden=!0,{uuid:e,node:t}}},6207:(t,e,n)=>{"use strict";n.d(e,{AK:()=>a,Fy:()=>s}),n(5306);var i=n(866),r=n(7117);function o(t){const e=":"+(0,r.SN)().LOOP_IMG.uuid,n="-0000-0000-0000-000000000000";return t.indexOf(n)&&(t=t.replace(n,e)),t}function a(t,e){return t.filter((t=>t.used)).map((t=>(function(t){const{image:e,options:n}=t;e&&(e.id=o(e.id)),n&&n.forEach((t=>{t.image&&(t.image.id=o(t.image.id))}))}(t),t.destList=t.destList.filter((t=>!t.designOnly)),function(t){const e=t;e.questionText=(0,i.l)(e.questionText),e.describe=(0,i.l)(e.describe);let n=[];e.options&&(n=n.concat(e.options)),e.otherOptions&&(n=n.concat(e.otherOptions)),e.optionsX&&(n=n.concat(e.optionsX)),e.optionsY&&(n=n.concat(e.optionsY)),n.forEach((t=>{t.text=(0,i.l)(t.text)}))}(t),t)))}function s(t){return t.forEach((t=>{t.value=(0,i.l)(t.value)})),t}},7433:(t,e,n)=>{"use strict";n.d(e,{__:()=>Z,Nf:()=>j,rU:()=>H,n0:()=>q,FK:()=>B,EM:()=>F,ve:()=>D,Yz:()=>G,eM:()=>K,JP:()=>X,gB:()=>U,Tb:()=>z,Bm:()=>W}),n(5069),n(3948);var i=n(3251),r=n(6539),o=n(9564),a=n(9026),s=n(7529),c=n(7679),u=n(8670),l=n(8351),d=n(7518),f=n(6492),p=n(4248),g=n(7550),m=n(7952),h=n(5817),v=n(5159),y=(n(5306),n(3210),n(3803)),_=n(5142),w=n(5015),b=n(6935),x=n(5838),T=n(5497);const I={},O={};async function k(t,e,n){const{actions:i}=e.origin;if(i&&!(0,y.q)()&&!(0,p.vW)().realTimePreview){if("forward_enter"===t){if(I[e.renderId])return;I[e.renderId]=!0}if("backward_leave"===t&&delete I[e.renderId],"forward_leave"===t){if(O[e.renderId])return;O[e.renderId]=!0}"backward_leave"===t&&delete O[e.renderId];for(const r of i){if(r.disabled||r.event!==t)continue;const{activeConfig:i}=r;if(!i||await(0,x.Q3)(n,i))if("http_request"===r.type)(0,T.l)(r),await(0,w.zp)(n,r.request,null,!0);else{const i={state:n},o={question_id:e.nodeUuid,response_id:n.transactionID,locale:n.language,event:t,type:r.type};if("email"===r.type){const{email:t}=r,e={...o,email:(await(0,b.e_)(t.address,i)).replace(/\s/g,""),content:await(0,b.Ur)(t.content,i),title:(await(0,b.e_)(t.title,i)).trim()};await(0,_.FB)(e)}else{const{sms:t}=r,e={};for(const n of t.params)e[n.name]=(await(0,b.e_)(n.value,i)).trim();const n={...o,url:(await(0,b.e_)(t.url,i)).replace(/\s/g,""),content:e};await(0,_.FB)(n)}}}}}var S=n(6866),E=n(6060),P=n(4588),L=n(3768);var C=n(3656),N=n(8343);let R;function U(){return!!R}const A=["end","gift","lottery"];function M(t){let{prev:e}=t;const n=[];let i=e&&(0,o.$X)(e);for(;i;)n.push({node:e,reason:i}),e=e.prev,i=e&&(0,o.$X)(e);return{prev:e,skipList:n,current:t}}function D(t){if((0,p.vW)().realTimePreview)return"";const{prevEnabled:e,themeMode:n}=t,i=(0,P.zY)(t),{prev:r}=M(i),o=i.type;return e&&n&&"end"!==o&&"lottery"!==o?t.prevBtnText:(0,p.vW)().preview&&"end"===o?(0,g.Iu)(v.bn.global.backTest):e&&r&&(i.checkMode===r.checkMode||(0,p.vW)().preview)&&A.indexOf(o)<0?t.inSingleGroup?t.inSingleGroup.prevText||t.prevBtnText||(0,g.Iu)(v.bn.global.previous):t.prevBtnText:""}async function B(t){const{formalResult:e}=t,n=t.current;if((0,C.is)(n,"end"===n.type)){const i=n.endBtnText||(0,g.Iu)(v.bn.global.go);if(n.linkUrl)return i;if(e&&e.reward||(0,p.vW)().preview&&n.origin.useReward)return n.qrCode||t.fakeCommitted?"":i;{const{target:e}=await m.P.findNext(t.nodeList,n,t);return e&&"lottery"===e.type?i:""}}if((0,C.is)(n,"lottery"===n.type)){const t=(0,g.Iu)(v.bn.reward.get);return n.linkUrl?n.endBtnText||t:n.goal?n.qrCode?"":t:""}return t.inSingleGroup?t.inSingleGroup.nextText||t.nextBtnText||(0,g.Iu)(v.bn.global.next):t.nextBtnText}function F(t,e){const n=[];let i=1;const r=t[e];let a=t[e+i],s=a&&(0,o.$X)(a);for(;a&&s;)n.push({node:a,reason:s}),i+=1,a=t[e+i],s=a&&(0,o.$X)(a);return{next:a,skipList:n,current:r}}async function W(t){const e=await(0,c.Dn)(t.nodes,!0,(0,P.Fr)(t));if(e.valid){if((0,P.Fr)(t)){(0,p.Pg)(t,{current:t.nodes[t.nodes.length-1]});for(const e of t.nodes)await k("forward_leave",e,t)}else await k("forward_leave",t.current,t);return await(0,s.BW)(t,t.current,{type:"page_next",delay:200}),!0}return function(t,e){const{valid:n,message:r,dueToNode:o,dueToOption:a}=e,s={valid:n,message:r};if(a&&(s.optId=a.uuid,s.optText=a.text,a.label&&(s.message=a.label+":"+s.message)),o&&(s.nodeId=o.nodeUuid,s.nodeName=o.nodeName,s.nodeType=o.type,s.message=o.nodeName+":"+s.message),i.s$.trigger("NEXT_FAIL",s),"vital"===e.type)throw(0,p.vW)().error(e.message),new Error("next vital error: "+e.message);"alert"===e.type?(0,p.vW)().alert(e.message):(t.inSingleGroup||(0,p.vW)().notify(e.message),(0,c.Jh)(e,t))}(t,e),!1}function z(t,e){(0,p.Pg)(t,{nextLoading:e})}function q(t){z(t,!0),R={state:t}}async function j(t){z(t,!1),R&&(await K(R.state),R=void 0)}function V(t,e,n){(0,i.cs)({origin:e,parent:t},!0);const a={...(0,r.ZI)(),rid:String(n.id),locale:t.language,qid:t.surveyId,rt:e.giftType};if("red_envelope"!==e.giftType||(0,p.vW)().preview)(0,u.sO)(n,e,t.theme,(0,o.Jz)(t.nodeList)),(0,p.dU)().hook.beforeForceLeave(),(0,p.dU)().app.openWebLink((0,p.dU)().app.getRewardUrl(a)),(0,p.vW)().customAbort();else{const e={...a,tid:t.transactionID},{formalResult:{authorizer:{app_id:n,component_appid:i}}}=t;(0,p.dU)().auth.authorizeGift(n,i,e,"end"),(0,p.vW)().customAbort()}}function X(t,e){e.linkUrl?((0,p.dU)().hook.beforeForceLeave(),(0,p.dU)().app.openWebLink(e.linkUrl),(0,p.vW)().customAbort()):V(t,(0,o.nv)(t.nodeList,e.rewardRaw.gift_id),e.rewardRaw)}async function K(t){const e=function(t){const{renderList:e}=t,n=t.nodes[t.nodes.length-1];return F(e,(0,s.S5)(e,n))}(t),{current:n,next:c}=e;return"end"===n.type?async function(t,e){const{linkUrl:n,origin:s}=e;if(n)return void(0,r.Xs)(n);const c=(0,o.CE)(t.nodeList,s.destList,s.output&&s.output.uuid);if(!c)return;const d=(0,u.Ok)(t,c);if((0,C.is)(c,"lottery"===c.type)){const e=await(0,l.MJ)(c,d,t);(0,a.FA)(e,t,!(!d||!d.id)),(0,p.Pg)(t,{current:e}),(0,i.cs)(e,!0)}else V(t,c,d);await(0,E.b)(t)}(t,n):(await(0,p.dU)().hook.beforeGotoNext(),(await(0,d.C)(t,{valid:!0,message:""},n,c)).valid?(function(t){if((0,p.vW)().preview)return;const e=function(t){const{nodes:e,renderList:n}=t,i=e[e.length-1];let r=i,a=[r];for((0,P.YB)(i.nodeUuid,t.nodeGroups)&&(a=n.filter((t=>t.origin.groupId===i.origin.groupId)),r=a[0]);r.prev&&(0,o.$X)(r.prev)&&!(0,P.YB)(r.prev.nodeUuid,t.nodeGroups);)a.unshift(r.prev),r=r.prev;return a}(t).map((t=>(0,L.py)(t))).filter((t=>!!t));(0,p.dU)().network.pushSocket("update",{answers:e}),clearTimeout(void 0)}(t),async function(t,e){const{next:n,current:r}=e;(0,p.Pg)(t,{current:n}),n.reached=!0,(0,a.UW)(r,n),(0,i.cs)(n,!0),(0,h.bR)(t),await(0,S.sB)(t),await(0,E.b)(t),z(t,!1),(0,o.qK)(r),(0,s.$V)(t,t.current),i.s$.trigger("NEXT_OK")}(t,e)):z(t,!1))}async function G(t){const e=(0,P.zY)(t),{prev:n,skipList:r}=M(e);if(n){if((0,P.YB)(e.nodeUuid,t.nodeGroups)){const e=[...t.nodes].reverse();for(const n of e)await k("backward_leave",n,t)}else await k("backward_leave",e,t);for(const e of r)await k("backward_enter",e.node,t),await k("backward_leave",e.node,t);if((0,p.Pg)(t,{current:n}),await(0,N.v)(t),(0,i.cs)(n,!0),(0,h.bR)(t),await(0,S.sB)(t),await(0,E.b)(t),(0,a.WJ)(e,n),(0,s.$V)(t,t.current),i.s$.trigger("PREV_OK"),(0,P.YB)(n.nodeUuid,t.nodeGroups)){const e=[...t.nodes].reverse();for(const n of e)await k("backward_enter",n,t)}else await k("backward_enter",n,t)}}async function H(t,e){const{nodeList:n,current:i}=t,r=await(0,f.Pf)(n,i,t),{target:o}=r;return o?Z(t,r,e):null}async function Z(t,e,n){const i=(0,l.qG)(e,t);if(n&&n(i))return null;const r=await(0,l.D1)(i,t.current);(0,p.Pg)(t,{current:r}),await k("forward_enter",r,t);const s=(0,o.$X)(r);return s&&((0,a.do)(t,r,s),await k("forward_leave",r,t)),r}},5817:(t,e,n)=>{"use strict";n.d(e,{bR:()=>f}),n(3948);var i=n(9564),r=n(1128),o=n(7529),a=n(4248);const s=["logic","loop","random","break_point","check","data","lottery","gift"];function c(t){return t&&"end"!==t.type}function u(t,e){if(!t)return t;const n=t.parentRandomId||t.circleNode1Id;return n&&(t=u(t=(0,i.nv)(e,n),e)),t}function l(t,e){let n;e=u(e,t);const{output:o,destList:a}=e,{outputN:s}=e,l=(0,r.NV)(e);if(o&&(n=(0,i.CE)(t,a,o.uuid)),!c(n))if(s)n=(0,i.CE)(t,a,s.uuid);else if(l)for(const e of l)if(n=(0,i.CE)(t,a,e.uuid),c(n))break;return n}function d(t){return!s.includes(t.type)&&!t.autoSkip}function f(t){if((0,a.dU)().dev.infer)return;const{percent:e,index:n}=function(t){const e=function(t){const e=t.renderList.filter((t=>d(t.origin)));return(0,o.S5)(e,t.current)}(t),n=function(t,e){const{nodeList:n,current:i}=e;let r=t,o=l(n,i.origin);for(;o;)d(o)&&(r+=1),o=l(n,o);return"end"!==i.type&&(r+=1),r}(e,t);return-1===e?{index:-1,fullLength:n,percent:0}:{percent:Math.round(e/n*100),fullLength:n,index:e}}(t);n>-1&&(0,a.Pg)(t,{progress:e})}},7529:(t,e,n)=>{"use strict";n.d(e,{$V:()=>y,BW:()=>v,JL:()=>g,S5:()=>m,Sl:()=>_}),n(3948);var i=n(7433),r=n(9564),o=n(2629),a=n(3656),s=n(4248),c=n(9309),u=n(5817),l=n(3251),d=n(6060),f=n(4588);let p=-1;function g(t,e){return e=e.toLowerCase(),t.find((t=>t.renderId.toLowerCase()===e))}function m(t,e){for(let r=0;r<t.length;r++){if(n=t[r],i=e,(0,a.RC)(n.renderId,i.renderId))return r}var n,i;return-1}function h(t,e){(0,s.Pg)(t,{refreshing:e})}function v(t,e,n){if(h(t,!0),clearTimeout(p),n.initial&&(0,l.cs)(t.current,!0),n.delay){const i=(0,s.dU)().dev.autoRun||(0,s.dU)().dev.infer?0:n.delay;return new Promise(((r,o)=>{p=setTimeout((async()=>{try{await w(t,e,n)}catch(t){o(t)}r()}),i)}))}return w(t,e,n)}function y(t,e){const{circleNode1Id:n}=e.origin;n?(0,s.Pg)(t,{loopStack:(0,a.p$)(e.loopStack)}):(0,s.Pg)(t,{loopStack:[]});const i=t.randomList,r=e.random;i.forEach((t=>{r?(0,a.RC)(t.node.nodeUuid,r.node.nodeUuid)?t.currentIndex=r.currentIndex:r.stack.some((e=>(0,a.RC)(t.node.nodeUuid,e.node.nodeUuid)))||(t.currentIndex=-1):t.currentIndex=-1}))}function _(t,e){const n=function(t,e){let n=t;if(!e)return n;for(const t of e)n+="-"+(0,a.pC)(t.option_id);return n}(e.node_id,e.loop_ctxs);return g(t.renderList,n)}async function w(t,e,n){h(t,!0);const a=t.renderList;y(t,e=e||t.current);const l=m(a,e),p=await async function(t,e,n){const a=n.type;let c=[...t.renderList];c=c.length>0?c:[e];const u=m(c,e);if(u<0)return c;c.length=u,c.push(e),(0,s.Pg)(t,{renderList:c}),(0,f.Fr)(t)&&await(0,o.lq)(e);let l=null;const d=e=>!(0,f.dO)(e,l,t.nodeGroups);let p=null;for("page_inner"===a&&(l=e,p=d);;){const e=await(0,i.rU)(t,p);if(!e)break;if(c.push(e),f.le.includes(e.type))break;if(!(0,r.$X)(e)){if(l||(l=e,(0,f.YB)(l.nodeUuid,t.nodeGroups)&&(p=d)),!(0,f.dO)(l,e,t.nodeGroups))break;await(0,o.lq)(e)}}return c}(t,e,n),g=n.initial?(0,i.EM)(p,l).next:e;(0,s.Pg)(t,{current:g}),h(t,!1),y(t,e),await(0,d.b)(t),n.initial||(await(0,i.Nf)(t),t.inSingleGroup&&(0,u.bR)(t)),(0,c.fS)()}},8670:(t,e,n)=>{"use strict";n.d(e,{G8:()=>S,Ok:()=>T,md:()=>k,sO:()=>I});var i=n(9564),r=n(3087),o=n(6539),a=n(3656),s=n(4248),c=n(7550),u=n(5521),l=n(5589),d=n(3251),f=n(9026),p=n(5159),g=n(5142),m=n(5810),h=n(3756),v=n(698),y=n(248),_=n(4125),w=n(9271),b=n(6970);let x=null;function T(t,e){if((0,s.vW)().preview){const n={id:-1,code:"12345678"};if((0,a.is)(e,"gift"===e.type))return{...n,type:e.giftType,gift_id:e.nodeUuid};{const r=(0,a.DQ)(e.options,1)[0],o=(0,i.CE)(t.nodeList,e.destList,r.uuid);return{...n,type:o.giftType,gift_id:o.nodeUuid,lottery_id:e.nodeUuid,lottery_option_id:r.uuid}}}return t.formalResult.reward}function I(t,e,n,i){const r="custom"===e.giftType;if((0,s.vW)().preview||r){i.useCustomLogo&&(e.useCustomLogo=i.useCustomLogo,e.logoImage=i.logoImage,e.logoText=i.logoText,i.i18n&&Object.keys(i.i18n).forEach((t=>{const n=i.i18n[t];e.i18n[t].logoText=n.logoText})));const r={};"custom"===e.giftType?r.custom={giftNode:e,theme:n,qrCode:t.code,rewardId:t.id}:r.redEnvelope={theme:n,recipient:(0,h.W)(),gift:{id:t.id,title:e.activityName,description:e.blessings,config:{gift_name:""},origin:e},amount:e.giftCount,type:"red_envelope"},(0,s.dU)().storage.set("cached_reward",JSON.stringify(r))}}function O(t){const e=(0,s.dU)().storage.get("cached_reward");if(!e)return;const n=JSON.parse(e);let i;const{custom:r,redEnvelope:o}=n;return r?i=r.rewardId:o&&(i=o.gift.id),i===t?n:void 0}function k(){x=null}async function S(){if(x)return x;const t=(0,o.ZI)(),{rt:e,rid:n,code:i,qid:a,tid:h,locale:T,reward_from_qr_code:I}=t;let k;(0,c.u4)(T);let S,P={};if("red_envelope"===e){let e;(0,s.vW)().preview?e=O(Number(n)).redEnvelope:!i&&I?e=E:(n&&!i&&((0,s.dU)().auth.authorizeGift(t.aid,t.cid,t,"scan_qr_code"),(0,s.vW)().customAbort()),e=function(t){var e;const n=t.gift.origin,i={...t,gift:{...null==t?void 0:t.gift,origin:{...null===(e=null==t?void 0:t.gift)||void 0===e?void 0:e.origin,i18n:{},logoText:""}}};if(!n)return i;const r=n.i18n;if(!r)return i;const o={};return Object.keys(r).forEach((t=>{const e=r[t];o[t]={activityName:e.gift_name,blessings:e.gift_wishing,endBtnText:e.end_btn_text,logoText:e.logo_text}})),i.gift.origin.i18n=o,i}(await(0,g._7)({code:i},n)));const{gift:r,theme:o,isTemporaryForWXQrcode:u}=e;k=r.origin,P=e.recipient,(0,f.Bt)(k,{surveyId:a,userInfo:P,transactionID:h}),S={isTemporaryForWXQrcode:u,rewardValue:k.giftCount+" "+(0,c.Iu)(p.bn.reward.yuan),wechatID:P.nickname,wechatImage:P.headimgurl,theme:o}}else{const t=O(Number(n));if(!t)return(0,s.vW)().error((0,c.Iu)(p.bn.global.invalidReward)),null;const{custom:e}=t;k=e.giftNode,S={qrCode:e.qrCode,rewardToMessage:k.needSendNote,theme:e.theme}}(0,y.mj)(k,k.i18n[T]);const L=(0,_.s)(k),C={...S,images:k.image?[(0,w.q)(k.image)]:[],video:k.video,layout:k.layout,rewardId:n,eventHub:d.s$,nodeName:k.nodeName,type:k.type,rewardType:k.giftType,renderId:k.nodeUuid,rewardName:k.activityName,title:k.blessings,description:k.describe,summary:k.describe,rewardTime:(0,r.GN)(),...L,prevButton:(0,s.vW)().preview&&!(0,s.vW)().realTimePreview?(0,c.Iu)(p.bn.global.backTest):"",nextButton:k.linkUrl&&(k.endBtnText||(0,c.Iu)(p.bn.global.go)),handleEvents:{...m.k,async handlePrevClick(){(0,s.dU)().app.gotoStartPage((0,o.ZI)())},handleOptionClick:async(t,e)=>(await(0,u.W)(t,e)).result,handleQuestionInput:async(t,e)=>(await(0,l.U)(t,e)).result,async handleNextClick(){k.linkUrl&&(0,o.Xs)(k.linkUrl)},async handleGetRewardWX(){(0,s.dU)().auth.authorizeGift(t.aid,t.cid,t,"scan_qr_code"),(0,s.vW)().customAbort()}}};return C.template=await(0,b.b)(k.template,C),x=C,(0,v.z)(C.theme),await(0,s.dU)().hook.afterFetchReward(C),C}const E={isTemporaryForWXQrcode:!0,theme:{primary:"#202020",secondary:"#FFFFFF",contrast:"#CC2227",background:"#FCFCFC",error:"#CC2227",button:"#202020",fontSize:"1.5rem",fontWeight:"normal",descFontSize:"1rem",descFontWeight:"normal",optFontSize:"1rem",optFontWeight:"normal",btnFontSize:"1.25rem",btnFontWeight:"normal",name:"minimal",fontFamily:"roboto",titleFontSize:"1.5rem",titleFontWeight:"bold",boxWidth:"50vmin",bgOpacity:100,bgLayout:"cover",bgSize:"cover",effect:"normal",bgImageUrl:"",bgImageId:"",bgImageHeight:0,bgImageWidth:0},recipient:{headimgurl:"https://media.choiceform.com/fresh_little_girl.jpg",nickname:"test微信名称示例"},gift:{id:-1,title:"test",description:"test",config:{gift_name:""},origin:{sortNo:10003,x:808,y:219,nodeName:"GIFT",type:"gift",used:!0,nodeUuid:"dc28e571-38a3-4af3-9829-22aaa62e83f0",input:{uuid:"bb75d086-9203-4cd1-a757-aa22fdde3a71"},label:"GIFT",questionText:"test",layout:{fontSize:"1.5rem",fontWeight:"normal",optFontSize:"1rem",optFontWeight:"normal",descFontSize:"1rem",descFontWeight:"normal",descFontIsolate:!1,fontIsolate:!1,iconFontSize:"48px",optFontIsolate:!1},template:{name:"basic",params:[],id:"standards_gift_basic"},giftCount:1,giftType:"red_envelope",activityName:"test",blessings:"test",needSendNote:!0,needVerification:!0,fromNodeIds:"319c139d-043f-4949-8721-b2376d52cea7",fromOptIds:"",i18n:{zh_cn:{activityName:"test",blessings:"test",endBtnText:""}}}},amount:1,type:"red_envelope"}},1881:(t,e,n)=>{"use strict";n.d(e,{$4:()=>g,GK:()=>m,Xs:()=>p,u:()=>h}),n(5306),n(3210),n(3948);var i=n(6935),r=n(6539),o=n(3251),a=n(3892),s=n(5142),c=n(949),u=n(6064),l=n(1772),d=n(4248);function f(t,e){const n=(0,u.KF)(t.result);return t&&(0,a.PX)(n)?(setTimeout((()=>{(0,r.Xs)(n)})),{type:"LINK",done:!0}):{type:e,done:!0}}async function p(t,e){let n="";const{parsedPayload:{surveyMeta:{collector:r}}}=t;if(!r)return;const{sampler_config:o}=r;o&&(n=o[e]||"");const a="BACKEND:";if(!n||0!==n.indexOf(a))return;const s=n.replace(a,"").split("&"),c={};for(const e of s){const[n,r]=e.split("=");c[n]=await(0,i.Oy)(r,t)}return c}async function g(t,e){const{parsedPayload:{surveyMeta:{collector:{sampler_config:n}}}}=e,a=n&&n[t];if(!a)return o.s$.trigger("SAMPLER_TRANSFER",{method:"ABORT"}),{type:"ABORT",done:!1};const u=a.trim(),p=u.startsWith("{{")&&u.endsWith("}}"),g=await(0,i.Oy)(u,e,!p);return g.trim().startsWith("BACKEND")?{type:"BACKEND",done:!0}:g.trim().startsWith("http")?async function(t,e){return(0,r.Xs)(e),o.s$.trigger("SAMPLER_TRANSFER",{method:"LINK",url:e,type:t}),{type:"LINK",done:!0}}(t,g):async function(t,e,n){const i=n.indexOf(":"),a=n.substring(0,i).toUpperCase(),u=n.substring(i+1),p=u.indexOf("?"),g=-1===p?u:u.substring(0,p);let m={};if(-1!==p){const t=-1===p?"":u.substring(p);t&&(m=t?(0,r.Y8)(t):{})}let h={type:a,done:!1};if("FAKE"===a)h=f(await(0,c.T)({url:g,data:(0,l.fq)(m,t),silent:!1,responseId:null==t?void 0:t.transactionID}),a);else if("GET"===a||"POST"===a){const t="GET"===a?"GET":"POST";try{h=f(await(0,s.o1)(g,{type:t,data:m}),a)}catch(t){(0,d.vW)().uploadLog("数据转移接口出错"+JSON.stringify(t),"warning")}}return o.s$.trigger("SAMPLER_TRANSFER",{url:g,data:m,method:a,type:e}),h}(e,t,g)}function m(t){return"LINK"===t.type&&t.done}async function h(t){var e,n;const{context:r}=t,o=r.node,a=null!==(n=null===(e=null==o?void 0:o.backendRequest)||void 0===e?void 0:e.params)&&void 0!==n?n:[],s={};for(const e of a){const{name:n,value:r}=e;s[n]=await(0,i.e_)(r,{state:t,joinBy:","})}return 0===a.length?void 0:s}},4588:(t,e,n)=>{"use strict";n.d(e,{Fr:()=>c,VE:()=>s,YB:()=>o,dO:()=>l,le:()=>u,zY:()=>a});var i=n(9564),r=n(4248);function o(t,e){return e.some((e=>e.singlePage&&e.nodes.includes(t)))}function a(t){return s(t)[0]||t.current}function s(t){const{current:e,renderList:n}=t,a=[e],s=n.indexOf(e);let c=s-1,u=e;for(;;){const e=n[c--];if(!l(e,u,t.nodeGroups))break;(0,i.$X)(e)||(a.unshift(e),u=e)}let d=s+1,f=e;for(;;){const e=n[d++];if(!l(e,f,t.nodeGroups))break;(0,i.$X)(e)||(a.push(e),f=e)}return o(a[0].nodeUuid,t.nodeGroups)&&(a.forEach((t=>{(0,r.Pg)(t,{pageEnd:!1,pageStart:!1})})),(0,r.Pg)(a[0],{pageStart:!0}),(0,r.Pg)(a[a.length-1],{pageEnd:!0})),a}function c(t){const e=a(t);return e&&o(e.nodeUuid,t.nodeGroups)}const u=["end","lottery","gift"];function l(t,e,n){return!(!t||!e)&&!u.includes(t.type)&&!u.includes(e.type)&&o(t.nodeUuid,n)&&o(e.nodeUuid,n)&&function(t,e){return!(!t.origin.groupId||!e.origin.groupId||e.origin.groupId!==t.origin.groupId)&&(!e.loop&&!t.loop||!(e.loop&&!t.loop||!e.loop&&t.loop||e.loop.destInputId!==t.loop.destInputId||e.loop.node.groupId!==e.origin.groupId&&e.loop.currentIndex!==t.loop.currentIndex))}(t,e)}},7518:(t,e,n)=>{"use strict";n.d(e,{C:()=>I,Y:()=>T});var i=n(3251),r=n(5142),o=n(3768),a=n(9026),s=n(5015),c=n(7433),u=n(8351),l=n(1881),d=n(6866),f=n(4248),p=n(7550),g=n(5159),m=n(6064),h=n(6060),v=n(565);const y={valid:!0,message:""},_={valid:!1,message:""};let w=!1,b=!1,x=!1;function T(){w=!1,b=!1,x=!1}function I(t,e,n,i){const r=[];let o=i.prev;for(;o!==n;)r.push({prev:o,next:i}),o=(i=o).prev;return r.push({prev:o,next:i}),O(t,e,r)}async function O(t,e,n){const T=n.pop(),I=await async function(t,e,n,T){const I=n.checkMode,O=T.checkMode,L=T.type;if("end"===L&&(clearInterval(t.timer),(0,f.Pg)(t,{limitTime:void 0})),(0,f.vW)().preview)return e;if(I){if("end"===L)return async function(t,e,n){if(x)return _;(0,f.dU)().network.closeSocket(),x=!0;const u=k(t,n);(0,c.Tb)(t,!0),(0,v.y)(t,"all"),await(0,f.dU)().hook.beforeEndSurvey(t);try{const e=await(0,o.gS)(t,"all","examine_skipped_url"),n=await(0,r.Hw)(e,t.transactionID);t.responseStatus=n.status,await(0,f.dU)().hook.onEndSurvey(t)}catch(e){const n=(0,m.KF)(e&&e.message)||"";return(0,f.vW)().uploadLog("skip提交失败 "+n,"warning"),(0,f.vW)().notify((0,p.Iu)(g.bn.global.tryAgain)),x=!1,(0,c.Tb)(t,!1),_}i.s$.trigger("CHECK_FAIL"),(0,f.dU)().network.closeSocket();try{await(0,d.VY)(t),u||(0,a.YU)(e,n,t),await(0,s.nR)(t,n),(0,c.Tb)(t,!1),S(t);const i=await(0,l.$4)("examine_skipped_url",t);if((0,l.GK)(i))return _}catch(t){(0,f.vW)().uploadLog("skip提交后续处理失败"+JSON.stringify(t),"warning")}return y}(t,n,T);if(!O)return async function(t){if(b)return _;b=!0,(0,c.Tb)(t,!0);const e=await(0,o.gS)(t,"check","examine_failed_url"),n=e.answers.length;(0,v.y)(t,"check");try{const o=await(0,r.Im)(e,t.transactionID);return(0,a.lt)(t,n),(0,c.Tb)(t,!1),t.responseStatus=o.status,i.s$.trigger("CHECK_SUBMIT"),y}catch(e){await(0,f.dU)().hook.onEndSurvey(t),await(0,d.VY)(t);const i=(0,r.rR)(e);return P(i)?await E(t,n,"examine_failed_url",i):(b=!1,(0,f.vW)().uploadLog("examine提交失败"+e&&e.message,"warning"),(0,f.vW)().notify((0,p.Iu)(g.bn.global.tryAgain))),(0,c.Tb)(t,!1),_}}(t)}return"end"===L?async function(t,e){if(w)return _;(0,f.dU)().network.closeSocket(),w=!0;const n=k(t,e)||function(t,e){const{renderList:n,startTime:i}=t,r=function(t,e){const n=(0,p.Iu)(g.bn.global.notTarget),{minTime:i,timeLessText:r}=t;return i&&i>e?r||n:""}(t,Math.ceil((Date.now()-i)/1e3));if(r){t.fakeCommitted=!0;const i=n[n.length-1];return(0,f.Pg)(i,{hasReward:!1,title:r}),(0,a.Om)(e,t),!0}return!1}(t,e);(0,c.Tb)(t,!0),(0,v.y)(t,"normal");const b=await(0,o.gS)(t,"normal","committed_url");let x,T;await(0,f.dU)().hook.beforeEndSurvey(t);try{x=await(0,r.SK)(b,t.transactionID);const e=x.response||x;t.responseStatus=e.status,await(0,f.dU)().hook.onEndSurvey(t)}catch(e){const n=(0,r.rR)(e);if(P(n))await E(t,b.answers.length,"examine_failed_on_commit_url",n);else if(n===r.f9.response_overflow){S(t);const e=await(0,l.$4)("overflow_url",t);(0,l.GK)(e)||t.ignoreSubmittingResult||(0,f.vW)().error((0,r.W1)(n)),t.responseStatus="committed",i.s$.trigger("QUOTA_FAIL"),(0,f.dU)().network.closeSocket()}else{const n=(0,m.KF)(e&&e.message)||"";(0,f.vW)().uploadLog("正式提交失败 "+n,"warning"),t.ignoreSubmittingResult||(0,f.vW)().notify((0,p.Iu)(g.bn.global.tryAgain)),(0,c.Tb)(t,!1),w=!1}if(!t.ignoreSubmittingResult)return _;await(0,f.dU)().hook.onEndSurvey(t),x={}}t.formalResult=x;try{await(0,s.nR)(t,e),n?T=await(0,l.$4)("invalid_url",t):((0,a.Kv)(e,t,b.answers.length,x),x.reward&&(0,f.Pg)(e,{hasReward:!0}),await async function(t,e){const{formalResult:{reward:n}}=e;if(n&&"red_envelope"===n.type&&!n.lottery_id&&!(0,f.dU)().app.canHandleReward())return(0,u.ks)(e,t)}(e,t),T=await(0,l.$4)("committed_url",t))}catch(t){(0,f.vW)().uploadLog("正式提交后续处理错误"+JSON.stringify(t))}return await(0,d.VY)(t),(0,c.Tb)(t,!1),S(t),i.s$.trigger("FULL_SUBMIT"),await(0,h.b)(t),(0,l.GK)(T)?_:y}(t,T):e}(t,e,T.prev,T.next);return 0===n.length||"vital"===I.type?I:O(t,I,n)}function k(t,e){const{oneReplyPerTerminal:n,sid:i}=t;return!!e.origin.abandonAnswer&&(t.fakeCommitted=!0,(0,a.eS)(e,t),n&&(0,f.dU)().storage.set(i,"1"),!0)}function S(t){const{oneReplyPerTerminal:e,sid:n}=t;e&&(0,f.dU)().storage.set(n,"1")}async function E(t,e,n,o){(0,a.hR)(t,e),S(t);const s=await(0,l.$4)(n,t);(0,l.GK)(s)||(0,f.vW)().error((0,r.W1)(o)),t.responseStatus="examine_failed",i.s$.trigger("QUOTA_FAIL"),(0,f.dU)().network.closeSocket()}function P(t){return t===r.f9.quota_not_match||t===r.f9.quota_full}},9309:(t,e,n)=>{"use strict";n.d(e,{Wc:()=>V,BN:()=>Y,$A:()=>H,fS:()=>z});var i=n(9564),r=n(6492),o=n(7433),a=n(3087),s=n(5753),c=n(5521),u=n(5589),l=n(152),d=n(8231),f=n(8351),p=n(9026),g=n(2629),m=n(7529),h=n(5142),v=n(6207),y=n(7518),_=(n(3768),n(3151)),w=n(3251),b=n(6866),x=n(3803),T=n(4248),I=n(7550),O=n(248),k=(n(1128),n(5810)),S=n(3656),E=n(5817),P=n(5159),L=n(2167),C=n(4625),N=n(6539),R=n(7428),U=(n(5069),n(3948),n(6060)),A=n(4588);var M=n(565);const D={};var B=n(8343),F=n(5286),W=n(5905);const z=(0,S.Ds)((()=>{(0,T.vW)().realTimePreview||K()||w.s$.trigger("STRETCH_OK")}));function q(t){return!K()&&!(0,M.a)(t,!0)}function j(t){(0,x.q)()||(t.answerChangedSinceStart=!0)}function V(t){t.handleEvents={...k.k,handleQuickAnswer:e=>(j(t),(0,C.M)(e)),async handleLangChange(t){await(0,I.nE)(t.locale,!0)},async handleCascadeInput(t,e,n,i){if(!q(i))return null;const r=(0,_.OJ)(t,e,n,i);return this.handleOptionInput(t,r,i).then((t=>t))},handleOptionAssistInput:(e,n,i,r)=>((0,T.Pg)(i.assistValue,{[n]:e}),j(t),G({result:!0},r)),handleCascadeClick:async(t,e,n)=>q(n)?G(await(0,_.Xl)(t,e,n),n).then((t=>t)):null,async handleMenuClick(t,e){const n=()=>e.options.filter((t=>t.selected)).map((t=>t.text));return q(e)?(await this.handleOptionClick(e.options[t],e),n()):n()},async handleOptionClick(e,n){if(!q(n))return null;const i=await(0,c.W)(e,n);return i.result&&(0,p.cH)(e,n),j(t),G(i,n).then((t=>t))},async handleOptionInput(e,n,i){if(!q(i))return null;const r=await(0,s.wS)(e,n,i);return r.result&&(0,p.nF)(e,n,i),j(t),G(r,i).then((t=>t))},handleAutoCpltInput:async(t,e,n)=>((0,s.LM)(t,e,n),(0,p.EG)(t,e,n)),async handleSequenceInput(e,n,i,r){if(!q(i))return null;const o=r.sortNo,a=await(0,d.O)(e,n,i),s=r.sortNo;if(a.result&&o!==s){const t=i.options.findIndex((t=>t===r));(0,p.OP)(t,i)}return j(t),G(a,i).then((t=>t))},async handleQuestionInput(e,n){if(!q(n))return null;const i=await(0,u.U)(e,n);return i.result&&(0,p.hy)(e,n),j(t),G(i,n).then((t=>t))},handleLocateFailed(e){const n=(0,u.k)(e);return n.result&&(0,p.TY)(e),j(t),G(n,e).then((t=>t))},async handlePrevClick(){if(!(0,T.vW)().realTimePreview&&!X()&&t.prevButton&&!K())return(0,p.g9)(t.current),(0,o.Yz)(t).then((t=>t))},handleMaxDiffInput(e,n,i,r){if(!q(r))return null;const o=(0,l.o)(e,n,i);return j(t),G(o,r).then((t=>t))},async handleNextClick(){if((0,T.vW)().realTimePreview||K()||X()&&(0,o.gB)())return;(0,o.Tb)(t,!0),await(0,B.v)(t);const{current:e}=t;if((0,p.xi)(e),"lottery"===e.type)(0,o.JP)(t,e),(0,o.Tb)(t,!1);else if(await async function(t){const e=t.filter((t=>!!t.origin.backtracking));let n=!1;for(const t of e){const{origin:{backtracking:e},parent:i}=t;if(e.targetNodeUuid){const{logic:r,request:o}=e;let a=await(0,g.Gl)(o,t);if(a.valid&&(a=await(0,g.Rv)(r,i)),n=a.valid,n)return(0,T.Pg)(i,{current:t}),n}}return n}(t.nodes))await async function(t){await(0,S._v)(200);const e=t.current,{backtracking:{targetNodeUuid:n}}=e.origin,r=await async function(t,e){const n=[...t.renderList].reverse(),r=n.findIndex((t=>(0,S.RC)(t.nodeUuid,e)));for(let t=r;t>=0;t--){const e=n[t];if(!(0,i.$X)(e))return e}return n[r]}(t,n);return await async function(t,e){const{renderList:n}=t,i=n.findIndex((t=>t.renderId===e.renderId)),r=n.slice(i).map((({renderId:t})=>t));await(0,b.nX)(t,r),(0,T.Pg)(t,{current:e});const a=(0,A.VE)(t),s=a.indexOf(e),c=a.slice(s),u=[];let l=e.prev;for(const e of c){const{origin:n,loop:i,random:r,loopStack:o}=e,a=(0,f.qG)({target:n,loop:i,random:r,loopStack:o},t),s=await(0,f.D1)(a,l);l=s,u.push(s)}await(0,T.dU)().hook.beforeGotoNext(),(0,T.Pg)(t,{current:u[0],nodes:a.slice(0,s).concat(u),renderList:n.slice(0,i).concat(u)}),(0,o.Tb)(t,!1),w.s$.trigger("NEXT_OK"),(0,w.cs)(t.current,!0)}(t,r),(0,E.bR)(t),await(0,b.sB)(t),await(0,U.b)(t),r}(t),(0,o.Tb)(t,!1);else if(await(0,o.Bm)(t)){if(!X())return(0,o.eM)(t);(0,o.n0)(t)}else(0,o.Tb)(t,!1)}},Object.keys(t.handleEvents).forEach((e=>{const n=t.handleEvents[e];t.handleEvents[e]=async(...e)=>{(0,m.$V)(t,t.current);const i=await n.apply(t.handleEvents,e);return(0,m.$V)(t,t.current),i}}))}function X(){return(0,T.vW)().surveyState.refreshing}function K(){return(0,T.vW)().surveyState.nextLoading||X()}async function G(t,e){(0,W.LK)(e)&&await(0,F.y)(e),(0,w.cs)(e),await(0,b.p9)(e);const n=e.parent;return(0,T.vW)().realTimePreview||(n.inSingleGroup?((0,T.Pg)(n,{current:e}),await(0,m.BW)(n,e,{type:"page_inner",delay:60})):z()),(0,w.yp)(e),t.result}function H(t,e={}){return t=t||(0,T.vW)().surveyState,(0,T.Pg)(t,{renderList:[],current:null,loopStack:[],randomList:[],...e}),Z(t)}async function Z(t){(0,o.Tb)(t,!0);const e=t.nodeList,n=(0,i.Jz)(e),a=await(0,r.tP)(e,t,n);!function(t,e){const n=(new Date).getTime();(0,T.Pg)(t,{nextBtnText:e.nextBtnText||(0,I.Iu)(P.bn.global.next),prevBtnText:e.prevBtnText||(0,I.Iu)(P.bn.global.previous),prevEnabled:!0===e.goBackEnabled,startTime:n,currentStartTime:n})}(t,n),await(0,o.__)(t,a,null);const{current:s}=t,c=(0,i.$X)(s),u=(0,A.Fr)(t);if(c||u){const e=u?"page_inner":"page_next";await(0,m.BW)(t,s,{type:e,initial:!0})}else(0,T.Pg)(t,{renderList:[s]}),await(0,U.b)(t),z();(0,E.bR)(t);const l=t.current;return l.reached=!0,(0,p.DM)(t,l),w.s$.trigger("START_OK"),await(0,b.O2)(t),s!==l&&await(0,y.C)(t,{valid:!0,message:""},s,l),(0,w.cs)(t.current,!0),(0,o.Tb)(t,!1),t}async function Y(){const t=(0,T.dU)();if((0,T.vW)().surveyState)return(0,T.vW)().surveyState;const e=await async function(){const t=(0,T.vW)().sid,e=(0,T.vW)().startState;if(!e)return(0,T.dU)().app.gotoStartPage((0,N.ZI)()),(0,T.vW)().customAbort(),null;if((0,T.vW)().preview)return e;const{parsedPayload:{surveyMeta:n}}=e,{payload_digest:i,channel:r,interviewee:o}=n;!function(t,e){(0,T.dU)().dev.autoRun||(0,T.dU)().storage.get(t)&&e&&!(0,T.vW)().preview&&((0,T.vW)().error((0,I.Iu)(P.bn.global.antiAgain)),(0,T.vW)().customAbort())}(t,!1===n.collector.multiple_response);const a={code:t,payload_digest:i,platform:r.type,interviewee_id:o&&o.id,query_params:(0,N.ZI)()};try{const t=await(0,h.yU)(a);return e.transactionID=t.id,e.status=t.status,e.platform=t.platform,e.digest=i,e.channel=r,(0,T.dU)().network.connectSocket(t.id,n.collector.id),e}catch(t){throw(0,h.gU)(t),t}}();if(!e)return null;await async function(t){const{parsedPayload:e,startNode:n,language:i}=t;if(!(0,T.vW)().preview&&!e.surveyMeta.start_auto){const{surveyMeta:{diagram_url:t}}=e;let n;try{n=await(0,h.vT)(t,{type:"GET"},!0)}catch(t){throw(0,T.vW)().error((0,I.Iu)(P.bn.global.downloadError)),t}const i=await(0,L.Z)(n);e.nodeList=(0,v.AK)(i.nodes,e.nodeGroups)}(0,O.iZ)(n.autoCpltGroups,i);const{nodeList:r,variables:o,nodeGroups:a}=e;if(n.currentLang!==i){const t=e.langs.find((t=>t.locale===i));if(t){const e=await async function(t,e){if(!D[t.locale]){const e=async()=>{let e;if(t.content)e=t.content;else{const n=await(0,h.vT)(t.url,{type:"GET"},!0);e=await(0,L.Z)(n)}return e};D[t.locale]=e()}return D[t.locale]}(t);(0,O.pe)({nodes:r,variables:o,groups:a},e)}}}(e);const n=function(t){const{parsedPayload:e,userInfo:n,theme:i,hasVar:r,sid:o,langTable:s,startNode:c,surveyId:u,summary:l,language:d,images:f,langResume:p,title:g,transactionID:m,status:h,platform:v,digest:y,channel:_,useCustomLogo:b,logoText:x,logoImageUrl:I,logoImageShowWidth:O,showLogoInEachPage:k,imageList:S,varStyles:E,variables:P,nodeGroups:L,embedApis:C}=t,{nodeList:N,surveyMeta:U,testCases:A}=e;let M=!1;(0,R.s)()||U.collector&&(M=!1===U.collector.multiple_response);const{fakedServers:D,autoCpltGroups:B,noWxShare:F,previewShadowNodes:W,previewQuickAnswer:z,ignoreSubmittingResult:q,qNumberRequired:j,asterisksRequired:X,progressBarRequired:K,nodeTypeInfoRequired:G,limitTime:H,minTime:Z,timeoutText:Y,timeLessText:$,resumeEnabled:J}=c,Q={embedApis:C,nodeGroups:L,variables:P,varStyles:E,imageList:S,useCustomLogo:b,logoText:x,logoImageUrl:I,logoImageShowWidth:O,showLogoInEachPage:k,enterMode:"start",answerChangedSinceStart:!1,previewShadowNodes:W&&!(0,T.dU)().dev.autoRun,previewQuickAnswer:z,ignoreSubmittingResult:q,langResume:p,langTable:s,testCases:A,progress:0,resumeEnabled:J||(0,R.s)(),images:f,eventHub:w.s$,language:d,sid:o,parsedPayload:e,digest:y,channel:_,transactionID:m,status:h,platform:v,fakedServers:D,autoCpltGroups:B,noWxShare:F,theme:i,userInfo:n,responseStatus:"created",context:{node:void 0,option:void 0},completeUrl:"",quotaFullUrl:"",screenOutUrl:"",title:g,summary:l,bonusLimitTime:"",nodeList:N,companyID:"",oneReplyPerTerminal:M,surveyId:u,qNumberRequired:j,asterisksRequired:X,progressBarRequired:K,nodeTypeInfoRequired:G,preview:(0,T.vW)().preview,nextBtnText:"",prevBtnText:"",prevEnabled:!1,randomList:[],loopStack:[],startTime:0,currentStartTime:0,renderList:[],current:void 0,limitTime:H||void 0,minTime:Z,timeoutText:Y||"",timeLessText:$||"",timer:-1,restTime:(0,a.IA)(H),hasVar:r,nextLoading:!1,refreshing:!1,phoneUsed:!1,phoneNumber:"",startNode:c,nodes:[],prevButton:"",nextButton:"",inSingleGroup:null,needProgressBar:!1};return V(Q),Q}(e);return(0,T.vW)().surveyState=n,t.network.initUploader(),await async function(t){const{startNode:e}=t,n=(0,f.qG)({target:e},t),i=await(0,g.lq)(n,!0);i.valid?t.initValidationPassed=!0:((0,T.vW)().error(i.message||(0,I.Iu)(P.bn.verify.failed)),(0,T.vW)().customAbort())}(n),await async function(t){if(await Z(t),function(t){let e=t.limitTime;e&&(t.timer=setInterval((async()=>{e--,e||((0,p.r)(t),clearInterval(t.timer),(0,b.VY)(t),(0,T.vW)().error(t.timeoutText||(0,I.Iu)(P.bn.global.timeOver))),(0,T.Pg)(t,{restTime:(0,a.IA)(e)})}),1e3))}(t),t.langResume||t.resumeEnabled&&!(0,T.vW)().preview){const e=await(0,x.m)(t);(0,T.Pg)(t,{answerResumer:e}),t.langResume&&setTimeout((()=>t.answerResumer.handleSure()),1e3)}t.answerResumer&&t.answerResumer.show||(0,T.dU)().hook.onStartNewSurvey(t)}(n),await t.hook.afterFetchSurvey(n),n}},5810:(t,e,n)=>{"use strict";n.d(e,{k:()=>f});var i=n(5159),r=n(3892),o=n(9026),a=n(5142),s=n(4248),c=n(7550),u=n(3656);const l={};function d(t){const e=l[t]||0;return Date.now()-e<3e4?((0,s.vW)().notify((0,c.Iu)(i.bn.verify.tooFrequent)),null):()=>{l[t]=Date.now()}}const f={handleInputPhone(t,e){return this.handleQuestionInput({phoneNumber:t},e)},handleInputCode(t,e){return this.handleQuestionInput({code:t},e)},handleAutoLocate(t,e){return this.handleQuestionInput(t,e)},handleManualLocate(t,e){return this.handleQuestionInput(t,e)},handleGetCodeClick:t=>async function(t){return(0,u.is)(t,"verify"===t.type)?async function(t){const{parent:e,nodeUuid:n,phoneNumber:u,validateType:l}=t,{transactionID:f}=e;let p={response_id:f,question_id:n};if("sms"===l){if((0,s.vW)().preview)return(0,s.vW)().notify((0,c.Iu)(i.bn.preview.noMessage)),!1;if(!u||!(0,r.xT)(u))return(0,s.vW)().notify((0,c.Iu)(i.bn.fill.needPhoneNumber)),!1;const n=d(t.renderId);if(!n)return!1;p={...p,phone_num:u},t.messageGetFailed=!1;try{const i=await(0,a.bp)(p);t.serverValidations=i,e.phoneNumber=u,e.phoneUsed=i.phone_num_used,e.phoneUsed&&(0,o.wH)(e,t),n()}catch(e){return t.messageGetFailed=!0,!1}}else if("image"===l){const e=await(0,a.bp)(p);t.serverValidations=e,(0,s.Pg)(t,{captcha:e.image})}return!0}(t):async function(t){if((0,s.vW)().preview)return(0,s.vW)().notify((0,c.Iu)(i.bn.preview.noMessage)),!1;const{phoneNumber:e,rewardId:n}=t;if(!(0,r.xT)(e))return(0,s.vW)().notify((0,c.Iu)(i.bn.fill.needPhoneNumber)),!1;const o=d(t.renderId);if(!o)return!1;t.messageGetFailed=!1;try{await(0,a.O0)({phone_num:e},n),o()}catch(e){return t.messageGetFailed=!0,!1}return!0}(t)}(t)}},2435:(t,e,n)=>{"use strict";n.d(e,{QP:()=>l,Rj:()=>u,UW:()=>f,bj:()=>s,hm:()=>c,jw:()=>p,t:()=>d,uZ:()=>a}),n(5306),n(3948);var i=n(6064),r=n(5838),o=n(6935);function a(t,e){return(0,i.O2)(e)||t.length<=e?[...t]:s(t.map((t=>({...t.option,cascade:t}))),e).map((t=>t.cascade))}function s(t,e){return(0,i.O2)(e)||t.length<=e?[...t]:d(t.map((t=>{const e=t.origin.inferList.reduce(((t,e)=>(e.active&&"select"===e.type&&(t+=e.weight),t)),0);return{option:t,weight:e}})),e).map((t=>t.option))}function c(t){return t.filter((t=>{const{option:e}=t;return!(!e||!e.origin.inferList)&&e.origin.inferList.some((t=>t.active))}))}function u(t,e){return t.filter((t=>t.origin.inferList.some((t=>t.active&&t.type===e))))}async function l(t,e){if(!t)return;const n=e.parent;t.origin.inferList=t.origin.inferList||[];for(const e of t.origin.inferList){const{activeConfig:i}=e;i?(n.context.option=t,e.active=await(0,r.Q3)(n,i),n.context.option=null):e.active=!0}}function d(t,e){if(t=[...t],(0,i.O2)(e)||t.length<=e)return t;const n=t.reduce(((t,e)=>t+e.weight),0);let r=0,o=0,a=t.map((t=>{const e=t.weight/n;o=r+e;const i={item:t,floor:r,ceil:o};return r=o,i}));const s=[];for(;s.length<e;){const t=Math.random()*o,e=a.find((e=>e.floor<=t&&e.ceil>t));e&&(s.push(e.item),a=a.filter((t=>t!==e)))}return s}async function f(t,e){const{parent:n}=e,i=[];for(const e of t)i.push(await(0,o.e_)(e.candidates,{state:n,joinBy:","}));return i.join(",")}function p(t){const e={},n=[];return t.split(",").forEach((t=>{let i=t,r=1;const o=t.match(/\(([\d\.]+)\)$/);o&&(i=t.replace(/\([\d\.]+\)$/,""),r=parseFloat(o[1]));const a=e[i];if(a)a.weight+=r;else{const t={text:i,weight:r};n.push(t),e[i]=t}})),n.filter((t=>0!==t.weight))}},9896:(t,e,n)=>{"use strict";n.d(e,{B3:()=>h,Bc:()=>d,I$:()=>v,Sl:()=>w,W7:()=>f,a2:()=>m,yE:()=>p}),n(5306),n(3210);var i=n(1128),r=n(3656),o=n(3892),a=n(2435),s=n(5142);let c=null;async function u(t,e){let{start:n,end:i}=await(0,o._2)(t,e);return n===-1/0&&(n=-9999,n>i&&(n=i-9999)),i===1/0&&(i=9999,i<n&&(i=n+9999)),{start:n,end:i}}function l(t,e,n){return!!e&&e.some((e=>{if(e.startsWith("/")&&e.endsWith("/")){const n=e.substring(1,e.length-1),i=new RegExp(n);return!!t.match(i)}return n?n(t,e):t===e}))}async function d(t,e,n){let i=0,r=await t();for(;l(r,e,n);)if(r=await t(),i++,i>10)throw new Error("Hard to infer, rejected 10 times");return r}async function f(t,e,n=1){if(!t.origin.inferList)return{value:"",antis:null};const i=t.origin.inferList.filter((t=>t.active&&"input"===t.type));if(0===i.length)return{value:"",antis:null};const r=await(0,a.UW)(i,e);if(""===r.replace(/,/g,""))return{value:"__FORCE_EMPTY__",antis:null};const o=[];if(r.split(",").forEach((t=>{t.startsWith("!")?o.push(t.substring(1)):t.match(/\(0\)$/)&&o.push(t.replace(/\(0\)$/,""))})),o.length)return{value:"",antis:o};const s=(0,a.jw)(r);return{value:(0,a.t)(s,n).map((t=>t.text)).join(","),antis:null}}function p(){return"1"+h(1e9,9999999999)}function g(t){return c[t]||Math.random().toString().replace("0.","")}async function m(){return c||(c=await(0,s.vT)("https://media.choiceform.com/infer/infer.json",{type:"GET",contentType:"application/json"},!1),c)}function h(t=0,e=10,n=0){const i=Math.pow(10,n);return t*=i,e*=i,((0,r.xT)(t,e)/i).toString()}function v(t,e=1,n=10){let i=g(t);for(;i.length<n;)i+=g(t);const o=i.length,a=(0,r.xT)(n,o),s=a-(0,r.xT)(e,n),c=i.substring(s,a);return""===c.trim()?v(t,e,n):c}function y(t=0,e=5e3,n=3){t=Math.max(t,0),e=Math.min(e,5e3);let i=(0,r.xT)(t,e).toString();return n>1&&(i=i+" "+(0,r.xT)(1,12)),n>2&&(i=i+" "+(0,r.xT)(1,28)),i}const _={};async function w(t,e){const n=_[t.origin.fillType]||_.none,i=await n(t,e);return"__FORCE_EMPTY__"===i?"":i}_.auto_complete=async(t,e)=>{let{completeGroups:n}=t;const{itemsMax:o,itemsMin:a}=await(0,i.y4)(t,e),s=(0,r.xT)(a,o)||1,{value:c,antis:u}=await f(t,e,s);return c||(u&&(n=n.filter((t=>!l(t.name,u)))),(0,r.DQ)(n,s).map((t=>t.name)).join(","))},_.chars=async(t,e)=>{const{value:n,antis:i}=await f(t,e);if(n)return n;const{tolerance:r}=t.origin,{start:o,end:a}=await u(t,e);return d((()=>!r||0===r.length||r.includes("chinese")?v("chinese",o,a):r.includes("alphabet")?v("alphabet",o,a):v("number",o,a)),i)},_.date=async(t,e)=>{const{value:n,antis:i}=await f(t,e);if(n)return n;const{grade:r}=t,{start:o,end:a}=await u(t,e);return d((()=>y(o,a,r)),i)},_.date_range=async(t,e)=>{const{value:n,antis:i}=await f(t,e);if(n)return n;const r=y(1960,2050,3),o=Number(r.split(" ")[0]);return d((()=>{const t=y(o,2060);return r+" - "+t}),i)},_.email=async(t,e)=>{const{value:n,antis:i}=await f(t,e);return n||d((()=>((0,r.BY)(1,6)+"@"+(0,r.BY)(1,6)+"."+(0,r.BY)(1,4)).toLowerCase()),i)},_.float=async(t,e)=>{const{value:n,antis:i}=await f(t,e);if(n)return n;const{scale:r}=t;return d((async()=>{const{start:n,end:i}=await u(t,e);return h(n,i,r)}),i)},_.integer=async(t,e)=>{const{value:n,antis:i}=await f(t,e);if(n)return n;const{start:r,end:o}=await u(t,e);return d((()=>h(r,o)),i)},_.list_select=async(t,e)=>{let{selectList:n}=t;const{itemsMax:o,itemsMin:a}=await(0,i.y4)(t,e),s=(0,r.xT)(a||1,o||1)||1,{value:c,antis:u}=await f(t,e,s);return c||(u&&(n=n.filter((t=>!l(t,u)))),(0,r.DQ)(n,s).join(","))},_.none=async(t,e)=>{const{value:n,antis:i}=await f(t,e);return n||d((()=>v("chinese",1,10)),i)},_.phone_number=async(t,e)=>{const{value:n,antis:i}=await f(t,e);return n||d((()=>p()),i)},_.postcode=async(t,e)=>{const{value:n,antis:i}=await f(t,e);return n||await d((()=>h(1e5,999999)),i)},_.time=async(t,e)=>{const{value:n,antis:i}=await f(t,e);return n||await d((()=>h(1,25)+":"+h(1,60)),i)},_.time_range=async(t,e)=>{const{value:n,antis:i}=await f(t,e);return n||await d((()=>{const t=h(1,20);return t+":"+h(1,60)+" - "+h(Number(t)+1,24)+":"+h(1,60)}),i)},_.time_duration=async(t,e)=>{const{value:n,antis:i}=await f(t,e);if(n)return n;const{grade:r}=t;return await d((()=>{if(r<=3){let t=h(1,20)+"d";return r>1&&(t+=" "+h(1,24)+"h"),r>2&&(t+=" "+h(1,60)+"m"),t}{let t=h(1,60)+"h";return r>4&&(t+=h(1,60)+"m"),r>5&&(t+=h(1,60)),t}}),i)},_.url=async(t,e)=>{const{value:n,antis:i}=await f(t,e);return n||await d((()=>("https://"+(0,r.BY)(1,3)+"."+(0,r.BY)(1,6)+"."+(0,r.BY)(1,3)).toLowerCase()),i)}},4625:(t,e,n)=>{"use strict";n.d(e,{M:()=>F}),n(2707),n(3948);var i=n(9564),r=n(3656),o=n(1128),a=n(9896),s=n(6935),c=n(4248),u=n(9309),l=n(2435),d=n(6064),f=n(8064),p=n(5905);async function g(t,e){const n={};t.sortNo&&(n.sortNo=-1),t.selected&&(n.selected=!1),t.value&&(n.value=""),await(0,l.QP)(t,e),(0,c.Pg)(t,n)}async function m(t,e){(0,c.Pg)(t,{selected:!1}),t.option.origin&&await(0,l.QP)(t.option,e),t.list&&t.list.forEach((t=>m(t,e)))}async function h(t){(0,p.iN)(t)&&(0,c.Pg)(t.video,{ended:!0});let e=[];(0,p.Kf)(t)&&(e=[...e,...t.options]),(0,p.sy)(t)&&(e=[...e,...t.otherOptions]);for(const n of e)await g(n,t);const{cascade:n}=t;n&&await m(n,t)}var v=n(45);const y={doc:"os/client/o_1dn9kbm3u1f4d1tsudcg1fuh17678.txt",image:"os/client/o_1dn9kbq468tj1kq2dt3qeo1pumd.png",video:"os/client/o_1dn9kpohua8v1jv51oobq981dvv8.mp4",audio:"os/client/o_1dn9l7gbs1maj1e3nn941e6p125gj.mp3"},_={};function w(t){const{regions:e}=t,n=t.infoRange||"county",i=function(t){const e=S((0,o.eu)(t),1)[0];return!e||e.isOtherOpt?null:e.origin.inferList.some((t=>t.active))?e:null}(t);if(i){const t=i.text.split("-");return{address:t,indexes:(0,f.xR)(t,e),point:{lat:i.origin.latitude,lng:i.origin.longitude}}}{const t=(0,r.XJ)(e.length);let i=(0,d.KF)(t);const o=e[t],a=[o.name,"",""];if("province"!==n){const t=(0,r.XJ)(o.cities.length),e=o.cities[t];if(a[1]=e.name,i=i+" "+t,"city"!==n){const t=(0,r.XJ)(e.areas.length),n=e.areas[t];n&&(a[2]=n.name,i=i+" "+t)}}return{address:a,indexes:i,point:{lng:0,lat:0}}}}async function b(t,e){const{value:n}=await(0,a.W7)(t,e);if(n)return"__FORCE_EMPTY__"===n?"":n;const{fileLimits:i}=t,o=(0,r.DQ)(i,1)[0];return y[o]}async function x(t,e){const n=[],i=[];t.forEach((t=>{if((0,o.c1)(t.origin))n.push(t);else{let e=!0;(0,v.Cp)(t.origin)&&(0,d.O2)(t.origin.inferList)&&(e=Math.random()>.9),e&&i.push(t)}})),await E(i,e,1);const a=(0,r.xT)(1,n.length);O(n,e,a)}async function T(t,e){const{parent:n,origin:i}=e;let o=await(0,s.Ob)(i.fillMin,{state:n});o=o||0;let a=t.length;o&&i.inputInferLimit>o&&i.inputInferLimit<a&&(a=i.inputInferLimit);const c=o?(0,r.xT)(o,a):a;return(0,r.DQ)(t,c)}async function I(t,e){t.parent.context.option=e;const n=await(0,a.Sl)(e,t);return t.parent.context.option=null,await t.parent.handleEvents.handleOptionInput(n,e,t)}function O(t,e,n){(0,r.DQ)(t,n).forEach((t=>I(e,t)))}async function k(t,e){if(await t.parent.handleEvents.handleOptionClick(e,t),e.useComment)return I(t,e)}function S(t,e){const n=(0,l.Rj)(t,"select"),i=[],o=[];if(n.forEach((t=>{t.origin.inferList.every((t=>0===Number(t.weight)))||t.disabled?i.push(t):o.push(t)})),o.length>0)return(0,l.bj)(o,e);{let n=t.filter((t=>!t.disabled));return i.length>0&&(n=t.filter((t=>!i.includes(t)))),(0,r.DQ)(n,e)}}async function E(t,e,n){const i=S(t,n).sort(((t,e)=>(0,v.Cp)(t.origin)?1:(0,v.pL)(t.origin,e.origin)));for(const t of i)await k(e,t)}async function P(t,e){const{multiple:n,min:i,max:o,list:a}=t;if(!a)return;const s=function(t,e){const n=(0,l.hm)(t);return n.length>0?(0,l.uZ)(n,e):(0,r.DQ)(t,e)}(a,n?(0,r.xT)(i||1,o||1):1);for(const n of s){const i=a.indexOf(n);await e.parent.handleEvents.handleCascadeClick(i,t,e),await P(n,e)}}async function L(t){const e=(0,o.eu)(t),n=t.origin;let a=1;if((0,i.qX)(n)){const e=await(0,i.gx)(t,t.parent),{min:o}=e;let{max:s}=e;const{selectInferLimit:c}=n;c>o&&c<s&&(s=c),a=(0,r.xT)(o||1,s)}const s=[],c=[];e.forEach((t=>{(0,o.c1)(t.origin)?c.push(t):s.push(t)})),await E(s,t,a);const u=(0,r.xT)(1,c.length);O(c,t,u)}function C(t,e){const n=[];for(let i=t;i<=e;i++)n.push(i);return n}function N(t,e,n){const i=[];for(let r=t;r<e;r+=n)i.push(r);return i.push(e),i}async function R(t,e,n){const i=[...n].sort(),{value:o,antis:s}=await(0,a.W7)(t,e,1);if(o){if("__FORCE_EMPTY__"===o)return"0";{const t=i[0],e=i[i.length-1];return o<t?t:o>e?e:o}}{const t=()=>(0,r.DQ)(n,1)[0];return(0,a.Bc)(t,s)}}function U(t){let[e,n]=t.split("~").map((t=>Number(t)));return e>n&&([n,e]=[e,n]),[e,n]}function A(t,e,n){const[i,o]=t.split("_");let a,s;if(i.includes("~")){const[t,e]=U(i);a=(0,r.xT)(t,e)}else a=Math.min(Math.max(Number(i),0),e);if(o.includes("~")){const[t,e]=U(o);s=(0,r.xT)(t,e)}else s=Math.min(Math.max(Number(o),0),n);return{x:a,y:s}}function M(t,e){const[n,i]=t.split("_").map((t=>Number(t))),[r,o]=e.split("_");let a=!1,s=!1;if(r.includes("~")){const[t,e]=U(r);a=t<=n&&n<=e}else a=Number(r)===n;if(o.includes("~")){const[t,e]=U(o);s=t<=i&&i<=e}else s=Number(o)===i;return a&&s}async function D(t,e){const{value:n,antis:i}=await(0,a.W7)(t,e,1),{mapImgHeight:o,mapImgWidth:s}=e;if(n)return"__FORCE_EMPTY__"===n?null:A(n,s,o);{const t=()=>(0,r.XJ)(s)+"_"+(0,r.XJ)(o);return A(await(0,a.Bc)(t,i,M),s,o)}}function B(t,e){let n=e.filter((e=>!(-1!==e.sortNo||!e.origin.inferList)&&e.origin.inferList.some((e=>{if(!e.active)return!1;const n=(0,l.jw)(e.candidates),i=(0,l.t)(n,1);return i.length>0&&Number(i[0].text)<=t}))));0===n.length&&(n=e.filter((t=>-1===t.sortNo)));const i=(0,r.DQ)(n,1)[0];i&&(0,c.Pg)(i,{sortNo:t,selected:!0})}async function F(t){return await(0,a.a2)(),async function(t,e){const{type:n,readonly:i}=t;if(i)return(0,u.fS)();await h(t);const r=_[n]||L;await r(t)}(t)}_.select=L,_.value_mark=async t=>{const{options:e,otherOptions:n}=t,i=await T(e,t);for(const e of i){const n=e.minValue||1,i=e.maxValue||5,r=e.step,o=await R(e,t,N(n,i,r).map((t=>(0,d.KF)(t))));await t.parent.handleEvents.handleOptionInput(o,e,t)}await x(n,t)},_.heat_map=async t=>{const{options:e,otherOptions:n}=t;for(const n of e){const e=await D(n,t);e&&await t.parent.handleEvents.handleQuestionInput(e,t)}await x(n,t)},_.icon_mark=async t=>{const{options:e,otherOptions:n}=t,i=await T(e,t);for(const e of i){const n="rating-nps"===e.iconName,i=n?0:1,r=(n?e.iconCount-1:e.iconCount)||5,o=await R(e,t,C(i,r).map((t=>(0,d.KF)(t))));await t.parent.handleEvents.handleOptionInput(o,e,t)}await x(n,t)},_.slide_rate=async t=>{const{options:e,rateOptions:n,otherOptions:i}=t,r=await T(e,t),o=n.map((t=>t.value));for(const e of r){const n=await R(e,t,o);await t.parent.handleEvents.handleOptionInput(n,e,t)}await x(i,t)},_.weight=async t=>{let{weightTotal:e}=t;const{options:n,otherOptions:i}=t;e<=0&&(e=100);const o=[],a=[];n.forEach((t=>{const{inferList:e}=t.origin;e&&e.some((t=>t.active))?o.push(t):a.push(t)}));const s=[];for(const n of o){const i=n.origin.inferList.filter((t=>t.active)),r=await(0,l.UW)(i,t),o=(0,l.jw)(r),a=(0,l.t)(o,1),c=Number(a[0].text);s.push(c),e-=c}const c=(0,r.FL)(e,a.length),u=s.concat(c),d=o.concat(a);for(const[e,n]of d.entries()){const i=u[e];await t.parent.handleEvents.handleOptionInput(i.toString(),n,t)}await x(i,t)},_.fill=async t=>{const{options:e,otherOptions:n}=t,i=await T(e,t);for(const e of i)await I(t,e);await x(n,t)},_.sequence=async t=>{const{options:e,otherOptions:n}=t,i=e.length;let r=1;for(;r<=i;)B(r,e),r+=1;e.sort(((t,e)=>t.sortNo>e.sortNo?1:-1)),await x(n,t),(0,u.fS)()},_.cascade=async t=>{const{cascade:e,otherOptions:n}=t;return await P(e,t),x(n,t)},_.describe=async()=>{(0,u.fS)()},_.max_diff=async t=>{const e=function(t){const e=[],{options:n,itemCountPerTask:i,taskCount:r}=t,o=Math.ceil(r*i/n.length);return t.options.forEach((t=>{if(!t.origin.inferList)return;let n=t.origin.inferList.reduce(((t,e)=>(e.active&&(t+=e.candidates.split(",").map((t=>Number(t)||0)).reduce(((t,e)=>t+e),0)),t)),0);n>o?n=o:n<-o&&(n=-o),n&&e.push({needValue:n,option:t})})),e}(t),{tasks:n,parent:{handleEvents:i}}=t;for(const o of n){let n=o.items.find((t=>e.find((e=>{const n=e.option===t.option&&e.needValue>0;return n&&(e.needValue-=1),n})))),a=o.items.find((t=>e.find((e=>{const n=e.option===t.option&&e.needValue<0;return n&&(e.needValue+=1),n}))));if(!n){const t=o.items.filter((t=>e.every((e=>e.option!==t.option))));n=(0,r.DQ)(t,1)[0]}if(!a||a===n){const t=o.items.filter((t=>e.every((e=>e.option!==t.option))&&t!==n));a=(0,r.DQ)(t,1)[0]}await i.handleMaxDiffInput(1,n,o,t),await i.handleMaxDiffInput(-1,a,o,t)}},_.upload=async t=>{const{options:e,otherOptions:n}=t,{min:o,max:a}=await(0,i.Fy)(t,t.parent),s=(0,r.xT)(o||1,a),c=(0,r.DQ)(e,s);for(const e of c)await t.parent.handleEvents.handleOptionInput({filePath:await b(e,t)},e,t);await x(n,t)},_.region=t=>{const{indexes:e}=w(t);return t.parent.handleEvents.handleQuestionInput(e,t)},_.location=t=>{const{address:e,point:n}=w(t),i={address:{province:e[0],city:e[1],district:e[2],country:""},point:{lat:n.lat||Number((0,a.B3)(0,90)),lng:n.lng||Number((0,a.B3)(0,180))}};return t.parent.handleEvents.handleQuestionInput(i,t)},_.area=_.location,_.matrix=async t=>{const{options:e,flatten:n,otherOptions:o,origin:a}=t,{min:s,max:c}=await(0,i.gx)(t,t.parent);if((0,i.Ir)(a))await E(e,t,1);else if((0,i.Rx)(a)){let e=n;const i=n[0].list.length;n.length>i&&(e=(0,r.DQ)(n,i));const o=[];for(const n of e){const e=n.list.filter(((t,e)=>!o.includes(e)));if(0===e.length)break;await E(e,t,1);const i=n.list.findIndex((t=>t.selected));o.push(i)}}else if((0,i.Lk)(a)||(0,i.zR)(a))for(const e of n)await E(e.list,t,1);else if((0,i.mI)(a)||(0,i.lE)(a))for(const e of n){const n=(0,r.xT)(s||1,c);await E(e.list,t,n)}else if((0,i.Zu)(a)){const n=(0,r.xT)(s||1,c);await E(e,t,n)}await x(o,t)},_.end=async()=>{},_.verify=t=>t.parent.handleEvents.handleQuestionInput({phoneNumber:(0,a.yE)(),code:(0,a.I$)("number")},t)},9911:(t,e,n)=>{"use strict";n.d(e,{U:()=>u,x:()=>c}),n(5306),n(3948);var i=n(4248);const r=[],o=[/^https:\/\/[^.]+\.choiceform\.com\//,/^http:\/\/localhost/],a={};async function s(t,e){if(!a[t]){const n=async()=>{const n=(0,i.dU)().network.getFakeHost();if(!function(t){return o.some((e=>!!t.match(e)))}(t))throw new Error("can not load plugin files from untrusted site: "+t);n.currentSpace=t,await(0,i.dU)().network.loadFakeFile("".concat(t,".js"),{crossorigin:"anonymous"},e),n.currentSpace="",r.push(t)};a[t]=n()}return a[t]}async function c(t){const e=(0,i.dU)().network.getFakeHost().fakedServers;if(!e[t]){const e=t.replace(/\/[^/]+$/,"");await s(e,!0)}return e[t]}async function u(t,e){let n=t.startNode.fakedServers.concat(function(t){if((0,i.vW)().preview)return[];const e="FAKE:",{parsedPayload:{surveyMeta:{collector:{sampler_config:n}}}}=t;return n?["committed_url","examine_failed_url","examine_skipped_url","invalid_url"].reduce(((t,i)=>{const r=n[i];if(r&&0===r.indexOf(e)){const n=r.substring(e.length,r.lastIndexOf("/"));-1===t.indexOf(n)&&t.push(n)}return t}),[]):[]}(t));if(n=n.filter((t=>!r.includes(t))),n&&0!==n.length)for(const t of n)await s(t,e)}},5497:(t,e,n)=>{"use strict";n.d(e,{l:()=>r});const i={actions:[]};function r(t){i.actions.push(t)}},9026:(t,e,n)=>{"use strict";n.d(e,{Bt:()=>W,DM:()=>G,EG:()=>T,FA:()=>F,Fv:()=>K,Kv:()=>B,L$:()=>b,OP:()=>O,Om:()=>A,TY:()=>k,Ts:()=>H,UW:()=>C,WJ:()=>P,YU:()=>N,cH:()=>x,do:()=>j,eS:()=>M,eq:()=>q,g9:()=>E,hR:()=>R,hy:()=>S,lt:()=>U,nF:()=>I,oA:()=>V,qu:()=>z,r:()=>D,wH:()=>w,xi:()=>L}),n(1817);var i=n(3087),r=n(9310),o=n(3656),a=n(6935),s=n(3803),c=n(5142),u=n(1128),l=n(4248),d=n(6539),f=n(5905);let p=[],g=-1;function m(){const{dev:{local:t}}=(0,l.dU)(),{preview:e,realTimePreview:n,hostConfig:{recordUrl:i}}=(0,l.vW)();return!(t||e||n||!i)}function h(t,e=!1){if((0,s.q)()&&(!e||"start"===t.type))return;t.description=(0,a.mP)(t.description);const n=t.description;if(m()){const i=p[p.length-1];i&&(n.indexOf(i.description)>-1||i.description.indexOf(n)>-1)&&p.pop(),p.push(t),e&&v()}}function v(){if(m()){if(clearTimeout(g),p.length>0){const t=p;p=[];const e=(0,l.vW)().hostConfig.recordUrl;(0,c.o1)(e,{type:"POST",data:{records:t}})}g=setTimeout(v,1e4)}}function y(t,e,n,i,r){var o,a,s;const{surveyId:c,transactionID:u,userInfo:f}=n;let p,g,m,h,v,y,_;if(("gift"===i||"start"===i&&f)&&(p=f.nickname,g=f.openid,p&&(h=(0,l.dU)().name)),"start"===i&&(m=JSON.stringify((0,d.ZI)())),e&&t){const e=t;e.yid?(y=e?e.yid:void 0,_=e?e.xid:void 0):v=t?t.uuid.toLowerCase():void 0}return{survey_id:c,collector_id:null===(s=null===(a=null===(o=n.parsedPayload)||void 0===o?void 0:o.surveyMeta)||void 0===a?void 0:a.collector)||void 0===s?void 0:s.id,response_id:u,node_id:e?e.nodeUuid.toLowerCase():void 0,option_id:v,row_option_id:y,col_option_id:_,description:r,type:i,recorded_at:new Date,provider:h,user_name:p,user_id:g,query_params:m}}function _(t){const e=(0,f.LK)(t)?t.title:"",n=t.loop?"[".concat(t.nodeName,":").concat(e,"]"):"[".concat(t.nodeName,"]");return(0,a.mP)(n)}function w(t,e){(0,l.dU)().dev.infer||h(y(null,e,t,"used_phone","在题目:".concat(_(e),"中检测到重复使用的手机号:").concat(t.phoneNumber)))}function b(t,e){(0,l.dU)().dev.infer||h(y(null,e,t,"verify_fail","在题目:".concat(_(e),"高级验证失败")))}function x(t,e){if((0,l.dU)().dev.infer)return;const{type:n,parent:i}=e;if("upload"===n||"verify"===n||"gift"===n)return;let o,s="",c="";if("menu"===n||"cascade"===n)c=(0,u.eu)(e).reduce(((e,n)=>(n.selected&&(e+="[".concat(n.text,"]")),t=n,e)),""),o=c?"select":"deselect",s=c?"选中":"清除所有选中";else{const i=t.selected;if(o=i?"select":"deselect",s=i?"选中":"取消选中","select_icon"===n||"select_image"===n)c="[".concat((0,r.ZK)(t.origin),"]");else if("matrix"===e.type)if(t.isOtherOpt)c="[".concat(t.text,"]");else{const e=t;c="[".concat((0,a.mP)(e.optionX.text)," ").concat((0,a.mP)(e.optionX.text),"]")}else c="[".concat((0,a.mP)(t.text),"]")}const d="在题目:".concat(_(e),"中").concat(s,"选项:").concat(c);h(y(t,e,i,o,d))}function T(t,e,n){if((0,l.dU)().dev.infer)return;const i="在题目:".concat(_(n),"的选项:[").concat((0,a.mP)(e.text),"]中输入自动填充触发文字:").concat(t);h(y(e,n,n.parent,"auto_complete",i))}function I(t,e,n){if((0,l.dU)().dev.infer)return;const i=n.parent;let r,o;"value_mark"===n.type||"icon_mark"===n.type||"slide_rate"===n.type||"weight"===n.type?(r="打分:"+e.value,o="rate"):"upload"===n.type?(r=t?"上传图片":"清除图片",o="upload"):(r="输入:"+e.value,o="input"),h(y(e,n,i,o,"在题目:".concat(_(n),"的选项:[").concat((0,a.mP)(e.text),"]中").concat(r)))}function O(t,e){if((0,l.dU)().dev.infer)return;const n=e.parent,i=e.options[t];i&&(-1===i.sortNo?h(y(i,e,n,"cancel_sort","在题目:".concat(_(e),"中取消了对选项:[").concat((0,a.mP)(i.text),"]的排序"))):h(y(i,e,n,"sort","在题目:".concat(_(e),"中将选项:[").concat((0,a.mP)(i.text),"]排序到第").concat(i.sortNo,"位"))))}function k(t){if((0,l.dU)().dev.infer)return;const e="在题目:".concat(_(t),"中 定位失败");h(y(null,t,t.parent,"locate_failed",e))}function S(t,e){if((0,l.dU)().dev.infer)return;const n=e.parent,i=e.type,r=e.value;let o="input",a="输入";if("region"===i)a="输入:"+r;else if("location"===i||"area"===i)o="locate",a="定位到:"+r;else if("verify"===i){const e=typeof t;if("string"===e)a="输入:"+t;else if("object"===e){const{code:e,phoneNumber:n}=t;void 0!==n?(o="input_phone",a="的手机号码中输入:".concat(n)):(o="input_code",a="的密码/验证码中输入:".concat(e))}}h(y(null,e,n,o,"在题目:".concat(_(e),"中").concat(a)))}function E(t){(0,l.dU)().dev.infer||h(y(null,t,t.parent,"prev","在题目:".concat(_(t),"中点击上一题")))}function P(t,e){(0,l.dU)().dev.infer||h(y(null,e,t.parent,"prev","返回到题目: ".concat(_(e),",由题目:").concat(_(t),"后退而来")))}function L(t){(0,l.dU)().dev.infer||h(y(null,t,t.parent,"next","在题目:".concat(_(t),"中点击下一题")))}function C(t,e){(0,l.dU)().dev.infer||h(y(null,e,t.parent,"next","end"===e.type?"到达结束节点: ".concat(_(e),",由题目:").concat(_(t),"前进而来"):"进入题目: ".concat(_(e),",由题目:").concat(_(t),"前进而来")))}function N(t,e,n){(0,l.dU)().dev.infer||h(y(null,e,n,"check_fail","从".concat(_(t),"走向甄别失败")),!0)}function R(t,e){(0,l.dU)().dev.infer||h(y(null,t.current,t,"quota_fail","配额失败,答案数:".concat(e)),!0)}function U(t,e){(0,l.dU)().dev.infer||h(y(null,t.current,t,"check_submit","甄别提交,答案数:".concat(e)))}function A(t,e){(0,l.dU)().dev.infer||h(y(null,t,e,"time_less","答题时间太少被排除"),!0)}function M(t,e){(0,l.dU)().dev.infer||h(y(null,t,e,"abandon_answer","按结束节点要求抛弃答案"),!0)}function D(t){(0,l.dU)().dev.infer||h(y(null,t.current,t,"time_over","答题超时未完成"),!0)}function B(t,e,n,i){(0,l.dU)().dev.infer||h(y(null,t,e,"full_submit","正式提交,答案数:".concat(n,"个答案 \n 提交回应:").concat(JSON.stringify(i))),!0)}function F(t,e,n=!1){(0,l.dU)().dev.infer||h(y(null,t,e,n?"lottery_goal":"lottery_fail",n?"抽奖:中奖":"抽奖:未中奖"),!0)}function W(t,e){(0,l.dU)().dev.infer||h(y(null,t,e,"gift","领奖"),!0)}function z(t,e,n,i,r){(0,l.dU)().dev.infer||h(y(e,n,t,"auto_input","在题目:".concat(_(n),"中自动填充选项:[").concat(i,"],期待值:[").concat(r,"]")))}function q(t,e,n,i="成功"){(0,l.dU)().dev.infer||h(y(null,n,t,"auto_skip","在题目:".concat(_(n),"中尝试自动选中选项:[").concat((0,a.mP)(e.text),"]").concat(i)))}function j(t,e,n){if((0,l.dU)().dev.infer)return;let i="自动跳过题目:".concat(_(e)," by ").concat(n);"logic"===e.type&&(i+=" logicResult:".concat(e.logicResult)),h(y(null,e,t,"auto_skip",i))}function V(t,e,n){(0,l.dU)().dev.infer||h(y(null,n,t,"opt_display","在题目:".concat(_(n),"中显示选项:[").concat((0,a.mP)(e.text),"]")))}function X(){const t="browser_uuid";let e=(0,l.dU)().storage.get(t);return e||(e=(0,o.M8)(),(0,l.dU)().storage.set(t,e)),e}function K(){if((0,l.dU)().dev.infer)return;const t=(0,d.ZI)();t.code&&t.state||h({type:"enter",collector_code:(0,l.vW)().sid,browser_uuid:X(),recorded_at:(0,i.GN)(),description:"来自"+(0,l.dU)().system.getReferer()},!0)}function G(t,e){if((0,l.dU)().dev.infer)return;let n="开始答题,进入到题目: ".concat(_(e)," ");const{browser:i,device:r,engine:o,os:a}=(0,l.dU)().system.device;i&&(n+="browser:".concat(i.name||""," ").concat(i.version||"",", ")),r&&(n+="device:".concat(r.type||""," ").concat(r.vendor||""," ").concat(r.model||"",", ")),o&&(n+="engine:".concat(o.name||""," ").concat(o.version,", ")),a&&(n+="os:".concat(a.name||""," ").concat(a.version||""));const s=y(null,e,t,"start",n);s.browser_uuid=X(),s.collector_code=(0,l.vW)().sid,h(s,!0)}function H(t,e){(0,l.dU)().dev.infer||h(y(null,null,t,"resume","开始断点续答:"+e),!0)}},949:(t,e,n)=>{"use strict";n.d(e,{T:()=>o});var i=n(4248),r=n(9911);async function o(t){const{url:e,data:n,silent:o,responseId:a}=t,s=e+JSON.stringify(n),c=await(0,r.x)(e);if(!c){const t="FAKE NOT FOUND:".concat(e);throw(0,i.vW)().error(t),new Error(t+(a?" responseId is: ".concat(a):""))}let u=null;try{if(u=await c(n,(0,i.vW)()),u.exception)throw u.exception}catch(t){if(!(0,i.vW)().realTimePreview){const e="FAKE ERROR:".concat(s," ").concat(t.stack&&t.stack.split("\n")[0]);throw o||(0,i.vW)().error(e),new Error(e+(a?" responseId is: ".concat(a):""))}u={result:""}}return u}},5142:(t,e,n)=>{"use strict";n.d(e,{FB:()=>k,Hw:()=>w,Im:()=>_,O0:()=>O,Rq:()=>T,SK:()=>b,W1:()=>S,X:()=>v,_7:()=>I,bp:()=>x,f9:()=>l,gU:()=>g,hj:()=>f,mi:()=>u,o1:()=>h,rR:()=>p,vT:()=>m,yU:()=>y});var i=n(6539),r=n(7550),o=n(4248),a=n(5159),s=n(5497);let c="";const u={diagram_has_errors:"diagram_has_errors",survey_not_exist:"survey_not_exist",survey_offline:"survey_offline",oauth_error:"oauth_error",interviewee_missing_error:"interviewee_missing_error",interviewee_invalid_error:"interviewee_invalid_error",multi_responses_error:"multi_responses_error",red_envelope_duplicated:"red_envelope_duplicated",red_envelope_expired:"red_envelope_expired",red_envelope_received_by_yourself:"red_envelope_received_by_yourself",red_envelope_received_by_others:"red_envelope_received_by_others",red_envelope_intercepted:"red_envelope_intercepted",red_envelope_send_error:"red_envelope_send_error"},l={quota_full:"quota_full",response_overflow:"response_overflow",quota_not_match:"quota_not_match"},d=[400,401,402,403,404,405,422,500];async function f(t,e,n){const i=await(0,o.dU)().network.request(t,e,n);if((r=i).status>=200&&r.status<300)return function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}(i.response);throw i;var r}function p(t){const e=JSON.parse(t&&t.response||"{}");return e&&d.includes(e.status)?e.code+"":""}function g(t){const e=p(t);if(e!==c&&e){if(l[e])return;u[e]?(0,o.vW)().error(S(e)):(0,o.vW)().notify(S(e))}}async function m(t,e,n){try{return await f(t,e,n)}catch(n){throw g(n),(0,o.vW)().uploadLog("api error: ".concat(e.type,":").concat(t," ").concat(JSON.stringify(n))),n}}function h(t,e={type:"GET"},n=!1){return m(t,e={...e,contentType:"application/json"},n)}async function v(t){if((0,o.vW)().preview)return async function(t){if("00000000-0000-0000-0000-000000000000"===t)return{smaller_diagram_url:"http://localhost:12345/unit_test_payload.json"};const e=(0,i.ZI)(),n=e.type;let r=(0,o.vW)().hostConfig.qApiHost+"/surveys/"+t+"/preview";"preview_template"===n?r=(0,o.vW)().hostConfig.host+"/v1/public_templates/"+t:"edit_template"===n&&(r=(0,o.vW)().hostConfig.host+"/v1/templates/"+t);const a=await h(r,{type:"GET",jwt:e.jwt}),{diagram:s}=a;return{smaller_diagram_url:a.diagram_url||s.diagram_url,langs:a.langs}}(t);const e=(0,o.dU)().auth.retrieveAuthSurveyMeta();return e||h((0,o.vW)().hostConfig.qApiHost+"/surveys/"+t,{type:"GET"}).catch((t=>{throw function(t){t&&d.includes(t.status)||(0,o.vW)().error((0,r.Iu)(a.bn.global.downloadError))}(t),t}))}function y(t){const e=(0,o.vW)().hostConfig.qApiHost+"/responses";return c=u.multi_responses_error,h(e,{type:"POST",data:t},!0).then((t=>(c="",t))).catch((n=>{throw(0,o.vW)().uploadLog("getResponseInfo failed, url is ".concat(e,", options are ").concat(JSON.stringify({type:"POST",data:t}))),c="",n}))}function _(t,e){return h((0,o.vW)().hostConfig.qApiHost+"/responses/"+e+"/examine",{type:"PUT",data:t})}function w(t,e){return h((0,o.vW)().hostConfig.qApiHost+"/responses/"+e+"/skip",{type:"PUT",data:t})}function b(t,e){return h((0,o.vW)().hostConfig.qApiHost+"/responses/"+e,{type:"PUT",data:t})}async function x(t){if((0,o.vW)().preview)return(0,o.vW)().notify((0,r.Iu)(a.bn.preview.noMessage)),{};const e=(0,o.vW)().hostConfig.qApiHost+"/validations";t.question_id=t.question_id.toLowerCase();const n=await h(e,{type:"POST",data:t});return t.phone_num&&(0,o.vW)().notify((0,r.Iu)(a.bn.verify.sendSuccess)),n}async function T(t,e){return(0,o.vW)().preview?((0,o.vW)().notify((0,r.Iu)(a.bn.preview.noMessage)),{}):h((0,o.vW)().hostConfig.qApiHost+"/validations/"+e,{type:"PUT",data:t})}async function I(t,e){const n=(0,o.dU)().storage.get("gift-"+t.code);if(n)return JSON.parse(n);const i=(0,o.vW)().hostConfig.qApiHost+"/rewards/"+e+"/red_envelope",r=await m(i,{type:"POST",data:t},!1);return(0,o.dU)().storage.set("gift-"+t.code,JSON.stringify(r)),r}async function O(t,e){if((0,o.vW)().preview)return{};const n=(0,o.vW)().hostConfig.qApiHost+"/rewards/"+e+"/custom";try{const e=await m(n,{type:"PUT",data:t},!1);return(0,o.vW)().notify((0,r.Iu)(a.bn.verify.sendSuccess)),e}catch(t){throw(0,o.vW)().notify((0,r.Iu)(a.bn.verify.sendFailed)),t}}async function k(t){(0,s.l)(t);const{preview:e}=(0,o.vW)(),{dev:{autoRun:n,infer:i}}=(0,o.dU)();return e||n||i?null:m((0,o.vW)().hostConfig.qApiHost+"/webhooks",{type:"POST",data:t},!1)}function S(t){return(0,r.Iu)(a.bn.backEnd[t])||t}},7428:(t,e,n)=>{"use strict";n.d(e,{f:()=>r,s:()=>o}),n(5306);var i=n(6539);function r(t){const e=(0,i.ZI)().offline_survey_id;return e?t.replace(/^https?:\/\//,"/".concat(e,"/")):t}function o(){return!!(0,i.ZI)().offline_survey_id}},5015:(t,e,n)=>{"use strict";n.d(e,{nR:()=>p,zp:()=>d,LO:()=>f});var i=n(1772),r=n(6935),o=n(3251),a=n(4248),s=(n(5306),n(2125));var c=n(949),u=n(5142);const l={valid:!0,message:"",result:""};async function d(t,e,n,o){const{method:d,embedId:f}=e,p="embed"===d,g="fake"===d;if((0,a.vW)().realTimePreview&&!p&&!g||!function(t){const e=t.params instanceof Array;return"embed"===t.method?!(!e||!t.embedId):!(!e||!t.url)}(e))return{...l};const m=await(0,r.sb)(e.url,{state:t}),h=await(0,i.O_)(t,e);n&&Object.keys(n).forEach((t=>{n[t]&&(h[t]=n[t])}));let v=null;if(p)v=await async function(t){const{embedId:e,data:n,embedApis:i,responseId:r}=t,o=function(t,e){const n=e.find((e=>e.id===t));return n?(n.fn||(n.fn=function(t){if(t.fn)return t.fn;let e,n=t.code.replace(/<br>/g,"");n="(function(){ /* embedApi.".concat(t.name," */ ").concat(n,"})()");try{return e=(0,s.K)(n,!0),e}catch(t){return()=>({result:"",message:""})}}(n)),n.fn):null}(e,i);let c;try{c=await o(n,(0,a.vW)())}catch(t){const n="EMBED ERROR:".concat(function(t,e){const n=e.find((e=>e.id===t));return n?n.name:t}(e,i)," ").concat(t.stack&&t.stack.split("\n")[0]);throw(0,a.vW)().error(n),new Error(n+(r?" responseId is: ".concat(r):""))}return c}({embedId:f,data:h,embedApis:t.embedApis,responseId:null==t?void 0:t.transactionID});else if("fake"===d)v=await(0,c.T)({url:m,data:h,silent:o,responseId:null==t?void 0:t.transactionID});else{let e="GET";"post"===d&&(e="POST");let n=null;try{n=await(0,u.hj)((0,a.dU)().dev.parseRealUrl(m),{type:e,data:h,contentType:"application/json"},!1)}catch(n){const i="REAL ERROR:".concat(e," ").concat(m," ").concat(JSON.stringify(n));o||(0,a.vW)().error(i);const r=i+((null==t?void 0:t.transactionID)?" responseId is: ".concat(null==t?void 0:t.transactionID):"");throw new Error(r)}v=n}return v}async function f(t,e,n,i){const r=await d(t,e,n,i);return void 0===r.valid&&(r.valid=!!r.result),r.valid||r.message||(r.message="^_^"),r}async function p(t,e){try{const{request:n}=e.origin;n&&(await d(t,n,null,!0),t.endRequested=!0,o.s$.trigger("END_REQ"))}catch(t){(0,a.vW)().uploadLog(t)}}},1128:(t,e,n)=>{"use strict";n.d(e,{C4:()=>d,Kn:()=>h,Lb:()=>T,Mo:()=>_,My:()=>l,NV:()=>m,WA:()=>b,ad:()=>I,c1:()=>u,c6:()=>x,cW:()=>c,eK:()=>f,eu:()=>g,fi:()=>y,kM:()=>s,mH:()=>v,y4:()=>w}),n(3948);var i=n(3877),r=n(3656),o=n(5905),a=n(6935);function s(t,e){const n=t.loopStack,i=e.uuid;return(0,r.am)(i,n)}function c(t,e){return t.find((t=>(0,r.RC)(t.uuid,e)))}function u(t){return"comment"===t.optionType}function l(t){return g(t).some((t=>t.selected))}function d(t,e=!1){return g(t).filter((n=>(!e||!n.isOtherOpt)&&(0,i.Zy)(n,t))).length}function f(t){return g(t).some((e=>(0,i.Zy)(e,t)))}function p(t){const e=[],n=t=>{if("children"in t)for(const e of t.children)n(e);else e.push(t)};for(const e of t.optionGroups)n(e);return e}function g(t){let e=[];return(0,o.Kf)(t)&&(e=(0,o.ub)(t)?[...e,...p(t)]:[...e,...t.options]),(0,o.sy)(t)&&(e=[...e,...t.otherOptions]),e}function m(t){let e=[];return(0,o.QM)(t)&&(e=[...e,...t.options]),(0,o.RE)(t)&&(e=[...e,...t.otherOptions]),e}function h(t){let e=g(t);const{hiddenOptions:n}=t;return n&&(e=[...e,...n]),e}function v(t){const{renderOptionsX:e,renderOptionsY:n,otherOptions:i}=t;return e.concat(n,i)}function y(t){const{options:e,origin:n}=t,i=e.find((t=>t.origin.seqTarget));return i&&i.selected?n.options[i.sortNo-1]:n.output}function _(t){return"yid"in t&&"xid"in t}async function w(t,e){const{parent:n}=e,{origin:i}=t;return{itemsMax:await(0,a.Ob)(i.itemsMax,{state:n}),itemsMin:await(0,a.Ob)(i.itemsMin,{state:n})}}function b(t){return t.passRef||{}}function x(t,e){const n=b(t);return t[e]||n[e]}function T(t){return t.assistValue?Object.keys(t.assistValue).reduce(((e,n)=>(t.assistValue[n]&&(e+=t.assistValue[n])&&(e+=" "),e)),""):""}function I(t,e){return t/e*100+"%"}},45:(t,e,n)=>{"use strict";n.d(e,{Cp:()=>o,ID:()=>f,PC:()=>d,Rv:()=>s,W_:()=>l,i1:()=>c,pL:()=>a,tl:()=>u});var i=n(6064),r=n(1128);function o(t){return t&&-1===t.mutexNumber}function a(t,e){return(t.mutexNumber||0)>(e.mutexNumber||0)?1:-1}function s(t,e){return!(!t||!e)&&!(!t.xid||!e.xid)&&(!(!o(t.optionX.origin)||e.yid!==t.yid)||o(t.optionY.origin)&&e.xid===t.xid)}function c(t,e){return!(!t||!e)&&("comment"!==t.origin.optionType||"option"!==e.origin.optionType)&&("option"!==t.origin.optionType||"comment"!==e.origin.optionType)&&(!(!o(t.origin)&&!o(e.origin))||u(t,e))}function u(t,e){return!(!t||!e||(0,i.O2)(t.origin.mutexNumber)||t.origin.mutexNumber!==e.origin.mutexNumber)}function l(t,e){return!(!t||!e)&&!(!t.xid||!e.xid)&&(!(!u(t.optionX,e.optionX)||e.yid!==t.yid)||u(t.optionY,e.optionY)&&e.xid===t.xid)}function d(t,e){const n={};(0,r.Kn)(t).forEach((t=>{const e=t.origin;(0,r.c1)(e)||(n[e.mutexNumber]?n[e.mutexNumber]+=1:n[e.mutexNumber]=1)}));const i=Object.keys(n).reduce(((t,e)=>("0"===e||"undefined"===e?t+=n[e]:Number(e)<10&&(t+=1),t)),0);return e>i&&(e=i),e}function f(t,e){return!!o(e.origin)||t.some((t=>t!==e&&t.selected&&c(e,t)))}},3151:(t,e,n)=>{"use strict";n.d(e,{OJ:()=>d,Xl:()=>f,j9:()=>g});var i=n(1128),r=n(7550),o=n(4248),a=n(5159),s=n(6064),c=n(45),u=n(1028),l=n(9192);function d(t,e,n,r){const a=n.list[e];(0,o.Pg)(a.option,{value:t});const s=r.options.find((t=>t.cascadePath===a.resultId));return(0,i.c1)(a.option.origin)&&(t?m(a,r):g(a,r)),s}async function f(t,e,n){const d=e.list[t];if(!d)return u.JG;const f=e.list.filter((t=>function(t){return t.selected&&!(0,i.c1)(t.option.origin)}(t))),{option:p}=d;if(f.includes(d))g(d,n);else{const t=(0,c.ID)(e.list.map((t=>t.option)),d.option);if(e.multiple){if(f.length>=e.max&&!t)return(0,o.vW)().notify((0,r.Iu)(a.bn.menu.limitMax,{text:e.text?(0,r.Iu)(a.bn.menu.listItem)+e.text:(0,r.Iu)(a.bn.menu.topList),max:(0,s.KF)(e.max)})),u.JG}else e.list.forEach((t=>{t.selected&&g(t,n)}));t&&function(t,e){e.options.forEach((e=>{t.resultId.includes(e.cascadePath)||(0,o.Pg)(e,{selected:!1})}))}(d,n),m(d,n)}return await(0,l.t)(p,n),u.kI}function p(t){(0,o.Pg)(t,{selected:!1}),(0,o.Pg)(t.option,{selected:!1});const e=t.list;e&&0!==e.length&&e.forEach((t=>{p(t)}))}function g(t,e){p(t),e.options.forEach((e=>{e.cascadePath.includes(t.resultId)&&(0,o.Pg)(e,{selected:!1})}))}function m(t,e){(0,o.Pg)(t,{selected:!0}),(0,o.Pg)(t.option,{selected:!0}),e.options.forEach((e=>{t.resultId.includes(e.cascadePath)&&(0,o.Pg)(e,{selected:!0})}))}},5521:(t,e,n)=>{"use strict";n.d(e,{W:()=>y});var i=n(1128),r=n(7679),o=n(9564),a=n(6935),s=n(3656),c=n(4248),u=n(7550),l=n(5159),d=n(9192),f=n(1028),p=n(5905);const g={};function m(t,e,n){e.forEach((e=>{(0,s.RC)(e.uuid,t.uuid)||e[n]!==t[n]||(0,c.Pg)(e,{selected:!1})}))}function h(t,e){e.forEach((e=>{e.uuid!==t.uuid&&(0,c.Pg)(e,{selected:!1})}))}function v(t,e,n=!1){if(t.selected)(0,c.Pg)(t,{selected:!1});else{(0,c.Pg)(t,{selected:!0});const r=(0,p.sy)(e)?e.otherOptions:[];h(t,n?r:(0,i.eu)(e))}return f.vv}async function y(t,e){const n=g[e.type];if(n){const i=await n(t,e);return i.noValidate||(0,r.jY)(e),await(0,d.t)(t,e),i}return f.JG}g.select=async(t,e)=>{if(t.selected)return(0,c.Pg)(t,{selected:!1}),f.vv;const n=await(0,o.rz)(e,t);return n.valid?((0,c.Pg)(t,{selected:!0}),(0,o.Ir)(e.origin)&&h(t,(0,i.eu)(e)),f.vv):((0,c.vW)().notify(n.message),f.JG)},g.select_icon=g.select,g.select_image=g.select,g.matrix=async(t,e)=>{if(t.selected)return(0,c.Pg)(t,{selected:!1}),f.vv;const n=await(0,o.Hf)(e,t);if(!n.valid)return(0,c.vW)().notify(n.message),f.JG;const{origin:r}=e;return(0,c.Pg)(t,{selected:!0}),(0,o.Ir)(r)?h(t,(0,i.eu)(e)):(0,o.Rx)(r)?(m(t,e.options,"yid"),m(t,e.options,"xid")):(0,o.Lk)(r)?m(t,e.options,"yid"):(0,o.zR)(r)&&m(t,e.options,"xid"),f.vv},g.upload=async(t,e)=>{var n,i;if(t.isOtherOpt)return v(t,e,!0);{const{parent:r,fullUploaded:o,origin:s}=e;let d=await(0,a.Ob)(s.maxUploadCount,{state:r});d=d||e.options.length;const p=t.value;if(o&&!p&&!t.origin.fillRequired)return(0,c.vW)().notify((0,u.Iu)(l.bn.upload.amountLimitMax,{max:d})),f.JG;const g={onprogress(e){(0,c.Pg)(t,{progress:e})},accept:t.accept,nodeId:e.renderId,optionId:t.renderId},m=await(0,c.dU)().network.upload(g);return await(null===(i=(n=r.handleEvents).handleOptionInput)||void 0===i?void 0:i.call(n,m,t,e)),f.kI}},g.menu=g.select,g.cascade=async(t,e)=>(t.isOtherOpt&&v(t,e,!0),f.vv),g.hot_spot=g.select,g.icon_mark=g.value_mark=g.slide_rate=g.fill=g.weight=g.heat_map=async(t,e)=>t.isOtherOpt?v(t,e,!0):f.kI,g.sequence=async(t,e)=>t.isOtherOpt?v(t,e,!0):f.kI},5753:(t,e,n)=>{"use strict";n.d(e,{LM:()=>g,SV:()=>d,wS:()=>p});var i=n(9192),r=n(7679),o=n(9564),a=n(4248),s=n(1128);const c={refresh:!1,result:!0},u={refresh:!0,result:!0},l={};function d(t,e){const n=e.value||"data:image/gif;base64,R0lGODlhAQABAAAAACw=";n&&(0,a.Pg)(t,{image:{name:void 0,ratio:1,url:n,natural:n,thumbnail:n,large:n,width:64,height:64,id:"faked-id-for-upload-image",originName:"uploaded image"}})}function f(t,e){const n=String(t);return t===e.value?c:((0,a.Pg)(e,{value:n}),u)}async function p(t,e,n){let o;if("number"==typeof t&&(t=String(t)),e.isOtherOpt)o=f(t,e);else{const i=l[n.type];o=i?await i(t,e,n):f(t,e)}return o.noValidate||(0,r.jY)(n,e),await(0,i.t)(e,n),o}function g(t,e,n){e.atcpTrigger=t,(0,r.jY)(n,e)}l.icon_mark=async(t,e)=>(t===e.value&&(t=String(Number(t)-1)),(0,a.Pg)(e,{value:t}),u),l.weight=async(t,e,n)=>{if(t===e.value)return c;const{options:i}=n,r=n.weightTotal,o=i.reduce(((t,n)=>n!==e?t+Number(n.value):t),0),l=r-o;return Number(t)>l&&(t=String(l)),(0,a.Pg)(e,{value:t}),i.forEach((t=>{const e=Number(t.value);(0,a.Pg)(t,{percent:(0,s.ad)(e,r)})})),u},l.upload=async(t,e,n)=>(t||(await(0,a.dU)().network.removeUpload({nodeId:n.renderId,optionId:e.renderId}),t=(0,i.h)()),(0,a.Pg)(e,t),await(0,o.YC)(n),d(e,t),{refresh:!0,result:!0}),l.slide_rate=async(t,e)=>f(t,e),l.fill=async(t,e)=>f(t,e)},7492:(t,e,n)=>{"use strict";n.d(e,{b:()=>i});const i=Object.keys({field_1:"",field_2:"",field_3:"",field_4:"",field_5:"",field_6:""})},8064:(t,e,n)=>{"use strict";n.d(e,{BT:()=>r,dj:()=>o,xR:()=>a});var i=n(8413);function r(t,e){return t.find((t=>t.origin.radius>=(0,i.S)(e,{lng:t.origin.longitude,lat:t.origin.latitude})))||t[t.length-1]}function o(t,e){if(0===t.length)return;const n=e.split("-");return t.find((t=>t.text.split("-").every(((t,e)=>{const i=n[e];return!!(i&&i.indexOf(t)>-1)}))))||t[t.length-1]}function a(t,e){const n=e.map((t=>t.name)).indexOf(t[0]);let i=String(n);const r=e[n];if(t[1]&&r){const e=r.cities.map((t=>t.name)).indexOf(t[1]);i+=" "+e;const n=r.cities[e];t[2]&&n&&(i+=""+n.areas.map((t=>t.name)).indexOf(t[1]))}return i}},5750:(t,e,n)=>{"use strict";n.d(e,{Gy:()=>d,T_:()=>a,uR:()=>l}),n(2707);var i=n(3656),r=n(9564),o=n(4588);function a(t){const e=[];return t.forEach(((t,n)=>{const r=(0,i.XJ)(n+1);e.splice(r,0,t)})),e}const s={};function c(t,e,n){let r=[];return r=n?u(t):e?function(t,e){const n=[],r={};t.forEach(((t,i)=>{const o=t.origin;if(o.refOptId){let a="";if(e&&(a=o.referId),a){const e=r[a];e?e.list.push(t):r[a]={headIndex:i,list:[t]}}else n.push(t)}else n.push(t)}));let o=[];return n.forEach((t=>{const e=(0,i.XJ)(o.length+1);o.splice(e,0,t)})),Object.keys(r).map((t=>r[t])).sort(((t,e)=>t.headIndex>e.headIndex?1:-1)).forEach((t=>{o=o.concat(t.list)})),o}(t,e):function(t){const e=[];return t.forEach((t=>{const n=(0,i.XJ)(e.length+1);e.splice(n,0,t)})),e}(t),r}function u(t,e){return e=(e||Math.round(10*Math.random()))%t.length,t.slice(e).concat(t.slice(0,e))}function l(t,e){const{renderId:n,origin:i}=t,{followRandom:a,circulation:u}=i;if(!(0,r.oZ)(t))return e;if((0,o.YB)(t.nodeUuid,t.parent.nodeGroups)){let i=s[t.nodeUuid];if(i)return e.sort(((t,e)=>i[t.uuid]>i[e.uuid]?1:-1));{const t=c(e,a,u);return s[n]=i={},t.forEach(((t,e)=>{i[t.uuid]=e})),t}}return c(e,a,u)}function d(t,e,n){const{randomType:i}=t.origin;return"col"!==i&&"row_col"!==i||(e=l(t,e)),"row"!==i&&"row_col"!==i||(n=l(t,n)),"col_loop"===i&&(e=u(e)),"row_loop"===i&&(n=u(n)),{optionsX:e,optionsY:n}}},7552:(t,e,n)=>{"use strict";n.d(e,{kN:()=>L,kv:()=>D,jy:()=>V,MT:()=>j,rI:()=>K,Jc:()=>C,gk:()=>N,Ds:()=>H,dX:()=>B}),n(2707),n(5306),n(72),n(9137),n(1957),n(6306),n(103),n(4592),n(8276),n(5082),n(2813),n(8222),n(8563),n(336),n(7512),n(3948);var i=n(5750),r=n(1128),o=n(9564),a=n(6451),s=n(9481),c=n(6935),u=n(4665),l=(n(3210),n(9026)),d=n(4248),f=n(6064);const p={done:!1,expectedValue:"",actualValue:""};function g(t){const{autoInputConfig:e}=t.origin;if(!e)return"";const{defaultValue:n}=e;return n&&(0,f.KF)(n).trim()?n:""}const m={};async function h(t,e,n,i,r){if(!g(t))return p;const{parent:o}=e,a=await(0,c.Ob)(g(t),{state:o});let s=String(a);return a>=n&&a<=i||(s=r),(0,d.Pg)(t,{value:s}),{done:!0,actualValue:s,expectedValue:a}}async function v(t,e){const n=m[e.type];if(n){e.parent.context.option=t;const i=await n(t,e);return!!i.done&&((0,l.qu)(e.parent,t,e,i.actualValue,i.expectedValue),!0)}return!1}m.fill=async(t,e)=>{if(!g(t))return p;const{parent:n}=e,i=await(0,c.e_)(g(t),{state:n});return(0,d.Pg)(t,{value:i}),{done:!0,actualValue:i,expectedValue:i}},m.value_mark=(t,e)=>h(t,e,t.minValue,t.maxValue,""),m.icon_mark=(t,e)=>h(t,e,0,t.iconCount,""),m.slide_rate=(t,e)=>{const{rateOptions:n}=e;return h(t,e,0,n.length,"")},m.weight=(t,e)=>h(t,e,0,t.maxValue||e.weightTotal,""),m.sequence=async(t,e)=>{if(!g(t))return p;const n=e.options.length,{parent:i}=e,r=await(0,c.Ob)(g(t),{state:i});let o=r;return r>=1&&r<=n||(o=-1),(0,d.Pg)(t,{sortNo:o,selected:o>=1}),{done:!0,actualValue:o,expectedValue:r}},n(5069);var y=n(5838),_=n(5905);async function w(t,e){const n=e.parent;n.context.option=t;const i=await async function(t,e){return!!e&&(0,y.Q3)(t,e)}(n,t.origin.selectConfig);t.autoSelectMarked=!!i}const b=["select","select_icon","select_image","menu","hot_spot","data"];var x=n(6866),T=n(3251);async function I(t,e,n,i=!1){const r=n.origin.options.find((n=>n.xid===t.uuid&&n.yid===e.uuid)),o={...await C(n,r,null),optionX:t,optionY:e,text:i?t.text:e.text,xid:t.uuid,yid:e.uuid},a=await(0,s.o4)(n.parent,o,n);return o.disabled=!a,o}var O=n(45),k=n(3656),S=n(9310),E=n(3892);const P=["select","sequence","menu"];function L(t){Object.defineProperty(t,"selected",{get(){return this.__cache.selected},set(t){"select-input"===this.inputType&&(t?this.value=this.__cache.value||this.value:(this.__cache.value=this.value,this.value="")),this.__cache.selected=t,t&&(0,O.Cp)(this.origin)&&setTimeout((()=>{T.s$.trigger("OPT_EXCLUDE",this)})),T.s$.trigger("OPT_SELECT",this)}})}async function C(t,e,n){const{parent:i}=t,o={origin:e,isOtherOpt:e.isOtherOpt,customData:{},__cache:{selected:!1,value:""},inputType:D(e,t.type),value:"",renderId:(0,r.kM)(t,e),uuid:e.uuid,label:e.label,number:e.number,optComment:e.optComment,optionType:e.optionType,useComment:e.useComment,passRef:n};return i.context.option=o,o.text=await(0,c.Ur)(e.text,{state:i,usage:{node:t,optionId:e.uuid}}),L(o),o.isOtherOpt&&(await R(o,t),(0,r.c1)(e)||await w(o,t)),function(t){const{origin:e}=t;!0===e.useComment?(0,d.Pg)(t,{placeholder:e.optComment}):"input"===t.inputType&&(0,d.Pg)(t,{placeholder:t.text})}(o),await(0,a._F)(o,i),o}async function N(t,e,n){const i=[];for(const r of e){const e=n.find((t=>t.uuid===r.uuid)),o=await C(t,r,e);i.push(o)}return i}function R(t,e){return(0,d.Pg)(t,{inputType:D(t.origin,e.type)}),B(t,e)}const U=["fill","heat_map","icon_mark","max_diff","sequence","slide_rate","upload","value_mark","weight"],A=["data","hot_spot","matrix","select_icon","select_image","region","location","area"],M=["select","menu","cascade"];function D(t,e){if(t.isOtherOpt){let e="select";return(0,r.c1)(t)?e="input":!0===t.useComment&&(e="select-input"),e}return M.includes(e)?!0===t.useComment?"select-input":"select":U.includes(e)?"input":A.includes(e)?"select":void 0}async function B(t,e){if(!(0,_.Ck)(t))return;const{origin:n}=t,i=t.origin.fillType;if(!i)return;const{parent:o}=e;let a,s,u,l=await(0,c.Ob)(n.fillStart,{state:o}),f=await(0,c.Ob)(n.fillEnd,{state:o});if(isNaN(l)&&(l=void 0),isNaN(f)&&(f=void 0),"date"===i){const t=(new Date).getFullYear(),e=l,n=f;void 0!==l&&(l=new Date(l,0,1),t<e&&(a=l)),void 0!==f&&(f=new Date(f,11,31),t>n&&(a=f))}"auto_complete"===i&&(s=function(t,e=[]){const{autoCpltGroups:n}=t;return e.reduce(((t,e)=>{const i=n.find((t=>t.id===e));return i&&(t=t.concat(i.data)),t}),[])}(o,n.autoCpltIds),u=await(0,x.VJ)(e.parent.sid));let p=[];"list_select"===i&&(p=q((await(0,c.e_)(n.selectText,{state:o,joinBy:","})).split(",")));const g=await(0,r.y4)(t,e),m=await(0,E._2)(t,e);(0,d.Pg)(t,{itemsMax:g.itemsMax,itemsMin:g.itemsMin,fillStart:m.start,fillEnd:m.end,fillType:i,validateMin:l,validateMax:f,defaultValue:a,completeGroups:s,selectList:p,prevCpltLang:u,timeGrade:n.timeGrade,simpleCplt:n.simpleCplt,inputMode:n.inputMode,grade:n.grade,scale:n.scale})}async function F(t,e,n=!1){const{options:r,otherOptions:o,hiddenOptions:a}=t,s={options:[],otherOptions:o,hiddenOptions:[]};if(r){const n=function(t){const e=t.filter((t=>"top-fixed"===t.origin.position)).sort(((t,e)=>t.number-e.number)),n=t.filter((t=>"bottom-fixed"===t.origin.position)).sort(((t,e)=>t.number-e.number)),i=t.filter((t=>"top-fixed"!==t.origin.position&&"bottom-fixed"!==t.origin.position));return e.concat(i).concat(n)}((0,i.uR)(t,r));for(const t of n)s.options.push(await e(t))}if(a)for(const t of a){const n=t.isOtherOpt?t:await e(t);s.hiddenOptions.push(n)}n&&j([...s.options,...s.otherOptions]),(0,d.Pg)(t,s)}const W={};async function z(t,e){return t.image?t.image:await(0,a.nO)(e,t)}function q(t){const e={};return t.map((t=>{const n=e[t];return n?(e[t]=n+1,"".concat(t,"(").concat(n,")")):(e[t]=2,t)}))}function j(t){q(t.map((t=>t.text))).forEach(((e,n)=>{t[n].text=e}))}function V(t){return t&&t.path?(0,d.vW)().hostConfig.mediaHost+t.path:""}function X(t){const e=V(t);return{normalIconUrl:e,activeIconUrl:K(e)}}function K(t){return t.replace("/outline/","/glyph/")}function G(t){const{origin:e,passRef:n}=t;return n&&n.normalIconUrl?{normalIconUrl:n.normalIconUrl,activeIconUrl:n.activeIconUrl}:X(e.icon)}async function H(t,e){if((0,_.Kf)(t)){await async function(t,e){const{origin:n}=t;let i={options:[]};if((0,k.is)(n,"matrix"===n.type)){const{options:r,refMaps:o,passRefs:c}=await(0,a.P)(e,t.origin,"xid"),u=await N(t,r,c),l=await(0,s.tc)(e,u,t),{options:d,refMaps:f,passRefs:p}=await(0,a.P)(e,t.origin,"yid"),g=await N(t,d,p),m=await(0,s.Ou)(e,g,t);(0,S.sB)(t,[...o,...f]);const h=await N(t,n.otherOptions,[]),v=await(0,s.PR)(e,h,t);i={options:[],optionsX:l,optionsY:m,otherOptions:v.visibleList,hiddenOptions:v.hiddenList}}else if(n.options){const n=await(0,a.P)(e,t.origin);let r=n.options;(0,_.sy)(t)&&(r=r.concat(t.origin.otherOptions));const o=await N(t,r,n.passRefs),c=await(0,s.PR)(e,o,t),u=[],l=[];c.visibleList.forEach((t=>{t.isOtherOpt?l.push(t):u.push(t)})),(0,S.sB)(t,n.refMaps),i={options:u,otherOptions:l,hiddenOptions:c.hiddenList}}(0,d.Pg)(t,i)}(t,e);const n=W[t.type];n&&await n(t),function(t){if((0,d.vW)().realTimePreview)return;if(!(0,_.Kf)(t))return;let e;P.indexOf(t.type)>-1?e=t=>!!t.text:"select_image"===t.type?e=t=>!!t.image:"slide_rate"===t.type&&(e=t=>!!t.text||!!t.image),e&&(t.options=t.options.filter(e))}(t),function(t){const{options:e,type:n,parent:i}=t;let r=(0,_.sy)(t)?t.otherOptions:[];b.includes(n)&&(r=[...r,...e]);const a=r.filter((t=>t.autoSelectMarked)).reverse();if((0,o.qX)(t.origin))a.forEach((e=>{(0,d.Pg)(e,{selected:!0}),(0,l.eq)(i,e,t)}));else{const[e,...n]=a;n.forEach((e=>{e.autoSelectMarked=!1,(0,l.eq)(i,e,t,"因冲突被终止")})),e&&((0,d.Pg)(e,{selected:!0}),(0,l.eq)(i,e,t))}}(t),e.context.option=null}}W.select=t=>F(t,(async function(e){return await B(e,t),await w(e,t),e})),W.fill=t=>F(t,(async function(e){return e.inputType="input",e.prefix=e.origin.prefix,e.suffix=e.origin.suffix,await B(e,t),e.placeholder=(0,c.mP)(e.text),await v(e,t),e})),W.value_mark=t=>F(t,(async function(e){const{parent:n,origin:i}=t;e.value="";const r=await(0,c.Ob)(i.markMin,{state:n}),o=await(0,c.Ob)(i.markMax,{state:n});return(0,d.Pg)(e,{minValue:r,step:i.markStep,maxValue:o,minValueText:i.minText,maxValueText:i.maxText}),await v(e,t),e})),W.icon_mark=t=>F(t,(async function(e){return e.value="",(0,d.Pg)(e,{iconCount:t.origin.markImgCount||5,iconName:t.origin.markImgName||"rating-number"}),await v(e,t),e})),W.sequence=async t=>{let e=!1;await F(t,(async n=>((0,d.Pg)(n,{sortNo:-1}),await v(n,t)&&(e=!0),n))),e&&t.options.sort(((t,e)=>t.sortNo>e.sortNo?1:-1))},W.matrix=async t=>{const e=(0,i.Gy)(t,t.optionsX,t.optionsY),{parent:n,origin:r}=t,a=[];for(const i of e.optionsX)a.push({origin:i.origin,extraTitle:i.origin.extraTitle,width:i.origin.width,uuid:i.origin.uuid,number:i.origin.number,renderId:"",visible:i.visible,text:await(0,c.Ur)(i.text,{state:n,usage:{node:t,optionId:i.uuid}})});const s=new Map;a.forEach(((t,e)=>{s.set(t,e)})),a.sort(((t,e)=>{switch("".concat(t.origin.position,"___").concat(e.origin.position)){case"left-fixed".concat("___","right-fixed"):case"left-fixed".concat("___",void 0):case"".concat(void 0,"___","right-fixed"):return-1;case"".concat(void 0,"___","left-fixed"):case"right-fixed".concat("___","left-fixed"):case"right-fixed".concat("___",void 0):return 1;default:{const n=s.get(t),i=s.get(e);return n&&i?n-i:t.number-e.number}}}));const u=[];for(const i of e.optionsY)u.push({origin:i.origin,uuid:i.origin.uuid,number:i.origin.number,renderId:"",visible:i.visible,height:i.origin.height,text:await(0,c.Ur)(i.text,{state:n,usage:{node:t,optionId:i.uuid}})});const l=new Map;u.forEach(((t,e)=>{l.set(t,e)})),u.sort(((t,e)=>{switch("".concat(t.origin.position,"___").concat(e.origin.position)){case"top-fixed".concat("___","bottom-fixed"):case"".concat(void 0,"___","bottom-fixed"):case"top-fixed".concat("___",void 0):return-1;case"".concat(void 0,"___","top-fixed"):case"bottom-fixed".concat("___","top-fixed"):case"bottom-fixed".concat("___",void 0):return 1;default:{const n=l.get(t),i=l.get(e);return n&&i?n-i:t.number-e.number}}}));for(const e of t.otherOptions)await R(e,t);const f={otherOptions:t.otherOptions,renderOptionsX:a.filter((t=>t.visible)),renderOptionsY:u.filter((t=>t.visible))},p=(0,o.Lk)(r)||(0,o.mI)(r),g=await async function(t,e,n,i=!1){const r=[],o=[];let a=t,s=e;i&&(a=e,s=t);for(const t of a)if(t.visible){const e={text:t.text,list:[]};for(const r of s)if(r.visible){let a=t,s=r;i&&(s=t,a=r);const c=await I(a,s,n,i);o.push(c),e.list.push(c)}r.push(e)}return{flatten:r,options:o,fullOptions:o}}(a,u,t,p),m=function(t,e,n){const i=[];return e.forEach((e=>{if(e.visible){const r=[];t.forEach((t=>{if(t.visible){const i=n.find((n=>n.xid===t.uuid&&n.yid===e.uuid));if(!i)throw new Error("matrix item not found");r.push(i)}})),i.push(r)}})),{matrix:i}}(a,u,g.options);(0,d.Pg)(t,{...f,...g,...m})},W.select_image=t=>F(t,(async e=>(e.image=await z(e,t),await w(e,t),e))),W.upload=t=>F(t,(async t=>(t.filePath="",t.value="",t.fileName="",t.fileType="",t.progress=0,t.isImage=!1,t.fileLimits=[...t.origin.fileLimits||["image"]],t.accept=(0,u.D)(t.fileLimits),t))),W.menu=t=>F(t,(async e=>(await B(e,t),await w(e,t),e)),!0),W.select_icon=t=>F(t,(async e=>{const n={...e,...G(e)};return await w(n,t),n})),W.weight=t=>{const{parent:e}=t;return F(t,(async n=>{let i=await(0,c.Ob)(n.origin.maxMark,{state:e});const r=await(0,o.Vg)(t.origin,e);return(!i||i>r)&&(i=r),(0,d.Pg)(n,{percent:"0%",color:n.origin.color,maxValue:i,value:""}),await v(n,t),n}))},W.cascade=t=>F(t,(async t=>(t.text="",t.cascadePath=t.origin.cascadePath,t))),W.data=async t=>{for(const e of t.options)await w(e,t)},W.hot_spot=async t=>await F(t,(async e=>{await B(e,t),await w(e,t);let n=e.origin.graphs;if("points"in e){const{points:t,x:i,y:r}=e.origin;n=[{points:t,x:i,y:r,uuid:(0,k.M8)()}]}const i=n.map((t=>{const{area:e,pathD:n}=t.points.reduce(((e,n,i)=>{e.pathD?e.pathD+=" L":e.pathD+="M",e.pathD+=n.x+" "+n.y;const r=t.points[i+1];return r?e.area+=n.y+r.y*(r.x-n.x)/2:e.pathD+=" Z",e}),{area:0,pathD:""});return{...t,area:e,pathD:n,transform:"translate(".concat(t.x,",").concat(t.y,")")}}));return(0,d.Pg)(e,{graphs:i,color:e.origin.color}),e})),W.heat_map=(t,e)=>F(t,(async function(t){return t})),W.max_diff=t=>F(t,(async function(e){return e.value="0",e.image=await z(e,t),e.records=[],e})),W.slide_rate=async t=>{const{rateOptions:e}=t.origin,n=[];for(const i of e){const e=await C(t,i,null);await(0,s.o4)(t.parent,e,t)&&n.push(i)}return t.rateOptions=n.map((t=>{const{icon:e}=t;return{...X(e),text:(0,c.FL)(t.text),value:t.value,uuid:t.uuid,customData:{}}})),F(t,(async e=>((0,d.Pg)(e,{image:await z(e,t),value:""}),await v(e,t),e)))}},9481:(t,e,n)=>{"use strict";n.d(e,{De:()=>f,Ou:()=>d,PR:()=>c,o4:()=>s,tc:()=>l}),n(3948);var i=n(5838),r=n(1128),o=n(9026),a=n(3768);async function s(t,e,n){const{origin:r}=e,a=r.displayConfig;if(a){n.hasOptShowHide=!0,t.context.option=e;const r=await(0,i.Q3)(t,a);return r&&(0,o.oA)(t,e,n),t.context.option=null,r}return!0}async function c(t,e,n){const i=[],r=[];for(const o of e)await s(t,o,n)?(o.visible=!0,i.push(o)):(o.visible=!1,r.push(o));return{visibleList:i,hiddenList:r}}async function u(t,e,n){for(const i of e)i.visible=await s(t,i,n);return e}async function l(t,e,n){e=await u(t,e,n);for(const t of e)t.visible=t.visible&&"hidden"!==t.width;return e}async function d(t,e,n){e=await u(t,e,n);for(const t of e)t.visible=t.visible&&"hidden"!==t.height;return e}function f(t,e){const{renderList:n}=t,i=[];return n.forEach((t=>{if(!(0,a.F2)(t.checkMode,e))return;const{hasOptShowHide:n,nodeUuid:o,loop:s}=t;if(n){const e="matrix"===t.type?(0,r.mH)(t):(0,r.eu)(t);let n;s&&(n=s.replacements.map((t=>t.index))),i.push({node_id:o.toLowerCase(),loop_idxs:n,option_ids:e.map((t=>t.uuid.toLowerCase()))})}})),i}},9564:(t,e,n)=>{"use strict";n.d(e,{$X:()=>z,$i:()=>B,CE:()=>T,Cf:()=>x,Fy:()=>N,Hf:()=>A,Ir:()=>O,Jz:()=>y,KF:()=>v,Lk:()=>k,NU:()=>q,Rx:()=>E,So:()=>b,Vg:()=>j,YC:()=>V,ZA:()=>_,Zu:()=>P,gx:()=>R,jJ:()=>W,lE:()=>C,mI:()=>L,nv:()=>D,oZ:()=>w,qK:()=>h,qX:()=>I,rz:()=>M,zR:()=>S}),n(3948);var i=n(1128),r=n(3656),o=n(6935),a=n(7550),s=n(4248),c=n(5159),u=n(3877),l=n(45),d=n(3768),f=n(5029);const p={valid:!0,message:""},g=["region","location","area","describe","end","logic","loop","lottery","verify"],m={};function h(t){(0,s.Pg)(t,{hasAnswer:(0,d.JH)(t)})}function v(t,e){if(8!==e.length)return e;let n=m[e];if(!n){const i=t.nodeList.find((t=>(0,r.RC)(t.nodeUuid,e)));if(i)return n=m[e]=i.nodeUuid,i.nodeUuid}return n}function y(t){return t.find((t=>"start"===t.type))}function _(t){return!0===t.answerRequired}function w(t){return(0,r.is)(t,"matrix"===t.type)?function(t){const{randomType:e}=t.origin;return"col"===e||"row_col"===e||"row"===e}(t):!0===t.origin.randomOptionY}function b(t){const e=t.loopStack,n=t.nodeUuid;return(0,r.am)(n,e)}function x(t,e){if(e)return t.find((t=>t.input&&(0,r.RC)(t.input.uuid,e)||t.loopEnd&&(0,r.RC)(t.loopEnd.uuid,e)))}function T(t,e,n){const i=e.find((t=>(0,r.RC)(t.selfPortId,n)));if(i&&i.destInputId)return x(t,i.destInputId)}function I(t){return(0,r.is)(t,"matrix"===t.type)?"multi"===t.matrixSelect:!0===t.multiSelect}function O(t){return(0,r.is)(t,"matrix"===t.type)?"single"===t.matrixSelect:!0!==t.multiSelect}function k(t){return"single_row"===t.matrixSelect}function S(t){return"single_col"===t.matrixSelect}function E(t){return"single_row_col"===t.matrixSelect}function P(t){return I(t)&&"all"===t.multiType}function L(t){return I(t)&&"row"===t.multiType}function C(t){return I(t)&&"col"===t.multiType}async function N(t,e){const{origin:n}=t,i=!0===n.limitEnabled;let r=i?await(0,o.Ob)(n.maxUploadCount,{state:e}):t.options.length,a=i?await(0,o.Ob)(n.minUploadCount,{state:e}):1;const s=t.options.length;return a||(a=1),r||(r=s),a>s&&(a=s),a>r&&(a=r),{max:r,min:a}}async function R(t,e){const{origin:n}=t;if(!I(n))return{min:1,max:1};const{multiMin:a,multiMax:s}=n;let c=await(0,o.Ob)(a,{state:e}),u=await(0,o.Ob)(s,{state:e});const d=(0,i.Kn)(t).length;return(0,r.is)(t,"matrix"===t.type)||(c=(0,l.PC)(t,c)),c||(c=1),u||(u=d),c>d&&(c=d),c>u&&(c=u),{min:c,max:u}}const U=(t,e,n,i)=>{let r=0;r=i?t.filter((t=>t[i]===e[i]&&t.selected)).length:t.filter((t=>t.selected)).length;const o=r<n;let s="";return o||(s=i?"xid"===i?(0,a.Iu)(c.bn.matrix.colLimitMax,{max:n}):(0,a.Iu)(c.bn.matrix.rowLimitMax,{max:n}):(0,a.Iu)(c.bn.select.limitMax,{max:n})),{valid:o,message:s}};async function A(t,e){if(!I(t.origin)||(0,l.Cp)(e.origin)||!e.isOtherOpt&&((0,l.Cp)(e.optionX.origin)||(0,l.Cp)(e.optionY.origin)))return p;const n=P(t.origin);if(!n&&!(0,i.Mo)(e))return p;const r=(0,i.eu)(t),{max:o}=await R(t,t.parent);return n?U(r,e,o):C(t.origin)?U(r,e,o,"xid"):L(t.origin)?U(r,e,o,"yid"):p}async function M(t,e){if(!I(t.origin))return p;const{max:n}=await R(t,t.parent),r=(0,i.eu)(t),o=!(r.filter((t=>t.selected)).length===n)||(0,l.ID)(r,e);return{valid:o,message:o?"":(0,a.Iu)(c.bn.select.limitMax,{max:n})}}function D(t,e){return t.find((t=>(0,r.RC)(t.nodeUuid,e)))}const B=["logic","random","loop"],F=[...B,"data"];function W(t){(0,s.vW)().preview&&t.autoSkip&&t.parent.previewShadowNodes&&!F.includes(t.type)&&(t.readonly=!0)}function z(t){if(t.forceSkipReason)return t.forceSkipReason;if("data"===t.type)return"data_hidden";if(t.autoSkip)return function(t){return(0,s.vW)().preview&&t.parent.previewShadowNodes&&!F.includes(t.type)}(t)?"":"setting";if((0,f.u)(t.nodeUuid))return"random_group";const e=(0,i.eu)(t);return g.indexOf(t.type)>-1||!e||0!==e.length?"":"no_options"}function q(t,e){return!(!t.circleNode1Id&&!t.circleNode2Id)&&(0,r.RC)(t.circleNode1Id,e.circleNode1Id)&&(0,r.RC)(t.circleNode2Id,e.circleNode2Id)}async function j(t,e){const{options:n}=t;let i=await(0,o.Ob)(t.total,{state:e})||100,r=0;for(const t of n){const n=await(0,o.Ob)(t.maxMark,{state:e});if(void 0===n){r=-1;break}r+=n}return r>0&&r<i&&(i=r),i}async function V(t){const{max:e}=await N(t,t.parent),n=e===t.options.filter((e=>(0,u.Zy)(e,t))).length;(0,s.Pg)(t,{fullUploaded:n})}},5589:(t,e,n)=>{"use strict";n.d(e,{U:()=>p,k:()=>g});var i=n(2812),r=n(1128),o=n(8064),a=n(8413),s=n(7679),c=n(4248),u=n(9192),l=n(1028);function d(t,e,n,i){t&&((0,c.Pg)(t,{selected:!0}),e.forEach((e=>{e!==t&&(0,c.Pg)(e,{selected:!1})}))),(0,c.Pg)(i,{value:n})}const f={};async function p(t,e){const n=f[e.type],i=n?await n(t,e):l.JG;return i.noValidate||(0,s.jY)(e),i}function g(t){return t.failed=!0,t.succeed=!1,t.origin.failedSkip&&(t.failedSkipActivated=!0,t.autoSkip=!0),l.vv}f.region=(t,e)=>{e.indexes=t;const n=(0,r.eu)(e),a=(0,i.ks)(t);d((0,o.dj)(n,a),n,a,e);const s=a.split("-"),c={country:"",province:s[0]||"",city:s[1]||"",district:s[2]||""};return e.parent.address=c,e.position={address:c},l.vv},f.location=(t,e)=>{e.succeed=!0,e.failed=!1,e.failedSkipActivated=!1;const n=(0,a.L)(t.address,"-",e.infoRange),i=(0,r.eu)(e);return d((0,o.dj)(i,n),i,n,e),(0,c.Pg)(e.parent,{point:t.point,address:t.address}),e.position=t,l.vv},f.area=(t,e)=>{e.succeed=!0,e.failed=!1,e.failedSkipActivated=!1;const n=(0,a.L)(t.address,"-","street"),i=(0,r.eu)(e);return d((0,o.BT)(i,t.point),i,n,e),(0,c.Pg)(e.parent,{point:t.point,address:t.address}),e.position=t,l.vv},f.verify=(t,e)=>((0,c.Pg)(e,t),{...l.vv,noValidate:!0}),f.gift=(t,e)=>((0,c.Pg)(e,t),l.kI),f.heat_map=async(t,e)=>{const n={x:Math.round(t.x),y:Math.round(t.y)},{options:i}=e,r=i[e.clickTimes%i.length];return(0,c.Pg)(r,{point:n,value:JSON.stringify(n)}),e.clickTimes+=1,await(0,u.t)(r,e),l.kI}},152:(t,e,n)=>{"use strict";n.d(e,{o:()=>o});var i=n(4248);function r(t,e){(0,i.Pg)(t,{value:e});const{option:n}=t;n.records.find((e=>e.round===t.round)).value=e,(0,i.Pg)(n,{value:n.records.reduce(((t,e)=>t+e.value),0).toString()})}function o(t,e,n){if(e.value===t)return{result:!0};r(e,t),n.items.forEach((t=>{t!==e&&t.value===e.value&&r(t,0)}));const o=n.items.some((t=>1===t.value)),a=n.items.some((t=>-1===t.value));return(0,i.Pg)(n,{done:o&&a}),{result:!0}}},8231:(t,e,n)=>{"use strict";n.d(e,{O:()=>a}),n(8921),n(6248),n(3599),n(1477),n(4362),n(5389),n(401),n(5164),n(1238),n(4837),n(7485),n(465),n(6651),n(1437),n(5285),n(9865),n(3948);var i=n(4248),r=n(9192);function o(t){return"[object Map]"!==Object.prototype.toString.call(t)}async function a(t,e,n){const{options:a}=n;if(!function(t,e){if(o(t))return!0;if(t.size!==e.length)return!1;const n=new Array(e.length).fill(!1);for(const[i,r]of t)r>=0&&r<e.length&&(n[r]=!0);return n.every((t=>t))}(t,a)||!function(t,e){if(t.size!==e.length)return!1;const n=Array.from(t.values()).filter((t=>-1!==t));for(const t of n)if(t<1||t>e.length)return!1;return i=n,new Set(i).size===i.length;var i}(e,a))return{result:!1};let s;for(const[t,n]of e)t.sortNo!==n&&((0,i.Pg)(t,{sortNo:n,selected:-1!==n}),t.selected&&(s=t));if(!o(t)){const e=[];for(const[n,i]of t)e[i]=n;(0,i.Pg)(a,e)}return s&&await(0,r.t)(s,n),{result:!0}}},4125:(t,e,n)=>{"use strict";n.d(e,{s:()=>r});var i=n(4248);function r(t){if(!t)return{};const{useCustomLogo:e,logoText:n,logoImage:r,showLogoInEachPage:o,logoImageShowWidth:a}=t;let s="";if(r){const t=r.name;s=(0,i.vW)().hostConfig.mediaHost+"/"+t}return{useCustomLogo:e,logoImageUrl:s,logoText:n,showLogoInEachPage:o,logoImageShowWidth:a}}},8351:(t,e,n)=>{"use strict";n.d(e,{ks:()=>rt,MJ:()=>it,D1:()=>nt,qG:()=>et});var i=n(7552),r=n(9564),o=n(2812),a=n(7550),s=n(5159),c=n(4248);const u={select:async t=>{const e=(0,r.qX)(t.origin);let n=(0,a.Iu)(s.bn.select.single);if(e){n=(0,a.Iu)(s.bn.select.multi);const{min:e,max:i}=await(0,r.gx)(t,t.parent);return{typeName:n,typeDescription:(0,a.Iu)(s.bn.select.limitBetween,{min:e,max:i})}}return{typeName:n,typeDescription:""}},value_mark:async()=>({typeName:(0,a.Iu)(s.bn.mark.value)}),icon_mark:async()=>({typeName:(0,a.Iu)(s.bn.mark.graph)}),weight:async t=>{const e=t.weightTotal;let n=(0,a.Iu)(s.bn.weight.total,{total:e});return n+=!0===t.origin.relax?(0,a.Iu)(s.bn.weight.relax):(0,a.Iu)(s.bn.weight.strict),{typeName:(0,a.Iu)(s.bn.weight.name),typeDescription:n}},fill:async()=>({typeName:(0,a.Iu)(s.bn.fill.name)}),slide_rate:async()=>({typeName:(0,a.Iu)(s.bn.slideRate.name)}),sequence:async t=>{const e=t.origin.rankCount,n=Number(e)?(0,a.Iu)(s.bn.rank.limitMin,{min:e}):(0,a.Iu)(s.bn.rank.limitAll);return{typeName:(0,a.Iu)(s.bn.rank.name),typeDescription:n}},menu:async t=>({...await u.select(t),typeName:(0,a.Iu)(s.bn.menu.name)}),select_icon:t=>u.select(t),select_image:t=>u.select(t),upload:async t=>{const e=(0,a.Iu)(s.bn.upload.name);if(!0===t.origin.limitEnabled){const{min:n,max:i}=await(0,r.Fy)(t,t.parent);return{typeName:e,typeDescription:(0,a.Iu)(s.bn.upload.amountLimit,{min:n,max:i})}}return{typeName:e,typeDescription:""}},location:async()=>({typeName:(0,a.Iu)(s.bn.locate.name)}),area:async()=>({typeName:(0,a.Iu)(s.bn.site.name)}),region:async()=>({typeName:(0,a.Iu)(s.bn.region.name)}),verify:async()=>({typeName:(0,a.Iu)(s.bn.verify.name)}),cascade:async()=>({typeName:(0,a.Iu)(s.bn.cascade.name)}),matrix:async t=>{const{origin:e}=t;if((0,r.Ir)(e))return{typeName:(0,a.Iu)(s.bn.matrix.single)};if((0,r.qX)(e)){const{min:n,max:i}=await(0,r.gx)(t,t.parent);let o=(0,a.Iu)(s.bn.matrix.multi),c=(0,a.Iu)(s.bn.select.limitBetween,{min:n,max:i});return(0,r.lE)(e)?(o=(0,a.Iu)(s.bn.matrix.multiCol),c=(0,a.Iu)(s.bn.matrix.colLimitBetween,{min:n,max:i})):(0,r.mI)(t.origin)&&(o=(0,a.Iu)(s.bn.matrix.multiRow),c=(0,a.Iu)(s.bn.matrix.rowLimitBetween,{min:n,max:i})),{typeName:o,typeDescription:c}}return(0,r.Lk)(e)?{typeName:(0,a.Iu)(s.bn.matrix.singleRow),typeDescription:(0,a.Iu)(s.bn.matrix.eachRowOne)}:(0,r.zR)(e)?{typeName:(0,a.Iu)(s.bn.matrix.singleCol),typeDescription:(0,a.Iu)(s.bn.matrix.eachColOne)}:(0,r.Rx)(e)?{typeName:(0,a.Iu)(s.bn.matrix.singleRowCol),typeDescription:(0,a.Iu)(s.bn.matrix.eachRowColOne)}:{typeName:(0,a.Iu)(s.bn.matrix.single)}},hot_spot:async()=>({typeName:(0,a.Iu)(s.bn.hotSpot.name)}),heat_map:async()=>({typeName:(0,a.Iu)(s.bn.heatMap.name)}),max_diff:async()=>({typeName:(0,a.Iu)(s.bn.maxDiff.name)})};var l=n(6935),d=n(9271),f=n(9310),p=n(4725),g=n(6866),m=n(7117),h=n(6539),v=(n(3948),n(1128)),y=n(5750),_=n(9481),w=n(3656),b=n(6451);function x(t){return 1===t?"bottom":2===t?"top":"center"}function T(t,e,n,i,r=""){const{resultId:o,text:a}=e,s=o&&t.options.find((t=>t.cascadePath===o)),c=r?r+"=>"+a:a;return s&&(s.text=c),n.nodeTypeInfoRequired||(e.hint=""),e.list&&e.list.forEach((e=>{e.text=T(t,e,n,i,c)})),e.text}async function I(t,e){const{destList:n,cascadeStart:i}=e.origin,o=(0,r.CE)(t.nodeList,n,i.uuid);o&&(e.cascade=await O(e,t,o,""))}async function O(t,e,n,o,c){c?await(0,i.dX)(c,t):c={uuid:"",text:""};const{nodeList:u}=e,l=o?o+"=>"+(0,w.pC)(c.uuid):(0,w.pC)(c.uuid),d={option:c,groupId:o,resultId:l,text:c.text||c.optComment};if(!n)return d;d.placeholder=n.placeholder||(0,a.Iu)(s.bn.menu.clickToSelect);const f=await async function(t,e,n){let r=n.cachedCasMenuOpts;r||(r=n.cachedCasMenuOpts={});const o=r[t.nodeUuid];if(o)return o;{const{options:o,passRefs:a}=await(0,b.P)(e,t),s=await(0,i.gk)(n,o,a),c=await(0,_.PR)(e,s,n),u={...et({target:t},e),renderId:(0,w.am)(t.nodeUuid,n.loopStack)},l=await(0,i.gk)(n,t.otherOptions,[]),d=await(0,_.PR)(e,l,n),f={options:(0,y.uR)(u,c.visibleList),otherOptions:d.visibleList};return r[t.nodeUuid]=f,f}}(n,e,t),p={...et({target:n},e),...f,parent:e},g=(0,r.qX)(n),{min:m,max:h}=await(0,r.gx)(p,e),{destList:T,output:I}=n,k=(0,r.ZA)(n),S=[],E=g?(0,a.Iu)(s.bn.cascade.selectBetween,{min:m||1,max:h}):(0,a.Iu)(s.bn.cascade.selectSome,{amount:1}),P={...d,list:S,multiple:g,min:m,max:h,hint:E,required:k,display:x(n.menuType),lineCount:n.lineCount},L=(0,r.CE)(u,T,I.uuid),C=(0,v.eu)(p);(0,i.MT)(C);for(const n of C){const i=(0,r.CE)(u,T,n.uuid)||L,o=await O(t,e,i,l,n);S.push(o)}return P}function k(t,e,n){const i=function(t){const e=[];return t.forEach((t=>{const{pickedTimes:n}=t;e[n]?e[n].push(t):e[n]=[t]})),e}(t),r={items:[],done:!1};let o=e;for(const t of i)if(t){const e=(0,w.DQ)(t,o);if(e.forEach((t=>{r.items.push({option:t.option,value:0,round:n}),t.option.records.push({round:n,value:0}),t.pickedTimes+=1})),o-=e.length,0===o)break}return r}n(2707);var S=n(9698),E=n(7712);const P={optionsRelationship:{},groupsRelationship:{}},L=["select","select_icon","select_image","icon_mark","value_mark","fill","weight"];function C(t){return"group"===t.type}function N(t){return"type"in t&&"group"===t.type}async function R(t,e){const{options:n,origin:i}=t;let r=i.optionGroups||[];if(o=t.type,!L.includes(o))return{optionGroups:void 0};var o;const a=function(t,e){const{optionRefers:n,refOptions:i}=t.origin;let r=[];const o=[];return n.forEach((t=>{const{identity:{nodeId:n}}=(0,S.V)(t);if(n&&!o.includes(n)){o.push(n);const t=(0,E.ck)(e,n);if(!t)return;const a=M(A(t.optionGroups||[],t.origin.optionGroupsRelationship||P),i);r=r.concat(a)}})),r}(t,e);if(r=r.concat(a),0==r.length)return{optionGroups:void 0};r=function(t,e,n){const i=t.concat(e),r=(t,e)=>{if(C(t)){const n=t;let i=e;for(const t of n.children)i=Math.min(r(t,i),i);return i}{const e=t,i=n.map((t=>t.uuid)).indexOf(e.optionUuid);return-1===i?Number.MAX_VALUE:i}};return i.sort(((t,e)=>r(t,Number.MAX_VALUE)-r(e,Number.MAX_VALUE)))}(r,function(t,e){const n={};!function t(e){e.forEach((e=>{C(e)?e.children.forEach((e=>{C(e)?t(e.children):n[e.optionUuid]=e.groupUuids})):n[e.optionUuid]=e.groupUuids}))}(e);const i=[];t.forEach((t=>{n[t.uuid]||i.push(t)}));const r=[];return i.forEach((t=>{const e={text:t.text,optionUuid:t.uuid,groupUuids:[],type:"option",currentLevel:1};r.push(e)})),r}(n,r),n);let s=await D(r,n,e);return s=U(s),s=function(t,e){const{randomOptionY:n,circulation:i,followRandom:r}=t.origin;return i?W(e):n?r?e:F(e):e}(t,s),z(s,n),s=q(s),{optionGroups:s}}function U(t){const e=[];return t.forEach((t=>{N(t)?function(t){const{children:e}=t;return!(!e||0===e.length)&&0!==U(e).length}(t)&&e.push(t):e.push(t)})),e}function A(t,e){return(t||[]).map((t=>{if(N(t)){const n=(0,w.p$)(t),{groupTitle:i,showGroupTitle:r,children:o,randomMode:a,type:s,uuid:c}=n;return{groupTitle:i,showGroupTitle:r,randomMode:a,type:s,uuid:c,children:A(o,e)}}{const n=(0,w.p$)(t),{text:i,uuid:r}=n;return{type:"option",text:i,optionUuid:r,groupUuids:e.optionsRelationship[r]||[]}}}))}function M(t,e){return t.map((t=>function(t,e){if(C(t)){const n=M(t.children,e);return t.children=[...n],t}{const{optionUuid:n,type:i,groupUuids:r,text:o,currentLevel:a}=t;return{type:i,groupUuids:r||[],text:o,currentLevel:a,optionUuid:e.find((t=>(0,w.RC)(n,t.refOptId))).uuid}}}(t,e)))}async function D(t,e,n){const i=[];for(const r of t){const t=await B(r,e,n);t&&i.push(t)}return i}async function B(t,e,n){if(C(t))return{uuid:t.uuid,type:t.type,groupTitle:await(0,l.Ur)(t.groupTitle,{state:n}),showGroupTitle:t.showGroupTitle,randomMode:t.randomMode,children:await D(t.children,e,n),currentLevel:t.currentLevel};{const{optionUuid:n}=t;return e.find((t=>t.uuid===n))}}const F=t=>function(t){const e=[];return t.forEach((t=>{const n=(0,w.XJ)(e.length+1);e.splice(n,0,t)})),e}(t),W=t=>{return e=t,n=(n||Math.round(10*Math.random()))%e.length,e.slice(n).concat(e.slice(0,n));var e,n};function z(t,e){t.forEach((t=>{if(N(t)){const{randomMode:n,children:i}=t;z(i||[],e);const r={followNode:()=>((t,e)=>{const{groups:n,options:i}=(t=>t.reduce(((t,e,n)=>{const{groups:i,options:r}=t;return N(e)?i.push({group:e,index:n}):r.push({uuid:e.uuid,option:e,index:n}),t}),{groups:[],options:[]}))(t),r=e.reduce(((t,e)=>{const{uuid:n}=e,r=i.find((({uuid:t})=>t===n));return r&&t.push(r.option),t}),[]);return n.forEach((({group:t,index:e})=>{r.splice(e,0,t)})),r})(i,e),noRandom:()=>i,random:()=>F(i),circulation:()=>W(i)};t.children=r[n]()}}))}function q(t){let e=[],n=[];const i=[];return t.forEach((t=>{if(N(t))t.children=q(t.children),i.push(t);else{const r=t.origin,{position:o}=r;"top-fixed"===o?e.push(t):"bottom-fixed"===o?n.push(t):i.push(t)}})),e=e.sort(((t,e)=>t.number-e.number)),n=n.sort(((t,e)=>t.number-e.number)),[...e,...i,...n]}var j=n(3087),V=n(7428),X=n(5905),K=n(6970),G=n(5286),H=n(9026),Z=n(5838);const Y=["select","menu","select_image","select_icon","upload"];function $(t,e,n){let i=t.indexOf(e)+n;return i<0?i=0:i>t.length-1&&(i=t.length-1),t[i]}const J={};function Q(t){const{origin:e}=t;return{mapImage:e.mapImage&&(0,d.q)(e.mapImage),mapImgHeight:e.mapImgHeight,mapImgWidth:e.mapImgWidth}}async function tt(t){const{loop:e,parent:n,origin:i}=t,{lockLoopCount:r}=i;let o=i.nodeName.split("/")[0];if(o&&i.circleNode1Id&&!r&&!(0,c.vW)().realTimePreview){const t=(0,m.SN)();let r=await t.C_OL_LBL.getText({state:n});if(r||(r=e.node.nodeName+"_"+await t.C_OL_NUM.getText({state:n})),o=r+"_"+o,i.circleNode2Id){let i=await t.C_IL_LBL.getText({state:n});i||(i=e.node.nodeName+"_"+await t.C_IL_NUM.getText({state:n})),o=i+"_"+o}}return o}function et(t,e){const{target:n,loop:i,random:r,loopStack:o}=t;return{customData:{},nodeUuid:n.nodeUuid,nodeName:n.nodeName,origin:n,loop:i,random:r,loopStack:o,type:n.type,parent:e}}async function nt(t,e){const n={...t,hasAnswer:!1,autoSkip:t.origin.autoSkip,reached:!1,readonly:!1,embedVarMaps:[],pageStart:!1,pageEnd:!1,checkMode:t.origin.checkMode,runtimeNodeName:await tt(t),startTime:(new Date).toISOString(),costTime:0,endTime:0,realtimePreview:(0,c.vW)().realTimePreview,renderId:(0,r.So)(t),prev:e,errorMessage:""},o=t.parent;if(r.$i.indexOf(n.type)>-1)return async function(t,e){(0,c.Pg)(t,{autoSkip:!0,number:""});const n=J[t.type];return n&&await n(t),t}(n);const{qNumberRequired:a}=o;a&&function(t){"end"!==t.type&&"describe"!==t.type&&(0,c.Pg)(t,{number:t.runtimeNodeName})}(n),function(t){(0,c.Pg)(t,{validateFailTimes:0,validateFailed:!1})}(n),function(t){const{origin:e}=t;(0,c.Pg)(t,{asterisks:!0===e.answerRequired&&t.parent.asterisksRequired})}(n),await async function(t){const e=t,{origin:n}=e;var i;n.image?(0,c.Pg)(e,{imgScale:n.imgScale,imgPosition:n.imgPosition,imgTransTime:n.imgTransTime,imgTransType:n.imgTransType,images:await(0,b.nn)(t.parent,e)}):(0,c.Pg)(e,{images:[]}),n.video&&(0,c.Pg)(e,{autoplayVideo:n.autoplayVideo,video:n.video&&(i=n.video,i?{id:i.id,url:(0,V.f)(i.url),poster:(0,V.f)(i.poster)}:null)})}(n),await async function(t){if((0,X.n4)(t)){const{origin:e}=t;(0,c.Pg)(t,{layout:e.layout,template:await(0,K.b)(e.template,t.parent)})}}(n),await(0,i.Ds)(n,o),await async function(t,e){const n=await R(t,e);return(0,c.Pg)(t,{optionGroups:n.optionGroups}),n}(n,o);const s=J[n.type];return s&&await s(n),o.context.node=n,await async function(t){const e=t.origin,n=await(0,r.gx)(t,t.parent),i=(0,r.qX)(e);(0,c.Pg)(t,{...n,multiple:i,selectType:i?"checkbox":"radio"})}(n),await(0,G.m)(n),(0,c.dU)().dev.infer||await async function(t){if(!t.parent.nodeTypeInfoRequired)return;const e=u[t.type],n=e?await e(t):null;n&&(n.typeDescription="",(0,c.Pg)(t,n))}(n),(0,r.jJ)(n),await async function(t){(0,X.Kf)(t)&&await async function(t){if(!(0,c.vW)().realTimePreview)if((0,w.is)(t,"sequence"===t.type)){if(1===t.options.length){const e=t.options[0];(0,c.Pg)(e,{selected:!0,sortNo:1}),(0,H.OP)(0,t)}}else if((0,w.is)(t,Y.indexOf(t.type)>-1)&&!await(0,Z.yv)(t.origin.showWithSingleRefOpt,t.parent)){let e=[...t.options];if((0,X.sy)(t)&&(e=[...e,...t.otherOptions]),1===e.length){const n=e[0];n.origin.isRef&&((0,c.Pg)(n,{selected:!0}),(0,H.eq)(t.parent,n,t,"single_ref_select_opt"),t.forceSkipReason="single_ref_select_opt",t.autoSkip=!0)}}}(t)}(n),(0,g.a7)(n),n}async function it(t,e,n){const i=!(!e||!e.id);let r;t.showRewards&&(r=t.options.map((t=>({rewardName:t.rewardName,rewardCount:t.rewardCount}))));const o=i?t.success:t.fail,u=i?(0,a.Iu)(s.bn.lottery.congratulation):(0,a.Iu)(s.bn.lottery.pity),l=i?(0,a.Iu)(s.bn.lottery.goal):(0,a.Iu)(s.bn.lottery.fail),f=o.title||u,p=o.summary||l,g=(0,d.q)({width:o.imageWidth,height:o.imageHeight,name:o.imageName,id:"",originName:"",type:"image"});let m;if(i){const n=t.options.find((t=>t.uuid===e.lottery_option_id));n&&(m=n.rewardName)}const h=et({target:t},n),v=await nt(h,n.current);return(0,c.Pg)(v,{rewardRaw:e,rewardTime:(0,j.GN)(),goal:i,rewardImage:g.name?g:void 0,rewardTitle:f,rewardDescribe:p,rewardList:r,rewardName:m,showRewards:t.showRewards}),!(0,c.vW)().preview&&i&&((0,c.dU)().app.canHandleReward()||"red_envelope"!==e.type||await rt(n,v)),v}async function rt(t,e){const{formalResult:{reward:n,authorizer:i},nodeList:o}=t,{app_id:a,component_appid:s}=i,u=(0,r.nv)(o,n.gift_id);e.linkUrl=await(0,l.sb)(u.linkUrl,{state:t}),e.endBtnText=u.endBtnText||"";const d={rid:String(n.id),aid:a,cid:s,qid:t.surveyId,tid:t.transactionID,sid:(0,h.ZI)().sid,rt:"red_envelope",locale:t.language,reward_from_qr_code:"true"};e.qrCode=(0,c.dU)().app.getRewardUrl(d)}J.region=async t=>{(0,c.Pg)(t,{indexes:"0 0 0",value:"",regions:await(0,o.JL)(),infoRange:t.origin.infoRange})},J.end=async t=>{const{parent:e}=t,n=await(0,l.sb)(t.origin.linkUrl,{state:e});(0,c.Pg)(t,{hasReward:!1,linkUrl:n,endBtnText:t.origin.endBtnText,backendRequest:t.origin.backendRequest})},J.location=async t=>{(0,c.Pg)(t,{regions:await(0,o.JL)(),infoRange:t.origin.infoRange,value:""})},J.value_mark=async t=>{(0,c.Pg)(t,{showInput:t.origin.showInput})},J.icon_mark=async t=>{(0,c.Pg)(t,{inverseValue:t.origin.inverseValue})},J.menu=async t=>{const{origin:e}=t;(0,c.Pg)(t,{placeholder:e.placeholder||(0,a.Iu)(s.bn.menu.clickToSelect),display:x(e.menuType),lineCount:e.lineCount})},J.area=async t=>{(0,c.Pg)(t,{infoRange:"street",regions:await(0,o.JL)()})},J.verify=async t=>{(0,c.Pg)(t,{value:"",phoneNumber:"",code:"",validateType:t.origin.validateType})},J.weight=async t=>{const{origin:e,parent:n}=t,i=await(0,r.Vg)(e,n);(0,c.Pg)(t,{weightTotal:i,unit:e.unit,distributeBy:e.distributeBy})},J.max_diff=async t=>{const{origin:e}=t,n=function(t){const{options:e,origin:n}=t,{taskCount:i,itemCountPerTask:r}=n,o=e.map((t=>({option:t,pickedTimes:0}))),a=[];for(let t=0;t<i;t++)a.push(k(o,r,t+1));return a}(t);(0,c.Pg)(t,{itemCountPerTask:e.itemCountPerTask,taskCount:e.taskCount,positiveDesc:e.positiveDesc,negativeDesc:e.negativeDesc,tasks:n,currentTask:n[0],gotoNextTask(){(0,c.Pg)(t,{currentTask:$(t.tasks,t.currentTask,1)})},gotoPrevTask(){(0,c.Pg)(t,{currentTask:$(t.tasks,t.currentTask,-1)})},gotoTask(e){(0,c.Pg)(t,{currentTask:e})}})},J.slide_rate=async t=>{(0,c.Pg)(t,{currentOption:t.options[0],gotoNextOption(){(0,c.Pg)(t,{currentOption:$(t.options,t.currentOption,1)})},gotoPrevOption(){(0,c.Pg)(t,{currentOption:$(t.options,t.currentOption,-1)})},gotoOption(e){(0,c.Pg)(t,{currentOption:e})}})},J.select_image=async t=>{(0,c.Pg)(t,{picFitType:t.origin.picFitType,needBgColor:t.origin.needBgColor,optImgScale:t.origin.optImgScale})},J.cascade=async t=>{await I(t.parent,t),function(t){const e=[],n=t=>{e.push(t),t.list&&t.list.forEach((t=>n(t)))};n(t.cascade),t.options.forEach((n=>{if(n.origin.useComment){const r=e.find((t=>t.resultId===n.cascadePath));n.inputType=(0,i.kv)(r.option.origin,t.type)}}))}(t),T(t,t.cascade,t.parent,t.loop,""),t.options=t.options.filter((t=>!!t.text)),(0,f.i5)(t,t.options)},J.hot_spot=async t=>{(0,c.Pg)(t,{...Q(t),autoShowRect:t.origin.autoShowRect,autoShowText:t.origin.autoShowText})},J.heat_map=async t=>{(0,c.Pg)(t,{...Q(t),clickTimes:0,pointColor:t.origin.pointColor,pointRadius:t.origin.pointRadius})},J.loop=async t=>{const{parent:e}=t;(0,p.kw)(t,e)||(t.varList=await(0,p.n0)(e,t))}},5286:(t,e,n)=>{"use strict";n.d(e,{m:()=>s,y:()=>a});var i=n(4248),r=n(5905),o=n(6935);async function a(t){const{parent:e,origin:n}=t,r=await(0,o.Ur)(n.describe,{state:e,usage:{node:t,exclusiveId:"description"}});(0,i.Pg)(t,{description:r})}async function s(t){(0,r.LK)(t)&&(t.headHidden=t.origin.headHidden,await async function(t){const{parent:e,origin:n}=t,r=await(0,o.Ur)(n.questionText,{spaceRep:" ",state:e,usage:{node:t,exclusiveId:"title"}});(0,i.Pg)(t,{title:r})}(t),await a(t))}},6970:(t,e,n)=>{"use strict";n.d(e,{b:()=>o}),n(3948);var i=n(4248),r=n(6935);async function o(t,e){if(!t)return{param:{}};const n=await(0,i.dU)().ui.loadNodeComponent(t,!0),o={};if(t.params)for(const n of t.params)o[n.name]=await(0,r.e_)(n.value,{state:e},"URL");return{name:t.name,id:t.id,component:n,param:o}}},6866:(t,e,n)=>{"use strict";n.d(e,{pI:()=>R,p9:()=>U,VY:()=>z,nX:()=>q,VJ:()=>X,Yk:()=>M,g1:()=>W,f$:()=>B,p8:()=>F,a7:()=>D,O2:()=>j,sB:()=>V}),n(2707),n(3948);var i=n(1128),r=n(9564),o=n(3768),a=n(3251),s=n(9309),c=n(4248),u=n(3656),l=n(5159),d=n(5905);const f={};function p(t,e){e&&t&&(e.selected=t.selected,e.option.selected=t.selected,e.list&&t.list&&e.list.forEach((e=>{const n=t.list.find((t=>t.resultId===e.resultId));n&&p(n,e)})))}function g(t){return t?{selected:t.selected,resultId:t.resultId,list:t.list&&t.list.map((t=>g(t)))}:null}function m(t,e){e.startTime=t.startTime,e.costTime=t.costTime,e.type=t.type,function(t,e){e.validateFailTimes=t.validateFailTimes,e.validateFailed=t.validateFailed}(t,e)}f.max_diff={cache(t,e){e.tasks=t.tasks.map((t=>({items:t.items.map((t=>({uuid:t.option.uuid,value:t.value,round:t.round}))),done:t.done}))),e.currentTaskIndex=t.tasks.indexOf(t.currentTask)},use(t,e){t.tasks&&(e.tasks=t.tasks.map((t=>({items:t.items.map((t=>({option:(0,i.cW)(e.options,t.uuid),value:t.value,round:t.round}))),done:t.done}))),e.currentTask=e.tasks[t.currentTaskIndex||0])}},f.slide_rate={use(t,e){e.currentOption=e.options[t.currentTaskIndex||0]},cache(t,e){e.currentTaskIndex=t.options.indexOf(t.currentOption)}},f.cascade={use(t,e){p(t.cascade,e.cascade)},cache(t,e){e.cascade=g(t.cascade)}},f.verify={borrow(t,e){e.code=t.code,e.phoneNumber=t.phoneNumber}},f.region={borrow(t,e){e.indexes=t.indexes,e.position=t.position,e.value=t.value}},f.location=f.area={borrow(t,e){f.region.borrow(t,e),e.succeed=t.succeed,e.failed=t.failed,e.failedSkipActivated=t.failedSkipActivated}},f.sequence={use(t,e){t.rankList&&e.options.sort(((e,n)=>t.rankList.indexOf(e.uuid)>t.rankList.indexOf(n.uuid)?1:-1))},cache(t,e){e.rankList=t.options.map((t=>t.uuid))}},f.heat_map={use(t,e){e.clickTimes=t.options.length}};const h=["select","select_icon","select_image","menu","hot_spot"];var v=n(5753),y=n(6064);const _={};function w(t,e,n){e.value=t.value,e.selected=t.selected,t.assistValue&&(e.assistValue=e.assistValue||{},Object.keys(t.assistValue).forEach((n=>{(0,y.O2)(t.assistValue[n])||(e.assistValue[n]=t.assistValue[n])})),"cache"===n&&0===Object.keys(e.assistValue).length&&delete e.assistValue)}function b(t,e,n){if(w(t,e,"use"),!e.isOtherOpt){const i=_[n];i&&(i.use?i.use(t,e):i.borrow&&i.borrow(t,e))}}_.max_diff={borrow(t,e){t.records&&(e.records=t.records.map((t=>({...t}))))}},_.sequence={borrow(t,e){e.sortNo=t.sortNo}},_.heat_map={borrow(t,e){t.point&&(e.point={...t.point})}},_.weight={borrow(t,e){e.percent=t.percent}},_.upload={borrow(t,e){e.fileName=t.fileName,e.fileType=t.fileType,e.filePath=t.filePath,e.isImage=t.isImage},cache(t,e){_.upload.borrow(t,e),e.value=t.miniValue||t.value},use(t,e){_.upload.borrow(t,e),e.fileName&&(0,v.SV)(e,t)}};var x=n(5721);let T=!1,I="";const O=["data","describe","logic","random","loop"];let k,S,E,P,L={responseId:"",data:{},error:{},point:"",count:0,randomList:[],randomAbandonedNodeIds:[],locale:""};function C(t){const{offlineTaskId:e,preview:n}=(0,c.vW)();if(n)return"preview_cache_"+(0,u.pC)(t);{const n="response_cache_"+(0,u.pC)(t);return e?n+"_with_"+e:n}}function N(t,e){const n={};return function(t,e,n){if(e.uuid=t.uuid,w(t,e,"cache"),!t.isOtherOpt){const i=_[n];i&&(i.cache?i.cache(t,e):i.borrow&&i.borrow(t,e))}}(t,n,e),n}function R(t){if((0,c.dU)().dev.infer||T)return;if((0,r.$X)(t)||O.includes(t.type)||t.readonly)return;const e={error:t.errorMessage||void 0,options:{}};(0,i.eu)(t).forEach((t=>{e.options[t.renderId]=t.errorMessage||void 0})),L.error[t.renderId]=e}async function U(t){if((0,c.dU)().dev.infer||T)return;if((0,r.$X)(t)||O.includes(t.type)||t.readonly)return;const e={};!function(t,e){m(t,e);const n=f[e.type];n&&(n.cache?n.cache(t,e):n.borrow&&n.borrow(t,e))}(t,e);const n=(0,o.py)(t);if(n&&n.items){const i=n.items.map((t=>t.option_id.toLowerCase())),r=t=>!!n.items&&i.includes(t.uuid.toLowerCase());(0,d.Kf)(t)&&(e.options=t.options.filter(r).map((e=>N(e,t.type)))),(0,d.sy)(t)&&(e.otherOptions=t.otherOptions.filter(r).map((e=>N(e,t.type))))}L.responseId=t.parent.transactionID,L.data[t.renderId]=e;const i=t.parent.randomList;i&&(L.randomList=i.map((t=>({nodeId:t.node.nodeUuid,destPortIds:t.destPortIds}))),L.randomAbandonedNodeIds=(0,x.Ym)()),await A(t.parent)}async function A(t){const{sid:e,renderList:n}=t,i=C(e);L.locale=(0,l.BH)();const r=Object.keys(L.data);L.count=0;for(const t of n)if(r.includes(t.renderId)&&(L.count+=1),t.renderId===L.point)break;await(0,c.dU)().storage.setVital(i,JSON.stringify(function(t){const e=t.data,n={};return Object.keys(e).forEach((t=>{const i={...e[t]};"upload"===i.type&&(i.options=i.options.map((t=>((t={...t}).miniValue&&(t.value=t.miniValue,delete t.miniValue),t)))),n[t]=i})),{...t,data:n}}(L)))}async function M(t){const e=C(t),n=await(0,c.dU)().storage.getVital(e);if(n){const t=JSON.parse(n);return I||(I=t.locale),t}return null}function D(t){if((0,c.dU)().dev.infer)return t;if((0,r.$X)(t)||O.includes(t.type)||t.readonly)return t;!function(t){const e=L.error[t.renderId];e&&(t.errorMessage=e.error||"",(0,i.eu)(t).forEach((t=>{t.errorMessage=e.options[t.renderId]||""})))}(t);const e=L.data[t.renderId];return e?(function(t,e,n){const r=(0,i.eu)(t);let o=[];e.options&&(o=[...o,...e.options]),e.otherOptions&&(o=[...o,...e.otherOptions]);for(const t of r){const e=(0,i.cW)(o,t.uuid);e&&b(e,t,n)}}(t,e,t.type),function(t,e){m(t,e);const n=f[e.type];n&&(n.use?n.use(t,e):n.borrow&&n.borrow(t,e))}(e,t),function(t){if((0,r.qX)(t.origin)||!(0,d.Kf)(t))return;let e=(0,d.sy)(t)?t.otherOptions:[];h.includes(t.type)&&(e=[...e,...t.options]);const n=e.filter((t=>t.selected));if(n.length<=1)return;const i=[];n.forEach((t=>{t.autoSelectMarked?(0,c.Pg)(t,{selected:!1,autoSelectMarked:!1}):i.push(t)})),i.length>1&&i.forEach(((t,e)=>{e<i.length-1&&(0,c.Pg)(t,{selected:!1})}))}(t),k&&k(t),t):(k&&k(t),t)}async function B(t,e,n){L=t,E=[...t.randomList||[]],(0,x.Ns)(t.randomAbandonedNodeIds,e.nodeList),P=t.point;const i=L.count;let r=0;T=!0,k=()=>{r>=i?S({failed:!1,error:""}):(n.onProgress("".concat(r,"/").concat(i)),r++)},S=t=>{o(),k=null,S=null,a.s$.trigger("END_MEMORY",e.current),setTimeout((()=>{n.onEnd(t)}),250)};const o=()=>{a.s$.off("NEXT_OK",u),a.s$.off("STRETCH_OK",u),a.s$.off("NEXT_OK",c),T=!1},c=(t,e)=>{"NEXT_FAIL"===t.type&&e?n.onSuspend():S({failed:!0,error:e})},u=()=>e.current.renderId===P?S({failed:!1,error:""}):e.handleEvents.handleNextClick();a.s$.one("STRETCH_OK",u),a.s$.on("NEXT_FAIL",c),a.s$.on("NEXT_OK",u),a.s$.trigger("START_MEMORY"),await(0,s.$A)()}function F(t,e){if(!E)return t;const n=E.find((t=>t.nodeId===e.nodeUuid));if(!n)return t;const i=n.destPortIds,r=[],o=[];return t.forEach((t=>{i.includes(t)?r.push(t):o.push(t)})),r.sort(((t,e)=>i.indexOf(t)>i.indexOf(e)?1:-1)),[...r,...o]}function W(){L={responseId:"",data:{},error:{},point:"",count:0,randomList:[],randomAbandonedNodeIds:[],locale:""}}async function z(t){W();const e=C(t.sid);await(0,c.dU)().storage.removeVital(e)}async function q(t,e){e.forEach((t=>{delete L.data[t]})),await A(t)}function j(t){T||(L.point=t.current.renderId)}async function V(t){j(t),await A(t)}async function X(t){return t?(I||await M(t),I):""}},3803:(t,e,n)=>{"use strict";n.d(e,{m:()=>l,q:()=>d});var i=n(6866),r=n(9026),o=n(4248),a=n(7550),s=n(5159);class c{constructor(t,e){if(t&&t.data&&Object.keys(t.data).length>0){const{langResume:n}=e;this.holder=t,this.state=e,this.show=!0,this.title=n?(0,a.Iu)(s.bn.langResume.title):(0,a.Iu)(s.bn.memory.title),this.message=n?"":(0,a.Iu)(s.bn.memory.message),this.sureText=n?"":(0,a.Iu)(s.bn.memory.sure),this.denyText=n?"":(0,a.Iu)(s.bn.memory.deny)}}async handleSure(){if(!this.holder||d())return;const t=this;return this.state.enterMode="resume",(0,o.Pg)(t,{sureText:"",denyText:"",show:!0,resuming:!0}),(0,r.Ts)(this.state,t.holder.responseId||""),await(0,o.dU)().hook.onResumeSurvey(this.state),(0,i.f$)(this.holder,this.state,{onEnd(){t.end()},onProgress(e){(0,o.Pg)(t,{show:!0}),(0,o.Pg)(t,{message:e})},onSuspend(){t.suspend()}})}async handleDeny(){d()||(await(0,o.dU)().hook.onRestartSurvey(this.state),this.state.enterMode="restart",this.end())}end(){(0,o.Pg)(this,{show:!1,holder:null,message:"",resuming:!1})}suspend(){(0,o.Pg)(this,{show:!1})}}let u=null;async function l(t){const e=await(0,i.Yk)(t.sid);return u=new c(e,t),u}function d(){return u&&u.resuming}},698:(t,e,n)=>{"use strict";n.d(e,{V:()=>r,z:()=>o});var i=n(4248);function r(){return{primary:"rgba(128,128,128,1)",secondary:"rgba(255,255,255,1)",contrast:"rgba(202,32,39,1)",background:"#FFFFFF",error:"rgba(202,32,39,1)",button:"rgba(202,32,39,1)",fontSize:"24px",fontWeight:"normal",descFontSize:"16px",descFontWeight:"normal",optFontSize:"16px",optFontWeight:"normal",btnFontSize:"16px",btnFontWeight:"normal",name:"minimal",fontFamily:"SimSun",titleFontSize:"25px",titleFontWeight:"normal",boxWidth:"50vmin",bgOpacity:100,bgImageUrl:"",effect:"normal",bgLayout:"cover",bgSize:"cover",bgImageId:"",bgImageHeight:0,bgImageWidth:0}}function o(t={primary:"rgba(128,128,128,1)",secondary:"rgba(255,255,255,1)",contrast:"rgba(202,32,39,1)",background:"#FFFFFF",error:"rgba(202,32,39,1)",button:"rgba(202,32,39,1)",fontSize:"24px",fontWeight:"normal",descFontSize:"16px",descFontWeight:"normal",optFontSize:"16px",optFontWeight:"normal",btnFontSize:"16px",btnFontWeight:"normal",name:"minimal",fontFamily:"SimSun",titleFontSize:"25px",titleFontWeight:"normal",boxWidth:"50vmin",bgOpacity:100,bgImageUrl:"",effect:"normal",bgLayout:"cover",bgSize:"cover",bgImageId:"",bgImageHeight:0,bgImageWidth:0}){t.error=t.error||t.contrast,t.button=t.button||t.contrast,(0,i.vW)().theme=t,(0,i.vW)().setTheme(t)}},6213:(t,e,n)=>{"use strict";n.d(e,{W:()=>o});var i=n(4248),r=n(3656);function o(t=[]){const e=function(t){let e="";return t.forEach((t=>{e+="\n .".concat("prs-").concat((0,r.pC)(t.id)," {\n ").concat(function(t){let e="";const{backgroundColor:n,bold:i,color:r,fontSize:o,italic:a,lineThrough:s,underline:c}=t;return n&&(e+="background-color: ".concat(n,";")),r&&(e+="color: ".concat(r,"; ")),i&&(e+="font-weight: bold;"),a&&(e+="font-style: italic;"),s&&(e+="text-decoration: line-through;"),c&&(e+="text-decoration: underline;"),o&&(e+="font-size: ".concat(o,";")),e}(t.value),"\n }\n ")})),e}(t);(0,i.dU)().ui.setPresetStyle(e,t)}},4248:(t,e,n)=>{"use strict";n.d(e,{IO:()=>u,JN:()=>c,Pg:()=>f,dU:()=>l,vW:()=>d});var i=n(3251),r=n(3656);let o=null,a=null;const s=(0,r.Ds)((()=>i.s$.trigger("SET_PROPS")),1e3/60);function c(t){a=t}function u(t){o=t}function l(){if(!a)throw new Error("Env not yet initialized");return a}function d(){if(!o)throw new Error("Client not yet initialized");return o}function f(t,e){t&&e&&(Object.keys(e).forEach((n=>{t[n]=e[n]})),o.silentSetter||s())}i.s$.on("ERROR_ABORT",((t,e)=>{d().error(e)}))},3087:(t,e,n)=>{"use strict";function i(t){if(!t)return"00:00";const e=t%60;return r((t-e)/60)+":"+r(e)}function r(t){let e=t+"";return 1===e.length&&(e="0"+e),e}function o(){const t=new Date;return t.getFullYear()+"-"+r(t.getMonth()+1)+"-"+r(t.getDate())+" "+r(t.getHours())+":"+r(t.getMinutes())+":"+r(t.getSeconds())}n.d(e,{GN:()=>o,IA:()=>i,bi:()=>r})},2812:(t,e,n)=>{"use strict";n.d(e,{BT:()=>a,JL:()=>o,ks:()=>s});var i=n(5142);let r;async function o(){return r||(r=await(0,i.vT)("https://media.choiceform.com/static-assets/regions-2020.json",{type:"GET"},!0),r.forEach((t=>{t.cities&&0!==t.cities.length||(t.cities=[{name:t.name,code:t.code,areas:[{name:t.name,code:t.code}]}]),t.cities.forEach((t=>{t.areas&&0!==t.areas.length||(t.areas=[{name:t.name,code:t.code}])}))}))),r}function a(t){if(!t)return"";const e=t.split("-"),n=e[0],i=r.find((t=>n.indexOf(t.name)>-1));if(!i)return"";const o=i?i.code+"":"",a=e[1];if(!a)return o;const s=i.cities.find((t=>a.indexOf(t.name)>-1));if(!s)return o;const c=s?s.code+"":"",u=e[2];if(!u)return c;const l=s.areas.find((t=>u.indexOf(t.name)>-1));return(l?l.code+"":"")||c||o||""}function s(t){const e=t.split(" ").map((t=>Number(t))),n=e.length,i=r[e[0]];let o,a,s=i.name;return n>1&&(o=i.cities[e[1]],s+="-"+o.name,n>2&&(a=o.areas[e[2]],s+="-"+a.name)),s}},2125:(t,e,n)=>{"use strict";n.d(e,{K:()=>r});var i=n(4248);function r(t,e){return new(0,(0,i.dU)().system.functionConstructor)("".concat(e?"return":""," ").concat(t))()}},7550:(t,e,n)=>{"use strict";n.d(e,{$1:()=>m,HP:()=>y,Iu:()=>v,P_:()=>h,Vj:()=>f,nE:()=>p,u4:()=>g}),n(5306);var i=n(3251),r=n(5159),o=n(4248),a=n(6539),s=n(9141);const c=["zh_cn","en_us"];function u(){const{offline_survey_id:t}=(0,a.ZI)(),e="language";return t?e+t:e}async function l(){return(0,o.dU)().storage.getVital(u())}function d(t,e){return!!e&&t.some((t=>t.locale===e))}async function f(t,e){const n=await l();if(d(t,n))return n;const i=function(){const t=(0,o.dU)().system.getLang();return t?function(t){const e=t.replace(/-/g,"_").toLowerCase(),n=s.Z.langTable.find((t=>t.locale.startsWith(e)));return n?n.locale:e}(t):"en_us"}();return d(t,i)?i:e}async function p(t,e){return t!==await l()&&(m(t,!0),await async function(t){return(0,o.dU)().storage.setVital(u(),t)}(t),(0,o.dU)().storage.set("anti-show-init-lang-select","true"),e&&(0,o.dU)().storage.set("lang-resume","true"),(0,o.dU)().hook.beforeForceLeave(),(0,o.dU)().app.reload(),!0)}function g(t){let e="en_us";c.includes(t)&&(e=t),r.i_(e),(0,o.vW)().setLocale(e),i.s$.trigger("LANG_CHANGE");const n=s.Z.langTable.find((e=>e.locale===t));(0,o.dU)().hook.onLangChange(n)}function m(t="en_us",e=!1){return e||g(t),t}function h(t){return t.replace(/\{(\w+),.+?(\w+)\}\s?\}/g,((t,e,n)=>"{".concat(e,"} ").concat(n)))}function v(t,e){return e?(0,o.dU)().system.translate(t,e):t}function y(t,e){const n=t&&e.length>1&&null===(0,o.dU)().storage.get("anti-show-init-lang-select");return(0,o.dU)().storage.remove("anti-show-init-lang-select"),!!n}},9271:(t,e,n)=>{"use strict";n.d(e,{J:()=>o,q:()=>a});var i=n(4665),r=n(4248);function o(t){return(0,r.vW)().hostConfig.mediaHost+"/"+t}function a(t){const{width:e,height:n,name:r,id:a,originName:s}=t,c=o(r);return{ratio:Math.round(n/e*1e5)/1e5,url:c,natural:(0,i.p)(c,"@m720"),thumbnail:(0,i.p)(c,"@avatar"),large:(0,i.p)(c,"@m1080"),width:e,height:n,id:a,originName:s,name:r}}},2167:(t,e,n)=>{"use strict";n.d(e,{Z:()=>r});var i=n(9141);async function r(t){return"string"==typeof t?JSON.parse(i.Z.inflateBase64(t)):t}},248:(t,e,n)=>{"use strict";n.d(e,{eb:()=>m,iZ:()=>g,mj:()=>h,pe:()=>p,ub:()=>v}),n(3948);var i=n(3656),r=n(7492),o=n(5905);function a(t,e){t.questionText=e.questionText||"",t.describe=e.describe||""}function s(t,e){t.mapping&&e.mapping&&r.b.forEach((n=>{const i=t.mapping[n];i&&"object"==typeof i||(t.mapping[n]=e.mapping[n]||"")}))}function c(t,e){let n=[];t.options&&(n=[...n,...t.options]),t.refOptions&&(n=[...n,...t.refOptions]),(0,o.RE)(t)&&(n=[...n,...t.otherOptions]),e.options&&Object.keys(e.options).forEach((r=>{const o=n.find((t=>(0,i.pC)(t.uuid)===r));o&&function(t,e,n){(function(t,e){return!(t.isRef||!t.isOtherOpt&&["cascade","region","area","location"].includes(e.type))})(t,n)&&(t.text=e.text||""),t.optComment=e.optComment||"",s(t,e),t.selectText=e.selectText,t.autoInputConfig&&e.autoInputConfig&&(t.autoInputConfig.defaultValue=e.autoInputConfig.defaultValue||"")}(o,e.options[r],t)}))}function u(t,e){t&&e&&t.logic&&e.logic&&(t.logic.message=e.logic.message||"")}function l(t,e){a(t,e),c(t,e),u(t.validation,e.validation),function(t,e){const{optionGroups:n}=t;if(!n)return;const r=e.optionGroups||{},o=t=>{t.forEach((t=>{if((0,i.is)(t,"group"===t.type)){const e=(0,i.pC)(t.uuid),n=r[e];n&&(t.groupTitle=n.groupTitle);const a=t.children||[];o(a)}}))};o(n)}(t,e)}const d={};function f(t,e){t.value=e.value||""}function p(t,e={}){const{nodes:n,variables:r,groups:o}=e,{nodes:a,variables:s,groups:c}=t;a&&n&&Object.keys(n).forEach((t=>{const e=n[t],r=a.find((e=>e.nodeUuid&&(0,i.pC)(e.nodeUuid)===t));r&&function(t,e){const n=d[t.type];n?n(t,e):l(t,e)}(r,e)})),s&&r&&Object.keys(r).forEach((t=>{const e=r[t],n=s.find((e=>(0,i.pC)(e.uuid)===t));n&&f(n,e)})),c&&o&&Object.keys(o).forEach((t=>{const e=o[t],n=c.find((e=>(0,i.pC)(e.id)===t));n&&function(t,e){t.prevText=e.prevText||"",t.nextText=e.nextText||""}(n,e)}))}function g(t,e){t&&t.forEach((t=>{t.data.forEach((t=>{const n=t[e];n&&(t.name=n)}))}))}function m(t,e){e&&d.start(t,e)}function h(t,e){e&&d.gift(t,e)}function v(t,e){e&&f(t,e)}d.end=(t,e)=>{a(t,e),t.endBtnText=e.endBtnText||""},d.gift=(t,e)=>{a(t,e),t.activityName=e.activityName||"",t.endBtnText=e.endBtnText||"",t.blessings=e.questionText||""},d.loop=(t,e)=>{(e.options||t.options)&&Object.keys(e.options).forEach((n=>{const r=t.options.find((t=>(0,i.pC)(t.uuid)===n));r&&(r.text=e.options[n].text)}))},d.lottery=(t,e)=>{(e.options||t.options)&&Object.keys(e.options).forEach((n=>{const r=t.options.find((t=>(0,i.pC)(t.uuid)===n));r&&(r.rewardName=e.options[n].rewardName)})),e.success&&(t.success.title=e.success.title||"",t.success.summary=e.success.summary||""),e.fail&&(t.fail.title=e.fail.title||"",t.fail.summary=e.fail.summary||"")},d.value_mark=(t,e)=>{l(t,e),t.minText&&(t.minText=e.minText||"",t.maxText=e.maxText||"")},d.menu=(t,e)=>{l(t,e),t.placeholder=e.placeholder||""},d.start=(t,e)=>{t.questionText=e.questionText||"",t.startName=e.startName||"",t.logoText=e.logoText||"",t.startBtnText=e.startBtnText||"",t.nextBtnText=e.nextBtnText||"",t.prevBtnText=e.prevBtnText||"",t.timeoutText=e.timeoutText||"",t.timeLessText=e.timeLessText||"",u(t.validation,e.validation)},d.slide_rate=(t,e)=>{l(t,e),(e.options||t.rateOptions)&&Object.keys(e.options).forEach((n=>{const r=t.rateOptions.find((t=>(0,i.pC)(t.uuid)===n));r&&(r.text=e.options[n].text)}))},d.matrix=(t,e)=>{if(a(t,e),u(t.validation,e.validation),e.options){let n=[];t.optionsX&&(n=[...n,...t.optionsX]),t.optionsY&&(n=[...n,...t.optionsY]),t.otherOptions&&(n=[...n,...t.otherOptions]);const r=t.options||[];Object.keys(e.options).forEach((t=>{const o=e.options[t],a=r.find((e=>(0,i.pC)(e.uuid)===t));if(a)s(a,o);else{const e=n.find((e=>(0,i.pC)(e.uuid)===t));e&&(e.text=o.text||"")}}))}},d.data=(t,e)=>{c(t,e),t.options&&t.options.forEach((t=>{delete t.optComment,delete t.value}))}},8413:(t,e,n)=>{"use strict";function i(t,e="-",n="street"){let i=t.province;return"province"!==n&&t.city&&(i+=e+t.city,"city"!==n&&t.district&&(i+=e+t.district,"county"!==n&&(t.street&&(i+=e+t.street),t.street_number&&(i+=t.street_number)))),i}function r(t){return t*(Math.PI/180)}function o(t,e){const n=r(e.lat-t.lat),i=r(e.lng-t.lng),o=Math.sin(n/2)*Math.sin(n/2)+Math.cos(r(t.lat))*Math.cos(r(e.lat))*Math.sin(i/2)*Math.sin(i/2);return 2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o))*6371*1e3}n.d(e,{L:()=>i,S:()=>o})},3656:(t,e,n)=>{"use strict";n.d(e,{BY:()=>c,DQ:()=>h,Ds:()=>w,Dy:()=>l,FL:()=>y,M8:()=>d,RC:()=>p,Rf:()=>T,Tm:()=>v,XJ:()=>m,_v:()=>x,am:()=>u,is:()=>s,kr:()=>a,p$:()=>_,pC:()=>f,s$:()=>b,sG:()=>o,xT:()=>g}),n(2707),n(5306),n(8206),n(3948);var i=n(6064);const r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");function o(t){return t.replace(/</g,"_-v-w^l-t-_").replace(/>/g,"^-v-w_g-t-^")}function a(t){return t.replace(/_-v-w\^l-t-_/g,"<").replace(/\^-v-w_g-t-\^/g,">")}function s(t,e){return e}function c(t=1,e=5){const n=g(t,e),i=r.length;let o="";for(let t=0;t<n;t++){const t=g(0,i);o+=r[t]}return o}function u(t,e){if(36!==t.length)throw new Error("invalid uuid");return e?l(t,e.map((t=>f(t.varList[t.currentIndex].uuid)))):t}function l(t,e){if(36!==t.length)throw new Error("invalid uuid");return e&&e.forEach((e=>{t+="-"+f(e)})),t}function d(){const t=new Array(36);let e,n=0;for(let i=0;i<36;i++)8==i||13==i||18==i||23==i?t[i]="-":14==i?t[i]="4":(n<=2&&(n=33554432+16777216*Math.random()|0),e=15&n,n>>=4,t[i]=r[19==i?3&e|8:e]);return t.join("").toLowerCase()}function f(t){return t.substring(t.length-8)}function p(t="",e=""){return t=t.toLowerCase(),e=e.toLowerCase(),8===t.length&&36===e.length?t===f(e):36===t.length&&8===e.length?f(t)===e:t===e}function g(t,e){return t>e&&([t,e]=[e,t]),t+m(e-t+1)}function m(t){return Math.floor(Math.random()*t)}function h(t,e){const n=[...t];if((0,i.O2)(e))return n;if(0===(e=Number(e)))return[];if(e<0||isNaN(e))return n;if(1===e)return n.splice(m(n.length),1);const r=[];for(n.length<e&&(e=n.length);r.length<e;){const t=m(n.length);r.push(n.splice(t,1)[0])}return r}function v(t,e){t&&"object"==typeof t&&Object.keys(t).forEach((n=>{const i=t[n];Array.isArray(i)&&i.forEach((t=>{v(t,e)})),"object"==typeof i&&v(i,e),e(t,n)}))}function y(t,e){if(t<e)throw new Error("can not random distribute");const n=function(t,e){const n=[];for(;n.length<e;){const e=g(1,t-1);n.includes(e)||n.push(e)}return n.sort(((t,e)=>t>e?1:-1)),n}(t,e-1),i=n.map(((t,e)=>t-(n[e-1]||0)));return i.push(t-n[n.length-1]),i}function _(t){const e=new WeakMap;return function t(n){if(!n||"object"!=typeof n)return n;if(n instanceof Array)return n.map((e=>t(e)));const i=e.get(n);if(i)return i;const r={};return e.set(n,r),Object.keys(n).forEach((e=>{r[e]=t(n[e])})),r}(t)}function w(t,e=0){let n=-1;return function(...i){const r=this;clearTimeout(n),n=setTimeout((()=>{t.apply(r,i)}),e)}}async function b(t,e,n){const i=[];t.replace(e,((t,...e)=>(i.push(n(t,...e)),t)));const r=await Promise.all(i);return t.replace(e,(()=>r.shift()))}function x(t=0){return new Promise((e=>setTimeout(e,t)))}async function T(t){return t}},5905:(t,e,n)=>{"use strict";function i(t){return!!t.origin.layout}function r(t){const e=t.origin;return void 0!==e.questionText||void 0!==e.describe}function o(t){return!!t.origin.options}function a(t){return!!t.origin.optionGroups}function s(t){return!!t.origin.fillType}function c(t){return!!t.otherOptions}function u(t){return!!t.options}function l(t){return!!t.origin.otherOptions}function d(t){return!!t.video}n.d(e,{Ck:()=>s,Kf:()=>o,LK:()=>r,QM:()=>u,RE:()=>c,iN:()=>d,n4:()=>i,sy:()=>l,ub:()=>a})},6064:(t,e,n)=>{"use strict";function i(t){return o(t)?"":String(t)}function r(t){if(o(t))return"";const e=Number(t);return isNaN(e)?t:e}function o(t){return t instanceof Array?0===t.length:"boolean"!=typeof t&&0!==t&&!t}n.d(e,{KF:()=>i,O2:()=>o,Xm:()=>r})},4665:(t,e,n)=>{"use strict";n.d(e,{D:()=>o,p:()=>r});var i=n(7428);function r(t,e){return t.endsWith(".svg")||(0,i.s)()?t:t+e}function o(t=[]){const e=[];return t.includes("video")&&e.push("video/*"),t.includes("audio")&&e.push("audio/*"),t.includes("image")&&e.push("image/*"),t.includes("doc")&&e.push("text/plain","application/json","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".csv",".docx",".pdf",".log"),e.join()}},3756:(t,e,n)=>{"use strict";n.d(e,{W:()=>o});var i=n(5159),r=n(7550);function o(){return{headimgurl:"https://media.choiceform.com/fresh_little_girl.jpg",nickname:(0,r.Iu)(i.bn.reward.weChatName)}}},866:(t,e,n)=>{"use strict";n.d(e,{l:()=>a});var i=n(4248);const r=["beforecopy","beforepaste","beforecut","copy","paste","cut","animationstart","animationend","animationiteration","transitionend","scroll","wheel","blur","click","dblclick","focus","focusin","focusout","input","keypress","keyup","keydown","select","change","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","gotpointercapture","lostpointercapture","pointercancel","pointerdown","pointerenter","pointerleave","pointermove","pointerout","pointerover","pointerup","touchcancel","touchend","touchmove","touchstart","unload","cancel","close","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","loadedmetadata","loadeddata","durationchange","timeupdate","play","pause","ratechange","volumechange","suspend","emptied","stalled","invalid","reset","submit","invalid","reset","submit","show","contextmenu","drag","dragend","dragenter","dragexit","dragleave","dragover","dragstart","drop","webglcontextcreationerror","webglcontextlost","webglcontextrestored","error","load","loadend","loadstart","progress"];function o(t){if("SCRIPT"===t.tagName)t.parentElement&&t.parentElement.removeChild(t);else{r.forEach((e=>{t.removeAttribute("on"+e)}));for(let e=t.children.length-1;e>=0;e--){const n=t.children[e];1===n.nodeType&&o(n)}}}function a(t){if(!t||t.includes("data-safe-html="))return t;const e=(0,i.dU)().system.newDiv();return e.innerHTML=t,o(e),e.innerHTML}},2872:(t,e,n)=>{"use strict";function i(t){const e={limitType:1,limitSrc:0,limitStart:"0",limitEnd:"0",limitRnd:"-1",phParams:[],disorder:!1,outOfResult:!1,imgHeight:0,imgWidth:0,ignoreCase:!1};if(t){const n=JSON.parse(t);return{...e,...n}}return e}n.d(e,{BB:()=>o,X8:()=>r,gh:()=>a,m5:()=>i});const r=t=>{if(!t)return!1;const{limitSrc:e,limitType:n,limitStart:i,limitEnd:r}=t;return!(!e||!n||1==n&&"0"==i&&"0"==r)};function o(t){const e=function(t){if(!t)return t;const e={};return t.phParams&&t.phParams.length>0&&(e.phParams=t.phParams),r(t)&&(e.limitSrc=t.limitSrc,e.limitType=t.limitType,e.limitStart=t.limitStart,e.limitEnd=t.limitEnd),"-1"!=t.limitRnd&&(e.limitRnd=t.limitRnd),t.disorder&&(e.disorder=t.disorder),t.outOfResult&&(e.outOfResult=t.outOfResult),Number(t.imgHeight)&&(e.imgHeight=t.imgHeight),Number(t.imgWidth)&&(e.imgWidth=t.imgWidth),0===Object.keys(e).length?void 0:e}(t);return e?JSON.stringify(e):""}function a(t){const e={};return t.forEach((t=>{e[t.name]=t.value})),e}},3608:(t,e,n)=>{"use strict";n.d(e,{B3:()=>c,BF:()=>h,Kz:()=>g,L7:()=>u,MD:()=>d,XY:()=>p,mh:()=>m}),n(5306);var i=n(6935),r=n(9271),o=n(3656),a=n(7117),s=n(4248);function c(t){d(t.imageList),function(t){let e="";t.forEach((t=>{t.name.indexOf("TO_GLOBAL")>-1&&"var-html"===t.type&&(e+=(0,i.IY)(t.value).replace(/<style>/g,"").replace(/<\/style>/g,""))})),(0,s.dU)().ui.setGlobalStyle(e)}(t.variables),function(t){if(t){const e=l(t.allJson,null)+l(t.strJson,"var-string")+l(t.expJson,"var-expression")+l(t.reqJson,"var-request")+l(t.loopJson,"var-loop");(0,s.dU)().ui.setVarStyle(e,t)}}(t.varStyles)}function u(t){let e="";return t.bold&&(e+="font-weight: bold;"),t.italic&&(e+="font-style: italic;"),t.underline?e+="text-decoration: underline;":t.lineThrough&&(e+="text-decoration: line-through;"),t.color&&(e+="color: ".concat(t.color,";")),t.backgroundColor&&(e+="background-color: ".concat(t.backgroundColor,";")),t.fontSize&&(e+="font-size: ".concat(t.fontSize,";"),e+="line-height: 1.4;"),e}function l(t,e){if(!t)return"";let n=e?".var-light.".concat(e,":not([in-edist]) {"):".var-light:not([in-edist]) {";return n+=u(t),n+="}",n}function d(t){const e=async function(t){const{varInfo:e,pureText:n}=t;return n?this.fileName:h((0,r.J)(this.serverFileName),e.config,this.fileName)};t.forEach((t=>{t.getText=e,t.isMedia=!0,t.type="var-media"}))}function f(t){if(t)return{...t,identity:{baseId:t.uuid}}}function p(t="",e){return f(e.find((e=>e.name===t)))}function g(t="",e){return e.find((e=>(0,o.RC)(e.id,t)))}function m(t="",e){let n;const i=g(t,e.imageList);return i?n={...i,type:"var-media",uuid:i.id,name:""}:(n=e.variables.find((e=>(0,o.RC)(e.uuid,t))),n||(n=(0,a.jd)(t))),f(n)}function h(t="",e={imgHeight:0,imgWidth:0},n="Image",i=!1){let r="##"+t;return i||(r+="?w=".concat(e.imgWidth||0,"&h=").concat(e.imgHeight||0),n&&(r+="#"+n)),r+"##"}},7089:(t,e,n)=>{"use strict";n.d(e,{Q:()=>o,c:()=>r}),n(5306);const i=["nodeId","nodePartId","optFilterId","optId","optPartId","loopNodeId","loopRoundId","innerLoopNodeId","innerLoopRoundId"];function r(t){return t.baseId?t.baseId:i.map((e=>t[e]||"")).join(":").replace(/:+$/,"")}function o(t){if(!t.includes(":"))return{baseId:t};const e=t.split(":"),n={};return e.forEach(((t,e)=>{const r=i[e];n[r]=t})),n}},7712:(t,e,n)=>{"use strict";n.d(e,{DC:()=>C,Dy:()=>P,HX:()=>w,Hz:()=>E,KP:()=>N,Lr:()=>L,Sq:()=>b,V0:()=>k,b:()=>x,ck:()=>I,g:()=>T,is:()=>R,sP:()=>O,sb:()=>U,wc:()=>S}),n(3948);var i=n(6935),r=n(3146),o=n(3656),a=n(5750),s=n(1128),c=n(656),u=n(3608),l=n(7117),d=n(6064),f=n(4248),p=n(7089),g=n(2872),m=n(9758),h=n(7529),v=n(3817),y=n(9564),_=n(7552);function w(t){t=(0,m.Ko)(t);const e=(0,f.dU)().system.newDiv();return e.innerHTML=t,e}function b(t="",e){return e||(e=w(t)),[...e.querySelectorAll(".var-tag")]}function x(t=""){return String(t).indexOf("var-tag")>-1}function T(t){return(0,o.is)(t,1===t.nodeType)&&t.classList.contains("var-tag")}function I(t,e=""){const{loopStack:n,context:i}=t;let{renderList:r}=t;const a=(0,y.KF)(t,e);if(!a)return;const s=(0,o.am)(a,n);return i.node&&(r=[...r,i.node]),r.find((t=>s.startsWith(t.renderId)))}function O(t,e,n,i){if(!n)return null;const r=[n];i&&r.push(i);const a=(0,y.KF)(t,e);if(!a)return;const s=(0,o.Dy)(a,r);return(0,h.JL)(t.renderList,s)}function k(t){return{name:t.innerText,identity:(0,p.Q)(t.getAttribute("data-v-id")),config:(0,g.m5)(t.getAttribute("data-v-config")),inEdist:t.parentElement&&!!t.parentElement.getAttribute("edist")}}function S(t,e){return P(t,k(e))}function E(t){const{identity:e,config:n}=t;let i=(0,p.c)(e);if(!n)return i;if((0,g.X8)(n)){const{limitSrc:t,limitType:e,limitStart:r,limitEnd:o}=n;i+="_".concat(t,"_").concat(e,":").concat(r,":").concat(o)}const{limitRnd:r,phParams:o}=n;if((0,d.O2)(r)||"-1"==r||(i+="_".concat(r)),!(0,d.O2)(o)){const t=(0,g.gh)(o);i+="_".concat(JSON.stringify(t))}return i}function P(t,e){const n=E(e={...e,config:e.config||{}}),{identity:i,config:r,name:o,inEdist:a}=e,d=(0,p.c)(i),f={identity:i,config:r},{baseId:g,nodeId:m,nodePartId:h,optFilterId:y,optId:_,optPartId:w,loopRoundId:b,innerLoopRoundId:x}=i;if(g){if(U(g)){const[t,e]=g.split("URL_PARAM=");return{...f,type:"var-string",uuid:"URL_PARAM=".concat(e)}}const e=(0,u.mh)(g,t);return e?{...f,...e,name:o,mapId:n,inEdist:a}:null}let T,k="";if(b){if((0,v.N)(i))return{...f,uuid:d,type:"var-string",name:o,inEdist:a};if(T=O(t,m,b,x),!T)return}else if(c.hi(h))k=m;else if(T=I(t,m),!T)return;if(h){const t=(0,l.jd)(h);return t&&{...f,uuid:d,name:o,node:T,nodePart:t,lookupLoopNodeId:k,isMedia:"var-media"===t.type,type:t.type,mapId:n,inEdist:a}}const S=(0,l.jd)(w,T);if(!S)return;const P="var-media"===S.type;if(y){const t=(0,l.jd)(y,T);if(!t)return;return{...f,inEdist:a,name:o,node:T,optionPart:S,optionFilter:t,uuid:d,lookupLoopNodeId:k,isMedia:P,type:S.type,mapId:n}}const L=(0,s.cW)((0,s.Kn)(T),_);return L?{...f,inEdist:a,name:o,node:T,option:L,optionPart:S,uuid:d,lookupLoopNodeId:k,isMedia:P,type:S.type,mapId:n}:void 0}async function L(t,e){let n=[];const{varInfo:{optionFilter:s,option:c,config:u}}=t,l=await(0,i.Ob)(u.limitRnd,t);if(0===l&&!e)return[];const d=t.specifiedOpt||c;n=d&&await(0,r.D)(t)?[d]:s&&s.filter?await s.filter(t):[];const f=e?e(n,l):(0,o.DQ)(n,l);return u.disorder?(0,a.T_)(f):f}async function C(t){const{varInfo:{nodePart:e,optionPart:n,option:i}}=t,o=t.specifiedOpt||i;if(e&&e.getBool)return e.getBool(t);if(o)return await(0,r.D)(t)&&await n.getBool({...t,specifiedOpt:o});if(n.inBunch)return n.getBool(t);{const e=await L(t),i=[];for(const r of e){const e=await n.getText({...t,specifiedOpt:r});e&&i.push(e)}return i.length>0}}async function N(t){const{varInfo:{nodePart:e,optionPart:n,option:i}}=t,o=t.specifiedOpt||i,a=t.joinBy||" ";if(e&&e.getText)return e.getText(t);if(o)return await(0,r.D)(t)?n.getText({...t,specifiedOpt:o}):"";if(n.inBunch)return n.getText(t);{const e=await L(t),i=[];for(const r of e){const e=await n.getText({...t,specifiedOpt:r});(0,d.O2)(e)||i.push(e)}return i.join(a)}}async function R(t){const e={};e.text=await N(t);const n=await async function(t){const{varInfo:{nodePart:e,optionPart:n,option:i,isMedia:o}}=t;if(!o)return[];const a=t.specifiedOpt||i;if(e&&e.getImages)return e.getImages(t);if(a)return await(0,r.D)(t)&&n.getImages?n.getImages({...t,specifiedOpt:a}):[];{const e=await L(t),i=[];if(n.getImages)for(const r of e){const e=await n.getImages({...t,specifiedOpt:r});i.push(e[0])}return i}}(t);e.image=n[0];const i=(await async function(t){const{varInfo:{optionPart:e,option:n}}=t;if(!e)return[];const i=t.specifiedOpt||n;if(i)return await(0,r.D)(t)&&e.getIcon?[e.getIcon({...t,specifiedOpt:i})]:[];{const n=await L(t);return e.getIcon?n.map((n=>e.getIcon({...t,specifiedOpt:n}))):[]}}(t))[0];return i&&(e.normalIconUrl=i,e.activeIconUrl=(0,_.rI)(i)),e}function U(t){return t&&t.startsWith("URL_PARAM=")}},656:(t,e,n)=>{"use strict";n.d(e,{HG:()=>b,WE:()=>d,_Z:()=>x,gH:()=>l,hi:()=>p,nk:()=>f,qS:()=>g}),n(5306);var i=n(3656),r=n(3608),o=n(7117),a=n(5336),s=n(6064),c=n(7492);let u;function l(t){const{loopStack:e}=t;return e?e[e.length-1]:null}function d(t,e,n){const{state:{loopStack:r}}=t,o=r&&r[e];if(o){const t=o.replacements[e];if(t)return(0,i.Rf)(n(t))}return(0,i.Rf)(n())}async function f(t,e){const{varInfo:{lookupLoopNodeId:n,config:r},state:o}=t,a=l(o);if(!a)return"";const s=g(n,a.replacements);return(0,i.Rf)(e(s,r))}function p(t){return function(){if(!u){const t=(0,o.SN)();u=[],Object.keys(t).forEach((e=>{const{uuid:n,type:i}=t[e];"var-loop"===i&&u.push(n)}))}return u}().indexOf(t)>-1}function g(t,e){return e.find((e=>(0,i.RC)(e.loopNodeId,t)))}function m(t,e={imgHeight:0,imgWidth:0}){if(t){const{imgHeight:n,imgWidth:i}=e;let r=void 0===t.refText?t.text:t.refText;return r.match(/^##.+##$/)&&0!==n&&0!==i&&(r=r.replace(/\?w=0&h=0/,"?w=".concat(i||0,"&h=").concat(n||0))),r}return""}function h(t,e){if(t&&t.image){const{image:n}=t;return(0,r.BF)(n.url,e)}return""}function v(t){return t&&(0,s.KF)(t.index+1)}function y(t){return t&&t.value}function _(t){return t&&(0,s.KF)(t.number)}function w(t){return t&&t.label}function b(t){t.C_OL_TXT.getText=t=>d(t,0,m),t.C_OL_IDX.getText=t=>d(t,0,v),t.C_OL_NUM.getText=t=>d(t,0,_),t.C_OL_VAL.getText=t=>d(t,0,y),t.C_OL_LBL.getText=t=>d(t,0,w),t.C_IL_TXT.getText=t=>d(t,1,m),t.C_IL_IDX.getText=t=>d(t,1,v),t.C_IL_NUM.getText=t=>d(t,1,_),t.C_IL_VAL.getText=t=>d(t,1,y),t.C_IL_LBL.getText=t=>d(t,1,w),c.b.forEach((e=>{!function(e){const n=e.split("_")[1],i="C_IL_MAP_"+n,r=(t,n)=>d(t,n,(n=>{if(!n)return"";const{mapping:i}=n;return(0,a.T)(i,e,t)}));t["C_OL_MAP_"+n].getText=t=>r(t,0),t[i].getText=t=>r(t,1)}(e)}))}function x(t){t.LOOP.getText=t=>f(t,m),t.LOOP_IMG.getText=t=>f(t,h),t.LOOP_INDEX.getText=t=>f(t,v),t.LOOP_NUM.getText=t=>f(t,_),t.LOOP_VAL.getText=t=>f(t,y),t.LOOP_LBL.getText=t=>f(t,w),c.b.forEach((e=>{!function(e){const n=e.split("_")[1];t["LOOP_MAP_"+n].getText=t=>f(t,(n=>(0,a.T)(n.mapping,e,t)))}(e)}))}},7117:(t,e,n)=>{"use strict";n.d(e,{SN:()=>x,jd:()=>w,tQ:()=>m}),n(5306),n(3948);var i=n(5336),r=n(3608),o=n(7712),a=n(1128),s=n(6064),c=n(7492);var u=n(3146),l=n(3022),d=n(2872);var f=n(7666),p=n(656),g=n(9141);const m="waiting fo extend";let h=!1;Math.avg=(...t)=>{let e=0;const n=t.length;for(let i=0;i<n;i++)e+=Number(t[i]);return e/n};const v={YEAR:{uuid:"YEAR",type:"var-string",getText:m},MONTH:{uuid:"MONTH",type:"var-string",getText:m},DATE:{uuid:"DATE",type:"var-string",getText:m},DAY:{uuid:"DAY",type:"var-string",getText:m},URL_KEY:{uuid:"URL_KEY",type:"var-string",getText:m},QUES_ID:{uuid:"QUES_ID",type:"var-string",getText:m},WX_ID:{uuid:"WX_ID",type:"var-string",getText:m},WX_SRC:{uuid:"WX_SRC",type:"var-string",getText:m},WX_NAME:{uuid:"WX_NAME",type:"var-string",getText:m},WX_UN_ID:{uuid:"WX_UN_ID",type:"var-string",getText:m},RES_ID:{uuid:"RES_ID",type:"var-string",getText:m},CLTR_ID:{uuid:"CLTR_ID",type:"var-string",getText:m},CLTR_CODE:{uuid:"CLTR_CODE",type:"var-string",getText:m},CLTR_NAME:{uuid:"CLTR_NAME",type:"var-string",getText:m},CURR:{uuid:"CLANG",type:"var-string",getText:m},LKTP:{uuid:"LKTP",type:"var-string",getText:m},START_TIME:{uuid:"S_T",type:"var-string",getText:m},COST_TIME:{uuid:"C_T",type:"var-string",getText:m},DVC_OSN:{uuid:"DVC_OSN",type:"var-string",getText:m},DVC_OSV:{uuid:"DVC_OSV",type:"var-string",getText:m},DVC_BRSN:{uuid:"DVC_BRSN",type:"var-string",getText:m},DVC_BRSV:{uuid:"DVC_BRSV",type:"var-string",getText:m},DVC_VDR:{uuid:"DVC_VDR",type:"var-string",getText:m},DVC_MDL:{uuid:"DVC_MDL",type:"var-string",getText:m},DVC_TYPE:{uuid:"DVC_TYPE",type:"var-string",category:"DEVICE",getText:m},RESULT:{uuid:"RESULT",type:"var-string",getText:m},C_OPT_TEXT:{uuid:"COTTX",type:"var-string",getText:m},C_OPT_NUM:{uuid:"CONUM",type:"var-string",getText:m},C_OPT_VAL:{uuid:"COVAL",type:"var-string",getText:m},C_OPT_LBL:{uuid:"COLBL",type:"var-string",getText:m},C_OPT_IPT:{uuid:"COIPT",type:"var-string",category:"CTPT",getText:m},C_OPT_ASI:{uuid:"COASI",type:"var-string",category:"CTPT",getText:m},C_OL_TXT:{uuid:"COLTXT",type:"var-string",getText:m},C_OL_IDX:{uuid:"COLIDX",type:"var-string",getText:m},C_OL_VAL:{uuid:"COLVAL",type:"var-string",getText:m},C_OL_NUM:{uuid:"COLNUM",type:"var-string",getText:m},C_OL_LBL:{uuid:"COLLBL",type:"var-string",getText:m},C_IL_TXT:{uuid:"CILTXT",type:"var-string",getText:m},C_IL_IDX:{uuid:"CILIDX",type:"var-string",getText:m},C_IL_VAL:{uuid:"CILVAL",type:"var-string",getText:m},C_IL_NUM:{uuid:"CILNUM",type:"var-string",getText:m},C_IL_LBL:{uuid:"CILLBL",type:"var-string",getText:m},POSITION:{uuid:"_P_OS",type:"var-string",getText:m},FAIL_SKIP:{uuid:"L_FAIL_SKIP",type:"var-bool",getText:m,getBool:m},FAILED:{uuid:"L_FAILED",type:"var-bool",getText:m,getBool:m},SUCCEED:{uuid:"L_SUCCEED",type:"var-bool",getText:m,getBool:m},COUNTRY:{uuid:"_C_NTY",type:"var-string",getText:m},PROVINCE:{uuid:"_P_ROV",type:"var-string",getText:m},CITY:{uuid:"_C_ITY",type:"var-string",getText:m},DISTRICT:{uuid:"_D_TRT",type:"var-string",getText:m},QUES_IMAGE:{uuid:"QI",type:"var-media",getText:m,getImages:m},QUES_TEXT:{uuid:"QT",type:"var-string",getText:m},QUES_LABEL:{uuid:"QL",type:"var-string",getText:m},QUES_DESC:{uuid:"QD",type:"var-string",getText:m},QUES_NAME:{uuid:"QN",type:"var-string",getText:m},QUES_RUNTIME_NAME:{uuid:"QRTN",type:"var-string",getText:m},PHONE_NUMBER:{uuid:"PN",type:"var-string",getText:m},PASSWORD:{uuid:"PSW",type:"var-string",getText:m},USED_PHONE:{uuid:"UPN",type:"var-bool",getText:m,getBool:m},VALIDATE_FAILED:{uuid:"VF",type:"var-bool",getText:m,getBool:m},VALIDATE_FAIL_TIMES:{uuid:"VFT",type:"var-expression",getText:m,getBool:m},QUES_TIME:{uuid:"DRTN",type:"var-string",getText:m,getBool:m},QUES_RS:{uuid:"QRS",type:"var-string",getText:m},Q_TIME_OVER:{uuid:"QTOR",type:"var-bool",getText:m,getBool:m},Q_TIME_LESS:{uuid:"QTLS",type:"var-bool",getText:m,getBool:m},MATCHED_OPTS:{uuid:"MTO",type:"var-string",filter:m},UNMATCHED_OPTS:{uuid:"UMTO",type:"var-string",filter:m},MARKED_OPTS:{uuid:"MKO",type:"var-string",filter:m},UNMARKED_OPTS:{uuid:"UMKO",type:"var-string",filter:m},RANKED_OPTS:{uuid:"RKO",type:"var-string",filter:m},UNRANKED_OPTS:{uuid:"URKO",type:"var-string",filter:m},CHECKED_OPTS:{uuid:"CKO",type:"var-string",filter:m},UNCHECKED_OPTS:{uuid:"UCKO",type:"var-string",filter:m},INPUTTED_OPTS:{uuid:"INO",type:"var-string",filter:m},UN_INPUTTED_OPTS:{uuid:"UINO",type:"var-string",filter:m},ALL_OPTS:{uuid:"ALO",type:"var-string",filter:m},SPECIFIED_OPT:{uuid:"SPO",type:"var-string"},OPT_TEXT:{uuid:"OTXX",type:"var-string",getText:m},OPT_TEXT_X:{uuid:"OTXY",type:"var-string",getText:m},OPT_TEXT_Y:{uuid:"OTX",type:"var-string",getText:m},OPT_NUMBER:{uuid:"ONM",type:"var-string",getText:m},OPT_SELECTED:{uuid:"OSL",type:"var-bool",getBool:m,getText:m},OPT_NUMBER_X:{uuid:"ONMX",type:"var-string",getText:m},OPT_NUMBER_Y:{uuid:"ONMY",type:"var-string",getText:m},OPT_IMAGE:{uuid:"OMG",type:"var-media",getText:m,getImages:m},OPT_ICON:{uuid:"OIC",type:"var-string",getText:m,getIcon:m},OPT_MARK:{uuid:"OMA",type:"var-string",getText:m},OPT_RANK:{uuid:"ORA",type:"var-string",getText:m},OPT_INPUT:{uuid:"OIN",type:"var-string",getText:m},OPT_LABEL:{uuid:"OLB",type:"var-string",getText:m},OPT_GROUP_TITLE:{uuid:"OPT_GROUP_TITLE",type:"var-string",getText:m},OPT_COUNT:{uuid:"OCT",type:"var-expression",inBunch:!0,getText:m},OPT_SAME_MARK:{uuid:"OSM",type:"var-bool",inBunch:!0,getBool:m,getText:m},OPT_DIFF_MARK:{uuid:"ODM",type:"var-bool",inBunch:!0,getBool:m,getText:m},OPT_SAME_VALUE:{uuid:"OSV",type:"var-bool",inBunch:!0,getBool:m,getText:m},OPT_DIFF_VALUE:{uuid:"ODV",type:"var-bool",inBunch:!0,getBool:m,getText:m},EXP_PLUS:{uuid:"EP",type:"var-expression",expOpr:"+"},EXP_MINUS:{uuid:"EM",type:"var-expression",expOpr:"-"},EXP_MULTIPLY:{uuid:"EPL",type:"var-expression",expOpr:"*"},EXP_DIVIDE:{uuid:"ED",type:"var-expression",expOpr:"/"},EXP_SUM:{uuid:"ES",type:"var-expression",expOpr:"(",split:"+"},EXP_MIN:{uuid:"EMN",type:"var-expression",expOpr:"Math.min(",split:","},EXP_MAX:{uuid:"EMX",type:"var-expression",expOpr:"Math.max(",split:","},EXP_AVG:{uuid:"EAG",type:"var-expression",expOpr:"Math.avg(",split:","},EXP_RD:{uuid:"ERD",type:"var-expression",expOpr:"Math.round(",split:"+"},EXP_FLR:{uuid:"EFLR",type:"var-expression",expOpr:"Math.floor(",split:"+"},EXP_CL:{uuid:"ECL",type:"var-expression",expOpr:"Math.ceil(",split:"+"},EXP_OP:{uuid:"EOP",type:"var-expression"},EXP_CP:{uuid:"ECP",type:"var-expression"},BOOL_AND:{uuid:"BAND",type:"var-bool",blOpr:"&&"},BOOL_OR:{uuid:"BOR",type:"var-bool",blOpr:"||"},BOOL_NOT:{uuid:"BNOT",type:"var-bool",blOpr:"!"},BOOL_OP:{uuid:"BOP",type:"var-bool",blOpr:"("},BOOL_CP:{uuid:"BCP",type:"var-bool",blOpr:")"},LOOP:{uuid:"LP",type:"var-loop",getText:m,getImages:m},LOOP_IMG:{uuid:"LPIMG",type:"var-loop",getText:m,getImages:m},LOOP_INDEX:{uuid:"LPIDX",type:"var-loop",getText:m},LOOP_VAL:{uuid:"LPVAL",type:"var-loop",getText:m},LOOP_NUM:{uuid:"LPNUM",type:"var-loop",getText:m},LOOP_LBL:{uuid:"LPLBL",type:"var-loop",getText:m}};for(const t of g.Z.langTable){const e="LANG_"+t.locale.toUpperCase(),n=e;v[e]={uuid:n,type:"var-string",getText:async()=>t.locale}}for(let t=2;t<21;t++){const e="URL_KEY_"+t;v[e]={uuid:e,type:"var-string",getText:m}}function y(t,e){const n=e.origin.optionMappingHeads;if(n){const e=n.find((e=>e.field==="field_"+t));if(e)return{type:"image"===e.type?"var-media":"var-string"}}return null}for(let t=1;t<7;t++)v["OPT_ASTV_"+t]={uuid:"OASTV_"+t,type:"var-string",getText:m},v["OPT_MAP_"+t]={uuid:"OM_"+t,type:"var-string",getText:m,getDynamicProps:e=>y(t,e)},v["C_OPT_MAP_"+t]={uuid:"COMAP"+t,type:"var-string",getText:m},v["C_OL_MAP_"+t]={uuid:"COLMAP"+t,type:"var-string",getText:m},v["C_IL_MAP_"+t]={uuid:"CILMAP"+t,type:"var-string",getText:m},v["LOOP_MAP_"+t]={uuid:"LPMAP"+t,type:"var-loop",getText:m};const _=Object.keys(v);function w(t,e){for(const n of _)if(v[n].uuid===t){let t=v[n];if(t.getDynamicProps&&e){const n=t.getDynamicProps(e);n&&(t={...t,...n})}return t}}function b(){h||(function(){const t=[];_.forEach((e=>{if(!(v[e]instanceof Function)){if(t.indexOf(v[e].uuid)>0)throw new Error("error duplicated uuid in implicit var config: "+v[e].uuid);t.push(v[e].uuid)}}))}(),(0,i.k)(v),(0,p._Z)(v),(0,p.HG)(v),function(t){t.OPT_INPUT.getText=async t=>(0,a.c6)(t.specifiedOpt,"value"),t.OPT_LABEL.getText=async t=>t.specifiedOpt.label||"",c.b.forEach((e=>{!function(e){const n=e.split("_")[1];t["OPT_MAP_"+n].getText=async t=>{const{specifiedOpt:n}=t,{mapping:r}=n;return(0,i.T)(r,e,t)}}(e),function(e){const n=e.split("_")[1];t["OPT_ASTV_"+n].getText=async t=>{const n=t.specifiedOpt.assistValue;return n&&n[e]||""}}(e)})),t.OPT_MARK.getText=t.OPT_INPUT.getText,t.OPT_TEXT.getText=async t=>{const e=t.specifiedOpt,n=(0,a.Lb)(e);if(n)return n;const{optionY:i,optionX:r}=e;return r?r.text+"_"+i.text:(0,a.c6)(e,"text")},t.OPT_NUMBER.getText=async t=>(0,s.KF)(t.specifiedOpt.number),t.OPT_RANK.getText=async t=>{const e=t.specifiedOpt.sortNo;return(0,s.KF)(e)},t.OPT_TEXT_X.getText=async t=>t.specifiedOpt.optionX.text,t.OPT_TEXT_Y.getText=async t=>t.specifiedOpt.optionY.text,t.OPT_NUMBER_X.getText=async t=>{const e=t.specifiedOpt.optionX.number;return(0,s.KF)(e)},t.OPT_NUMBER_Y.getText=async t=>{const e=t.specifiedOpt.optionY.number;return(0,s.KF)(e)},t.OPT_IMAGE.getText=async t=>{const{varInfo:{config:e},specifiedOpt:n,pureText:i}=t,o=(0,a.c6)(n,"image");return i?n.text:o?(0,r.BF)(o.url,e,o.originName):""},t.OPT_ICON.getText=async t=>t.specifiedOpt.text,t.OPT_COUNT.getText=async t=>{const e=await(0,o.Lr)(t);return(0,s.KF)(e.length)},t.OPT_GROUP_TITLE.getText=async t=>{const{optionGroups:e,optionGroupsRelationship:n}=t.varInfo.node.origin;if(!e||!n)return"";const i=t.specifiedOpt.uuid;return function t(e,n){const[i,...r]=n,o=e.find((t=>t.uuid===i));if(o){const e=[o.groupTitle],{children:n}=o;if(n&&0!==n.length&&0!==r.length){const i=t(n||[],r);return[...e,...i]}return e}return[]}(e||[],n.optionsRelationship[i]).join("/")}}(v),function(t){async function e(t,e){const{varInfo:n,needOtherOpt:i}=t,r=n.node,o=(0,a.Kn)(r),s=[];for(const n of o)!i&&n.isOtherOpt||e&&!e(n,r)||!await(0,u.D)({...t,specifiedOpt:n})||s.push(n);return s}t.MATCHED_OPTS.filter=t=>e(t,l.nt),t.RANKED_OPTS.filter=t.MATCHED_OPTS.filter,t.CHECKED_OPTS.filter=t.MATCHED_OPTS.filter,t.UNMATCHED_OPTS.filter=t=>e(t,l.Tm),t.UNRANKED_OPTS.filter=t.UNMATCHED_OPTS.filter,t.UNCHECKED_OPTS.filter=t.UNMATCHED_OPTS.filter,t.MARKED_OPTS.filter=t=>e(t,l.Z6),t.INPUTTED_OPTS.filter=t.MARKED_OPTS.filter,t.UNMARKED_OPTS.filter=t=>e(t,l.vD),t.UN_INPUTTED_OPTS.filter=t.UNMARKED_OPTS.filter,t.ALL_OPTS.filter=async t=>(0,d.X8)(t.varInfo.config)?e(t):t.varInfo.node.options}(v),function(t,e){!function(t,e){e.forEach((e=>{const n=t[e];"function"==typeof n.getText&&(n.getBool=async function(t){const e=await this.getText(t);return!(0,s.O2)(e)})})),t.OPT_COUNT.getBool=async function(t){return!!await this.getText(t)}}(t,e),t.OPT_SELECTED.getBool=async t=>t.specifiedOpt.selected,t.OPT_SAME_MARK.getBool=async t=>{const e=await(0,o.Lr)(t);return function(t,e){if((0,s.O2)(e))return!0;(e<0||e>t.length)&&(e=t.length);const n={};for(const i of t){const t=i.value;if(n[t]?n[t]+=1:n[t]=1,n[t]>=e)return!0}return!1}(e,e.length)},t.OPT_DIFF_MARK.getBool=async t=>{const e=await(0,o.Lr)(t);return function(t,e){if((0,s.O2)(e))return!0;(e<0||e>t.length)&&(e=t.length);const n={};for(const i of t)if(n[i.value]=!0,Object.keys(n).length>=e)return!0;return!1}(e,e.length)},t.OPT_SAME_VALUE.getBool=t.OPT_SAME_MARK.getBool,t.OPT_DIFF_VALUE.getBool=t.OPT_DIFF_MARK.getBool,t.FAIL_SKIP.getBool=async t=>!!t.varInfo.node.failedSkipActivated,t.FAILED.getBool=async t=>!!t.varInfo.node.failed,t.SUCCEED.getBool=async t=>!!t.varInfo.node.succeed,t.USED_PHONE.getBool=async t=>!!t.state.phoneUsed,t.VALIDATE_FAILED.getBool=async t=>t.varInfo.node.validateFailed,t.Q_TIME_OVER.getBool=async t=>{const{origin:{maxAnswerTime:e},costTime:n}=t.varInfo.node,i=1e3*e;return!!(i&&n&&i<n)},t.Q_TIME_LESS.getBool=async t=>{const{origin:{minAnswerTime:e},costTime:n}=t.varInfo.node,i=1e3*e;return!!(i&&n&&i>n)},function(t,e){function n(t){return this.getBool(t)}e.forEach((e=>{const i=t[e];"function"==typeof i.getBool&&i.getText===m&&(i.getText=n)}))}(t,e)}(v,_),(0,f.e0)(v),function(){let t="";if(_.forEach((e=>{const n=v[e];if(["filter","getText","getImages","getIcon","getBool"].forEach((i=>{n[i]===m&&(t+=e+"=>"+i+"\n")})),n.getText){const t=n.getText;n.getText=async function(...e){const{keepWrap:n}=e[0],i=t.apply(this,e),r=await i;if("string"==typeof r&&!n){const t=/<span var-name=".+?" class="var-light var-(\w+?)">(.+?)<\/span>/g;return(0,s.KF)(r).replace(t,((t,e,n)=>"media"===e?t:n))}return(0,s.O2)(r)?"":r}}})),t)throw new Error("lack var implement for:\n"+t)}(),h=!0)}function x(){return h||b(),v}b()},7666:(t,e,n)=>{"use strict";n.d(e,{e0:()=>f,gD:()=>l,xq:()=>d}),n(5306),n(3948);var i=n(656),r=n(7712),o=n(3608),a=n(9271),s=n(1128),c=n(7492);function u(t){return{type:"image",width:t.originWidth,height:t.originHeight,name:t.serverFileName,id:t.id,originName:t.fileName}}async function l(t,e){if(!e)return[];const n=(0,o.Kz)(e.uuid,t.imageList);if(n)return[(0,a.q)(u(n))];if(e.value){let n=[];const i=(0,r.Sq)(e.value);for(const e of i){const i=await l(t,(0,r.wc)(t,e));n=n.concat(i)}return n}{const{option:n,optionPart:i}=e,o=e.node;return o?i?(await(0,r.Lr)({state:t,varInfo:e,specifiedOpt:n})).map((t=>(0,s.c6)(t,"image"))):o.images||[]:[]}}function d(t=""){return t&&"string"==typeof t?t.replace(/##((?:http|data:image|\/).+?)##/g,"$1"):t}function f(t){async function e(t,e){const n=t&&t[e]||"";return"string"==typeof n?[]:[n]}t.QUES_IMAGE.getImages=async t=>{var e;const n=null===(e=t.varInfo)||void 0===e?void 0:e.node;return(null==n?void 0:n.images)||[]},t.OPT_IMAGE.getImages=async t=>{const{varInfo:{option:e},specifiedOpt:n}=t,i=n||e;return[(0,s.c6)(i,"image")]},t.LOOP.getImages=t.LOOP_IMG.getImages=async t=>{const{state:e,varInfo:{lookupLoopNodeId:n}}=t,r=i.gH(e);if(!r)return[];const o=i.qS(n,r.replacements);return o&&o.image?[o.image]:[]},t.OPT_ICON.getIcon=t=>t.specifiedOpt.normalIconUrl||"",c.b.forEach((n=>{!function(n){const i=n.split("_")[1];t["OPT_MAP_"+i].getImages=t=>{const{specifiedOpt:i}=t,{mapping:r}=i;return e(r,n)}}(n),function(n){const i=n.split("_")[1];t["C_OPT_MAP_"+i].getImages=async t=>{const{state:{context:{option:i}}}=t;if(!i)return[];const{mapping:r}=i;return e(r,n)}}(n),function(n){const r=n.split("_")[1],o="C_IL_MAP_"+r;function a(t,r){return i.WE(t,r,(t=>{if(!t)return[];const{mapping:i}=t;return e(i,n)}))}t["C_OL_MAP_"+r].getImages=t=>a(t,0),t[o].getImages=t=>a(t,1)}(n),function(n){const r=n.split("_")[1];t["LOOP_MAP_"+r].getImages=t=>i.nk(t,(t=>e(t.mapping,n)))}(n)}))}},5336:(t,e,n)=>{"use strict";n.d(e,{T:()=>p,k:()=>g}),n(1817);var i=n(3768),r=n(3608),o=n(4248),a=n(1128),s=n(6064),c=n(6539),u=n(7492),l=n(3087),d=n(8204);const f="unknown";function p(t,e,n){const i=t&&t[e]||"";if("string"==typeof i)return i;{const{pureText:t,varInfo:{config:e},specifiedOpt:o}=n;return t?o?o.text:"":(0,r.BF)(i.url,e,i.originName)}}function g(t){function e(e){t["URL_KEY_"+e].getText=async()=>{const t="key"+e;return(0,c.ZI)()[t]}}t.URL_KEY.getText=async()=>{const t=(0,c.ZI)();return t.key1||t.key};for(let t=2;t<=20;t++)e(t);function n(t){const{varInfo:e,state:n}=t;let i;const r=e.node;return r&&(i=r.position&&r.position.address),i||(i=n.address),i}t.YEAR.getText=async()=>(new Date).getFullYear().toString(),t.MONTH.getText=async()=>{const t=(new Date).getMonth()+1;return(0,l.bi)(t)},t.DATE.getText=async()=>{const t=(new Date).getDate();return(0,l.bi)(t)},t.DAY.getText=async t=>{const e=(new Date).getDay();return"zh_cn"===t.state.language?["星期日","星期一","星期二","星期三","星期四","星期五","星期六"][e]:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][e]},t.QUES_ID.getText=async t=>t.state.surveyId,t.WX_ID.getText=async t=>{const{state:{userInfo:e}}=t;return e&&e.openid},t.WX_SRC.getText=async()=>(0,o.dU)().name,t.WX_NAME.getText=async t=>{const{state:{userInfo:e}}=t;return e&&e.nickname},t.WX_UN_ID.getText=async t=>{const{state:{userInfo:e}}=t;return e&&e.unionid},t.RES_ID.getText=async t=>{const{state:e}=t;return e.transactionID},t.CLTR_ID.getText=async()=>"",t.CLTR_CODE.getText=async()=>(0,o.vW)().preview?"":(0,o.vW)().sid,t.CLTR_NAME.getText=async t=>{if((0,o.vW)().preview)return"";const{state:{parsedPayload:e}}=t;if(e){const{surveyMeta:{collector:{name:t}}}=e;return t}return""},t.START_TIME.getText=async t=>{const e=t.state.startTime;return(0,s.KF)(e)},t.COST_TIME.getText=async t=>{const e=(new Date).getTime()-t.state.startTime;return(0,s.KF)(e)},t.RESULT.getText=async t=>{const{state:e}=t,n=await(0,i.gS)(e,"all",void 0,!0);return JSON.stringify(n)},t.CURR.getText=async t=>t.state.language,t.LKTP.getText=async()=>(0,d.J)(),t.C_OPT_TEXT.getText=async t=>{const{state:{context:{option:e}}}=t;return e?(0,a.c6)(e,"text"):""},t.C_OPT_NUM.getText=async t=>{const{state:{context:{option:e}}}=t,n=e&&e.number;return(0,s.KF)(n)},t.C_OPT_VAL.getText=async t=>{const{state:{context:{option:e}}}=t;return e?(0,a.c6)(e,"value"):""},t.C_OPT_LBL.getText=async t=>{const{state:{context:{option:e}}}=t;return e&&e.label||""},t.C_OPT_IPT.getText=async t=>{const{state:{context:{option:e}}}=t;return e?"<input data-iptc-holder='".concat(e.renderId,"' hidden='true' />"):""},t.C_OPT_ASI.getText=async t=>{const{state:{context:{option:e}}}=t;return e?"<input data-asic-holder='".concat(e.renderId,"' hidden='true' />"):""},u.b.forEach((e=>{!function(e){const n=e.split("_")[1];t["C_OPT_MAP_"+n].getText=async t=>{const{state:{context:{option:n}}}=t;if(!n)return"";const{mapping:i}=n;return p(i,e,t)}}(e)})),t.POSITION.getText=async t=>{const{state:{point:e}}=t;return e?e.lat+","+e.lng:""},t.COUNTRY.getText=async t=>{const e=n(t);return e&&e.country},t.PROVINCE.getText=async t=>{const e=n(t);return e&&e.province},t.CITY.getText=async t=>{const e=n(t);return e&&e.city},t.DISTRICT.getText=async t=>{const e=n(t);return e&&e.district},t.QUES_IMAGE.getText=async t=>{const{varInfo:e,pureText:n}=t,i=e.node;return n?i.images.reduce(((t,e)=>t+" "+e.originName),""):i.images.reduce(((t,n)=>t+(0,r.BF)(n.url,e.config,n.originName)),"")},t.QUES_DESC.getText=async t=>t.varInfo.node.description,t.QUES_LABEL.getText=async t=>t.varInfo.node.origin.label||"",t.QUES_TEXT.getText=async t=>t.varInfo.node.title,t.QUES_NAME.getText=async t=>t.varInfo.node.nodeName,t.QUES_RUNTIME_NAME.getText=async t=>t.varInfo.node.runtimeNodeName,t.PHONE_NUMBER.getText=async t=>t.varInfo.node.phoneNumber,t.PASSWORD.getText=async t=>t.varInfo.node.code,t.QUES_TIME.getText=async t=>(0,s.KF)(t.varInfo.node.costTime),t.QUES_RS.getText=async t=>JSON.stringify((0,i.py)(t.varInfo.node)),t.VALIDATE_FAIL_TIMES.getText=async t=>t.varInfo.node.validateFailTimes+"",t.DVC_BRSN.getText=async()=>(0,o.dU)().system.device.browser.name||f,t.DVC_BRSV.getText=async()=>(0,o.dU)().system.device.browser.version||f,t.DVC_OSN.getText=async()=>(0,o.dU)().system.device.os.name||f,t.DVC_OSV.getText=async()=>(0,o.dU)().system.device.os.version||f,t.DVC_VDR.getText=async()=>(0,o.dU)().system.device.device.vendor||f,t.DVC_MDL.getText=async()=>(0,o.dU)().system.device.device.model||f,t.DVC_TYPE.getText=async()=>(0,o.dU)().system.device.device.type||f}},3022:(t,e,n)=>{"use strict";n.d(e,{$P:()=>f,Tm:()=>s,Z6:()=>c,nt:()=>a,vD:()=>u}),n(2707),n(5306);var i=n(7117),r=n(6064),o=n(3877);function a(t){return t.selected}function s(t){return!t.selected}function c(t,e){return(0,o.Zy)(t,e)}function u(t,e){return!(0,o.Zy)(t,e)}const l=(t,e,n,i=!1)=>{if((0,r.O2)(e[n]))return NaN;const o={};t.forEach((t=>{let e=(t[n]+"").replace(/(\s| )/g,"");const i=parseFloat(e);isNaN(i)||(e=i),(0,r.O2)(e)||(o[e]?o[e].push(t):o[e]=[t])}));const a=Object.keys(o).sort(((t,e)=>{const n=Number(t),r=Number(e);return isNaN(n)||isNaN(r)?i?t>e?1:-1:t<e?1:-1:i?n>r?1:-1:n<r?1:-1}));for(let t=0;t<a.length;t++)if(o[a[t]].indexOf(e)>-1)return t+1;return NaN},d={};function f(t,e,n){const r=d[e];return r?r(function(t){let e=null;const{varInfo:n}=t,r=n.node,o=n.optionFilter,{selectIds:l,unselectIds:d,inputIds:f,uninputIds:p}=function(){const t=(0,i.SN)();return{selectIds:[t.CHECKED_OPTS.uuid,t.RANKED_OPTS.uuid,t.MATCHED_OPTS.uuid],unselectIds:[t.UNCHECKED_OPTS.uuid,t.UNRANKED_OPTS.uuid,t.UNMATCHED_OPTS.uuid],inputIds:[t.INPUTTED_OPTS.uuid,t.MARKED_OPTS.uuid],uninputIds:[t.UN_INPUTTED_OPTS.uuid,t.UNMARKED_OPTS.uuid]}}();return o&&(l.indexOf(o.uuid)>-1?e=a:d.indexOf(o.uuid)>-1?e=s:f.indexOf(o.uuid)>-1?e=c:p.indexOf(o.uuid)>-1&&(e=u)),e?r.options.filter((t=>e(t,r))):r.options}(n),t):NaN}d[1]=(t,e)=>e.number,d[14]=(t,e)=>l(t,e,"number",!0),d[15]=(t,e)=>l(t,e,"number",!1),d[2]=(t,e)=>e.text,d[12]=(t,e)=>l(t,e,"text",!0),d[13]=(t,e)=>l(t,e,"text",!1),d[3]=(t,e)=>e.value,d[4]=(t,e)=>l(t,e,"value",!0),d[5]=(t,e)=>l(t,e,"value",!1),d[6]=(t,e)=>e.sortNo,d[7]=(t,e)=>l(t,e,"sortNo",!0),d[8]=(t,e)=>l(t,e,"sortNo",!1),d[9]=(t,e)=>e.value,d[10]=(t,e)=>l(t,e,"value",!0),d[11]=(t,e)=>l(t,e,"value",!1)},8204:(t,e,n)=>{"use strict";n.d(e,{J:()=>r});var i=n(4248);function r(){return(0,i.vW)().realTimePreview?"realtime_preview":(0,i.vW)().preview?"preview":"formal"}},5838:(t,e,n)=>{"use strict";n.d(e,{H$:()=>m,II:()=>l,Q3:()=>v,yv:()=>_}),n(5069),n(3210),n(3948);var i=n(7529),r=n(3656),o=n(6935),a=n(3768),s=n(7712),c=n(6064);const u={1:(t,e,n)=>(e>n&&([e,n]=[n,e]),u[5](t,e,0)&&u[6](t,n,0)),2:(t,e,n)=>!u[1](t,e,n),11:(t,e)=>{const n=(0,c.KF)(t).split(",").filter((t=>""!==t.trim())),i=(0,c.KF)(e).split(",").filter((t=>""!==t.trim()));return n.some((t=>(t=t.trim(),i.some((e=>(e=e.trim(),t.indexOf(e)>-1))))))},12:(t,e)=>!u[11](t,e,0),3:(t,e)=>(0,c.KF)(t)===(0,c.KF)(e),4:(t,e)=>!u[3](t,e,0),5:(t,e)=>{const n=(0,c.Xm)(t),i=(0,c.Xm)(e);return"number"==typeof n&&"number"==typeof i?n>i:(0,c.KF)(n)>(0,c.KF)(i)},6:(t,e)=>{const n=(0,c.Xm)(t),i=(0,c.Xm)(e);return"number"==typeof n&&"number"==typeof i?n<i:(0,c.KF)(n)<(0,c.KF)(i)},7:(t,e)=>!u[6](t,e,0),8:(t,e)=>!u[5](t,e,0),9:(t,e)=>{const n=(0,c.KF)(t).split(",").filter((t=>""!==t.trim())),i=(0,c.KF)(e).split(",").filter((t=>""!==t.trim()));return n.some((t=>(t=t.trim(),i.some((e=>(e=e.trim())===t)))))},10:(t,e)=>!u[9](t,e,0),13:t=>(0,c.KF)(t).split(",").every((t=>""===t.trim())),14:(t,e)=>!u[13](t,e),15:(t,e)=>!u[16](t,e),16:(t,e)=>(0,c.KF)(t).split(",").every((t=>{const e=t.trim();return"false"===e||""===e}))},l={request:t=>!!t,bool:t=>!!t,mark:(t,e)=>l.input(t,e),input:(t,e)=>{let n=t,i=e.markStart,r=e.markEnd;return e.ignoreCase&&("string"==typeof n&&(n=n.toLowerCase()),"string"==typeof i&&(i=i.toLowerCase()),"string"==typeof r&&(r=r.toLowerCase())),u[e.markId](n,i,r)}};function d(t,e){"string"==typeof t&&(t=(0,o.mP)(t));const n=l[e.limitType],i=n?n(t,e):!!t;return{value:i,reason:i?void 0:{type:"value_unmatch",expected:e.markStart,expectedEnd:e.markEnd,limit:e.markId,actual:t}}}async function f(t,e){const{text:n}=t.relatedEmbed,i=m(t.markId)?",":void 0;return d(await(0,o.Ur)(n,{state:e,joinBy:i}),t)}async function p(t,e){const{relatedVarId:n}=t,i={identity:{baseId:n}},r=(0,s.Dy)(e,i);if(!r)return{value:!1,reason:{type:"var_not_found"}};const a=m(t.markId)?",":void 0;return d(await(0,o.CQ)({state:e,varInfo:r,joinBy:a}),t)}function g(t,e){const{relatedNodeId:n,relatedOptionId:o,limitType:s,markId:c}=e,u=function(t,e){const{loopStack:n,renderList:o}=t,{relatedNodeId:a}=e;let s,c=(0,r.am)(a,n);do{if(s=(0,i.JL)(o,c),s)break;c=c.substring(0,c.length-9)}while(c.length>=36);return s}(t,e);if(!u)return-2===c?{value:!0}:{value:!1,reason:{type:"node_not_found",nodeId:n}};const d=(0,a.py)(u);if(!d||!d.items)return-2===c?{value:!0}:{value:!1,reason:{type:"answer_not_found",nodeId:n}};const f=d.items.find((t=>function(t,e){return(0,r.RC)(t.option_id,e)}(t,o))),p=l[s];if(p){const t=f?(0,a.zJ)(f):"",i=p(t,e),r={value:i};return i||(r.reason={type:"node_unmatch",limit:c,actual:t,expected:e.markStart,expectedEnd:e.markEnd,nodeId:n,optionId:o}),r}{const t=-2===c?!f:!!f,e={value:t};return t||(e.reason={type:"node_unmatch",limit:c,nodeId:n,optionId:o,expected:-1===c,actual:2===c}),e}}function m(t){return 9===t||10===t||11===t||12===t||13===t||14===t||15===t||16===t}async function h(t,e){return{start:m(t.markId)?await(0,o.e_)(t.markStart,{state:e,joinBy:","}):await(0,o.lg)(t.markStart,{state:e}),end:await(0,o.lg)(t.markEnd,{state:e})}}async function v(t,e){const{options:n,reverse:i,logicType:r}=e,o=await y(t,n,r);return i?!o.value:o.value}async function y(t,e,n){if(!e)return{value:!0};const i=[];for(const n of e){const e={...n},{relatedVarId:r,relatedEmbed:o,isGroup:a,groupLogicList:s,groupLogicType:c}=e,{start:u,end:l}=await h(e,t);let d;e.markEnd=l,e.markStart=u,d=a?await y(t,s,c):o?await f(e,t):r?await p(e,t):g(t,e),i.push(d)}return{value:!i["and"===n?"some":"every"]((t=>!t.value)),details:i}}async function _(t,e){return"object"==typeof t&&null!==t?v(e,t):!!t}},3817:(t,e,n)=>{"use strict";n.d(e,{I:()=>f,N:()=>d}),n(3948);var i=n(9564),r=n(4248),o=n(3656),a=n(2872),s=n(7089),c=n(7712),u=n(6935);function l(t){return"LOOP_ALL_ROUND"===t}function d(t){return l(t.loopRoundId)||l(t.innerLoopRoundId)}async function f(t){const e=[],{state:n,varInfo:{identity:r}}=t,{loopNodeId:a,loopRoundId:s,innerLoopNodeId:u,innerLoopRoundId:d}=r,f=(0,i.KF)(n,a);if(!f)return"";const g=(0,c.ck)(n,f);if(!g)return"";let m=[];m=l(s)?g.varList.map((t=>(0,o.pC)(t.uuid))):[s];for(const r of m)if(u){let a=[];const s=(0,i.KF)(n,u);if(!s)continue;const f=(0,c.sP)(n,s,r);if(!f)continue;a=l(d)?f.varList.map((t=>(0,o.pC)(t.uuid))):[d];for(const n of a){const i=await p(t,r,n);e.push(i)}}else{const n=await p(t,r);e.push(n)}return e.join(t.joinBy)}function p(t,e,n){const{varInfo:{config:i,identity:o}}=t,c=function(t,e){const n=(0,r.dU)().system.newSpan();return n.setAttribute("class","var-tag".concat(" ","var-string")),n.setAttribute("data-v-id",(0,s.c)(t.identity)),n.setAttribute("data-v-config",(0,a.BB)(t.config)),n.outerHTML}({config:i,identity:{...o,loopRoundId:e,innerLoopRoundId:n}});return(0,u.Ur)(c,t)}},6451:(t,e,n)=>{"use strict";n.d(e,{P:()=>b,_F:()=>w,nO:()=>h,nn:()=>m}),n(2707),n(3948);var i=n(1128),r=n(6935),o=n(3656),a=n(9310),s=n(5750),c=n(7712),u=n(7117),l=n(4248),d=n(9271),f=n(9698),p=n(656),g=n(7666);async function m(t,e){const{loop:n}=e,i=n&&n.node.nodeUuid,{image:r}=e.origin;if(!r)return[];const o=(0,u.SN)();if("image"===r.type)return[(0,d.q)(r)];if(i&&p.hi(r.id))return await o.LOOP_IMG.getImages({state:t,varInfo:{node:e,lookupLoopNodeId:i}});{const e={identity:{baseId:r.id}};return await(0,g.gD)(t,(0,c.Dy)(t,e))}}async function h(t,e){const{origin:n,passRef:i}=e;if(i&&i.image)return i.image;const{parent:r,loop:o}=t,s=o&&o.node.nodeUuid,{image:l,text:f}=n;if(!l)return;const m=(0,u.SN)();let h;if("image"===l.type)h=(0,d.q)(l);else if(s&&p.hi(l.id))h=(await m.LOOP_IMG.getImages({state:r,varInfo:{option:e,lookupLoopNodeId:s}}))[0];else{const t={identity:{baseId:l.id}};h=(await(0,g.gD)(r,(0,c.Dy)(r,t)))[0]}return!f&&h&&"variable"===l.type&&(0,a.GY)({node:t,optionId:e.uuid},{mapId:l.id},h.originName),h}function v(t){return!(!t||!(0,l.vW)().realTimePreview&&!(t.text||t.image||t.normalIconUrl))}async function y(t,e,n){const{optionPart:r,optionFilter:o}=e;let{option:a}=e;if(!r||r.inBunch)return{valid:!0};if(!a){const r=await o.filter({state:t,varInfo:e});a=(0,i.cW)(r,n.refOptId)}return{valid:!!a,srcOpt:a,srcRuntimeIndex:a?(0,i.eu)(e.node).indexOf(a):void 0}}function _(t,e){if(!e)return null;const n=(0,f.q)(t,e);for(const t of e){const e=(0,f.V)(t);if((0,o.RC)(e.uuid,n))return e}return null}async function w(t,e){const{origin:{mapping:n}}=t;if(t.mapping={field_1:"",field_2:"",field_3:"",field_4:"",field_5:"",field_6:""},e.context.option=t,n)for(const i of Object.keys(n)){const o=i,a=n[o];t.mapping[o]="string"==typeof a?await(0,r.Ur)(a,{state:e}):(0,d.q)(a)}t.assistValue={field_1:"",field_2:"",field_3:"",field_4:"",field_5:"",field_6:""},e.context.option=null}async function b(t,e,n,u=!1){let l=[],d=[],f=[],{refOptions:p,options:g,optionRefers:m}=e;if((0,o.is)(e,!!n)&&("xid"===n?(p=e.refOptionsX,g=e.optionsX,m=e.optionXRefers):"yid"===n&&(p=e.refOptionsY,g=e.optionsY,m=e.optionYRefers)),g&&p&&0!==p.length){l=[...g];const e={};for(const n of p){const o=_(n,m);if(!o)continue;const a=o.config||{},s=await(0,r.Ob)(a.limitRnd,{state:t});if(0===s)continue;let l=null,d=null;const f=(0,c.Dy)(t,o);if(!f)continue;const{valid:p,srcOpt:g,srcRuntimeIndex:h}=await y(t,f,n);if(!p)continue;const w={state:t,varInfo:f,specifiedOpt:g,pureText:!u,keepWrap:!0};if(f.node&&(l=await(0,c.is)(w),g&&(d={uuid:n.uuid,value:g.value,optComment:g.optComment,image:(0,i.c6)(g,"image"),number:g.number,text:g.text,label:g.label,mapping:g.mapping&&{...g.mapping},normalIconUrl:(0,i.c6)(g,"normalIconUrl"),activeIconUrl:(0,i.c6)(g,"activeIconUrl")})),v(l)){const t={srcRuntimeIndex:h,option:{...n,...l},passRef:d},i=o.uuid;e[i]?e[i].candidates.push(t):e[i]={candidates:[t],limitRnd:s,varInfo:f,disorder:a.disorder}}}Object.keys(e).forEach((t=>{const{limitRnd:n,candidates:i,varInfo:r,disorder:c}=e[t];let u=(0,o.DQ)(i,n);c?u=(0,s.T_)(u):u.sort(((t,e)=>t.srcRuntimeIndex>e.srcRuntimeIndex?1:-1));const p=u.map((t=>t.option)),g=u.map((t=>t.passRef));f=f.concat((0,a.cX)(r,p)),l=l.concat(p),d=d.concat(g)}))}else l=g;return{options:l,refMaps:f,passRefs:d}}},9310:(t,e,n)=>{"use strict";n.d(e,{GY:()=>a,ZK:()=>s,Zt:()=>d,cX:()=>c,i5:()=>l,sB:()=>u}),n(3948);var i=n(6935),r=n(3768),o=n(7552);function a(t,e,n){n=n;const{node:i,optionId:r,exclusiveId:o}=t;let a=i.embedVarMaps;if(a||(a=i.embedVarMaps=[]),o){const t=a.find((t=>t.exclusiveId===o&&t.var_id===e.mapId));if(t)return void(t.value=n)}a.push({type:"embed",var_id:e.mapId,value:n,option_id:r&&r.toLowerCase(),exclusiveId:o})}function s(t){const{text:e,image:n,icon:i}=t;if(e)return e;if(n)return n.originName;if(i){const t=(0,o.jy)(i).match(/#[^#]+$/);return t&&t[0]||""}return""}function c(t,e){return e.map((e=>({option_id:e.uuid.toLowerCase(),value:s(e),type:"ref",var_id:t.uuid})))}function u(t,e){t.referVarMaps?t.referVarMaps=t.referVarMaps.concat(e):t.referVarMaps=e}function l(t,e){const n=t.casVarMaps=[];e.forEach((t=>{t.text&&n.push({type:"cascade",option_id:t.uuid.toLowerCase(),value:t.text})}))}function d(t,e){const{renderList:n}=t,o=[];return n.forEach((t=>{if(!(0,r.F2)(t.checkMode,e))return;const{nodeUuid:n,loop:a}=t;let{embedVarMaps:s,referVarMaps:c,casVarMaps:u}=t;s=function(t){if(t){let e=[];const n=[];return t.forEach((t=>{delete t.exclusiveId,t.option_id?e.push(t):n.push(t)})),e=function(t){let e=[];const n={};return t.forEach((t=>{const{var_id:e,value:i}=t;let r=n[e];r?(r.values.indexOf(i)<0&&r.values.push(i),r.maps.push(t)):r=n[e]={values:[i],maps:[t]}})),Object.keys(n).forEach((t=>{const i=n[t],{values:r,maps:o}=i;if(r.length>1)e=e.concat(o);else{const t=o[0];o.length>1&&(t.option_id="all"),e.push(t)}})),e}(e),n.concat(e)}return[]}(s),c=c||[],u=u||[];const l=s.concat(c,u);if(l.length>0){let t;l.forEach((t=>{t.value=(0,i.mP)(t.value)})),a&&(t=a.replacements.map((t=>t.index))),o.push({node_id:n.toLowerCase(),loop_idxs:t,var_maps:l})}})),o}},3146:(t,e,n)=>{"use strict";n.d(e,{D:()=>u}),n(2707);var i=n(3022),r=n(5838),o=n(6935),a=n(6064),s=n(2872);const c={"-1":6,"-2":8,"-3":5,"-4":7};async function u(t){if(!(0,s.X8)(t.varInfo.config))return!0;const{varInfo:{option:e}}=t,n=t.varInfo.node,u=t.specifiedOpt||e,{limitType:l,limitStart:d,limitEnd:f,limitSrc:p,ignoreCase:g}=function(t,e){if(!e)return{};const{limitType:n}=e;if(n>=0)return e;const i=c[n];let r;const o=t.options.filter((t=>t.selected)).map((t=>t.number)).sort();return r=5===i||7===i?(0,a.KF)(o[o.length-1]||0):(0,a.KF)(o[0]||0),{...e,limitType:i,limitStart:r}}(n,t.varInfo.config),m=(0,i.$P)(u,p,t),h=Number(l),v=(0,r.H$)(h)?await(0,o.e_)(d,{...t,joinBy:","}):await(0,o.lg)(d,t),y=await(0,o.lg)(f,t);return r.II.input(m,{markId:h,markStart:v,markEnd:y,ignoreCase:g})}},1772:(t,e,n)=>{"use strict";n.d(e,{O_:()=>s,fq:()=>a}),n(3948);var i=n(6935),r=n(4248),o=n(8204);function a(t,e){return{_LANG_:e.language,_LINK_TYPE_:(0,o.J)(),_IS_INFER_:(0,r.dU)().dev.infer?"Y":"",...t}}async function s(t,e){const{params:n}=e,r={};for(const e of n){const{name:n,value:o}=e;n.startsWith("_url_")?r[n]=await(0,i.sb)(o,{state:t}):n.startsWith("_html_")?r[n]=await(0,i.Ur)(o,{state:t},!0):r[n]=await(0,i.e_)(o,{state:t,joinBy:","},"URL")}return a(r,t)}},6935:(t,e,n)=>{"use strict";n.d(e,{FL:()=>M,CQ:()=>N,Ur:()=>k,Ob:()=>U,e_:()=>E,lg:()=>R,sb:()=>C,IY:()=>b,Oy:()=>A,mP:()=>P}),n(5306),n(3210),n(3948);var i=n(2125);function r(t){let e=!0;try{e=!!(0,i.K)(t,!0)}catch(e){console.info("error bool: ",t)}return e}function o(t,e,n){return function(t,e,n){return!!(e.length&&""!==n&&t&&t[t.length-1].match(/[\d)]/))}(t,e,n)&&(t+=e[e.length-1]),t+n}function a(t){return"("===t[t.length-1]&&(t+="0"),t+")"}var s=n(3656),c=n(5015),u=n(866),l=n(9310),d=n(7712),f=n(7666),p=n(3608),g=n(7117),m=n(4248),h=n(6064),v=n(6539),y=n(2872),_=n(3817);function w(t){return t&&("var-html"===t.type||"var-request"===t.type||"var-loop"===t.type)}function b(t="",e=!1){if(t=(t=T(t,e)).replace(/</g,"<").replace(/>/g,">"),e)for(;t.indexOf("<")>-1||t.indexOf(">")>-1;)t=t.replace(/</g,"<").replace(/>/g,">");return t}function x(t=""){return t.replace(/</g,"<").replace(/>/g,">")}function T(t="",e=!1){if(t=t.replace(/&/g,"&"),e)for(;t.indexOf("&")>-1;)t.replace(/&/g,"&");return t}function I(t="",e,n,i,r){let o='<span var-name="'+n+'" class="var-light '+e+'"'+(i?'in-edist="1">':">")+t+"</span>";return r&&(o=(0,s.sG)(o)),o}function O(t=""){return t.match(/<(\w+).+?<\/\1>/)||(t="<span>".concat(t,"</span>")),[...(0,d.HX)(t).childNodes]}async function k(t="",e,n=!1){t+="";const{state:i,innerJoinBy:r,varInfo:o,usage:a}=e,c=e.spaceRep||"";t=t.replace(/ /g,c);const u=e.joinBy||" ";if((0,d.b)(t)){const c=(0,d.HX)(t),f=(0,d.Sq)(t,c);for(const t of f){const e=(0,d.wc)(i,t);let s="";if(e?s=await N({state:i,varInfo:e,joinBy:r||u}):(0,m.vW)().realTimePreview&&(s=I(t.innerHTML,"var-empty",t.innerText,!1,!0)),s=(0,h.O2)(s)?"":(0,h.KF)(s).trim(),a){const n=e||{mapId:(0,d.Hz)((0,d.V0)(t))};(0,l.GY)(a,n,s)}const c=!o&&e&&s&&!n;let f=[];w(e)?(c&&(s=I(s,e.type,e.name,e.inEdist,!1)),f=s?O(s):[""]):(c&&(s=I(s,e.type,e.name,e.inEdist,!0)),t.innerText=s,f=[(0,m.dU)().system.newTextNode(t.innerHTML)]),S(t,f)}return L(function(t,e,n=""){if(w(e))return b(t.innerHTML);let i="";if(n){const r=[];for(const n of t.childNodes){let t="";if((0,s.is)(n,1===n.nodeType)){if("SPAN"===n.tagName&&!n.innerText&&0===n.childNodes.length)continue;t=n.outerHTML}else t=n.textContent.trim(),e||(t=x(t));t&&r.push(T(t))}i=r.join(n)}else i=T(t.innerHTML);return i=i.replace(/([\r\n]|^\s*|\s*$)/g,"").replace(/<br>/g,""),i=T((0,s.kr)(i)),i}(c,o,u),e)}return t+""}function S(t,e){const n=t.parentElement;e.forEach((e=>{if("string"==typeof e){if(""!==e){const i=(0,m.dU)().system.newTextNode(e);n.insertBefore(i,t)}}else n.insertBefore(e,t)})),n.removeChild(t)}async function E(t="",e,n="WRAPPED_URL"){return L(P(await k(t,e,!0),n),e)}function P(t="",e="WRAPPED_URL"){if(!t||"string"!=typeof t)return t;t=t.replace(/<style>.*?<\/style>/g,"");let n=(0,d.HX)(t).innerText;return n=(0,d.HX)(n).innerText,"URL"===e&&(n=(0,f.xq)(n)),n.trim()}function L(t,e){return","===e.joinBy?(t+"").trim().replace(/(?:^\s*,|\s*,\s*,\s*|\s*,$)/,""):t}async function C(t="",e){let n=await k(t,{...e,innerJoinBy:","},!0);return n=P(b(n,!0)),n=n.replace(/####/g,"|").replace(/##/g,"").replace(/\s+/g,""),n=L(n,e),n}async function N(t){let e="";const{varInfo:n}=t;if((0,_.N)(n.identity))e=await(0,_.I)(t);else if(n.getText)e=await n.getText(t);else{const{identity:{baseId:l}}=n;if((0,d.sb)(l)){const[t,n]=l.split("URL_PARAM=");e=(0,v.ZI)()[n]}else n.nodePart||n.node?e=await(0,d.KP)(t):"var-string"===n.type?e=await function(t){const{varInfo:e}=t;return e.getText?e.getText(t):k(e.value,t)}(t):"var-expression"===n.type?e=await async function(t){const e=(0,g.SN)(),{varInfo:n,state:r}=t;let s="";const c=(0,d.HX)(n.value).childNodes,u=[];let l="";for(const t of c)if((0,d.g)(t)){if(l){const t=parseFloat(l);if(isNaN(t))return t;s=o(s,u,t),l=""}const n=(0,d.wc)(r,t);if(n){const t=n.split;if(n.uuid===e.EXP_OP.uuid)s+="(";else if(n.uuid===e.EXP_CP.uuid)s=a(s);else if(t)s=o(s,u,n.expOpr),u.push(t);else if(n.expOpr)u.length&&(s=a(s),u.pop()),s=o(s,u,n.expOpr);else{const t=u[u.length-1];s=o(s,u,await N({state:r,varInfo:n,joinBy:t||"+"})||0)}}else l+="0"}else l+=t.textContent.replace(/\s/g,"");for(l&&(s=o(s,u,parseFloat(l)));u.length;)s=a(s),u.pop();return function(t){let e=0;try{e=(0,i.K)(t,!0)}catch(n){e=NaN,console.info("error exp: ",t)}return e}(s)}(t):"var-media"===n.type?e=await async function(t){const{varInfo:e,state:n}=t,{config:i}=e,r=t.joinBy||" ",o=(0,d.Sq)(e.value),a=[];for(const t of o){const e=(0,d.wc)(n,t);if(!e)continue;const{imgHeight:o,imgWidth:s}=i;(o||s)&&(e.config={...e.config,imgHeight:o,imgWidth:s});const c=await N({state:n,varInfo:e,joinBy:r});(0,h.O2)(c)||a.push(c)}return a.join(r)}(t):"var-bool"===n.type?e=await async function(t){const{varInfo:e,state:n}=t;if(e.getBool)return e.getBool(t);const{nodePart:i,node:o}=e;if(i||o)return(0,d.DC)(t);const a=(0,d.Sq)(e.value);let s="";for(const e of a){const i=(0,d.wc)(n,e);if(i)if(i.blOpr)s+=i.blOpr;else if(i.getBool)s+=r(await i.getBool(t))?"1":"0";else{const t=await N({state:n,varInfo:i});s+="string"==typeof t?"0"===t?t:t?"1":"0":r(t)?"1":"0"}}return r(s)}(t):"var-request"===n.type?e=await async function(t){const{varInfo:{request:e,config:n},state:i}=t;if(e){let t=null;if(n&&n.phParams){t={};for(const e of n.phParams)t[e.name]=await E(e.value,{state:i,joinBy:","},"URL")}const{result:r}=await(0,c.LO)(i,e,t,!1);return"string"!=typeof r?r:(0,u.l)(r)}return""}(t):"var-html"===n.type&&(e=await async function(t){const{varInfo:e,state:n}=t,i=e.getText?await e.getText(t):await k(e.value,t),r=(0,u.l)(b(i));return await function(t,e,n){const i=(0,y.gh)(t);return(0,s.s$)(e,/{{{?(.+?)}}}?/g,(async(t,e)=>{const r=e.indexOf("=");let o=e,a="";r>-1&&(o=e.substring(0,r),a=e.substring(r+1));const s=i[o]||"";let c="";return s&&(c=t.startsWith("{{{")?await k(s,{state:n}):await E(s,{state:n},"URL")),c||a}))}(e.config.phParams,r,n)}(t))}return(0,d.b)(e)&&(e=await k(e,t)),e}async function R(t="",e,n=!1){if("number"==typeof t)return t;if((0,h.O2)(t))return n?NaN:"";const i=Number(t);if(isNaN(i)){const i=await E(t,e);if((0,h.O2)(i))return n?NaN:"";const r=Number(i);return isNaN(r)?n?NaN:i:r}return i}async function U(t="",e){if("number"==typeof t)return t;const n=await R(t,e,!0);return Number(n)}async function A(t="",e,n=!1){return(0,h.O2)(t)?"":(0,s.s$)((0,h.KF)(t),/{{(.+?)}}/g,(async(t,i)=>{let r=await async function(t,e){if(t.match(/key(?:\d+)?/))return(0,v.ZI)()[t];{const n=(0,p.XY)(t,e.variables);return n?P(await N({varInfo:n,state:e,joinBy:","})):""}}(i,e);return r&&n&&(r=encodeURIComponent(r)),"".concat(r||"")}))}function M(t=""){return t.replace(/(?:^<div>|<\/div>$)/g,"")}},3099:t=>{t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},6077:(t,e,n)=>{var i=n(111);t.exports=function(t){if(!i(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},1223:(t,e,n)=>{var i=n(5112),r=n(30),o=n(3070),a=i("unscopables"),s=Array.prototype;null==s[a]&&o.f(s,a,{configurable:!0,value:r(null)}),t.exports=function(t){s[a][t]=!0}},1530:(t,e,n)=>{"use strict";var i=n(8710).charAt;t.exports=function(t,e,n){return e+(n?i(t,e).length:1)}},9670:(t,e,n)=>{var i=n(111);t.exports=function(t){if(!i(t))throw TypeError(String(t)+" is not an object");return t}},1318:(t,e,n)=>{var i=n(5656),r=n(7466),o=n(1400),a=function(t){return function(e,n,a){var s,c=i(e),u=r(c.length),l=o(a,u);if(t&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},9341:(t,e,n)=>{"use strict";var i=n(7293);t.exports=function(t,e){var n=[][t];return!!n&&i((function(){n.call(null,e||function(){throw 1},1)}))}},3411:(t,e,n)=>{var i=n(9670);t.exports=function(t,e,n,r){try{return r?e(i(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&i(o.call(t)),e}}},4326:t=>{var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},648:(t,e,n)=>{var i=n(1694),r=n(4326),o=n(5112)("toStringTag"),a="Arguments"==r(function(){return arguments}());t.exports=i?r:function(t){var e,n,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:a?r(e):"Object"==(i=r(e))&&"function"==typeof e.callee?"Arguments":i}},1501:(t,e,n)=>{"use strict";var i=n(9670),r=n(3099);t.exports=function(){for(var t=i(this),e=r(t.add),n=0,o=arguments.length;n<o;n++)e.call(t,arguments[n]);return t}},4092:(t,e,n)=>{"use strict";var i=n(9670),r=n(3099);t.exports=function(){for(var t,e=i(this),n=r(e.delete),o=!0,a=0,s=arguments.length;a<s;a++)t=n.call(e,arguments[a]),o=o&&t;return!!o}},9920:(t,e,n)=>{var i=n(6656),r=n(3887),o=n(1236),a=n(3070);t.exports=function(t,e){for(var n=r(e),s=a.f,c=o.f,u=0;u<n.length;u++){var l=n[u];i(t,l)||s(t,l,c(e,l))}}},8544:(t,e,n)=>{var i=n(7293);t.exports=!i((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},4994:(t,e,n)=>{"use strict";var i=n(3383).IteratorPrototype,r=n(30),o=n(9114),a=n(8003),s=n(7497),c=function(){return this};t.exports=function(t,e,n){var u=e+" Iterator";return t.prototype=r(i,{next:o(1,n)}),a(t,u,!1,!0),s[u]=c,t}},8880:(t,e,n)=>{var i=n(9781),r=n(3070),o=n(9114);t.exports=i?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},9114:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},654:(t,e,n)=>{"use strict";var i=n(2109),r=n(4994),o=n(9518),a=n(7674),s=n(8003),c=n(8880),u=n(1320),l=n(5112),d=n(1913),f=n(7497),p=n(3383),g=p.IteratorPrototype,m=p.BUGGY_SAFARI_ITERATORS,h=l("iterator"),v="keys",y="values",_="entries",w=function(){return this};t.exports=function(t,e,n,l,p,b,x){r(n,e,l);var T,I,O,k=function(t){if(t===p&&C)return C;if(!m&&t in P)return P[t];switch(t){case v:case y:case _:return function(){return new n(this,t)}}return function(){return new n(this)}},S=e+" Iterator",E=!1,P=t.prototype,L=P[h]||P["@@iterator"]||p&&P[p],C=!m&&L||k(p),N="Array"==e&&P.entries||L;if(N&&(T=o(N.call(new t)),g!==Object.prototype&&T.next&&(d||o(T)===g||(a?a(T,g):"function"!=typeof T[h]&&c(T,h,w)),s(T,S,!0,!0),d&&(f[S]=w))),p==y&&L&&L.name!==y&&(E=!0,C=function(){return L.call(this)}),d&&!x||P[h]===C||c(P,h,C),f[e]=C,p)if(I={values:k(y),keys:b?C:k(v),entries:k(_)},x)for(O in I)(m||E||!(O in P))&&u(P,O,I[O]);else i({target:e,proto:!0,forced:m||E},I);return I}},9781:(t,e,n)=>{var i=n(7293);t.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:(t,e,n)=>{var i=n(7854),r=n(111),o=i.document,a=r(o)&&r(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},8324:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},748:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:(t,e,n)=>{var i=n(7854),r=n(1236).f,o=n(8880),a=n(1320),s=n(3505),c=n(9920),u=n(4705);t.exports=function(t,e){var n,l,d,f,p,g=t.target,m=t.global,h=t.stat;if(n=m?i:h?i[g]||s(g,{}):(i[g]||{}).prototype)for(l in e){if(f=e[l],d=t.noTargetGet?(p=r(n,l))&&p.value:n[l],!u(m?l:g+(h?".":"#")+l,t.forced)&&void 0!==d){if(typeof f==typeof d)continue;c(f,d)}(t.sham||d&&d.sham)&&o(f,"sham",!0),a(n,l,f,t)}}},7293:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},7007:(t,e,n)=>{"use strict";n(4916);var i=n(1320),r=n(7293),o=n(5112),a=n(2261),s=n(8880),c=o("species"),u=!r((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),l="$0"==="a".replace(/./,"$0"),d=o("replace"),f=!!/./[d]&&""===/./[d]("a","$0"),p=!r((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));t.exports=function(t,e,n,d){var g=o(t),m=!r((function(){var e={};return e[g]=function(){return 7},7!=""[t](e)})),h=m&&!r((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[c]=function(){return n},n.flags="",n[g]=/./[g]),n.exec=function(){return e=!0,null},n[g](""),!e}));if(!m||!h||"replace"===t&&(!u||!l||f)||"split"===t&&!p){var v=/./[g],y=n(g,""[t],(function(t,e,n,i,r){return e.exec===a?m&&!r?{done:!0,value:v.call(e,n,i)}:{done:!0,value:t.call(n,e,i)}:{done:!1}}),{REPLACE_KEEPS_$0:l,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:f}),_=y[0],w=y[1];i(String.prototype,t,_),i(RegExp.prototype,g,2==e?function(t,e){return w.call(t,this,e)}:function(t){return w.call(t,this)})}d&&s(RegExp.prototype[g],"sham",!0)}},9974:(t,e,n)=>{var i=n(3099);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},5005:(t,e,n)=>{var i=n(857),r=n(7854),o=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?o(i[t])||o(r[t]):i[t]&&i[t][e]||r[t]&&r[t][e]}},1246:(t,e,n)=>{var i=n(648),r=n(7497),o=n(5112)("iterator");t.exports=function(t){if(null!=t)return t[o]||t["@@iterator"]||r[i(t)]}},8554:(t,e,n)=>{var i=n(9670),r=n(1246);t.exports=function(t){var e=r(t);if("function"!=typeof e)throw TypeError(String(t)+" is not iterable");return i(e.call(t))}},4647:(t,e,n)=>{var i=n(1913),r=n(8554);t.exports=i?r:function(t){return Map.prototype.entries.call(t)}},6767:(t,e,n)=>{var i=n(1913),r=n(8554);t.exports=i?r:function(t){return Set.prototype.values.call(t)}},7854:(t,e,n)=>{var i=function(t){return t&&t.Math==Math&&t};t.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof n.g&&n.g)||Function("return this")()},6656:t=>{var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},3501:t=>{t.exports={}},490:(t,e,n)=>{var i=n(5005);t.exports=i("document","documentElement")},4664:(t,e,n)=>{var i=n(9781),r=n(7293),o=n(317);t.exports=!i&&!r((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},8361:(t,e,n)=>{var i=n(7293),r=n(4326),o="".split;t.exports=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==r(t)?o.call(t,""):Object(t)}:Object},2788:(t,e,n)=>{var i=n(5465),r=Function.toString;"function"!=typeof i.inspectSource&&(i.inspectSource=function(t){return r.call(t)}),t.exports=i.inspectSource},9909:(t,e,n)=>{var i,r,o,a=n(8536),s=n(7854),c=n(111),u=n(8880),l=n(6656),d=n(6200),f=n(3501),p=s.WeakMap;if(a){var g=new p,m=g.get,h=g.has,v=g.set;i=function(t,e){return v.call(g,t,e),e},r=function(t){return m.call(g,t)||{}},o=function(t){return h.call(g,t)}}else{var y=d("state");f[y]=!0,i=function(t,e){return u(t,y,e),e},r=function(t){return l(t,y)?t[y]:{}},o=function(t){return l(t,y)}}t.exports={set:i,get:r,has:o,enforce:function(t){return o(t)?r(t):i(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=r(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},7659:(t,e,n)=>{var i=n(5112),r=n(7497),o=i("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||a[o]===t)}},3157:(t,e,n)=>{var i=n(4326);t.exports=Array.isArray||function(t){return"Array"==i(t)}},4705:(t,e,n)=>{var i=n(7293),r=/#|\.prototype\./,o=function(t,e){var n=s[a(t)];return n==u||n!=c&&("function"==typeof e?i(e):!!e)},a=o.normalize=function(t){return String(t).replace(r,".").toLowerCase()},s=o.data={},c=o.NATIVE="N",u=o.POLYFILL="P";t.exports=o},111:t=>{t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},1913:t=>{t.exports=!1},408:(t,e,n)=>{var i=n(9670),r=n(7659),o=n(7466),a=n(9974),s=n(1246),c=n(3411),u=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,e,n,l,d){var f,p,g,m,h,v,y,_=a(e,n,l?2:1);if(d)f=t;else{if("function"!=typeof(p=s(t)))throw TypeError("Target is not iterable");if(r(p)){for(g=0,m=o(t.length);m>g;g++)if((h=l?_(i(y=t[g])[0],y[1]):_(t[g]))&&h instanceof u)return h;return new u(!1)}f=p.call(t)}for(v=f.next;!(y=v.call(f)).done;)if("object"==typeof(h=c(f,_,y.value,l))&&h&&h instanceof u)return h;return new u(!1)}).stop=function(t){return new u(!0,t)}},3383:(t,e,n)=>{"use strict";var i,r,o,a=n(9518),s=n(8880),c=n(6656),u=n(5112),l=n(1913),d=u("iterator"),f=!1;[].keys&&("next"in(o=[].keys())?(r=a(a(o)))!==Object.prototype&&(i=r):f=!0),null==i&&(i={}),l||c(i,d)||s(i,d,(function(){return this})),t.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:f}},7497:t=>{t.exports={}},133:(t,e,n)=>{var i=n(7293);t.exports=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())}))},8536:(t,e,n)=>{var i=n(7854),r=n(2788),o=i.WeakMap;t.exports="function"==typeof o&&/native code/.test(r(o))},30:(t,e,n)=>{var i,r=n(9670),o=n(6048),a=n(748),s=n(3501),c=n(490),u=n(317),l=n(6200)("IE_PROTO"),d=function(){},f=function(t){return"<script>"+t+"<\/script>"},p=function(){try{i=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;p=i?function(t){t.write(f("")),t.close();var e=t.parentWindow.Object;return t=null,e}(i):((e=u("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(f("document.F=Object")),t.close(),t.F);for(var n=a.length;n--;)delete p.prototype[a[n]];return p()};s[l]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(d.prototype=r(t),n=new d,d.prototype=null,n[l]=t):n=p(),void 0===e?n:o(n,e)}},6048:(t,e,n)=>{var i=n(9781),r=n(3070),o=n(9670),a=n(1956);t.exports=i?Object.defineProperties:function(t,e){o(t);for(var n,i=a(e),s=i.length,c=0;s>c;)r.f(t,n=i[c++],e[n]);return t}},3070:(t,e,n)=>{var i=n(9781),r=n(4664),o=n(9670),a=n(7593),s=Object.defineProperty;e.f=i?s:function(t,e,n){if(o(t),e=a(e,!0),o(n),r)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},1236:(t,e,n)=>{var i=n(9781),r=n(5296),o=n(9114),a=n(5656),s=n(7593),c=n(6656),u=n(4664),l=Object.getOwnPropertyDescriptor;e.f=i?l:function(t,e){if(t=a(t),e=s(e,!0),u)try{return l(t,e)}catch(t){}if(c(t,e))return o(!r.f.call(t,e),t[e])}},8006:(t,e,n)=>{var i=n(6324),r=n(748).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,r)}},5181:(t,e)=>{e.f=Object.getOwnPropertySymbols},9518:(t,e,n)=>{var i=n(6656),r=n(7908),o=n(6200),a=n(8544),s=o("IE_PROTO"),c=Object.prototype;t.exports=a?Object.getPrototypeOf:function(t){return t=r(t),i(t,s)?t[s]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},6324:(t,e,n)=>{var i=n(6656),r=n(5656),o=n(1318).indexOf,a=n(3501);t.exports=function(t,e){var n,s=r(t),c=0,u=[];for(n in s)!i(a,n)&&i(s,n)&&u.push(n);for(;e.length>c;)i(s,n=e[c++])&&(~o(u,n)||u.push(n));return u}},1956:(t,e,n)=>{var i=n(6324),r=n(748);t.exports=Object.keys||function(t){return i(t,r)}},5296:(t,e)=>{"use strict";var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,r=i&&!n.call({1:2},1);e.f=r?function(t){var e=i(this,t);return!!e&&e.enumerable}:n},7674:(t,e,n)=>{var i=n(9670),r=n(6077);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,o){return i(n),r(o),e?t.call(n,o):n.__proto__=o,n}}():void 0)},3887:(t,e,n)=>{var i=n(5005),r=n(8006),o=n(5181),a=n(9670);t.exports=i("Reflect","ownKeys")||function(t){var e=r.f(a(t)),n=o.f;return n?e.concat(n(t)):e}},857:(t,e,n)=>{var i=n(7854);t.exports=i},1320:(t,e,n)=>{var i=n(7854),r=n(8880),o=n(6656),a=n(3505),s=n(2788),c=n(9909),u=c.get,l=c.enforce,d=String(String).split("String");(t.exports=function(t,e,n,s){var c=!!s&&!!s.unsafe,u=!!s&&!!s.enumerable,f=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof e||o(n,"name")||r(n,"name",e),l(n).source=d.join("string"==typeof e?e:"")),t!==i?(c?!f&&t[e]&&(u=!0):delete t[e],u?t[e]=n:r(t,e,n)):u?t[e]=n:a(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&u(this).source||s(this)}))},7651:(t,e,n)=>{var i=n(4326),r=n(2261);t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var o=n.call(t,e);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==i(t))throw TypeError("RegExp#exec called on incompatible receiver");return r.call(t,e)}},2261:(t,e,n)=>{"use strict";var i,r,o=n(7066),a=n(2999),s=RegExp.prototype.exec,c=String.prototype.replace,u=s,l=(i=/a/,r=/b*/g,s.call(i,"a"),s.call(r,"a"),0!==i.lastIndex||0!==r.lastIndex),d=a.UNSUPPORTED_Y||a.BROKEN_CARET,f=void 0!==/()??/.exec("")[1];(l||f||d)&&(u=function(t){var e,n,i,r,a=this,u=d&&a.sticky,p=o.call(a),g=a.source,m=0,h=t;return u&&(-1===(p=p.replace("y","")).indexOf("g")&&(p+="g"),h=String(t).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==t[a.lastIndex-1])&&(g="(?: "+g+")",h=" "+h,m++),n=new RegExp("^(?:"+g+")",p)),f&&(n=new RegExp("^"+g+"$(?!\\s)",p)),l&&(e=a.lastIndex),i=s.call(u?n:a,h),u?i?(i.input=i.input.slice(m),i[0]=i[0].slice(m),i.index=a.lastIndex,a.lastIndex+=i[0].length):a.lastIndex=0:l&&i&&(a.lastIndex=a.global?i.index+i[0].length:e),f&&i&&i.length>1&&c.call(i[0],n,(function(){for(r=1;r<arguments.length-2;r++)void 0===arguments[r]&&(i[r]=void 0)})),i}),t.exports=u},7066:(t,e,n)=>{"use strict";var i=n(9670);t.exports=function(){var t=i(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},2999:(t,e,n)=>{"use strict";var i=n(7293);function r(t,e){return RegExp(t,e)}e.UNSUPPORTED_Y=i((function(){var t=r("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=i((function(){var t=r("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},4488:t=>{t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},6465:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},3505:(t,e,n)=>{var i=n(7854),r=n(8880);t.exports=function(t,e){try{r(i,t,e)}catch(n){i[t]=e}return e}},8003:(t,e,n)=>{var i=n(3070).f,r=n(6656),o=n(5112)("toStringTag");t.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,o)&&i(t,o,{configurable:!0,value:e})}},6200:(t,e,n)=>{var i=n(2309),r=n(9711),o=i("keys");t.exports=function(t){return o[t]||(o[t]=r(t))}},5465:(t,e,n)=>{var i=n(7854),r=n(3505),o="__core-js_shared__",a=i[o]||r(o,{});t.exports=a},2309:(t,e,n)=>{var i=n(1913),r=n(5465);(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:i?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},6707:(t,e,n)=>{var i=n(9670),r=n(3099),o=n(5112)("species");t.exports=function(t,e){var n,a=i(t).constructor;return void 0===a||null==(n=i(a)[o])?e:r(n)}},8710:(t,e,n)=>{var i=n(9958),r=n(4488),o=function(t){return function(e,n){var o,a,s=String(r(e)),c=i(n),u=s.length;return c<0||c>=u?t?"":void 0:(o=s.charCodeAt(c))<55296||o>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?t?s.charAt(c):o:t?s.slice(c,c+2):a-56320+(o-55296<<10)+65536}};t.exports={codeAt:o(!1),charAt:o(!0)}},6091:(t,e,n)=>{var i=n(7293),r=n(1361);t.exports=function(t){return i((function(){return!!r[t]()||"
"!="
"[t]()||r[t].name!==t}))}},3111:(t,e,n)=>{var i=n(4488),r="["+n(1361)+"]",o=RegExp("^"+r+r+"*"),a=RegExp(r+r+"*$"),s=function(t){return function(e){var n=String(i(e));return 1&t&&(n=n.replace(o,"")),2&t&&(n=n.replace(a,"")),n}};t.exports={start:s(1),end:s(2),trim:s(3)}},1400:(t,e,n)=>{var i=n(9958),r=Math.max,o=Math.min;t.exports=function(t,e){var n=i(t);return n<0?r(n+e,0):o(n,e)}},5656:(t,e,n)=>{var i=n(8361),r=n(4488);t.exports=function(t){return i(r(t))}},9958:t=>{var e=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:e)(t)}},7466:(t,e,n)=>{var i=n(9958),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},7908:(t,e,n)=>{var i=n(4488);t.exports=function(t){return Object(i(t))}},7593:(t,e,n)=>{var i=n(111);t.exports=function(t,e){if(!i(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},1694:(t,e,n)=>{var i={};i[n(5112)("toStringTag")]="z",t.exports="[object z]"===String(i)},9711:t=>{var e=0,n=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++e+n).toString(36)}},3307:(t,e,n)=>{var i=n(133);t.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5112:(t,e,n)=>{var i=n(7854),r=n(2309),o=n(6656),a=n(9711),s=n(133),c=n(3307),u=r("wks"),l=i.Symbol,d=c?l:l&&l.withoutSetter||a;t.exports=function(t){return o(u,t)||(s&&o(l,t)?u[t]=l[t]:u[t]=d("Symbol."+t)),u[t]}},1361:t=>{t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},6992:(t,e,n)=>{"use strict";var i=n(5656),r=n(1223),o=n(7497),a=n(9909),s=n(654),c="Array Iterator",u=a.set,l=a.getterFor(c);t.exports=s(Array,"Array",(function(t,e){u(this,{type:c,target:i(t),index:0,kind:e})}),(function(){var t=l(this),e=t.target,n=t.kind,i=t.index++;return!e||i>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:i,done:!1}:"values"==n?{value:e[i],done:!1}:{value:[i,e[i]],done:!1}}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},5069:(t,e,n)=>{"use strict";var i=n(2109),r=n(3157),o=[].reverse,a=[1,2];i({target:"Array",proto:!0,forced:String(a)===String(a.reverse())},{reverse:function(){return r(this)&&(this.length=this.length),o.call(this)}})},2707:(t,e,n)=>{"use strict";var i=n(2109),r=n(3099),o=n(7908),a=n(7293),s=n(9341),c=[],u=c.sort,l=a((function(){c.sort(void 0)})),d=a((function(){c.sort(null)})),f=s("sort");i({target:"Array",proto:!0,forced:l||!d||!f},{sort:function(t){return void 0===t?u.call(o(this)):u.call(o(this),r(t))}})},4916:(t,e,n)=>{"use strict";var i=n(2109),r=n(2261);i({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},5306:(t,e,n)=>{"use strict";var i=n(7007),r=n(9670),o=n(7908),a=n(7466),s=n(9958),c=n(4488),u=n(1530),l=n(7651),d=Math.max,f=Math.min,p=Math.floor,g=/\$([$&'`]|\d\d?|<[^>]*>)/g,m=/\$([$&'`]|\d\d?)/g;i("replace",2,(function(t,e,n,i){var h=i.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,v=i.REPLACE_KEEPS_$0,y=h?"$":"$0";return[function(n,i){var r=c(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,r,i):e.call(String(r),n,i)},function(t,i){if(!h&&v||"string"==typeof i&&-1===i.indexOf(y)){var o=n(e,t,this,i);if(o.done)return o.value}var c=r(t),p=String(this),g="function"==typeof i;g||(i=String(i));var m=c.global;if(m){var w=c.unicode;c.lastIndex=0}for(var b=[];;){var x=l(c,p);if(null===x)break;if(b.push(x),!m)break;""===String(x[0])&&(c.lastIndex=u(p,a(c.lastIndex),w))}for(var T,I="",O=0,k=0;k<b.length;k++){x=b[k];for(var S=String(x[0]),E=d(f(s(x.index),p.length),0),P=[],L=1;L<x.length;L++)P.push(void 0===(T=x[L])?T:String(T));var C=x.groups;if(g){var N=[S].concat(P,E,p);void 0!==C&&N.push(C);var R=String(i.apply(void 0,N))}else R=_(S,p,E,P,C,i);E>=O&&(I+=p.slice(O,E)+R,O=E+S.length)}return I+p.slice(O)}];function _(t,n,i,r,a,s){var c=i+t.length,u=r.length,l=m;return void 0!==a&&(a=o(a),l=g),e.call(s,l,(function(e,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,i);case"'":return n.slice(c);case"<":s=a[o.slice(1,-1)];break;default:var l=+o;if(0===l)return e;if(l>u){var d=p(l/10);return 0===d?e:d<=u?void 0===r[d-1]?o.charAt(1):r[d-1]+o.charAt(1):e}s=r[l-1]}return void 0===s?"":s}))}}))},3210:(t,e,n)=>{"use strict";var i=n(2109),r=n(3111).trim;i({target:"String",proto:!0,forced:n(6091)("trim")},{trim:function(){return r(this)}})},1817:(t,e,n)=>{"use strict";var i=n(2109),r=n(9781),o=n(7854),a=n(6656),s=n(111),c=n(3070).f,u=n(9920),l=o.Symbol;if(r&&"function"==typeof l&&(!("description"in l.prototype)||void 0!==l().description)){var d={},f=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof f?new l(t):void 0===t?l():l(t);return""===t&&(d[e]=!0),e};u(f,l);var p=f.prototype=l.prototype;p.constructor=f;var g=p.toString,m="Symbol(test)"==String(l("test")),h=/^Symbol\((.*)\)[^)]+$/;c(p,"description",{configurable:!0,get:function(){var t=s(this)?this.valueOf():this,e=g.call(t);if(a(d,t))return"";var n=m?e.slice(7,-1):e.replace(h,"$1");return""===n?void 0:n}}),i({global:!0,forced:!0},{Symbol:f})}},72:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(4092);i({target:"Map",proto:!0,real:!0,forced:r},{deleteAll:function(){return o.apply(this,arguments)}})},9137:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(9670),a=n(9974),s=n(4647),c=n(408);i({target:"Map",proto:!0,real:!0,forced:r},{every:function(t){var e=o(this),n=s(e),i=a(t,arguments.length>1?arguments[1]:void 0,3);return!c(n,(function(t,n){if(!i(n,t,e))return c.stop()}),void 0,!0,!0).stopped}})},1957:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(5005),a=n(9670),s=n(3099),c=n(9974),u=n(6707),l=n(4647),d=n(408);i({target:"Map",proto:!0,real:!0,forced:r},{filter:function(t){var e=a(this),n=l(e),i=c(t,arguments.length>1?arguments[1]:void 0,3),r=new(u(e,o("Map"))),f=s(r.set);return d(n,(function(t,n){i(n,t,e)&&f.call(r,t,n)}),void 0,!0,!0),r}})},103:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(9670),a=n(9974),s=n(4647),c=n(408);i({target:"Map",proto:!0,real:!0,forced:r},{findKey:function(t){var e=o(this),n=s(e),i=a(t,arguments.length>1?arguments[1]:void 0,3);return c(n,(function(t,n){if(i(n,t,e))return c.stop(t)}),void 0,!0,!0).result}})},6306:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(9670),a=n(9974),s=n(4647),c=n(408);i({target:"Map",proto:!0,real:!0,forced:r},{find:function(t){var e=o(this),n=s(e),i=a(t,arguments.length>1?arguments[1]:void 0,3);return c(n,(function(t,n){if(i(n,t,e))return c.stop(n)}),void 0,!0,!0).result}})},4592:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(9670),a=n(4647),s=n(6465),c=n(408);i({target:"Map",proto:!0,real:!0,forced:r},{includes:function(t){return c(a(o(this)),(function(e,n){if(s(n,t))return c.stop()}),void 0,!0,!0).stopped}})},8276:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(9670),a=n(4647),s=n(408);i({target:"Map",proto:!0,real:!0,forced:r},{keyOf:function(t){return s(a(o(this)),(function(e,n){if(n===t)return s.stop(e)}),void 0,!0,!0).result}})},5082:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(5005),a=n(9670),s=n(3099),c=n(9974),u=n(6707),l=n(4647),d=n(408);i({target:"Map",proto:!0,real:!0,forced:r},{mapKeys:function(t){var e=a(this),n=l(e),i=c(t,arguments.length>1?arguments[1]:void 0,3),r=new(u(e,o("Map"))),f=s(r.set);return d(n,(function(t,n){f.call(r,i(n,t,e),n)}),void 0,!0,!0),r}})},2813:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(5005),a=n(9670),s=n(3099),c=n(9974),u=n(6707),l=n(4647),d=n(408);i({target:"Map",proto:!0,real:!0,forced:r},{mapValues:function(t){var e=a(this),n=l(e),i=c(t,arguments.length>1?arguments[1]:void 0,3),r=new(u(e,o("Map"))),f=s(r.set);return d(n,(function(t,n){f.call(r,t,i(n,t,e))}),void 0,!0,!0),r}})},8222:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(9670),a=n(3099),s=n(408);i({target:"Map",proto:!0,real:!0,forced:r},{merge:function(t){for(var e=o(this),n=a(e.set),i=0;i<arguments.length;)s(arguments[i++],n,e,!0);return e}})},8563:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(9670),a=n(3099),s=n(4647),c=n(408);i({target:"Map",proto:!0,real:!0,forced:r},{reduce:function(t){var e=o(this),n=s(e),i=arguments.length<2,r=i?void 0:arguments[1];if(a(t),c(n,(function(n,o){i?(i=!1,r=o):r=t(r,o,n,e)}),void 0,!0,!0),i)throw TypeError("Reduce of empty map with no initial value");return r}})},336:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(9670),a=n(9974),s=n(4647),c=n(408);i({target:"Map",proto:!0,real:!0,forced:r},{some:function(t){var e=o(this),n=s(e),i=a(t,arguments.length>1?arguments[1]:void 0,3);return c(n,(function(t,n){if(i(n,t,e))return c.stop()}),void 0,!0,!0).stopped}})},7512:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(9670),a=n(3099);i({target:"Map",proto:!0,real:!0,forced:r},{update:function(t,e){var n=o(this),i=arguments.length;a(e);var r=n.has(t);if(!r&&i<3)throw TypeError("Updating absent value");var s=r?n.get(t):a(i>2?arguments[2]:void 0)(t,n);return n.set(t,e(s,t,n)),n}})},8921:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(1501);i({target:"Set",proto:!0,real:!0,forced:r},{addAll:function(){return o.apply(this,arguments)}})},6248:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(4092);i({target:"Set",proto:!0,real:!0,forced:r},{deleteAll:function(){return o.apply(this,arguments)}})},3599:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(5005),a=n(9670),s=n(3099),c=n(6707),u=n(408);i({target:"Set",proto:!0,real:!0,forced:r},{difference:function(t){var e=a(this),n=new(c(e,o("Set")))(e),i=s(n.delete);return u(t,(function(t){i.call(n,t)})),n}})},1477:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(9670),a=n(9974),s=n(6767),c=n(408);i({target:"Set",proto:!0,real:!0,forced:r},{every:function(t){var e=o(this),n=s(e),i=a(t,arguments.length>1?arguments[1]:void 0,3);return!c(n,(function(t){if(!i(t,t,e))return c.stop()}),void 0,!1,!0).stopped}})},4362:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(5005),a=n(9670),s=n(3099),c=n(9974),u=n(6707),l=n(6767),d=n(408);i({target:"Set",proto:!0,real:!0,forced:r},{filter:function(t){var e=a(this),n=l(e),i=c(t,arguments.length>1?arguments[1]:void 0,3),r=new(u(e,o("Set"))),f=s(r.add);return d(n,(function(t){i(t,t,e)&&f.call(r,t)}),void 0,!1,!0),r}})},5389:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(9670),a=n(9974),s=n(6767),c=n(408);i({target:"Set",proto:!0,real:!0,forced:r},{find:function(t){var e=o(this),n=s(e),i=a(t,arguments.length>1?arguments[1]:void 0,3);return c(n,(function(t){if(i(t,t,e))return c.stop(t)}),void 0,!1,!0).result}})},401:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(5005),a=n(9670),s=n(3099),c=n(6707),u=n(408);i({target:"Set",proto:!0,real:!0,forced:r},{intersection:function(t){var e=a(this),n=new(c(e,o("Set"))),i=s(e.has),r=s(n.add);return u(t,(function(t){i.call(e,t)&&r.call(n,t)})),n}})},5164:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(9670),a=n(3099),s=n(408);i({target:"Set",proto:!0,real:!0,forced:r},{isDisjointFrom:function(t){var e=o(this),n=a(e.has);return!s(t,(function(t){if(!0===n.call(e,t))return s.stop()})).stopped}})},1238:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(5005),a=n(9670),s=n(3099),c=n(8554),u=n(408);i({target:"Set",proto:!0,real:!0,forced:r},{isSubsetOf:function(t){var e=c(this),n=a(t),i=n.has;return"function"!=typeof i&&(n=new(o("Set"))(t),i=s(n.has)),!u(e,(function(t){if(!1===i.call(n,t))return u.stop()}),void 0,!1,!0).stopped}})},4837:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(9670),a=n(3099),s=n(408);i({target:"Set",proto:!0,real:!0,forced:r},{isSupersetOf:function(t){var e=o(this),n=a(e.has);return!s(t,(function(t){if(!1===n.call(e,t))return s.stop()})).stopped}})},7485:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(9670),a=n(6767),s=n(408);i({target:"Set",proto:!0,real:!0,forced:r},{join:function(t){var e=o(this),n=a(e),i=void 0===t?",":String(t),r=[];return s(n,r.push,r,!1,!0),r.join(i)}})},465:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(5005),a=n(9670),s=n(3099),c=n(9974),u=n(6707),l=n(6767),d=n(408);i({target:"Set",proto:!0,real:!0,forced:r},{map:function(t){var e=a(this),n=l(e),i=c(t,arguments.length>1?arguments[1]:void 0,3),r=new(u(e,o("Set"))),f=s(r.add);return d(n,(function(t){f.call(r,i(t,t,e))}),void 0,!1,!0),r}})},6651:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(9670),a=n(3099),s=n(6767),c=n(408);i({target:"Set",proto:!0,real:!0,forced:r},{reduce:function(t){var e=o(this),n=s(e),i=arguments.length<2,r=i?void 0:arguments[1];if(a(t),c(n,(function(n){i?(i=!1,r=n):r=t(r,n,n,e)}),void 0,!1,!0),i)throw TypeError("Reduce of empty set with no initial value");return r}})},1437:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(9670),a=n(9974),s=n(6767),c=n(408);i({target:"Set",proto:!0,real:!0,forced:r},{some:function(t){var e=o(this),n=s(e),i=a(t,arguments.length>1?arguments[1]:void 0,3);return c(n,(function(t){if(i(t,t,e))return c.stop()}),void 0,!1,!0).stopped}})},5285:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(5005),a=n(9670),s=n(3099),c=n(6707),u=n(408);i({target:"Set",proto:!0,real:!0,forced:r},{symmetricDifference:function(t){var e=a(this),n=new(c(e,o("Set")))(e),i=s(n.delete),r=s(n.add);return u(t,(function(t){i.call(n,t)||r.call(n,t)})),n}})},9865:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(5005),a=n(9670),s=n(3099),c=n(6707),u=n(408);i({target:"Set",proto:!0,real:!0,forced:r},{union:function(t){var e=a(this),n=new(c(e,o("Set")))(e);return u(t,s(n.add),n),n}})},8206:(t,e,n)=>{"use strict";var i=n(2109),r=n(1913),o=n(4092);i({target:"WeakMap",proto:!0,real:!0,forced:r},{deleteAll:function(){return o.apply(this,arguments)}})},3948:(t,e,n)=>{var i=n(7854),r=n(8324),o=n(6992),a=n(8880),s=n(5112),c=s("iterator"),u=s("toStringTag"),l=o.values;for(var d in r){var f=i[d],p=f&&f.prototype;if(p){if(p[c]!==l)try{a(p,c,l)}catch(t){p[c]=l}if(p[u]||a(p,u,d),r[d])for(var g in o)if(p[g]!==o[g])try{a(p,g,o[g])}catch(t){p[g]=o[g]}}}},9575:function(t,e,n){"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g&&n.g,t.exports=function(){"use strict";var t,e="3.7.2",n="function"==typeof atob,i="function"==typeof btoa,r="function"==typeof Buffer,o="function"==typeof TextDecoder?new TextDecoder:void 0,a="function"==typeof TextEncoder?new TextEncoder:void 0,s=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),c=(t={},s.forEach((function(e,n){return t[e]=n})),t),u=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,l=String.fromCharCode.bind(String),d="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(t,e){return void 0===e&&(e=function(t){return t}),new Uint8Array(Array.prototype.slice.call(t,0).map(e))},f=function(t){return t.replace(/=/g,"").replace(/[+\/]/g,(function(t){return"+"==t?"-":"_"}))},p=function(t){return t.replace(/[^A-Za-z0-9\+\/]/g,"")},g=function(t){for(var e,n,i,r,o="",a=t.length%3,c=0;c<t.length;){if((n=t.charCodeAt(c++))>255||(i=t.charCodeAt(c++))>255||(r=t.charCodeAt(c++))>255)throw new TypeError("invalid character found");o+=s[(e=n<<16|i<<8|r)>>18&63]+s[e>>12&63]+s[e>>6&63]+s[63&e]}return a?o.slice(0,a-3)+"===".substring(a):o},m=i?function(t){return btoa(t)}:r?function(t){return Buffer.from(t,"binary").toString("base64")}:g,h=r?function(t){return Buffer.from(t).toString("base64")}:function(t){for(var e=[],n=0,i=t.length;n<i;n+=4096)e.push(l.apply(null,t.subarray(n,n+4096)));return m(e.join(""))},v=function(t,e){return void 0===e&&(e=!1),e?f(h(t)):h(t)},y=function(t){if(t.length<2)return(e=t.charCodeAt(0))<128?t:e<2048?l(192|e>>>6)+l(128|63&e):l(224|e>>>12&15)+l(128|e>>>6&63)+l(128|63&e);var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return l(240|e>>>18&7)+l(128|e>>>12&63)+l(128|e>>>6&63)+l(128|63&e)},_=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,w=function(t){return t.replace(_,y)},b=r?function(t){return Buffer.from(t,"utf8").toString("base64")}:a?function(t){return h(a.encode(t))}:function(t){return m(w(t))},x=function(t,e){return void 0===e&&(e=!1),e?f(b(t)):b(t)},T=function(t){return x(t,!0)},I=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,O=function(t){switch(t.length){case 4:var e=((7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3))-65536;return l(55296+(e>>>10))+l(56320+(1023&e));case 3:return l((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return l((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},k=function(t){return t.replace(I,O)},S=function(t){if(t=t.replace(/\s+/g,""),!u.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(3&t.length));for(var e,n,i,r="",o=0;o<t.length;)e=c[t.charAt(o++)]<<18|c[t.charAt(o++)]<<12|(n=c[t.charAt(o++)])<<6|(i=c[t.charAt(o++)]),r+=64===n?l(e>>16&255):64===i?l(e>>16&255,e>>8&255):l(e>>16&255,e>>8&255,255&e);return r},E=n?function(t){return atob(p(t))}:r?function(t){return Buffer.from(t,"base64").toString("binary")}:S,P=r?function(t){return d(Buffer.from(t,"base64"))}:function(t){return d(E(t),(function(t){return t.charCodeAt(0)}))},L=function(t){return P(N(t))},C=r?function(t){return Buffer.from(t,"base64").toString("utf8")}:o?function(t){return o.decode(P(t))}:function(t){return k(E(t))},N=function(t){return p(t.replace(/[-_]/g,(function(t){return"-"==t?"+":"/"})))},R=function(t){return C(N(t))},U=function(t){return{value:t,enumerable:!1,writable:!0,configurable:!0}},A=function(){var t=function(t,e){return Object.defineProperty(String.prototype,t,U(e))};t("fromBase64",(function(){return R(this)})),t("toBase64",(function(t){return x(this,t)})),t("toBase64URI",(function(){return x(this,!0)})),t("toBase64URL",(function(){return x(this,!0)})),t("toUint8Array",(function(){return L(this)}))},M=function(){var t=function(t,e){return Object.defineProperty(Uint8Array.prototype,t,U(e))};t("toBase64",(function(t){return v(this,t)})),t("toBase64URI",(function(){return v(this,!0)})),t("toBase64URL",(function(){return v(this,!0)}))},D={version:e,VERSION:"3.7.2",atob:E,atobPolyfill:S,btoa:m,btoaPolyfill:g,fromBase64:R,toBase64:x,encode:x,encodeURI:T,encodeURL:T,utob:w,btou:k,decode:R,isValid:function(t){if("string"!=typeof t)return!1;var e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},fromUint8Array:v,toUint8Array:L,extendString:A,extendUint8Array:M,extendBuiltins:function(){A(),M()},Base64:{}};return Object.keys(D).forEach((function(t){return D.Base64[t]=D[t]})),D}()},9591:(t,e,n)=>{"use strict";var i={};(0,n(4236).assign)(i,n(4555),n(8843),n(1619)),t.exports=i},4555:(t,e,n)=>{"use strict";var i=n(405),r=n(4236),o=n(9373),a=n(8898),s=n(2292),c=Object.prototype.toString;function u(t){if(!(this instanceof u))return new u(t);this.options=r.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var n=i.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(0!==n)throw new Error(a[n]);if(e.header&&i.deflateSetHeader(this.strm,e.header),e.dictionary){var l;if(l="string"==typeof e.dictionary?o.string2buf(e.dictionary):"[object ArrayBuffer]"===c.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(n=i.deflateSetDictionary(this.strm,l)))throw new Error(a[n]);this._dict_set=!0}}function l(t,e){var n=new u(e);if(n.push(t,!0),n.err)throw n.msg||a[n.err];return n.result}u.prototype.push=function(t,e){var n,a,s=this.strm,u=this.options.chunkSize;if(this.ended)return!1;a=e===~~e?e:!0===e?4:0,"string"==typeof t?s.input=o.string2buf(t):"[object ArrayBuffer]"===c.call(t)?s.input=new Uint8Array(t):s.input=t,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new r.Buf8(u),s.next_out=0,s.avail_out=u),1!==(n=i.deflate(s,a))&&0!==n)return this.onEnd(n),this.ended=!0,!1;0!==s.avail_out&&(0!==s.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(o.buf2binstring(r.shrinkBuf(s.output,s.next_out))):this.onData(r.shrinkBuf(s.output,s.next_out)))}while((s.avail_in>0||0===s.avail_out)&&1!==n);return 4===a?(n=i.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,0===n):2!==a||(this.onEnd(0),s.avail_out=0,!0)},u.prototype.onData=function(t){this.chunks.push(t)},u.prototype.onEnd=function(t){0===t&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Deflate=u,e.deflate=l,e.deflateRaw=function(t,e){return(e=e||{}).raw=!0,l(t,e)},e.gzip=function(t,e){return(e=e||{}).gzip=!0,l(t,e)}},8843:(t,e,n)=>{"use strict";var i=n(7948),r=n(4236),o=n(9373),a=n(1619),s=n(8898),c=n(2292),u=n(2401),l=Object.prototype.toString;function d(t){if(!(this instanceof d))return new d(t);this.options=r.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var n=i.inflateInit2(this.strm,e.windowBits);if(n!==a.Z_OK)throw new Error(s[n]);this.header=new u,i.inflateGetHeader(this.strm,this.header)}function f(t,e){var n=new d(e);if(n.push(t,!0),n.err)throw n.msg||s[n.err];return n.result}d.prototype.push=function(t,e){var n,s,c,u,d,f,p=this.strm,g=this.options.chunkSize,m=this.options.dictionary,h=!1;if(this.ended)return!1;s=e===~~e?e:!0===e?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof t?p.input=o.binstring2buf(t):"[object ArrayBuffer]"===l.call(t)?p.input=new Uint8Array(t):p.input=t,p.next_in=0,p.avail_in=p.input.length;do{if(0===p.avail_out&&(p.output=new r.Buf8(g),p.next_out=0,p.avail_out=g),(n=i.inflate(p,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&m&&(f="string"==typeof m?o.string2buf(m):"[object ArrayBuffer]"===l.call(m)?new Uint8Array(m):m,n=i.inflateSetDictionary(this.strm,f)),n===a.Z_BUF_ERROR&&!0===h&&(n=a.Z_OK,h=!1),n!==a.Z_STREAM_END&&n!==a.Z_OK)return this.onEnd(n),this.ended=!0,!1;p.next_out&&(0!==p.avail_out&&n!==a.Z_STREAM_END&&(0!==p.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(c=o.utf8border(p.output,p.next_out),u=p.next_out-c,d=o.buf2string(p.output,c),p.next_out=u,p.avail_out=g-u,u&&r.arraySet(p.output,p.output,c,u,0),this.onData(d)):this.onData(r.shrinkBuf(p.output,p.next_out)))),0===p.avail_in&&0===p.avail_out&&(h=!0)}while((p.avail_in>0||0===p.avail_out)&&n!==a.Z_STREAM_END);return n===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(n=i.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),p.avail_out=0,!0)},d.prototype.onData=function(t){this.chunks.push(t)},d.prototype.onEnd=function(t){t===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Inflate=d,e.inflate=f,e.inflateRaw=function(t,e){return(e=e||{}).raw=!0,f(t,e)},e.ungzip=f},4236:(t,e)=>{"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var n=e.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var r in n)i(n,r)&&(t[r]=n[r])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var r={arraySet:function(t,e,n,i,r){if(e.subarray&&t.subarray)t.set(e.subarray(n,n+i),r);else for(var o=0;o<i;o++)t[r+o]=e[n+o]},flattenChunks:function(t){var e,n,i,r,o,a;for(i=0,e=0,n=t.length;e<n;e++)i+=t[e].length;for(a=new Uint8Array(i),r=0,e=0,n=t.length;e<n;e++)o=t[e],a.set(o,r),r+=o.length;return a}},o={arraySet:function(t,e,n,i,r){for(var o=0;o<i;o++)t[r+o]=e[n+o]},flattenChunks:function(t){return[].concat.apply([],t)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,r)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,o))},e.setTyped(n)},9373:(t,e,n)=>{"use strict";var i=n(4236),r=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(t){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){o=!1}for(var a=new i.Buf8(256),s=0;s<256;s++)a[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function c(t,e){if(e<65537&&(t.subarray&&o||!t.subarray&&r))return String.fromCharCode.apply(null,i.shrinkBuf(t,e));for(var n="",a=0;a<e;a++)n+=String.fromCharCode(t[a]);return n}a[254]=a[254]=1,e.string2buf=function(t){var e,n,r,o,a,s=t.length,c=0;for(o=0;o<s;o++)55296==(64512&(n=t.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=t.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),c+=n<128?1:n<2048?2:n<65536?3:4;for(e=new i.Buf8(c),a=0,o=0;a<c;o++)55296==(64512&(n=t.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=t.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),n<128?e[a++]=n:n<2048?(e[a++]=192|n>>>6,e[a++]=128|63&n):n<65536?(e[a++]=224|n>>>12,e[a++]=128|n>>>6&63,e[a++]=128|63&n):(e[a++]=240|n>>>18,e[a++]=128|n>>>12&63,e[a++]=128|n>>>6&63,e[a++]=128|63&n);return e},e.buf2binstring=function(t){return c(t,t.length)},e.binstring2buf=function(t){for(var e=new i.Buf8(t.length),n=0,r=e.length;n<r;n++)e[n]=t.charCodeAt(n);return e},e.buf2string=function(t,e){var n,i,r,o,s=e||t.length,u=new Array(2*s);for(i=0,n=0;n<s;)if((r=t[n++])<128)u[i++]=r;else if((o=a[r])>4)u[i++]=65533,n+=o-1;else{for(r&=2===o?31:3===o?15:7;o>1&&n<s;)r=r<<6|63&t[n++],o--;o>1?u[i++]=65533:r<65536?u[i++]=r:(r-=65536,u[i++]=55296|r>>10&1023,u[i++]=56320|1023&r)}return c(u,i)},e.utf8border=function(t,e){var n;for((e=e||t.length)>t.length&&(e=t.length),n=e-1;n>=0&&128==(192&t[n]);)n--;return n<0||0===n?e:n+a[t[n]]>e?n:e}},6069:t=>{"use strict";t.exports=function(t,e,n,i){for(var r=65535&t|0,o=t>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{o=o+(r=r+e[i++]|0)|0}while(--a);r%=65521,o%=65521}return r|o<<16|0}},1619:t=>{"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},2869:t=>{"use strict";var e=function(){for(var t,e=[],n=0;n<256;n++){t=n;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[n]=t}return e}();t.exports=function(t,n,i,r){var o=e,a=r+i;t^=-1;for(var s=r;s<a;s++)t=t>>>8^o[255&(t^n[s])];return-1^t}},405:(t,e,n)=>{"use strict";var i,r=n(4236),o=n(342),a=n(6069),s=n(2869),c=n(8898),u=-2,l=258,d=262,f=103,p=113,g=666;function m(t,e){return t.msg=c[e],e}function h(t){return(t<<1)-(t>4?9:0)}function v(t){for(var e=t.length;--e>=0;)t[e]=0}function y(t){var e=t.state,n=e.pending;n>t.avail_out&&(n=t.avail_out),0!==n&&(r.arraySet(t.output,e.pending_buf,e.pending_out,n,t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,0===e.pending&&(e.pending_out=0))}function _(t,e){o._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,y(t.strm)}function w(t,e){t.pending_buf[t.pending++]=e}function b(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function x(t,e){var n,i,r=t.max_chain_length,o=t.strstart,a=t.prev_length,s=t.nice_match,c=t.strstart>t.w_size-d?t.strstart-(t.w_size-d):0,u=t.window,f=t.w_mask,p=t.prev,g=t.strstart+l,m=u[o+a-1],h=u[o+a];t.prev_length>=t.good_match&&(r>>=2),s>t.lookahead&&(s=t.lookahead);do{if(u[(n=e)+a]===h&&u[n+a-1]===m&&u[n]===u[o]&&u[++n]===u[o+1]){o+=2,n++;do{}while(u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&o<g);if(i=l-(g-o),o=g-l,i>a){if(t.match_start=e,a=i,i>=s)break;m=u[o+a-1],h=u[o+a]}}}while((e=p[e&f])>c&&0!=--r);return a<=t.lookahead?a:t.lookahead}function T(t){var e,n,i,o,c,u,l,f,p,g,m=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=m+(m-d)){r.arraySet(t.window,t.window,m,m,0),t.match_start-=m,t.strstart-=m,t.block_start-=m,e=n=t.hash_size;do{i=t.head[--e],t.head[e]=i>=m?i-m:0}while(--n);e=n=m;do{i=t.prev[--e],t.prev[e]=i>=m?i-m:0}while(--n);o+=m}if(0===t.strm.avail_in)break;if(u=t.strm,l=t.window,f=t.strstart+t.lookahead,p=o,g=void 0,(g=u.avail_in)>p&&(g=p),n=0===g?0:(u.avail_in-=g,r.arraySet(l,u.input,u.next_in,g,f),1===u.state.wrap?u.adler=a(u.adler,l,g,f):2===u.state.wrap&&(u.adler=s(u.adler,l,g,f)),u.next_in+=g,u.total_in+=g,g),t.lookahead+=n,t.lookahead+t.insert>=3)for(c=t.strstart-t.insert,t.ins_h=t.window[c],t.ins_h=(t.ins_h<<t.hash_shift^t.window[c+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[c+3-1])&t.hash_mask,t.prev[c&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=c,c++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<d&&0!==t.strm.avail_in)}function I(t,e){for(var n,i;;){if(t.lookahead<d){if(T(t),t.lookahead<d&&0===e)return 1;if(0===t.lookahead)break}if(n=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==n&&t.strstart-n<=t.w_size-d&&(t.match_length=x(t,n)),t.match_length>=3)if(i=o._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else i=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(_(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(_(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(_(t,!1),0===t.strm.avail_out)?1:2}function O(t,e){for(var n,i,r;;){if(t.lookahead<d){if(T(t),t.lookahead<d&&0===e)return 1;if(0===t.lookahead)break}if(n=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==n&&t.prev_length<t.max_lazy_match&&t.strstart-n<=t.w_size-d&&(t.match_length=x(t,n),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,i=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,i&&(_(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((i=o._tr_tally(t,0,t.window[t.strstart-1]))&&_(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=o._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(_(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(_(t,!1),0===t.strm.avail_out)?1:2}function k(t,e,n,i,r){this.good_length=t,this.max_lazy=e,this.nice_length=n,this.max_chain=i,this.func=r}function S(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new r.Buf16(1146),this.dyn_dtree=new r.Buf16(122),this.bl_tree=new r.Buf16(78),v(this.dyn_ltree),v(this.dyn_dtree),v(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new r.Buf16(16),this.heap=new r.Buf16(573),v(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new r.Buf16(573),v(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function E(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:p,t.adler=2===e.wrap?0:1,e.last_flush=0,o._tr_init(e),0):m(t,u)}function P(t){var e,n=E(t);return 0===n&&((e=t.state).window_size=2*e.w_size,v(e.head),e.max_lazy_match=i[e.level].max_lazy,e.good_match=i[e.level].good_length,e.nice_match=i[e.level].nice_length,e.max_chain_length=i[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),n}function L(t,e,n,i,o,a){if(!t)return u;var s=1;if(-1===e&&(e=6),i<0?(s=0,i=-i):i>15&&(s=2,i-=16),o<1||o>9||8!==n||i<8||i>15||e<0||e>9||a<0||a>4)return m(t,u);8===i&&(i=9);var c=new S;return t.state=c,c.strm=t,c.wrap=s,c.gzhead=null,c.w_bits=i,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.hash_bits=o+7,c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+3-1)/3),c.window=new r.Buf8(2*c.w_size),c.head=new r.Buf16(c.hash_size),c.prev=new r.Buf16(c.w_size),c.lit_bufsize=1<<o+6,c.pending_buf_size=4*c.lit_bufsize,c.pending_buf=new r.Buf8(c.pending_buf_size),c.d_buf=1*c.lit_bufsize,c.l_buf=3*c.lit_bufsize,c.level=e,c.strategy=a,c.method=n,P(t)}i=[new k(0,0,0,0,(function(t,e){var n=65535;for(n>t.pending_buf_size-5&&(n=t.pending_buf_size-5);;){if(t.lookahead<=1){if(T(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+n;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,_(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-d&&(_(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(_(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(_(t,!1),t.strm.avail_out),1)})),new k(4,4,8,4,I),new k(4,5,16,8,I),new k(4,6,32,32,I),new k(4,4,16,16,O),new k(8,16,32,32,O),new k(8,16,128,128,O),new k(8,32,128,256,O),new k(32,128,258,1024,O),new k(32,258,258,4096,O)],e.deflateInit=function(t,e){return L(t,e,8,15,8,0)},e.deflateInit2=L,e.deflateReset=P,e.deflateResetKeep=E,e.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?u:(t.state.gzhead=e,0):u},e.deflate=function(t,e){var n,r,a,c;if(!t||!t.state||e>5||e<0)return t?m(t,u):u;if(r=t.state,!t.output||!t.input&&0!==t.avail_in||r.status===g&&4!==e)return m(t,0===t.avail_out?-5:u);if(r.strm=t,n=r.last_flush,r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,w(r,31),w(r,139),w(r,8),r.gzhead?(w(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),w(r,255&r.gzhead.time),w(r,r.gzhead.time>>8&255),w(r,r.gzhead.time>>16&255),w(r,r.gzhead.time>>24&255),w(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),w(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(w(r,255&r.gzhead.extra.length),w(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=s(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(w(r,0),w(r,0),w(r,0),w(r,0),w(r,0),w(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),w(r,3),r.status=p);else{var d=8+(r.w_bits-8<<4)<<8;d|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(d|=32),d+=31-d%31,r.status=p,b(r,d),0!==r.strstart&&(b(r,t.adler>>>16),b(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=s(t.adler,r.pending_buf,r.pending-a,a)),y(t),a=r.pending,r.pending!==r.pending_buf_size));)w(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=s(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=s(t.adler,r.pending_buf,r.pending-a,a)),y(t),a=r.pending,r.pending===r.pending_buf_size)){c=1;break}c=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,w(r,c)}while(0!==c);r.gzhead.hcrc&&r.pending>a&&(t.adler=s(t.adler,r.pending_buf,r.pending-a,a)),0===c&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=s(t.adler,r.pending_buf,r.pending-a,a)),y(t),a=r.pending,r.pending===r.pending_buf_size)){c=1;break}c=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,w(r,c)}while(0!==c);r.gzhead.hcrc&&r.pending>a&&(t.adler=s(t.adler,r.pending_buf,r.pending-a,a)),0===c&&(r.status=f)}else r.status=f;if(r.status===f&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&y(t),r.pending+2<=r.pending_buf_size&&(w(r,255&t.adler),w(r,t.adler>>8&255),t.adler=0,r.status=p)):r.status=p),0!==r.pending){if(y(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&h(e)<=h(n)&&4!==e)return m(t,-5);if(r.status===g&&0!==t.avail_in)return m(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&r.status!==g){var x=2===r.strategy?function(t,e){for(var n;;){if(0===t.lookahead&&(T(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(_(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(_(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(_(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var n,i,r,a,s=t.window;;){if(t.lookahead<=l){if(T(t),t.lookahead<=l&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(i=s[r=t.strstart-1])===s[++r]&&i===s[++r]&&i===s[++r]){a=t.strstart+l;do{}while(i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&r<a);t.match_length=l-(a-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(n=o._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(_(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(_(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(_(t,!1),0===t.strm.avail_out)?1:2}(r,e):i[r.level].func(r,e);if(3!==x&&4!==x||(r.status=g),1===x||3===x)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===x&&(1===e?o._tr_align(r):5!==e&&(o._tr_stored_block(r,0,0,!1),3===e&&(v(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),y(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(w(r,255&t.adler),w(r,t.adler>>8&255),w(r,t.adler>>16&255),w(r,t.adler>>24&255),w(r,255&t.total_in),w(r,t.total_in>>8&255),w(r,t.total_in>>16&255),w(r,t.total_in>>24&255)):(b(r,t.adler>>>16),b(r,65535&t.adler)),y(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},e.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&e!==f&&e!==p&&e!==g?m(t,u):(t.state=null,e===p?m(t,-3):0):u},e.deflateSetDictionary=function(t,e){var n,i,o,s,c,l,d,f,p=e.length;if(!t||!t.state)return u;if(2===(s=(n=t.state).wrap)||1===s&&42!==n.status||n.lookahead)return u;for(1===s&&(t.adler=a(t.adler,e,p,0)),n.wrap=0,p>=n.w_size&&(0===s&&(v(n.head),n.strstart=0,n.block_start=0,n.insert=0),f=new r.Buf8(n.w_size),r.arraySet(f,e,p-n.w_size,n.w_size,0),e=f,p=n.w_size),c=t.avail_in,l=t.next_in,d=t.input,t.avail_in=p,t.next_in=0,t.input=e,T(n);n.lookahead>=3;){i=n.strstart,o=n.lookahead-2;do{n.ins_h=(n.ins_h<<n.hash_shift^n.window[i+3-1])&n.hash_mask,n.prev[i&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=i,i++}while(--o);n.strstart=i,n.lookahead=2,T(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=l,t.input=d,t.avail_in=c,n.wrap=s,0},e.deflateInfo="pako deflate (from Nodeca project)"},2401:t=>{"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},4264:t=>{"use strict";t.exports=function(t,e){var n,i,r,o,a,s,c,u,l,d,f,p,g,m,h,v,y,_,w,b,x,T,I,O,k;n=t.state,i=t.next_in,O=t.input,r=i+(t.avail_in-5),o=t.next_out,k=t.output,a=o-(e-t.avail_out),s=o+(t.avail_out-257),c=n.dmax,u=n.wsize,l=n.whave,d=n.wnext,f=n.window,p=n.hold,g=n.bits,m=n.lencode,h=n.distcode,v=(1<<n.lenbits)-1,y=(1<<n.distbits)-1;t:do{g<15&&(p+=O[i++]<<g,g+=8,p+=O[i++]<<g,g+=8),_=m[p&v];e:for(;;){if(p>>>=w=_>>>24,g-=w,0==(w=_>>>16&255))k[o++]=65535&_;else{if(!(16&w)){if(0==(64&w)){_=m[(65535&_)+(p&(1<<w)-1)];continue e}if(32&w){n.mode=12;break t}t.msg="invalid literal/length code",n.mode=30;break t}b=65535&_,(w&=15)&&(g<w&&(p+=O[i++]<<g,g+=8),b+=p&(1<<w)-1,p>>>=w,g-=w),g<15&&(p+=O[i++]<<g,g+=8,p+=O[i++]<<g,g+=8),_=h[p&y];n:for(;;){if(p>>>=w=_>>>24,g-=w,!(16&(w=_>>>16&255))){if(0==(64&w)){_=h[(65535&_)+(p&(1<<w)-1)];continue n}t.msg="invalid distance code",n.mode=30;break t}if(x=65535&_,g<(w&=15)&&(p+=O[i++]<<g,(g+=8)<w&&(p+=O[i++]<<g,g+=8)),(x+=p&(1<<w)-1)>c){t.msg="invalid distance too far back",n.mode=30;break t}if(p>>>=w,g-=w,x>(w=o-a)){if((w=x-w)>l&&n.sane){t.msg="invalid distance too far back",n.mode=30;break t}if(T=0,I=f,0===d){if(T+=u-w,w<b){b-=w;do{k[o++]=f[T++]}while(--w);T=o-x,I=k}}else if(d<w){if(T+=u+d-w,(w-=d)<b){b-=w;do{k[o++]=f[T++]}while(--w);if(T=0,d<b){b-=w=d;do{k[o++]=f[T++]}while(--w);T=o-x,I=k}}}else if(T+=d-w,w<b){b-=w;do{k[o++]=f[T++]}while(--w);T=o-x,I=k}for(;b>2;)k[o++]=I[T++],k[o++]=I[T++],k[o++]=I[T++],b-=3;b&&(k[o++]=I[T++],b>1&&(k[o++]=I[T++]))}else{T=o-x;do{k[o++]=k[T++],k[o++]=k[T++],k[o++]=k[T++],b-=3}while(b>2);b&&(k[o++]=k[T++],b>1&&(k[o++]=k[T++]))}break}}break}}while(i<r&&o<s);i-=b=g>>3,p&=(1<<(g-=b<<3))-1,t.next_in=i,t.next_out=o,t.avail_in=i<r?r-i+5:5-(i-r),t.avail_out=o<s?s-o+257:257-(o-s),n.hold=p,n.bits=g}},7948:(t,e,n)=>{"use strict";var i=n(4236),r=n(6069),o=n(2869),a=n(4264),s=n(9241),c=-2,u=12,l=30;function d(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function f(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function p(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new i.Buf32(852),e.distcode=e.distdyn=new i.Buf32(592),e.sane=1,e.back=-1,0):c}function g(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,p(t)):c}function m(t,e){var n,i;return t&&t.state?(i=t.state,e<0?(n=0,e=-e):(n=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?c:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=n,i.wbits=e,g(t))):c}function h(t,e){var n,i;return t?(i=new f,t.state=i,i.window=null,0!==(n=m(t,e))&&(t.state=null),n):c}var v,y,_=!0;function w(t){if(_){var e;for(v=new i.Buf32(512),y=new i.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(s(1,t.lens,0,288,v,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;s(2,t.lens,0,32,y,0,t.work,{bits:5}),_=!1}t.lencode=v,t.lenbits=9,t.distcode=y,t.distbits=5}function b(t,e,n,r){var o,a=t.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new i.Buf8(a.wsize)),r>=a.wsize?(i.arraySet(a.window,e,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>r&&(o=r),i.arraySet(a.window,e,n-r,o,a.wnext),(r-=o)?(i.arraySet(a.window,e,n-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0}e.inflateReset=g,e.inflateReset2=m,e.inflateResetKeep=p,e.inflateInit=function(t){return h(t,15)},e.inflateInit2=h,e.inflate=function(t,e){var n,f,p,g,m,h,v,y,_,x,T,I,O,k,S,E,P,L,C,N,R,U,A,M,D=0,B=new i.Buf8(4),F=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return c;(n=t.state).mode===u&&(n.mode=13),m=t.next_out,p=t.output,v=t.avail_out,g=t.next_in,f=t.input,h=t.avail_in,y=n.hold,_=n.bits,x=h,T=v,U=0;t:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;_<16;){if(0===h)break t;h--,y+=f[g++]<<_,_+=8}if(2&n.wrap&&35615===y){n.check=0,B[0]=255&y,B[1]=y>>>8&255,n.check=o(n.check,B,2,0),y=0,_=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&y)<<8)+(y>>8))%31){t.msg="incorrect header check",n.mode=l;break}if(8!=(15&y)){t.msg="unknown compression method",n.mode=l;break}if(_-=4,R=8+(15&(y>>>=4)),0===n.wbits)n.wbits=R;else if(R>n.wbits){t.msg="invalid window size",n.mode=l;break}n.dmax=1<<R,t.adler=n.check=1,n.mode=512&y?10:u,y=0,_=0;break;case 2:for(;_<16;){if(0===h)break t;h--,y+=f[g++]<<_,_+=8}if(n.flags=y,8!=(255&n.flags)){t.msg="unknown compression method",n.mode=l;break}if(57344&n.flags){t.msg="unknown header flags set",n.mode=l;break}n.head&&(n.head.text=y>>8&1),512&n.flags&&(B[0]=255&y,B[1]=y>>>8&255,n.check=o(n.check,B,2,0)),y=0,_=0,n.mode=3;case 3:for(;_<32;){if(0===h)break t;h--,y+=f[g++]<<_,_+=8}n.head&&(n.head.time=y),512&n.flags&&(B[0]=255&y,B[1]=y>>>8&255,B[2]=y>>>16&255,B[3]=y>>>24&255,n.check=o(n.check,B,4,0)),y=0,_=0,n.mode=4;case 4:for(;_<16;){if(0===h)break t;h--,y+=f[g++]<<_,_+=8}n.head&&(n.head.xflags=255&y,n.head.os=y>>8),512&n.flags&&(B[0]=255&y,B[1]=y>>>8&255,n.check=o(n.check,B,2,0)),y=0,_=0,n.mode=5;case 5:if(1024&n.flags){for(;_<16;){if(0===h)break t;h--,y+=f[g++]<<_,_+=8}n.length=y,n.head&&(n.head.extra_len=y),512&n.flags&&(B[0]=255&y,B[1]=y>>>8&255,n.check=o(n.check,B,2,0)),y=0,_=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((I=n.length)>h&&(I=h),I&&(n.head&&(R=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),i.arraySet(n.head.extra,f,g,I,R)),512&n.flags&&(n.check=o(n.check,f,I,g)),h-=I,g+=I,n.length-=I),n.length))break t;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===h)break t;I=0;do{R=f[g+I++],n.head&&R&&n.length<65536&&(n.head.name+=String.fromCharCode(R))}while(R&&I<h);if(512&n.flags&&(n.check=o(n.check,f,I,g)),h-=I,g+=I,R)break t}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===h)break t;I=0;do{R=f[g+I++],n.head&&R&&n.length<65536&&(n.head.comment+=String.fromCharCode(R))}while(R&&I<h);if(512&n.flags&&(n.check=o(n.check,f,I,g)),h-=I,g+=I,R)break t}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;_<16;){if(0===h)break t;h--,y+=f[g++]<<_,_+=8}if(y!==(65535&n.check)){t.msg="header crc mismatch",n.mode=l;break}y=0,_=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=u;break;case 10:for(;_<32;){if(0===h)break t;h--,y+=f[g++]<<_,_+=8}t.adler=n.check=d(y),y=0,_=0,n.mode=11;case 11:if(0===n.havedict)return t.next_out=m,t.avail_out=v,t.next_in=g,t.avail_in=h,n.hold=y,n.bits=_,2;t.adler=n.check=1,n.mode=u;case u:if(5===e||6===e)break t;case 13:if(n.last){y>>>=7&_,_-=7&_,n.mode=27;break}for(;_<3;){if(0===h)break t;h--,y+=f[g++]<<_,_+=8}switch(n.last=1&y,_-=1,3&(y>>>=1)){case 0:n.mode=14;break;case 1:if(w(n),n.mode=20,6===e){y>>>=2,_-=2;break t}break;case 2:n.mode=17;break;case 3:t.msg="invalid block type",n.mode=l}y>>>=2,_-=2;break;case 14:for(y>>>=7&_,_-=7&_;_<32;){if(0===h)break t;h--,y+=f[g++]<<_,_+=8}if((65535&y)!=(y>>>16^65535)){t.msg="invalid stored block lengths",n.mode=l;break}if(n.length=65535&y,y=0,_=0,n.mode=15,6===e)break t;case 15:n.mode=16;case 16:if(I=n.length){if(I>h&&(I=h),I>v&&(I=v),0===I)break t;i.arraySet(p,f,g,I,m),h-=I,g+=I,v-=I,m+=I,n.length-=I;break}n.mode=u;break;case 17:for(;_<14;){if(0===h)break t;h--,y+=f[g++]<<_,_+=8}if(n.nlen=257+(31&y),y>>>=5,_-=5,n.ndist=1+(31&y),y>>>=5,_-=5,n.ncode=4+(15&y),y>>>=4,_-=4,n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols",n.mode=l;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;_<3;){if(0===h)break t;h--,y+=f[g++]<<_,_+=8}n.lens[F[n.have++]]=7&y,y>>>=3,_-=3}for(;n.have<19;)n.lens[F[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,A={bits:n.lenbits},U=s(0,n.lens,0,19,n.lencode,0,n.work,A),n.lenbits=A.bits,U){t.msg="invalid code lengths set",n.mode=l;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;E=(D=n.lencode[y&(1<<n.lenbits)-1])>>>16&255,P=65535&D,!((S=D>>>24)<=_);){if(0===h)break t;h--,y+=f[g++]<<_,_+=8}if(P<16)y>>>=S,_-=S,n.lens[n.have++]=P;else{if(16===P){for(M=S+2;_<M;){if(0===h)break t;h--,y+=f[g++]<<_,_+=8}if(y>>>=S,_-=S,0===n.have){t.msg="invalid bit length repeat",n.mode=l;break}R=n.lens[n.have-1],I=3+(3&y),y>>>=2,_-=2}else if(17===P){for(M=S+3;_<M;){if(0===h)break t;h--,y+=f[g++]<<_,_+=8}_-=S,R=0,I=3+(7&(y>>>=S)),y>>>=3,_-=3}else{for(M=S+7;_<M;){if(0===h)break t;h--,y+=f[g++]<<_,_+=8}_-=S,R=0,I=11+(127&(y>>>=S)),y>>>=7,_-=7}if(n.have+I>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=l;break}for(;I--;)n.lens[n.have++]=R}}if(n.mode===l)break;if(0===n.lens[256]){t.msg="invalid code -- missing end-of-block",n.mode=l;break}if(n.lenbits=9,A={bits:n.lenbits},U=s(1,n.lens,0,n.nlen,n.lencode,0,n.work,A),n.lenbits=A.bits,U){t.msg="invalid literal/lengths set",n.mode=l;break}if(n.distbits=6,n.distcode=n.distdyn,A={bits:n.distbits},U=s(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,A),n.distbits=A.bits,U){t.msg="invalid distances set",n.mode=l;break}if(n.mode=20,6===e)break t;case 20:n.mode=21;case 21:if(h>=6&&v>=258){t.next_out=m,t.avail_out=v,t.next_in=g,t.avail_in=h,n.hold=y,n.bits=_,a(t,T),m=t.next_out,p=t.output,v=t.avail_out,g=t.next_in,f=t.input,h=t.avail_in,y=n.hold,_=n.bits,n.mode===u&&(n.back=-1);break}for(n.back=0;E=(D=n.lencode[y&(1<<n.lenbits)-1])>>>16&255,P=65535&D,!((S=D>>>24)<=_);){if(0===h)break t;h--,y+=f[g++]<<_,_+=8}if(E&&0==(240&E)){for(L=S,C=E,N=P;E=(D=n.lencode[N+((y&(1<<L+C)-1)>>L)])>>>16&255,P=65535&D,!(L+(S=D>>>24)<=_);){if(0===h)break t;h--,y+=f[g++]<<_,_+=8}y>>>=L,_-=L,n.back+=L}if(y>>>=S,_-=S,n.back+=S,n.length=P,0===E){n.mode=26;break}if(32&E){n.back=-1,n.mode=u;break}if(64&E){t.msg="invalid literal/length code",n.mode=l;break}n.extra=15&E,n.mode=22;case 22:if(n.extra){for(M=n.extra;_<M;){if(0===h)break t;h--,y+=f[g++]<<_,_+=8}n.length+=y&(1<<n.extra)-1,y>>>=n.extra,_-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;E=(D=n.distcode[y&(1<<n.distbits)-1])>>>16&255,P=65535&D,!((S=D>>>24)<=_);){if(0===h)break t;h--,y+=f[g++]<<_,_+=8}if(0==(240&E)){for(L=S,C=E,N=P;E=(D=n.distcode[N+((y&(1<<L+C)-1)>>L)])>>>16&255,P=65535&D,!(L+(S=D>>>24)<=_);){if(0===h)break t;h--,y+=f[g++]<<_,_+=8}y>>>=L,_-=L,n.back+=L}if(y>>>=S,_-=S,n.back+=S,64&E){t.msg="invalid distance code",n.mode=l;break}n.offset=P,n.extra=15&E,n.mode=24;case 24:if(n.extra){for(M=n.extra;_<M;){if(0===h)break t;h--,y+=f[g++]<<_,_+=8}n.offset+=y&(1<<n.extra)-1,y>>>=n.extra,_-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=l;break}n.mode=25;case 25:if(0===v)break t;if(I=T-v,n.offset>I){if((I=n.offset-I)>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=l;break}I>n.wnext?(I-=n.wnext,O=n.wsize-I):O=n.wnext-I,I>n.length&&(I=n.length),k=n.window}else k=p,O=m-n.offset,I=n.length;I>v&&(I=v),v-=I,n.length-=I;do{p[m++]=k[O++]}while(--I);0===n.length&&(n.mode=21);break;case 26:if(0===v)break t;p[m++]=n.length,v--,n.mode=21;break;case 27:if(n.wrap){for(;_<32;){if(0===h)break t;h--,y|=f[g++]<<_,_+=8}if(T-=v,t.total_out+=T,n.total+=T,T&&(t.adler=n.check=n.flags?o(n.check,p,T,m-T):r(n.check,p,T,m-T)),T=v,(n.flags?y:d(y))!==n.check){t.msg="incorrect data check",n.mode=l;break}y=0,_=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;_<32;){if(0===h)break t;h--,y+=f[g++]<<_,_+=8}if(y!==(4294967295&n.total)){t.msg="incorrect length check",n.mode=l;break}y=0,_=0}n.mode=29;case 29:U=1;break t;case l:U=-3;break t;case 31:return-4;case 32:default:return c}return t.next_out=m,t.avail_out=v,t.next_in=g,t.avail_in=h,n.hold=y,n.bits=_,(n.wsize||T!==t.avail_out&&n.mode<l&&(n.mode<27||4!==e))&&b(t,t.output,t.next_out,T-t.avail_out)?(n.mode=31,-4):(x-=t.avail_in,T-=t.avail_out,t.total_in+=x,t.total_out+=T,n.total+=T,n.wrap&&T&&(t.adler=n.check=n.flags?o(n.check,p,T,t.next_out-T):r(n.check,p,T,t.next_out-T)),t.data_type=n.bits+(n.last?64:0)+(n.mode===u?128:0)+(20===n.mode||15===n.mode?256:0),(0===x&&0===T||4===e)&&0===U&&(U=-5),U)},e.inflateEnd=function(t){if(!t||!t.state)return c;var e=t.state;return e.window&&(e.window=null),t.state=null,0},e.inflateGetHeader=function(t,e){var n;return t&&t.state?0==(2&(n=t.state).wrap)?c:(n.head=e,e.done=!1,0):c},e.inflateSetDictionary=function(t,e){var n,i=e.length;return t&&t.state?0!==(n=t.state).wrap&&11!==n.mode?c:11===n.mode&&r(1,e,i,0)!==n.check?-3:b(t,e,i,i)?(n.mode=31,-4):(n.havedict=1,0):c},e.inflateInfo="pako inflate (from Nodeca project)"},9241:(t,e,n)=>{"use strict";var i=n(4236),r=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(t,e,n,c,u,l,d,f){var p,g,m,h,v,y,_,w,b,x=f.bits,T=0,I=0,O=0,k=0,S=0,E=0,P=0,L=0,C=0,N=0,R=null,U=0,A=new i.Buf16(16),M=new i.Buf16(16),D=null,B=0;for(T=0;T<=15;T++)A[T]=0;for(I=0;I<c;I++)A[e[n+I]]++;for(S=x,k=15;k>=1&&0===A[k];k--);if(S>k&&(S=k),0===k)return u[l++]=20971520,u[l++]=20971520,f.bits=1,0;for(O=1;O<k&&0===A[O];O++);for(S<O&&(S=O),L=1,T=1;T<=15;T++)if(L<<=1,(L-=A[T])<0)return-1;if(L>0&&(0===t||1!==k))return-1;for(M[1]=0,T=1;T<15;T++)M[T+1]=M[T]+A[T];for(I=0;I<c;I++)0!==e[n+I]&&(d[M[e[n+I]]++]=I);if(0===t?(R=D=d,y=19):1===t?(R=r,U-=257,D=o,B-=257,y=256):(R=a,D=s,y=-1),N=0,I=0,T=O,v=l,E=S,P=0,m=-1,h=(C=1<<S)-1,1===t&&C>852||2===t&&C>592)return 1;for(;;){_=T-P,d[I]<y?(w=0,b=d[I]):d[I]>y?(w=D[B+d[I]],b=R[U+d[I]]):(w=96,b=0),p=1<<T-P,O=g=1<<E;do{u[v+(N>>P)+(g-=p)]=_<<24|w<<16|b|0}while(0!==g);for(p=1<<T-1;N&p;)p>>=1;if(0!==p?(N&=p-1,N+=p):N=0,I++,0==--A[T]){if(T===k)break;T=e[n+d[I]]}if(T>S&&(N&h)!==m){for(0===P&&(P=S),v+=O,L=1<<(E=T-P);E+P<k&&!((L-=A[E+P])<=0);)E++,L<<=1;if(C+=1<<E,1===t&&C>852||2===t&&C>592)return 1;u[m=N&h]=S<<24|E<<16|v-l|0}}return 0!==N&&(u[v+N]=T-P<<24|64<<16|0),f.bits=S,0}},8898:t=>{"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},342:(t,e,n)=>{"use strict";var i=n(4236);function r(t){for(var e=t.length;--e>=0;)t[e]=0}var o=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],a=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],c=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],u=new Array(576);r(u);var l=new Array(60);r(l);var d=new Array(512);r(d);var f=new Array(256);r(f);var p=new Array(29);r(p);var g,m,h,v=new Array(30);function y(t,e,n,i,r){this.static_tree=t,this.extra_bits=e,this.extra_base=n,this.elems=i,this.max_length=r,this.has_stree=t&&t.length}function _(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function w(t){return t<256?d[t]:d[256+(t>>>7)]}function b(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function x(t,e,n){t.bi_valid>16-n?(t.bi_buf|=e<<t.bi_valid&65535,b(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=n-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=n)}function T(t,e,n){x(t,n[2*e],n[2*e+1])}function I(t,e){var n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}function O(t,e,n){var i,r,o=new Array(16),a=0;for(i=1;i<=15;i++)o[i]=a=a+n[i-1]<<1;for(r=0;r<=e;r++){var s=t[2*r+1];0!==s&&(t[2*r]=I(o[s]++,s))}}function k(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function S(t){t.bi_valid>8?b(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function E(t,e,n,i){var r=2*e,o=2*n;return t[r]<t[o]||t[r]===t[o]&&i[e]<=i[n]}function P(t,e,n){for(var i=t.heap[n],r=n<<1;r<=t.heap_len&&(r<t.heap_len&&E(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!E(e,i,t.heap[r],t.depth));)t.heap[n]=t.heap[r],n=r,r<<=1;t.heap[n]=i}function L(t,e,n){var i,r,s,c,u=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*u]<<8|t.pending_buf[t.d_buf+2*u+1],r=t.pending_buf[t.l_buf+u],u++,0===i?T(t,r,e):(T(t,(s=f[r])+256+1,e),0!==(c=o[s])&&x(t,r-=p[s],c),T(t,s=w(--i),n),0!==(c=a[s])&&x(t,i-=v[s],c))}while(u<t.last_lit);T(t,256,e)}function C(t,e){var n,i,r,o=e.dyn_tree,a=e.stat_desc.static_tree,s=e.stat_desc.has_stree,c=e.stat_desc.elems,u=-1;for(t.heap_len=0,t.heap_max=573,n=0;n<c;n++)0!==o[2*n]?(t.heap[++t.heap_len]=u=n,t.depth[n]=0):o[2*n+1]=0;for(;t.heap_len<2;)o[2*(r=t.heap[++t.heap_len]=u<2?++u:0)]=1,t.depth[r]=0,t.opt_len--,s&&(t.static_len-=a[2*r+1]);for(e.max_code=u,n=t.heap_len>>1;n>=1;n--)P(t,o,n);r=c;do{n=t.heap[1],t.heap[1]=t.heap[t.heap_len--],P(t,o,1),i=t.heap[1],t.heap[--t.heap_max]=n,t.heap[--t.heap_max]=i,o[2*r]=o[2*n]+o[2*i],t.depth[r]=(t.depth[n]>=t.depth[i]?t.depth[n]:t.depth[i])+1,o[2*n+1]=o[2*i+1]=r,t.heap[1]=r++,P(t,o,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var n,i,r,o,a,s,c=e.dyn_tree,u=e.max_code,l=e.stat_desc.static_tree,d=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,p=e.stat_desc.extra_base,g=e.stat_desc.max_length,m=0;for(o=0;o<=15;o++)t.bl_count[o]=0;for(c[2*t.heap[t.heap_max]+1]=0,n=t.heap_max+1;n<573;n++)(o=c[2*c[2*(i=t.heap[n])+1]+1]+1)>g&&(o=g,m++),c[2*i+1]=o,i>u||(t.bl_count[o]++,a=0,i>=p&&(a=f[i-p]),s=c[2*i],t.opt_len+=s*(o+a),d&&(t.static_len+=s*(l[2*i+1]+a)));if(0!==m){do{for(o=g-1;0===t.bl_count[o];)o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[g]--,m-=2}while(m>0);for(o=g;0!==o;o--)for(i=t.bl_count[o];0!==i;)(r=t.heap[--n])>u||(c[2*r+1]!==o&&(t.opt_len+=(o-c[2*r+1])*c[2*r],c[2*r+1]=o),i--)}}(t,e),O(o,u,t.bl_count)}function N(t,e,n){var i,r,o=-1,a=e[1],s=0,c=7,u=4;for(0===a&&(c=138,u=3),e[2*(n+1)+1]=65535,i=0;i<=n;i++)r=a,a=e[2*(i+1)+1],++s<c&&r===a||(s<u?t.bl_tree[2*r]+=s:0!==r?(r!==o&&t.bl_tree[2*r]++,t.bl_tree[32]++):s<=10?t.bl_tree[34]++:t.bl_tree[36]++,s=0,o=r,0===a?(c=138,u=3):r===a?(c=6,u=3):(c=7,u=4))}function R(t,e,n){var i,r,o=-1,a=e[1],s=0,c=7,u=4;for(0===a&&(c=138,u=3),i=0;i<=n;i++)if(r=a,a=e[2*(i+1)+1],!(++s<c&&r===a)){if(s<u)do{T(t,r,t.bl_tree)}while(0!=--s);else 0!==r?(r!==o&&(T(t,r,t.bl_tree),s--),T(t,16,t.bl_tree),x(t,s-3,2)):s<=10?(T(t,17,t.bl_tree),x(t,s-3,3)):(T(t,18,t.bl_tree),x(t,s-11,7));s=0,o=r,0===a?(c=138,u=3):r===a?(c=6,u=3):(c=7,u=4)}}r(v);var U=!1;function A(t,e,n,r){x(t,0+(r?1:0),3),function(t,e,n,r){S(t),b(t,n),b(t,~n),i.arraySet(t.pending_buf,t.window,e,n,t.pending),t.pending+=n}(t,e,n)}e._tr_init=function(t){U||(function(){var t,e,n,i,r,c=new Array(16);for(n=0,i=0;i<28;i++)for(p[i]=n,t=0;t<1<<o[i];t++)f[n++]=i;for(f[n-1]=i,r=0,i=0;i<16;i++)for(v[i]=r,t=0;t<1<<a[i];t++)d[r++]=i;for(r>>=7;i<30;i++)for(v[i]=r<<7,t=0;t<1<<a[i]-7;t++)d[256+r++]=i;for(e=0;e<=15;e++)c[e]=0;for(t=0;t<=143;)u[2*t+1]=8,t++,c[8]++;for(;t<=255;)u[2*t+1]=9,t++,c[9]++;for(;t<=279;)u[2*t+1]=7,t++,c[7]++;for(;t<=287;)u[2*t+1]=8,t++,c[8]++;for(O(u,287,c),t=0;t<30;t++)l[2*t+1]=5,l[2*t]=I(t,5);g=new y(u,o,257,286,15),m=new y(l,a,0,30,15),h=new y(new Array(0),s,0,19,7)}(),U=!0),t.l_desc=new _(t.dyn_ltree,g),t.d_desc=new _(t.dyn_dtree,m),t.bl_desc=new _(t.bl_tree,h),t.bi_buf=0,t.bi_valid=0,k(t)},e._tr_stored_block=A,e._tr_flush_block=function(t,e,n,i){var r,o,a=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,n=4093624447;for(e=0;e<=31;e++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),C(t,t.l_desc),C(t,t.d_desc),a=function(t){var e;for(N(t,t.dyn_ltree,t.l_desc.max_code),N(t,t.dyn_dtree,t.d_desc.max_code),C(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*c[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(o=t.static_len+3+7>>>3)<=r&&(r=o)):r=o=n+5,n+4<=r&&-1!==e?A(t,e,n,i):4===t.strategy||o===r?(x(t,2+(i?1:0),3),L(t,u,l)):(x(t,4+(i?1:0),3),function(t,e,n,i){var r;for(x(t,e-257,5),x(t,n-1,5),x(t,i-4,4),r=0;r<i;r++)x(t,t.bl_tree[2*c[r]+1],3);R(t,t.dyn_ltree,e-1),R(t,t.dyn_dtree,n-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),L(t,t.dyn_ltree,t.dyn_dtree)),k(t),i&&S(t)},e._tr_tally=function(t,e,n){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(f[n]+256+1)]++,t.dyn_dtree[2*w(e)]++),t.last_lit===t.lit_bufsize-1},e._tr_align=function(t){x(t,2,3),T(t,256,u),function(t){16===t.bi_valid?(b(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},2292:t=>{"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={exports:{}};return t[i].call(o.exports,o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};(()=>{"use strict";n.r(i),n.d(i,{Core:()=>V,EventHub:()=>c.s$,I18n:()=>X});var t=n(4248),e=(n(1817),n(3948),n(6935)),r=n(866),o=n(6207),a=n(9564),s=n(6451),c=n(3251),u=n(7550),l=n(9026),d=n(248),f=n(5159),p=n(698),g=n(2167),m=n(5142),h=n(6539),v=n(3608),y=n(7433),_=n(7428),w=n(5905),b=n(4125),x=n(6213),T=n(6970),I=n(9141);let O;function k(t){return(0,h.ZI)().offline_survey_id&&(0,a.Jz)(t.nodes).autoCpltGroups.forEach((t=>{t.data.forEach((t=>{t.icon=(0,_.f)(t.icon)}))})),t}function S(e){e.handleEvents={async handleLangChange(n){await(0,u.nE)(n.locale,!1)||(0,t.Pg)(e,{showInitLangSelect:!1})},async handleNextClick(){e.nextLoading||((0,y.Tb)(e,!0),await(0,t.vW)().fetchSurveyState(),(0,t.dU)().app.gotoSurveyPage((0,h.ZI)()),(0,y.Tb)(e,!1))}}}async function E(){if((0,t.vW)().startState)return(0,t.vW)().startState;const n=await async function(){const e=await(0,t.dU)().dev.getCustomSurveyMeta();if(e)return e;{const e=(0,t.vW)().sid;return(0,l.Fv)(),O||(0,m.X)(e)}}();!function(e){if((0,t.vW)().preview)return void(O=e);if(O)return;O=e;const{collector:{channel_configs:n}}=e,i=(0,t.dU)().name,r=n.find((t=>t.type===i));if(r){if(!r.allow_response)throw(0,t.vW)().error((0,m.W1)(m.mi.interviewee_invalid_error)),new Error(m.mi.interviewee_invalid_error);O.channel=r,(0,t.dU)().auth.authorize(O)}else O.channel={type:i}}(n),await(0,t.dU)().auth.init(n);const i=await async function(e){const n=await(0,t.dU)().dev.getCustomSurveyPayload();if(n)return{cfpd:n,surveyMeta:e};{let n;try{n=await(e.start_auto?(0,m.vT)(e.diagram_url,{type:"GET"},!0):(0,m.vT)(e.smaller_diagram_url,{type:"GET"},!0))}catch(e){throw(0,t.vW)().error((0,u.Iu)(f.bn.global.downloadError)),e}const i=await(0,g.Z)(n);return function(e){if(!e.version)return(0,t.vW)().error((0,u.Iu)(f.bn.global.upgrade)),void(0,t.vW)().customAbort();e.version<2&&e.nodes.forEach((t=>{let e=[];t.options&&(e=e.concat(t.options)),(0,w.RE)(t)&&(e=e.concat(t.otherOptions)),e.forEach((t=>{10===t.mutexNumber&&(t.mutexNumber=-1)}))}))}(i),{surveyMeta:e,cfpd:k(i)}}}(n),h=await async function(e){var n;const{surveyMeta:i,cfpd:r}=e,{mediaLibrary:s,surveyId:c,disabledLangs:l,testCases:f,variables:p}=r,g=(0,o.AK)(r.nodes,r.nodeGroups),m=(0,a.Jz)(g);let h=[];r.langPack?(r.langPack=function(t){if(t instanceof Array)return t;{const e=[];return Object.keys(t).forEach((n=>{const i=t[n];e.push({id:"",locale:n,content:i})})),e}}(r.langPack),h=r.langPack.map((t=>({locale:t.locale,content:t.content})))):i.langs&&(h=i.langs),h=h.filter((t=>t.locale!==m.currentLang));const v=m.currentLang,y=[v,...h.map((t=>t.locale))],_=(null!==(n=null===I.Z||void 0===I.Z?void 0:I.Z.langTable)&&void 0!==n?n:[]).filter((t=>y.includes(t.locale)&&!(null==l?void 0:l.includes(t.locale)))),w=await(0,u.Vj)(_,v),b=!!(0,t.dU)().storage.get("lang-resume");b&&(0,t.dU)().storage.remove("lang-resume"),(0,u.$1)(w);const x={imageList:s.imageList,videoList:s.videoList,nodeList:g,theme:r.theme,nodeGroups:r.nodeGroups||[],variables:(0,o.Fy)(r.variables),surveyMeta:O,embedApis:r.embedApis||[],varStyles:r.varStyles,surveyId:c,langs:h,language:w,langTable:_,langResume:b,testCases:f,disabledLangs:l||[],publishedAt:i.published_at,presetRichStyles:r.presetRichStyles};return w===v||(m.i18n&&(0,d.eb)(m,m.i18n[w]),p.forEach((t=>{t.i18n&&(0,d.ub)(t,t.i18n[w])}))),x}(i),y=await async function(e){if((0,t.vW)().startState)return(0,t.vW)().startState;const{imageList:n,nodeList:i,theme:r,variables:o,varStyles:l,surveyId:d,langResume:p,nodeGroups:g}=e,m=(0,a.Jz)(i),{imgScale:h,imgTransType:y,imgTransTime:_,imgPosition:w,welcomeUrl:T,startAuto:I,noWxShare:k,startBtnText:E,hasVar:P,layout:L,showInitLangSelect:C}=m;(0,x.W)(e.presetRichStyles);const N={imageList:n,variables:o,varStyles:l};(0,v.B3)(N);const R=await(0,s.nn)({},{origin:m}),{interviewee:U}=O,A=U?U.raw_data:(0,t.dU)().auth.userInfo||{},M={...N,embedApis:e.embedApis,nodeGroups:g,origin:m,publishedAt:e.publishedAt,type:m.type,nodeName:m.nodeName,langResume:p,langTable:e.langTable,eventHub:c.s$,language:e.language||"en_us",layout:L,startNode:m,sid:(0,t.vW)().sid,noWxShare:k,preview:(0,t.vW)().preview,images:R,surveyId:d,...(0,b.s)(m),nextButton:E||(0,u.Iu)(f.bn.global.start),theme:r.usingTheme,imgScale:h,imgPosition:w,imgTransType:y,imgTransTime:_,welcomeUrl:T,userInfo:A,hasVar:P,parsedPayload:e,startAuto:I||p,showInitLangSelect:(0,u.HP)(C,e.langTable)};return S(M),M}(h);return await async function(t){const n={state:t},{origin:i}=t,{startName:o,qsnrName:a,questionText:s,describe:u,template:l}=i;t.title=await(0,e.Ur)((0,r.l)(o||a),n),t.summary=await(0,e.Ur)(s,n),t.description=await(0,e.Ur)(u,n),t.template=await(0,T.b)(l,n.state),(0,p.z)(t.theme),(0,c.cs)({origin:i})}(y),await(0,t.dU)().hook.afterFetchStart(y),(y.startAuto||(0,t.dU)().dev.autoRun)&&(y.hidden=!0,(0,t.vW)().startState=y,await y.handleEvents.handleNextClick()),y}var P=n(9309),L=n(8670),C=(n(5306),n(6064));async function N(){return null}const R={name:"other",dev:{parseRealUrl:t=>t,getCustomSurveyPayload:N,getCustomSurveyMeta:N,local:!1,debug:!1,autoRun:!1,realtime:!1,infer:!1},app:{reload(){},openWebLink(){},canHandleReward:()=>!1,getRewardUrl(t){const e=(0,h.FC)(t);return(0,h.Mw)("https:/live.choiceform.com/reward",e)}},network:{initUploader(){},connectSocket(){},closeSocket(){},pushSocket(){}},storage:null,auth:{userInfo:{},init:N,authorize(){},authorizeGift(){},retrieveAuthSurveyMeta:()=>null},hook:{afterFetchReward:N,afterFetchStart:N,afterFetchSurvey:N,afterSetup:N,beforeSetupEnd:N,beforeForceLeave(){},onLangChange(){},onSwitchPage(){},onTitleChange(){},beforeEndSurvey:N,onEndSurvey:N,onRestartSurvey:N,onResumeSurvey:N,onStartNewSurvey:N,beforeGotoNext:N},system:{device:{browser:{name:"",version:""},device:{type:"",vendor:"",model:""},engine:{name:"",version:""},os:{name:"",version:""}},getReferer:()=>"",getLang:()=>"en_us",functionConstructor:Function,translate(t,e){if(e){let n=e?(0,u.P_)(t):t;return e&&Object.keys(e).forEach((t=>{n=n.replace(new RegExp("{".concat(t,"}"),"g"),(0,C.KF)(e[t]))})),n}return t}},ui:{setGlobalStyle(){},setVarStyle(){},loadNodeComponent:N,loadUiEntryTemplates:N,setPresetStyle(){}}};function U(t,e){Object.keys(e).forEach((n=>{const i=e[n];"object"==typeof i?t[n]?null!==i&&U(t[n],i):t[n]=i:void 0!==i&&(t[n]=i)}))}function A(t){return U(R,t),R}var M=n(7518);const D={key:"",dynamic:!1,treeUrl:"",templatePath:"",useWxSdk:!1,hostConfig:{LOGO_NAME:"cform",qStaticHost:"https://media.choiceform.com/q-static-assets",recordUrl:"https://tracking.choiceform.com/api/records",host:"https://osapi.choiceform.com",wsHost:"wss://osapi.choiceform.com",cdnHost:"https://media.choiceform.com/os-client-live",mediaHost:"https://media.choiceform.com",publicHost:"https://public.choiceform.com"},setTheme(){},locateError(){},langSrcMap:null,setLocale(){},customAbort(){},switchRoute(){},uploadLog(t){console.info(t)}};var B=n(6866),F=n(277),W=n(3768),z=n(7552),q=n(9911);function j(){if(!V.initialized)throw new Error("CCCore not yet initialized")}const V={releaseVersion:"3.6.57",releaseDate:"2024-2-6",cfpd:I.Z,eventHub:c.s$,notifySuspended:!1,theme:(0,p.V)(),util:{convertVarStyle:v.L7,getTaskInfo:F.M,getAnswer:W.py,addStartStateDynamics(t){S(t)},addSurveyStateDynamics(t){(0,P.Wc)(t)},addNodeDynamics(t){(0,a.qK)(t)},addOptionDynamics(t){(0,z.kN)(t)},extendImageListGetter(t){(0,v.MD)(t)},loadFakeServers:t=>(0,q.U)(t,!1)},registerEnv(e){const n=A(e);(0,t.JN)(n),V.env=n},async setup(e){if(V.initialized)return V;if(e.dynamic){if(!e.templatePath||!e.treeUrl)throw new Error("setup error, you configed your client as dynanmic, so must provide tempaltePath and treeUrl");if(!e.treeUrl.startsWith("/"))throw new Error("setup error, treeUrl must be absolute path")}Object.assign(V,function(t){const e={...D.hostConfig,...t.hostConfig};return Object.assign(D,{...t,hostConfig:e}),D}(e));const n=(0,h.ZI)(),i=n.sid;if(!i&&!(0,t.dU)().dev.realtime)throw new Error("setup error, must provide sid");V.sid=i,V.realTimePreview=(0,t.dU)().dev.realtime;const r=n.type;V.preview=V.realTimePreview||V.sid.length>30||"edit_template"===r||"preview_template"===r,V.preview?V.needPreviewFlag="1"!==n.ban_preview_bar:V.offlineTaskId=n.offline_task_id;const o=V.setTheme;V.setTheme=t=>{o(t),V.themeUpdated=!0,c.s$.trigger("SET_PROPS")},(0,f.tV)(V.langSrcMap);const a=V.customAbort;V.customAbort=()=>{throw a&&a(),V.notifySuspended=!0,setTimeout((()=>{V.notifySuspended=!1}),1e3),new Error("custom_abort")};const s=V.error;V.error=t=>{V.startState||V.rewardState||V.setTheme((0,p.V)()),s(t),V.crashed=!0};const l=V.notify;V.notify=t=>{V.notifySuspended||(V.startState||V.rewardState||V.setTheme((0,p.V)()),l(t))},(0,t.dU)().dev.debug&&(V.hostConfig.host="https://osapi.choiceform.com",V.hostConfig.cdnHost="https://media.choiceform.com/os-client-live",V.hostConfig.mediaHost="https://media.choiceform.com"),n.offline_survey_id&&(V.hostConfig.cdnHost=(0,_.f)(V.hostConfig.cdnHost),V.hostConfig.mediaHost=(0,_.f)(V.hostConfig.mediaHost)),V.hostConfig.qApiHost=V.hostConfig.host+"/q/v1",await(0,t.dU)().hook.beforeSetupEnd(V),(0,t.IO)(V),V.initialized=!0,await(0,t.dU)().hook.afterSetup(V),await(0,t.dU)().hook.beforeSetupEnd(V);const d=await(0,u.Vj)(I.Z.langTable,"zh_cn");return(0,f.i_)(d),V},async fetchStartState(){j();const e=await E();return e&&(e.core=V,V.startState=e,(0,t.dU)().hook.onTitleChange(e.title),c.s$.trigger("SET_PROPS")),e},async fetchSurveyState(){j(),V.startState&&(0,y.Tb)(V.startState,!0);const e=await(0,P.BN)();return e&&(e.core=V,V.surveyState=e,(0,y.Tb)(V.startState,!1),(0,t.dU)().hook.onTitleChange(e.title),c.s$.trigger("SET_PROPS")),e},async fetchRewardState(){j();const e=await(0,L.G8)();return e&&(e.core=V,V.rewardState=e,(0,t.dU)().hook.onTitleChange(e.quesTitle),c.s$.trigger("SET_PROPS")),e},reset(){V.offlineTaskId="",V.initialized=!1,O=null,V.startState=null,V.surveyState=null,(0,L.md)(),V.rewardState=null,(0,h.zZ)(),(0,M.Y)(),(0,B.g1)()}},X={mergeLangSrcMap:f.tV,getLangSrcMap:f.zH}})();var r=exports;for(var o in i)r[o]=i[o];i.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
|
1
|
+
(()=>{var t={9200:(t,e,n)=>{"use strict";var i=n(3548),r=n(512),o={inflateBase64:function(t){return t=r.Base64.atob(t),(0,i.inflate)(t,{to:"string"})},deflateBase64:function(t){return t=(0,i.deflate)(t,{to:"string"}),r.Base64.btoa(t)},inflatePrefix:function(t){return t=t.substr(7),(0,i.inflate)(t,{to:"string"})},deflatePrefix:function(t){return":CF_PD:"+(t=(0,i.deflate)(t,{to:"string"}))},langTable:[{locale:"ar_sa",value:"العربية",bdCode:"ara",direction:"rtl",comment:"阿拉伯语"},{locale:"az_az",value:"azərbaycan",bdCode:"aze",comment:"阿塞拜疆语"},{locale:"be_by",value:"беларуская",bdCode:"bel",comment:"白俄罗斯语"},{locale:"bg_bg",value:"български",bdCode:"bul",comment:"保加利亚语"},{locale:"bn_bd",value:"বাংলা",bdCode:"ben",comment:"孟加拉语"},{locale:"cs_cz",value:"čeština",bdCode:"cs",comment:"捷克语"},{locale:"da_dk",value:"dansk",bdCode:"dan",comment:"丹麦语"},{locale:"de_de",value:"Deutsch",bdCode:"de",comment:"德语"},{locale:"el_gr",value:"Ελληνικά",bdCode:"el",comment:"希腊语"},{locale:"en_us",value:"English",bdCode:"en",comment:"英语"},{locale:"es_es",value:"español",bdCode:"spa",comment:"西班牙语"},{locale:"et_ee",value:"eesti",bdCode:"est",comment:"爱沙尼亚语"},{locale:"fa_ir",value:"فارسی",bdCode:"per",direction:"rtl",comment:"波斯语"},{locale:"fi_fi",value:"suomi",bdCode:"fin",comment:"芬兰语"},{locale:"fil_ph",value:"Filipino",bdCode:"fil",comment:"菲律宾语"},{locale:"fr_fr",value:"français",bdCode:"fra",comment:"法语"},{locale:"he_il",value:"עברית",bdCode:"heb",direction:"rtl",comment:"希伯来语"},{locale:"hi_in",value:"हिन्दी",bdCode:"hi",comment:"印地语"},{locale:"hu_hu",value:"magyar",bdCode:"hu",comment:"匈牙利语"},{locale:"hy_am",value:"հայերեն",bdCode:"arm",comment:"亚美尼亚语"},{locale:"id_id",value:"Indonesia",comment:"印度尼西亚语"},{locale:"it_it",value:"italiano",bdCode:"it",comment:"意大利语"},{locale:"ja_jp",value:"日本語",bdCode:"jp",comment:"日本语"},{locale:"kk_kz",value:"қазақ тілі",comment:"哈萨克语"},{locale:"km_kh",value:"ខ្មែរ",bdCode:"hkm",comment:"高棉语"},{locale:"ko_kr",value:"한국어",bdCode:"kor",comment:"韩语"},{locale:"ky_kg",value:"кыргызча",comment:"柯尔克孜语"},{locale:"lo_la",value:"ລາວ",bdCode:"lao",comment:"老挝语"},{locale:"mg_mg",value:"Malagasy",bdCode:"mg",comment:"马达加斯加语"},{locale:"mn_mn",value:"монгол",comment:"蒙古语"},{locale:"my_mm",value:"မြန်မာ",bdCode:"bur",comment:"缅甸语"},{locale:"ne_np",value:"नेपाली",bdCode:"nep",comment:"尼泊尔语"},{locale:"nl_nl",value:"Nederlands",bdCode:"nl",comment:"荷兰语"},{locale:"pl_pl",value:"polski",bdCode:"pl",comment:"波兰语"},{locale:"ps_af",value:"پښتو",bdCode:"pus",comment:"普什图语",direction:"rtl"},{locale:"pt_pt",value:"português",bdCode:"pt",comment:"葡萄牙语"},{locale:"ro_ro",value:"română",bdCode:"rom",comment:"罗马尼亚语"},{locale:"ru_ru",value:"русский",bdCode:"ru",comment:"俄语"},{locale:"rw_rw",value:"Kinyarwanda",bdCode:"kin",comment:"卢旺达语"},{locale:"so_so",value:"Soomaali",bdCode:"som",comment:"索马里语"},{locale:"sr_rs",value:"српски",bdCode:"srp",comment:"塞尔维亚语"},{locale:"sv_se",value:"svenska",bdCode:"swe",comment:"瑞典语"},{locale:"sw_ke",value:"Kiswahili",bdCode:"swa",comment:"斯瓦希里语"},{locale:"tg_tj",value:"тоҷикӣ",bdCode:"tgk",comment:"塔吉克语"},{locale:"th_th",value:"ไทย",bdCode:"th",comment:"泰语"},{locale:"tr_tr",value:"Türkçe",bdCode:"tr",comment:"土耳其语"},{locale:"uk_ua",value:"українська",bdCode:"ukr",comment:"乌克兰语"},{locale:"ur_pk",value:"اردو",bdCode:"urd",direction:"rtl",comment:"乌尔都语"},{locale:"uz_uz",value:"ўзбекча",comment:"乌兹别克语"},{locale:"zh_cn",bdCode:"zh",value:"简体中文",comment:"中文"},{locale:"zh_tw",bdCode:"cht",value:"繁體中文",comment:"中文"},{locale:"vi_vn",value:"Tiếng Việt",bdCode:"vie",comment:"越南语"}]};e.c=o},568:(t,e,n)=>{"use strict";n.d(e,{CW:()=>o,qe:()=>u,Y1:()=>s,qq:()=>a,Ki:()=>c});const i={zh_cn:{upload:{name:"上传",amountLimit:"最少上传{min}个文件,最多上传{max}个文件",amountLimitMin:"最少上传{min}个文件",amountLimitMax:"最多上传{max}个文件",fileSizeLimit:"文件大小不能超过{size}。",invalidImage:"图片已破损或无法识别。",uploadRequired:"上传项必须完成上传"},verify:{name:"验证",invalidFailed:"输入内容无效,验证失败。",failed:"验证失败。",sendSuccess:"短信发送成功",sendFailed:"短信发送失败,请稍后再试.",tooFrequent:"操作太过频繁,请稍后再试。"},region:{name:"地域"},locate:{name:"定位",required:"必须定位后才能继续。"},weight:{name:"权重",total:"权重总值{total}",relax:"各项打分之和可以小于权重总值",strict:"各项打分之和必须等于权重总值",totalLimitMin:"各项分值总和不能小于{min}分"},previewBookmark:{existed:"该书签已经存在",importSuccess:"导入成功",importFailure:"导入失败",importFailed:"导入书签失败:"},previewTime:{uploadSuccess:"上传回复时间成功",uploadFailed:"上传回复时间失败"},lottery:{congratulation:"恭喜你",pity:"很遗憾",goal:"获得了",fail:"没有中奖,谢谢您的参与!"},icon:{name:"图标题"},imageSelect:{name:"图片选择题"},site:{name:"范围定位题"},hotSpot:{name:"图片框选题",tips:"请在图片上选择你感兴趣的区域。"},heatMap:{name:"图片热力题"},maxDiff:{name:"MaxDiff问题",all:"请完成所有任务的作答"},cascade:{name:"级联菜单",selectSome:"选择{amount}项",selectBetween:"选择{min}到{max}项"},menu:{name:"菜单",clickToSelect:"请点击选择...",required:"{text}: 列表中必须选择。",inputRule:"{text}:{rule}",inputReq:"{text}: 必须填写内容。",requiredBetween:"{text}: 列表中必须选择{min}到{max}项。",topList:"顶层列表",listItem:"列表项",limitMax:"{text}:最多只能选中{max}项"},select:{single:"单选",multi:"多选",limitBetween:"最少选择{min}项,最多选择{max}项。",limitMax:"最多选择{max}项",limitMin:"最少选择{min}项"},slideRate:{name:"连续评价题"},fill:{name:"填空 ",itemsLimit:"请输入{min}到{max}个项目",charsLimit:"请输入{min}到{max}个字",inputDecimal:"请输入小数",inputDecimalDigits:"请输入小数位数为{scale}的数字",inputInteger:"请输入整数",valueLimit:"请输入{min}到{max}之间的数值",needEmail:"请输入有效的Email",needPhoneNumber:"请输入有效的手机号码",needZipCode:"请输入有效的邮编。",needUrl:"请输入有效的网址。",itemInputRequired:"该项必须填写。",inputRequired:"输入项中必须完成填写",inputLimitMin:"至少输入{min}项。",onlyAllow:"仅限:{text}",number:"数字",alphabet:"英文字母",chinese:"中文",atcpLabelOnly:"只能输入提示的标签"},rank:{name:"排序",limitMin:"必须排出前{min}项的顺序。",limitAll:"必须排出所有选项的顺序。",tips:"将项目拖放到您喜欢的顺序中。"},mark:{graph:"打分",value:"打分"},matrix:{single:"单选矩阵",multi:"多选矩阵",multiRow:"行多选矩阵",multiCol:"列多选矩阵",singleRow:"行单选矩阵",singleCol:"列单选矩阵",singleRowCol:"行列单选矩阵",eachRowOne:"每行选择一项",eachColOne:"每列选择一项",eachRowColOne:"每行每列选择一项",rowLimitBetween:"每行最少选择{min}项,最多选择{max}项。",colLimitBetween:"每列最少选择{min}项,最多选择{max}项。",rowLimitMax:"每行最多选择{max}项。",colLimitMax:"每列最多选择{max}项。",rowLimitMin:"每行最少选择{min}项。",colLimitMin:"每列最少选择{min}项。"},preview:{noMessage:"预览模式下不提供验证服务",noLink:"预览模式不进行链接跳转。"},video:{watchAll:"请认真观看完视频。"},reward:{get:"领取奖励",yuan:"元",weChatName:"微信名称示例"},global:{invalidReward:"分享的链接无法获取奖励",upgrade:"数据版本发生变化,到设计端重新保存后才能继续访问。",timeOver:"问卷回复时长超时,未能按时完成答题!",answerRequired:"必答题,答题后继续。",antiAgain:"不允许再次回复",authFailed:"授权失败",downloadError:"下载数据失败,请确保网络良好后再重试。",start:"开始",next:"下一题",previous:"上一题",go:"前往",done:"完成",notTarget:"抱歉,您暂时不符合当前调查的条件。我们真诚地感谢您的参与,并期望您继续参与我们的在线调查活动!",backTest:"返回测试",invalidUrl:"不是有效问卷地址",tryAgain:"操作失败,请稍后重试。",clientError:"问卷指定的调研终端与本终端不一致,请确认你的链接地址是否正确。"},memory:{title:"记录恢复",message:"检测到未完成的回复记录,是否恢复记录?",sure:"恢复记录",deny:"重新开始"},langResume:{title:"正在切换语言,请稍候..."},backEnd:{response_overflow:"抱歉,当前调查问卷的收集器已经达到最大回复数。我们真诚地感谢您的参与,并期望您继续参与我们的在线调查活动!",collector_full:"抱歉,当前调查问卷的收集器已经达到最大回复数。我们真诚地感谢您的参与,并期望您继续参与我们的在线调查活动!",survey_not_exist:"抱歉,这个调查可能已经关闭、重命名或删除。",response_status_error:"操作被拒绝",quota_not_match:"配额失败",internal_server_error:"服务器未知错误",survey_offline:"本次调查可能已经结束并关闭,感谢您的参与。",diagram_has_errors:"部分逻辑存在错误,请修正后再发布调查问卷。",interviewee_missing_error:"渠道不匹配",interviewee_invalid_error:"该渠道下不允许回复,请使用微信打开链接。",multi_responses_error:"您已参与过本次调研活动,无法再次回复。感谢您的参与。",api_rate_limit_error:"API 连接过于频繁",response_already_examined:"抱歉,您不符合这项调查的条件。我们真诚地感谢您为此付出的时间,并期望您继续参与我们的在线调查活动!",question_missing_error:"没找到验证对象",gen_validation_error:"获取验证码图片失败",invalid_phone_number_error:"提供的电话号码格式不正确。",sms_gateway_error:"短信发送失败",invalid_code_error:"输入内容无效,验证失败。",quota_full:"抱歉,这个调查问卷的配额已经达到最大设定数。我们真诚地感谢您的参与,并期望您继续参与我们的在线调查活动!",reward_type_error:"无效的奖励类型",already_been_verificated:"奖品已核销,不可再次使用",red_envelope_duplicated:"您已参与过本活动,不能重复领取。感谢您的参与。",red_envelope_expired:"奖励码超时过期。",red_envelope_received_by_yourself:"不能重复扫码领取奖励。",red_envelope_received_by_others:"不能扫取他人奖励码。",red_envelope_intercepted:"微信账号可能存在异常导致红包发放操作失败。",red_envelope_send_error:"微信账号可能存在异常。",oauth_error:"授权失败"}},en_us:{upload:{name:"Upload",amountLimit:"Upload minimum {min, plural, =0 {no pictures} one {# picture} other {# pictures} } and maximum {max, plural, =0 {no pictures} one {# picture} other {# pictures} }",amountLimitMin:"Upload minimum {min, plural, =0 {no pictures} one {# picture} other {# pictures} }",amountLimitMax:"Upload maximum {max, plural, =0 {no pictures} one {# picture} other {# pictures} }",fileSizeLimit:"File size cannot exceed {size}。",invalidImage:"The picture is damaged or unrecognized.",uploadRequired:"Upload items must be completed"},verify:{name:"Verification",invalidFailed:"Invalid input",failed:"verification failed",sendSuccess:"Successful message sending",sendFailed:"Message sending failed, please try again later",tooFrequent:"The operation is too frequent, please try again later"},region:{name:"District"},locate:{name:"Location",required:"Continue after positioned"},weight:{name:"Weight Slider",total:"Total Weight: {total}",relax:"Sum of scores may be less than the total weight",strict:"Sum of scores must be equal to the total weight",totalLimitMin:"Sum of scores should not be less than {min, plural, =0 { no points} one {# point} other {# points} }"},previewBookmark:{existed:"This bookmark already exists",importFailed:"Failed to import bookmark:",importSuccess:"Import successfully",importFailure:"Import failed"},previewTime:{uploadSuccess:"Upload success",uploadFailed:"Upload failed"},lottery:{congratulation:"Congratulations!",pity:"It's a pity",goal:"You got it",fail:"Did not win. Thanks for your participation!"},icon:{name:"Icon"},imageSelect:{name:"Image Choice"},site:{name:"Site Location"},hotSpot:{name:"Picture Selection",tips:"Please select the picture of your choice"},heatMap:{name:"Heat Map"},maxDiff:{name:"MaxDiff question",all:"Please complete all tasks"},cascade:{name:"Cascade Menu",selectSome:"Please select {amount, plural, =0 {no options} one {# option} other {# options} }",selectBetween:"Please select minimum {min, plural, =0 {no options} one {# option} other {# options} } maximum {max, plural, =0 {no options} one {# option} other {# options} }"},menu:{name:"Dropdown menu",clickToSelect:"Click to select...",required:"{text}: Requires selection",inputRule:"{text}:{rule}",inputReq:"{text}: Requires input",requiredBetween:"{text}: Please select minimum {min, plural, =0 {no items} one {# item} other {# items} } maximum {max, plural, =0 {no items} one {# item} other {# items} }",topList:"Top list",listItem:"List item",limitMax:"{text}:Please select maximum {max, plural, =0 {no items} one {# item} other {# items} }"},select:{single:"Single Answer",multi:"Multiple Answer",limitBetween:" Please answer minimum {min, plural, one {# choice} other {# choices} } maximum {max, plural, one {# choice} other {# choices} }",limitMax:"Maximum selection {max, plural, one {# choice may be answered.} other {# choices may be answered.} }",limitMin:"Minimum selection {min, plural, one {# choice.} other {# choices.} }"},slideRate:{name:"Slide Rating"},fill:{name:"Text Entry",itemsLimit:"Please enter item between {min} and {max}.",charsLimit:"Please enter text between {min} and {max}.",inputDecimal:"Please enter decimal",inputDecimalDigits:"Please enter decimal number with {scale} digits",inputInteger:"Please enter integer",valueLimit:"Please enter a number between {min} and {max}.",needEmail:"Please enter a valid email address.",needPhoneNumber:"Please enter a valid mobile phone number.",needZipCode:"Please enter a valid postcode.",needUrl:"Please enter valid a URL address.",itemInputRequired:"Please answer this question",inputRequired:"Answer required",inputLimitMin:"Please enter at least {min, plural, one {# item} other {# items} }",onlyAllow:"Please enter a valid {text}",number:"number",alphabet:"alphabet",chinese:"chinese character",atcpLabelOnly:"Can only input pop up label"},rank:{name:"Ranking",limitMin:"Please rank at least {min, plural, one {# choice.} other {# choices.} }",limitAll:"Please rank all options",tips:"Drag and drop items into you preferred order."},mark:{graph:"Rating",value:"Slider"},matrix:{single:"Single Choice Matrix",multi:"Multiple Choice Matrix",multiRow:"Multiple Row Choice Matrix",multiCol:"Multiple Column Choice Matrix",singleRow:"Single Row Choice Matrix",singleCol:"Single Column Choice Matrix",singleRowCol:"Single Row Column Choice Matrix",eachRowOne:"Must select one option in each row",eachColOne:"Must select one option in each column",eachRowColOne:"Must select one option in each row & column",rowLimitBetween:"Select minimum {min, plural, =0 {no options} one {# option} other {# options} } maximum {max, plural, =0 {no options} one {# option} other {# options} } in each row",colLimitBetween:"Select minimum {min, plural, =0 {no options} one {# option} other {# options} } maximum {max, plural, =0 {no options} one {# option} other {# options} } in each column",rowLimitMax:"Select maximum {max, plural, =0 {no options} one {# option} other {# options} } in each row",colLimitMax:"Select maximum {max, plural, =0 {no options} one {# option} other {# options} } in each column",rowLimitMin:"Select minimum {min, plural, =0 {no options} one {# option} other {# options} } in each row",colLimitMin:"Select minimum {min, plural, =0 {no options} one {# option} other {# options} } in each column"},preview:{noMessage:"No message service in preview mode",noLink:"No linking in preview mode"},video:{watchAll:"Please watch the video completely"},reward:{get:"Get Reward",yuan:"yuan",weChatName:"WeChat demo name"},global:{invalidReward:"Can not access gift via shared link",upgrade:"Data version changed, can continue to access it only after the design side saves it again.",timeOver:"Exceeded time limit",answerRequired:"This question requires an answer.",antiAgain:"You have already taken this survey.",authFailed:"Authorization failed",downloadError:"Download data failed, please make sure the network is good and try again.",start:"Start",next:"Next",previous:"Previous",go:"Proceed",done:"Done",notTarget:"Sorry, you do not match the criteria for this survey. We sincerely thank you and appreciate your time, look forward to your future participation in our online surveys!",backTest:"Back Test",invalidUrl:"Invalid survey url",tryAgain:"Operation failed,try again later.",clientError:"The survey terminal specified in the questionnaire is inconsistent with this terminal. Please confirm whether your link address is correct."},memory:{title:"Recover",message:"Previous unfinished answer, Do we recover it?",sure:"Recover",deny:"Start new"},langResume:{title:"Switching language, please wait."},backEnd:{response_overflow:"Sorry, this survey has reached maximum number of responses. We sincerely thank you and appreciate your time and look forward to your future participation in our online surveys!",collector_full:"Sorry, this survey has reached maximum number of responses. We sincerely thank you and appreciate your time and look forward to your future participation in our online surveys!",survey_not_exist:"Sorry, this survey may already been closed, you can renamed or delete it.",response_status_error:"Submition has been declined. Please try again.",quota_not_match:"quota_not_match",internal_server_error:"An error occurred with the server.",survey_offline:"Sorry, this survey may already be closed. Thanks for your participation",diagram_has_errors:"Some parts have logic error. please correct the error and launch the survey again.",interviewee_missing_error:"Channel mismatch",interviewee_invalid_error:"Reply is not allowed under this channel, please open this link in wechat app.",multi_responses_error:"You have already taken this survey. Thanks for your participation.",api_rate_limit_error:"Pinging the API too often.",response_already_examined:"Sorry, you do not match the criteria for this survey. We sincerely thank you, appreciate your time and look forward to your future participation in our online surveys!",question_missing_error:"Validation object not found",gen_validation_error:"Failed to get the verification code picture",invalid_phone_number_error:"The format of the phone number provided is incorrect.",sms_gateway_error:"SMS could not be sent",invalid_code_error:"Invalid data has been entered into the form, the validation fails.",quota_full:"Sorry, this survey has reached the maximum number of responses. We sincerely thank you, appreciate your time and look forward to your future participation in our online surveys!",reward_type_error:"Invalid reward type",already_been_verificated:"The reward has been verificated and cannot be used again",red_envelope_duplicated:"You have participated in this activity and cannot claim it again. Thank you for your participation.",red_envelope_expired:"Reward Code has expired.",red_envelope_received_by_yourself:"You can't scan the code repeatedly to get rewards.",red_envelope_received_by_others:"You cannot scan other people's reward codes.",red_envelope_intercepted:"There may be irregularity in the wechat account, resulting in the failure of red envelope issuance.",red_envelope_send_error:"Wechat account may be abnormal.",oauth_error:"failed to authorize"}}};let r="en_us",o=i[r];function a(t){t&&(Object.keys(t).forEach((e=>{i[e.toLowerCase()]=t[e]})),o=i[r])}function s(){return{...i}}function c(t){r=t.toLowerCase(),o=i[r]||i.en_us}function u(){return r}},5684:(t,e,n)=>{"use strict";n.d(e,{Ci:()=>S,Qz:()=>I,cA:()=>b,gp:()=>E,wr:()=>T}),n(7768);var i=n(4708),r=n(6332),o=n(3080),a=n(8084),s=n(556),c=n(3001),u=n(5776),l=n(8737),d=n(7404),f=n(2352),p=n(984);const g=["select","icon_mark","value_mark","upload","menu","slide_rate"],m=["fill","verify"];function h(t){const{type:e}=t;return"region"===e?"predef":e}function v(t,e){const{origin:n}=e;let i;if(e.isOtherOpt)i=n.optionType;else if(!0===n.useComment)i="option_comment";else{const{type:e}=t;i="region"===e?"predef_region":g.includes(e)?"option":m.includes(e)?"comment":e}return i}function y(t,e){const n=function(t){const{loop:e}=t;let n;return e&&(n=e.replacements.map((t=>({node_id:t.loopNodeId.toLowerCase(),index:t.index,option_id:t.uuid.toLowerCase()})))),n}(t),{nodeUuid:i}=t,r=e&&e(t);return{type:h(t),node_id:i.toLowerCase(),items:r,start_time:t.startTime,cost_time:Math.round(t.costTime||0),loop_ctxs:n}}function _(t,e){const n=(0,i.Ml)(e),r=(0,p.O_)(e,t),o={value:(0,f.oV)(r)?"":r,other:!!e.isOtherOpt,type:v(t,e)};if(o.option_id=e.uuid.toLowerCase(),(0,s.is)(e,"xid"in e)){const{optionY:t,optionX:n,xid:i,yid:r}=e;o.row_option_id=r.toLowerCase(),o.col_option_id=i.toLowerCase(),o.row_content=(0,c.Qr)(t.text),o.col_content=(0,c.Qr)(n.text),o.content=o.col_content+"-"+o.row_content}else o.content=n||(0,c.Qr)(e.text);return e.visible||(o.hidden=!0),o}function w(t){return(0,i.gr)(t).reduce(((e,n)=>{var i;return(n.selected||(0,p.QX)(n,t)||void 0===n.selected&&!0===(null===(i=null==n?void 0:n.__cache)||void 0===i?void 0:i.selected))&&e.push(_(t,n)),e}),[])}const x={};function b(t){const e=x[t.type];return e&&e(t)}function T(t){return"object"==typeof t.value?JSON.stringify(t.value):t.value}function S(t,e){return"all"===e||(t?"check"===e:"normal"===e)}async function E(t,e="all",n="committed_url",i=!1){const a=function(t,e){const n=[];return t.renderList.forEach((t=>{if(!S(t.checkMode,e))return;if("data"===t.type)return;const i=b(t);i&&n.push(i)})),n}(t,e),c=i?void 0:await(0,l.ML)(t,n),u={backend_request_params:await(0,l.m0)(t),webhook_params:c,answers:a,var_map_info:(0,o.oJ)(t,e),options_display_info:(0,r.Ud)(t,e),query_params:(0,d.uK)(),time_consuming:Math.ceil((Date.now()-t.startTime)/1e3),status:t.responseStatus};return(0,s.OI)(u.answers,((t,e)=>{"string"==typeof t[e]&&(t[e]=t[e].replace(/,/g,",").replace(/[\r\n]/g," "))})),u}function I(t){switch(t.type){case"verify":return!!t.code;case"location":case"region":case"area":return!!t.value;case"describe":case"lottery":case"end":return!0;default:return(0,i.W4)(t)||(0,i.Om)(t)}}x.select=x.select_image=x.menu=x.select_icon=x.hot_spot=t=>{const e=y(t,w);if((0,u.cd)(t.origin)&&e.items){let t=!1,n=!1;e.items.forEach((e=>{"comment"!==e.type&&(e.hidden?t=!0:n=!0),delete e.hidden})),t&&n&&(e.items=e.items.filter((t=>!t.hidden)))}return e},x.cascade=x.icon_mark=x.value_mark=x.matrix=x.weight=x.slide_rate=x.sequence=x.upload=x.heat_map=x.fill=x.max_diff=t=>{const e=y(t,w);return e.items&&e.items.forEach((t=>{delete t.hidden})),e},x.location=t=>{const e=y(t,(e=>{const n=(0,i.gr)(t).find((t=>t.selected));return n?[_(e,n)]:[]})),{position:n,indexes:r}=t;return n&&(n.indexes=r,e.location=n),e},x.region=t=>{const e=x.location(t);return e.region=(0,a.Qf)(t.value),e},x.area=t=>x.location(t),x.data=t=>y(t,(t=>(0,i.gr)(t).reduce(((e,n)=>(n.selected&&e.push(_(t,n)),e)),[]))),x.verify=t=>{const e=y(t),{phoneNumber:n,validateType:i,code:r}=t;return"sms"===i&&(e.phone_num=n),e.code=r,e},x.end=t=>({type:h(t),node_id:t.nodeUuid.toLowerCase(),start_time:t.startTime,cost_time:0}),x.logic=t=>{const e=y(t);return e.logic_result=t.logicResult,e}},9536:(t,e,n)=>{"use strict";n.d(e,{I:()=>u,e:()=>p}),n(5960),n(9952);var i=n(4708),r=n(1768),o=n(4196),a=n(5776),s=n(8856),c=n(984);function u(){return{value:"",miniValue:"",filePath:"",progress:0,isImage:!1,fileType:"",fileName:"",fileLimits:[]}}function l(t){(0,s.e)(t,{selected:!1,value:""})}function d(t,e,n){const o=(0,i.wR)(e);let a=!1,s=!1;return o.forEach((e=>{e!==t&&(0,r.A9)(e,t)&&(e.isOtherOpt?(s=!0,l(e)):(a=!0,n(e)))})),{normalPushed:a,otherPushed:s}}const f={};async function p(t,e){if(!(0,c.g7)(t,e))return;const n=f[e.type];n?await n(t,e):function(t,e){d(t,e,l)}(t,e)}f.heat_map=(t,e)=>{d(t,e,(t=>{(0,s.e)(t,{point:null,value:""})}))},f.upload=async(t,e)=>{const{normalPushed:n}=d(t,e,(t=>{(0,s.e)(t,{value:"",miniValue:"",filePath:"",progress:0,isImage:!1,fileType:"",fileName:"",fileLimits:[],image:null})}));n&&await(0,a.SY)(e)},f.weight=(t,e)=>{const{normalPushed:n}=d(t,e,(t=>{(0,s.e)(t,{value:""})}));n&&e.options.forEach((t=>{(0,s.e)(t,{percent:(0,i.e$)(Number(t.value),e.weightTotal)})}))},f.sequence=(t,e)=>{const{normalPushed:n}=d(t,e,(t=>{(0,s.e)(t,{selected:!1,sortNo:-1})}));n&&e.options.sort(((t,e)=>t.number>e.number?1:-1))},f.matrix=(t,e)=>{(0,i.wR)(e).forEach((e=>{if(e===t)return;const n=(0,r.I9)(t.origin)||(0,r.E5)(t,e),i=(0,r.I9)(e.origin)||(0,r.E5)(e,t),o=(0,r.IN)(t,e)||(0,r.IN)(t,e.optionX)||(0,r.IN)(t,e.optionY)||(0,r.IN)(t.optionX,e)||(0,r.IN)(t.optionY,e)||(0,r.u6)(t,e);(n||i||o)&&l(e)}))},f.cascade=(t,e)=>{const n=(t,e)=>{if(!e||!e.list)return[];if(e.list.find((e=>e.option===t)))return[...e.list];for(const i of e.list){const e=n(t,i);if(e.length>0)return e}return[]},i=e.otherOptions,a=i.includes(t)?[...e.cascade.list]:n(t,e.cascade);i.forEach((t=>{a.push({option:t})})),a.forEach((n=>{n.option!==t&&(0,r.A9)(n.option,t)&&(n.display?(0,o.gF)(n,e):l(n.option))}))}},4384:(t,e,n)=>{"use strict";n.d(e,{Az:()=>i,ay:()=>o,yK:()=>r});const i={refresh:!1,result:!1},r={refresh:!0,result:!0},o={refresh:!1,result:!0}},7801:(t,e,n)=>{"use strict";n.d(e,{_:()=>s,i:()=>a});var i=n(5776),r=n(8856),o=n(5684);function a(t,e){const{nodes:n}=t.parent;return!n.includes(t)&&(e&&(0,r.E3)().uploadLog("".concat(t.runtimeNodeName,": try to change answer after question leaving and rejected"),"warning"),!0)}function s(t,e){const n=t.renderList.filter((t=>!((0,i.S)(t)||!(0,o.Ci)(t.checkMode,e)||!(0,i.K6)(t.origin)||(0,o.Qz)(t))));if(n.length>0){const t=n.map((t=>t.runtimeNodeName)).join();(0,r.E3)().uploadLog("answer lack for: ".concat(t),"warning")}}},1548:(t,e,n)=>{"use strict";n.d(e,{S:()=>d}),n(1088);var i=n(9216),r=n(5776),o=n(8856),a=n(5548),s=n(3001),c=n(5684);function u(t){return t.code?t.phone_num?t.phone_num+" "+t.code:t.code:t.location?(0,a.A)(t.location.address):""}function l(t,e){const n=(0,o.E3)().startState,a=[{title:(0,s.Qr)(n.title),description:(0,s.Qr)(n.description)}];return e.forEach((e=>{const n=(0,i.Uq)(t,e);if(!(0,r.S)(n)){const t={title:(0,s.Qr)(n.title)||n.runtimeNodeName,description:(0,s.Qr)(n.description),value:u(e),options:e.items?e.items.map((t=>({text:t.row_content||t.col_content?t.row_content+"-"+t.col_content:t.content,value:(0,c.wr)(t).toString()}))):[]};a.push(t)}})),a}async function d(){const{surveyState:t}=(0,o.E3)();if(!t)return null;const e=await(0,c.gp)(t,"all");return{result:e,progress:t.progress,nodes:l(t,e.answers)}}},7788:(t,e,n)=>{"use strict";n.d(e,{YZ:()=>m,qc:()=>h,qo:()=>g});var i=n(6072),r=n(4060),o=n(9677),a=n(6784),s=n(3001),c=n(6496),u=n(8856),l=n(568);const d={valid:!0,message:""},f="vital:",p="alert:";async function g(t,e){if(t){const{parent:n}=e;return(0,i.eU)(n,t,null,!1)}return d}async function m(t,e){if(t){const{message:n}=t;return await(0,r.wx)(e,t)?d:{valid:!1,message:n||(0,c.GS)(l.CW.verify.invalidFailed)}}return d}async function h(t,e=!1){if(!t.parent.nextLoading&&!e)return d;t.validateFailed=!1;const{origin:n,parent:i}=t,{validation:r}=n;if(!r)return d;const{request:c,logic:l,noPreventNext:h}=r;let v=await g(c,t);return v.valid&&(v=await m(l,i)),!v.valid&&(t.validateFailed=!0,h&&(v=d,(0,a.mU)(i,t)),v.dueToNode=t,await async function(t,e){return"string"!=typeof t.message||(t.message=await(0,s.Oj)(t.message,{state:e}),(0,o.mK)(t.message)||(t.message=await(0,s.qQ)(t.message,{state:e})),t.message.startsWith(f)?(t.type="vital",t.message=t.message.substring(f.length)):t.message.startsWith(p)&&(t.type="alert",t.message=t.message.substring(p.length))),t}(v,i),t.validateFailTimes+=1,(0,o.mK)(v.message))?((0,u.W4)().hook.beforeForceLeave(),(0,u.W4)().app.openWebLink(v.message),(0,u.E3)().customAbort(),v):v}},9968:(t,e,n)=>{"use strict";n.d(e,{Oe:()=>C,c9:()=>N,iW:()=>R}),n(5960),n(9624),n(9952);var i=n(4708),r=n(9677),o=n(5776),a=n(7788),s=n(3001),c=n(556),u=n(8856),l=n(6496),d=n(568),f=n(7320),p=n(984),g=n(1768),m=n(1344),h=n(6276);const v={valid:!0,message:""};function y(t){if(!(0,o.K6)(t.origin))return v;const e=(0,i.Om)(t)||(0,i.W4)(t);return{valid:e,message:e?"":(0,l.GS)(d.CW.global.answerRequired),dueToNode:t}}function _(t,e){if((0,h.IN)(t)){const{otherOptions:e}=t;if(e.some((t=>t.selected)))return 0}return e}async function w(t){if(!(0,o.K6)(t.origin)&&!(0,i.W4)(t))return v;const{options:e}=t,{parent:n}=t;let r=await(0,s.W0)(t.origin.fillMin,{state:n});r=r||e.length,r>e.length&&(r=e.length),r=_(t,r);let a=0;const c=(0,l.GS)(d.CW.fill.itemInputRequired);let u=!1;for(const n of e)(0,p.QX)(n,t)?(O(n,c),a+=1):!0===n.origin.fillRequired&&(k(n,c),u=!0);return r>a?{valid:!1,message:(0,l.GS)(d.CW.fill.inputLimitMin,{min:r}),dueToNode:t}:u?{valid:!1,message:(0,l.GS)(d.CW.fill.inputRequired),dueToNode:t}:v}function x(t,e=!1){const n=(0,h.IN)(t)?t.otherOptions:[],r=e?n:(0,i.wR)(t),a=(0,o.K6)(t.origin),s=(0,l.GS)(d.CW.fill.itemInputRequired),c=r.filter((e=>{const n=function(t,e){const n=!0===t.origin.fillRequired,r=t.selected;return n&&(r||(0,i.yg)(t.origin)&&e)}(e,a)&&!(0,p.QX)(e,t);return n?k(e,s):O(e,s),n}))[0],u=!c;return u?v:{valid:u,message:(0,l.GS)(d.CW.fill.inputRequired),dueToNode:t,dueToOption:c}}async function b(t,e=!1){const n=e?t.options:(0,i.wR)(t),o=[];for(const e of n){let n={valid:!0};(0,p.QX)(e,t)&&(n=await(0,r.uC)(e,t)),n.valid?O(e,n.message):(k(e,n.message),o.push(n))}return o[0]||v}async function T(t){return(0,o._A)(t.origin)&&(0,i.Om)(t)?S(t):v}async function S(t){if(function(t){if("matrix"===t.type)return!1;const e=(0,i.wR)(t).find((t=>t.selected));return!(!e||!(0,g.I9)(e.origin))}(t))return v;const{min:e}=await(0,o.EH)(t,t.parent);return(0,i.wR)(t).filter((t=>!(0,i.yg)(t.origin))).filter((t=>t.selected)).length>=e?v:{valid:!1,message:(0,l.GS)(d.CW.select.limitMin,{min:e}),dueToNode:t}}const E={};async function I(t,e){if(!e.list)return v;const{multiple:n,min:i,max:o,required:a}=e,s=e.text?(0,l.GS)(d.CW.menu.listItem)+e.text:(0,l.GS)(d.CW.menu.topList),c=e.list.filter((t=>t.selected));for(const e of c){const{option:n}=e;if(n.origin.fillRequired&&!(n.value||"").toString().trim())return{valid:!1,dueToNode:t,message:(0,l.GS)(d.CW.menu.inputReq,{text:n.text})};const i=await(0,r.uC)(n,t);if(!i.valid)return{...i,message:(0,l.GS)(d.CW.menu.inputRule,{text:n.text,rule:i.message})}}const u=c.length;if(a&&0===u)return{valid:!1,dueToNode:t,message:(0,l.GS)(d.CW.menu.required,{text:s})};if(n&&u<i&&u>0)return{valid:!1,dueToNode:t,message:(0,l.GS)(d.CW.menu.requiredBetween,{text:s,min:i,max:o})};for(const n of e.list){if(!n.selected)continue;const e=await I(t,n);if(!e.valid)return e}return v}function k(t,e){t.errorMessage!==e&&(0,u.e)(t,{errorMessage:e})}function O(t,e){t.errorMessage===e&&(0,u.e)(t,{errorMessage:""})}function C(t,e){(0,u.E3)().locateError(t,e)}async function L(t,e){if((0,o.S)(t)||t.readonly)return v;const n=function(t){const{origin:{canSkipVideo:e},video:n}=t;return e||!n||n.ended?v:{valid:!1,message:(0,l.GS)(d.CW.video.watchAll),dueToNode:t}}(t);if(!n.valid)return n;const i=E[t.type];let r=i?await i(t):v;return r.valid&&e&&(r=await(0,a.qc)(t)),r.valid&&k(t,r.message),r}E.select=async t=>{const e=y(t);if(!e.valid)return e;let n=await T(t);return n.valid?(n=x(t,!1),n.valid?b(t,!1):n):n},E.select_image=t=>E.select(t),E.fill=async t=>{const e=y(t);if(!e.valid)return e;let n=await w(t);return n.valid?(n=x(t,!0),n.valid?b(t,!1):n):n},E.value_mark=async t=>{const e=y(t);if(!e.valid)return e;let n=await w(t);return n.valid?(n=x(t,!0),n.valid?b(t,!0):n):n},E.icon_mark=async t=>{const e=await E.value_mark(t);return e.valid?(0,o.K6)(t.origin)&&t.options.some((t=>!("rating-nps"===t.iconName)&&"0"===t.value))?{valid:!1,message:(0,l.GS)(d.CW.global.answerRequired),dueToNode:t}:v:e},E.sequence=async t=>{let e=y(t);if(!e.valid)return e;const{options:n,origin:i}=t;let r=(0,o.K6)(i)?i.rankCount||n.length:0;const a=n.length;r>a&&(r=a),r=_(t,r);let s=0;const c=n.filter((t=>t.sortNo>0)).sort(((t,e)=>t.sortNo>e.sortNo?1:-1));for(let t=0;t<c.length&&c[t].sortNo===t+1;t++)s++;return r>s?{valid:!1,message:(0,l.GS)(d.CW.rank.limitMin,{min:r}),dueToNode:t}:(e=x(t,!0),e.valid?b(t,!0):e)},E.matrix=async t=>{const e=y(t);if(!e.valid)return e;let n=await async function(t){const{origin:e}=t;return(0,o.cd)(e)?v:(0,o.K6)(e)||(0,i.Om)(t)?(0,o.Un)(e)?S(t):(0,o.ct)(e)||(0,o.gd)(e)||(0,o.cx)(e)?function(t){let e,n,i;(0,o.ct)(t.origin)?(e="yid",n=t.renderOptionsY,i=!1):(0,o.gd)(t.origin)?(e="xid",n=t.renderOptionsX,i=!0):(0,o.cx)(t.origin)&&(t.renderOptionsX.length>t.renderOptionsY.length?(e="yid",n=t.renderOptionsY,i=!1):(e="xid",n=t.renderOptionsX,i=!0));const r=t.options;for(const o of n){const n=o.uuid;if(!r.some((t=>t.selected&&(0,c.oj)(t[e],n))))return{valid:!1,message:i?(0,l.GS)(d.CW.matrix.colLimitMin,{min:1}):(0,l.GS)(d.CW.matrix.rowLimitMin,{min:1}),dueToNode:t}}return v}(t):async function(t){const e=(0,o.S2)(t.origin);let{min:n}=await(0,o.EH)(t,t.parent);const i=e?"xid":"yid",r=t[e?"renderOptionsX":"renderOptionsY"],a=t[e?"renderOptionsY":"renderOptionsX"];n>a.length&&(n=a.length);const s=t.options;for(const o of r){const r=o.uuid;if(s.filter((t=>t.selected&&(0,c.oj)(t[i],r))).length<n)return{valid:!1,message:e?(0,l.GS)(d.CW.matrix.colLimitMin,{min:n}):(0,l.GS)(d.CW.matrix.rowLimitMin,{min:n}),dueToNode:t}}return v}(t):v}(t);return n.valid?(n=x(t,!0),n.valid?b(t,!0):n):n},E.region=async t=>!(0,o.K6)(t.origin)||t.value?v:{valid:!1,message:(0,l.GS)(d.CW.global.answerRequired),dueToNode:t},E.location=async t=>{const e=await E.region(t);return e.valid||(e.message=(0,l.GS)(d.CW.locate.required)),e},E.upload=async t=>{const e=y(t),{options:n}=t;if(!e.valid)return e;let r=!0,a="";const s=(0,i.iQ)(t,!0);if(!(0,o.K6)(t.origin)&&0===s)return v;const c=await(0,o.YP)(t,t.parent),{max:u}=c,f=_(t,c.min);let g=0;a=(0,l.GS)(d.CW.upload.uploadRequired);let m=!1;for(const e of n)(0,p.QX)(e,t)?(O(e,a),g+=1):!0===e.origin.fillRequired&&(k(e,a),m=!0);return s<f?(r=!1,a=(0,l.GS)(d.CW.upload.amountLimitMin,{min:f})):s>u?(r=!1,a=(0,l.GS)(d.CW.upload.amountLimitMax,{max:u})):(r=!0,a=""),f>g?{valid:!1,message:(0,l.GS)(d.CW.upload.amountLimitMin,{min:f}),dueToNode:t}:m?{valid:!1,message:(0,l.GS)(d.CW.upload.uploadRequired),dueToNode:t}:{valid:r,message:a,dueToNode:t}},E.verify=async t=>{if((0,u.E3)().preview||(0,u.W4)().dev.infer){if(!t.code)return{valid:!1,message:(0,l.GS)(d.CW.global.answerRequired),dueToNode:t}}else{const e={valid:!1,message:(0,l.GS)(d.CW.verify.invalidFailed),dueToNode:t},{validateType:n}=t,{code:i,parent:r,nodeUuid:o}=t,a=()=>(t.validateFailTimes+=1,e);if("image"===n){const{serverValidations:n}=t;if(!n)return e;{const{id:t}=n;try{return await(0,f.I1)({code:i},t),v}catch(t){return a()}}}else if("password"===n){const{transactionID:t}=r,e={response_id:t,question_id:o,code:i};try{return await(0,f.eY)(e),v}catch(t){return a()}}else if("sms"===n){const{serverValidations:n}=t;if(!n)return e;{const{id:t}=n;try{return await(0,f.I1)({code:i},t),v}catch(t){return a()}}}}return v},E.menu=E.select,E.area=async t=>y(t),E.select_icon=async t=>{const e=y(t);return e.valid?T(t):e},E.weight=async t=>{if(!(0,o.K6)(t.origin)&&!(0,i.W4)(t))return v;const e=y(t);if(!e.valid)return e;let{weightTotal:n}=t;n=_(t,n);const{options:r}=t,a=r.reduce(((t,e)=>t+Number(e.value)),0);if(0===n){const e=x(t,!1);if(!e.valid)return e}return n>a&&!0!==t.origin.relax?{valid:!1,message:(0,l.GS)(d.CW.weight.totalLimitMin,{min:n}),dueToNode:t}:v},E.cascade=async t=>{if(!(0,o.K6)(t.origin)&&!(0,i.Om)(t))return v;const{cascade:e}=t,n=y(t);return n.valid?I(t,e):n},E.hot_spot=E.select,E.heat_map=async t=>y(t),E.slide_rate=E.value_mark,E.max_diff=async t=>{const e=t.tasks.every((t=>t.done));return{valid:e,dueToNode:e?null:t,message:e?"":(0,l.GS)(d.CW.maxDiff.all)}};const N=(0,c.Cu)((async(t,e)=>{if(e&&k(e,(await(0,r.uC)(e,t)).message),t){const e=await R([t]);e.message||k(t,e.message),(0,m.ew)(t)}}),250);async function R(t,e=!1,n=!1){const i=[];for(const r of t){const t=await L(r,e);t.valid||(n&&k(t.dueToNode,t.message),i.push(t),(0,m.ew)(r))}return i[0]||v}},9677:(t,e,n)=>{"use strict";n.d(e,{KA:()=>c,_u:()=>l,mK:()=>u,uC:()=>m}),n(7768),n(9624);var i=n(3001),r=n(6496),o=n(4708),a=n(568),s=n(2352);function c(t){return/^1[0-9][0-9]\d{8}$/i.test(t)}function u(t){return/[-a-zA-Z0-9@:%_+.~#?&/=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_+.~#?&/=]*)?/gi.test(t)}async function l(t,e){const{parent:n}=e,{origin:r}=t;let o=await(0,i.W0)(r.fillStart,{state:n}),a=await(0,i.W0)(r.fillEnd,{state:n});return(0,s.oV)(o)&&(o=-1/0),(0,s.oV)(a)&&(a=1/0),{start:o,end:a}}function d(t,e,n){return e<=t&&n>=t}function f(t,e,n){return d(t,e,n)?"":(0,r.GS)(a.CW.fill.valueLimit,{min:e,max:n})}const p={};async function g(t,e,n){const{itemsMax:i,itemsMin:s}=await(0,o.jJ)(e,n),c=t.split(/[,,]/).reduce(((t,e)=>e.trim()?t+1:t),0);let u="";return(c<s||c>i)&&(u=(0,r.GS)(a.CW.fill.itemsLimit,{min:s,max:i})),{valid:!u,message:u}}async function m(t,e){const n=(0,s.Wo)(t.value),{origin:i}=t,r=i.fillType,o=p[r];if(!o||(0,s.oV)(n)&&"auto_complete"!==r)return{valid:!0,message:""};const{parent:a}=e;a.context.option=t;const c=await o(n,t,e);return a.context.option=null,c.valid||(c.dueToOption=t,c.dueToNode=e),c}p.chars=async(t,e,n)=>{const{start:i,end:o}=await l(e,n);let{tolerance:s}=e.origin;s=s||[];const c=function(t,e=[]){if(0===e.length)return"";t=t.replace(/[\s,,]/g,"");let n="";const i=[];e.includes("number")&&(n+="0-9.",i.push((0,r.GS)(a.CW.fill.number))),e.includes("alphabet")&&(n+="a-zA-Z",i.push((0,r.GS)(a.CW.fill.alphabet))),e.includes("chinese")&&(n+="一-龥",i.push((0,r.GS)(a.CW.fill.chinese)));const o=i.join(" "),s=new RegExp("^["+n+"]+$");return t.match(s)?"":(0,r.GS)(a.CW.fill.onlyAllow,{text:o})}(t,s)||function(t,e,n){return d(t.length,e,n)?"":(0,r.GS)(a.CW.fill.charsLimit,{min:e,max:n})}(t,i,o);return{valid:!c,message:c}},p.email=async t=>{const e=function(t){return/^[\w-\.]+@([\w-]+\.)+[\w-]+$/i.test(t)}(t);return{valid:e,message:e?"":(0,r.GS)(a.CW.fill.needEmail)}},p.float=async(t,e,n)=>{if(!function(t){return/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(t)}(t))return{valid:!1,message:(0,r.GS)(a.CW.fill.inputDecimal)};const{origin:i}=e;if(i.scale&&!function(t,e){return new RegExp("\\d+\\.\\d{".concat(e,"}$")).test(t)}(t,i.scale))return{valid:!1,message:(0,r.GS)(a.CW.fill.inputDecimalDigits,{scale:i.scale})};const{start:o,end:s}=await l(e,n),c=f(Number(t),o,s);return{valid:!c,message:c}},p.integer=async(t,e,n)=>{if(!function(t){return/^[-]?\d+$/.test(t)}(t=t.replace(/\s/g,"")))return{valid:!1,message:(0,r.GS)(a.CW.fill.inputInteger)};const i=Number(t),{start:o,end:s}=await l(e,n),c=f(i,o,s);return{valid:!c,message:c}},p.none=async()=>({valid:!0,message:""}),p.phone_number=async t=>{const e=c(t);return{valid:e,message:e?"":(0,r.GS)(a.CW.fill.needPhoneNumber)}},p.postcode=async t=>{const e=function(t){return/^[0-9][0-9]{5}$/.test(t)}(t);return{valid:e,message:e?"":(0,r.GS)(a.CW.fill.needZipCode)}},p.url=async t=>{const e=u(t);return{valid:e,message:e?"":(0,r.GS)(a.CW.fill.needUrl)}},p.auto_complete=async(t,e,n)=>!t&&e.atcpTrigger?{valid:!1,message:(0,r.GS)(a.CW.fill.atcpLabelOnly),dueToNode:n,dueToOption:e}:g(t,e,n),p.list_select=(t,e,n)=>g(t,e,n)},984:(t,e,n)=>{"use strict";n.d(e,{O_:()=>s,QX:()=>l,g7:()=>o}),n(9624);var i=n(2352),r=n(3001);function o(t,e){return t.selected||l(t,e)}const a={};function s(t,e){let n="";const i=a[e.type];return n=t.isOtherOpt||!i?t.value:i(t),"string"==typeof n&&(n=(0,r.Qr)(n)),n}function c(t,e){let n=s(t,e);return"string"==typeof n&&(n=n.trim()),!(0,i.oV)(n)}a.upload=t=>t.filePath,a.sequence=t=>t.sortNo,a.heat_map=t=>t.point,a.max_diff=t=>t.records;const u={};function l(t,e){return(u[e.type]||c)(t,e)}u.sequence=(t,e)=>-1!==t.sortNo&&c(t,e)},9796:(t,e,n)=>{"use strict";n.d(e,{Co:()=>f,GM:()=>m,iO:()=>p}),n(9952);var i=n(5776),r=n(556),o=n(2331),a=n(9376),s=n(6764),c=n(3001),u=n(4708),l=n(4316),d=n(3080);async function f(t,e){const{options:n,passRefs:i,refMaps:r}=await(0,a.q0)(t,e.origin,null,!0);(0,d.GO)(e,r);const o=await(0,l.o9)(e,n,i);return(0,s.uQ)(e,o)}function p(t,e,n=!1){const{loopStack:i}=e;return i.find(((e,o)=>(!n||o===i.length-1)&&(0,r.oj)(e.node.nodeUuid,t.nodeUuid)))}async function g(t,e,n,i,r,o){const a=(0,u.C2)(r),s={state:t,usage:{node:e,optionId:r.uuid}},l=await(0,c.E3)(a.text,s,"WRAPPED_URL"),d=await(0,c.E3)(r.text,s,"WRAPPED_URL"),f=await(0,c.E3)(a.value+"",s,"WRAPPED_URL");return{loopNodeId:n,outerIndex:o&&o.currentIndex,outerLoopId:o&&o.node.nodeUuid,index:i,uuid:r.uuid,refOptId:r.refOptId,refText:l||void 0,text:d||"",value:f,number:a.number,image:a.image,label:r.label,mapping:r.origin.isRef?a.mapping:r.mapping}}const m={_skip:(t,e,n)=>o.G.findNext(t,e,n),async _init(t,e,n){const{varList:o,origin:{loopStart:a,destList:s}}=e;if(0===o.length)return m._skip(t,e,n);const{loopStack:c}=n,u=s.find((t=>(0,r.oj)(t.selfPortId,a.uuid))).destInputId,l=(0,i.gR)(t,u),d=o[0],{origin:f}=e,p=c[c.length-1],h=await g(n,e,f.nodeUuid,0,d,p),v={destInputId:u,node:f,varList:o,replacements:p?[...p.replacements,h]:[h],currentIndex:0};return c.push(v),{target:l,loop:(0,r.O0)(v),loopStack:(0,r.O0)(c)}},async _increase(t,e,n){const{nodeUuid:o}=e,{loopStack:a}=n,s=a[a.length-1],{varList:c,replacements:u,destInputId:l}=s,d=s.currentIndex+=1,f=c[d],p=a[a.length-2],m=await g(n,e,o,d,f,p),h=(0,i.gR)(t,l);return u[u.length-1]=m,{target:h,loop:(0,r.O0)(s),loopStack:(0,r.O0)(a)}},async _end(t,e,n){const{loopStack:i}=n;i.pop();const a=await o.G.findNext(t,e,n);if(i.length>0){const t=(0,r.O0)(i);a.loop=t[t.length-1],a.loopStack=t}return a},findNext(t,e,n){const i=p(e,n,!0);if(i){const{currentIndex:r,varList:o}=i;return r===o.length-1?m._end(t,e,n):m._increase(t,e,n)}return m._init(t,e,n)}}},9947:(t,e,n)=>{"use strict";n.d(e,{kF:()=>T,WU:()=>E});var i=n(5776);function r(t,e,n,r,o){return o||(o=(0,i.MR)(t,e,n.uuid)),o||r.origin.parentRandomId||e.length&&(o=(0,i.gR)(t,e[e.length-1].destInputId)),o}var o=n(4708),a=n(6276);const s=["weight","slide_rate","upload","value_mark","icon_mark","fill","sequence"],c={async findNext(t,e){const{destList:n,output:c}=e.origin,u=(0,a.IN)(e)?e.otherOptions:[],l=s.includes(e.type)?u:(0,o.wR)(e),d=l&&l.find((t=>t.selected));return{target:r(t,n,c,e,d&&(0,i.MR)(t,n,d.uuid))}}},u={async findNext(t,e,n){const{origin:{destList:r,parentRandomId:a}}=e,s=(0,o.GE)(e);let u=s&&(0,i.MR)(t,r,s.uuid);return u||(u=(await c.findNext(t,e,n)).target),u||!r.length||a||(u=(0,i.gR)(t,r[0].destInputId)),{target:u}}};var l=n(2331),d=(n(2048),n(4060));const f={async findNext(t,e){const{origin:n,parent:r}=e,{options:o,output:a,destList:s,logicType:c,reverse:u,outputN:l}=n,f={logicType:c,reverse:u,options:o},p=await(0,d.wx)(r,f);e.logicResult=p;const g=p?a:l;return{target:(0,i.MR)(t,s,g.uuid)}}};var p=n(6940),g=n(9796);n(5960),n(9952);const m={async findNext(t,e){const{origin:n,options:o,otherOptions:a}=e,{destList:s,output:c}=n,u=[...o.filter((t=>t.selected)).sort(((t,e)=>t.cascadePath.length<e.cascadePath.length?1:-1)),...a.filter((t=>t.selected))];let l;for(const e of u)if(l=(0,i.MR)(t,s,e.uuid),l)break;return{target:r(t,s,c,e,l)}}};var h=n(9216),v=n(556),y=n(8184);const _={cascade:m,logic:f,loop:g.GM,sequence:u,random:p.qM};function w(t){const e=_[t];if(!e)throw new Error("lack next rules for this type of node...");return e}["describe","check","end","start","verify","data","max_diff"].forEach((t=>{_[t]=l.G})),["weight","slide_rate","upload","value_mark","icon_mark","fill","select_image","select","region","location","lottery","matrix","menu","area","select_icon","hot_spot","heat_map"].forEach((t=>{_[t]=c}));const x=["check","break_point"];function b(t,e){return"loop"===t.type?!(0,g.iO)(t,e):!x.includes(t.type)}function T(t,e,n){return E(t,(0,y.e_)({target:n},e),e)}async function S(t,e,n,r){const{target:o,loop:a,random:s}=r,c=e.random;if(o){const t=e.loop,{loopStack:n}=e;!a&&t&&(0,i.uK)(o,e.origin)&&(r.loopStack=n,r.loop=t),o.parentRandomId&&c&&!s&&(r.random=c)}else if(c){const e=(0,v.So)(c.node.nodeUuid,n.loopStack);return E(t,(0,h.QL)(n.renderList,e),n)}return r}async function E(t,e,n){let i,r,o=e,a=w(o.type),s=!0;for(;s&&(r=await S(t,o,n,await a.findNext(t,o,n)),i=r.target,i);)b(i,n)?s=!1:(o=(0,y.e_)(r,n),a=w(i.type));return r}},2331:(t,e,n)=>{"use strict";n.d(e,{G:()=>r});var i=n(5776);const r={async findNext(t,e){const{destList:n,output:r}=e.origin;return{target:(0,i.MR)(t,n,r&&r.uuid)}}}},6788:(t,e,n)=>{"use strict";n.d(e,{I:()=>r,c:()=>o}),n(9328),n(4560),n(8712),n(9708),n(7976),n(5600),n(7452),n(8636),n(1524),n(8836),n(5040),n(1728),n(80),n(1124),n(9600),n(8932),n(9952);const i=new Set;function r(t){return i.has(t)}function o(t){i.add(t)}},6940:(t,e,n)=>{"use strict";n.d(e,{ID:()=>d,mU:()=>u,qM:()=>f}),n(9328),n(4560),n(8712),n(9708),n(7976),n(5600),n(7452),n(8636),n(1524),n(8836),n(5040),n(1728),n(80),n(1124),n(9600),n(8932),n(9952);var i=n(556),r=n(5776),o=n(2331),a=n(1344),s=n(6788);let c=[];function u(){return c}const l=new Set;function d(t,e){t&&0!==t.length&&(c=t,e.forEach((n=>{if(t.includes(n.nodeUuid)){(0,s.c)(n.nodeUuid);const t=e.find((t=>t.nodeUuid===n.parentRandomId));t&&l.add(t.nodeUuid)}})))}const f={async _init(t,e,n){const{origin:o}=e;let u=function(t,e){const{destList:n,randomStart:o}=e.origin,a={};n.forEach(((e,n)=>{if((0,i.oj)(e.selfPortId,o.uuid)){const o=(0,r.gR)(t,e.destInputId).groupNumber||"N/A_"+n,s=a[o];if(s){const t=(0,i.ec)(s.length+1);s.splice(t,0,e.destInputId)}else a[o]=[e.destInputId]}}));const s=function(t,e){const{customDestCount:n}=e.origin;if(!n||n>=t.length)return t;for(;t.length>n;)t.splice((0,i.ec)(t.length),1);return t}(Object.keys(a),e);let c=[];for(;s.length>0;){const t=(0,i.ec)(s.length);c=c.concat(a[s[t]]),s.splice(t,1)}return c}(t,e);!function(t,e){const{parent:{nodeList:n},origin:{customNodeCount:o,nodeUuid:a}}=e;l.has(a)||o&&(t.forEach((t=>{const e=[];let a=(0,r.gR)(n,t);for(;a;)e.push(a),a=(0,r.MR)(n,a.destList,a.output.uuid);for(;e.length>o;){const t=(0,i.ec)(e.length),n=e[t].nodeUuid;(0,s.c)(n),c.push(n),e.splice(t,1)}})),l.add(a))}(u,e),u=(0,a.wn)(u,e);let d=[];e.random&&(d=e.random.stack.concat(e.random));const f={stack:d,node:o,destPortIds:u,currentIndex:0};return n.push(f),{target:(0,r.gR)(t,u[0]),random:{...f}}},async _increase(t,e){e.currentIndex+=1;const{currentIndex:n,destPortIds:i}=e;return{target:(0,r.gR)(t,i[n]),random:{...e}}},_end:(t,e,n)=>o.G.findNext(t,e,n),findNext(t,e,n){const{randomList:r}=n,{nodeUuid:o}=e,a=r.find((t=>(0,i.oj)(t.node.nodeUuid,o)));if(a){const{currentIndex:i,destPortIds:r}=a;return i===r.length-1?f._end(t,e,n):f._increase(t,a)}return f._init(t,e,r)}}},7192:(t,e,n)=>{"use strict";n.d(e,{GI:()=>o,Un:()=>c}),n(9952);var i=n(5876),r=n(9348);function o(t){const e=t.split(":"),n={};if(1===e.length)n.baseId=e[0];else if(2===e.length)n.nodeId=e[0],n.nodePartId=e[1];else if(3===e.length){n.nodeId=e[0];const t=e[1];t.match(/^[a-z0-9]{8}$/)?n.optId=t:n.optFilterId=t,n.optPartId=e[2]}return n}function a(t){const e=[],n=t.getAttribute("data-ph-cfg");if(n){const t=JSON.parse(n);Object.keys(t).forEach((n=>{e.push({name:n,value:c(t[n])})}))}const i=t.getAttribute("data-img-size")||":",[r,o]=i.split(":").map((t=>Number(t))),a={phParams:e,limitSrc:Number(t.getAttribute("data-limit-src"))||0,limitRnd:t.getAttribute("data-limit-rnd")||"-1",imgHeight:o,imgWidth:r,outOfResult:!!t.getAttribute("data-out-of-result"),disorder:!!t.getAttribute("data-disorder")},s=t.getAttribute("data-limit");if(s){const[t,e,n]=s.split(":");a.limitType=Number(t)||1,a.limitStart=c(e),a.limitEnd=c(n)}return a}function s(t){["data-id","data-limit","data-limit-src","data-limit-rnd","data-ph-cfg","data-img-size","data-disorder","data-out-of-result"].forEach((e=>{t.removeAttribute(e)}))}function c(t){if(!t)return t;if(!function(t){return t.includes("var-tag")&&t.includes("data-id".concat("="))}(t=String(t)))return t;const e=document.createElement("div");e.innerHTML=t;const n=e.querySelectorAll(".var-tag");for(const t of n)if(!t.hasAttribute("data-v-config")){const e=o(t.getAttribute("data-id")),n=a(t);s(t);const c=(0,r.A)(e);t.setAttribute("data-v-id",c);const u=(0,i._m)(n);u&&t.setAttribute("data-v-config",u)}return e.innerHTML}},3048:(t,e,n)=>{"use strict";n.d(e,{W:()=>o,a:()=>a});var i=n(556),r=n(7192);function o(t){const e=t;return e.referUuid?{index:e.index,config:{phParams:[],limitEnd:e.limitEnd,limitSrc:e.limitSrc,limitStart:e.limitStart,limitType:e.limitType,disorder:e.disorder,limitRnd:e.limitRnd},identity:(0,r.GI)(e.uuid),uuid:e.referUuid}:e}function a(t,e){const n=t;if(n.limit){const t=e.find((t=>t.uuid===n.referId));return(0,i.kt)(t.referUuid)}return n.referId}},7404:(t,e,n)=>{"use strict";n.d(e,{ML:()=>d,SC:()=>u,Ww:()=>f,Yj:()=>l,gh:()=>c,uK:()=>s}),n(7768),n(9624);var i=n(568),r=n(8856),o=n(6496);let a;function s(){return a||(a=(0,r.W4)().app.getParams()),a}function c(){a=null}function u(t){const e={...t};return delete e.appid,delete e.code,delete e.state,e}function l(t){const e=Object.create(null);return"string"!=typeof t?e:(t=t.trim().replace(/^([?#&])/,""))?(t.split("&").forEach((t=>{const n=t.replace(/\+/g," ").split("=");let i=n.shift(),r=n.length>0?n.join("="):void 0;i=decodeURIComponent(i),r=void 0===r?null:decodeURIComponent(r),void 0===e[i]?e[i]=r:Array.isArray(e[i])?e[i].push(r):e[i]=[e[i],r]})),{...e}):e}function d(t){(0,r.E3)().preview||(0,r.W4)().dev.autoRun?(0,r.E3)().notify((0,o.GS)(i.CW.preview.noLink)):((0,r.W4)().hook.beforeForceLeave(),(0,r.W4)().app.openWebLink(t))}function f(t,e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){}const n=function(t){const e=[];return Object.keys(t).forEach((n=>{if(void 0!==t[n]){const i="".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(t[n]));e.push(i)}})),e.join("&")}(e),i=t.match(/\?/)?"&":"?";return t+i+n}},2172:(t,e,n)=>{"use strict";n.d(e,{a:()=>o}),n(9952);var i=n(1344),r=n(8856);async function o(t){const{currentStartTime:e,nodes:n}=t,o=(new Date).getTime(),a=Math.abs(o-e)/n.length;for(const t of n){const e=t.costTime||0;(0,r.e)(t,{costTime:e+a,endTime:o}),await(0,i.mi)(t)}(0,r.e)(t,{currentStartTime:o})}},2524:(t,e,n)=>{"use strict";n.d(e,{w:()=>s});var i=n(8856),r=n(9193),o=n(1304),a=n(6796);async function s(t){const e=(0,a.k9)(t);(0,i.e)(t,{nodes:e});let n=null;if((0,a.O2)(t)){const e=(0,a.Oi)(t);n=e&&t.parsedPayload.nodeGroups.find((t=>t.id===e.origin.groupId))}if((0,i.e)(t,{inSingleGroup:n}),n&&n.renderAsTable){const o=(0,r.y)(e,n);(0,i.e)(t,{groupTable:o})}else(0,i.e)(t,{groupTable:void 0});const s=await(0,o.uC)(t);(0,i.e)(t,{prevButton:(0,o.Qb)(t),nextButton:s,needProgressBar:t.progressBarRequired&&"lottery"!==t.current.type})}},6348:(t,e,n)=>{"use strict";n.d(e,{U3:()=>u,i:()=>s,oP:()=>c});var i=n(5776),r=n(8856);let o,a={};const s={on(t,e){a[t]||(a[t]=[]),a[t].push(e)},off(t,e){t||(a={}),a[t]&&(a[t]=e?a[t].filter((t=>t!==e)):[])},one(t,e){const n=i=>{e(i),s.off(t,n)};s.on(t,n)},trigger(t,e={}){if(a[t])try{a[t].forEach((n=>n({type:t,...e,data:e},e)))}catch(t){(0,r.E3)().uploadLog(t)}}};function c(t){"gift"!==t.type&&(s.trigger("ANSWER_CHANGE",t),(0,i.CY)(t))}function u(t,e=!1){t!==o&&(s.trigger("SWITCH_NODE",t),o=t,e&&(0,r.W4)().hook.onSwitchPage())}},9193:(t,e,n)=>{"use strict";n.d(e,{y:()=>r});var i=n(556);function r(t,e){if(0===t.length)return;const n=t[0].loop.varList.map((e=>{const{text:n,uuid:i}=e,r=t.filter((t=>t.loop.replacements[0].uuid===i));return{uuid:i,title:n,cells:o(r)}})),i=n.reduce(((t,e)=>e.cells.length>t.cells.length?e:t),{cells:[]}),r=i.cells;n.forEach((t=>{t.cells=r.map((e=>t.cells.find((t=>t.node.nodeUuid===e.node.nodeUuid))||a(void 0)))}));const s=i.cells.map((t=>({uuid:t.node.nodeUuid,title:t.node.title})));return{title:e.tableTitle,header:s,rows:n}}function o(t){return t.map(a)}function a(t){const e=(null==t?void 0:t.renderId)||(0,i.YF)();return t.headHidden=!0,{uuid:e,node:t}}},7556:(t,e,n)=>{"use strict";n.d(e,{SA:()=>s,c5:()=>a}),n(7768);var i=n(3552),r=n(8348);function o(t){const e=":"+(0,r.yy)().LOOP_IMG.uuid,n="-0000-0000-0000-000000000000";return t.indexOf(n)&&(t=t.replace(n,e)),t}function a(t,e){return t.filter((t=>t.used)).map((t=>(function(t){const{image:e,options:n}=t;e&&(e.id=o(e.id)),n&&n.forEach((t=>{t.image&&(t.image.id=o(t.image.id))}))}(t),t.destList=t.destList.filter((t=>!t.designOnly)),function(t){const e=t;e.questionText=(0,i.q)(e.questionText),e.describe=(0,i.q)(e.describe);let n=[];e.options&&(n=n.concat(e.options)),e.otherOptions&&(n=n.concat(e.otherOptions)),e.optionsX&&(n=n.concat(e.optionsX)),e.optionsY&&(n=n.concat(e.optionsY)),n.forEach((t=>{t.text=(0,i.q)(t.text)}))}(t),t)))}function s(t){return t.forEach((t=>{t.value=(0,i.q)(t.value)})),t}},1304:(t,e,n)=>{"use strict";n.d(e,{eO:()=>X,ek:()=>z,ef:()=>Q,ID:()=>j,uC:()=>D,gv:()=>B,Qb:()=>G,Wf:()=>H,I7:()=>Y,e0:()=>K,YR:()=>M,ye:()=>q,KY:()=>F}),n(2048),n(9952);var i=n(6348),r=n(7404),o=n(5776),a=n(6784),s=n(9216),c=n(9968),u=n(1428),l=n(8184),d=n(840),f=n(9947),p=n(8856),g=n(6496),m=n(2331),h=n(8412),v=n(568),y=(n(7768),n(9624),n(5616)),_=n(7320),w=n(6072),x=n(3001),b=n(4060),T=n(4732);const S={},E={};async function I(t,e,n){const{actions:i}=e.origin;if(i&&!(0,y.K)()&&!(0,p.E3)().realTimePreview){if("forward_enter"===t){if(S[e.renderId])return;S[e.renderId]=!0}if("backward_leave"===t&&delete S[e.renderId],"forward_leave"===t){if(E[e.renderId])return;E[e.renderId]=!0}"backward_leave"===t&&delete E[e.renderId];for(const r of i){if(r.disabled||r.event!==t)continue;const{activeConfig:i}=r;if(!i||await(0,b.wx)(n,i))if("http_request"===r.type)(0,T.y)(r),await(0,w.g5)(n,r.request,null,!0);else{const i={state:n},o={question_id:e.nodeUuid,response_id:n.transactionID,locale:n.language,event:t,type:r.type};if("email"===r.type){const{email:t}=r,e={...o,email:(await(0,x.E3)(t.address,i)).replace(/\s/g,""),content:await(0,x.qQ)(t.content,i),title:(await(0,x.E3)(t.title,i)).trim()};await(0,_.G8)(e)}else{const{sms:t}=r,e={};for(const n of t.params)e[n.name]=(await(0,x.E3)(n.value,i)).trim();const n={...o,url:(await(0,x.E3)(t.url,i)).replace(/\s/g,""),content:e};await(0,_.G8)(n)}}}}}var k=n(1344),O=n(2524),C=n(6796),L=n(5684);let N;var R=n(556),A=n(2172);let P;function M(){return!!P}const W=["end","gift","lottery"];function U(t){let{prev:e}=t;const n=[];let i=e&&(0,o.S)(e);for(;i;)n.push({node:e,reason:i}),e=e.prev,i=e&&(0,o.S)(e);return{prev:e,skipList:n,current:t}}function G(t){if((0,p.E3)().realTimePreview)return"";const{prevEnabled:e,themeMode:n}=t,i=(0,C.Oi)(t),{prev:r}=U(i),o=i.type;return e&&n&&"end"!==o&&"lottery"!==o?t.prevBtnText:(0,p.E3)().preview&&"end"===o?(0,g.GS)(v.CW.global.backTest):e&&r&&(i.checkMode===r.checkMode||(0,p.E3)().preview)&&!W.includes(o)?t.inSingleGroup?t.inSingleGroup.prevText||t.prevBtnText||(0,g.GS)(v.CW.global.previous):t.prevBtnText:""}async function D(t){const{formalResult:e}=t,n=t.current;if((0,R.is)(n,"end"===n.type)){const i=n.endBtnText||(0,g.GS)(v.CW.global.go);if(n.linkUrl)return i;if(e&&e.reward||(0,p.E3)().preview&&n.origin.useReward)return n.qrCode||t.fakeCommitted?"":i;{const{target:e}=await m.G.findNext(t.nodeList,n,t);return e&&"lottery"===e.type?i:""}}if((0,R.is)(n,"lottery"===n.type)){const t=(0,g.GS)(v.CW.reward.get);return n.linkUrl?n.endBtnText||t:n.goal?n.qrCode?"":t:""}return t.inSingleGroup?t.inSingleGroup.nextText||t.nextBtnText||(0,g.GS)(v.CW.global.next):t.nextBtnText}function B(t,e){const n=[];let i=1;const r=t[e];let a=t[e+i],s=a&&(0,o.S)(a);for(;a&&s;)n.push({node:a,reason:s}),i+=1,a=t[e+i],s=a&&(0,o.S)(a);return{next:a,skipList:n,current:r}}async function F(t){const e=await(0,c.iW)(t.nodes,!0,(0,C.O2)(t));if(e.valid){if((0,C.O2)(t)){(0,p.e)(t,{current:t.nodes[t.nodes.length-1]});for(const e of t.nodes)await I("forward_leave",e,t)}else await I("forward_leave",t.current,t);return await(0,s.AD)(t,t.current,{type:"page_next",delay:200}),!0}return function(t,e){const{valid:n,message:r,dueToNode:o,dueToOption:a}=e,s={valid:n,message:r};if(a&&(s.optId=a.uuid,s.optText=a.text,a.label&&(s.message=a.label+":"+s.message)),o&&(s.nodeId=o.nodeUuid,s.nodeName=o.nodeName,s.nodeType=o.type,s.message=o.nodeName+":"+s.message),i.i.trigger("NEXT_FAIL",s),"vital"===e.type)throw(0,p.E3)().error(e.message),new Error("next vital error: "+e.message);"alert"===e.type?(0,p.E3)().alert(e.message):(t.inSingleGroup||(0,p.E3)().notify(e.message),(0,c.Oe)(e,t))}(t,e),!1}function q(t,e){(0,p.e)(t,{nextLoading:e})}function j(t){q(t,!0),P={state:t}}async function z(t){q(t,!1),P&&(await Y(P.state),P=void 0)}function V(t,e,n){(0,i.U3)({origin:e,parent:t},!0);const a={...(0,r.uK)(),rid:String(n.id),locale:t.language,qid:t.surveyId,rt:e.giftType};if("red_envelope"!==e.giftType||(0,p.E3)().preview)(0,u.ID)(n,e,t.theme,(0,o.q_)(t.nodeList)),(0,p.W4)().hook.beforeForceLeave(),(0,p.W4)().app.openWebLink((0,p.W4)().app.getRewardUrl(a)),(0,p.E3)().customAbort();else{const e={...a,tid:t.transactionID},{formalResult:{authorizer:{app_id:n,component_appid:i}}}=t;(0,p.W4)().auth.authorizeGift(n,i,e,"end"),(0,p.E3)().customAbort()}}function K(t,e){e.linkUrl?((0,p.W4)().hook.beforeForceLeave(),(0,p.W4)().app.openWebLink(e.linkUrl),(0,p.E3)().customAbort()):V(t,(0,o.o1)(t.nodeList,e.rewardRaw.gift_id),e.rewardRaw)}async function Y(t){const e=function(t){const{renderList:e}=t,n=t.nodes[t.nodes.length-1];return B(e,(0,s.SM)(e,n))}(t),{current:n,next:c}=e;return"end"===n.type?async function(t,e){const{linkUrl:n,origin:s}=e;if(n)return void(0,r.ML)(n);const c=(0,o.MR)(t.nodeList,s.destList,s.output&&s.output.uuid);if(!c)return;const d=(0,u.G3)(t,c);if((0,R.is)(c,"lottery"===c.type)){const e=await(0,l.yI)(c,d,t);(0,a.cR)(e,t,!(!d||!d.id)),(0,p.e)(t,{current:e}),(0,i.U3)(e,!0)}else V(t,c,d);await(0,O.w)(t)}(t,n):(await(0,p.W4)().hook.beforeGotoNext(),(await(0,d.e)(t,{valid:!0,message:""},n,c)).valid?(function(t){if((0,p.E3)().preview)return;const e=function(t){const{nodes:e,renderList:n}=t,i=e[e.length-1];let r=i,a=[r];for((0,C.ms)(i.nodeUuid,t.nodeGroups)&&(a=n.filter((t=>t.origin.groupId===i.origin.groupId)),r=a[0]);r.prev&&(0,o.S)(r.prev)&&!(0,C.ms)(r.prev.nodeUuid,t.nodeGroups);)a.unshift(r.prev),r=r.prev;return a}(t),n=e.map((t=>(0,L.cA)(t))).filter((t=>!!t));(0,p.W4)().network.pushSocket("update",{answers:n}),clearTimeout(N)}(t),async function(t,e){const{next:n,current:r}=e;(0,p.e)(t,{current:n}),n.reached=!0,(0,a.EZ)(r,n),(0,i.U3)(n,!0),(0,h.K8)(t),await(0,k.iq)(t),await(0,O.w)(t),q(t,!1),(0,o.CY)(r),(0,s.S_)(t,t.current),i.i.trigger("NEXT_OK")}(t,e)):q(t,!1))}async function H(t){const e=(0,C.Oi)(t),{prev:n,skipList:r}=U(e);if(n){if((0,C.ms)(e.nodeUuid,t.nodeGroups)){const e=[...t.nodes].reverse();for(const n of e)await I("backward_leave",n,t)}else await I("backward_leave",e,t);for(const e of r)await I("backward_enter",e.node,t),await I("backward_leave",e.node,t);if((0,p.e)(t,{current:n}),await(0,A.a)(t),(0,i.U3)(n,!0),(0,h.K8)(t),await(0,k.iq)(t),await(0,O.w)(t),(0,a.aS)(e,n),(0,s.S_)(t,t.current),i.i.trigger("PREV_OK"),(0,C.ms)(n.nodeUuid,t.nodeGroups)){const e=[...t.nodes].reverse();for(const n of e)await I("backward_enter",n,t)}else await I("backward_enter",n,t)}}async function Q(t,e){const{nodeList:n,current:i}=t,r=await(0,f.WU)(n,i,t),{target:o}=r;return o?X(t,r,e):null}async function X(t,e,n){const i=(0,l.e_)(e,t);if(n&&n(i))return null;const r=await(0,l.o9)(i,t.current);(0,p.e)(t,{current:r}),await I("forward_enter",r,t);const s=(0,o.S)(r);return s&&((0,a.YZ)(t,r,s),await I("forward_leave",r,t)),r}},8412:(t,e,n)=>{"use strict";n.d(e,{K8:()=>f}),n(9952);var i=n(5776),r=n(4708),o=n(9216),a=n(8856);const s=["logic","loop","random","break_point","check","data","lottery","gift"];function c(t){return t&&"end"!==t.type}function u(t,e){if(!t)return t;const n=t.parentRandomId||t.circleNode1Id;return n&&(t=u(t=(0,i.o1)(e,n),e)),t}function l(t,e){let n;e=u(e,t);const{output:o,destList:a}=e,{outputN:s}=e,l=(0,r.sf)(e);if(o&&(n=(0,i.MR)(t,a,o.uuid)),!c(n))if(s)n=(0,i.MR)(t,a,s.uuid);else if(l)for(const e of l)if(n=(0,i.MR)(t,a,e.uuid),c(n))break;return n}function d(t){return!s.includes(t.type)&&!t.autoSkip}function f(t){if((0,a.W4)().dev.infer)return;const{percent:e,index:n}=function(t){const e=function(t){const e=t.renderList.filter((t=>d(t.origin)));return(0,o.SM)(e,t.current)}(t),n=function(t,e){const{nodeList:n,current:i}=e;let r=t,o=l(n,i.origin);for(;o;)d(o)&&(r+=1),o=l(n,o);return"end"!==i.type&&(r+=1),r}(e,t);return-1===e?{index:-1,fullLength:n,percent:0}:{percent:Math.round(e/n*100),fullLength:n,index:e}}(t);n>-1&&(0,a.e)(t,{progress:e})}},9216:(t,e,n)=>{"use strict";n.d(e,{AD:()=>v,QL:()=>g,SM:()=>m,S_:()=>y,Uq:()=>_}),n(9952);var i=n(1304),r=n(5776),o=n(7788),a=n(556),s=n(8856),c=n(9948),u=n(8412),l=n(6348),d=n(2524),f=n(6796);let p=-1;function g(t,e){return e=e.toLowerCase(),t.find((t=>t.renderId.toLowerCase()===e))}function m(t,e){for(let r=0;r<t.length;r++){if(n=t[r],i=e,(0,a.oj)(n.renderId,i.renderId))return r}var n,i;return-1}function h(t,e){(0,s.e)(t,{refreshing:e})}function v(t,e,n){if(h(t,!0),clearTimeout(p),n.initial&&(0,l.U3)(t.current,!0),n.delay){const i=(0,s.W4)().dev.autoRun||(0,s.W4)().dev.infer?0:n.delay;return new Promise(((r,o)=>{p=setTimeout((async()=>{try{await w(t,e,n)}catch(t){o(t)}r()}),i)}))}return w(t,e,n)}function y(t,e){const{circleNode1Id:n}=e.origin;n?(0,s.e)(t,{loopStack:(0,a.O0)(e.loopStack)}):(0,s.e)(t,{loopStack:[]});const i=t.randomList,r=e.random;i.forEach((t=>{r?(0,a.oj)(t.node.nodeUuid,r.node.nodeUuid)?t.currentIndex=r.currentIndex:r.stack.some((e=>(0,a.oj)(t.node.nodeUuid,e.node.nodeUuid)))||(t.currentIndex=-1):t.currentIndex=-1}))}function _(t,e){const n=function(t,e){let n=t;if(!e)return n;for(const t of e)n+="-"+(0,a.kt)(t.option_id);return n}(e.node_id,e.loop_ctxs);return g(t.renderList,n)}async function w(t,e,n){h(t,!0);const a=t.renderList;y(t,e=e||t.current);const l=m(a,e),p=await async function(t,e,n){const a=n.type;let c=[...t.renderList];c=c.length>0?c:[e];const u=m(c,e);if(u<0)return c;c.length=u,c.push(e),(0,s.e)(t,{renderList:c}),(0,f.O2)(t)&&await(0,o.qc)(e);let l=null;const d=e=>!(0,f.ym)(e,l,t.nodeGroups);let p=null;for("page_inner"===a&&(l=e,p=d);;){const e=await(0,i.ef)(t,p);if(!e)break;if(c.push(e),f.AN.includes(e.type))break;if(!(0,r.S)(e)){if(l||(l=e,(0,f.ms)(l.nodeUuid,t.nodeGroups)&&(p=d)),!(0,f.ym)(l,e,t.nodeGroups))break;await(0,o.qc)(e)}}return c}(t,e,n),g=n.initial?(0,i.gv)(p,l).next:e;(0,s.e)(t,{current:g}),h(t,!1),y(t,e),await(0,d.w)(t),n.initial||(await(0,i.ek)(t),t.inSingleGroup&&(0,u.K8)(t)),(0,c.Y1)()}},1428:(t,e,n)=>{"use strict";n.d(e,{G3:()=>T,ID:()=>S,oD:()=>I,uO:()=>k});var i=n(5776),r=n(1884),o=n(7404),a=n(556),s=n(8856),c=n(6496),u=n(7688),l=n(908),d=n(6348),f=n(6784),p=n(568),g=n(7320),m=n(5170),h=n(5224),v=n(2392),y=n(7828),_=n(4404),w=n(3132),x=n(5032);let b=null;function T(t,e){if((0,s.E3)().preview){const n={id:-1,code:"12345678"};if((0,a.is)(e,"gift"===e.type))return{...n,type:e.giftType,gift_id:e.nodeUuid};{const r=(0,a.my)(e.options,1)[0],o=(0,i.MR)(t.nodeList,e.destList,r.uuid);return{...n,type:o.giftType,gift_id:o.nodeUuid,lottery_id:e.nodeUuid,lottery_option_id:r.uuid}}}return t.formalResult.reward}function S(t,e,n,i){const r="custom"===e.giftType;if((0,s.E3)().preview||r){i.useCustomLogo&&(e.useCustomLogo=i.useCustomLogo,e.logoImage=i.logoImage,e.logoText=i.logoText,i.i18n&&Object.keys(i.i18n).forEach((t=>{const n=i.i18n[t];e.i18n[t].logoText=n.logoText})));const r={};"custom"===e.giftType?r.custom={giftNode:e,theme:n,qrCode:t.code,rewardId:t.id}:r.redEnvelope={theme:n,recipient:(0,h.x)(),gift:{id:t.id,title:e.activityName,description:e.blessings,config:{gift_name:""},origin:e},amount:e.giftCount,type:"red_envelope"},(0,s.W4)().storage.set("cached_reward",JSON.stringify(r))}}function E(t){const e=(0,s.W4)().storage.get("cached_reward");if(!e)return;const n=JSON.parse(e);let i;const{custom:r,redEnvelope:o}=n;return r?i=r.rewardId:o&&(i=o.gift.id),i===t?n:void 0}function I(){b=null}async function k(){if(b)return b;const t=(0,o.uK)(),{rt:e,rid:n,code:i,qid:a,tid:h,locale:T,reward_from_qr_code:S}=t;let I;(0,c.Uj)(T);let k,C={};if("red_envelope"===e){let e;(0,s.E3)().preview?e=E(Number(n)).redEnvelope:!i&&S?e=O:(n&&!i&&((0,s.W4)().auth.authorizeGift(t.aid,t.cid,t,"scan_qr_code"),(0,s.E3)().customAbort()),e=function(t){var e;const n=t.gift.origin,i={...t,gift:{...null==t?void 0:t.gift,origin:{...null===(e=null==t?void 0:t.gift)||void 0===e?void 0:e.origin,i18n:{},logoText:""}}};if(!n)return i;const r=n.i18n;if(!r)return i;const o={};return Object.keys(r).forEach((t=>{const e=r[t];o[t]={activityName:e.gift_name,blessings:e.gift_wishing,endBtnText:e.end_btn_text,logoText:e.logo_text}})),i.gift.origin.i18n=o,i}(await(0,g.MT)({code:i},n)));const{gift:r,theme:o,isTemporaryForWXQrcode:u}=e;I=r.origin,C=e.recipient,(0,f.ML)(I,{surveyId:a,userInfo:C,transactionID:h}),k={isTemporaryForWXQrcode:u,rewardValue:I.giftCount+" "+(0,c.GS)(p.CW.reward.yuan),wechatID:C.nickname,wechatImage:C.headimgurl,theme:o}}else{const t=E(Number(n));if(!t)return(0,s.E3)().error((0,c.GS)(p.CW.global.invalidReward)),null;const{custom:e}=t;I=e.giftNode,k={qrCode:e.qrCode,rewardToMessage:I.needSendNote,theme:e.theme}}(0,y.__)(I,I.i18n[T]);const L=(0,_.Y)(I),N={...k,images:I.image?[(0,w.a)(I.image)]:[],video:I.video,layout:I.layout,rewardId:n,eventHub:d.i,nodeName:I.nodeName,type:I.type,rewardType:I.giftType,renderId:I.nodeUuid,rewardName:I.activityName,title:I.blessings,description:I.describe,summary:I.describe,rewardTime:(0,r.kF)(),...L,prevButton:(0,s.E3)().preview&&!(0,s.E3)().realTimePreview?(0,c.GS)(p.CW.global.backTest):"",nextButton:I.linkUrl&&(I.endBtnText||(0,c.GS)(p.CW.global.go)),handleEvents:{...m._,async handlePrevClick(){(0,s.W4)().app.gotoStartPage((0,o.uK)())},handleOptionClick:async(t,e)=>(await(0,u.o)(t,e)).result,handleQuestionInput:async(t,e)=>(await(0,l.s)(t,e)).result,async handleNextClick(){I.linkUrl&&(0,o.ML)(I.linkUrl)},async handleGetRewardWX(){(0,s.W4)().auth.authorizeGift(t.aid,t.cid,t,"scan_qr_code"),(0,s.E3)().customAbort()}}};return N.template=await(0,x.m)(I.template,N),b=N,(0,v.y)(N.theme),await(0,s.W4)().hook.afterFetchReward(N),N}const O={isTemporaryForWXQrcode:!0,theme:{primary:"#202020",secondary:"#FFFFFF",contrast:"#CC2227",background:"#FCFCFC",error:"#CC2227",button:"#202020",fontSize:"1.5rem",fontWeight:"normal",descFontSize:"1rem",descFontWeight:"normal",optFontSize:"1rem",optFontWeight:"normal",btnFontSize:"1.25rem",btnFontWeight:"normal",name:"minimal",fontFamily:"roboto",titleFontSize:"1.5rem",titleFontWeight:"bold",boxWidth:"50vmin",bgOpacity:100,bgLayout:"cover",bgSize:"cover",effect:"normal",bgImageUrl:"",bgImageId:"",bgImageHeight:0,bgImageWidth:0},recipient:{headimgurl:"https://media.choiceform.com/fresh_little_girl.jpg",nickname:"test微信名称示例"},gift:{id:-1,title:"test",description:"test",config:{gift_name:""},origin:{sortNo:10003,x:808,y:219,nodeName:"GIFT",type:"gift",used:!0,nodeUuid:"dc28e571-38a3-4af3-9829-22aaa62e83f0",input:{uuid:"bb75d086-9203-4cd1-a757-aa22fdde3a71"},label:"GIFT",questionText:"test",layout:{fontSize:"1.5rem",fontWeight:"normal",optFontSize:"1rem",optFontWeight:"normal",descFontSize:"1rem",descFontWeight:"normal",descFontIsolate:!1,fontIsolate:!1,iconFontSize:"48px",optFontIsolate:!1},template:{name:"basic",params:[],id:"standards_gift_basic"},giftCount:1,giftType:"red_envelope",activityName:"test",blessings:"test",needSendNote:!0,needVerification:!0,fromNodeIds:"319c139d-043f-4949-8721-b2376d52cea7",fromOptIds:"",i18n:{zh_cn:{activityName:"test",blessings:"test",endBtnText:""}}}},amount:1,type:"red_envelope"}},8737:(t,e,n)=>{"use strict";n.d(e,{ML:()=>p,YP:()=>g,m0:()=>h,wH:()=>m}),n(7768),n(9624),n(9952);var i=n(3001),r=n(7404),o=n(6348),a=n(9677),s=n(7320),c=n(5667),u=n(2352),l=n(6620),d=n(8856);function f(t,e){const n=(0,u.Wo)(t.result);return t&&(0,a.mK)(n)?(setTimeout((()=>{(0,r.ML)(n)})),{type:"LINK",done:!0}):{type:e,done:!0}}async function p(t,e){let n="";const{parsedPayload:{surveyMeta:{collector:r}}}=t;if(!r)return;const{sampler_config:o}=r;o&&(n=o[e]||"");const a="BACKEND:";if(!n||0!==n.indexOf(a))return;const s=n.replace(a,"").split("&"),c={};for(const e of s){const[n,r]=e.split("=");c[n]=await(0,i.cb)(r,t)}return c}async function g(t,e){const{parsedPayload:{surveyMeta:{collector:{sampler_config:n}}}}=e,a=n&&n[t];if(!a)return o.i.trigger("SAMPLER_TRANSFER",{method:"ABORT"}),{type:"ABORT",done:!1};const u=a.trim(),p=u.startsWith("{{")&&u.endsWith("}}"),g=await(0,i.cb)(u,e,!p);return g.trim().startsWith("BACKEND")?{type:"BACKEND",done:!0}:g.trim().startsWith("http")?async function(t,e){return(0,r.ML)(e),o.i.trigger("SAMPLER_TRANSFER",{method:"LINK",url:e,type:t}),{type:"LINK",done:!0}}(t,g):async function(t,e,n){const i=n.indexOf(":"),a=n.substring(0,i).toUpperCase(),u=n.substring(i+1),p=u.indexOf("?"),g=-1===p?u:u.substring(0,p);let m={};if(-1!==p){const t=-1===p?"":u.substring(p);t&&(m=t?(0,r.Yj)(t):{})}let h={type:a,done:!1};if("FAKE"===a)h=f(await(0,c.E)({url:g,data:(0,l.a8)(m,t),silent:!1,responseId:null==t?void 0:t.transactionID}),a);else if("GET"===a||"POST"===a){const t="GET"===a?"GET":"POST";try{h=f(await(0,s.SY)(g,{type:t,data:m}),a)}catch(t){(0,d.E3)().uploadLog("数据转移接口出错"+JSON.stringify(t),"warning")}}return o.i.trigger("SAMPLER_TRANSFER",{url:g,data:m,method:a,type:e}),h}(e,t,g)}function m(t){return"LINK"===t.type&&t.done}async function h(t){var e,n;const{context:r}=t,o=r.node,a=null!==(n=null===(e=null==o?void 0:o.backendRequest)||void 0===e?void 0:e.params)&&void 0!==n?n:[],s={};for(const e of a){const{name:n,value:r}=e;s[n]=await(0,i.E3)(r,{state:t,joinBy:","})}return 0===a.length?void 0:s}},6796:(t,e,n)=>{"use strict";n.d(e,{AN:()=>u,O2:()=>c,Oi:()=>a,k9:()=>s,ms:()=>o,ym:()=>l});var i=n(5776),r=n(8856);function o(t,e){return e.some((e=>e.singlePage&&e.nodes.includes(t)))}function a(t){return s(t)[0]||t.current}function s(t){const{current:e,renderList:n}=t,a=[e],s=n.indexOf(e);let c=s-1,u=e;for(;;){const e=n[c--];if(!l(e,u,t.nodeGroups))break;(0,i.S)(e)||(a.unshift(e),u=e)}let d=s+1,f=e;for(;;){const e=n[d++];if(!l(e,f,t.nodeGroups))break;(0,i.S)(e)||(a.push(e),f=e)}return o(a[0].nodeUuid,t.nodeGroups)&&(a.forEach((t=>{(0,r.e)(t,{pageEnd:!1,pageStart:!1})})),(0,r.e)(a[0],{pageStart:!0}),(0,r.e)(a[a.length-1],{pageEnd:!0})),a}function c(t){const e=a(t);return e&&o(e.nodeUuid,t.nodeGroups)}const u=["end","lottery","gift"];function l(t,e,n){return!(!t||!e)&&!u.includes(t.type)&&!u.includes(e.type)&&o(t.nodeUuid,n)&&o(e.nodeUuid,n)&&function(t,e){return!(!t.origin.groupId||!e.origin.groupId||e.origin.groupId!==t.origin.groupId)&&(!e.loop&&!t.loop||!(e.loop&&!t.loop||!e.loop&&t.loop||e.loop.destInputId!==t.loop.destInputId||e.loop.node.groupId!==e.origin.groupId&&e.loop.currentIndex!==t.loop.currentIndex))}(t,e)}},840:(t,e,n)=>{"use strict";n.d(e,{S:()=>T,e:()=>S});var i=n(6348),r=n(7320),o=n(5684),a=n(6784),s=n(6072),c=n(1304),u=n(8184),l=n(8737),d=n(1344),f=n(8856),p=n(6496),g=n(568),m=n(2352),h=n(2524),v=n(7801);const y={valid:!0,message:""},_={valid:!1,message:""};let w=!1,x=!1,b=!1;function T(){w=!1,x=!1,b=!1}function S(t,e,n,i){const r=[];let o=i.prev;for(;o!==n;)r.push({prev:o,next:i}),o=(i=o).prev;return r.push({prev:o,next:i}),E(t,e,r)}async function E(t,e,n){const T=n.pop(),S=await async function(t,e,n,T){const S=n.checkMode,E=T.checkMode,L=T.type;if("end"===L&&(clearInterval(t.timer),(0,f.e)(t,{limitTime:void 0})),(0,f.E3)().preview)return e;if(S){if("end"===L)return async function(t,e,n){if(b)return _;(0,f.W4)().network.closeSocket(),b=!0;const u=I(t,n);(0,c.ye)(t,!0),(0,v._)(t,"all"),await(0,f.W4)().hook.beforeEndSurvey(t);try{const e=await(0,o.gp)(t,"all","examine_skipped_url"),n=await(0,r.eI)(e,t.transactionID);t.responseStatus=n.status,await(0,f.W4)().hook.onEndSurvey(t)}catch(e){const n=(0,m.Wo)(e&&e.message)||"";return(0,f.E3)().uploadLog("skip提交失败 "+n,"warning"),(0,f.E3)().notify((0,p.GS)(g.CW.global.tryAgain)),b=!1,(0,c.ye)(t,!1),_}i.i.trigger("CHECK_FAIL"),(0,f.W4)().network.closeSocket();try{await(0,d.ig)(t),u||(0,a.W2)(e,n,t),await(0,s.Ed)(t,n),(0,c.ye)(t,!1),k(t);const i=await(0,l.YP)("examine_skipped_url",t);if((0,l.wH)(i))return _}catch(t){(0,f.E3)().uploadLog("skip提交后续处理失败"+JSON.stringify(t),"warning")}return y}(t,n,T);if(!E)return async function(t){if(x)return _;x=!0,(0,c.ye)(t,!0);const e=await(0,o.gp)(t,"check","examine_failed_url"),n=e.answers.length;(0,v._)(t,"check");try{const o=await(0,r.KY)(e,t.transactionID);return(0,a.Sg)(t,n),(0,c.ye)(t,!1),t.responseStatus=o.status,i.i.trigger("CHECK_SUBMIT"),y}catch(e){await(0,f.W4)().hook.onEndSurvey(t),await(0,d.ig)(t);const i=(0,r.SC)(e);return C(i)?await O(t,n,"examine_failed_url",i):(x=!1,(0,f.E3)().uploadLog("examine提交失败"+e&&e.message,"warning"),(0,f.E3)().notify((0,p.GS)(g.CW.global.tryAgain))),(0,c.ye)(t,!1),_}}(t)}return"end"===L?async function(t,e){if(w)return _;(0,f.W4)().network.closeSocket(),w=!0;const n=I(t,e)||function(t,e){const{renderList:n,startTime:i}=t,r=function(t,e){const n=(0,p.GS)(g.CW.global.notTarget),{minTime:i,timeLessText:r}=t;return i&&i>e?r||n:""}(t,Math.ceil((Date.now()-i)/1e3));if(r){t.fakeCommitted=!0;const i=n[n.length-1];return(0,f.e)(i,{hasReward:!1,title:r}),(0,a.kB)(e,t),!0}return!1}(t,e);(0,c.ye)(t,!0),(0,v._)(t,"normal");const x=await(0,o.gp)(t,"normal","committed_url");let b,T;await(0,f.W4)().hook.beforeEndSurvey(t);try{b=await(0,r._K)(x,t.transactionID);const e=b.response||b;t.responseStatus=e.status,await(0,f.W4)().hook.onEndSurvey(t)}catch(e){const n=(0,r.SC)(e);if(C(n))await O(t,x.answers.length,"examine_failed_on_commit_url",n);else if(n===r.aS.response_overflow){k(t);const e=await(0,l.YP)("overflow_url",t);(0,l.wH)(e)||t.ignoreSubmittingResult||(0,f.E3)().error((0,r.O)(n)),t.responseStatus="committed",i.i.trigger("QUOTA_FAIL"),(0,f.W4)().network.closeSocket()}else{const n=(0,m.Wo)(e&&e.message)||"";(0,f.E3)().uploadLog("正式提交失败 "+n,"warning"),t.ignoreSubmittingResult||(0,f.E3)().notify((0,p.GS)(g.CW.global.tryAgain)),(0,c.ye)(t,!1),w=!1}if(!t.ignoreSubmittingResult)return _;await(0,f.W4)().hook.onEndSurvey(t),b={}}t.formalResult=b;try{await(0,s.Ed)(t,e),n?T=await(0,l.YP)("invalid_url",t):((0,a.kv)(e,t,x.answers.length,b),b.reward&&(0,f.e)(e,{hasReward:!0}),await async function(t,e){const{formalResult:{reward:n}}=e;if(n&&"red_envelope"===n.type&&!n.lottery_id&&!(0,f.W4)().app.canHandleReward())return(0,u._M)(e,t)}(e,t),T=await(0,l.YP)("committed_url",t))}catch(t){(0,f.E3)().uploadLog("正式提交后续处理错误"+JSON.stringify(t))}return await(0,d.ig)(t),(0,c.ye)(t,!1),k(t),i.i.trigger("FULL_SUBMIT"),await(0,h.w)(t),(0,l.wH)(T)?_:y}(t,T):e}(t,e,T.prev,T.next);return 0===n.length||"vital"===S.type?S:E(t,S,n)}function I(t,e){const{oneReplyPerTerminal:n,sid:i}=t;return!!e.origin.abandonAnswer&&(t.fakeCommitted=!0,(0,a.kr)(e,t),n&&(0,f.W4)().storage.set(i,"1"),!0)}function k(t){const{oneReplyPerTerminal:e,sid:n}=t;e&&(0,f.W4)().storage.set(n,"1")}async function O(t,e,n,o){(0,a.ms)(t,e),k(t);const s=await(0,l.YP)(n,t);(0,l.wH)(s)||(0,f.E3)().error((0,r.O)(o)),t.responseStatus="examine_failed",i.i.trigger("QUOTA_FAIL"),(0,f.W4)().network.closeSocket()}function C(t){return t===r.aS.quota_not_match||t===r.aS.quota_full}},9948:(t,e,n)=>{"use strict";n.d(e,{Gg:()=>z,q0:()=>X,ER:()=>H,Y1:()=>F});var i=n(5776),r=n(9947),o=n(1304),a=n(1884),s=n(4556),c=n(7688),u=n(908),l=n(1576),d=n(6680),f=n(8184),p=n(6784),g=n(7788),m=n(9216),h=n(7320),v=n(7556),y=n(840),_=(n(5684),n(4196)),w=n(6348),x=n(1344),b=n(5616),T=n(8856),S=n(6496),E=n(7828),I=(n(4708),n(5170)),k=n(556),O=n(8412),C=n(568),L=n(4872),N=n(8360),R=n(7404),A=n(3004),P=(n(2048),n(9952),n(2524)),M=n(6796);var W=n(7801);const U={};var G=n(2172),D=n(1103),B=n(6276);const F=(0,k.Cu)((()=>{(0,T.E3)().realTimePreview||K()||w.i.trigger("STRETCH_OK")}));function q(t){return!K()&&!(0,W.i)(t,!0)}function j(t){(0,b.K)()||(t.answerChangedSinceStart=!0)}function z(t){t.handleEvents={...I._,handleQuickAnswer:e=>(j(t),(0,N.E)(e)),async handleLangChange(t){await(0,S.Sk)(t.locale,!0)},async handleCascadeInput(t,e,n,i){if(!q(i))return null;const r=(0,_.cv)(t,e,n,i);return this.handleOptionInput(t,r,i).then((t=>t))},handleOptionAssistInput:(e,n,i,r)=>((0,T.e)(i.assistValue,{[n]:e}),j(t),Y({result:!0},r)),handleCascadeClick:async(t,e,n)=>q(n)?Y(await(0,_.GA)(t,e,n),n).then((t=>t)):null,async handleMenuClick(t,e){const n=()=>e.options.filter((t=>t.selected)).map((t=>t.text));return q(e)?(await this.handleOptionClick(e.options[t],e),n()):n()},async handleOptionClick(e,n){if(!q(n))return null;const i=await(0,c.o)(e,n);return i.result&&(0,p.me)(e,n),j(t),Y(i,n).then((t=>t))},async handleOptionInput(e,n,i){if(!q(i))return null;const r=await(0,s.wf)(e,n,i);return r.result&&(0,p.ui)(e,n,i),j(t),Y(r,i).then((t=>t))},handleAutoCpltInput:async(t,e,n)=>((0,s.I5)(t,e,n),(0,p.Ux)(t,e,n)),async handleSequenceInput(e,n,i,r){if(!q(i))return null;const o=r.sortNo,a=await(0,d.W)(e,n,i),s=r.sortNo;if(a.result&&o!==s){const t=i.options.findIndex((t=>t===r));(0,p.we)(t,i)}return j(t),Y(a,i).then((t=>t))},async handleQuestionInput(e,n){if(!q(n))return null;const i=await(0,u.s)(e,n);return i.result&&(0,p.Oo)(e,n),j(t),Y(i,n).then((t=>t))},handleLocateFailed(e){const n=(0,u.S)(e);return n.result&&(0,p.m_)(e),j(t),Y(n,e).then((t=>t))},async handlePrevClick(){if(!(0,T.E3)().realTimePreview&&!V()&&t.prevButton&&!K())return(0,p.Id)(t.current),(0,o.Wf)(t).then((t=>t))},handleMaxDiffInput(e,n,i,r){if(!q(r))return null;const o=(0,l.w)(e,n,i);return j(t),Y(o,r).then((t=>t))},async handleNextClick(){if((0,T.E3)().realTimePreview||K()||V()&&(0,o.YR)())return;(0,o.ye)(t,!0),await(0,G.a)(t);const{current:e}=t;if((0,p.GS)(e),"lottery"===e.type)(0,o.e0)(t,e),(0,o.ye)(t,!1);else if(await async function(t){const e=t.filter((t=>!!t.origin.backtracking));let n=!1;for(const t of e){const{origin:{backtracking:e},parent:i}=t;if(e.targetNodeUuid){const{logic:r,request:o}=e;let a=await(0,g.qo)(o,t);if(a.valid&&(a=await(0,g.YZ)(r,i)),n=a.valid,n)return(0,T.e)(i,{current:t}),n}}return n}(t.nodes))await async function(t){await(0,k.W_)(200);const e=t.current,{backtracking:{targetNodeUuid:n}}=e.origin,r=await async function(t,e){const n=[...t.renderList].reverse(),r=n.findIndex((t=>(0,k.oj)(t.nodeUuid,e)));for(let t=r;t>=0;t--){const e=n[t];if(!(0,i.S)(e))return e}return n[r]}(t,n);return await async function(t,e){const{renderList:n}=t,i=n.findIndex((t=>t.renderId===e.renderId)),r=n.slice(i).map((({renderId:t})=>t));await(0,x.Yp)(t,r),(0,T.e)(t,{current:e});const a=(0,M.k9)(t),s=a.indexOf(e),c=a.slice(s),u=[];let l=e.prev;for(const e of c){const{origin:n,loop:i,random:r,loopStack:o}=e,a=(0,f.e_)({target:n,loop:i,random:r,loopStack:o},t),s=await(0,f.o9)(a,l);l=s,u.push(s)}await(0,T.W4)().hook.beforeGotoNext(),(0,T.e)(t,{current:u[0],nodes:a.slice(0,s).concat(u),renderList:n.slice(0,i).concat(u)}),(0,o.ye)(t,!1),w.i.trigger("NEXT_OK"),(0,w.U3)(t.current,!0)}(t,r),(0,O.K8)(t),await(0,x.iq)(t),await(0,P.w)(t),r}(t),(0,o.ye)(t,!1);else if(await(0,o.KY)(t)){if(!V())return(0,o.I7)(t);(0,o.ID)(t)}else(0,o.ye)(t,!1)}},Object.keys(t.handleEvents).forEach((e=>{const n=t.handleEvents[e];t.handleEvents[e]=async(...e)=>{(0,m.S_)(t,t.current);const i=await n.apply(t.handleEvents,e);return(0,m.S_)(t,t.current),i}}))}function V(){return(0,T.E3)().surveyState.refreshing}function K(){return(0,T.E3)().surveyState.nextLoading||V()}async function Y(t,e){(0,B.kZ)(e)&&await(0,D.e)(e),(0,w.U3)(e),await(0,x.mi)(e);const n=e.parent;return(0,T.E3)().realTimePreview||(n.inSingleGroup?((0,T.e)(n,{current:e}),await(0,m.AD)(n,e,{type:"page_inner",delay:60})):F()),(0,w.oP)(e),t.result}function H(t,e={}){return t=t||(0,T.E3)().surveyState,(0,T.e)(t,{renderList:[],current:null,loopStack:[],randomList:[],...e}),Q(t)}async function Q(t){(0,o.ye)(t,!0);const e=t.nodeList,n=(0,i.q_)(e),a=await(0,r.kF)(e,t,n);!function(t,e){const n=(new Date).getTime();(0,T.e)(t,{nextBtnText:e.nextBtnText||(0,S.GS)(C.CW.global.next),prevBtnText:e.prevBtnText||(0,S.GS)(C.CW.global.previous),prevEnabled:!0===e.goBackEnabled,startTime:n,currentStartTime:n})}(t,n),await(0,o.eO)(t,a,null);const{current:s}=t,c=(0,i.S)(s),u=(0,M.O2)(t);if(c||u){const e=u?"page_inner":"page_next";await(0,m.AD)(t,s,{type:e,initial:!0})}else(0,T.e)(t,{renderList:[s]}),await(0,P.w)(t),F();(0,O.K8)(t);const l=t.current;return l.reached=!0,(0,p.IU)(t,l),w.i.trigger("START_OK"),await(0,x.aC)(t),s!==l&&await(0,y.e)(t,{valid:!0,message:""},s,l),(0,w.U3)(t.current,!0),(0,o.ye)(t,!1),t}async function X(){const t=(0,T.W4)();if((0,T.E3)().surveyState)return(0,T.E3)().surveyState;const e=await async function(){const t=(0,T.E3)().sid,e=(0,T.E3)().startState;if(!e)return(0,T.W4)().app.gotoStartPage((0,R.uK)()),(0,T.E3)().customAbort(),null;if((0,T.E3)().preview)return e;const{parsedPayload:{surveyMeta:n}}=e,{payload_digest:i,channel:r,interviewee:o}=n;!function(t,e){(0,T.W4)().dev.autoRun||(0,T.W4)().storage.get(t)&&e&&!(0,T.E3)().preview&&((0,T.E3)().error((0,S.GS)(C.CW.global.antiAgain)),(0,T.E3)().customAbort())}(t,!1===n.collector.multiple_response);const a={code:t,payload_digest:i,platform:r.type,interviewee_id:o&&o.id,query_params:(0,R.uK)()};try{const t=await(0,h._Y)(a);return e.transactionID=t.id,e.status=t.status,e.platform=t.platform,e.digest=i,e.channel=r,(0,T.W4)().network.connectSocket(t.id,n.collector.id),e}catch(t){throw(0,h.cA)(t),t}}();if(!e)return null;await async function(t){const{parsedPayload:e,startNode:n,language:i}=t;if(!(0,T.E3)().preview&&!e.surveyMeta.start_auto){const{surveyMeta:{diagram_url:t}}=e;let n;try{n=await(0,h.kj)(t,{type:"GET"},!0)}catch(t){throw(0,T.E3)().error((0,S.GS)(C.CW.global.downloadError)),t}const i=await(0,L.K)(n);e.nodeList=(0,v.c5)(i.nodes,e.nodeGroups)}(0,E.O_)(n.autoCpltGroups,i);const{nodeList:r,variables:o,nodeGroups:a}=e;if(n.currentLang!==i){const t=e.langs.find((t=>t.locale===i));if(t){const e=await async function(t,e){if(!U[t.locale]){const e=async()=>{let e;if(t.content)e=t.content;else{const n=await(0,h.kj)(t.url,{type:"GET"},!0);e=await(0,L.K)(n)}return e};U[t.locale]=e()}return U[t.locale]}(t);(0,E.w3)({nodes:r,variables:o,groups:a},e)}}}(e);const n=function(t){const{parsedPayload:e,userInfo:n,theme:i,hasVar:r,sid:o,langTable:s,startNode:c,surveyId:u,summary:l,language:d,images:f,langResume:p,title:g,transactionID:m,status:h,platform:v,digest:y,channel:_,useCustomLogo:x,logoText:b,logoImageUrl:S,logoImageShowWidth:E,showLogoInEachPage:I,imageList:k,varStyles:O,variables:C,nodeGroups:L,embedApis:N}=t,{nodeList:R,surveyMeta:P,testCases:M}=e;let W=!1;(0,A.U)()||P.collector&&(W=!1===P.collector.multiple_response);const{fakedServers:U,autoCpltGroups:G,noWxShare:D,previewShadowNodes:B,previewQuickAnswer:F,ignoreSubmittingResult:q,qNumberRequired:j,asterisksRequired:V,progressBarRequired:K,nodeTypeInfoRequired:Y,limitTime:H,minTime:Q,timeoutText:X,timeLessText:Z,resumeEnabled:J}=c,$={embedApis:N,nodeGroups:L,variables:C,varStyles:O,imageList:k,useCustomLogo:x,logoText:b,logoImageUrl:S,logoImageShowWidth:E,showLogoInEachPage:I,enterMode:"start",answerChangedSinceStart:!1,previewShadowNodes:B&&!(0,T.W4)().dev.autoRun,previewQuickAnswer:F,ignoreSubmittingResult:q,langResume:p,langTable:s,testCases:M,progress:0,resumeEnabled:J||(0,A.U)(),images:f,eventHub:w.i,language:d,sid:o,parsedPayload:e,digest:y,channel:_,transactionID:m,status:h,platform:v,fakedServers:U,autoCpltGroups:G,noWxShare:D,theme:i,userInfo:n,responseStatus:"created",context:{node:void 0,option:void 0},completeUrl:"",quotaFullUrl:"",screenOutUrl:"",title:g,summary:l,bonusLimitTime:"",nodeList:R,companyID:"",oneReplyPerTerminal:W,surveyId:u,qNumberRequired:j,asterisksRequired:V,progressBarRequired:K,nodeTypeInfoRequired:Y,preview:(0,T.E3)().preview,nextBtnText:"",prevBtnText:"",prevEnabled:!1,randomList:[],loopStack:[],startTime:0,currentStartTime:0,renderList:[],current:void 0,limitTime:H||void 0,minTime:Q,timeoutText:X||"",timeLessText:Z||"",timer:-1,restTime:(0,a.KM)(H),hasVar:r,nextLoading:!1,refreshing:!1,phoneUsed:!1,phoneNumber:"",startNode:c,nodes:[],prevButton:"",nextButton:"",inSingleGroup:null,needProgressBar:!1};return z($),$}(e);return(0,T.E3)().surveyState=n,t.network.initUploader(),await async function(t){const{startNode:e}=t,n=(0,f.e_)({target:e},t),i=await(0,g.qc)(n,!0);i.valid?t.initValidationPassed=!0:((0,T.E3)().error(i.message||(0,S.GS)(C.CW.verify.failed)),(0,T.E3)().customAbort())}(n),await async function(t){if(await Q(t),function(t){let e=t.limitTime;e&&(t.timer=setInterval((async()=>{e--,e||((0,p.sH)(t),clearInterval(t.timer),(0,x.ig)(t),(0,T.E3)().error(t.timeoutText||(0,S.GS)(C.CW.global.timeOver))),(0,T.e)(t,{restTime:(0,a.KM)(e)})}),1e3))}(t),t.langResume||t.resumeEnabled&&!(0,T.E3)().preview){const e=await(0,b.y)(t);(0,T.e)(t,{answerResumer:e}),t.langResume&&setTimeout((()=>t.answerResumer.handleSure()),1e3)}t.answerResumer&&t.answerResumer.show||(0,T.W4)().hook.onStartNewSurvey(t)}(n),await t.hook.afterFetchSurvey(n),n}},5170:(t,e,n)=>{"use strict";n.d(e,{_:()=>f});var i=n(568),r=n(9677),o=n(6784),a=n(7320),s=n(8856),c=n(6496),u=n(556);const l={};function d(t){const e=l[t]||0;return Date.now()-e<3e4?((0,s.E3)().notify((0,c.GS)(i.CW.verify.tooFrequent)),null):()=>{l[t]=Date.now()}}const f={handleInputPhone(t,e){return this.handleQuestionInput({phoneNumber:t},e)},handleInputCode(t,e){return this.handleQuestionInput({code:t},e)},handleAutoLocate(t,e){return this.handleQuestionInput(t,e)},handleManualLocate(t,e){return this.handleQuestionInput(t,e)},handleGetCodeClick:t=>async function(t){return(0,u.is)(t,"verify"===t.type)?async function(t){const{parent:e,nodeUuid:n,phoneNumber:u,validateType:l}=t,{transactionID:f}=e;let p={response_id:f,question_id:n};if("sms"===l){if((0,s.E3)().preview)return(0,s.E3)().notify((0,c.GS)(i.CW.preview.noMessage)),!1;if(!u||!(0,r.KA)(u))return(0,s.E3)().notify((0,c.GS)(i.CW.fill.needPhoneNumber)),!1;const n=d(t.renderId);if(!n)return!1;p={...p,phone_num:u},t.messageGetFailed=!1;try{const i=await(0,a.eY)(p);t.serverValidations=i,e.phoneNumber=u,e.phoneUsed=i.phone_num_used,e.phoneUsed&&(0,o.U1)(e,t),n()}catch(e){return t.messageGetFailed=!0,!1}}else if("image"===l){const e=await(0,a.eY)(p);t.serverValidations=e,(0,s.e)(t,{captcha:e.image})}return!0}(t):async function(t){if((0,s.E3)().preview)return(0,s.E3)().notify((0,c.GS)(i.CW.preview.noMessage)),!1;const{phoneNumber:e,rewardId:n}=t;if(!(0,r.KA)(e))return(0,s.E3)().notify((0,c.GS)(i.CW.fill.needPhoneNumber)),!1;const o=d(t.renderId);if(!o)return!1;t.messageGetFailed=!1;try{await(0,a.ae)({phone_num:e},n),o()}catch(e){return t.messageGetFailed=!0,!1}return!0}(t)}(t)}},3120:(t,e,n)=>{"use strict";n.d(e,{CI:()=>d,Mx:()=>u,UR:()=>l,WW:()=>s,WY:()=>a,cX:()=>c,eQ:()=>f,wJ:()=>p}),n(7768),n(9952);var i=n(2352),r=n(4060),o=n(3001);function a(t,e){return(0,i.oV)(e)||t.length<=e?[...t]:s(t.map((t=>({...t.option,cascade:t}))),e).map((t=>t.cascade))}function s(t,e){return(0,i.oV)(e)||t.length<=e?[...t]:d(t.map((t=>{const e=t.origin.inferList.reduce(((t,e)=>(e.active&&"select"===e.type&&(t+=e.weight),t)),0);return{option:t,weight:e}})),e).map((t=>t.option))}function c(t){return t.filter((t=>{const{option:e}=t;return!(!e||!e.origin.inferList)&&e.origin.inferList.some((t=>t.active))}))}function u(t,e){return t.filter((t=>t.origin.inferList.some((t=>t.active&&t.type===e))))}async function l(t,e){if(!t)return;const n=e.parent;t.origin.inferList=t.origin.inferList||[];for(const e of t.origin.inferList){const{activeConfig:i}=e;i?(n.context.option=t,e.active=await(0,r.wx)(n,i),n.context.option=null):e.active=!0}}function d(t,e){if(t=[...t],(0,i.oV)(e)||t.length<=e)return t;const n=t.reduce(((t,e)=>t+e.weight),0);let r=0,o=0,a=t.map((t=>{const e=t.weight/n;o=r+e;const i={item:t,floor:r,ceil:o};return r=o,i}));const s=[];for(;s.length<e;){const t=Math.random()*o,e=a.find((e=>e.floor<=t&&e.ceil>t));e&&(s.push(e.item),a=a.filter((t=>t!==e)))}return s}async function f(t,e){const{parent:n}=e,i=[];for(const e of t)i.push(await(0,o.E3)(e.candidates,{state:n,joinBy:","}));return i.join(",")}function p(t){const e={},n=[];return t.split(",").forEach((t=>{let i=t,r=1;const o=t.match(/\(([\d\.]+)\)$/);o&&(i=t.replace(/\([\d\.]+\)$/,""),r=parseFloat(o[1]));const a=e[i];if(a)a.weight+=r;else{const t={text:i,weight:r};n.push(t),e[i]=t}})),n.filter((t=>0!==t.weight))}},1488:(t,e,n)=>{"use strict";n.d(e,{A9:()=>m,EP:()=>d,EZ:()=>w,Ep:()=>h,hS:()=>f,sh:()=>v,uc:()=>p}),n(7768),n(9624);var i=n(4708),r=n(556),o=n(9677),a=n(3120),s=n(7320);let c=null;async function u(t,e){let{start:n,end:i}=await(0,o._u)(t,e);return n===-1/0&&(n=-9999,n>i&&(n=i-9999)),i===1/0&&(i=9999,i<n&&(i=n+9999)),{start:n,end:i}}function l(t,e,n){return!!e&&e.some((e=>{if(e.startsWith("/")&&e.endsWith("/")){const n=e.substring(1,e.length-1),i=new RegExp(n);return!!t.match(i)}return n?n(t,e):t===e}))}async function d(t,e,n){let i=0,r=await t();for(;l(r,e,n);)if(r=await t(),i++,i>10)throw new Error("Hard to infer, rejected 10 times");return r}async function f(t,e,n=1){if(!t.origin.inferList)return{value:"",antis:null};const i=t.origin.inferList.filter((t=>t.active&&"input"===t.type));if(0===i.length)return{value:"",antis:null};const r=await(0,a.eQ)(i,e);if(""===r.replace(/,/g,""))return{value:"__FORCE_EMPTY__",antis:null};const o=[];if(r.split(",").forEach((t=>{t.startsWith("!")?o.push(t.substring(1)):t.match(/\(0\)$/)&&o.push(t.replace(/\(0\)$/,""))})),o.length)return{value:"",antis:o};const s=(0,a.wJ)(r);return{value:(0,a.CI)(s,n).map((t=>t.text)).join(","),antis:null}}function p(){return"1"+h(1e9,9999999999)}function g(t){return c[t]||Math.random().toString().replace("0.","")}async function m(){return c||(c=await(0,s.kj)("https://media.choiceform.com/infer/infer.json",{type:"GET",contentType:"application/json"},!1),c)}function h(t=0,e=10,n=0){const i=Math.pow(10,n);return t*=i,e*=i,((0,r.ai)(t,e)/i).toString()}function v(t,e=1,n=10){let i=g(t);for(;i.length<n;)i+=g(t);const o=i.length,a=(0,r.ai)(n,o),s=a-(0,r.ai)(e,n),c=i.substring(s,a);return""===c.trim()?v(t,e,n):c}function y(t=0,e=5e3,n=3){t=Math.max(t,0),e=Math.min(e,5e3);let i=(0,r.ai)(t,e).toString();return n>1&&(i=i+" "+(0,r.ai)(1,12)),n>2&&(i=i+" "+(0,r.ai)(1,28)),i}const _={};async function w(t,e){const n=_[t.origin.fillType]||_.none,i=await n(t,e);return"__FORCE_EMPTY__"===i?"":i}_.auto_complete=async(t,e)=>{let{completeGroups:n}=t;const{itemsMax:o,itemsMin:a}=await(0,i.jJ)(t,e),s=(0,r.ai)(a,o)||1,{value:c,antis:u}=await f(t,e,s);return c||(u&&(n=n.filter((t=>!l(t.name,u)))),(0,r.my)(n,s).map((t=>t.name)).join(","))},_.chars=async(t,e)=>{const{value:n,antis:i}=await f(t,e);if(n)return n;const{tolerance:r}=t.origin,{start:o,end:a}=await u(t,e);return d((()=>r&&0!==r.length?1===r.length?v(r[0],o,a):2===r.length&&r.includes("number")?v(r.includes("chinese")?"chinese":"alphabet",o,a):v("zh_cn"===e.parent.language?"chinese":"alphabet",o,a):v("zh_cn"===e.parent.language?"chinese":"alphabet",o,a)),i)},_.date=async(t,e)=>{const{value:n,antis:i}=await f(t,e);if(n)return n;const{grade:r}=t,{start:o,end:a}=await u(t,e);return d((()=>y(o,a,r)),i)},_.date_range=async(t,e)=>{const{value:n,antis:i}=await f(t,e);if(n)return n;const r=y(1960,2050,3),o=Number(r.split(" ")[0]);return d((()=>{const t=y(o,2060);return r+" - "+t}),i)},_.email=async(t,e)=>{const{value:n,antis:i}=await f(t,e);return n||d((()=>((0,r.Av)(1,6)+"@"+(0,r.Av)(1,6)+"."+(0,r.Av)(1,4)).toLowerCase()),i)},_.float=async(t,e)=>{const{value:n,antis:i}=await f(t,e);if(n)return n;const{scale:r}=t;return d((async()=>{const{start:n,end:i}=await u(t,e);return h(n,i,r)}),i)},_.integer=async(t,e)=>{const{value:n,antis:i}=await f(t,e);if(n)return n;const{start:r,end:o}=await u(t,e);return d((()=>h(r,o)),i)},_.list_select=async(t,e)=>{let{selectList:n}=t;const{itemsMax:o,itemsMin:a}=await(0,i.jJ)(t,e),s=(0,r.ai)(a||1,o||1)||1,{value:c,antis:u}=await f(t,e,s);return c||(u&&(n=n.filter((t=>!l(t,u)))),(0,r.my)(n,s).join(","))},_.none=async(t,e)=>{const{value:n,antis:i}=await f(t,e);return n||d((()=>v("zh_cn"===e.parent.language?"chinese":"alphabet",1,10)),i)},_.phone_number=async(t,e)=>{const{value:n,antis:i}=await f(t,e);return n||d((()=>p()),i)},_.postcode=async(t,e)=>{const{value:n,antis:i}=await f(t,e);return n||await d((()=>h(1e5,999999)),i)},_.time=async(t,e)=>{const{value:n,antis:i}=await f(t,e);return n||await d((()=>h(1,25)+":"+h(1,60)),i)},_.time_range=async(t,e)=>{const{value:n,antis:i}=await f(t,e);return n||await d((()=>{const t=h(1,20);return t+":"+h(1,60)+" - "+h(Number(t)+1,24)+":"+h(1,60)}),i)},_.time_duration=async(t,e)=>{const{value:n,antis:i}=await f(t,e);if(n)return n;const{grade:r}=t;return await d((()=>{if(r<=3){let t=h(1,20)+"d";return r>1&&(t+=" "+h(1,24)+"h"),r>2&&(t+=" "+h(1,60)+"m"),t}{let t=h(1,60)+"h";return r>4&&(t+=h(1,60)+"m"),r>5&&(t+=h(1,60)),t}}),i)},_.url=async(t,e)=>{const{value:n,antis:i}=await f(t,e);return n||await d((()=>("https://"+(0,r.Av)(1,3)+"."+(0,r.Av)(1,6)+"."+(0,r.Av)(1,3)).toLowerCase()),i)}},8360:(t,e,n)=>{"use strict";n.d(e,{E:()=>D}),n(5960),n(9952);var i=n(5776),r=n(556),o=n(4708),a=n(1488),s=n(3001),c=n(8856),u=n(9948),l=n(3120),d=n(2352),f=n(3244),p=n(6276);async function g(t,e){const n={};t.sortNo&&(n.sortNo=-1),t.selected&&(n.selected=!1),t.value&&(n.value=""),await(0,l.UR)(t,e),(0,c.e)(t,n)}async function m(t,e){(0,c.e)(t,{selected:!1}),t.option.origin&&await(0,l.UR)(t.option,e),t.list&&t.list.forEach((t=>m(t,e)))}async function h(t){(0,p._O)(t)&&(0,c.e)(t.video,{ended:!0});let e=[];(0,p.G6)(t)&&(e=[...e,...t.options]),(0,p.IN)(t)&&(e=[...e,...t.otherOptions]);for(const n of e)await g(n,t);const{cascade:n}=t;n&&await m(n,t)}var v=n(1768);const y={doc:"os/client/o_1dn9kbm3u1f4d1tsudcg1fuh17678.txt",image:"os/client/o_1dn9kbq468tj1kq2dt3qeo1pumd.png",video:"os/client/o_1dn9kpohua8v1jv51oobq981dvv8.mp4",audio:"os/client/o_1dn9l7gbs1maj1e3nn941e6p125gj.mp3"},_={};function w(t){const{regions:e}=t,n=t.infoRange||"county",i=function(t){const e=k((0,o.wR)(t),1)[0];if(!e||e.isOtherOpt)return null;const n=e.origin.inferList.some((t=>t.active));return n?e:null}(t);if(i){const t=i.text.split("-");return{address:t,indexes:(0,f.Cm)(t,e),point:{lat:i.origin.latitude,lng:i.origin.longitude}}}{const t=(0,r.ec)(e.length);let i=(0,d.Wo)(t);const o=e[t],a=[o.name,"",""];if("province"!==n){const t=(0,r.ec)(o.cities.length),e=o.cities[t];if(a[1]=e.name,i=i+" "+t,"city"!==n){const t=(0,r.ec)(e.areas.length),n=e.areas[t];n&&(a[2]=n.name,i=i+" "+t)}}return{address:a,indexes:i,point:{lng:0,lat:0}}}}async function x(t,e){const{value:n}=await(0,a.hS)(t,e);if(n)return"__FORCE_EMPTY__"===n?"":n;const{fileLimits:i}=t,o=(0,r.my)(i,1)[0];return y[o]}async function b(t,e){const n=[],i=[];t.forEach((t=>{if((0,o.yg)(t.origin))n.push(t);else{let e=!0;(0,v.I9)(t.origin)&&(0,d.oV)(t.origin.inferList)&&(e=Math.random()>.9),e&&i.push(t)}})),await O(i,e,1);const a=(0,r.ai)(1,n.length);E(n,e,a)}async function T(t,e){const{parent:n,origin:i}=e;let o=await(0,s.W0)(i.fillMin,{state:n});o=o||0;let a=t.length;o&&i.inputInferLimit>o&&i.inputInferLimit<a&&(a=i.inputInferLimit);const c=o?(0,r.ai)(o,a):a;return(0,r.my)(t,c)}async function S(t,e){t.parent.context.option=e;const n=await(0,a.EZ)(e,t);return t.parent.context.option=null,await t.parent.handleEvents.handleOptionInput(n,e,t)}function E(t,e,n){(0,r.my)(t,n).forEach((t=>S(e,t)))}async function I(t,e){if(await t.parent.handleEvents.handleOptionClick(e,t),e.useComment)return S(t,e)}function k(t,e){const n=(0,l.Mx)(t,"select"),i=[],o=[];if(n.forEach((t=>{t.origin.inferList.every((t=>0===Number(t.weight)))||t.disabled?i.push(t):o.push(t)})),o.length>0)return(0,l.WW)(o,e);{let n=t.filter((t=>!t.disabled));return i.length>0&&(n=t.filter((t=>!i.includes(t)))),(0,r.my)(n,e)}}async function O(t,e,n){const i=k(t,n).sort(((t,e)=>(0,v.I9)(t.origin)?1:(0,v.e4)(t.origin,e.origin)));for(const t of i)await I(e,t)}async function C(t,e){const{multiple:n,min:i,max:o,list:a}=t;if(!a)return;const s=function(t,e){const n=(0,l.cX)(t);return n.length>0?(0,l.WY)(n,e):(0,r.my)(t,e)}(a,n?(0,r.ai)(i||1,o||1):1);for(const n of s){const i=a.indexOf(n);await e.parent.handleEvents.handleCascadeClick(i,t,e),await C(n,e)}}async function L(t){const e=(0,o.wR)(t),n=t.origin;let a=1;if((0,i._A)(n)){const e=await(0,i.EH)(t,t.parent),{min:o}=e;let{max:s}=e;const{selectInferLimit:c}=n;c>o&&c<s&&(s=c),a=(0,r.ai)(o||1,s)}const s=[],c=[];e.forEach((t=>{(0,o.yg)(t.origin)?c.push(t):s.push(t)})),await O(s,t,a);const u=(0,r.ai)(1,c.length);E(c,t,u)}function N(t,e){const n=[];for(let i=t;i<=e;i++)n.push(i);return n}function R(t,e,n){const i=[];for(let r=t;r<e;r+=n)i.push(r);return i.push(e),i}async function A(t,e,n){const i=[...n].sort(),{value:o,antis:s}=await(0,a.hS)(t,e,1);if(o){if("__FORCE_EMPTY__"===o)return"0";{const t=i[0],e=i[i.length-1];return o<t?t:o>e?e:o}}{const t=()=>(0,r.my)(n,1)[0];return(0,a.EP)(t,s)}}function P(t){let[e,n]=t.split("~").map((t=>Number(t)));return e>n&&([n,e]=[e,n]),[e,n]}function M(t,e,n){const[i,o]=t.split("_");let a,s;if(i.includes("~")){const[t,e]=P(i);a=(0,r.ai)(t,e)}else a=Math.min(Math.max(Number(i),0),e);if(o.includes("~")){const[t,e]=P(o);s=(0,r.ai)(t,e)}else s=Math.min(Math.max(Number(o),0),n);return{x:a,y:s}}function W(t,e){const[n,i]=t.split("_").map((t=>Number(t))),[r,o]=e.split("_");let a=!1,s=!1;if(r.includes("~")){const[t,e]=P(r);a=t<=n&&n<=e}else a=Number(r)===n;if(o.includes("~")){const[t,e]=P(o);s=t<=i&&i<=e}else s=Number(o)===i;return a&&s}async function U(t,e){const{value:n,antis:i}=await(0,a.hS)(t,e,1),{mapImgHeight:o,mapImgWidth:s}=e;if(n)return"__FORCE_EMPTY__"===n?null:M(n,s,o);{const t=()=>(0,r.ec)(s)+"_"+(0,r.ec)(o);return M(await(0,a.EP)(t,i,W),s,o)}}function G(t,e){let n=e.filter((e=>!(-1!==e.sortNo||!e.origin.inferList)&&e.origin.inferList.some((e=>{if(!e.active)return!1;const n=(0,l.wJ)(e.candidates),i=(0,l.CI)(n,1);return i.length>0&&Number(i[0].text)<=t}))));0===n.length&&(n=e.filter((t=>-1===t.sortNo)));const i=(0,r.my)(n,1)[0];i&&(0,c.e)(i,{sortNo:t,selected:!0})}async function D(t){return await(0,a.A9)(),async function(t,e){const{type:n,readonly:i}=t;if(i)return(0,u.Y1)();await h(t);const r=_[n]||L;await r(t)}(t)}_.select=L,_.value_mark=async t=>{const{options:e,otherOptions:n}=t,i=await T(e,t);for(const e of i){const n=e.minValue||1,i=e.maxValue||5,r=e.step,o=await A(e,t,R(n,i,r).map((t=>(0,d.Wo)(t))));await t.parent.handleEvents.handleOptionInput(o,e,t)}await b(n,t)},_.heat_map=async t=>{const{options:e,otherOptions:n}=t;for(const n of e){const e=await U(n,t);e&&await t.parent.handleEvents.handleQuestionInput(e,t)}await b(n,t)},_.icon_mark=async t=>{const{options:e,otherOptions:n}=t,i=await T(e,t);for(const e of i){const n="rating-nps"===e.iconName,i=n?0:1,r=(n?e.iconCount-1:e.iconCount)||5,o=await A(e,t,N(i,r).map((t=>(0,d.Wo)(t))));await t.parent.handleEvents.handleOptionInput(o,e,t)}await b(n,t)},_.slide_rate=async t=>{const{options:e,rateOptions:n,otherOptions:i}=t,r=await T(e,t),o=n.map((t=>t.value));for(const e of r){const n=await A(e,t,o);await t.parent.handleEvents.handleOptionInput(n,e,t)}await b(i,t)},_.weight=async t=>{let{weightTotal:e}=t;const{options:n,otherOptions:i}=t;e<=0&&(e=100);const o=[],a=[];n.forEach((t=>{const{inferList:e}=t.origin;e&&e.some((t=>t.active))?o.push(t):a.push(t)}));const s=[];for(const n of o){const i=n.origin.inferList.filter((t=>t.active)),r=await(0,l.eQ)(i,t),o=(0,l.wJ)(r),a=(0,l.CI)(o,1),c=Number(a[0].text);s.push(c),e-=c}const c=(0,r.Sq)(e,a.length),u=s.concat(c),d=o.concat(a);for(const[e,n]of d.entries()){const i=u[e];await t.parent.handleEvents.handleOptionInput(i.toString(),n,t)}await b(i,t)},_.fill=async t=>{const{options:e,otherOptions:n}=t,i=await T(e,t);for(const e of i)await S(t,e);await b(n,t)},_.sequence=async t=>{const{options:e,otherOptions:n}=t,i=e.length;let r=1;for(;r<=i;)G(r,e),r+=1;e.sort(((t,e)=>t.sortNo>e.sortNo?1:-1)),await b(n,t),(0,u.Y1)()},_.cascade=async t=>{const{cascade:e,otherOptions:n}=t;return await C(e,t),b(n,t)},_.describe=async()=>{(0,u.Y1)()},_.max_diff=async t=>{const e=function(t){const e=[],{options:n,itemCountPerTask:i,taskCount:r}=t,o=Math.ceil(r*i/n.length);return t.options.forEach((t=>{if(!t.origin.inferList)return;let n=t.origin.inferList.reduce(((t,e)=>(e.active&&(t+=e.candidates.split(",").map((t=>Number(t)||0)).reduce(((t,e)=>t+e),0)),t)),0);n>o?n=o:n<-o&&(n=-o),n&&e.push({needValue:n,option:t})})),e}(t),{tasks:n,parent:{handleEvents:i}}=t;for(const o of n){let n=o.items.find((t=>e.find((e=>{const n=e.option===t.option&&e.needValue>0;return n&&(e.needValue-=1),n})))),a=o.items.find((t=>e.find((e=>{const n=e.option===t.option&&e.needValue<0;return n&&(e.needValue+=1),n}))));if(!n){const t=o.items.filter((t=>e.every((e=>e.option!==t.option))));n=(0,r.my)(t,1)[0]}if(!a||a===n){const t=o.items.filter((t=>e.every((e=>e.option!==t.option))&&t!==n));a=(0,r.my)(t,1)[0]}await i.handleMaxDiffInput(1,n,o,t),await i.handleMaxDiffInput(-1,a,o,t)}},_.upload=async t=>{const{options:e,otherOptions:n}=t,{min:o,max:a}=await(0,i.YP)(t,t.parent),s=(0,r.ai)(o||1,a),c=(0,r.my)(e,s);for(const e of c)await t.parent.handleEvents.handleOptionInput({filePath:await x(e,t)},e,t);await b(n,t)},_.region=t=>{const{indexes:e}=w(t);return t.parent.handleEvents.handleQuestionInput(e,t)},_.location=t=>{const{address:e,point:n}=w(t),i={address:{province:e[0],city:e[1],district:e[2],country:""},point:{lat:n.lat||Number((0,a.Ep)(0,90)),lng:n.lng||Number((0,a.Ep)(0,180))}};return t.parent.handleEvents.handleQuestionInput(i,t)},_.area=_.location,_.matrix=async t=>{const{options:e,flatten:n,otherOptions:o,origin:a}=t,{min:s,max:c}=await(0,i.EH)(t,t.parent);if((0,i.cd)(a))await O(e,t,1);else if((0,i.cx)(a)){let e=n;const i=n[0].list.length;n.length>i&&(e=(0,r.my)(n,i));const o=[];for(const n of e){const e=n.list.filter(((t,e)=>!o.includes(e)));if(0===e.length)break;await O(e,t,1);const i=n.list.findIndex((t=>t.selected));o.push(i)}}else if((0,i.ct)(a)||(0,i.gd)(a))for(const e of n)await O(e.list,t,1);else if((0,i.KC)(a)||(0,i.S2)(a))for(const e of n){const n=(0,r.ai)(s||1,c);await O(e.list,t,n)}else if((0,i.Un)(a)){const n=(0,r.ai)(s||1,c);await O(e,t,n)}await b(o,t)},_.end=async()=>{},_.verify=t=>t.parent.handleEvents.handleQuestionInput({phoneNumber:(0,a.uc)(),code:(0,a.sh)("number")},t)},8792:(t,e,n)=>{"use strict";n.d(e,{U:()=>u,e:()=>c}),n(7768),n(9952);var i=n(8856);const r=[],o=[/^https:\/\/[^.]+\.choiceform\.com\//,/^http:\/\/localhost/],a={};async function s(t,e){if(!a[t]){const n=async()=>{const n=(0,i.W4)().network.getFakeHost();if(!function(t){return o.some((e=>!!t.match(e)))}(t))throw new Error("can not load plugin files from untrusted site: "+t);n.currentSpace=t,await(0,i.W4)().network.loadFakeFile("".concat(t,".js"),{crossorigin:"anonymous"},e),n.currentSpace="",r.push(t)};a[t]=n()}return a[t]}async function c(t){const e=(0,i.W4)().network.getFakeHost().fakedServers;if(!e[t]){const e=t.replace(/\/[^/]+$/,"");await s(e,!0)}return e[t]}async function u(t,e){let n=t.startNode.fakedServers.concat(function(t){if((0,i.E3)().preview)return[];const{parsedPayload:{surveyMeta:{collector:{sampler_config:e}}}}=t;return e?["committed_url","examine_failed_url","examine_skipped_url","invalid_url"].reduce(((t,n)=>{const i=e[n];if(i&&0===i.indexOf("FAKE:")){const e=i.substring(5,i.lastIndexOf("/"));t.includes(e)||t.push(e)}return t}),[]):[]}(t));if(n=n.filter((t=>!r.includes(t))),n&&0!==n.length)for(const t of n)await s(t,e)}},4732:(t,e,n)=>{"use strict";n.d(e,{y:()=>r});const i={actions:[]};function r(t){i.actions.push(t)}},6784:(t,e,n)=>{"use strict";n.d(e,{EZ:()=>R,GS:()=>N,IU:()=>H,Id:()=>C,ML:()=>F,Oo:()=>O,Q3:()=>q,Sg:()=>M,U1:()=>x,U7:()=>Y,Ux:()=>S,W2:()=>A,Wy:()=>Q,YZ:()=>z,aS:()=>L,cR:()=>B,kB:()=>W,kr:()=>U,kv:()=>D,mT:()=>V,mU:()=>b,m_:()=>k,me:()=>T,ms:()=>P,sH:()=>G,ui:()=>E,we:()=>I,y:()=>j}),n(1088);var i=n(1884),r=n(3080),o=n(556),a=n(3001),s=n(5616),c=n(7320),u=n(4708),l=n(8856),d=n(7404),f=n(6276);let p=[];const g=1e4;let m=-1;function h(){const{dev:{local:t}}=(0,l.W4)(),{preview:e,realTimePreview:n,hostConfig:{recordUrl:i}}=(0,l.E3)();return!(t||e||n||!i)}function v(t,e=!1){if((0,s.K)()&&(!e||"start"===t.type))return;t.description=(0,a.Qr)(t.description);const n=t.description;if(h()){const i=p[p.length-1];i&&(n.includes(i.description)||i.description.includes(n))&&p.pop(),p.push(t),e&&y()}}function y(){if(h()){if(clearTimeout(m),p.length>0){const t=p;p=[];const e=(0,l.E3)().hostConfig.recordUrl;(0,c.SY)(e,{type:"POST",data:{records:t}})}m=setTimeout(y,g)}}function _(t,e,n,i,r){var o,a,s;const{surveyId:c,transactionID:u,userInfo:f}=n;let p,g,m,h,v,y,_;if(("gift"===i||"start"===i&&f)&&(p=f.nickname,g=f.openid,p&&(h=(0,l.W4)().name)),"start"===i&&(m=JSON.stringify((0,d.uK)())),e&&t){const e=t;e.yid?(y=e?e.yid:void 0,_=e?e.xid:void 0):v=t?t.uuid.toLowerCase():void 0}return{survey_id:c,collector_id:null===(s=null===(a=null===(o=n.parsedPayload)||void 0===o?void 0:o.surveyMeta)||void 0===a?void 0:a.collector)||void 0===s?void 0:s.id,response_id:u,node_id:e?e.nodeUuid.toLowerCase():void 0,option_id:v,row_option_id:y,col_option_id:_,description:r,type:i,recorded_at:new Date,provider:h,user_name:p,user_id:g,query_params:m}}function w(t){const e=(0,f.kZ)(t)?t.title:"",n=t.loop?"[".concat(t.nodeName,":").concat(e,"]"):"[".concat(t.nodeName,"]");return(0,a.Qr)(n)}function x(t,e){(0,l.W4)().dev.infer||v(_(null,e,t,"used_phone","在题目:".concat(w(e),"中检测到重复使用的手机号:").concat(t.phoneNumber)))}function b(t,e){(0,l.W4)().dev.infer||v(_(null,e,t,"verify_fail","在题目:".concat(w(e),"高级验证失败")))}function T(t,e){if((0,l.W4)().dev.infer)return;const{type:n,parent:i}=e;if("upload"===n||"verify"===n||"gift"===n)return;let o,s="",c="";if("menu"===n||"cascade"===n)c=(0,u.wR)(e).reduce(((e,n)=>(n.selected&&(e+="[".concat(n.text,"]")),t=n,e)),""),o=c?"select":"deselect",s=c?"选中":"清除所有选中";else{const i=t.selected;if(o=i?"select":"deselect",s=i?"选中":"取消选中","select_icon"===n||"select_image"===n)c="[".concat((0,r.oB)(t.origin),"]");else if("matrix"===e.type)if(t.isOtherOpt)c="[".concat(t.text,"]");else{const e=t;c="[".concat((0,a.Qr)(e.optionX.text)," ").concat((0,a.Qr)(e.optionX.text),"]")}else c="[".concat((0,a.Qr)(t.text),"]")}const d="在题目:".concat(w(e),"中").concat(s,"选项:").concat(c);v(_(t,e,i,o,d))}function S(t,e,n){if((0,l.W4)().dev.infer)return;const i="在题目:".concat(w(n),"的选项:[").concat((0,a.Qr)(e.text),"]中输入自动填充触发文字:").concat(t);v(_(e,n,n.parent,"auto_complete",i))}function E(t,e,n){if((0,l.W4)().dev.infer)return;const i=n.parent;let r,o;"value_mark"===n.type||"icon_mark"===n.type||"slide_rate"===n.type||"weight"===n.type?(r="打分:"+e.value,o="rate"):"upload"===n.type?(r=t?"上传图片":"清除图片",o="upload"):(r="输入:"+e.value,o="input"),v(_(e,n,i,o,"在题目:".concat(w(n),"的选项:[").concat((0,a.Qr)(e.text),"]中").concat(r)))}function I(t,e){if((0,l.W4)().dev.infer)return;const n=e.parent,i=e.options[t];i&&(-1===i.sortNo?v(_(i,e,n,"cancel_sort","在题目:".concat(w(e),"中取消了对选项:[").concat((0,a.Qr)(i.text),"]的排序"))):v(_(i,e,n,"sort","在题目:".concat(w(e),"中将选项:[").concat((0,a.Qr)(i.text),"]排序到第").concat(i.sortNo,"位"))))}function k(t){if((0,l.W4)().dev.infer)return;const e="在题目:".concat(w(t),"中 定位失败");v(_(null,t,t.parent,"locate_failed",e))}function O(t,e){if((0,l.W4)().dev.infer)return;const n=e.parent,i=e.type,r=e.value;let o="input",a="输入";if("region"===i)a="输入:"+r;else if("location"===i||"area"===i)o="locate",a="定位到:"+r;else if("verify"===i){const e=typeof t;if("string"===e)a="输入:"+t;else if("object"===e){const{code:e,phoneNumber:n}=t;void 0!==n?(o="input_phone",a="的手机号码中输入:".concat(n)):(o="input_code",a="的密码/验证码中输入:".concat(e))}}v(_(null,e,n,o,"在题目:".concat(w(e),"中").concat(a)))}function C(t){(0,l.W4)().dev.infer||v(_(null,t,t.parent,"prev","在题目:".concat(w(t),"中点击上一题")))}function L(t,e){(0,l.W4)().dev.infer||v(_(null,e,t.parent,"prev","返回到题目: ".concat(w(e),",由题目:").concat(w(t),"后退而来")))}function N(t){(0,l.W4)().dev.infer||v(_(null,t,t.parent,"next","在题目:".concat(w(t),"中点击下一题")))}function R(t,e){(0,l.W4)().dev.infer||v(_(null,e,t.parent,"next","end"===e.type?"到达结束节点: ".concat(w(e),",由题目:").concat(w(t),"前进而来"):"进入题目: ".concat(w(e),",由题目:").concat(w(t),"前进而来")))}function A(t,e,n){(0,l.W4)().dev.infer||v(_(null,e,n,"check_fail","从".concat(w(t),"走向甄别失败")),!0)}function P(t,e){(0,l.W4)().dev.infer||v(_(null,t.current,t,"quota_fail","配额失败,答案数:".concat(e)),!0)}function M(t,e){(0,l.W4)().dev.infer||v(_(null,t.current,t,"check_submit","甄别提交,答案数:".concat(e)))}function W(t,e){(0,l.W4)().dev.infer||v(_(null,t,e,"time_less","答题时间太少被排除"),!0)}function U(t,e){(0,l.W4)().dev.infer||v(_(null,t,e,"abandon_answer","按结束节点要求抛弃答案"),!0)}function G(t){(0,l.W4)().dev.infer||v(_(null,t.current,t,"time_over","答题超时未完成"),!0)}function D(t,e,n,i){(0,l.W4)().dev.infer||v(_(null,t,e,"full_submit","正式提交,答案数:".concat(n,"个答案 \n 提交回应:").concat(JSON.stringify(i))),!0)}function B(t,e,n=!1){(0,l.W4)().dev.infer||v(_(null,t,e,n?"lottery_goal":"lottery_fail",n?"抽奖:中奖":"抽奖:未中奖"),!0)}function F(t,e){(0,l.W4)().dev.infer||v(_(null,t,e,"gift","领奖"),!0)}function q(t,e,n,i,r){(0,l.W4)().dev.infer||v(_(e,n,t,"auto_input","在题目:".concat(w(n),"中自动填充选项:[").concat(i,"],期待值:[").concat(r,"]")))}function j(t,e,n,i="成功"){(0,l.W4)().dev.infer||v(_(null,n,t,"auto_skip","在题目:".concat(w(n),"中尝试自动选中选项:[").concat((0,a.Qr)(e.text),"]").concat(i)))}function z(t,e,n){if((0,l.W4)().dev.infer)return;let i="自动跳过题目:".concat(w(e)," by ").concat(n);"logic"===e.type&&(i+=" logicResult:".concat(e.logicResult)),v(_(null,e,t,"auto_skip",i))}function V(t,e,n){(0,l.W4)().dev.infer||v(_(null,n,t,"opt_display","在题目:".concat(w(n),"中显示选项:[").concat((0,a.Qr)(e.text),"]")))}function K(){const t="browser_uuid";let e=(0,l.W4)().storage.get(t);return e||(e=(0,o.YF)(),(0,l.W4)().storage.set(t,e)),e}function Y(){if((0,l.W4)().dev.infer)return;const t=(0,d.uK)();t.code&&t.state||v({type:"enter",collector_code:(0,l.E3)().sid,browser_uuid:K(),recorded_at:(0,i.kF)(),description:"来自"+(0,l.W4)().system.getReferer()},!0)}function H(t,e){if((0,l.W4)().dev.infer)return;let n="开始答题,进入到题目: ".concat(w(e)," ");const{browser:i,device:r,engine:o,os:a}=(0,l.W4)().system.device;i&&(n+="browser:".concat(i.name||""," ").concat(i.version||"",", ")),r&&(n+="device:".concat(r.type||""," ").concat(r.vendor||""," ").concat(r.model||"",", ")),o&&(n+="engine:".concat(o.name||""," ").concat(o.version,", ")),a&&(n+="os:".concat(a.name||""," ").concat(a.version||""));const s=_(null,e,t,"start",n);s.browser_uuid=K(),s.collector_code=(0,l.E3)().sid,v(s,!0)}function Q(t,e){(0,l.W4)().dev.infer||v(_(null,null,t,"resume","开始断点续答:"+e),!0)}},5667:(t,e,n)=>{"use strict";n.d(e,{E:()=>a});var i=n(8856),r=n(8792);let o=!1;async function a(t){const{url:e,data:n,silent:a,responseId:s}=t,c=e+JSON.stringify(n),u=await(0,r.e)(e);if(!u){const t="FAKE NOT FOUND:".concat(e);throw(0,i.E3)().error(t),new Error(t+(s?" responseId is: ".concat(s):""))}let l=null;try{if(l=await u(n,(0,i.E3)()),l.exception)throw l.exception}catch(t){if(!(0,i.E3)().realTimePreview){const e="FAKE ERROR:".concat(c," ").concat(t.stack&&t.stack.split("\n")[0]);throw a||(0,i.E3)().error(e),new Error(e+(s?" responseId is: ".concat(s):""))}l={result:""}}return o&&console.info(n,l),o&&console.info(JSON.stringify(n),JSON.stringify(l)),l}},7320:(t,e,n)=>{"use strict";n.d(e,{FW:()=>u,G8:()=>I,I1:()=>T,KY:()=>_,Kk:()=>f,MT:()=>S,O:()=>k,SC:()=>p,SY:()=>h,_K:()=>x,_Y:()=>y,aS:()=>l,ae:()=>E,cA:()=>g,eI:()=>w,eY:()=>b,kj:()=>m,qU:()=>v});var i=n(7404),r=n(6496),o=n(8856),a=n(568),s=n(4732);let c="";const u={diagram_has_errors:"diagram_has_errors",survey_not_exist:"survey_not_exist",survey_offline:"survey_offline",oauth_error:"oauth_error",interviewee_missing_error:"interviewee_missing_error",interviewee_invalid_error:"interviewee_invalid_error",multi_responses_error:"multi_responses_error",red_envelope_duplicated:"red_envelope_duplicated",red_envelope_expired:"red_envelope_expired",red_envelope_received_by_yourself:"red_envelope_received_by_yourself",red_envelope_received_by_others:"red_envelope_received_by_others",red_envelope_intercepted:"red_envelope_intercepted",red_envelope_send_error:"red_envelope_send_error"},l={quota_full:"quota_full",response_overflow:"response_overflow",quota_not_match:"quota_not_match"},d=[400,401,402,403,404,405,422,500];async function f(t,e,n){const i=await(0,o.W4)().network.request(t,e,n);if((r=i).status>=200&&r.status<300)return function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}(i.response);throw i;var r}function p(t){const e=JSON.parse(t&&t.response||"{}");return e&&d.includes(e.status)?e.code+"":""}function g(t){const e=p(t);if(e!==c&&e){if(l[e])return;u[e]?(0,o.E3)().error(k(e)):(0,o.E3)().notify(k(e))}}async function m(t,e,n){try{return await f(t,e,n)}catch(n){throw g(n),(0,o.E3)().uploadLog("api error: ".concat(e.type,":").concat(t," ").concat(JSON.stringify(n))),n}}function h(t,e={type:"GET"},n=!1){return m(t,e={...e,contentType:"application/json"},n)}async function v(t){if((0,o.E3)().preview)return async function(t){if("00000000-0000-0000-0000-000000000000"===t)return{smaller_diagram_url:"http://localhost:12345/unit_test_payload.json"};const e=(0,i.uK)(),n=e.type;let r=(0,o.E3)().hostConfig.qApiHost+"/surveys/"+t+"/preview";"preview_template"===n?r=(0,o.E3)().hostConfig.host+"/v1/public_templates/"+t:"edit_template"===n&&(r=(0,o.E3)().hostConfig.host+"/v1/templates/"+t);const a=await h(r,{type:"GET",jwt:e.jwt}),{diagram:s}=a;return{smaller_diagram_url:a.diagram_url||s.diagram_url,langs:a.langs}}(t);const e=(0,o.W4)().auth.retrieveAuthSurveyMeta();return e||h((0,o.E3)().hostConfig.qApiHost+"/surveys/"+t,{type:"GET"}).catch((t=>{throw function(t){t&&d.includes(t.status)||(0,o.E3)().error((0,r.GS)(a.CW.global.downloadError))}(t),t}))}function y(t){const e=(0,o.E3)().hostConfig.qApiHost+"/responses";return c=u.multi_responses_error,h(e,{type:"POST",data:t},!0).then((t=>(c="",t))).catch((n=>{throw(0,o.E3)().uploadLog("getResponseInfo failed, url is ".concat(e,", options are ").concat(JSON.stringify({type:"POST",data:t}))),c="",n}))}function _(t,e){return h((0,o.E3)().hostConfig.qApiHost+"/responses/"+e+"/examine",{type:"PUT",data:t})}function w(t,e){return h((0,o.E3)().hostConfig.qApiHost+"/responses/"+e+"/skip",{type:"PUT",data:t})}function x(t,e){return h((0,o.E3)().hostConfig.qApiHost+"/responses/"+e,{type:"PUT",data:t})}async function b(t){if((0,o.E3)().preview)return(0,o.E3)().notify((0,r.GS)(a.CW.preview.noMessage)),{};const e=(0,o.E3)().hostConfig.qApiHost+"/validations";t.question_id=t.question_id.toLowerCase();const n=await h(e,{type:"POST",data:t});return t.phone_num&&(0,o.E3)().notify((0,r.GS)(a.CW.verify.sendSuccess)),n}async function T(t,e){return(0,o.E3)().preview?((0,o.E3)().notify((0,r.GS)(a.CW.preview.noMessage)),{}):h((0,o.E3)().hostConfig.qApiHost+"/validations/"+e,{type:"PUT",data:t})}async function S(t,e){const n=(0,o.W4)().storage.get("gift-"+t.code);if(n)return JSON.parse(n);const i=(0,o.E3)().hostConfig.qApiHost+"/rewards/"+e+"/red_envelope",r=await m(i,{type:"POST",data:t},!1);return(0,o.W4)().storage.set("gift-"+t.code,JSON.stringify(r)),r}async function E(t,e){if((0,o.E3)().preview)return{};const n=(0,o.E3)().hostConfig.qApiHost+"/rewards/"+e+"/custom";try{const e=await m(n,{type:"PUT",data:t},!1);return(0,o.E3)().notify((0,r.GS)(a.CW.verify.sendSuccess)),e}catch(t){throw(0,o.E3)().notify((0,r.GS)(a.CW.verify.sendFailed)),t}}async function I(t){(0,s.y)(t);const{preview:e}=(0,o.E3)(),{dev:{autoRun:n,infer:i}}=(0,o.W4)();return e||n||i?null:m((0,o.E3)().hostConfig.qApiHost+"/webhooks",{type:"POST",data:t},!1)}function k(t){return(0,r.GS)(a.CW.backEnd[t])||t}},3004:(t,e,n)=>{"use strict";n.d(e,{G:()=>r,U:()=>o}),n(7768);var i=n(7404);function r(t){const e=(0,i.uK)().offline_survey_id;return e?t.replace(/^https?:\/\//,"/".concat(e,"/")):t}function o(){return!!(0,i.uK)().offline_survey_id}},6072:(t,e,n)=>{"use strict";n.d(e,{Ed:()=>g,g5:()=>f,eU:()=>p});var i=n(6620),r=n(3001),o=n(6348),a=n(8856),s=(n(7768),n(3684));var c=n(5667),u=n(7320);let l=!1;const d={valid:!0,message:"",result:""};async function f(t,e,n,o){const{method:f,embedId:p}=e,g="embed"===f,m="fake"===f;if((0,a.E3)().realTimePreview&&!g&&!m||!function(t){const e=t.params instanceof Array;return"embed"===t.method?!(!e||!t.embedId):!(!e||!t.url)}(e))return{...d};const h=await(0,r.Oj)(e.url,{state:t}),v=await(0,i.aI)(t,e);n&&Object.keys(n).forEach((t=>{n[t]&&(v[t]=n[t])}));let y=null;if(g)y=await async function(t){const{embedId:e,data:n,embedApis:i,responseId:r}=t,o=function(t,e){const n=e.find((e=>e.id===t));return n?(n.fn||(n.fn=function(t){if(t.fn)return t.fn;let e,n=t.code.replace(/<br>/g,"");n="(function(){ /* embedApi.".concat(t.name," */ ").concat(n,"})()");try{return e=(0,s.y)(n,!0),e}catch(t){return()=>({result:"",message:""})}}(n)),n.fn):null}(e,i);let c;try{c=await o(n,(0,a.E3)())}catch(t){const n="EMBED ERROR:".concat(function(t,e){const n=e.find((e=>e.id===t));return n?n.name:t}(e,i)," ").concat(t.stack&&t.stack.split("\n")[0]);throw(0,a.E3)().error(n),new Error(n+(r?" responseId is: ".concat(r):""))}return c}({embedId:p,data:v,embedApis:t.embedApis,responseId:null==t?void 0:t.transactionID});else if("fake"===f)y=await(0,c.E)({url:h,data:v,silent:o,responseId:null==t?void 0:t.transactionID});else{let e="GET";"post"===f&&(e="POST");let n=null;try{n=await(0,u.Kk)((0,a.W4)().dev.parseRealUrl(h),{type:e,data:v,contentType:"application/json"},!1)}catch(n){const i="REAL ERROR:".concat(e," ").concat(h," ").concat(JSON.stringify(n));o||(0,a.E3)().error(i);const r=i+((null==t?void 0:t.transactionID)?" responseId is: ".concat(null==t?void 0:t.transactionID):"");throw new Error(r)}l&&console.info({...v,url:h},n),y=n}return y}async function p(t,e,n,i){const r=await f(t,e,n,i);return void 0===r.valid&&(r.valid=!!r.result),r.valid||r.message||(r.message="^_^"),r}async function g(t,e){try{const{request:n}=e.origin;n&&(await f(t,n,null,!0),t.endRequested=!0,o.i.trigger("END_REQ"))}catch(t){(0,a.E3)().uploadLog(t)}}},4708:(t,e,n)=>{"use strict";n.d(e,{C2:()=>x,GE:()=>y,IZ:()=>v,Ml:()=>T,Om:()=>l,W4:()=>f,Y5:()=>b,e$:()=>S,gr:()=>h,iQ:()=>d,jJ:()=>w,oz:()=>c,qY:()=>s,sf:()=>m,u6:()=>_,wR:()=>g,yg:()=>u}),n(9952);var i=n(984),r=n(556),o=n(6276),a=n(3001);function s(t,e){const n=t.loopStack,i=e.uuid;return(0,r.So)(i,n)}function c(t,e){return t.find((t=>(0,r.oj)(t.uuid,e)))}function u(t){return"comment"===t.optionType}function l(t){return g(t).some((t=>t.selected))}function d(t,e=!1){return g(t).filter((n=>(!e||!n.isOtherOpt)&&(0,i.QX)(n,t))).length}function f(t){return g(t).some((e=>(0,i.QX)(e,t)))}function p(t){const e=[],n=t=>{if("children"in t)for(const e of t.children)n(e);else e.push(t)};for(const e of t.optionGroups)n(e);return e}function g(t){let e=[];return(0,o.G6)(t)&&(e=(0,o.QB)(t)?[...e,...p(t)]:[...e,...t.options]),(0,o.IN)(t)&&(e=[...e,...t.otherOptions]),e}function m(t){let e=[];return(0,o.uo)(t)&&(e=[...e,...t.options]),(0,o.yy)(t)&&(e=[...e,...t.otherOptions]),e}function h(t){let e=g(t);const{hiddenOptions:n}=t;return n&&(e=[...e,...n]),e}function v(t){const{renderOptionsX:e,renderOptionsY:n,otherOptions:i}=t;return e.concat(n,i)}function y(t){const{options:e,origin:n}=t,i=e.find((t=>t.origin.seqTarget));return i&&i.selected?n.options[i.sortNo-1]:n.output}function _(t){return"yid"in t&&"xid"in t}async function w(t,e){const{parent:n}=e,{origin:i}=t;return{itemsMax:await(0,a.W0)(i.itemsMax,{state:n}),itemsMin:await(0,a.W0)(i.itemsMin,{state:n})}}function x(t){return t.passRef||{}}function b(t,e){const n=x(t);return t[e]||n[e]}function T(t){return t.assistValue?Object.keys(t.assistValue).reduce(((e,n)=>(t.assistValue[n]&&(e+=t.assistValue[n])&&(e+=" "),e)),""):""}function S(t,e){return t/e*100+"%"}},1768:(t,e,n)=>{"use strict";n.d(e,{A9:()=>c,E5:()=>s,Gg:()=>f,I9:()=>o,IN:()=>u,e4:()=>a,u6:()=>l,uE:()=>d});var i=n(2352),r=n(4708);function o(t){return t&&-1===t.mutexNumber}function a(t,e){return(t.mutexNumber||0)>(e.mutexNumber||0)?1:-1}function s(t,e){return!(!t||!e)&&!(!t.xid||!e.xid)&&(!(!o(t.optionX.origin)||e.yid!==t.yid)||o(t.optionY.origin)&&e.xid===t.xid)}function c(t,e){return!(!t||!e)&&("comment"!==t.origin.optionType||"option"!==e.origin.optionType)&&("option"!==t.origin.optionType||"comment"!==e.origin.optionType)&&(!(!o(t.origin)&&!o(e.origin))||u(t,e))}function u(t,e){return!(!t||!e||(0,i.oV)(t.origin.mutexNumber)||t.origin.mutexNumber!==e.origin.mutexNumber)}function l(t,e){return!(!t||!e)&&!(!t.xid||!e.xid)&&(!(!u(t.optionX,e.optionX)||e.yid!==t.yid)||u(t.optionY,e.optionY)&&e.xid===t.xid)}function d(t,e){const n={};(0,r.gr)(t).forEach((t=>{const e=t.origin;(0,r.yg)(e)||(n[e.mutexNumber]?n[e.mutexNumber]+=1:n[e.mutexNumber]=1)}));const i=Object.keys(n).reduce(((t,e)=>("0"===e||"undefined"===e?t+=n[e]:Number(e)<10&&(t+=1),t)),0);return e>i&&(e=i),e}function f(t,e){return!!o(e.origin)||t.some((t=>t!==e&&t.selected&&c(e,t)))}},4196:(t,e,n)=>{"use strict";n.d(e,{GA:()=>f,cv:()=>d,gF:()=>g});var i=n(4708),r=n(6496),o=n(8856),a=n(568),s=n(2352),c=n(1768),u=n(4384),l=n(9536);function d(t,e,n,r){const a=n.list[e];(0,o.e)(a.option,{value:t});const s=r.options.find((t=>t.cascadePath===a.resultId));return(0,i.yg)(a.option.origin)&&(t?m(a,r):g(a,r)),s}async function f(t,e,n){const d=e.list[t];if(!d)return u.Az;const f=e.list.filter((t=>function(t){return t.selected&&!(0,i.yg)(t.option.origin)}(t))),{option:p}=d;if(f.includes(d))g(d,n);else{const t=(0,c.Gg)(e.list.map((t=>t.option)),d.option);if(e.multiple){if(f.length>=e.max&&!t)return(0,o.E3)().notify((0,r.GS)(a.CW.menu.limitMax,{text:e.text?(0,r.GS)(a.CW.menu.listItem)+e.text:(0,r.GS)(a.CW.menu.topList),max:(0,s.Wo)(e.max)})),u.Az}else e.list.forEach((t=>{t.selected&&g(t,n)}));t&&function(t,e){e.options.forEach((e=>{t.resultId.includes(e.cascadePath)||(0,o.e)(e,{selected:!1})}))}(d,n),m(d,n)}return await(0,l.e)(p,n),u.ay}function p(t){(0,o.e)(t,{selected:!1}),(0,o.e)(t.option,{selected:!1});const e=t.list;e&&0!==e.length&&e.forEach((t=>{p(t)}))}function g(t,e){p(t),e.options.forEach((e=>{e.cascadePath.includes(t.resultId)&&(0,o.e)(e,{selected:!1})}))}function m(t,e){(0,o.e)(t,{selected:!0}),(0,o.e)(t.option,{selected:!0}),e.options.forEach((e=>{t.resultId.includes(e.cascadePath)&&(0,o.e)(e,{selected:!0})}))}},7688:(t,e,n)=>{"use strict";n.d(e,{o:()=>y});var i=n(4708),r=n(9968),o=n(5776),a=n(3001),s=n(556),c=n(8856),u=n(6496),l=n(568),d=n(9536),f=n(4384),p=n(6276);const g={};function m(t,e,n){e.forEach((e=>{(0,s.oj)(e.uuid,t.uuid)||e[n]!==t[n]||(0,c.e)(e,{selected:!1})}))}function h(t,e){e.forEach((e=>{e.uuid!==t.uuid&&(0,c.e)(e,{selected:!1})}))}function v(t,e,n=!1){if(t.selected)(0,c.e)(t,{selected:!1});else{(0,c.e)(t,{selected:!0});const r=(0,p.IN)(e)?e.otherOptions:[];h(t,n?r:(0,i.wR)(e))}return f.yK}async function y(t,e){const n=g[e.type];if(n){const i=await n(t,e);return i.noValidate||(0,r.c9)(e),await(0,d.e)(t,e),i}return f.Az}g.select=async(t,e)=>{if(t.selected)return(0,c.e)(t,{selected:!1}),f.yK;const n=await(0,o._R)(e,t);return n.valid?((0,c.e)(t,{selected:!0}),(0,o.cd)(e.origin)&&h(t,(0,i.wR)(e)),f.yK):((0,c.E3)().notify(n.message),f.Az)},g.select_icon=g.select,g.select_image=g.select,g.matrix=async(t,e)=>{if(t.selected)return(0,c.e)(t,{selected:!1}),f.yK;const n=await(0,o.IZ)(e,t);if(!n.valid)return(0,c.E3)().notify(n.message),f.Az;const{origin:r}=e;return(0,c.e)(t,{selected:!0}),(0,o.cd)(r)?h(t,(0,i.wR)(e)):(0,o.cx)(r)?(m(t,e.options,"yid"),m(t,e.options,"xid")):(0,o.ct)(r)?m(t,e.options,"yid"):(0,o.gd)(r)&&m(t,e.options,"xid"),f.yK},g.upload=async(t,e)=>{var n,i;if(t.isOtherOpt)return v(t,e,!0);{const{parent:r,fullUploaded:o,origin:s}=e;let d=await(0,a.W0)(s.maxUploadCount,{state:r});d=d||e.options.length;const p=t.value;if(o&&!p&&!t.origin.fillRequired)return(0,c.E3)().notify((0,u.GS)(l.CW.upload.amountLimitMax,{max:d})),f.Az;const g={onprogress(e){(0,c.e)(t,{progress:e})},accept:t.accept,nodeId:e.renderId,optionId:t.renderId},m=await(0,c.W4)().network.upload(g);return await(null===(i=(n=r.handleEvents).handleOptionInput)||void 0===i?void 0:i.call(n,m,t,e)),f.ay}},g.menu=g.select,g.cascade=async(t,e)=>(t.isOtherOpt&&v(t,e,!0),f.yK),g.hot_spot=g.select,g.icon_mark=g.value_mark=g.slide_rate=g.fill=g.weight=g.heat_map=async(t,e)=>t.isOtherOpt?v(t,e,!0):f.ay,g.sequence=async(t,e)=>t.isOtherOpt?v(t,e,!0):f.ay},4556:(t,e,n)=>{"use strict";n.d(e,{I5:()=>g,Y5:()=>d,wf:()=>p});var i=n(9536),r=n(9968),o=n(5776),a=n(8856),s=n(4708);const c={refresh:!1,result:!0},u={refresh:!0,result:!0},l={};function d(t,e){const n=e.value||"data:image/gif;base64,R0lGODlhAQABAAAAACw=";n&&(0,a.e)(t,{image:{name:void 0,ratio:1,url:n,natural:n,thumbnail:n,large:n,width:64,height:64,id:"faked-id-for-upload-image",originName:"uploaded image"}})}function f(t,e){const n=String(t);return t===e.value?c:((0,a.e)(e,{value:n}),u)}async function p(t,e,n){let o;if("number"==typeof t&&(t=String(t)),e.isOtherOpt)o=f(t,e);else{const i=l[n.type];o=i?await i(t,e,n):f(t,e)}return o.noValidate||(0,r.c9)(n,e),await(0,i.e)(e,n),o}function g(t,e,n){e.atcpTrigger=t,(0,r.c9)(n,e)}l.icon_mark=async(t,e)=>(t===e.value&&(t=String(Number(t)-1)),(0,a.e)(e,{value:t}),u),l.weight=async(t,e,n)=>{if(t===e.value)return c;const{options:i}=n,r=n.weightTotal,o=i.reduce(((t,n)=>n!==e?t+Number(n.value):t),0),l=r-o;return Number(t)>l&&(t=String(l)),(0,a.e)(e,{value:t}),i.forEach((t=>{const e=Number(t.value);(0,a.e)(t,{percent:(0,s.e$)(e,r)})})),u},l.upload=async(t,e,n)=>(t||(await(0,a.W4)().network.removeUpload({nodeId:n.renderId,optionId:e.renderId}),t=(0,i.I)()),(0,a.e)(e,t),await(0,o.SY)(n),d(e,t),{refresh:!0,result:!0}),l.slide_rate=async(t,e)=>f(t,e),l.fill=async(t,e)=>f(t,e)},3568:(t,e,n)=>{"use strict";n.d(e,{c:()=>i});const i=Object.keys({field_1:"",field_2:"",field_3:"",field_4:"",field_5:"",field_6:""})},3244:(t,e,n)=>{"use strict";n.d(e,{At:()=>o,Cm:()=>a,KQ:()=>r});var i=n(5548);function r(t,e){return t.find((t=>t.origin.radius>=(0,i.c)(e,{lng:t.origin.longitude,lat:t.origin.latitude})))||t[t.length-1]}function o(t,e){if(0===t.length)return;const n=e.split("-");return t.find((t=>t.text.split("-").every(((t,e)=>{const i=n[e];return!(!i||!i.includes(t))}))))||t[t.length-1]}function a(t,e){const n=e.map((t=>t.name)).indexOf(t[0]);let i=String(n);const r=e[n];if(t[1]&&r){const e=r.cities.map((t=>t.name)).indexOf(t[1]);i+=" "+e;const n=r.cities[e];if(t[2]&&n){const e=n.areas.map((t=>t.name)).indexOf(t[1]);i+=""+e}}return i}},6764:(t,e,n)=>{"use strict";n.d(e,{sZ:()=>a,uE:()=>d,uQ:()=>l}),n(5960);var i=n(556),r=n(5776),o=n(6796);function a(t){const e=[];return t.forEach(((t,n)=>{const r=(0,i.ec)(n+1);e.splice(r,0,t)})),e}const s={};function c(t,e,n){let r=[];return r=n?u(t):e?function(t,e){const n=[],r={};t.forEach(((t,i)=>{const o=t.origin;if(o.refOptId){let a="";if(e&&(a=o.referId),a){const e=r[a];e?e.list.push(t):r[a]={headIndex:i,list:[t]}}else n.push(t)}else n.push(t)}));let o=[];return n.forEach((t=>{const e=(0,i.ec)(o.length+1);o.splice(e,0,t)})),Object.keys(r).map((t=>r[t])).sort(((t,e)=>t.headIndex>e.headIndex?1:-1)).forEach((t=>{o=o.concat(t.list)})),o}(t,e):function(t){const e=[];return t.forEach((t=>{const n=(0,i.ec)(e.length+1);e.splice(n,0,t)})),e}(t),r}function u(t,e){return e=(e||Math.round(10*Math.random()))%t.length,t.slice(e).concat(t.slice(0,e))}function l(t,e){const{renderId:n,origin:i}=t,{followRandom:a,circulation:u}=i;if(!(0,r.Oi)(t))return e;if((0,o.ms)(t.nodeUuid,t.parent.nodeGroups)){let i=s[t.nodeUuid];if(i)return e.sort(((t,e)=>i[t.uuid]>i[e.uuid]?1:-1));{const t=c(e,a,u);return s[n]=i={},t.forEach(((t,e)=>{i[t.uuid]=e})),t}}return c(e,a,u)}function d(t,e,n){const{randomType:i}=t.origin;return"col"!==i&&"row_col"!==i||(e=l(t,e)),"row"!==i&&"row_col"!==i||(n=l(t,n)),"col_loop"===i&&(e=u(e)),"row_loop"===i&&(n=u(n)),{optionsX:e,optionsY:n}}},4316:(t,e,n)=>{"use strict";n.d(e,{yt:()=>L,kd:()=>U,sV:()=>z,cV:()=>j,WG:()=>K,gk:()=>N,o9:()=>R,u_:()=>H,wz:()=>G}),n(5960),n(7768),n(3656),n(4107),n(9896),n(6832),n(8252),n(7240),n(2288),n(5396),n(2480),n(7190),n(5036),n(4736),n(2520),n(9952);var i=n(6764),r=n(4708),o=n(5776),a=n(9376),s=n(6332),c=n(3001),u=n(4756),l=(n(9624),n(6784)),d=n(8856),f=n(2352);const p={done:!1,expectedValue:"",actualValue:""};function g(t){const{autoInputConfig:e}=t.origin;if(!e)return"";const{defaultValue:n}=e;return n&&(0,f.Wo)(n).trim()?n:""}const m={};async function h(t,e,n,i,r){if(!g(t))return p;const{parent:o}=e,a=await(0,c.W0)(g(t),{state:o});let s=String(a);return a>=n&&a<=i||(s=r),(0,d.e)(t,{value:s}),{done:!0,actualValue:s,expectedValue:a}}async function v(t,e){const n=m[e.type];if(n){e.parent.context.option=t;const i=await n(t,e);return!!i.done&&((0,l.Q3)(e.parent,t,e,i.actualValue,i.expectedValue),!0)}return!1}m.fill=async(t,e)=>{if(!g(t))return p;const{parent:n}=e,i=await(0,c.E3)(g(t),{state:n});return(0,d.e)(t,{value:i}),{done:!0,actualValue:i,expectedValue:i}},m.value_mark=(t,e)=>h(t,e,t.minValue,t.maxValue,""),m.icon_mark=(t,e)=>h(t,e,0,t.iconCount,""),m.slide_rate=(t,e)=>{const{rateOptions:n}=e;return h(t,e,0,n.length,"")},m.weight=(t,e)=>h(t,e,0,t.maxValue||e.weightTotal,""),m.sequence=async(t,e)=>{if(!g(t))return p;const n=e.options.length,{parent:i}=e,r=await(0,c.W0)(g(t),{state:i});let o=r;return r>=1&&r<=n||(o=-1),(0,d.e)(t,{sortNo:o,selected:o>=1}),{done:!0,actualValue:o,expectedValue:r}},n(2048);var y=n(4060),_=n(6276);async function w(t,e){const n=e.parent;n.context.option=t;const i=await async function(t,e){return!!e&&(0,y.wx)(t,e)}(n,t.origin.selectConfig);t.autoSelectMarked=!!i}const x=["select","select_icon","select_image","menu","hot_spot","data"];var b=n(1344),T=n(6348);async function S(t,e,n,i=!1){const r=n.origin.options.find((n=>n.xid===t.uuid&&n.yid===e.uuid)),o={...await N(n,r,null),optionX:t,optionY:e,text:i?t.text:e.text,xid:t.uuid,yid:e.uuid},a=await(0,s.Ej)(n.parent,o,n);return o.disabled=!a,o}var E=n(1768),I=n(556),k=n(3080),O=n(9677);const C=["select","sequence","menu"];function L(t){Object.defineProperty(t,"selected",{get(){return this.__cache.selected},set(t){"select-input"===this.inputType&&(t?this.value=this.__cache.value||this.value:(this.__cache.value=this.value,this.value="")),this.__cache.selected=t,t&&(0,E.I9)(this.origin)&&setTimeout((()=>{T.i.trigger("OPT_EXCLUDE",this)})),t?T.i.trigger("OPT_SELECT",this):T.i.trigger("OPT_DESELECT",this)}})}async function N(t,e,n){const{parent:i}=t,o={origin:e,isOtherOpt:e.isOtherOpt,customData:{},__cache:{selected:!1,value:""},inputType:U(e,t.type),value:"",renderId:(0,r.qY)(t,e),uuid:e.uuid,label:e.label,number:e.number,optComment:e.optComment,optionType:e.optionType,useComment:e.useComment,passRef:n};return i.context.option=o,o.text=await(0,c.qQ)(e.text,{state:i,usage:{node:t,optionId:e.uuid}}),L(o),o.isOtherOpt&&(await A(o,t),(0,r.yg)(e)||await w(o,t)),function(t){const{origin:e}=t;!0===e.useComment?(0,d.e)(t,{placeholder:e.optComment}):"input"===t.inputType&&(0,d.e)(t,{placeholder:t.text})}(o),await(0,a.Il)(o,i),o}async function R(t,e,n){const i=[];for(const r of e){const e=n.find((t=>t.uuid===r.uuid)),o=await N(t,r,e);i.push(o)}return i}function A(t,e){return(0,d.e)(t,{inputType:U(t.origin,e.type)}),G(t,e)}const P=["fill","heat_map","icon_mark","max_diff","sequence","slide_rate","upload","value_mark","weight"],M=["data","hot_spot","matrix","select_icon","select_image","region","location","area"],W=["select","menu","cascade"];function U(t,e){if(t.isOtherOpt){let e="select";return(0,r.yg)(t)?e="input":!0===t.useComment&&(e="select-input"),e}return W.includes(e)?!0===t.useComment?"select-input":"select":P.includes(e)?"input":M.includes(e)?"select":void 0}async function G(t,e){if(!(0,_.cp)(t))return;const{origin:n}=t,i=t.origin.fillType;if(!i)return;const{parent:o}=e;let a,s,u,l=await(0,c.W0)(n.fillStart,{state:o}),f=await(0,c.W0)(n.fillEnd,{state:o});if(isNaN(l)&&(l=void 0),isNaN(f)&&(f=void 0),"date"===i){const t=(new Date).getFullYear(),e=l,n=f;void 0!==l&&(l=new Date(l,0,1),t<e&&(a=l)),void 0!==f&&(f=new Date(f,11,31),t>n&&(a=f))}"auto_complete"===i&&(s=function(t,e=[]){const{autoCpltGroups:n}=t;return e.reduce(((t,e)=>{const i=n.find((t=>t.id===e));return i&&(t=t.concat(i.data)),t}),[])}(o,n.autoCpltIds),u=await(0,b.$7)(e.parent.sid));let p=[];"list_select"===i&&(p=q((await(0,c.E3)(n.selectText,{state:o,joinBy:","})).split(",")));const g=await(0,r.jJ)(t,e),m=await(0,O._u)(t,e);(0,d.e)(t,{itemsMax:g.itemsMax,itemsMin:g.itemsMin,fillStart:m.start,fillEnd:m.end,fillType:i,validateMin:l,validateMax:f,defaultValue:a,completeGroups:s,selectList:p,prevCpltLang:u,timeGrade:n.timeGrade,simpleCplt:n.simpleCplt,inputMode:n.inputMode,grade:n.grade,scale:n.scale})}async function D(t,e,n=!1){const{options:r,otherOptions:o,hiddenOptions:a}=t,s={options:[],otherOptions:o,hiddenOptions:[]};if(r){const n=function(t){const e=t.filter((t=>"top-fixed"===t.origin.position)).sort(((t,e)=>t.number-e.number)),n=t.filter((t=>"bottom-fixed"===t.origin.position)).sort(((t,e)=>t.number-e.number)),i=t.filter((t=>"top-fixed"!==t.origin.position&&"bottom-fixed"!==t.origin.position));return e.concat(i).concat(n)}((0,i.uQ)(t,r));for(const t of n)s.options.push(await e(t))}if(a)for(const t of a){const n=t.isOtherOpt?t:await e(t);s.hiddenOptions.push(n)}n&&j([...s.options,...s.otherOptions]),(0,d.e)(t,s)}const B={};async function F(t,e){return t.image?t.image:await(0,a.Md)(e,t)}function q(t){const e={};return t.map((t=>{const n=e[t];return n?(e[t]=n+1,"".concat(t,"(").concat(n,")")):(e[t]=2,t)}))}function j(t){q(t.map((t=>t.text))).forEach(((e,n)=>{t[n].text=e}))}function z(t){return t&&t.path?(0,d.E3)().hostConfig.mediaHost+t.path:""}function V(t){const e=z(t);return{normalIconUrl:e,activeIconUrl:K(e)}}function K(t){return t.replace("/outline/","/glyph/")}function Y(t){const{origin:e,passRef:n}=t;return n&&n.normalIconUrl?{normalIconUrl:n.normalIconUrl,activeIconUrl:n.activeIconUrl}:V(e.icon)}async function H(t,e){if((0,_.G6)(t)){await async function(t,e){const{origin:n}=t;let i={options:[]};if((0,I.is)(n,"matrix"===n.type)){const{options:r,refMaps:o,passRefs:c}=await(0,a.q0)(e,t.origin,"xid"),u=await R(t,r,c),l=await(0,s.s$)(e,u,t),{options:d,refMaps:f,passRefs:p}=await(0,a.q0)(e,t.origin,"yid"),g=await R(t,d,p),m=await(0,s.Ah)(e,g,t);(0,k.GO)(t,[...o,...f]);const h=await R(t,n.otherOptions,[]),v=await(0,s.is)(e,h,t);i={options:[],optionsX:l,optionsY:m,otherOptions:v.visibleList,hiddenOptions:v.hiddenList}}else if(n.options){const n=await(0,a.q0)(e,t.origin);let r=n.options;(0,_.IN)(t)&&(r=r.concat(t.origin.otherOptions));const o=await R(t,r,n.passRefs),c=await(0,s.is)(e,o,t),u=[],l=[];c.visibleList.forEach((t=>{t.isOtherOpt?l.push(t):u.push(t)})),(0,k.GO)(t,n.refMaps),i={options:u,otherOptions:l,hiddenOptions:c.hiddenList}}(0,d.e)(t,i)}(t,e);const n=B[t.type];n&&await n(t),function(t){if((0,d.E3)().realTimePreview)return;if(!(0,_.G6)(t))return;let e;C.includes(t.type)?e=t=>!!t.text:"select_image"===t.type?e=t=>!!t.image:"slide_rate"===t.type&&(e=t=>!!t.text||!!t.image),e&&(t.options=t.options.filter(e))}(t),function(t){const{options:e,type:n,parent:i}=t;let r=(0,_.IN)(t)?t.otherOptions:[];x.includes(n)&&(r=[...r,...e]);const a=r.filter((t=>t.autoSelectMarked)).reverse();if((0,o._A)(t.origin))a.forEach((e=>{(0,d.e)(e,{selected:!0}),(0,l.y)(i,e,t)}));else{const[e,...n]=a;n.forEach((e=>{e.autoSelectMarked=!1,(0,l.y)(i,e,t,"因冲突被终止")})),e&&((0,d.e)(e,{selected:!0}),(0,l.y)(i,e,t))}}(t),e.context.option=null}}B.select=t=>D(t,(async function(e){return await G(e,t),await w(e,t),e})),B.fill=t=>D(t,(async function(e){return e.inputType="input",e.prefix=e.origin.prefix,e.suffix=e.origin.suffix,await G(e,t),e.placeholder=(0,c.Qr)(e.text),await v(e,t),e})),B.value_mark=t=>D(t,(async function(e){const{parent:n,origin:i}=t;e.value="";const r=await(0,c.W0)(i.markMin,{state:n}),o=await(0,c.W0)(i.markMax,{state:n});return(0,d.e)(e,{minValue:r,step:i.markStep,maxValue:o,minValueText:i.minText,maxValueText:i.maxText}),await v(e,t),e})),B.icon_mark=t=>D(t,(async function(e){return e.value="",(0,d.e)(e,{iconCount:t.origin.markImgCount||5,iconName:t.origin.markImgName||"rating-number"}),await v(e,t),e})),B.sequence=async t=>{let e=!1;await D(t,(async n=>((0,d.e)(n,{sortNo:-1}),await v(n,t)&&(e=!0),n))),e&&t.options.sort(((t,e)=>t.sortNo>e.sortNo?1:-1))},B.matrix=async t=>{const e=(0,i.uE)(t,t.optionsX,t.optionsY),{parent:n,origin:r}=t,a=[];for(const i of e.optionsX)a.push({origin:i.origin,extraTitle:i.origin.extraTitle,width:i.origin.width,uuid:i.origin.uuid,number:i.origin.number,renderId:"",visible:i.visible,text:await(0,c.qQ)(i.text,{state:n,usage:{node:t,optionId:i.uuid}})});const s=new Map;a.forEach(((t,e)=>{s.set(t,e)})),a.sort(((t,e)=>{switch("".concat(t.origin.position,"___").concat(e.origin.position)){case"left-fixed".concat("___","right-fixed"):case"left-fixed".concat("___",void 0):case"".concat(void 0,"___","right-fixed"):return-1;case"".concat(void 0,"___","left-fixed"):case"right-fixed".concat("___","left-fixed"):case"right-fixed".concat("___",void 0):return 1;default:{const n=s.get(t),i=s.get(e);return n&&i?n-i:t.number-e.number}}}));const u=[];for(const i of e.optionsY)u.push({origin:i.origin,uuid:i.origin.uuid,number:i.origin.number,renderId:"",visible:i.visible,height:i.origin.height,text:await(0,c.qQ)(i.text,{state:n,usage:{node:t,optionId:i.uuid}})});const l=new Map;u.forEach(((t,e)=>{l.set(t,e)})),u.sort(((t,e)=>{switch("".concat(t.origin.position,"___").concat(e.origin.position)){case"top-fixed".concat("___","bottom-fixed"):case"".concat(void 0,"___","bottom-fixed"):case"top-fixed".concat("___",void 0):return-1;case"".concat(void 0,"___","top-fixed"):case"bottom-fixed".concat("___","top-fixed"):case"bottom-fixed".concat("___",void 0):return 1;default:{const n=l.get(t),i=l.get(e);return n&&i?n-i:t.number-e.number}}}));for(const e of t.otherOptions)await A(e,t);const f={otherOptions:t.otherOptions,renderOptionsX:a.filter((t=>t.visible)),renderOptionsY:u.filter((t=>t.visible))},p=(0,o.ct)(r)||(0,o.KC)(r),g=await async function(t,e,n,i=!1){const r=[],o=[];let a=t,s=e;i&&(a=e,s=t);for(const t of a)if(t.visible){const e={text:t.text,list:[]};for(const r of s)if(r.visible){let a=t,s=r;i&&(s=t,a=r);const c=await S(a,s,n,i);o.push(c),e.list.push(c)}r.push(e)}return{flatten:r,options:o,fullOptions:o}}(a,u,t,p),m=function(t,e,n){const i=[];return e.forEach((e=>{if(e.visible){const r=[];t.forEach((t=>{if(t.visible){const i=n.find((n=>n.xid===t.uuid&&n.yid===e.uuid));if(!i)throw new Error("matrix item not found");r.push(i)}})),i.push(r)}})),{matrix:i}}(a,u,g.options);(0,d.e)(t,{...f,...g,...m})},B.select_image=t=>D(t,(async e=>(e.image=await F(e,t),await w(e,t),e))),B.upload=t=>D(t,(async t=>(t.filePath="",t.value="",t.fileName="",t.fileType="",t.progress=0,t.isImage=!1,t.fileLimits=[...t.origin.fileLimits||["image"]],t.accept=(0,u.A)(t.fileLimits),t))),B.menu=t=>D(t,(async e=>(await G(e,t),await w(e,t),e)),!0),B.select_icon=t=>D(t,(async e=>{const n={...e,...Y(e)};return await w(n,t),n})),B.weight=t=>{const{parent:e}=t;return D(t,(async n=>{let i=await(0,c.W0)(n.origin.maxMark,{state:e});const r=await(0,o.iw)(t.origin,e);return(!i||i>r)&&(i=r),(0,d.e)(n,{percent:"0%",color:n.origin.color,maxValue:i,value:""}),await v(n,t),n}))},B.cascade=t=>D(t,(async t=>(t.text="",t.cascadePath=t.origin.cascadePath,t))),B.data=async t=>{for(const e of t.options)await w(e,t)},B.hot_spot=async t=>await D(t,(async e=>{await G(e,t),await w(e,t);let n=e.origin.graphs;if("points"in e){const{points:t,x:i,y:r}=e.origin;n=[{points:t,x:i,y:r,uuid:(0,I.YF)()}]}const i=n.map((t=>{const{area:e,pathD:n}=t.points.reduce(((e,n,i)=>{e.pathD?e.pathD+=" L":e.pathD+="M",e.pathD+=n.x+" "+n.y;const r=t.points[i+1];return r?e.area+=n.y+r.y*(r.x-n.x)/2:e.pathD+=" Z",e}),{area:0,pathD:""});return{...t,area:e,pathD:n,transform:"translate(".concat(t.x,",").concat(t.y,")")}}));return(0,d.e)(e,{graphs:i,color:e.origin.color}),e})),B.heat_map=(t,e)=>D(t,(async function(t){return t})),B.max_diff=t=>D(t,(async function(e){return e.value="0",e.image=await F(e,t),e.records=[],e})),B.slide_rate=async t=>{const{rateOptions:e}=t.origin,n=[];for(const i of e){const e=await N(t,i,null);await(0,s.Ej)(t.parent,e,t)&&n.push(i)}return t.rateOptions=n.map((t=>{const{icon:e}=t;return{...V(e),text:(0,c.gt)(t.text),value:t.value,uuid:t.uuid,customData:{}}})),D(t,(async e=>((0,d.e)(e,{image:await F(e,t),value:""}),await v(e,t),e)))}},6332:(t,e,n)=>{"use strict";n.d(e,{Ah:()=>d,Ej:()=>s,Ud:()=>f,is:()=>c,s$:()=>l}),n(9952);var i=n(4060),r=n(4708),o=n(6784),a=n(5684);async function s(t,e,n){const{origin:r}=e,a=r.displayConfig;if(a){n.hasOptShowHide=!0,t.context.option=e;const r=await(0,i.wx)(t,a);return r&&(0,o.mT)(t,e,n),t.context.option=null,r}return!0}async function c(t,e,n){const i=[],r=[];for(const o of e)await s(t,o,n)?(o.visible=!0,i.push(o)):(o.visible=!1,r.push(o));return{visibleList:i,hiddenList:r}}async function u(t,e,n){for(const i of e)i.visible=await s(t,i,n);return e}async function l(t,e,n){e=await u(t,e,n);for(const t of e)t.visible=t.visible&&"hidden"!==t.width;return e}async function d(t,e,n){e=await u(t,e,n);for(const t of e)t.visible=t.visible&&"hidden"!==t.height;return e}function f(t,e){const{renderList:n}=t,i=[];return n.forEach((t=>{if(!(0,a.Ci)(t.checkMode,e))return;const{hasOptShowHide:n,nodeUuid:o,loop:s}=t;if(n){const e="matrix"===t.type?(0,r.IZ)(t):(0,r.wR)(t);let n;s&&(n=s.replacements.map((t=>t.index))),i.push({node_id:o.toLowerCase(),loop_idxs:n,option_ids:e.map((t=>t.uuid.toLowerCase()))})}})),i}},5776:(t,e,n)=>{"use strict";n.d(e,{AF:()=>v,CA:()=>G,CY:()=>h,EH:()=>A,IZ:()=>M,K6:()=>_,KC:()=>L,MR:()=>T,Oi:()=>w,S:()=>F,S2:()=>N,SY:()=>z,Un:()=>C,YJ:()=>x,YP:()=>R,_A:()=>S,_R:()=>W,cd:()=>E,ct:()=>I,cx:()=>O,gR:()=>b,gd:()=>k,iw:()=>j,j$:()=>B,o1:()=>U,q_:()=>y,uK:()=>q}),n(9952);var i=n(4708),r=n(556),o=n(3001),a=n(6496),s=n(8856),c=n(568),u=n(984),l=n(1768),d=n(5684),f=n(6788);const p={valid:!0,message:""},g=["region","location","area","describe","end","logic","loop","lottery","verify"],m={};function h(t){(0,s.e)(t,{hasAnswer:(0,d.Qz)(t)})}function v(t,e){if(8!==e.length)return e;let n=m[e];if(!n){const i=t.nodeList.find((t=>(0,r.oj)(t.nodeUuid,e)));if(i)return n=m[e]=i.nodeUuid,i.nodeUuid}return n}function y(t){return t.find((t=>"start"===t.type))}function _(t){return!0===t.answerRequired}function w(t){return(0,r.is)(t,"matrix"===t.type)?function(t){const{randomType:e}=t.origin;return"col"===e||"row_col"===e||"row"===e}(t):!0===t.origin.randomOptionY}function x(t){const e=t.loopStack,n=t.nodeUuid;return(0,r.So)(n,e)}function b(t,e){if(e)return t.find((t=>t.input&&(0,r.oj)(t.input.uuid,e)||t.loopEnd&&(0,r.oj)(t.loopEnd.uuid,e)))}function T(t,e,n){const i=e.find((t=>(0,r.oj)(t.selfPortId,n)));if(i&&i.destInputId)return b(t,i.destInputId)}function S(t){return(0,r.is)(t,"matrix"===t.type)?"multi"===t.matrixSelect:!0===t.multiSelect}function E(t){return(0,r.is)(t,"matrix"===t.type)?"single"===t.matrixSelect:!0!==t.multiSelect}function I(t){return"single_row"===t.matrixSelect}function k(t){return"single_col"===t.matrixSelect}function O(t){return"single_row_col"===t.matrixSelect}function C(t){return S(t)&&"all"===t.multiType}function L(t){return S(t)&&"row"===t.multiType}function N(t){return S(t)&&"col"===t.multiType}async function R(t,e){const{origin:n}=t,i=!0===n.limitEnabled;let r=i?await(0,o.W0)(n.maxUploadCount,{state:e}):t.options.length,a=i?await(0,o.W0)(n.minUploadCount,{state:e}):1;const s=t.options.length;return a||(a=1),r||(r=s),a>s&&(a=s),a>r&&(a=r),{max:r,min:a}}async function A(t,e){const{origin:n}=t;if(!S(n))return{min:1,max:1};const{multiMin:a,multiMax:s}=n;let c=await(0,o.W0)(a,{state:e}),u=await(0,o.W0)(s,{state:e});const d=(0,i.gr)(t).length;return(0,r.is)(t,"matrix"===t.type)||(c=(0,l.uE)(t,c)),c||(c=1),u||(u=d),c>d&&(c=d),c>u&&(c=u),{min:c,max:u}}const P=(t,e,n,i)=>{let r=0;r=i?t.filter((t=>t[i]===e[i]&&t.selected)).length:t.filter((t=>t.selected)).length;const o=r<n;let s="";return o||(s=i?"xid"===i?(0,a.GS)(c.CW.matrix.colLimitMax,{max:n}):(0,a.GS)(c.CW.matrix.rowLimitMax,{max:n}):(0,a.GS)(c.CW.select.limitMax,{max:n})),{valid:o,message:s}};async function M(t,e){if(!S(t.origin)||(0,l.I9)(e.origin)||!e.isOtherOpt&&((0,l.I9)(e.optionX.origin)||(0,l.I9)(e.optionY.origin)))return p;const n=C(t.origin);if(!n&&!(0,i.u6)(e))return p;const r=(0,i.wR)(t),{max:o}=await A(t,t.parent);return n?P(r,e,o):N(t.origin)?P(r,e,o,"xid"):L(t.origin)?P(r,e,o,"yid"):p}async function W(t,e){if(!S(t.origin))return p;const{max:n}=await A(t,t.parent),r=(0,i.wR)(t),o=!(r.filter((t=>t.selected)).length===n)||(0,l.Gg)(r,e);return{valid:o,message:o?"":(0,a.GS)(c.CW.select.limitMax,{max:n})}}function U(t,e){return t.find((t=>(0,r.oj)(t.nodeUuid,e)))}const G=["logic","random","loop"],D=[...G,"data"];function B(t){(0,s.E3)().preview&&t.autoSkip&&t.parent.previewShadowNodes&&!D.includes(t.type)&&(t.readonly=!0)}function F(t){if(t.forceSkipReason)return t.forceSkipReason;if("data"===t.type)return"data_hidden";if(t.autoSkip)return function(t){return(0,s.E3)().preview&&t.parent.previewShadowNodes&&!D.includes(t.type)}(t)?"":"setting";if((0,f.I)(t.nodeUuid))return"random_group";const e=(0,i.wR)(t);return!g.includes(t.type)&&e&&0===e.length?"no_options":""}function q(t,e){return!(!t.circleNode1Id&&!t.circleNode2Id)&&(0,r.oj)(t.circleNode1Id,e.circleNode1Id)&&(0,r.oj)(t.circleNode2Id,e.circleNode2Id)}async function j(t,e){const{options:n}=t;let i=await(0,o.W0)(t.total,{state:e})||100,r=0;for(const t of n){const n=await(0,o.W0)(t.maxMark,{state:e});if(void 0===n){r=-1;break}r+=n}return r>0&&r<i&&(i=r),i}async function z(t){const{max:e}=await R(t,t.parent),n=e===t.options.filter((e=>(0,u.QX)(e,t))).length;(0,s.e)(t,{fullUploaded:n})}},908:(t,e,n)=>{"use strict";n.d(e,{S:()=>g,s:()=>p});var i=n(8084),r=n(4708),o=n(3244),a=n(5548),s=n(9968),c=n(8856),u=n(9536),l=n(4384);function d(t,e,n,i){t&&((0,c.e)(t,{selected:!0}),e.forEach((e=>{e!==t&&(0,c.e)(e,{selected:!1})}))),(0,c.e)(i,{value:n})}const f={};async function p(t,e){const n=f[e.type],i=n?await n(t,e):l.Az;return i.noValidate||(0,s.c9)(e),i}function g(t){return t.failed=!0,t.succeed=!1,t.origin.failedSkip&&(t.failedSkipActivated=!0,t.autoSkip=!0),l.yK}f.region=(t,e)=>{e.indexes=t;const n=(0,r.wR)(e),a=(0,i.qu)(t);d((0,o.At)(n,a),n,a,e);const s=a.split("-"),c={country:"",province:s[0]||"",city:s[1]||"",district:s[2]||""};return e.parent.address=c,e.position={address:c},l.yK},f.location=(t,e)=>{e.succeed=!0,e.failed=!1,e.failedSkipActivated=!1;const n=(0,a.A)(t.address,"-",e.infoRange),i=(0,r.wR)(e);return d((0,o.At)(i,n),i,n,e),(0,c.e)(e.parent,{point:t.point,address:t.address}),e.position=t,l.yK},f.area=(t,e)=>{e.succeed=!0,e.failed=!1,e.failedSkipActivated=!1;const n=(0,a.A)(t.address,"-","street"),i=(0,r.wR)(e);return d((0,o.KQ)(i,t.point),i,n,e),(0,c.e)(e.parent,{point:t.point,address:t.address}),e.position=t,l.yK},f.verify=(t,e)=>((0,c.e)(e,t),{...l.yK,noValidate:!0}),f.gift=(t,e)=>((0,c.e)(e,t),l.ay),f.heat_map=async(t,e)=>{const n={x:Math.round(t.x),y:Math.round(t.y)},{options:i}=e,r=i[e.clickTimes%i.length];return(0,c.e)(r,{point:n,value:JSON.stringify(n)}),e.clickTimes+=1,await(0,u.e)(r,e),l.ay}},1576:(t,e,n)=>{"use strict";n.d(e,{w:()=>o});var i=n(8856);function r(t,e){(0,i.e)(t,{value:e});const{option:n}=t;n.records.find((e=>e.round===t.round)).value=e,(0,i.e)(n,{value:n.records.reduce(((t,e)=>t+e.value),0).toString()})}function o(t,e,n){if(e.value===t)return{result:!0};r(e,t),n.items.forEach((t=>{t!==e&&t.value===e.value&&r(t,0)}));const o=n.items.some((t=>1===t.value)),a=n.items.some((t=>-1===t.value));return(0,i.e)(n,{done:o&&a}),{result:!0}}},6680:(t,e,n)=>{"use strict";n.d(e,{W:()=>a}),n(9328),n(4560),n(8712),n(9708),n(7976),n(5600),n(7452),n(8636),n(1524),n(8836),n(5040),n(1728),n(80),n(1124),n(9600),n(8932),n(9952);var i=n(8856),r=n(9536);function o(t){return"[object Map]"!==Object.prototype.toString.call(t)}async function a(t,e,n){const{options:a}=n;if(!function(t,e){if(o(t))return!0;if(t.size!==e.length)return!1;const n=new Array(e.length).fill(!1);for(const[i,r]of t)r>=0&&r<e.length&&(n[r]=!0);return n.every((t=>t))}(t,a)||!function(t,e){if(t.size!==e.length)return!1;const n=Array.from(t.values()).filter((t=>-1!==t));for(const t of n)if(t<1||t>e.length)return!1;return i=n,new Set(i).size===i.length;var i}(e,a))return{result:!1};let s;for(const[t,n]of e)t.sortNo!==n&&((0,i.e)(t,{sortNo:n,selected:-1!==n}),t.selected&&(s=t));if(!o(t)){const e=[];for(const[n,i]of t)e[i]=n;(0,i.e)(a,e)}return s&&await(0,r.e)(s,n),{result:!0}}},4404:(t,e,n)=>{"use strict";n.d(e,{Y:()=>r});var i=n(8856);function r(t){if(!t)return{};const{useCustomLogo:e,logoText:n,logoImage:r,showLogoInEachPage:o,logoImageShowWidth:a}=t;let s="";if(r){const t=r.name;s=(0,i.E3)().hostConfig.mediaHost+"/"+t}return{useCustomLogo:e,logoImageUrl:s,logoText:n,showLogoInEachPage:o,logoImageShowWidth:a}}},8184:(t,e,n)=>{"use strict";n.d(e,{_M:()=>ot,yI:()=>rt,o9:()=>it,e_:()=>nt});var i=n(4316),r=n(5776),o=n(8084),a=n(6496),s=n(568),c=n(8856);const u={select:async t=>{const e=(0,r._A)(t.origin);let n=(0,a.GS)(s.CW.select.single);if(e){n=(0,a.GS)(s.CW.select.multi);const{min:e,max:i}=await(0,r.EH)(t,t.parent);return{typeName:n,typeDescription:(0,a.GS)(s.CW.select.limitBetween,{min:e,max:i})}}return{typeName:n,typeDescription:""}},value_mark:async()=>({typeName:(0,a.GS)(s.CW.mark.value)}),icon_mark:async()=>({typeName:(0,a.GS)(s.CW.mark.graph)}),weight:async t=>{const e=t.weightTotal;let n=(0,a.GS)(s.CW.weight.total,{total:e});return n+=!0===t.origin.relax?(0,a.GS)(s.CW.weight.relax):(0,a.GS)(s.CW.weight.strict),{typeName:(0,a.GS)(s.CW.weight.name),typeDescription:n}},fill:async()=>({typeName:(0,a.GS)(s.CW.fill.name)}),slide_rate:async()=>({typeName:(0,a.GS)(s.CW.slideRate.name)}),sequence:async t=>{const e=t.origin.rankCount,n=Number(e)?(0,a.GS)(s.CW.rank.limitMin,{min:e}):(0,a.GS)(s.CW.rank.limitAll);return{typeName:(0,a.GS)(s.CW.rank.name),typeDescription:n}},menu:async t=>({...await u.select(t),typeName:(0,a.GS)(s.CW.menu.name)}),select_icon:t=>u.select(t),select_image:t=>u.select(t),upload:async t=>{const e=(0,a.GS)(s.CW.upload.name);if(!0===t.origin.limitEnabled){const{min:n,max:i}=await(0,r.YP)(t,t.parent);return{typeName:e,typeDescription:(0,a.GS)(s.CW.upload.amountLimit,{min:n,max:i})}}return{typeName:e,typeDescription:""}},location:async()=>({typeName:(0,a.GS)(s.CW.locate.name)}),area:async()=>({typeName:(0,a.GS)(s.CW.site.name)}),region:async()=>({typeName:(0,a.GS)(s.CW.region.name)}),verify:async()=>({typeName:(0,a.GS)(s.CW.verify.name)}),cascade:async()=>({typeName:(0,a.GS)(s.CW.cascade.name)}),matrix:async t=>{const{origin:e}=t;if((0,r.cd)(e))return{typeName:(0,a.GS)(s.CW.matrix.single)};if((0,r._A)(e)){const{min:n,max:i}=await(0,r.EH)(t,t.parent);let o=(0,a.GS)(s.CW.matrix.multi),c=(0,a.GS)(s.CW.select.limitBetween,{min:n,max:i});return(0,r.S2)(e)?(o=(0,a.GS)(s.CW.matrix.multiCol),c=(0,a.GS)(s.CW.matrix.colLimitBetween,{min:n,max:i})):(0,r.KC)(t.origin)&&(o=(0,a.GS)(s.CW.matrix.multiRow),c=(0,a.GS)(s.CW.matrix.rowLimitBetween,{min:n,max:i})),{typeName:o,typeDescription:c}}return(0,r.ct)(e)?{typeName:(0,a.GS)(s.CW.matrix.singleRow),typeDescription:(0,a.GS)(s.CW.matrix.eachRowOne)}:(0,r.gd)(e)?{typeName:(0,a.GS)(s.CW.matrix.singleCol),typeDescription:(0,a.GS)(s.CW.matrix.eachColOne)}:(0,r.cx)(e)?{typeName:(0,a.GS)(s.CW.matrix.singleRowCol),typeDescription:(0,a.GS)(s.CW.matrix.eachRowColOne)}:{typeName:(0,a.GS)(s.CW.matrix.single)}},hot_spot:async()=>({typeName:(0,a.GS)(s.CW.hotSpot.name)}),heat_map:async()=>({typeName:(0,a.GS)(s.CW.heatMap.name)}),max_diff:async()=>({typeName:(0,a.GS)(s.CW.maxDiff.name)})};var l=n(3001),d=n(3132),f=n(3080),p=n(9796),g=n(1344),m=n(8348),h=n(7404),v=(n(9952),n(4708)),y=n(6764),_=n(6332),w=n(556),x=n(9376);function b(t){return 1===t?"bottom":2===t?"top":"center"}function T(t,e,n,i,r=""){const{resultId:o,text:a}=e,s=o&&t.options.find((t=>t.cascadePath===o)),c=r?r+"=>"+a:a;return s&&(s.text=c),n.nodeTypeInfoRequired||(e.hint=""),e.list&&e.list.forEach((e=>{e.text=T(t,e,n,i,c)})),e.text}async function S(t,e){const{destList:n,cascadeStart:i}=e.origin,o=(0,r.MR)(t.nodeList,n,i.uuid);o&&(e.cascade=await E(e,t,o,""))}async function E(t,e,n,o,c){c?await(0,i.wz)(c,t):c={uuid:"",text:""};const{nodeList:u}=e,l=o?o+"=>"+(0,w.kt)(c.uuid):(0,w.kt)(c.uuid),d={option:c,groupId:o,resultId:l,text:c.text||c.optComment};if(!n)return d;d.placeholder=n.placeholder||(0,a.GS)(s.CW.menu.clickToSelect);const f=await async function(t,e,n){let r=n.cachedCasMenuOpts;r||(r=n.cachedCasMenuOpts={});const o=r[t.nodeUuid];if(o)return o;{const{options:o,passRefs:a}=await(0,x.q0)(e,t),s=await(0,i.o9)(n,o,a),c=await(0,_.is)(e,s,n),u={...nt({target:t},e),renderId:(0,w.So)(t.nodeUuid,n.loopStack)},l=await(0,i.o9)(n,t.otherOptions,[]),d=await(0,_.is)(e,l,n),f={options:(0,y.uQ)(u,c.visibleList),otherOptions:d.visibleList};return r[t.nodeUuid]=f,f}}(n,e,t),p={...nt({target:n},e),...f,parent:e},g=(0,r._A)(n),{min:m,max:h}=await(0,r.EH)(p,e),{destList:T,output:S}=n,I=(0,r.K6)(n),k=[],O=g?(0,a.GS)(s.CW.cascade.selectBetween,{min:m||1,max:h}):(0,a.GS)(s.CW.cascade.selectSome,{amount:1}),C={...d,list:k,multiple:g,min:m,max:h,hint:O,required:I,display:b(n.menuType),lineCount:n.lineCount},L=(0,r.MR)(u,T,S.uuid),N=(0,v.wR)(p);(0,i.cV)(N);for(const n of N){const i=(0,r.MR)(u,T,n.uuid)||L,o=await E(t,e,i,l,n);k.push(o)}return C}function I(t,e,n){const i=function(t){const e=[];return t.forEach((t=>{const{pickedTimes:n}=t;e[n]?e[n].push(t):e[n]=[t]})),e}(t),r={items:[],done:!1};let o=e;for(const t of i)if(t){const e=(0,w.my)(t,o);if(e.forEach((t=>{r.items.push({option:t.option,value:0,round:n}),t.option.records.push({round:n,value:0}),t.pickedTimes+=1})),o-=e.length,0===o)break}return r}n(5960);var k=n(3048),O=n(488);const C={optionsRelationship:{},groupsRelationship:{}},L=["select","select_icon","select_image","icon_mark","value_mark","fill","weight"];function N(t){return"group"===t.type}function R(t){return"type"in t&&"group"===t.type}async function A(t,e){const{options:n,origin:i}=t;let r=i.optionGroups||[];if(o=t.type,!L.includes(o))return{optionGroups:void 0};var o;const a=function(t,e){const{optionRefers:n,refOptions:i}=t.origin;let r=[];const o=[];return n.forEach((t=>{const{identity:{nodeId:n}}=(0,k.W)(t);if(n&&!o.includes(n)){o.push(n);const t=(0,O.IH)(e,n);if(!t)return;const a=W(M(t.optionGroups||[],t.origin.optionGroupsRelationship||C),i);r=r.concat(a)}})),r}(t,e);if(r=r.concat(a),0==r.length)return{optionGroups:void 0};const s=function(t,e){const n={};!function t(e){e.forEach((e=>{N(e)?e.children.forEach((e=>{N(e)?t(e.children):n[e.optionUuid]=e.groupUuids})):n[e.optionUuid]=e.groupUuids}))}(e);const i=[];t.forEach((t=>{n[t.uuid]||i.push(t)}));const r=[];return i.forEach((t=>{const e={text:t.text,optionUuid:t.uuid,groupUuids:[],type:"option",currentLevel:1};r.push(e)})),r}(n,r);r=function(t,e,n){const i=t.concat(e),r=(t,e)=>{if(N(t)){const n=t;let i=e;for(const t of n.children)i=Math.min(r(t,i),i);return i}{const e=t,i=n.map((t=>t.uuid)).indexOf(e.optionUuid);return-1===i?Number.MAX_VALUE:i}};return i.sort(((t,e)=>r(t,Number.MAX_VALUE)-r(e,Number.MAX_VALUE)))}(r,s,n);let c=await U(r,n,e);return c=P(c),c=function(t,e){const{randomOptionY:n,circulation:i,followRandom:r}=t.origin;return i?F(e):n?r?e:B(e):e}(t,c),q(c,n),c=j(c),{optionGroups:c}}function P(t){const e=[];return t.forEach((t=>{R(t)?function(t){const{children:e}=t;return!(!e||0===e.length)&&0!==P(e).length}(t)&&e.push(t):e.push(t)})),e}function M(t,e){return(t||[]).map((t=>{if(R(t)){const n=(0,w.O0)(t),{groupTitle:i,showGroupTitle:r,children:o,randomMode:a,type:s,uuid:c}=n;return{groupTitle:i,showGroupTitle:r,randomMode:a,type:s,uuid:c,children:M(o,e)}}{const n=(0,w.O0)(t),{text:i,uuid:r}=n;return{type:"option",text:i,optionUuid:r,groupUuids:e.optionsRelationship[r]||[]}}}))}function W(t,e){return t.map((t=>function(t,e){if(N(t)){const n=W(t.children,e);return t.children=[...n],t}{const{optionUuid:n,type:i,groupUuids:r,text:o,currentLevel:a}=t;return{type:i,groupUuids:r||[],text:o,currentLevel:a,optionUuid:e.find((t=>(0,w.oj)(n,t.refOptId))).uuid}}}(t,e)))}async function U(t,e,n){const i=[];for(const r of t){const t=await G(r,e,n);t&&i.push(t)}return i}async function G(t,e,n){if(N(t))return{uuid:t.uuid,type:t.type,groupTitle:await(0,l.qQ)(t.groupTitle,{state:n}),showGroupTitle:t.showGroupTitle,randomMode:t.randomMode,children:await U(t.children,e,n),currentLevel:t.currentLevel};{const{optionUuid:n}=t;return e.find((t=>t.uuid===n))}}const D=(t,e)=>{const{groups:n,options:i}=(t=>t.reduce(((t,e,n)=>{const{groups:i,options:r}=t;return R(e)?i.push({group:e,index:n}):r.push({uuid:e.uuid,option:e,index:n}),t}),{groups:[],options:[]}))(t),r=e.reduce(((t,e)=>{const{uuid:n}=e,r=i.find((({uuid:t})=>t===n));return r&&t.push(r.option),t}),[]);return n.forEach((({group:t,index:e})=>{r.splice(e,0,t)})),r},B=t=>function(t){const e=[];return t.forEach((t=>{const n=(0,w.ec)(e.length+1);e.splice(n,0,t)})),e}(t),F=t=>{return e=t,n=(n||Math.round(10*Math.random()))%e.length,e.slice(n).concat(e.slice(0,n));var e,n};function q(t,e){t.forEach((t=>{if(R(t)){const{randomMode:n,children:i}=t;q(i||[],e);const r={followNode:()=>D(i,e),noRandom:()=>i,random:()=>B(i),circulation:()=>F(i)};t.children=r[n]()}}))}function j(t){let e=[],n=[];const i=[];return t.forEach((t=>{if(R(t))t.children=j(t.children),i.push(t);else{const r=t.origin,{position:o}=r;"top-fixed"===o?e.push(t):"bottom-fixed"===o?n.push(t):i.push(t)}})),e=e.sort(((t,e)=>t.number-e.number)),n=n.sort(((t,e)=>t.number-e.number)),[...e,...i,...n]}var z=n(1884),V=n(3004),K=n(6276),Y=n(5032),H=n(1103),Q=n(6784),X=n(4060);const Z=["select","menu","select_image","select_icon","upload"];function J(t,e,n){let i=t.indexOf(e)+n;return i<0?i=0:i>t.length-1&&(i=t.length-1),t[i]}const $={};function tt(t){const{origin:e}=t;return{mapImage:e.mapImage&&(0,d.a)(e.mapImage),mapImgHeight:e.mapImgHeight,mapImgWidth:e.mapImgWidth}}async function et(t){const{loop:e,parent:n,origin:i}=t,{lockLoopCount:r}=i;let o=i.nodeName.split("/")[0];if(o&&i.circleNode1Id&&!r&&!(0,c.E3)().realTimePreview){const t=(0,m.yy)();let r=await t.C_OL_LBL.getText({state:n});if(r||(r=e.node.nodeName+"_"+await t.C_OL_NUM.getText({state:n})),o=r+"_"+o,i.circleNode2Id){let i=await t.C_IL_LBL.getText({state:n});i||(i=e.node.nodeName+"_"+await t.C_IL_NUM.getText({state:n})),o=i+"_"+o}}return o}function nt(t,e){const{target:n,loop:i,random:r,loopStack:o}=t;return{customData:{},nodeUuid:n.nodeUuid,nodeName:n.nodeName,origin:n,loop:i,random:r,loopStack:o,type:n.type,parent:e}}async function it(t,e){const n={...t,hasAnswer:!1,autoSkip:t.origin.autoSkip,reached:!1,readonly:!1,embedVarMaps:[],pageStart:!1,pageEnd:!1,checkMode:t.origin.checkMode,runtimeNodeName:await et(t),startTime:(new Date).toISOString(),costTime:0,endTime:0,realtimePreview:(0,c.E3)().realTimePreview,renderId:(0,r.YJ)(t),prev:e,errorMessage:""},o=t.parent;if(r.CA.includes(n.type))return async function(t,e){(0,c.e)(t,{autoSkip:!0,number:""});const n=$[t.type];return n&&await n(t),t}(n);const{qNumberRequired:a}=o;a&&function(t){"end"!==t.type&&"describe"!==t.type&&(0,c.e)(t,{number:t.runtimeNodeName})}(n),function(t){(0,c.e)(t,{validateFailTimes:0,validateFailed:!1})}(n),function(t){const{origin:e}=t;(0,c.e)(t,{asterisks:!0===e.answerRequired&&t.parent.asterisksRequired})}(n),await async function(t){const e=t,{origin:n}=e;var i;n.image?(0,c.e)(e,{imgScale:n.imgScale,imgPosition:n.imgPosition,imgTransTime:n.imgTransTime,imgTransType:n.imgTransType,images:await(0,x.Q9)(t.parent,e)}):(0,c.e)(e,{images:[]}),n.video&&(0,c.e)(e,{autoplayVideo:n.autoplayVideo,video:n.video&&(i=n.video,i?{id:i.id,url:(0,V.G)(i.url),poster:(0,V.G)(i.poster)}:null)})}(n),await async function(t){if((0,K.Oo)(t)){const{origin:e}=t;(0,c.e)(t,{layout:e.layout,template:await(0,Y.m)(e.template,t.parent)})}}(n),await(0,i.u_)(n,o),await async function(t,e){const n=await A(t,e);return(0,c.e)(t,{optionGroups:n.optionGroups}),n}(n,o);const s=$[n.type];return s&&await s(n),o.context.node=n,await async function(t){const e=t.origin,n=await(0,r.EH)(t,t.parent),i=(0,r._A)(e);(0,c.e)(t,{...n,multiple:i,selectType:i?"checkbox":"radio"})}(n),await(0,H.S)(n),(0,c.W4)().dev.infer||await async function(t){if(!t.parent.nodeTypeInfoRequired)return;const e=u[t.type],n=e?await e(t):null;n&&(n.typeDescription="",(0,c.e)(t,n))}(n),(0,r.j$)(n),await async function(t){(0,K.G6)(t)&&await async function(t){if(!(0,c.E3)().realTimePreview)if((0,w.is)(t,"sequence"===t.type)){if(1===t.options.length){const e=t.options[0];(0,c.e)(e,{selected:!0,sortNo:1}),(0,Q.we)(0,t)}}else if((0,w.is)(t,Z.includes(t.type))&&!await(0,X.yG)(t.origin.showWithSingleRefOpt,t.parent)){let e=[...t.options];if((0,K.IN)(t)&&(e=[...e,...t.otherOptions]),1===e.length){const n=e[0];n.origin.isRef&&((0,c.e)(n,{selected:!0}),(0,Q.y)(t.parent,n,t,"single_ref_select_opt"),t.forceSkipReason="single_ref_select_opt",t.autoSkip=!0)}}}(t)}(n),(0,g._4)(n),n}async function rt(t,e,n){const i=!(!e||!e.id);let r;t.showRewards&&(r=t.options.map((t=>({rewardName:t.rewardName,rewardCount:t.rewardCount}))));const o=i?t.success:t.fail,u=i?(0,a.GS)(s.CW.lottery.congratulation):(0,a.GS)(s.CW.lottery.pity),l=i?(0,a.GS)(s.CW.lottery.goal):(0,a.GS)(s.CW.lottery.fail),f=o.title||u,p=o.summary||l,g=(0,d.a)({width:o.imageWidth,height:o.imageHeight,name:o.imageName,id:"",originName:"",type:"image"});let m;if(i){const n=t.options.find((t=>t.uuid===e.lottery_option_id));n&&(m=n.rewardName)}const h=nt({target:t},n),v=await it(h,n.current);return(0,c.e)(v,{rewardRaw:e,rewardTime:(0,z.kF)(),goal:i,rewardImage:g.name?g:void 0,rewardTitle:f,rewardDescribe:p,rewardList:r,rewardName:m,showRewards:t.showRewards}),!(0,c.E3)().preview&&i&&((0,c.W4)().app.canHandleReward()||"red_envelope"!==e.type||await ot(n,v)),v}async function ot(t,e){const{formalResult:{reward:n,authorizer:i},nodeList:o}=t,{app_id:a,component_appid:s}=i,u=(0,r.o1)(o,n.gift_id);e.linkUrl=await(0,l.Oj)(u.linkUrl,{state:t}),e.endBtnText=u.endBtnText||"";const d={rid:String(n.id),aid:a,cid:s,qid:t.surveyId,tid:t.transactionID,sid:(0,h.uK)().sid,rt:"red_envelope",locale:t.language,reward_from_qr_code:"true"};e.qrCode=(0,c.W4)().app.getRewardUrl(d)}$.region=async t=>{(0,c.e)(t,{indexes:"0 0 0",value:"",regions:await(0,o.iM)(),infoRange:t.origin.infoRange})},$.end=async t=>{const{parent:e}=t,n=await(0,l.Oj)(t.origin.linkUrl,{state:e});(0,c.e)(t,{hasReward:!1,linkUrl:n,endBtnText:t.origin.endBtnText,backendRequest:t.origin.backendRequest})},$.location=async t=>{(0,c.e)(t,{regions:await(0,o.iM)(),infoRange:t.origin.infoRange,value:""})},$.value_mark=async t=>{(0,c.e)(t,{showInput:t.origin.showInput})},$.icon_mark=async t=>{(0,c.e)(t,{inverseValue:t.origin.inverseValue})},$.menu=async t=>{const{origin:e}=t;(0,c.e)(t,{placeholder:e.placeholder||(0,a.GS)(s.CW.menu.clickToSelect),display:b(e.menuType),lineCount:e.lineCount})},$.area=async t=>{(0,c.e)(t,{infoRange:"street",regions:await(0,o.iM)()})},$.verify=async t=>{(0,c.e)(t,{value:"",phoneNumber:"",code:"",validateType:t.origin.validateType})},$.weight=async t=>{const{origin:e,parent:n}=t,i=await(0,r.iw)(e,n);(0,c.e)(t,{weightTotal:i,unit:e.unit,distributeBy:e.distributeBy})},$.max_diff=async t=>{const{origin:e}=t,n=function(t){const{options:e,origin:n}=t,{taskCount:i,itemCountPerTask:r}=n,o=e.map((t=>({option:t,pickedTimes:0}))),a=[];for(let t=0;t<i;t++)a.push(I(o,r,t+1));return a}(t);(0,c.e)(t,{itemCountPerTask:e.itemCountPerTask,taskCount:e.taskCount,positiveDesc:e.positiveDesc,negativeDesc:e.negativeDesc,tasks:n,currentTask:n[0],gotoNextTask(){(0,c.e)(t,{currentTask:J(t.tasks,t.currentTask,1)})},gotoPrevTask(){(0,c.e)(t,{currentTask:J(t.tasks,t.currentTask,-1)})},gotoTask(e){(0,c.e)(t,{currentTask:e})}})},$.slide_rate=async t=>{(0,c.e)(t,{currentOption:t.options[0],gotoNextOption(){(0,c.e)(t,{currentOption:J(t.options,t.currentOption,1)})},gotoPrevOption(){(0,c.e)(t,{currentOption:J(t.options,t.currentOption,-1)})},gotoOption(e){(0,c.e)(t,{currentOption:e})}})},$.select_image=async t=>{(0,c.e)(t,{picFitType:t.origin.picFitType,needBgColor:t.origin.needBgColor,optImgScale:t.origin.optImgScale})},$.cascade=async t=>{await S(t.parent,t),function(t){const e=[],n=t=>{e.push(t),t.list&&t.list.forEach((t=>n(t)))};n(t.cascade),t.options.forEach((n=>{if(n.origin.useComment){const r=e.find((t=>t.resultId===n.cascadePath));n.inputType=(0,i.kd)(r.option.origin,t.type)}}))}(t),T(t,t.cascade,t.parent,t.loop,""),t.options=t.options.filter((t=>!!t.text)),(0,f.So)(t,t.options)},$.hot_spot=async t=>{(0,c.e)(t,{...tt(t),autoShowRect:t.origin.autoShowRect,autoShowText:t.origin.autoShowText})},$.heat_map=async t=>{(0,c.e)(t,{...tt(t),clickTimes:0,pointColor:t.origin.pointColor,pointRadius:t.origin.pointRadius})},$.loop=async t=>{const{parent:e}=t;(0,p.iO)(t,e)||(t.varList=await(0,p.Co)(e,t))}},1103:(t,e,n)=>{"use strict";n.d(e,{S:()=>s,e:()=>a});var i=n(8856),r=n(6276),o=n(3001);async function a(t){const{parent:e,origin:n}=t,r=await(0,o.qQ)(n.describe,{state:e,usage:{node:t,exclusiveId:"description"}});(0,i.e)(t,{description:r})}async function s(t){(0,r.kZ)(t)&&(t.headHidden=t.origin.headHidden,await async function(t){const{parent:e,origin:n}=t,r=await(0,o.qQ)(n.questionText,{spaceRep:" ",state:e,usage:{node:t,exclusiveId:"title"}});(0,i.e)(t,{title:r})}(t),await a(t))}},5032:(t,e,n)=>{"use strict";n.d(e,{m:()=>o}),n(9952);var i=n(8856),r=n(3001);async function o(t,e){if(!t)return{param:{}};const n=await(0,i.W4)().ui.loadNodeComponent(t,!0),o={};if(t.params)for(const n of t.params)o[n.name]=await(0,r.E3)(n.value,{state:e},"URL");return{name:t.name,id:t.id,component:n,param:o}}},1344:(t,e,n)=>{"use strict";n.d(e,{ew:()=>M,mi:()=>W,ig:()=>j,Yp:()=>z,$7:()=>Y,io:()=>G,IN:()=>q,ay:()=>B,wn:()=>F,_4:()=>D,aC:()=>V,iq:()=>K}),n(5960),n(9952);var i=n(4708),r=n(5776),o=n(5684),a=n(6348),s=n(9948),c=n(8856),u=n(556),l=n(568),d=n(6276);const f={};function p(t,e){e&&t&&(e.selected=t.selected,e.option.selected=t.selected,e.list&&t.list&&e.list.forEach((e=>{const n=t.list.find((t=>t.resultId===e.resultId));n&&p(n,e)})))}function g(t){return t?{selected:t.selected,resultId:t.resultId,list:t.list&&t.list.map((t=>g(t)))}:null}function m(t,e){e.startTime=t.startTime,e.costTime=t.costTime,e.type=t.type,function(t,e){e.validateFailTimes=t.validateFailTimes,e.validateFailed=t.validateFailed}(t,e)}f.max_diff={cache(t,e){e.tasks=t.tasks.map((t=>({items:t.items.map((t=>({uuid:t.option.uuid,value:t.value,round:t.round}))),done:t.done}))),e.currentTaskIndex=t.tasks.indexOf(t.currentTask)},use(t,e){t.tasks&&(e.tasks=t.tasks.map((t=>({items:t.items.map((t=>({option:(0,i.oz)(e.options,t.uuid),value:t.value,round:t.round}))),done:t.done}))),e.currentTask=e.tasks[t.currentTaskIndex||0])}},f.slide_rate={use(t,e){e.currentOption=e.options[t.currentTaskIndex||0]},cache(t,e){e.currentTaskIndex=t.options.indexOf(t.currentOption)}},f.cascade={use(t,e){p(t.cascade,e.cascade)},cache(t,e){e.cascade=g(t.cascade)}},f.verify={borrow(t,e){e.code=t.code,e.phoneNumber=t.phoneNumber}},f.region={borrow(t,e){e.indexes=t.indexes,e.position=t.position,e.value=t.value}},f.location=f.area={borrow(t,e){f.region.borrow(t,e),e.succeed=t.succeed,e.failed=t.failed,e.failedSkipActivated=t.failedSkipActivated}},f.sequence={use(t,e){t.rankList&&e.options.sort(((e,n)=>t.rankList.indexOf(e.uuid)>t.rankList.indexOf(n.uuid)?1:-1))},cache(t,e){e.rankList=t.options.map((t=>t.uuid))}},f.heat_map={use(t,e){e.clickTimes=t.options.length}};const h=["select","select_icon","select_image","menu","hot_spot"];var v=n(4556),y=n(2352);const _={};function w(t,e,n){e.value=t.value,e.selected=t.selected,t.assistValue&&(e.assistValue=e.assistValue||{},Object.keys(t.assistValue).forEach((n=>{(0,y.oV)(t.assistValue[n])||(e.assistValue[n]=t.assistValue[n])})),"cache"===n&&0===Object.keys(e.assistValue).length&&delete e.assistValue)}function x(t,e,n){if(w(t,e,"use"),!e.isOtherOpt){const i=_[n];i&&(i.use?i.use(t,e):i.borrow&&i.borrow(t,e))}}_.max_diff={borrow(t,e){t.records&&(e.records=t.records.map((t=>({...t}))))}},_.sequence={borrow(t,e){e.sortNo=t.sortNo}},_.heat_map={borrow(t,e){t.point&&(e.point={...t.point})}},_.weight={borrow(t,e){e.percent=t.percent}},_.upload={borrow(t,e){e.fileName=t.fileName,e.fileType=t.fileType,e.filePath=t.filePath,e.isImage=t.isImage},cache(t,e){_.upload.borrow(t,e),e.value=t.miniValue||t.value},use(t,e){_.upload.borrow(t,e),e.fileName&&(0,v.Y5)(e,t)}};var b=n(6940);let T=!1,S="";const E=["data","describe","logic","random","loop"];let I,k;const O="response_cache_",C="preview_cache_";let L,N,R={responseId:"",data:{},error:{},point:"",count:0,randomList:[],randomAbandonedNodeIds:[],locale:""};function A(t){const{offlineTaskId:e,preview:n}=(0,c.E3)();if(n)return C+(0,u.kt)(t);{const n=O+(0,u.kt)(t);return e?n+"_with_"+e:n}}function P(t,e){const n={};return function(t,e,n){if(e.uuid=t.uuid,w(t,e,"cache"),!t.isOtherOpt){const i=_[n];i&&(i.cache?i.cache(t,e):i.borrow&&i.borrow(t,e))}}(t,n,e),n}function M(t){if((0,c.W4)().dev.infer||T)return;if((0,r.S)(t)||E.includes(t.type)||t.readonly)return;const e={error:t.errorMessage||void 0,options:{}};(0,i.wR)(t).forEach((t=>{e.options[t.renderId]=t.errorMessage||void 0})),R.error[t.renderId]=e}async function W(t){if((0,c.W4)().dev.infer||T)return;if((0,r.S)(t)||E.includes(t.type)||t.readonly)return;const e={};!function(t,e){m(t,e);const n=f[e.type];n&&(n.cache?n.cache(t,e):n.borrow&&n.borrow(t,e))}(t,e);const n=(0,o.cA)(t);if(n&&n.items){const i=n.items.map((t=>t.option_id.toLowerCase())),r=t=>!!n.items&&i.includes(t.uuid.toLowerCase());(0,d.G6)(t)&&(e.options=t.options.filter(r).map((e=>P(e,t.type)))),(0,d.IN)(t)&&(e.otherOptions=t.otherOptions.filter(r).map((e=>P(e,t.type))))}R.responseId=t.parent.transactionID,R.data[t.renderId]=e;const i=t.parent.randomList;i&&(R.randomList=i.map((t=>({nodeId:t.node.nodeUuid,destPortIds:t.destPortIds}))),R.randomAbandonedNodeIds=(0,b.mU)()),await U(t.parent)}async function U(t){const{sid:e,renderList:n}=t,i=A(e);R.locale=(0,l.qe)();const r=Object.keys(R.data);R.count=0;for(const t of n)if(r.includes(t.renderId)&&(R.count+=1),t.renderId===R.point)break;await(0,c.W4)().storage.setVital(i,JSON.stringify(function(t){const e=t.data,n={};return Object.keys(e).forEach((t=>{const i={...e[t]};"upload"===i.type&&(i.options=i.options.map((t=>((t={...t}).miniValue&&(t.value=t.miniValue,delete t.miniValue),t)))),n[t]=i})),{...t,data:n}}(R)))}async function G(t){const e=A(t),n=await(0,c.W4)().storage.getVital(e);if(n){const t=JSON.parse(n);return S||(S=t.locale),t}return null}function D(t){if((0,c.W4)().dev.infer)return t;if((0,r.S)(t)||E.includes(t.type)||t.readonly)return t;!function(t){const e=R.error[t.renderId];e&&(t.errorMessage=e.error||"",(0,i.wR)(t).forEach((t=>{t.errorMessage=e.options[t.renderId]||""})))}(t);const e=R.data[t.renderId];return e?(function(t,e,n){const r=(0,i.wR)(t);let o=[];e.options&&(o=[...o,...e.options]),e.otherOptions&&(o=[...o,...e.otherOptions]);for(const t of r){const e=(0,i.oz)(o,t.uuid);e&&x(e,t,n)}}(t,e,t.type),function(t,e){m(t,e);const n=f[e.type];n&&(n.use?n.use(t,e):n.borrow&&n.borrow(t,e))}(e,t),function(t){if((0,r._A)(t.origin)||!(0,d.G6)(t))return;let e=(0,d.IN)(t)?t.otherOptions:[];h.includes(t.type)&&(e=[...e,...t.options]);const n=e.filter((t=>t.selected));if(n.length<=1)return;const i=[];n.forEach((t=>{t.autoSelectMarked?(0,c.e)(t,{selected:!1,autoSelectMarked:!1}):i.push(t)})),i.length>1&&i.forEach(((t,e)=>{e<i.length-1&&(0,c.e)(t,{selected:!1})}))}(t),I&&I(t),t):(I&&I(t),t)}async function B(t,e,n){R=t,L=[...t.randomList||[]],(0,b.ID)(t.randomAbandonedNodeIds,e.nodeList),N=t.point;const i=R.count;let r=0;T=!0,I=()=>{r>=i?k({failed:!1,error:""}):(n.onProgress("".concat(r,"/").concat(i)),r++)},k=t=>{o(),I=null,k=null,a.i.trigger("END_MEMORY",e.current),setTimeout((()=>{n.onEnd(t)}),250)};const o=()=>{a.i.off("NEXT_OK",u),a.i.off("STRETCH_OK",u),a.i.off("NEXT_OK",c),T=!1},c=(t,e)=>{"NEXT_FAIL"===t.type&&e?n.onSuspend():k({failed:!0,error:e})},u=()=>e.current.renderId===N?k({failed:!1,error:""}):e.handleEvents.handleNextClick();a.i.one("STRETCH_OK",u),a.i.on("NEXT_FAIL",c),a.i.on("NEXT_OK",u),a.i.trigger("START_MEMORY"),await(0,s.ER)()}function F(t,e){if(!L)return t;const n=L.find((t=>t.nodeId===e.nodeUuid));if(!n)return t;const i=n.destPortIds,r=[],o=[];return t.forEach((t=>{i.includes(t)?r.push(t):o.push(t)})),r.sort(((t,e)=>i.indexOf(t)>i.indexOf(e)?1:-1)),[...r,...o]}function q(){R={responseId:"",data:{},error:{},point:"",count:0,randomList:[],randomAbandonedNodeIds:[],locale:""}}async function j(t){q();const e=A(t.sid);await(0,c.W4)().storage.removeVital(e)}async function z(t,e){e.forEach((t=>{delete R.data[t]})),await U(t)}function V(t){T||(R.point=t.current.renderId)}async function K(t){V(t),await U(t)}async function Y(t){return t?(S||await G(t),S):""}},5616:(t,e,n)=>{"use strict";n.d(e,{K:()=>d,y:()=>l});var i=n(1344),r=n(6784),o=n(8856),a=n(6496),s=n(568);class c{constructor(t,e){if(t&&t.data&&Object.keys(t.data).length>0){const{langResume:n}=e;this.holder=t,this.state=e,this.show=!0,this.title=n?(0,a.GS)(s.CW.langResume.title):(0,a.GS)(s.CW.memory.title),this.message=n?"":(0,a.GS)(s.CW.memory.message),this.sureText=n?"":(0,a.GS)(s.CW.memory.sure),this.denyText=n?"":(0,a.GS)(s.CW.memory.deny)}}async handleSure(){if(!this.holder||d())return;const t=this;return this.state.enterMode="resume",(0,o.e)(t,{sureText:"",denyText:"",show:!0,resuming:!0}),(0,r.Wy)(this.state,t.holder.responseId||""),await(0,o.W4)().hook.onResumeSurvey(this.state),(0,i.ay)(this.holder,this.state,{onEnd(){t.end()},onProgress(e){(0,o.e)(t,{show:!0}),(0,o.e)(t,{message:e})},onSuspend(){t.suspend()}})}async handleDeny(){d()||(await(0,o.W4)().hook.onRestartSurvey(this.state),this.state.enterMode="restart",this.end())}end(){(0,o.e)(this,{show:!1,holder:null,message:"",resuming:!1})}suspend(){(0,o.e)(this,{show:!1})}}let u=null;async function l(t){const e=await(0,i.io)(t.sid);return u=new c(e,t),u}function d(){return u&&u.resuming}},2392:(t,e,n)=>{"use strict";n.d(e,{U:()=>r,y:()=>o});var i=n(8856);function r(){return{primary:"rgba(128,128,128,1)",secondary:"rgba(255,255,255,1)",contrast:"rgba(202,32,39,1)",background:"#FFFFFF",error:"rgba(202,32,39,1)",button:"rgba(202,32,39,1)",fontSize:"24px",fontWeight:"normal",descFontSize:"16px",descFontWeight:"normal",optFontSize:"16px",optFontWeight:"normal",btnFontSize:"16px",btnFontWeight:"normal",name:"minimal",fontFamily:"SimSun",titleFontSize:"25px",titleFontWeight:"normal",boxWidth:"50vmin",bgOpacity:100,bgImageUrl:"",effect:"normal",bgLayout:"cover",bgSize:"cover",bgImageId:"",bgImageHeight:0,bgImageWidth:0}}function o(t={primary:"rgba(128,128,128,1)",secondary:"rgba(255,255,255,1)",contrast:"rgba(202,32,39,1)",background:"#FFFFFF",error:"rgba(202,32,39,1)",button:"rgba(202,32,39,1)",fontSize:"24px",fontWeight:"normal",descFontSize:"16px",descFontWeight:"normal",optFontSize:"16px",optFontWeight:"normal",btnFontSize:"16px",btnFontWeight:"normal",name:"minimal",fontFamily:"SimSun",titleFontSize:"25px",titleFontWeight:"normal",boxWidth:"50vmin",bgOpacity:100,bgImageUrl:"",effect:"normal",bgLayout:"cover",bgSize:"cover",bgImageId:"",bgImageHeight:0,bgImageWidth:0}){t.error=t.error||t.contrast,t.button=t.button||t.contrast,(0,i.E3)().theme=t,(0,i.E3)().setTheme(t)}},1372:(t,e,n)=>{"use strict";n.d(e,{a:()=>a});var i=n(8856),r=n(556);const o="prs-";function a(t=[]){const e=function(t){let e="";return t.forEach((t=>{e+="\n .".concat(o).concat((0,r.kt)(t.id)," {\n ").concat(function(t){let e="";const{backgroundColor:n,bold:i,color:r,fontSize:o,italic:a,lineThrough:s,underline:c}=t;return n&&(e+="background-color: ".concat(n,";")),r&&(e+="color: ".concat(r,"; ")),i&&(e+="font-weight: bold;"),a&&(e+="font-style: italic;"),s&&(e+="text-decoration: line-through;"),c&&(e+="text-decoration: underline;"),o&&(e+="font-size: ".concat(o,";")),e}(t.value),"\n }\n ")})),e}(t);(0,i.W4)().ui.setPresetStyle(e,t)}},8856:(t,e,n)=>{"use strict";n.d(e,{E3:()=>d,W4:()=>l,e:()=>f,oB:()=>c,oV:()=>u});var i=n(6348),r=n(556);let o=null,a=null;const s=(0,r.Cu)((()=>i.i.trigger("SET_PROPS")),1e3/60);function c(t){a=t}function u(t){o=t}function l(){if(!a)throw new Error("Env not yet initialized");return a}function d(){if(!o)throw new Error("Client not yet initialized");return o}function f(t,e){t&&e&&(Object.keys(e).forEach((n=>{t[n]=e[n]})),o.silentSetter||s())}i.i.on("ERROR_ABORT",((t,e)=>{d().error(e)}))},1884:(t,e,n)=>{"use strict";function i(t){if(!t)return"00:00";const e=t%60;return r((t-e)/60)+":"+r(e)}function r(t){let e=t+"";return 1===e.length&&(e="0"+e),e}function o(){const t=new Date;return t.getFullYear()+"-"+r(t.getMonth()+1)+"-"+r(t.getDate())+" "+r(t.getHours())+":"+r(t.getMinutes())+":"+r(t.getSeconds())}n.d(e,{KM:()=>i,Kk:()=>r,kF:()=>o})},8084:(t,e,n)=>{"use strict";n.d(e,{Qf:()=>s,iM:()=>a,qu:()=>c});var i=n(7320);const r="https://media.choiceform.com/static-assets/regions-2020.json";let o;async function a(){return o||(o=await(0,i.kj)(r,{type:"GET"},!0),o.forEach((t=>{t.cities&&0!==t.cities.length||(t.cities=[{name:t.name,code:t.code,areas:[{name:t.name,code:t.code}]}]),t.cities.forEach((t=>{t.areas&&0!==t.areas.length||(t.areas=[{name:t.name,code:t.code}])}))}))),o}function s(t){if(!t)return"";const e=t.split("-"),n=e[0],i=o.find((t=>n.includes(t.name)));if(!i)return"";const r=i?i.code+"":"",a=e[1];if(!a)return r;const s=i.cities.find((t=>a.includes(t.name)));if(!s)return r;const c=s?s.code+"":"",u=e[2];if(!u)return c;const l=s.areas.find((t=>u.includes(t.name)));return(l?l.code+"":"")||c||r||""}function c(t){const e=t.split(" ").map((t=>Number(t))),n=e.length,i=o[e[0]];let r,a,s=i.name;return n>1&&(r=i.cities[e[1]],s+="-"+r.name,n>2&&(a=r.areas[e[2]],s+="-"+a.name)),s}},3684:(t,e,n)=>{"use strict";n.d(e,{y:()=>r});var i=n(8856);function r(t,e){return new(0,(0,i.W4)().system.functionConstructor)("".concat(e?"return":""," ").concat(t))()}},6496:(t,e,n)=>{"use strict";n.d(e,{At:()=>h,GS:()=>v,Mh:()=>f,Mt:()=>y,Sk:()=>p,Uj:()=>g,YP:()=>m}),n(7768);var i=n(6348),r=n(568),o=n(8856),a=n(7404),s=n(9200);const c=["zh_cn","en_us"];function u(){const{offline_survey_id:t}=(0,a.uK)(),e="language";return t?e+t:e}async function l(){return(0,o.W4)().storage.getVital(u())}function d(t,e){return!!e&&t.some((t=>t.locale===e))}async function f(t,e){const n=await l();if(d(t,n))return n;const i=function(){const t=(0,o.W4)().system.getLang();return t?function(t){const e=t.replace(/-/g,"_").toLowerCase(),n=s.c.langTable.find((t=>t.locale.startsWith(e)));return n?n.locale:e}(t):"en_us"}();return d(t,i)?i:e}async function p(t,e){return t!==await l()&&(m(t,!0),await async function(t){return(0,o.W4)().storage.setVital(u(),t)}(t),(0,o.W4)().storage.set("anti-show-init-lang-select","true"),e&&(0,o.W4)().storage.set("lang-resume","true"),(0,o.W4)().hook.beforeForceLeave(),(0,o.W4)().app.reload(),!0)}function g(t){let e="en_us";c.includes(t)&&(e=t),r.Ki(e),(0,o.E3)().setLocale(e),i.i.trigger("LANG_CHANGE");const n=s.c.langTable.find((e=>e.locale===t));(0,o.W4)().hook.onLangChange(n)}function m(t="en_us",e=!1){return e||g(t),t}function h(t){return t.replace(/\{(\w+),.+?(\w+)\}\s?\}/g,((t,e,n)=>"{".concat(e,"} ").concat(n)))}function v(t,e){return e?(0,o.W4)().system.translate(t,e):t}function y(t,e){const n=t&&e.length>1&&null===(0,o.W4)().storage.get("anti-show-init-lang-select");return(0,o.W4)().storage.remove("anti-show-init-lang-select"),!!n}},3132:(t,e,n)=>{"use strict";n.d(e,{a:()=>a,k:()=>o});var i=n(4756),r=n(8856);function o(t){return(0,r.E3)().hostConfig.mediaHost+"/"+t}function a(t){const{width:e,height:n,name:r,id:a,originName:s}=t,c=o(r);return{ratio:Math.round(n/e*1e5)/1e5,url:c,natural:(0,i.Q)(c,"@m720"),thumbnail:(0,i.Q)(c,"@avatar"),large:(0,i.Q)(c,"@m1080"),width:e,height:n,id:a,originName:s,name:r}}},4872:(t,e,n)=>{"use strict";n.d(e,{K:()=>r});var i=n(9200);async function r(t){return"string"==typeof t?JSON.parse(i.c.inflateBase64(t)):t}},7828:(t,e,n)=>{"use strict";n.d(e,{O_:()=>g,QJ:()=>m,__:()=>h,gz:()=>v,w3:()=>p}),n(9952);var i=n(556),r=n(3568),o=n(6276);function a(t,e){t.questionText=e.questionText||"",t.describe=e.describe||""}function s(t,e){t.mapping&&e.mapping&&r.c.forEach((n=>{const i=t.mapping[n];i&&"object"==typeof i||(t.mapping[n]=e.mapping[n]||"")}))}function c(t,e){let n=[];t.options&&(n=[...n,...t.options]),t.refOptions&&(n=[...n,...t.refOptions]),(0,o.yy)(t)&&(n=[...n,...t.otherOptions]),e.options&&Object.keys(e.options).forEach((r=>{const o=n.find((t=>(0,i.kt)(t.uuid)===r));o&&function(t,e,n){(function(t,e){return!(t.isRef||!t.isOtherOpt&&["cascade","region","area","location"].includes(e.type))})(t,n)&&(t.text=e.text||""),t.optComment=e.optComment||"",s(t,e),t.selectText=e.selectText,t.autoInputConfig&&e.autoInputConfig&&(t.autoInputConfig.defaultValue=e.autoInputConfig.defaultValue||"")}(o,e.options[r],t)}))}function u(t,e){t&&e&&t.logic&&e.logic&&(t.logic.message=e.logic.message||"")}function l(t,e){a(t,e),c(t,e),u(t.validation,e.validation),function(t,e){const{optionGroups:n}=t;if(!n)return;const r=e.optionGroups||{},o=t=>{t.forEach((t=>{if((0,i.is)(t,"group"===t.type)){const e=(0,i.kt)(t.uuid),n=r[e];n&&(t.groupTitle=n.groupTitle);const a=t.children||[];o(a)}}))};o(n)}(t,e)}const d={};function f(t,e){t.value=e.value||""}function p(t,e={}){const{nodes:n,variables:r,groups:o}=e,{nodes:a,variables:s,groups:c}=t;a&&n&&Object.keys(n).forEach((t=>{const e=n[t],r=a.find((e=>e.nodeUuid&&(0,i.kt)(e.nodeUuid)===t));r&&function(t,e){const n=d[t.type];n?n(t,e):l(t,e)}(r,e)})),s&&r&&Object.keys(r).forEach((t=>{const e=r[t],n=s.find((e=>(0,i.kt)(e.uuid)===t));n&&f(n,e)})),c&&o&&Object.keys(o).forEach((t=>{const e=o[t],n=c.find((e=>(0,i.kt)(e.id)===t));n&&function(t,e){t.prevText=e.prevText||"",t.nextText=e.nextText||""}(n,e)}))}function g(t,e){t&&t.forEach((t=>{t.data.forEach((t=>{const n=t[e];n&&(t.name=n)}))}))}function m(t,e){e&&d.start(t,e)}function h(t,e){e&&d.gift(t,e)}function v(t,e){e&&f(t,e)}d.end=(t,e)=>{a(t,e),t.endBtnText=e.endBtnText||""},d.gift=(t,e)=>{a(t,e),t.activityName=e.activityName||"",t.endBtnText=e.endBtnText||"",t.blessings=e.questionText||""},d.loop=(t,e)=>{(e.options||t.options)&&Object.keys(e.options).forEach((n=>{const r=t.options.find((t=>(0,i.kt)(t.uuid)===n));r&&(r.text=e.options[n].text)}))},d.lottery=(t,e)=>{(e.options||t.options)&&Object.keys(e.options).forEach((n=>{const r=t.options.find((t=>(0,i.kt)(t.uuid)===n));r&&(r.rewardName=e.options[n].rewardName)})),e.success&&(t.success.title=e.success.title||"",t.success.summary=e.success.summary||""),e.fail&&(t.fail.title=e.fail.title||"",t.fail.summary=e.fail.summary||"")},d.value_mark=(t,e)=>{l(t,e),t.minText&&(t.minText=e.minText||"",t.maxText=e.maxText||"")},d.menu=(t,e)=>{l(t,e),t.placeholder=e.placeholder||""},d.start=(t,e)=>{t.questionText=e.questionText||"",t.startName=e.startName||"",t.logoText=e.logoText||"",t.startBtnText=e.startBtnText||"",t.nextBtnText=e.nextBtnText||"",t.prevBtnText=e.prevBtnText||"",t.timeoutText=e.timeoutText||"",t.timeLessText=e.timeLessText||"",u(t.validation,e.validation)},d.slide_rate=(t,e)=>{l(t,e),(e.options||t.rateOptions)&&Object.keys(e.options).forEach((n=>{const r=t.rateOptions.find((t=>(0,i.kt)(t.uuid)===n));r&&(r.text=e.options[n].text)}))},d.matrix=(t,e)=>{if(a(t,e),u(t.validation,e.validation),e.options){let n=[];t.optionsX&&(n=[...n,...t.optionsX]),t.optionsY&&(n=[...n,...t.optionsY]),t.otherOptions&&(n=[...n,...t.otherOptions]);const r=t.options||[];Object.keys(e.options).forEach((t=>{const o=e.options[t],a=r.find((e=>(0,i.kt)(e.uuid)===t));if(a)s(a,o);else{const e=n.find((e=>(0,i.kt)(e.uuid)===t));e&&(e.text=o.text||"")}}))}},d.data=(t,e)=>{c(t,e),t.options&&t.options.forEach((t=>{delete t.optComment,delete t.value}))}},5548:(t,e,n)=>{"use strict";function i(t,e="-",n="street"){let i=t.province;return"province"!==n&&t.city&&(i+=e+t.city,"city"!==n&&t.district&&(i+=e+t.district,"county"!==n&&(t.street&&(i+=e+t.street),t.street_number&&(i+=t.street_number)))),i}function r(t){return t*(Math.PI/180)}function o(t,e){const n=r(e.lat-t.lat),i=r(e.lng-t.lng),o=Math.sin(n/2)*Math.sin(n/2)+Math.cos(r(t.lat))*Math.cos(r(e.lat))*Math.sin(i/2)*Math.sin(i/2);return 2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o))*6371*1e3}n.d(e,{A:()=>i,c:()=>o})},556:(t,e,n)=>{"use strict";n.d(e,{Av:()=>c,Cu:()=>w,DB:()=>l,O0:()=>_,OI:()=>v,Qh:()=>o,So:()=>u,Sq:()=>y,W_:()=>b,YF:()=>d,aO:()=>a,ai:()=>g,ec:()=>m,eg:()=>x,is:()=>s,k5:()=>T,kt:()=>f,my:()=>h,oj:()=>p}),n(5960),n(7768),n(6056),n(9952);var i=n(2352);const r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");function o(t){return t.replace(/</g,"_-v-w^l-t-_").replace(/>/g,"^-v-w_g-t-^")}function a(t){return t.replace(/_-v-w\^l-t-_/g,"<").replace(/\^-v-w_g-t-\^/g,">")}function s(t,e){return e}function c(t=1,e=5){const n=g(t,e),i=r.length;let o="";for(let t=0;t<n;t++){const t=g(0,i);o+=r[t]}return o}function u(t,e){if(36!==t.length)throw new Error("invalid uuid");return e?l(t,e.map((t=>f(t.varList[t.currentIndex].uuid)))):t}function l(t,e){if(36!==t.length)throw new Error("invalid uuid");return e&&e.forEach((e=>{t+="-"+f(e)})),t}function d(){const t=new Array(36);let e,n=0;for(let i=0;i<36;i++)8==i||13==i||18==i||23==i?t[i]="-":14==i?t[i]="4":(n<=2&&(n=33554432+16777216*Math.random()|0),e=15&n,n>>=4,t[i]=r[19==i?3&e|8:e]);return t.join("").toLowerCase()}function f(t){return t.substring(t.length-8)}function p(t="",e=""){return t=t.toLowerCase(),e=e.toLowerCase(),8===t.length&&36===e.length?t===f(e):36===t.length&&8===e.length?f(t)===e:t===e}function g(t,e){return t>e&&([t,e]=[e,t]),t+m(e-t+1)}function m(t){return Math.floor(Math.random()*t)}function h(t,e){const n=[...t];if((0,i.oV)(e))return n;if(0===(e=Number(e)))return[];if(e<0||isNaN(e))return n;if(1===e)return n.splice(m(n.length),1);const r=[];for(n.length<e&&(e=n.length);r.length<e;){const t=m(n.length);r.push(n.splice(t,1)[0])}return r}function v(t,e){t&&"object"==typeof t&&Object.keys(t).forEach((n=>{const i=t[n];Array.isArray(i)&&i.forEach((t=>{v(t,e)})),"object"==typeof i&&v(i,e),e(t,n)}))}function y(t,e){if(t<e)throw new Error("can not random distribute");const n=function(t,e){const n=[];for(;n.length<e;){const e=g(1,t-1);n.includes(e)||n.push(e)}return n.sort(((t,e)=>t>e?1:-1)),n}(t,e-1),i=n.map(((t,e)=>t-(n[e-1]||0)));return i.push(t-n[n.length-1]),i}function _(t){const e=new WeakMap;return function t(n){if(!n||"object"!=typeof n)return n;if(n instanceof Array)return n.map((e=>t(e)));const i=e.get(n);if(i)return i;const r={};return e.set(n,r),Object.keys(n).forEach((e=>{r[e]=t(n[e])})),r}(t)}function w(t,e=0){let n=-1;return function(...i){const r=this;clearTimeout(n),n=setTimeout((()=>{t.apply(r,i)}),e)}}async function x(t,e,n){const i=[];t.replace(e,((t,...e)=>(i.push(n(t,...e)),t)));const r=await Promise.all(i);return t.replace(e,(()=>r.shift()))}function b(t=0){return new Promise((e=>setTimeout(e,t)))}async function T(t){return t}},6276:(t,e,n)=>{"use strict";function i(t){return!!t.origin.layout}function r(t){const e=t.origin;return void 0!==e.questionText||void 0!==e.describe}function o(t){return!!t.origin.options}function a(t){return!!t.origin.optionGroups}function s(t){return!!t.origin.fillType}function c(t){return!!t.otherOptions}function u(t){return!!t.options}function l(t){return!!t.origin.otherOptions}function d(t){return!!t.video}n.d(e,{G6:()=>o,IN:()=>l,Oo:()=>i,QB:()=>a,_O:()=>d,cp:()=>s,kZ:()=>r,uo:()=>u,yy:()=>c})},2352:(t,e,n)=>{"use strict";function i(t){return o(t)?"":String(t)}function r(t){if(o(t))return"";const e=Number(t);return isNaN(e)?t:e}function o(t){return t instanceof Array?0===t.length:"boolean"!=typeof t&&0!==t&&!t}n.d(e,{Wo:()=>i,oV:()=>o,uI:()=>r})},4756:(t,e,n)=>{"use strict";n.d(e,{A:()=>o,Q:()=>r});var i=n(3004);function r(t,e){return t.endsWith(".svg")||(0,i.U)()?t:t+e}function o(t=[]){const e=[];return t.includes("video")&&e.push("video/*"),t.includes("audio")&&e.push("audio/*"),t.includes("image")&&e.push("image/*"),t.includes("doc")&&e.push("text/plain","application/json","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".csv",".docx",".pdf",".log"),e.join()}},5224:(t,e,n)=>{"use strict";n.d(e,{x:()=>o});var i=n(568),r=n(6496);function o(){return{headimgurl:"https://media.choiceform.com/fresh_little_girl.jpg",nickname:(0,r.GS)(i.CW.reward.weChatName)}}},3552:(t,e,n)=>{"use strict";n.d(e,{q:()=>a});var i=n(8856);const r=["beforecopy","beforepaste","beforecut","copy","paste","cut","animationstart","animationend","animationiteration","transitionend","scroll","wheel","blur","click","dblclick","focus","focusin","focusout","input","keypress","keyup","keydown","select","change","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","gotpointercapture","lostpointercapture","pointercancel","pointerdown","pointerenter","pointerleave","pointermove","pointerout","pointerover","pointerup","touchcancel","touchend","touchmove","touchstart","unload","cancel","close","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","loadedmetadata","loadeddata","durationchange","timeupdate","play","pause","ratechange","volumechange","suspend","emptied","stalled","invalid","reset","submit","invalid","reset","submit","show","contextmenu","drag","dragend","dragenter","dragexit","dragleave","dragover","dragstart","drop","webglcontextcreationerror","webglcontextlost","webglcontextrestored","error","load","loadend","loadstart","progress"];function o(t){if("SCRIPT"===t.tagName)t.parentElement&&t.parentElement.removeChild(t);else{r.forEach((e=>{t.removeAttribute("on"+e)}));for(let e=t.children.length-1;e>=0;e--){const n=t.children[e];1===n.nodeType&&o(n)}}}function a(t){if(!t||t.includes("data-safe-html="))return t;const e=(0,i.W4)().system.newDiv();return e.innerHTML=t,o(e),e.innerHTML}},5876:(t,e,n)=>{"use strict";function i(t){const e={limitType:1,limitSrc:0,limitStart:"0",limitEnd:"0",limitRnd:"-1",phParams:[],disorder:!1,outOfResult:!1,imgHeight:0,imgWidth:0,ignoreCase:!1};if(t){const n=JSON.parse(t);return{...e,...n}}return e}n.d(e,{Qr:()=>r,_m:()=>o,cF:()=>i,mE:()=>a});const r=t=>{if(!t)return!1;const{limitSrc:e,limitType:n,limitStart:i,limitEnd:r}=t;return!(!e||!n||1==n&&"0"==i&&"0"==r)};function o(t){const e=function(t){if(!t)return t;const e={};return t.phParams&&t.phParams.length>0&&(e.phParams=t.phParams),r(t)&&(e.limitSrc=t.limitSrc,e.limitType=t.limitType,e.limitStart=t.limitStart,e.limitEnd=t.limitEnd),"-1"!=t.limitRnd&&(e.limitRnd=t.limitRnd),t.disorder&&(e.disorder=t.disorder),t.outOfResult&&(e.outOfResult=t.outOfResult),Number(t.imgHeight)&&(e.imgHeight=t.imgHeight),Number(t.imgWidth)&&(e.imgWidth=t.imgWidth),0===Object.keys(e).length?void 0:e}(t);return e?JSON.stringify(e):""}function a(t){const e={};return t.forEach((t=>{e[t.name]=t.value})),e}},4072:(t,e,n)=>{"use strict";n.d(e,{Ij:()=>h,UJ:()=>u,WK:()=>p,YV:()=>c,ee:()=>g,kx:()=>m,sf:()=>d}),n(7768);var i=n(3001),r=n(3132),o=n(556),a=n(8348),s=n(8856);function c(t){d(t.imageList),function(t){let e="";t.forEach((t=>{t.name.includes("TO_GLOBAL")&&"var-html"===t.type&&(e+=(0,i.uO)(t.value).replace(/<style>/g,"").replace(/<\/style>/g,""))})),(0,s.W4)().ui.setGlobalStyle(e)}(t.variables),function(t){if(t){const e=l(t.allJson,null)+l(t.strJson,"var-string")+l(t.expJson,"var-expression")+l(t.reqJson,"var-request")+l(t.loopJson,"var-loop");(0,s.W4)().ui.setVarStyle(e,t)}}(t.varStyles)}function u(t){let e="";return t.bold&&(e+="font-weight: bold;"),t.italic&&(e+="font-style: italic;"),t.underline?e+="text-decoration: underline;":t.lineThrough&&(e+="text-decoration: line-through;"),t.color&&(e+="color: ".concat(t.color,";")),t.backgroundColor&&(e+="background-color: ".concat(t.backgroundColor,";")),t.fontSize&&(e+="font-size: ".concat(t.fontSize,";"),e+="line-height: 1.4;"),e}function l(t,e){if(!t)return"";let n=e?".var-light.".concat(e,":not([in-edist]) {"):".var-light:not([in-edist]) {";return n+=u(t),n+="}",n}function d(t){const e=async function(t){const{varInfo:e,pureText:n}=t;return n?this.fileName:h((0,r.k)(this.serverFileName),e.config,this.fileName)};t.forEach((t=>{t.getText=e,t.isMedia=!0,t.type="var-media"}))}function f(t){if(t)return{...t,identity:{baseId:t.uuid}}}function p(t="",e){return f(e.find((e=>e.name===t)))}function g(t="",e){return e.find((e=>(0,o.oj)(e.id,t)))}function m(t="",e){let n;const i=g(t,e.imageList);return i?n={...i,type:"var-media",uuid:i.id,name:""}:(n=e.variables.find((e=>(0,o.oj)(e.uuid,t))),n||(n=(0,a._O)(t))),f(n)}function h(t="",e={imgHeight:0,imgWidth:0},n="Image",i=!1){let r="##"+t;return i||(r+="?w=".concat(e.imgWidth||0,"&h=").concat(e.imgHeight||0),n&&(r+="#"+n)),r+"##"}},9348:(t,e,n)=>{"use strict";n.d(e,{A:()=>r,U:()=>o}),n(7768);const i=["nodeId","nodePartId","optFilterId","optId","optPartId","loopNodeId","loopRoundId","innerLoopNodeId","innerLoopRoundId"];function r(t){return t.baseId?t.baseId:i.map((e=>t[e]||"")).join(":").replace(/:+$/,"")}function o(t){if(!t.includes(":"))return{baseId:t};const e=t.split(":"),n={};return e.forEach(((t,e)=>{const r=i[e];n[r]=t})),n}},488:(t,e,n)=>{"use strict";n.d(e,{Ge:()=>R,IH:()=>S,Yl:()=>E,_i:()=>P,aL:()=>N,gQ:()=>w,im:()=>I,iq:()=>b,ms:()=>L,oB:()=>x,of:()=>C,sl:()=>O,uZ:()=>A,yE:()=>T,yI:()=>k}),n(9952);var i=n(3001),r=n(8832),o=n(556),a=n(6764),s=n(4708),c=n(8107),u=n(4072),l=n(8348),d=n(2352),f=n(8856),p=n(9348),g=n(5876),m=n(7192),h=n(9216),v=n(8260),y=n(5776),_=n(4316);function w(t){t=(0,m.Un)(t);const e=(0,f.W4)().system.newDiv();return e.innerHTML=t,e}function x(t="",e){return e||(e=w(t)),[...e.querySelectorAll(".var-tag")]}function b(t=""){return String(t).includes("var-tag")}function T(t){return(0,o.is)(t,1===t.nodeType)&&t.classList.contains("var-tag")}function S(t,e=""){const{loopStack:n,context:i}=t;let{renderList:r}=t;const a=(0,y.AF)(t,e);if(!a)return;const s=(0,o.So)(a,n);return i.node&&(r=[...r,i.node]),r.find((t=>s.startsWith(t.renderId)))}function E(t,e,n,i){if(!n)return null;const r=[n];i&&r.push(i);const a=(0,y.AF)(t,e);if(!a)return;const s=(0,o.DB)(a,r);return(0,h.QL)(t.renderList,s)}function I(t){return{name:t.innerText,identity:(0,p.U)(t.getAttribute("data-v-id")),config:(0,g.cF)(t.getAttribute("data-v-config")),inEdist:t.parentElement&&!!t.parentElement.getAttribute("edist")}}function k(t,e){return C(t,I(e))}function O(t){const{identity:e,config:n}=t;let i=(0,p.A)(e);if(!n)return i;if((0,g.Qr)(n)){const{limitSrc:t,limitType:e,limitStart:r,limitEnd:o}=n;i+="_".concat(t,"_").concat(e,":").concat(r,":").concat(o)}const{limitRnd:r,phParams:o}=n;if((0,d.oV)(r)||"-1"==r||(i+="_".concat(r)),!(0,d.oV)(o)){const t=(0,g.mE)(o);i+="_".concat(JSON.stringify(t))}return i}function C(t,e){const n=O(e={...e,config:e.config||{}}),{identity:i,config:r,name:o,inEdist:a}=e,d=(0,p.A)(i),f={identity:i,config:r},{baseId:g,nodeId:m,nodePartId:h,optFilterId:y,optId:_,optPartId:w,loopRoundId:x,innerLoopRoundId:b}=i;if(g){if(P(g)){const[t,e]=g.split("URL_PARAM=");return{...f,type:"var-string",uuid:"URL_PARAM=".concat(e)}}const e=(0,u.kx)(g,t);return e?{...f,...e,name:o,mapId:n,inEdist:a}:null}let T,I="";if(x){if((0,v.g)(i))return{...f,uuid:d,type:"var-string",name:o,inEdist:a};if(T=E(t,m,x,b),!T)return}else if(c.Ux(h))I=m;else if(T=S(t,m),!T)return;if(h){const t=(0,l._O)(h);return t&&{...f,uuid:d,name:o,node:T,nodePart:t,lookupLoopNodeId:I,isMedia:"var-media"===t.type,type:t.type,mapId:n,inEdist:a}}const k=(0,l._O)(w,T);if(!k)return;const C="var-media"===k.type;if(y){const t=(0,l._O)(y,T);if(!t)return;return{...f,inEdist:a,name:o,node:T,optionPart:k,optionFilter:t,uuid:d,lookupLoopNodeId:I,isMedia:C,type:k.type,mapId:n}}const L=(0,s.oz)((0,s.gr)(T),_);return L?{...f,inEdist:a,name:o,node:T,option:L,optionPart:k,uuid:d,lookupLoopNodeId:I,isMedia:C,type:k.type,mapId:n}:void 0}async function L(t,e){let n=[];const{varInfo:{optionFilter:s,option:c,config:u}}=t,l=await(0,i.W0)(u.limitRnd,t);if(0===l&&!e)return[];const d=t.specifiedOpt||c;n=d&&await(0,r.U)(t)?[d]:s&&s.filter?await s.filter(t):[];const f=e?e(n,l):(0,o.my)(n,l);return u.disorder?(0,a.sZ)(f):f}async function N(t){const{varInfo:{nodePart:e,optionPart:n,option:i}}=t,o=t.specifiedOpt||i;if(e&&e.getBool)return e.getBool(t);if(o)return await(0,r.U)(t)&&await n.getBool({...t,specifiedOpt:o});if(n.inBunch)return n.getBool(t);{const e=await L(t),i=[];for(const r of e){const e=await n.getText({...t,specifiedOpt:r});e&&i.push(e)}return i.length>0}}async function R(t){const{varInfo:{nodePart:e,optionPart:n,option:i}}=t,o=t.specifiedOpt||i,a=t.joinBy||" ";if(e&&e.getText)return e.getText(t);if(o)return await(0,r.U)(t)?n.getText({...t,specifiedOpt:o}):"";if(n.inBunch)return n.getText(t);{const e=await L(t),i=[];for(const r of e){const e=await n.getText({...t,specifiedOpt:r});(0,d.oV)(e)||i.push(e)}return i.join(a)}}async function A(t){const e={};e.text=await R(t);const n=await async function(t){const{varInfo:{nodePart:e,optionPart:n,option:i,isMedia:o}}=t;if(!o)return[];const a=t.specifiedOpt||i;if(e&&e.getImages)return e.getImages(t);if(a)return await(0,r.U)(t)&&n.getImages?n.getImages({...t,specifiedOpt:a}):[];{const e=await L(t),i=[];if(n.getImages)for(const r of e){const e=await n.getImages({...t,specifiedOpt:r});i.push(e[0])}return i}}(t);e.image=n[0];const i=await async function(t){const{varInfo:{optionPart:e,option:n}}=t;if(!e)return[];const i=t.specifiedOpt||n;if(i)return await(0,r.U)(t)&&e.getIcon?[e.getIcon({...t,specifiedOpt:i})]:[];{const n=await L(t);return e.getIcon?n.map((n=>e.getIcon({...t,specifiedOpt:n}))):[]}}(t),o=i[0];return o&&(e.normalIconUrl=o,e.activeIconUrl=(0,_.WG)(o)),e}function P(t){return t&&t.startsWith("URL_PARAM=")}},8107:(t,e,n)=>{"use strict";n.d(e,{M4:()=>f,MH:()=>g,Ux:()=>p,WG:()=>d,Wy:()=>l,nS:()=>b,yG:()=>x}),n(7768);var i=n(556),r=n(4072),o=n(8348),a=n(1880),s=n(2352),c=n(3568);let u;function l(t){const{loopStack:e}=t;return e?e[e.length-1]:null}function d(t,e,n){const{state:{loopStack:r}}=t,o=r&&r[e];if(o){const t=o.replacements[e];if(t)return(0,i.k5)(n(t))}return(0,i.k5)(n())}async function f(t,e){const{varInfo:{lookupLoopNodeId:n,config:r},state:o}=t,a=l(o);if(!a)return"";const s=g(n,a.replacements);return(0,i.k5)(e(s,r))}function p(t){return function(){if(!u){const t=(0,o.yy)();u=[],Object.keys(t).forEach((e=>{const{uuid:n,type:i}=t[e];"var-loop"===i&&u.push(n)}))}return u}().includes(t)}function g(t,e){return e.find((e=>(0,i.oj)(e.loopNodeId,t)))}function m(t,e={imgHeight:0,imgWidth:0}){if(t){const{imgHeight:n,imgWidth:i}=e;let r=void 0===t.refText?t.text:t.refText;return r.match(/^##.+##$/)&&0!==n&&0!==i&&(r=r.replace(/\?w=0&h=0/,"?w=".concat(i||0,"&h=").concat(n||0))),r}return""}function h(t,e){if(t&&t.image){const{image:n}=t;return(0,r.Ij)(n.url,e)}return""}function v(t){return t&&(0,s.Wo)(t.index+1)}function y(t){return t&&t.value}function _(t){return t&&(0,s.Wo)(t.number)}function w(t){return t&&t.label}function x(t){t.C_OL_TXT.getText=t=>d(t,0,m),t.C_OL_IDX.getText=t=>d(t,0,v),t.C_OL_NUM.getText=t=>d(t,0,_),t.C_OL_VAL.getText=t=>d(t,0,y),t.C_OL_LBL.getText=t=>d(t,0,w),t.C_IL_TXT.getText=t=>d(t,1,m),t.C_IL_IDX.getText=t=>d(t,1,v),t.C_IL_NUM.getText=t=>d(t,1,_),t.C_IL_VAL.getText=t=>d(t,1,y),t.C_IL_LBL.getText=t=>d(t,1,w),c.c.forEach((e=>{!function(e){const n=e.split("_")[1],i="C_IL_MAP_"+n,r=(t,n)=>d(t,n,(n=>{if(!n)return"";const{mapping:i}=n;return(0,a.C)(i,e,t)}));t["C_OL_MAP_"+n].getText=t=>r(t,0),t[i].getText=t=>r(t,1)}(e)}))}function b(t){t.LOOP.getText=t=>f(t,m),t.LOOP_IMG.getText=t=>f(t,h),t.LOOP_INDEX.getText=t=>f(t,v),t.LOOP_NUM.getText=t=>f(t,_),t.LOOP_VAL.getText=t=>f(t,y),t.LOOP_LBL.getText=t=>f(t,w),c.c.forEach((e=>{!function(e){const n=e.split("_")[1];t["LOOP_MAP_"+n].getText=t=>f(t,(n=>(0,a.C)(n.mapping,e,t)))}(e)}))}},8348:(t,e,n)=>{"use strict";n.d(e,{yy:()=>b,_O:()=>w,cK:()=>m}),n(7768),n(9952);var i=n(1880),r=n(4072),o=n(488),a=n(4708),s=n(2352),c=n(3568);var u=n(8832),l=n(6524),d=n(5876);var f=n(9572),p=n(8107),g=n(9200);const m="waiting fo extend";let h=!1;Math.avg=(...t)=>{let e=0;const n=t.length;for(let i=0;i<n;i++)e+=Number(t[i]);return e/n};const v={YEAR:{uuid:"YEAR",type:"var-string",getText:m},MONTH:{uuid:"MONTH",type:"var-string",getText:m},DATE:{uuid:"DATE",type:"var-string",getText:m},DAY:{uuid:"DAY",type:"var-string",getText:m},URL_KEY:{uuid:"URL_KEY",type:"var-string",getText:m},QUES_ID:{uuid:"QUES_ID",type:"var-string",getText:m},WX_ID:{uuid:"WX_ID",type:"var-string",getText:m},WX_SRC:{uuid:"WX_SRC",type:"var-string",getText:m},WX_NAME:{uuid:"WX_NAME",type:"var-string",getText:m},WX_UN_ID:{uuid:"WX_UN_ID",type:"var-string",getText:m},RES_ID:{uuid:"RES_ID",type:"var-string",getText:m},CLTR_ID:{uuid:"CLTR_ID",type:"var-string",getText:m},CLTR_CODE:{uuid:"CLTR_CODE",type:"var-string",getText:m},CLTR_NAME:{uuid:"CLTR_NAME",type:"var-string",getText:m},CURR:{uuid:"CLANG",type:"var-string",getText:m},LKTP:{uuid:"LKTP",type:"var-string",getText:m},START_TIME:{uuid:"S_T",type:"var-string",getText:m},COST_TIME:{uuid:"C_T",type:"var-string",getText:m},DVC_OSN:{uuid:"DVC_OSN",type:"var-string",getText:m},DVC_OSV:{uuid:"DVC_OSV",type:"var-string",getText:m},DVC_BRSN:{uuid:"DVC_BRSN",type:"var-string",getText:m},DVC_BRSV:{uuid:"DVC_BRSV",type:"var-string",getText:m},DVC_VDR:{uuid:"DVC_VDR",type:"var-string",getText:m},DVC_MDL:{uuid:"DVC_MDL",type:"var-string",getText:m},DVC_TYPE:{uuid:"DVC_TYPE",type:"var-string",category:"DEVICE",getText:m},RESULT:{uuid:"RESULT",type:"var-string",getText:m},C_OPT_TEXT:{uuid:"COTTX",type:"var-string",getText:m},C_OPT_NUM:{uuid:"CONUM",type:"var-string",getText:m},C_OPT_VAL:{uuid:"COVAL",type:"var-string",getText:m},C_OPT_LBL:{uuid:"COLBL",type:"var-string",getText:m},C_OPT_IPT:{uuid:"COIPT",type:"var-string",category:"CTPT",getText:m},C_OPT_ASI:{uuid:"COASI",type:"var-string",category:"CTPT",getText:m},C_OL_TXT:{uuid:"COLTXT",type:"var-string",getText:m},C_OL_IDX:{uuid:"COLIDX",type:"var-string",getText:m},C_OL_VAL:{uuid:"COLVAL",type:"var-string",getText:m},C_OL_NUM:{uuid:"COLNUM",type:"var-string",getText:m},C_OL_LBL:{uuid:"COLLBL",type:"var-string",getText:m},C_IL_TXT:{uuid:"CILTXT",type:"var-string",getText:m},C_IL_IDX:{uuid:"CILIDX",type:"var-string",getText:m},C_IL_VAL:{uuid:"CILVAL",type:"var-string",getText:m},C_IL_NUM:{uuid:"CILNUM",type:"var-string",getText:m},C_IL_LBL:{uuid:"CILLBL",type:"var-string",getText:m},POSITION:{uuid:"_P_OS",type:"var-string",getText:m},FAIL_SKIP:{uuid:"L_FAIL_SKIP",type:"var-bool",getText:m,getBool:m},FAILED:{uuid:"L_FAILED",type:"var-bool",getText:m,getBool:m},SUCCEED:{uuid:"L_SUCCEED",type:"var-bool",getText:m,getBool:m},COUNTRY:{uuid:"_C_NTY",type:"var-string",getText:m},PROVINCE:{uuid:"_P_ROV",type:"var-string",getText:m},CITY:{uuid:"_C_ITY",type:"var-string",getText:m},DISTRICT:{uuid:"_D_TRT",type:"var-string",getText:m},QUES_IMAGE:{uuid:"QI",type:"var-media",getText:m,getImages:m},QUES_TEXT:{uuid:"QT",type:"var-string",getText:m},QUES_LABEL:{uuid:"QL",type:"var-string",getText:m},QUES_DESC:{uuid:"QD",type:"var-string",getText:m},QUES_NAME:{uuid:"QN",type:"var-string",getText:m},QUES_RUNTIME_NAME:{uuid:"QRTN",type:"var-string",getText:m},PHONE_NUMBER:{uuid:"PN",type:"var-string",getText:m},PASSWORD:{uuid:"PSW",type:"var-string",getText:m},USED_PHONE:{uuid:"UPN",type:"var-bool",getText:m,getBool:m},VALIDATE_FAILED:{uuid:"VF",type:"var-bool",getText:m,getBool:m},VALIDATE_FAIL_TIMES:{uuid:"VFT",type:"var-expression",getText:m,getBool:m},QUES_TIME:{uuid:"DRTN",type:"var-string",getText:m,getBool:m},QUES_RS:{uuid:"QRS",type:"var-string",getText:m},Q_TIME_OVER:{uuid:"QTOR",type:"var-bool",getText:m,getBool:m},Q_TIME_LESS:{uuid:"QTLS",type:"var-bool",getText:m,getBool:m},MATCHED_OPTS:{uuid:"MTO",type:"var-string",filter:m},UNMATCHED_OPTS:{uuid:"UMTO",type:"var-string",filter:m},MARKED_OPTS:{uuid:"MKO",type:"var-string",filter:m},UNMARKED_OPTS:{uuid:"UMKO",type:"var-string",filter:m},RANKED_OPTS:{uuid:"RKO",type:"var-string",filter:m},UNRANKED_OPTS:{uuid:"URKO",type:"var-string",filter:m},CHECKED_OPTS:{uuid:"CKO",type:"var-string",filter:m},UNCHECKED_OPTS:{uuid:"UCKO",type:"var-string",filter:m},INPUTTED_OPTS:{uuid:"INO",type:"var-string",filter:m},UN_INPUTTED_OPTS:{uuid:"UINO",type:"var-string",filter:m},ALL_OPTS:{uuid:"ALO",type:"var-string",filter:m},SPECIFIED_OPT:{uuid:"SPO",type:"var-string"},OPT_TEXT:{uuid:"OTXX",type:"var-string",getText:m},OPT_TEXT_X:{uuid:"OTXY",type:"var-string",getText:m},OPT_TEXT_Y:{uuid:"OTX",type:"var-string",getText:m},OPT_NUMBER:{uuid:"ONM",type:"var-string",getText:m},OPT_SELECTED:{uuid:"OSL",type:"var-bool",getBool:m,getText:m},OPT_NUMBER_X:{uuid:"ONMX",type:"var-string",getText:m},OPT_NUMBER_Y:{uuid:"ONMY",type:"var-string",getText:m},OPT_IMAGE:{uuid:"OMG",type:"var-media",getText:m,getImages:m},OPT_ICON:{uuid:"OIC",type:"var-string",getText:m,getIcon:m},OPT_MARK:{uuid:"OMA",type:"var-string",getText:m},OPT_RANK:{uuid:"ORA",type:"var-string",getText:m},OPT_INPUT:{uuid:"OIN",type:"var-string",getText:m},OPT_LABEL:{uuid:"OLB",type:"var-string",getText:m},OPT_GROUP_TITLE:{uuid:"OPT_GROUP_TITLE",type:"var-string",getText:m},OPT_COUNT:{uuid:"OCT",type:"var-expression",inBunch:!0,getText:m},OPT_SAME_MARK:{uuid:"OSM",type:"var-bool",inBunch:!0,getBool:m,getText:m},OPT_DIFF_MARK:{uuid:"ODM",type:"var-bool",inBunch:!0,getBool:m,getText:m},OPT_SAME_VALUE:{uuid:"OSV",type:"var-bool",inBunch:!0,getBool:m,getText:m},OPT_DIFF_VALUE:{uuid:"ODV",type:"var-bool",inBunch:!0,getBool:m,getText:m},EXP_PLUS:{uuid:"EP",type:"var-expression",expOpr:"+"},EXP_MINUS:{uuid:"EM",type:"var-expression",expOpr:"-"},EXP_MULTIPLY:{uuid:"EPL",type:"var-expression",expOpr:"*"},EXP_DIVIDE:{uuid:"ED",type:"var-expression",expOpr:"/"},EXP_SUM:{uuid:"ES",type:"var-expression",expOpr:"(",split:"+"},EXP_MIN:{uuid:"EMN",type:"var-expression",expOpr:"Math.min(",split:","},EXP_MAX:{uuid:"EMX",type:"var-expression",expOpr:"Math.max(",split:","},EXP_AVG:{uuid:"EAG",type:"var-expression",expOpr:"Math.avg(",split:","},EXP_RD:{uuid:"ERD",type:"var-expression",expOpr:"Math.round(",split:"+"},EXP_FLR:{uuid:"EFLR",type:"var-expression",expOpr:"Math.floor(",split:"+"},EXP_CL:{uuid:"ECL",type:"var-expression",expOpr:"Math.ceil(",split:"+"},EXP_OP:{uuid:"EOP",type:"var-expression"},EXP_CP:{uuid:"ECP",type:"var-expression"},BOOL_AND:{uuid:"BAND",type:"var-bool",blOpr:"&&"},BOOL_OR:{uuid:"BOR",type:"var-bool",blOpr:"||"},BOOL_NOT:{uuid:"BNOT",type:"var-bool",blOpr:"!"},BOOL_OP:{uuid:"BOP",type:"var-bool",blOpr:"("},BOOL_CP:{uuid:"BCP",type:"var-bool",blOpr:")"},LOOP:{uuid:"LP",type:"var-loop",getText:m,getImages:m},LOOP_IMG:{uuid:"LPIMG",type:"var-loop",getText:m,getImages:m},LOOP_INDEX:{uuid:"LPIDX",type:"var-loop",getText:m},LOOP_VAL:{uuid:"LPVAL",type:"var-loop",getText:m},LOOP_NUM:{uuid:"LPNUM",type:"var-loop",getText:m},LOOP_LBL:{uuid:"LPLBL",type:"var-loop",getText:m}};for(const t of g.c.langTable){const e="LANG_"+t.locale.toUpperCase(),n=e;v[e]={uuid:n,type:"var-string",getText:async()=>t.locale}}for(let t=2;t<21;t++){const e="URL_KEY_"+t;v[e]={uuid:e,type:"var-string",getText:m}}function y(t,e){const n=e.origin.optionMappingHeads;if(n){const e=n.find((e=>e.field==="field_"+t));if(e)return{type:"image"===e.type?"var-media":"var-string"}}return null}for(let t=1;t<7;t++)v["OPT_ASTV_"+t]={uuid:"OASTV_"+t,type:"var-string",getText:m},v["OPT_MAP_"+t]={uuid:"OM_"+t,type:"var-string",getText:m,getDynamicProps:e=>y(t,e)},v["C_OPT_MAP_"+t]={uuid:"COMAP"+t,type:"var-string",getText:m},v["C_OL_MAP_"+t]={uuid:"COLMAP"+t,type:"var-string",getText:m},v["C_IL_MAP_"+t]={uuid:"CILMAP"+t,type:"var-string",getText:m},v["LOOP_MAP_"+t]={uuid:"LPMAP"+t,type:"var-loop",getText:m};const _=Object.keys(v);function w(t,e){for(const n of _)if(v[n].uuid===t){let t=v[n];if(t.getDynamicProps&&e){const n=t.getDynamicProps(e);n&&(t={...t,...n})}return t}}function x(){h||(function(){const t=[];_.forEach((e=>{if(!(v[e]instanceof Function)){if(t.indexOf(v[e].uuid)>0)throw new Error("error duplicated uuid in implicit var config: "+v[e].uuid);t.push(v[e].uuid)}}))}(),(0,i.M)(v),(0,p.nS)(v),(0,p.yG)(v),function(t){t.OPT_INPUT.getText=async t=>(0,a.Y5)(t.specifiedOpt,"value"),t.OPT_LABEL.getText=async t=>t.specifiedOpt.label||"",c.c.forEach((e=>{!function(e){const n=e.split("_")[1];t["OPT_MAP_"+n].getText=async t=>{const{specifiedOpt:n}=t,{mapping:r}=n;return(0,i.C)(r,e,t)}}(e),function(e){const n=e.split("_")[1];t["OPT_ASTV_"+n].getText=async t=>{const n=t.specifiedOpt.assistValue;return n&&n[e]||""}}(e)})),t.OPT_MARK.getText=t.OPT_INPUT.getText,t.OPT_TEXT.getText=async t=>{const e=t.specifiedOpt,n=(0,a.Ml)(e);if(n)return n;const{optionY:i,optionX:r}=e;return r?r.text+"_"+i.text:(0,a.Y5)(e,"text")},t.OPT_NUMBER.getText=async t=>(0,s.Wo)(t.specifiedOpt.number),t.OPT_RANK.getText=async t=>{const e=t.specifiedOpt.sortNo;return(0,s.Wo)(e)},t.OPT_TEXT_X.getText=async t=>t.specifiedOpt.optionX.text,t.OPT_TEXT_Y.getText=async t=>t.specifiedOpt.optionY.text,t.OPT_NUMBER_X.getText=async t=>{const e=t.specifiedOpt.optionX.number;return(0,s.Wo)(e)},t.OPT_NUMBER_Y.getText=async t=>{const e=t.specifiedOpt.optionY.number;return(0,s.Wo)(e)},t.OPT_IMAGE.getText=async t=>{const{varInfo:{config:e},specifiedOpt:n,pureText:i}=t,o=(0,a.Y5)(n,"image");return i?n.text:o?(0,r.Ij)(o.url,e,o.originName):""},t.OPT_ICON.getText=async t=>t.specifiedOpt.text,t.OPT_COUNT.getText=async t=>{const e=await(0,o.ms)(t);return(0,s.Wo)(e.length)},t.OPT_GROUP_TITLE.getText=async t=>{const{optionGroups:e,optionGroupsRelationship:n}=t.varInfo.node.origin;if(!e||!n)return"";const i=t.specifiedOpt.uuid;return function t(e,n){const[i,...r]=n,o=e.find((t=>t.uuid===i));if(o){const e=[o.groupTitle],{children:n}=o;if(n&&0!==n.length&&0!==r.length){const i=t(n||[],r);return[...e,...i]}return e}return[]}(e||[],n.optionsRelationship[i]).join("/")}}(v),function(t){async function e(t,e){const{varInfo:n,needOtherOpt:i}=t,r=n.node,o=(0,a.gr)(r),s=[];for(const n of o)!i&&n.isOtherOpt||e&&!e(n,r)||!await(0,u.U)({...t,specifiedOpt:n})||s.push(n);return s}t.MATCHED_OPTS.filter=t=>e(t,l.e2),t.RANKED_OPTS.filter=t.MATCHED_OPTS.filter,t.CHECKED_OPTS.filter=t.MATCHED_OPTS.filter,t.UNMATCHED_OPTS.filter=t=>e(t,l.gb),t.UNRANKED_OPTS.filter=t.UNMATCHED_OPTS.filter,t.UNCHECKED_OPTS.filter=t.UNMATCHED_OPTS.filter,t.MARKED_OPTS.filter=t=>e(t,l.yu),t.INPUTTED_OPTS.filter=t.MARKED_OPTS.filter,t.UNMARKED_OPTS.filter=t=>e(t,l.sb),t.UN_INPUTTED_OPTS.filter=t.UNMARKED_OPTS.filter,t.ALL_OPTS.filter=async t=>(0,d.Qr)(t.varInfo.config)?e(t):t.varInfo.node.options}(v),function(t,e){!function(t,e){e.forEach((e=>{const n=t[e];"function"==typeof n.getText&&(n.getBool=async function(t){const e=await this.getText(t);return!(0,s.oV)(e)})})),t.OPT_COUNT.getBool=async function(t){return!!await this.getText(t)}}(t,e),t.OPT_SELECTED.getBool=async t=>t.specifiedOpt.selected,t.OPT_SAME_MARK.getBool=async t=>{const e=await(0,o.ms)(t);return function(t,e){if((0,s.oV)(e))return!0;(e<0||e>t.length)&&(e=t.length);const n={};for(const i of t){const t=i.value;if(n[t]?n[t]+=1:n[t]=1,n[t]>=e)return!0}return!1}(e,e.length)},t.OPT_DIFF_MARK.getBool=async t=>{const e=await(0,o.ms)(t);return function(t,e){if((0,s.oV)(e))return!0;(e<0||e>t.length)&&(e=t.length);const n={};for(const i of t)if(n[i.value]=!0,Object.keys(n).length>=e)return!0;return!1}(e,e.length)},t.OPT_SAME_VALUE.getBool=t.OPT_SAME_MARK.getBool,t.OPT_DIFF_VALUE.getBool=t.OPT_DIFF_MARK.getBool,t.FAIL_SKIP.getBool=async t=>!!t.varInfo.node.failedSkipActivated,t.FAILED.getBool=async t=>!!t.varInfo.node.failed,t.SUCCEED.getBool=async t=>!!t.varInfo.node.succeed,t.USED_PHONE.getBool=async t=>!!t.state.phoneUsed,t.VALIDATE_FAILED.getBool=async t=>t.varInfo.node.validateFailed,t.Q_TIME_OVER.getBool=async t=>{const{origin:{maxAnswerTime:e},costTime:n}=t.varInfo.node,i=1e3*e;return!!(i&&n&&i<n)},t.Q_TIME_LESS.getBool=async t=>{const{origin:{minAnswerTime:e},costTime:n}=t.varInfo.node,i=1e3*e;return!!(i&&n&&i>n)},function(t,e){function n(t){return this.getBool(t)}e.forEach((e=>{const i=t[e];"function"==typeof i.getBool&&i.getText===m&&(i.getText=n)}))}(t,e)}(v,_),(0,f.wi)(v),function(){let t="";if(_.forEach((e=>{const n=v[e];if(["filter","getText","getImages","getIcon","getBool"].forEach((i=>{n[i]===m&&(t+=e+"=>"+i+"\n")})),n.getText){const t=n.getText;n.getText=async function(...e){const{keepWrap:n}=e[0],i=t.apply(this,e),r=await i;if("string"==typeof r&&!n){const t=/<span var-name=".+?" class="var-light var-(\w+?)">(.+?)<\/span>/g;return(0,s.Wo)(r).replace(t,((t,e,n)=>"media"===e?t:n))}return(0,s.oV)(r)?"":r}}})),t)throw new Error("lack var implement for:\n"+t)}(),h=!0)}function b(){return h||x(),v}x()},9572:(t,e,n)=>{"use strict";n.d(e,{cT:()=>l,wi:()=>f,yH:()=>d}),n(7768),n(9952);var i=n(8107),r=n(488),o=n(4072),a=n(3132),s=n(4708),c=n(3568);function u(t){return{type:"image",width:t.originWidth,height:t.originHeight,name:t.serverFileName,id:t.id,originName:t.fileName}}async function l(t,e){if(!e)return[];const n=(0,o.ee)(e.uuid,t.imageList);if(n)return[(0,a.a)(u(n))];if(e.value){let n=[];const i=(0,r.oB)(e.value);for(const e of i){const i=await l(t,(0,r.yI)(t,e));n=n.concat(i)}return n}{const{option:n,optionPart:i}=e,o=e.node;return o?i?(await(0,r.ms)({state:t,varInfo:e,specifiedOpt:n})).map((t=>(0,s.Y5)(t,"image"))):o.images||[]:[]}}function d(t=""){return t&&"string"==typeof t?t.replace(/##((?:http|data:image|\/).+?)##/g,"$1"):t}function f(t){async function e(t,e){const n=t&&t[e]||"";return"string"==typeof n?[]:[n]}t.QUES_IMAGE.getImages=async t=>{var e;const n=null===(e=t.varInfo)||void 0===e?void 0:e.node;return(null==n?void 0:n.images)||[]},t.OPT_IMAGE.getImages=async t=>{const{varInfo:{option:e},specifiedOpt:n}=t,i=n||e;return[(0,s.Y5)(i,"image")]},t.LOOP.getImages=t.LOOP_IMG.getImages=async t=>{const{state:e,varInfo:{lookupLoopNodeId:n}}=t,r=i.Wy(e);if(!r)return[];const o=i.MH(n,r.replacements);return o&&o.image?[o.image]:[]},t.OPT_ICON.getIcon=t=>t.specifiedOpt.normalIconUrl||"",c.c.forEach((n=>{!function(n){const i=n.split("_")[1];t["OPT_MAP_"+i].getImages=t=>{const{specifiedOpt:i}=t,{mapping:r}=i;return e(r,n)}}(n),function(n){const i=n.split("_")[1];t["C_OPT_MAP_"+i].getImages=async t=>{const{state:{context:{option:i}}}=t;if(!i)return[];const{mapping:r}=i;return e(r,n)}}(n),function(n){const r=n.split("_")[1],o="C_IL_MAP_"+r;function a(t,r){return i.WG(t,r,(t=>{if(!t)return[];const{mapping:i}=t;return e(i,n)}))}t["C_OL_MAP_"+r].getImages=t=>a(t,0),t[o].getImages=t=>a(t,1)}(n),function(n){const r=n.split("_")[1];t["LOOP_MAP_"+r].getImages=t=>i.M4(t,(t=>e(t.mapping,n)))}(n)}))}},1880:(t,e,n)=>{"use strict";n.d(e,{C:()=>p,M:()=>g}),n(1088);var i=n(5684),r=n(4072),o=n(8856),a=n(4708),s=n(2352),c=n(7404),u=n(3568),l=n(1884),d=n(1820);const f="unknown";function p(t,e,n){const i=t&&t[e]||"";if("string"==typeof i)return i;{const{pureText:t,varInfo:{config:e},specifiedOpt:o}=n;return t?o?o.text:"":(0,r.Ij)(i.url,e,i.originName)}}function g(t){function e(e){t["URL_KEY_"+e].getText=async()=>{const t="key"+e;return(0,c.uK)()[t]}}t.URL_KEY.getText=async()=>{const t=(0,c.uK)();return t.key1||t.key};for(let t=2;t<=20;t++)e(t);function n(t){const{varInfo:e,state:n}=t;let i;const r=e.node;return r&&(i=r.position&&r.position.address),i||(i=n.address),i}t.YEAR.getText=async()=>(new Date).getFullYear().toString(),t.MONTH.getText=async()=>{const t=(new Date).getMonth()+1;return(0,l.Kk)(t)},t.DATE.getText=async()=>{const t=(new Date).getDate();return(0,l.Kk)(t)},t.DAY.getText=async t=>{const e=(new Date).getDay();return"zh_cn"===t.state.language?["星期日","星期一","星期二","星期三","星期四","星期五","星期六"][e]:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][e]},t.QUES_ID.getText=async t=>t.state.surveyId,t.WX_ID.getText=async t=>{const{state:{userInfo:e}}=t;return e&&e.openid},t.WX_SRC.getText=async()=>(0,o.W4)().name,t.WX_NAME.getText=async t=>{const{state:{userInfo:e}}=t;return e&&e.nickname},t.WX_UN_ID.getText=async t=>{const{state:{userInfo:e}}=t;return e&&e.unionid},t.RES_ID.getText=async t=>{const{state:e}=t;return e.transactionID},t.CLTR_ID.getText=async()=>"",t.CLTR_CODE.getText=async()=>(0,o.E3)().preview?"":(0,o.E3)().sid,t.CLTR_NAME.getText=async t=>{if((0,o.E3)().preview)return"";const{state:{parsedPayload:e}}=t;if(e){const{surveyMeta:{collector:{name:t}}}=e;return t}return""},t.START_TIME.getText=async t=>{const e=t.state.startTime;return(0,s.Wo)(e)},t.COST_TIME.getText=async t=>{const e=(new Date).getTime()-t.state.startTime;return(0,s.Wo)(e)},t.RESULT.getText=async t=>{const{state:e}=t,n=await(0,i.gp)(e,"all",void 0,!0);return JSON.stringify(n)},t.CURR.getText=async t=>t.state.language,t.LKTP.getText=async()=>(0,d.i)(),t.C_OPT_TEXT.getText=async t=>{const{state:{context:{option:e}}}=t;return e?(0,a.Y5)(e,"text"):""},t.C_OPT_NUM.getText=async t=>{const{state:{context:{option:e}}}=t,n=e&&e.number;return(0,s.Wo)(n)},t.C_OPT_VAL.getText=async t=>{const{state:{context:{option:e}}}=t;return e?(0,a.Y5)(e,"value"):""},t.C_OPT_LBL.getText=async t=>{const{state:{context:{option:e}}}=t;return e&&e.label||""},t.C_OPT_IPT.getText=async t=>{const{state:{context:{option:e}}}=t;return e?"<input data-iptc-holder='".concat(e.renderId,"' hidden='true' />"):""},t.C_OPT_ASI.getText=async t=>{const{state:{context:{option:e}}}=t;return e?"<input data-asic-holder='".concat(e.renderId,"' hidden='true' />"):""},u.c.forEach((e=>{!function(e){const n=e.split("_")[1];t["C_OPT_MAP_"+n].getText=async t=>{const{state:{context:{option:n}}}=t;if(!n)return"";const{mapping:i}=n;return p(i,e,t)}}(e)})),t.POSITION.getText=async t=>{const{state:{point:e}}=t;return e?e.lat+","+e.lng:""},t.COUNTRY.getText=async t=>{const e=n(t);return e&&e.country},t.PROVINCE.getText=async t=>{const e=n(t);return e&&e.province},t.CITY.getText=async t=>{const e=n(t);return e&&e.city},t.DISTRICT.getText=async t=>{const e=n(t);return e&&e.district},t.QUES_IMAGE.getText=async t=>{const{varInfo:e,pureText:n}=t,i=e.node;return n?i.images.reduce(((t,e)=>t+" "+e.originName),""):i.images.reduce(((t,n)=>t+(0,r.Ij)(n.url,e.config,n.originName)),"")},t.QUES_DESC.getText=async t=>t.varInfo.node.description,t.QUES_LABEL.getText=async t=>t.varInfo.node.origin.label||"",t.QUES_TEXT.getText=async t=>t.varInfo.node.title,t.QUES_NAME.getText=async t=>t.varInfo.node.nodeName,t.QUES_RUNTIME_NAME.getText=async t=>t.varInfo.node.runtimeNodeName,t.PHONE_NUMBER.getText=async t=>t.varInfo.node.phoneNumber,t.PASSWORD.getText=async t=>t.varInfo.node.code,t.QUES_TIME.getText=async t=>(0,s.Wo)(t.varInfo.node.costTime),t.QUES_RS.getText=async t=>JSON.stringify((0,i.cA)(t.varInfo.node)),t.VALIDATE_FAIL_TIMES.getText=async t=>t.varInfo.node.validateFailTimes+"",t.DVC_BRSN.getText=async()=>(0,o.W4)().system.device.browser.name||f,t.DVC_BRSV.getText=async()=>(0,o.W4)().system.device.browser.version||f,t.DVC_OSN.getText=async()=>(0,o.W4)().system.device.os.name||f,t.DVC_OSV.getText=async()=>(0,o.W4)().system.device.os.version||f,t.DVC_VDR.getText=async()=>(0,o.W4)().system.device.device.vendor||f,t.DVC_MDL.getText=async()=>(0,o.W4)().system.device.device.model||f,t.DVC_TYPE.getText=async()=>(0,o.W4)().system.device.device.type||f}},6524:(t,e,n)=>{"use strict";n.d(e,{KE:()=>f,e2:()=>a,gb:()=>s,sb:()=>u,yu:()=>c}),n(5960),n(7768);var i=n(8348),r=n(2352),o=n(984);function a(t){return t.selected}function s(t){return!t.selected}function c(t,e){return(0,o.QX)(t,e)}function u(t,e){return!(0,o.QX)(t,e)}const l=(t,e,n,i=!1)=>{if((0,r.oV)(e[n]))return NaN;const o={};t.forEach((t=>{let e=(t[n]+"").replace(/(\s| )/g,"");const i=parseFloat(e);isNaN(i)||(e=i),(0,r.oV)(e)||(o[e]?o[e].push(t):o[e]=[t])}));const a=Object.keys(o).sort(((t,e)=>{const n=Number(t),r=Number(e);return isNaN(n)||isNaN(r)?i?t>e?1:-1:t<e?1:-1:i?n>r?1:-1:n<r?1:-1}));for(let t=0;t<a.length;t++)if(o[a[t]].includes(e))return t+1;return NaN},d={};function f(t,e,n){const r=d[e];return r?r(function(t){let e=null;const{varInfo:n}=t,r=n.node,o=n.optionFilter,{selectIds:l,unselectIds:d,inputIds:f,uninputIds:p}=function(){const t=(0,i.yy)();return{selectIds:[t.CHECKED_OPTS.uuid,t.RANKED_OPTS.uuid,t.MATCHED_OPTS.uuid],unselectIds:[t.UNCHECKED_OPTS.uuid,t.UNRANKED_OPTS.uuid,t.UNMATCHED_OPTS.uuid],inputIds:[t.INPUTTED_OPTS.uuid,t.MARKED_OPTS.uuid],uninputIds:[t.UN_INPUTTED_OPTS.uuid,t.UNMARKED_OPTS.uuid]}}();return o&&(l.includes(o.uuid)?e=a:d.includes(o.uuid)?e=s:f.includes(o.uuid)?e=c:p.includes(o.uuid)&&(e=u)),e?r.options.filter((t=>e(t,r))):r.options}(n),t):NaN}d[1]=(t,e)=>e.number,d[14]=(t,e)=>l(t,e,"number",!0),d[15]=(t,e)=>l(t,e,"number",!1),d[2]=(t,e)=>e.text,d[12]=(t,e)=>l(t,e,"text",!0),d[13]=(t,e)=>l(t,e,"text",!1),d[3]=(t,e)=>e.value,d[4]=(t,e)=>l(t,e,"value",!0),d[5]=(t,e)=>l(t,e,"value",!1),d[6]=(t,e)=>e.sortNo,d[7]=(t,e)=>l(t,e,"sortNo",!0),d[8]=(t,e)=>l(t,e,"sortNo",!1),d[9]=(t,e)=>e.value,d[10]=(t,e)=>l(t,e,"value",!0),d[11]=(t,e)=>l(t,e,"value",!1)},1820:(t,e,n)=>{"use strict";n.d(e,{i:()=>r});var i=n(8856);function r(){return(0,i.E3)().realTimePreview?"realtime_preview":(0,i.E3)().preview?"preview":"formal"}},4060:(t,e,n)=>{"use strict";n.d(e,{IB:()=>l,uy:()=>m,wx:()=>v,yG:()=>_}),n(2048),n(9624),n(9952);var i=n(9216),r=n(556),o=n(3001),a=n(5684),s=n(488),c=n(2352);const u={1:(t,e,n)=>(e>n&&([e,n]=[n,e]),u[5](t,e,0)&&u[6](t,n,0)),2:(t,e,n)=>!u[1](t,e,n),11:(t,e)=>{const n=(0,c.Wo)(t).split(",").filter((t=>""!==t.trim())),i=(0,c.Wo)(e).split(",").filter((t=>""!==t.trim()));return n.some((t=>(t=t.trim(),i.some((e=>(e=e.trim(),t.includes(e)))))))},12:(t,e)=>!u[11](t,e,0),3:(t,e)=>(0,c.Wo)(t)===(0,c.Wo)(e),4:(t,e)=>!u[3](t,e,0),5:(t,e)=>{const n=(0,c.uI)(t),i=(0,c.uI)(e);return"number"==typeof n&&"number"==typeof i?n>i:(0,c.Wo)(n)>(0,c.Wo)(i)},6:(t,e)=>{const n=(0,c.uI)(t),i=(0,c.uI)(e);return"number"==typeof n&&"number"==typeof i?n<i:(0,c.Wo)(n)<(0,c.Wo)(i)},7:(t,e)=>!u[6](t,e,0),8:(t,e)=>!u[5](t,e,0),9:(t,e)=>{const n=(0,c.Wo)(t).split(",").filter((t=>""!==t.trim())),i=(0,c.Wo)(e).split(",").filter((t=>""!==t.trim()));return n.some((t=>(t=t.trim(),i.some((e=>(e=e.trim())===t)))))},10:(t,e)=>!u[9](t,e,0),13:t=>(0,c.Wo)(t).split(",").every((t=>""===t.trim())),14:(t,e)=>!u[13](t,e),15:(t,e)=>!u[16](t,e),16:(t,e)=>(0,c.Wo)(t).split(",").every((t=>{const e=t.trim();return"false"===e||""===e}))},l={request:t=>!!t,bool:t=>!!t,mark:(t,e)=>l.input(t,e),input:(t,e)=>{let n=t,i=e.markStart,r=e.markEnd;return e.ignoreCase&&("string"==typeof n&&(n=n.toLowerCase()),"string"==typeof i&&(i=i.toLowerCase()),"string"==typeof r&&(r=r.toLowerCase())),u[e.markId](n,i,r)}};function d(t,e){"string"==typeof t&&(t=(0,o.Qr)(t));const n=l[e.limitType],i=n?n(t,e):!!t;return{value:i,reason:i?void 0:{type:"value_unmatch",expected:e.markStart,expectedEnd:e.markEnd,limit:e.markId,actual:t}}}async function f(t,e){const{text:n}=t.relatedEmbed,i=m(t.markId)?",":void 0;return d(await(0,o.qQ)(n,{state:e,joinBy:i}),t)}async function p(t,e){const{relatedVarId:n}=t,i={identity:{baseId:n}},r=(0,s.of)(e,i);if(!r)return{value:!1,reason:{type:"var_not_found"}};const a=m(t.markId)?",":void 0;return d(await(0,o.Wi)({state:e,varInfo:r,joinBy:a}),t)}function g(t,e){const{relatedNodeId:n,relatedOptionId:o,limitType:s,markId:c}=e,u=function(t,e){const{loopStack:n,renderList:o}=t,{relatedNodeId:a}=e;let s,c=(0,r.So)(a,n);do{if(s=(0,i.QL)(o,c),s)break;c=c.substring(0,c.length-9)}while(c.length>=36);return s}(t,e);if(!u)return-2===c?{value:!0}:{value:!1,reason:{type:"node_not_found",nodeId:n}};const d=(0,a.cA)(u);if(!d||!d.items)return-2===c?{value:!0}:{value:!1,reason:{type:"answer_not_found",nodeId:n}};const f=d.items.find((t=>function(t,e){return(0,r.oj)(t.option_id,e)}(t,o))),p=l[s];if(p){const t=f?(0,a.wr)(f):"",i=p(t,e),r={value:i};return i||(r.reason={type:"node_unmatch",limit:c,actual:t,expected:e.markStart,expectedEnd:e.markEnd,nodeId:n,optionId:o}),r}{const t=-2===c?!f:!!f,e={value:t};return t||(e.reason={type:"node_unmatch",limit:c,nodeId:n,optionId:o,expected:-1===c,actual:2===c}),e}}function m(t){return 9===t||10===t||11===t||12===t||13===t||14===t||15===t||16===t}async function h(t,e){return{start:m(t.markId)?await(0,o.E3)(t.markStart,{state:e,joinBy:","}):await(0,o.wh)(t.markStart,{state:e}),end:await(0,o.wh)(t.markEnd,{state:e})}}async function v(t,e){const{options:n,reverse:i,logicType:r}=e,o=await y(t,n,r);return i?!o.value:o.value}async function y(t,e,n){if(!e)return{value:!0};const i=[];for(const n of e){const e={...n},{relatedVarId:r,relatedEmbed:o,isGroup:a,groupLogicList:s,groupLogicType:c}=e,{start:u,end:l}=await h(e,t);let d;e.markEnd=l,e.markStart=u,d=a?await y(t,s,c):o?await f(e,t):r?await p(e,t):g(t,e),i.push(d)}return{value:!i["and"===n?"some":"every"]((t=>!t.value)),details:i}}async function _(t,e){return"object"==typeof t&&null!==t?v(e,t):!!t}},8260:(t,e,n)=>{"use strict";n.d(e,{g:()=>d,u:()=>f}),n(9952);var i=n(5776),r=n(8856),o=n(556),a=n(5876),s=n(9348),c=n(488),u=n(3001);function l(t){return"LOOP_ALL_ROUND"===t}function d(t){return l(t.loopRoundId)||l(t.innerLoopRoundId)}async function f(t){const e=[],{state:n,varInfo:{identity:r}}=t,{loopNodeId:a,loopRoundId:s,innerLoopNodeId:u,innerLoopRoundId:d}=r,f=(0,i.AF)(n,a);if(!f)return"";const g=(0,c.IH)(n,f);if(!g)return"";let m=[];m=l(s)?g.varList.map((t=>(0,o.kt)(t.uuid))):[s];for(const r of m)if(u){let a=[];const s=(0,i.AF)(n,u);if(!s)continue;const f=(0,c.Yl)(n,s,r);if(!f)continue;a=l(d)?f.varList.map((t=>(0,o.kt)(t.uuid))):[d];for(const n of a){const i=await p(t,r,n);e.push(i)}}else{const n=await p(t,r);e.push(n)}return e.join(t.joinBy)}function p(t,e,n){const{varInfo:{config:i,identity:o}}=t,c=function(t,e){const n=(0,r.W4)().system.newSpan();return n.setAttribute("class","var-tag".concat(" ","var-string")),n.setAttribute("data-v-id",(0,s.A)(t.identity)),n.setAttribute("data-v-config",(0,a._m)(t.config)),n.outerHTML}({config:i,identity:{...o,loopRoundId:e,innerLoopRoundId:n}});return(0,u.qQ)(c,t)}},9376:(t,e,n)=>{"use strict";n.d(e,{Il:()=>w,Md:()=>h,Q9:()=>m,q0:()=>x}),n(5960),n(9952);var i=n(4708),r=n(3001),o=n(556),a=n(3080),s=n(6764),c=n(488),u=n(8348),l=n(8856),d=n(3132),f=n(3048),p=n(8107),g=n(9572);async function m(t,e){const{loop:n}=e,i=n&&n.node.nodeUuid,{image:r}=e.origin;if(!r)return[];const o=(0,u.yy)();if("image"===r.type)return[(0,d.a)(r)];if(i&&p.Ux(r.id))return await o.LOOP_IMG.getImages({state:t,varInfo:{node:e,lookupLoopNodeId:i}});{const e={identity:{baseId:r.id}};return await(0,g.cT)(t,(0,c.of)(t,e))}}async function h(t,e){const{origin:n,passRef:i}=e;if(i&&i.image)return i.image;const{parent:r,loop:o}=t,s=o&&o.node.nodeUuid,{image:l,text:f}=n;if(!l)return;const m=(0,u.yy)();let h;if("image"===l.type)h=(0,d.a)(l);else if(s&&p.Ux(l.id))h=(await m.LOOP_IMG.getImages({state:r,varInfo:{option:e,lookupLoopNodeId:s}}))[0];else{const t={identity:{baseId:l.id}};h=(await(0,g.cT)(r,(0,c.of)(r,t)))[0]}return!f&&h&&"variable"===l.type&&(0,a.KS)({node:t,optionId:e.uuid},{mapId:l.id},h.originName),h}function v(t){return!(!t||!(0,l.E3)().realTimePreview&&!(t.text||t.image||t.normalIconUrl))}async function y(t,e,n){const{optionPart:r,optionFilter:o}=e;let{option:a}=e;if(!r||r.inBunch)return{valid:!0};if(!a){const r=await o.filter({state:t,varInfo:e});a=(0,i.oz)(r,n.refOptId)}return{valid:!!a,srcOpt:a,srcRuntimeIndex:a?(0,i.wR)(e.node).indexOf(a):void 0}}function _(t,e){if(!e)return null;const n=(0,f.a)(t,e);for(const t of e){const e=(0,f.W)(t);if((0,o.oj)(e.uuid,n))return e}return null}async function w(t,e){const{origin:{mapping:n}}=t;if(t.mapping={field_1:"",field_2:"",field_3:"",field_4:"",field_5:"",field_6:""},e.context.option=t,n)for(const i of Object.keys(n)){const o=i,a=n[o];t.mapping[o]="string"==typeof a?await(0,r.qQ)(a,{state:e}):(0,d.a)(a)}t.assistValue={field_1:"",field_2:"",field_3:"",field_4:"",field_5:"",field_6:""},e.context.option=null}async function x(t,e,n,u=!1){let l=[],d=[],f=[],{refOptions:p,options:g,optionRefers:m}=e;if((0,o.is)(e,!!n)&&("xid"===n?(p=e.refOptionsX,g=e.optionsX,m=e.optionXRefers):"yid"===n&&(p=e.refOptionsY,g=e.optionsY,m=e.optionYRefers)),g&&p&&0!==p.length){l=[...g];const e={};for(const n of p){const o=_(n,m);if(!o)continue;const a=o.config||{},s=await(0,r.W0)(a.limitRnd,{state:t});if(0===s)continue;let l=null,d=null;const f=(0,c.of)(t,o);if(!f)continue;const{valid:p,srcOpt:g,srcRuntimeIndex:h}=await y(t,f,n);if(!p)continue;const w={state:t,varInfo:f,specifiedOpt:g,pureText:!u,keepWrap:!0};if(f.node&&(l=await(0,c.uZ)(w),g&&(d={uuid:n.uuid,value:g.value,optComment:g.optComment,image:(0,i.Y5)(g,"image"),number:g.number,text:g.text,label:g.label,mapping:g.mapping&&{...g.mapping},normalIconUrl:(0,i.Y5)(g,"normalIconUrl"),activeIconUrl:(0,i.Y5)(g,"activeIconUrl")})),v(l)){const t={srcRuntimeIndex:h,option:{...n,...l},passRef:d},i=o.uuid;e[i]?e[i].candidates.push(t):e[i]={candidates:[t],limitRnd:s,varInfo:f,disorder:a.disorder}}}Object.keys(e).forEach((t=>{const{limitRnd:n,candidates:i,varInfo:r,disorder:c}=e[t];let u=(0,o.my)(i,n);c?u=(0,s.sZ)(u):u.sort(((t,e)=>t.srcRuntimeIndex>e.srcRuntimeIndex?1:-1));const p=u.map((t=>t.option)),g=u.map((t=>t.passRef));f=f.concat((0,a.SW)(r,p)),l=l.concat(p),d=d.concat(g)}))}else l=g;return{options:l,refMaps:f,passRefs:d}}},3080:(t,e,n)=>{"use strict";n.d(e,{GO:()=>u,KS:()=>a,SW:()=>c,So:()=>l,oB:()=>s,oJ:()=>d}),n(9952);var i=n(3001),r=n(5684),o=n(4316);function a(t,e,n){const{node:i,optionId:r,exclusiveId:o}=t;let a=i.embedVarMaps;if(a||(a=i.embedVarMaps=[]),o){const t=a.find((t=>t.exclusiveId===o&&t.var_id===e.mapId));if(t)return void(t.value=n)}a.push({type:"embed",var_id:e.mapId,value:n,option_id:r&&r.toLowerCase(),exclusiveId:o})}function s(t){const{text:e,image:n,icon:i}=t;if(e)return e;if(n)return n.originName;if(i){const t=(0,o.sV)(i).match(/#[^#]+$/);return t&&t[0]||""}return""}function c(t,e){return e.map((e=>({option_id:e.uuid.toLowerCase(),value:s(e),type:"ref",var_id:t.uuid})))}function u(t,e){t.referVarMaps?t.referVarMaps=t.referVarMaps.concat(e):t.referVarMaps=e}function l(t,e){const n=t.casVarMaps=[];e.forEach((t=>{t.text&&n.push({type:"cascade",option_id:t.uuid.toLowerCase(),value:t.text})}))}function d(t,e){const{renderList:n}=t,o=[];return n.forEach((t=>{if(!(0,r.Ci)(t.checkMode,e))return;const{nodeUuid:n,loop:a}=t;let{embedVarMaps:s,referVarMaps:c,casVarMaps:u}=t;s=function(t){if(t){let e=[];const n=[];return t.forEach((t=>{delete t.exclusiveId,t.option_id?e.push(t):n.push(t)})),e=function(t){let e=[];const n={};return t.forEach((t=>{const{var_id:e,value:i}=t;let r=n[e];r?(r.values.includes(i)||r.values.push(i),r.maps.push(t)):r=n[e]={values:[i],maps:[t]}})),Object.keys(n).forEach((t=>{const i=n[t],{values:r,maps:o}=i;if(r.length>1)e=e.concat(o);else{const t=o[0];o.length>1&&(t.option_id="all"),e.push(t)}})),e}(e),n.concat(e)}return[]}(s),c=c||[],u=u||[];const l=s.concat(c,u);if(l.length>0){let t;l.forEach((t=>{t.value=(0,i.Qr)(t.value)})),a&&(t=a.replacements.map((t=>t.index))),o.push({node_id:n.toLowerCase(),loop_idxs:t,var_maps:l})}})),o}},8832:(t,e,n)=>{"use strict";n.d(e,{U:()=>u}),n(5960);var i=n(6524),r=n(4060),o=n(3001),a=n(2352),s=n(5876);const c={"-1":6,"-2":8,"-3":5,"-4":7};async function u(t){if(!(0,s.Qr)(t.varInfo.config))return!0;const{varInfo:{option:e}}=t,n=t.varInfo.node,u=t.specifiedOpt||e,{limitType:l,limitStart:d,limitEnd:f,limitSrc:p,ignoreCase:g}=function(t,e){if(!e)return{};const{limitType:n}=e;if(n>=0)return e;const i=c[n];let r;const o=t.options.filter((t=>t.selected)).map((t=>t.number)).sort();return r=5===i||7===i?(0,a.Wo)(o[o.length-1]||0):(0,a.Wo)(o[0]||0),{...e,limitType:i,limitStart:r}}(n,t.varInfo.config),m=(0,i.KE)(u,p,t),h=Number(l),v=(0,r.uy)(h)?await(0,o.E3)(d,{...t,joinBy:","}):await(0,o.wh)(d,t),y=await(0,o.wh)(f,t);return r.IB.input(m,{markId:h,markStart:v,markEnd:y,ignoreCase:g})}},6620:(t,e,n)=>{"use strict";n.d(e,{a8:()=>a,aI:()=>s}),n(9952);var i=n(3001),r=n(8856),o=n(1820);function a(t,e){return{_LANG_:e.language,_LINK_TYPE_:(0,o.i)(),_IS_INFER_:(0,r.W4)().dev.infer?"Y":"",...t}}async function s(t,e){const{params:n}=e,r={};for(const e of n){const{name:n,value:o}=e;n.startsWith("_url_")?r[n]=await(0,i.Oj)(o,{state:t}):n.startsWith("_html_")?r[n]=await(0,i.qQ)(o,{state:t},!0):r[n]=await(0,i.E3)(o,{state:t,joinBy:","},"URL")}return a(r,t)}},3001:(t,e,n)=>{"use strict";n.d(e,{gt:()=>W,Wi:()=>R,qQ:()=>I,W0:()=>P,E3:()=>O,wh:()=>A,Oj:()=>N,uO:()=>x,cb:()=>M,Qr:()=>C}),n(7768),n(9624),n(9952);var i=n(3684);function r(t){let e=!0;try{e=!!(0,i.y)(t,!0)}catch(e){console.info("error bool: ",t)}return e}function o(t,e,n){return function(t,e,n){return!!(e.length&&""!==n&&t&&t[t.length-1].match(/[\d)]/))}(t,e,n)&&(t+=e[e.length-1]),t+n}function a(t){return"("===t[t.length-1]&&(t+="0"),t+")"}var s=n(556),c=n(6072),u=n(3552),l=n(3080),d=n(488),f=n(9572),p=n(4072),g=n(8348),m=n(8856),h=n(2352),v=n(7404),y=n(5876),_=n(8260);function w(t){return t&&("var-html"===t.type||"var-request"===t.type||"var-loop"===t.type)}function x(t="",e=!1){if(t=(t=T(t,e)).replace(/</g,"<").replace(/>/g,">"),e)for(;t.includes("<")||t.includes(">");)t=t.replace(/</g,"<").replace(/>/g,">");return t}function b(t=""){return t.replace(/</g,"<").replace(/>/g,">")}function T(t="",e=!1){if(t=t.replace(/&/g,"&"),e)for(;t.includes("&");)t.replace(/&/g,"&");return t}function S(t="",e,n,i,r){let o='<span var-name="'+n+'" class="var-light '+e+'"'+(i?'in-edist="1">':">")+t+"</span>";return r&&(o=(0,s.Qh)(o)),o}function E(t=""){return t.match(/<(\w+).+?<\/\1>/)||(t="<span>".concat(t,"</span>")),[...(0,d.gQ)(t).childNodes]}async function I(t="",e,n=!1){t+="";const{state:i,innerJoinBy:r,varInfo:o,usage:a}=e,c=e.spaceRep||"";t=t.replace(/ /g,c);const u=e.joinBy||" ";if((0,d.iq)(t)){const c=(0,d.gQ)(t),f=(0,d.oB)(t,c);for(const t of f){const e=(0,d.yI)(i,t);let s="";if(e?s=await R({state:i,varInfo:e,joinBy:r||u}):(0,m.E3)().realTimePreview&&(s=S(t.innerHTML,"var-empty",t.innerText,!1,!0)),s=(0,h.oV)(s)?"":(0,h.Wo)(s).trim(),a){const n=e||{mapId:(0,d.sl)((0,d.im)(t))};(0,l.KS)(a,n,s)}const c=!o&&e&&s&&!n;let f=[];w(e)?(c&&(s=S(s,e.type,e.name,e.inEdist,!1)),f=s?E(s):[""]):(c&&(s=S(s,e.type,e.name,e.inEdist,!0)),t.innerText=s,f=[(0,m.W4)().system.newTextNode(t.innerHTML)]),k(t,f)}const p=function(t,e,n=""){if(w(e))return x(t.innerHTML);let i="";if(n){const r=[];for(const n of t.childNodes){let t="";if((0,s.is)(n,1===n.nodeType)){if("SPAN"===n.tagName&&!n.innerText&&0===n.childNodes.length)continue;t=n.outerHTML}else t=n.textContent.trim(),e||(t=b(t));t&&r.push(T(t))}i=r.join(n)}else i=T(t.innerHTML);return i=i.replace(/([\r\n]|^\s*|\s*$)/g,"").replace(/<br>/g,""),i=T((0,s.aO)(i)),i}(c,o,u);return L(p,e)}return t+""}function k(t,e){const n=t.parentElement;e.forEach((e=>{if("string"==typeof e){if(""!==e){const i=(0,m.W4)().system.newTextNode(e);n.insertBefore(i,t)}}else n.insertBefore(e,t)})),n.removeChild(t)}async function O(t="",e,n="WRAPPED_URL"){return L(C(await I(t,e,!0),n),e)}function C(t="",e="WRAPPED_URL"){if(!t||"string"!=typeof t)return t;t=t.replace(/<style>.*?<\/style>/g,"");let n=(0,d.gQ)(t).innerText;return n=(0,d.gQ)(n).innerText,"URL"===e&&(n=(0,f.yH)(n)),n.trim()}function L(t,e){return","===e.joinBy?(t+"").trim().replace(/(?:^\s*,|\s*,\s*,\s*|\s*,$)/,""):t}async function N(t="",e){let n=await I(t,{...e,innerJoinBy:","},!0);return n=C(x(n,!0)),n=n.replace(/####/g,"|").replace(/##/g,"").replace(/\s+/g,""),n=L(n,e),n}async function R(t){let e="";const{varInfo:n}=t;if((0,_.g)(n.identity))e=await(0,_.u)(t);else if(n.getText)e=await n.getText(t);else{const{identity:{baseId:l}}=n;if((0,d._i)(l)){const[t,n]=l.split("URL_PARAM=");e=(0,v.uK)()[n]}else n.nodePart||n.node?e=await(0,d.Ge)(t):"var-string"===n.type?e=await function(t){const{varInfo:e}=t;return e.getText?e.getText(t):I(e.value,t)}(t):"var-expression"===n.type?e=await async function(t){const e=(0,g.yy)(),{varInfo:n,state:r}=t;let s="";const c=(0,d.gQ)(n.value).childNodes,u=[];let l="";for(const t of c)if((0,d.yE)(t)){if(l){const t=parseFloat(l);if(isNaN(t))return t;s=o(s,u,t),l=""}const n=(0,d.yI)(r,t);if(n){const t=n.split;if(n.uuid===e.EXP_OP.uuid)s+="(";else if(n.uuid===e.EXP_CP.uuid)s=a(s);else if(t)s=o(s,u,n.expOpr),u.push(t);else if(n.expOpr)u.length&&(s=a(s),u.pop()),s=o(s,u,n.expOpr);else{const t=u[u.length-1];s=o(s,u,await R({state:r,varInfo:n,joinBy:t||"+"})||0)}}else l+="0"}else l+=t.textContent.replace(/\s/g,"");for(l&&(s=o(s,u,parseFloat(l)));u.length;)s=a(s),u.pop();return function(t){let e=0;try{e=(0,i.y)(t,!0)}catch(n){e=NaN,console.info("error exp: ",t)}return e}(s)}(t):"var-media"===n.type?e=await async function(t){const{varInfo:e,state:n}=t,{config:i}=e,r=t.joinBy||" ",o=(0,d.oB)(e.value),a=[];for(const t of o){const e=(0,d.yI)(n,t);if(!e)continue;const{imgHeight:o,imgWidth:s}=i;(o||s)&&(e.config={...e.config,imgHeight:o,imgWidth:s});const c=await R({state:n,varInfo:e,joinBy:r});(0,h.oV)(c)||a.push(c)}return a.join(r)}(t):"var-bool"===n.type?e=await async function(t){const{varInfo:e,state:n}=t;if(e.getBool)return e.getBool(t);const{nodePart:i,node:o}=e;if(i||o)return(0,d.aL)(t);const a=(0,d.oB)(e.value);let s="";for(const e of a){const i=(0,d.yI)(n,e);if(i)if(i.blOpr)s+=i.blOpr;else if(i.getBool)s+=r(await i.getBool(t))?"1":"0";else{const t=await R({state:n,varInfo:i});s+="string"==typeof t?"0"===t?t:t?"1":"0":r(t)?"1":"0"}}return r(s)}(t):"var-request"===n.type?e=await async function(t){const{varInfo:{request:e,config:n},state:i}=t;if(e){let t=null;if(n&&n.phParams){t={};for(const e of n.phParams)t[e.name]=await O(e.value,{state:i,joinBy:","},"URL")}const{result:r}=await(0,c.eU)(i,e,t,!1);return"string"!=typeof r?r:(0,u.q)(r)}return""}(t):"var-html"===n.type&&(e=await async function(t){const{varInfo:e,state:n}=t,i=e.getText?await e.getText(t):await I(e.value,t),r=(0,u.q)(x(i));return await function(t,e,n){const i=(0,y.mE)(t);return(0,s.eg)(e,/{{{?(.+?)}}}?/g,(async(t,e)=>{const r=e.indexOf("=");let o=e,a="";r>-1&&(o=e.substring(0,r),a=e.substring(r+1));const s=i[o]||"";let c="";return s&&(c=t.startsWith("{{{")?await I(s,{state:n}):await O(s,{state:n},"URL")),c||a}))}(e.config.phParams,r,n)}(t))}return(0,d.iq)(e)&&(e=await I(e,t)),e}async function A(t="",e,n=!1){if("number"==typeof t)return t;if((0,h.oV)(t))return n?NaN:"";const i=Number(t);if(isNaN(i)){const i=await O(t,e);if((0,h.oV)(i))return n?NaN:"";const r=Number(i);return isNaN(r)?n?NaN:i:r}return i}async function P(t="",e){if("number"==typeof t)return t;const n=await A(t,e,!0);return Number(n)}async function M(t="",e,n=!1){return(0,h.oV)(t)?"":(0,s.eg)((0,h.Wo)(t),/{{(.+?)}}/g,(async(t,i)=>{let r=await async function(t,e){if(t.match(/key(?:\d+)?/))return(0,v.uK)()[t];{const n=(0,p.WK)(t,e.variables);return n?C(await R({varInfo:n,state:e,joinBy:","})):""}}(i,e);return r&&n&&(r=encodeURIComponent(r)),"".concat(r||"")}))}function W(t=""){return t.replace(/(?:^<div>|<\/div>$)/g,"")}},3040:t=>{t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},6960:(t,e,n)=>{var i=n(6840);t.exports=function(t){if(!i(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},5775:(t,e,n)=>{var i=n(3280),r=n(5156),o=n(3984),a=i("unscopables"),s=Array.prototype;null==s[a]&&o.f(s,a,{configurable:!0,value:r(null)}),t.exports=function(t){s[a][t]=!0}},3696:(t,e,n)=>{"use strict";var i=n(8540).charAt;t.exports=function(t,e,n){return e+(n?i(t,e).length:1)}},5968:(t,e,n)=>{var i=n(6840);t.exports=function(t){if(!i(t))throw TypeError(String(t)+" is not an object");return t}},7299:(t,e,n)=>{var i=n(2576),r=n(1688),o=n(9924),a=function(t){return function(e,n,a){var s,c=i(e),u=r(c.length),l=o(a,u);if(t&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},1452:(t,e,n)=>{"use strict";var i=n(996);t.exports=function(t,e){var n=[][t];return!!n&&i((function(){n.call(null,e||function(){throw 1},1)}))}},4916:(t,e,n)=>{var i=n(5968);t.exports=function(t,e,n,r){try{return r?e(i(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&i(o.call(t)),e}}},5996:t=>{var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},6400:(t,e,n)=>{var i=n(8928),r=n(5996),o=n(3280)("toStringTag"),a="Arguments"==r(function(){return arguments}());t.exports=i?r:function(t){var e,n,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:a?r(e):"Object"==(i=r(e))&&"function"==typeof e.callee?"Arguments":i}},1528:(t,e,n)=>{"use strict";var i=n(5968),r=n(3040);t.exports=function(){for(var t=i(this),e=r(t.add),n=0,o=arguments.length;n<o;n++)e.call(t,arguments[n]);return t}},6792:(t,e,n)=>{"use strict";var i=n(5968),r=n(3040);t.exports=function(){for(var t,e=i(this),n=r(e.delete),o=!0,a=0,s=arguments.length;a<s;a++)t=n.call(e,arguments[a]),o=o&&t;return!!o}},8580:(t,e,n)=>{var i=n(3944),r=n(3412),o=n(2456),a=n(3984);t.exports=function(t,e){for(var n=r(e),s=a.f,c=o.f,u=0;u<n.length;u++){var l=n[u];i(t,l)||s(t,l,c(e,l))}}},9700:(t,e,n)=>{var i=n(996);t.exports=!i((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},3419:(t,e,n)=>{"use strict";var i=n(7963).IteratorPrototype,r=n(5156),o=n(4848),a=n(3532),s=n(476),c=function(){return this};t.exports=function(t,e,n){var u=e+" Iterator";return t.prototype=r(i,{next:o(1,n)}),a(t,u,!1,!0),s[u]=c,t}},784:(t,e,n)=>{var i=n(376),r=n(3984),o=n(4848);t.exports=i?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},4848:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},9436:(t,e,n)=>{"use strict";var i=n(2808),r=n(3419),o=n(5432),a=n(1640),s=n(3532),c=n(784),u=n(7376),l=n(3280),d=n(8820),f=n(476),p=n(7963),g=p.IteratorPrototype,m=p.BUGGY_SAFARI_ITERATORS,h=l("iterator"),v="keys",y="values",_="entries",w=function(){return this};t.exports=function(t,e,n,l,p,x,b){r(n,e,l);var T,S,E,I=function(t){if(t===p&&N)return N;if(!m&&t in C)return C[t];switch(t){case v:case y:case _:return function(){return new n(this,t)}}return function(){return new n(this)}},k=e+" Iterator",O=!1,C=t.prototype,L=C[h]||C["@@iterator"]||p&&C[p],N=!m&&L||I(p),R="Array"==e&&C.entries||L;if(R&&(T=o(R.call(new t)),g!==Object.prototype&&T.next&&(d||o(T)===g||(a?a(T,g):"function"!=typeof T[h]&&c(T,h,w)),s(T,k,!0,!0),d&&(f[k]=w))),p==y&&L&&L.name!==y&&(O=!0,N=function(){return L.call(this)}),d&&!b||C[h]===N||c(C,h,N),f[e]=N,p)if(S={values:I(y),keys:x?N:I(v),entries:I(_)},b)for(E in S)(m||O||!(E in C))&&u(C,E,S[E]);else i({target:e,proto:!0,forced:m||O},S);return S}},376:(t,e,n)=>{var i=n(996);t.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4111:(t,e,n)=>{var i=n(4280),r=n(6840),o=i.document,a=r(o)&&r(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},3060:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},2552:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2808:(t,e,n)=>{var i=n(4280),r=n(2456).f,o=n(784),a=n(7376),s=n(1016),c=n(8580),u=n(7724);t.exports=function(t,e){var n,l,d,f,p,g=t.target,m=t.global,h=t.stat;if(n=m?i:h?i[g]||s(g,{}):(i[g]||{}).prototype)for(l in e){if(f=e[l],d=t.noTargetGet?(p=r(n,l))&&p.value:n[l],!u(m?l:g+(h?".":"#")+l,t.forced)&&void 0!==d){if(typeof f==typeof d)continue;c(f,d)}(t.sham||d&&d.sham)&&o(f,"sham",!0),a(n,l,f,t)}}},996:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},8284:(t,e,n)=>{"use strict";n(4016);var i=n(7376),r=n(996),o=n(3280),a=n(2804),s=n(784),c=o("species"),u=!r((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),l="$0"==="a".replace(/./,"$0"),d=o("replace"),f=!!/./[d]&&""===/./[d]("a","$0"),p=!r((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));t.exports=function(t,e,n,d){var g=o(t),m=!r((function(){var e={};return e[g]=function(){return 7},7!=""[t](e)})),h=m&&!r((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[c]=function(){return n},n.flags="",n[g]=/./[g]),n.exec=function(){return e=!0,null},n[g](""),!e}));if(!m||!h||"replace"===t&&(!u||!l||f)||"split"===t&&!p){var v=/./[g],y=n(g,""[t],(function(t,e,n,i,r){return e.exec===a?m&&!r?{done:!0,value:v.call(e,n,i)}:{done:!0,value:t.call(n,e,i)}:{done:!1}}),{REPLACE_KEEPS_$0:l,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:f}),_=y[0],w=y[1];i(String.prototype,t,_),i(RegExp.prototype,g,2==e?function(t,e){return w.call(t,this,e)}:function(t){return w.call(t,this)})}d&&s(RegExp.prototype[g],"sham",!0)}},3596:(t,e,n)=>{var i=n(3040);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,r){return t.call(e,n,i,r)}}return function(){return t.apply(e,arguments)}}},3904:(t,e,n)=>{var i=n(2328),r=n(4280),o=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?o(i[t])||o(r[t]):i[t]&&i[t][e]||r[t]&&r[t][e]}},6648:(t,e,n)=>{var i=n(6400),r=n(476),o=n(3280)("iterator");t.exports=function(t){if(null!=t)return t[o]||t["@@iterator"]||r[i(t)]}},460:(t,e,n)=>{var i=n(5968),r=n(6648);t.exports=function(t){var e=r(t);if("function"!=typeof e)throw TypeError(String(t)+" is not iterable");return i(e.call(t))}},4516:(t,e,n)=>{var i=n(8820),r=n(460);t.exports=i?r:function(t){return Map.prototype.entries.call(t)}},4892:(t,e,n)=>{var i=n(8820),r=n(460);t.exports=i?r:function(t){return Set.prototype.values.call(t)}},4280:(t,e,n)=>{var i=function(t){return t&&t.Math==Math&&t};t.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof n.g&&n.g)||Function("return this")()},3944:t=>{var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},1976:t=>{t.exports={}},4128:(t,e,n)=>{var i=n(3904);t.exports=i("document","documentElement")},4544:(t,e,n)=>{var i=n(376),r=n(996),o=n(4111);t.exports=!i&&!r((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},8048:(t,e,n)=>{var i=n(996),r=n(5996),o="".split;t.exports=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==r(t)?o.call(t,""):Object(t)}:Object},196:(t,e,n)=>{var i=n(7536),r=Function.toString;"function"!=typeof i.inspectSource&&(i.inspectSource=function(t){return r.call(t)}),t.exports=i.inspectSource},8264:(t,e,n)=>{var i,r,o,a=n(4688),s=n(4280),c=n(6840),u=n(784),l=n(3944),d=n(7996),f=n(1976),p=s.WeakMap;if(a){var g=new p,m=g.get,h=g.has,v=g.set;i=function(t,e){return v.call(g,t,e),e},r=function(t){return m.call(g,t)||{}},o=function(t){return h.call(g,t)}}else{var y=d("state");f[y]=!0,i=function(t,e){return u(t,y,e),e},r=function(t){return l(t,y)?t[y]:{}},o=function(t){return l(t,y)}}t.exports={set:i,get:r,has:o,enforce:function(t){return o(t)?r(t):i(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=r(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},3976:(t,e,n)=>{var i=n(3280),r=n(476),o=i("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||a[o]===t)}},1444:(t,e,n)=>{var i=n(5996);t.exports=Array.isArray||function(t){return"Array"==i(t)}},7724:(t,e,n)=>{var i=n(996),r=/#|\.prototype\./,o=function(t,e){var n=s[a(t)];return n==u||n!=c&&("function"==typeof e?i(e):!!e)},a=o.normalize=function(t){return String(t).replace(r,".").toLowerCase()},s=o.data={},c=o.NATIVE="N",u=o.POLYFILL="P";t.exports=o},6840:t=>{t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},8820:t=>{t.exports=!1},596:(t,e,n)=>{var i=n(5968),r=n(3976),o=n(1688),a=n(3596),s=n(6648),c=n(4916),u=function(t,e){this.stopped=t,this.result=e};(t.exports=function(t,e,n,l,d){var f,p,g,m,h,v,y,_=a(e,n,l?2:1);if(d)f=t;else{if("function"!=typeof(p=s(t)))throw TypeError("Target is not iterable");if(r(p)){for(g=0,m=o(t.length);m>g;g++)if((h=l?_(i(y=t[g])[0],y[1]):_(t[g]))&&h instanceof u)return h;return new u(!1)}f=p.call(t)}for(v=f.next;!(y=v.call(f)).done;)if("object"==typeof(h=c(f,_,y.value,l))&&h&&h instanceof u)return h;return new u(!1)}).stop=function(t){return new u(!0,t)}},7963:(t,e,n)=>{"use strict";var i,r,o,a=n(5432),s=n(784),c=n(3944),u=n(3280),l=n(8820),d=u("iterator"),f=!1;[].keys&&("next"in(o=[].keys())?(r=a(a(o)))!==Object.prototype&&(i=r):f=!0),null==i&&(i={}),l||c(i,d)||s(i,d,(function(){return this})),t.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:f}},476:t=>{t.exports={}},5976:(t,e,n)=>{var i=n(996);t.exports=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())}))},4688:(t,e,n)=>{var i=n(4280),r=n(196),o=i.WeakMap;t.exports="function"==typeof o&&/native code/.test(r(o))},5156:(t,e,n)=>{var i,r=n(5968),o=n(6800),a=n(2552),s=n(1976),c=n(4128),u=n(4111),l=n(7996),d="prototype",f="script",p=l("IE_PROTO"),g=function(){},m=function(t){return"<"+f+">"+t+"</"+f+">"},h=function(){try{i=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e,n;h=i?function(t){t.write(m("")),t.close();var e=t.parentWindow.Object;return t=null,e}(i):(e=u("iframe"),n="java"+f+":",e.style.display="none",c.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(m("document.F=Object")),t.close(),t.F);for(var r=a.length;r--;)delete h[d][a[r]];return h()};s[p]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(g[d]=r(t),n=new g,g[d]=null,n[p]=t):n=h(),void 0===e?n:o(n,e)}},6800:(t,e,n)=>{var i=n(376),r=n(3984),o=n(5968),a=n(3008);t.exports=i?Object.defineProperties:function(t,e){o(t);for(var n,i=a(e),s=i.length,c=0;s>c;)r.f(t,n=i[c++],e[n]);return t}},3984:(t,e,n)=>{var i=n(376),r=n(4544),o=n(5968),a=n(5880),s=Object.defineProperty;e.f=i?s:function(t,e,n){if(o(t),e=a(e,!0),o(n),r)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},2456:(t,e,n)=>{var i=n(376),r=n(8),o=n(4848),a=n(2576),s=n(5880),c=n(3944),u=n(4544),l=Object.getOwnPropertyDescriptor;e.f=i?l:function(t,e){if(t=a(t),e=s(e,!0),u)try{return l(t,e)}catch(t){}if(c(t,e))return o(!r.f.call(t,e),t[e])}},220:(t,e,n)=>{var i=n(1216),r=n(2552).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,r)}},7928:(t,e)=>{e.f=Object.getOwnPropertySymbols},5432:(t,e,n)=>{var i=n(3944),r=n(8648),o=n(7996),a=n(9700),s=o("IE_PROTO"),c=Object.prototype;t.exports=a?Object.getPrototypeOf:function(t){return t=r(t),i(t,s)?t[s]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},1216:(t,e,n)=>{var i=n(3944),r=n(2576),o=n(7299).indexOf,a=n(1976);t.exports=function(t,e){var n,s=r(t),c=0,u=[];for(n in s)!i(a,n)&&i(s,n)&&u.push(n);for(;e.length>c;)i(s,n=e[c++])&&(~o(u,n)||u.push(n));return u}},3008:(t,e,n)=>{var i=n(1216),r=n(2552);t.exports=Object.keys||function(t){return i(t,r)}},8:(t,e)=>{"use strict";var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,r=i&&!n.call({1:2},1);e.f=r?function(t){var e=i(this,t);return!!e&&e.enumerable}:n},1640:(t,e,n)=>{var i=n(5968),r=n(6960);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,o){return i(n),r(o),e?t.call(n,o):n.__proto__=o,n}}():void 0)},3412:(t,e,n)=>{var i=n(3904),r=n(220),o=n(7928),a=n(5968);t.exports=i("Reflect","ownKeys")||function(t){var e=r.f(a(t)),n=o.f;return n?e.concat(n(t)):e}},2328:(t,e,n)=>{var i=n(4280);t.exports=i},7376:(t,e,n)=>{var i=n(4280),r=n(784),o=n(3944),a=n(1016),s=n(196),c=n(8264),u=c.get,l=c.enforce,d=String(String).split("String");(t.exports=function(t,e,n,s){var c=!!s&&!!s.unsafe,u=!!s&&!!s.enumerable,f=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof e||o(n,"name")||r(n,"name",e),l(n).source=d.join("string"==typeof e?e:"")),t!==i?(c?!f&&t[e]&&(u=!0):delete t[e],u?t[e]=n:r(t,e,n)):u?t[e]=n:a(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&u(this).source||s(this)}))},9792:(t,e,n)=>{var i=n(5996),r=n(2804);t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var o=n.call(t,e);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==i(t))throw TypeError("RegExp#exec called on incompatible receiver");return r.call(t,e)}},2804:(t,e,n)=>{"use strict";var i,r,o=n(736),a=n(8288),s=RegExp.prototype.exec,c=String.prototype.replace,u=s,l=(i=/a/,r=/b*/g,s.call(i,"a"),s.call(r,"a"),0!==i.lastIndex||0!==r.lastIndex),d=a.UNSUPPORTED_Y||a.BROKEN_CARET,f=void 0!==/()??/.exec("")[1];(l||f||d)&&(u=function(t){var e,n,i,r,a=this,u=d&&a.sticky,p=o.call(a),g=a.source,m=0,h=t;return u&&(-1===(p=p.replace("y","")).indexOf("g")&&(p+="g"),h=String(t).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==t[a.lastIndex-1])&&(g="(?: "+g+")",h=" "+h,m++),n=new RegExp("^(?:"+g+")",p)),f&&(n=new RegExp("^"+g+"$(?!\\s)",p)),l&&(e=a.lastIndex),i=s.call(u?n:a,h),u?i?(i.input=i.input.slice(m),i[0]=i[0].slice(m),i.index=a.lastIndex,a.lastIndex+=i[0].length):a.lastIndex=0:l&&i&&(a.lastIndex=a.global?i.index+i[0].length:e),f&&i&&i.length>1&&c.call(i[0],n,(function(){for(r=1;r<arguments.length-2;r++)void 0===arguments[r]&&(i[r]=void 0)})),i}),t.exports=u},736:(t,e,n)=>{"use strict";var i=n(5968);t.exports=function(){var t=i(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},8288:(t,e,n)=>{"use strict";var i=n(996);function r(t,e){return RegExp(t,e)}e.UNSUPPORTED_Y=i((function(){var t=r("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=i((function(){var t=r("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},1952:t=>{t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},4004:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},1016:(t,e,n)=>{var i=n(4280),r=n(784);t.exports=function(t,e){try{r(i,t,e)}catch(n){i[t]=e}return e}},3532:(t,e,n)=>{var i=n(3984).f,r=n(3944),o=n(3280)("toStringTag");t.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,o)&&i(t,o,{configurable:!0,value:e})}},7996:(t,e,n)=>{var i=n(9364),r=n(1732),o=i("keys");t.exports=function(t){return o[t]||(o[t]=r(t))}},7536:(t,e,n)=>{var i=n(4280),r=n(1016),o="__core-js_shared__",a=i[o]||r(o,{});t.exports=a},9364:(t,e,n)=>{var i=n(8820),r=n(7536);(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:i?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},592:(t,e,n)=>{var i=n(5968),r=n(3040),o=n(3280)("species");t.exports=function(t,e){var n,a=i(t).constructor;return void 0===a||null==(n=i(a)[o])?e:r(n)}},8540:(t,e,n)=>{var i=n(3509),r=n(1952),o=function(t){return function(e,n){var o,a,s=String(r(e)),c=i(n),u=s.length;return c<0||c>=u?t?"":void 0:(o=s.charCodeAt(c))<55296||o>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?t?s.charAt(c):o:t?s.slice(c,c+2):a-56320+(o-55296<<10)+65536}};t.exports={codeAt:o(!1),charAt:o(!0)}},9616:(t,e,n)=>{var i=n(996),r=n(2308);t.exports=function(t){return i((function(){return!!r[t]()||"
"!="
"[t]()||r[t].name!==t}))}},6452:(t,e,n)=>{var i=n(1952),r="["+n(2308)+"]",o=RegExp("^"+r+r+"*"),a=RegExp(r+r+"*$"),s=function(t){return function(e){var n=String(i(e));return 1&t&&(n=n.replace(o,"")),2&t&&(n=n.replace(a,"")),n}};t.exports={start:s(1),end:s(2),trim:s(3)}},9924:(t,e,n)=>{var i=n(3509),r=Math.max,o=Math.min;t.exports=function(t,e){var n=i(t);return n<0?r(n+e,0):o(n,e)}},2576:(t,e,n)=>{var i=n(8048),r=n(1952);t.exports=function(t){return i(r(t))}},3509:t=>{var e=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:e)(t)}},1688:(t,e,n)=>{var i=n(3509),r=Math.min;t.exports=function(t){return t>0?r(i(t),9007199254740991):0}},8648:(t,e,n)=>{var i=n(1952);t.exports=function(t){return Object(i(t))}},5880:(t,e,n)=>{var i=n(6840);t.exports=function(t,e){if(!i(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},8928:(t,e,n)=>{var i={};i[n(3280)("toStringTag")]="z",t.exports="[object z]"===String(i)},1732:t=>{var e=0,n=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++e+n).toString(36)}},5112:(t,e,n)=>{var i=n(5976);t.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3280:(t,e,n)=>{var i=n(4280),r=n(9364),o=n(3944),a=n(1732),s=n(5976),c=n(5112),u=r("wks"),l=i.Symbol,d=c?l:l&&l.withoutSetter||a;t.exports=function(t){return o(u,t)||(s&&o(l,t)?u[t]=l[t]:u[t]=d("Symbol."+t)),u[t]}},2308:t=>{t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},3224:(t,e,n)=>{"use strict";var i=n(2576),r=n(5775),o=n(476),a=n(8264),s=n(9436),c="Array Iterator",u=a.set,l=a.getterFor(c);t.exports=s(Array,"Array",(function(t,e){u(this,{type:c,target:i(t),index:0,kind:e})}),(function(){var t=l(this),e=t.target,n=t.kind,i=t.index++;return!e||i>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:i,done:!1}:"values"==n?{value:e[i],done:!1}:{value:[i,e[i]],done:!1}}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},2048:(t,e,n)=>{"use strict";var i=n(2808),r=n(1444),o=[].reverse,a=[1,2];i({target:"Array",proto:!0,forced:String(a)===String(a.reverse())},{reverse:function(){return r(this)&&(this.length=this.length),o.call(this)}})},5960:(t,e,n)=>{"use strict";var i=n(2808),r=n(3040),o=n(8648),a=n(996),s=n(1452),c=[],u=c.sort,l=a((function(){c.sort(void 0)})),d=a((function(){c.sort(null)})),f=s("sort");i({target:"Array",proto:!0,forced:l||!d||!f},{sort:function(t){return void 0===t?u.call(o(this)):u.call(o(this),r(t))}})},4016:(t,e,n)=>{"use strict";var i=n(2808),r=n(2804);i({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},7768:(t,e,n)=>{"use strict";var i=n(8284),r=n(5968),o=n(8648),a=n(1688),s=n(3509),c=n(1952),u=n(3696),l=n(9792),d=Math.max,f=Math.min,p=Math.floor,g=/\$([$&'`]|\d\d?|<[^>]*>)/g,m=/\$([$&'`]|\d\d?)/g;i("replace",2,(function(t,e,n,i){var h=i.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,v=i.REPLACE_KEEPS_$0,y=h?"$":"$0";return[function(n,i){var r=c(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,r,i):e.call(String(r),n,i)},function(t,i){if(!h&&v||"string"==typeof i&&-1===i.indexOf(y)){var o=n(e,t,this,i);if(o.done)return o.value}var c=r(t),p=String(this),g="function"==typeof i;g||(i=String(i));var m=c.global;if(m){var w=c.unicode;c.lastIndex=0}for(var x=[];;){var b=l(c,p);if(null===b)break;if(x.push(b),!m)break;""===String(b[0])&&(c.lastIndex=u(p,a(c.lastIndex),w))}for(var T,S="",E=0,I=0;I<x.length;I++){b=x[I];for(var k=String(b[0]),O=d(f(s(b.index),p.length),0),C=[],L=1;L<b.length;L++)C.push(void 0===(T=b[L])?T:String(T));var N=b.groups;if(g){var R=[k].concat(C,O,p);void 0!==N&&R.push(N);var A=String(i.apply(void 0,R))}else A=_(k,p,O,C,N,i);O>=E&&(S+=p.slice(E,O)+A,E=O+k.length)}return S+p.slice(E)}];function _(t,n,i,r,a,s){var c=i+t.length,u=r.length,l=m;return void 0!==a&&(a=o(a),l=g),e.call(s,l,(function(e,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,i);case"'":return n.slice(c);case"<":s=a[o.slice(1,-1)];break;default:var l=+o;if(0===l)return e;if(l>u){var d=p(l/10);return 0===d?e:d<=u?void 0===r[d-1]?o.charAt(1):r[d-1]+o.charAt(1):e}s=r[l-1]}return void 0===s?"":s}))}}))},9624:(t,e,n)=>{"use strict";var i=n(2808),r=n(6452).trim;i({target:"String",proto:!0,forced:n(9616)("trim")},{trim:function(){return r(this)}})},1088:(t,e,n)=>{"use strict";var i=n(2808),r=n(376),o=n(4280),a=n(3944),s=n(6840),c=n(3984).f,u=n(8580),l=o.Symbol;if(r&&"function"==typeof l&&(!("description"in l.prototype)||void 0!==l().description)){var d={},f=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof f?new l(t):void 0===t?l():l(t);return""===t&&(d[e]=!0),e};u(f,l);var p=f.prototype=l.prototype;p.constructor=f;var g=p.toString,m="Symbol(test)"==String(l("test")),h=/^Symbol\((.*)\)[^)]+$/;c(p,"description",{configurable:!0,get:function(){var t=s(this)?this.valueOf():this,e=g.call(t);if(a(d,t))return"";var n=m?e.slice(7,-1):e.replace(h,"$1");return""===n?void 0:n}}),i({global:!0,forced:!0},{Symbol:f})}},3656:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(6792);i({target:"Map",proto:!0,real:!0,forced:r},{deleteAll:function(){return o.apply(this,arguments)}})},4107:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(5968),a=n(3596),s=n(4516),c=n(596);i({target:"Map",proto:!0,real:!0,forced:r},{every:function(t){var e=o(this),n=s(e),i=a(t,arguments.length>1?arguments[1]:void 0,3);return!c(n,(function(t,n){if(!i(n,t,e))return c.stop()}),void 0,!0,!0).stopped}})},9896:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(3596),u=n(592),l=n(4516),d=n(596);i({target:"Map",proto:!0,real:!0,forced:r},{filter:function(t){var e=a(this),n=l(e),i=c(t,arguments.length>1?arguments[1]:void 0,3),r=new(u(e,o("Map"))),f=s(r.set);return d(n,(function(t,n){i(n,t,e)&&f.call(r,t,n)}),void 0,!0,!0),r}})},8252:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(5968),a=n(3596),s=n(4516),c=n(596);i({target:"Map",proto:!0,real:!0,forced:r},{findKey:function(t){var e=o(this),n=s(e),i=a(t,arguments.length>1?arguments[1]:void 0,3);return c(n,(function(t,n){if(i(n,t,e))return c.stop(t)}),void 0,!0,!0).result}})},6832:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(5968),a=n(3596),s=n(4516),c=n(596);i({target:"Map",proto:!0,real:!0,forced:r},{find:function(t){var e=o(this),n=s(e),i=a(t,arguments.length>1?arguments[1]:void 0,3);return c(n,(function(t,n){if(i(n,t,e))return c.stop(n)}),void 0,!0,!0).result}})},7240:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(5968),a=n(4516),s=n(4004),c=n(596);i({target:"Map",proto:!0,real:!0,forced:r},{includes:function(t){return c(a(o(this)),(function(e,n){if(s(n,t))return c.stop()}),void 0,!0,!0).stopped}})},2288:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(5968),a=n(4516),s=n(596);i({target:"Map",proto:!0,real:!0,forced:r},{keyOf:function(t){return s(a(o(this)),(function(e,n){if(n===t)return s.stop(e)}),void 0,!0,!0).result}})},5396:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(3596),u=n(592),l=n(4516),d=n(596);i({target:"Map",proto:!0,real:!0,forced:r},{mapKeys:function(t){var e=a(this),n=l(e),i=c(t,arguments.length>1?arguments[1]:void 0,3),r=new(u(e,o("Map"))),f=s(r.set);return d(n,(function(t,n){f.call(r,i(n,t,e),n)}),void 0,!0,!0),r}})},2480:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(3596),u=n(592),l=n(4516),d=n(596);i({target:"Map",proto:!0,real:!0,forced:r},{mapValues:function(t){var e=a(this),n=l(e),i=c(t,arguments.length>1?arguments[1]:void 0,3),r=new(u(e,o("Map"))),f=s(r.set);return d(n,(function(t,n){f.call(r,t,i(n,t,e))}),void 0,!0,!0),r}})},7190:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(5968),a=n(3040),s=n(596);i({target:"Map",proto:!0,real:!0,forced:r},{merge:function(t){for(var e=o(this),n=a(e.set),i=0;i<arguments.length;)s(arguments[i++],n,e,!0);return e}})},5036:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(5968),a=n(3040),s=n(4516),c=n(596);i({target:"Map",proto:!0,real:!0,forced:r},{reduce:function(t){var e=o(this),n=s(e),i=arguments.length<2,r=i?void 0:arguments[1];if(a(t),c(n,(function(n,o){i?(i=!1,r=o):r=t(r,o,n,e)}),void 0,!0,!0),i)throw TypeError("Reduce of empty map with no initial value");return r}})},4736:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(5968),a=n(3596),s=n(4516),c=n(596);i({target:"Map",proto:!0,real:!0,forced:r},{some:function(t){var e=o(this),n=s(e),i=a(t,arguments.length>1?arguments[1]:void 0,3);return c(n,(function(t,n){if(i(n,t,e))return c.stop()}),void 0,!0,!0).stopped}})},2520:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(5968),a=n(3040);i({target:"Map",proto:!0,real:!0,forced:r},{update:function(t,e){var n=o(this),i=arguments.length;a(e);var r=n.has(t);if(!r&&i<3)throw TypeError("Updating absent value");var s=r?n.get(t):a(i>2?arguments[2]:void 0)(t,n);return n.set(t,e(s,t,n)),n}})},9328:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(1528);i({target:"Set",proto:!0,real:!0,forced:r},{addAll:function(){return o.apply(this,arguments)}})},4560:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(6792);i({target:"Set",proto:!0,real:!0,forced:r},{deleteAll:function(){return o.apply(this,arguments)}})},8712:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(592),u=n(596);i({target:"Set",proto:!0,real:!0,forced:r},{difference:function(t){var e=a(this),n=new(c(e,o("Set")))(e),i=s(n.delete);return u(t,(function(t){i.call(n,t)})),n}})},9708:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(5968),a=n(3596),s=n(4892),c=n(596);i({target:"Set",proto:!0,real:!0,forced:r},{every:function(t){var e=o(this),n=s(e),i=a(t,arguments.length>1?arguments[1]:void 0,3);return!c(n,(function(t){if(!i(t,t,e))return c.stop()}),void 0,!1,!0).stopped}})},7976:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(3596),u=n(592),l=n(4892),d=n(596);i({target:"Set",proto:!0,real:!0,forced:r},{filter:function(t){var e=a(this),n=l(e),i=c(t,arguments.length>1?arguments[1]:void 0,3),r=new(u(e,o("Set"))),f=s(r.add);return d(n,(function(t){i(t,t,e)&&f.call(r,t)}),void 0,!1,!0),r}})},5600:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(5968),a=n(3596),s=n(4892),c=n(596);i({target:"Set",proto:!0,real:!0,forced:r},{find:function(t){var e=o(this),n=s(e),i=a(t,arguments.length>1?arguments[1]:void 0,3);return c(n,(function(t){if(i(t,t,e))return c.stop(t)}),void 0,!1,!0).result}})},7452:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(592),u=n(596);i({target:"Set",proto:!0,real:!0,forced:r},{intersection:function(t){var e=a(this),n=new(c(e,o("Set"))),i=s(e.has),r=s(n.add);return u(t,(function(t){i.call(e,t)&&r.call(n,t)})),n}})},8636:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(5968),a=n(3040),s=n(596);i({target:"Set",proto:!0,real:!0,forced:r},{isDisjointFrom:function(t){var e=o(this),n=a(e.has);return!s(t,(function(t){if(!0===n.call(e,t))return s.stop()})).stopped}})},1524:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(460),u=n(596);i({target:"Set",proto:!0,real:!0,forced:r},{isSubsetOf:function(t){var e=c(this),n=a(t),i=n.has;return"function"!=typeof i&&(n=new(o("Set"))(t),i=s(n.has)),!u(e,(function(t){if(!1===i.call(n,t))return u.stop()}),void 0,!1,!0).stopped}})},8836:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(5968),a=n(3040),s=n(596);i({target:"Set",proto:!0,real:!0,forced:r},{isSupersetOf:function(t){var e=o(this),n=a(e.has);return!s(t,(function(t){if(!1===n.call(e,t))return s.stop()})).stopped}})},5040:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(5968),a=n(4892),s=n(596);i({target:"Set",proto:!0,real:!0,forced:r},{join:function(t){var e=o(this),n=a(e),i=void 0===t?",":String(t),r=[];return s(n,r.push,r,!1,!0),r.join(i)}})},1728:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(3596),u=n(592),l=n(4892),d=n(596);i({target:"Set",proto:!0,real:!0,forced:r},{map:function(t){var e=a(this),n=l(e),i=c(t,arguments.length>1?arguments[1]:void 0,3),r=new(u(e,o("Set"))),f=s(r.add);return d(n,(function(t){f.call(r,i(t,t,e))}),void 0,!1,!0),r}})},80:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(5968),a=n(3040),s=n(4892),c=n(596);i({target:"Set",proto:!0,real:!0,forced:r},{reduce:function(t){var e=o(this),n=s(e),i=arguments.length<2,r=i?void 0:arguments[1];if(a(t),c(n,(function(n){i?(i=!1,r=n):r=t(r,n,n,e)}),void 0,!1,!0),i)throw TypeError("Reduce of empty set with no initial value");return r}})},1124:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(5968),a=n(3596),s=n(4892),c=n(596);i({target:"Set",proto:!0,real:!0,forced:r},{some:function(t){var e=o(this),n=s(e),i=a(t,arguments.length>1?arguments[1]:void 0,3);return c(n,(function(t){if(i(t,t,e))return c.stop()}),void 0,!1,!0).stopped}})},9600:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(592),u=n(596);i({target:"Set",proto:!0,real:!0,forced:r},{symmetricDifference:function(t){var e=a(this),n=new(c(e,o("Set")))(e),i=s(n.delete),r=s(n.add);return u(t,(function(t){i.call(n,t)||r.call(n,t)})),n}})},8932:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(3904),a=n(5968),s=n(3040),c=n(592),u=n(596);i({target:"Set",proto:!0,real:!0,forced:r},{union:function(t){var e=a(this),n=new(c(e,o("Set")))(e);return u(t,s(n.add),n),n}})},6056:(t,e,n)=>{"use strict";var i=n(2808),r=n(8820),o=n(6792);i({target:"WeakMap",proto:!0,real:!0,forced:r},{deleteAll:function(){return o.apply(this,arguments)}})},9952:(t,e,n)=>{var i=n(4280),r=n(3060),o=n(3224),a=n(784),s=n(3280),c=s("iterator"),u=s("toStringTag"),l=o.values;for(var d in r){var f=i[d],p=f&&f.prototype;if(p){if(p[c]!==l)try{a(p,c,l)}catch(t){p[c]=l}if(p[u]||a(p,u,d),r[d])for(var g in o)if(p[g]!==o[g])try{a(p,g,o[g])}catch(t){p[g]=o[g]}}}},512:function(t,e,n){"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g&&n.g,t.exports=function(){"use strict";var t,e="3.7.2",n=e,i="function"==typeof atob,r="function"==typeof btoa,o="function"==typeof Buffer,a="function"==typeof TextDecoder?new TextDecoder:void 0,s="function"==typeof TextEncoder?new TextEncoder:void 0,c=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),u=(t={},c.forEach((function(e,n){return t[e]=n})),t),l=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,d=String.fromCharCode.bind(String),f="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(t,e){return void 0===e&&(e=function(t){return t}),new Uint8Array(Array.prototype.slice.call(t,0).map(e))},p=function(t){return t.replace(/=/g,"").replace(/[+\/]/g,(function(t){return"+"==t?"-":"_"}))},g=function(t){return t.replace(/[^A-Za-z0-9\+\/]/g,"")},m=function(t){for(var e,n,i,r,o="",a=t.length%3,s=0;s<t.length;){if((n=t.charCodeAt(s++))>255||(i=t.charCodeAt(s++))>255||(r=t.charCodeAt(s++))>255)throw new TypeError("invalid character found");o+=c[(e=n<<16|i<<8|r)>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}return a?o.slice(0,a-3)+"===".substring(a):o},h=r?function(t){return btoa(t)}:o?function(t){return Buffer.from(t,"binary").toString("base64")}:m,v=o?function(t){return Buffer.from(t).toString("base64")}:function(t){for(var e=[],n=0,i=t.length;n<i;n+=4096)e.push(d.apply(null,t.subarray(n,n+4096)));return h(e.join(""))},y=function(t,e){return void 0===e&&(e=!1),e?p(v(t)):v(t)},_=function(t){if(t.length<2)return(e=t.charCodeAt(0))<128?t:e<2048?d(192|e>>>6)+d(128|63&e):d(224|e>>>12&15)+d(128|e>>>6&63)+d(128|63&e);var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return d(240|e>>>18&7)+d(128|e>>>12&63)+d(128|e>>>6&63)+d(128|63&e)},w=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,x=function(t){return t.replace(w,_)},b=o?function(t){return Buffer.from(t,"utf8").toString("base64")}:s?function(t){return v(s.encode(t))}:function(t){return h(x(t))},T=function(t,e){return void 0===e&&(e=!1),e?p(b(t)):b(t)},S=function(t){return T(t,!0)},E=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,I=function(t){switch(t.length){case 4:var e=((7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3))-65536;return d(55296+(e>>>10))+d(56320+(1023&e));case 3:return d((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return d((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},k=function(t){return t.replace(E,I)},O=function(t){if(t=t.replace(/\s+/g,""),!l.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(3&t.length));for(var e,n,i,r="",o=0;o<t.length;)e=u[t.charAt(o++)]<<18|u[t.charAt(o++)]<<12|(n=u[t.charAt(o++)])<<6|(i=u[t.charAt(o++)]),r+=64===n?d(e>>16&255):64===i?d(e>>16&255,e>>8&255):d(e>>16&255,e>>8&255,255&e);return r},C=i?function(t){return atob(g(t))}:o?function(t){return Buffer.from(t,"base64").toString("binary")}:O,L=o?function(t){return f(Buffer.from(t,"base64"))}:function(t){return f(C(t),(function(t){return t.charCodeAt(0)}))},N=function(t){return L(A(t))},R=o?function(t){return Buffer.from(t,"base64").toString("utf8")}:a?function(t){return a.decode(L(t))}:function(t){return k(C(t))},A=function(t){return g(t.replace(/[-_]/g,(function(t){return"-"==t?"+":"/"})))},P=function(t){return R(A(t))},M=function(t){return{value:t,enumerable:!1,writable:!0,configurable:!0}},W=function(){var t=function(t,e){return Object.defineProperty(String.prototype,t,M(e))};t("fromBase64",(function(){return P(this)})),t("toBase64",(function(t){return T(this,t)})),t("toBase64URI",(function(){return T(this,!0)})),t("toBase64URL",(function(){return T(this,!0)})),t("toUint8Array",(function(){return N(this)}))},U=function(){var t=function(t,e){return Object.defineProperty(Uint8Array.prototype,t,M(e))};t("toBase64",(function(t){return y(this,t)})),t("toBase64URI",(function(){return y(this,!0)})),t("toBase64URL",(function(){return y(this,!0)}))},G={version:e,VERSION:n,atob:C,atobPolyfill:O,btoa:h,btoaPolyfill:m,fromBase64:P,toBase64:T,encode:T,encodeURI:S,encodeURL:S,utob:x,btou:k,decode:P,isValid:function(t){if("string"!=typeof t)return!1;var e=t.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(e)||!/[^\s0-9a-zA-Z\-_]/.test(e)},fromUint8Array:y,toUint8Array:N,extendString:W,extendUint8Array:U,extendBuiltins:function(){W(),U()},Base64:{}};return Object.keys(G).forEach((function(t){return G.Base64[t]=G[t]})),G}()},3548:(t,e,n)=>{"use strict";var i={};(0,n(12).assign)(i,n(3400),n(7888),n(944)),t.exports=i},3400:(t,e,n)=>{"use strict";var i=n(9379),r=n(12),o=n(3352),a=n(9451),s=n(6092),c=Object.prototype.toString,u=0,l=-1,d=0,f=8;function p(t){if(!(this instanceof p))return new p(t);this.options=r.assign({level:l,method:f,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var n=i.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(n!==u)throw new Error(a[n]);if(e.header&&i.deflateSetHeader(this.strm,e.header),e.dictionary){var g;if(g="string"==typeof e.dictionary?o.string2buf(e.dictionary):"[object ArrayBuffer]"===c.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,(n=i.deflateSetDictionary(this.strm,g))!==u)throw new Error(a[n]);this._dict_set=!0}}function g(t,e){var n=new p(e);if(n.push(t,!0),n.err)throw n.msg||a[n.err];return n.result}p.prototype.push=function(t,e){var n,a,s=this.strm,l=this.options.chunkSize;if(this.ended)return!1;a=e===~~e?e:!0===e?4:0,"string"==typeof t?s.input=o.string2buf(t):"[object ArrayBuffer]"===c.call(t)?s.input=new Uint8Array(t):s.input=t,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new r.Buf8(l),s.next_out=0,s.avail_out=l),1!==(n=i.deflate(s,a))&&n!==u)return this.onEnd(n),this.ended=!0,!1;0!==s.avail_out&&(0!==s.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(o.buf2binstring(r.shrinkBuf(s.output,s.next_out))):this.onData(r.shrinkBuf(s.output,s.next_out)))}while((s.avail_in>0||0===s.avail_out)&&1!==n);return 4===a?(n=i.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===u):2!==a||(this.onEnd(u),s.avail_out=0,!0)},p.prototype.onData=function(t){this.chunks.push(t)},p.prototype.onEnd=function(t){t===u&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Deflate=p,e.deflate=g,e.deflateRaw=function(t,e){return(e=e||{}).raw=!0,g(t,e)},e.gzip=function(t,e){return(e=e||{}).gzip=!0,g(t,e)}},7888:(t,e,n)=>{"use strict";var i=n(7040),r=n(12),o=n(3352),a=n(944),s=n(9451),c=n(6092),u=n(1112),l=Object.prototype.toString;function d(t){if(!(this instanceof d))return new d(t);this.options=r.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var n=i.inflateInit2(this.strm,e.windowBits);if(n!==a.Z_OK)throw new Error(s[n]);this.header=new u,i.inflateGetHeader(this.strm,this.header)}function f(t,e){var n=new d(e);if(n.push(t,!0),n.err)throw n.msg||s[n.err];return n.result}d.prototype.push=function(t,e){var n,s,c,u,d,f,p=this.strm,g=this.options.chunkSize,m=this.options.dictionary,h=!1;if(this.ended)return!1;s=e===~~e?e:!0===e?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof t?p.input=o.binstring2buf(t):"[object ArrayBuffer]"===l.call(t)?p.input=new Uint8Array(t):p.input=t,p.next_in=0,p.avail_in=p.input.length;do{if(0===p.avail_out&&(p.output=new r.Buf8(g),p.next_out=0,p.avail_out=g),(n=i.inflate(p,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&m&&(f="string"==typeof m?o.string2buf(m):"[object ArrayBuffer]"===l.call(m)?new Uint8Array(m):m,n=i.inflateSetDictionary(this.strm,f)),n===a.Z_BUF_ERROR&&!0===h&&(n=a.Z_OK,h=!1),n!==a.Z_STREAM_END&&n!==a.Z_OK)return this.onEnd(n),this.ended=!0,!1;p.next_out&&(0!==p.avail_out&&n!==a.Z_STREAM_END&&(0!==p.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(c=o.utf8border(p.output,p.next_out),u=p.next_out-c,d=o.buf2string(p.output,c),p.next_out=u,p.avail_out=g-u,u&&r.arraySet(p.output,p.output,c,u,0),this.onData(d)):this.onData(r.shrinkBuf(p.output,p.next_out)))),0===p.avail_in&&0===p.avail_out&&(h=!0)}while((p.avail_in>0||0===p.avail_out)&&n!==a.Z_STREAM_END);return n===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(n=i.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),p.avail_out=0,!0)},d.prototype.onData=function(t){this.chunks.push(t)},d.prototype.onEnd=function(t){t===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Inflate=d,e.inflate=f,e.inflateRaw=function(t,e){return(e=e||{}).raw=!0,f(t,e)},e.ungzip=f},12:(t,e)=>{"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var n=e.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var r in n)i(n,r)&&(t[r]=n[r])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var r={arraySet:function(t,e,n,i,r){if(e.subarray&&t.subarray)t.set(e.subarray(n,n+i),r);else for(var o=0;o<i;o++)t[r+o]=e[n+o]},flattenChunks:function(t){var e,n,i,r,o,a;for(i=0,e=0,n=t.length;e<n;e++)i+=t[e].length;for(a=new Uint8Array(i),r=0,e=0,n=t.length;e<n;e++)o=t[e],a.set(o,r),r+=o.length;return a}},o={arraySet:function(t,e,n,i,r){for(var o=0;o<i;o++)t[r+o]=e[n+o]},flattenChunks:function(t){return[].concat.apply([],t)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,r)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,o))},e.setTyped(n)},3352:(t,e,n)=>{"use strict";var i=n(12),r=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(t){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){o=!1}for(var a=new i.Buf8(256),s=0;s<256;s++)a[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function c(t,e){if(e<65537&&(t.subarray&&o||!t.subarray&&r))return String.fromCharCode.apply(null,i.shrinkBuf(t,e));for(var n="",a=0;a<e;a++)n+=String.fromCharCode(t[a]);return n}a[254]=a[254]=1,e.string2buf=function(t){var e,n,r,o,a,s=t.length,c=0;for(o=0;o<s;o++)55296==(64512&(n=t.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=t.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),c+=n<128?1:n<2048?2:n<65536?3:4;for(e=new i.Buf8(c),a=0,o=0;a<c;o++)55296==(64512&(n=t.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=t.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),n<128?e[a++]=n:n<2048?(e[a++]=192|n>>>6,e[a++]=128|63&n):n<65536?(e[a++]=224|n>>>12,e[a++]=128|n>>>6&63,e[a++]=128|63&n):(e[a++]=240|n>>>18,e[a++]=128|n>>>12&63,e[a++]=128|n>>>6&63,e[a++]=128|63&n);return e},e.buf2binstring=function(t){return c(t,t.length)},e.binstring2buf=function(t){for(var e=new i.Buf8(t.length),n=0,r=e.length;n<r;n++)e[n]=t.charCodeAt(n);return e},e.buf2string=function(t,e){var n,i,r,o,s=e||t.length,u=new Array(2*s);for(i=0,n=0;n<s;)if((r=t[n++])<128)u[i++]=r;else if((o=a[r])>4)u[i++]=65533,n+=o-1;else{for(r&=2===o?31:3===o?15:7;o>1&&n<s;)r=r<<6|63&t[n++],o--;o>1?u[i++]=65533:r<65536?u[i++]=r:(r-=65536,u[i++]=55296|r>>10&1023,u[i++]=56320|1023&r)}return c(u,i)},e.utf8border=function(t,e){var n;for((e=e||t.length)>t.length&&(e=t.length),n=e-1;n>=0&&128==(192&t[n]);)n--;return n<0||0===n?e:n+a[t[n]]>e?n:e}},2696:t=>{"use strict";t.exports=function(t,e,n,i){for(var r=65535&t|0,o=t>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{o=o+(r=r+e[i++]|0)|0}while(--a);r%=65521,o%=65521}return r|o<<16|0}},944:t=>{"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},9456:t=>{"use strict";var e=function(){for(var t,e=[],n=0;n<256;n++){t=n;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[n]=t}return e}();t.exports=function(t,n,i,r){var o=e,a=r+i;t^=-1;for(var s=r;s<a;s++)t=t>>>8^o[255&(t^n[s])];return-1^t}},9379:(t,e,n)=>{"use strict";var i,r=n(12),o=n(2976),a=n(2696),s=n(9456),c=n(9451),u=0,l=0,d=-2,f=2,p=8,g=286,m=30,h=19,v=2*g+1,y=15,_=3,w=258,x=w+_+1,b=42,T=103,S=113,E=666;function I(t,e){return t.msg=c[e],e}function k(t){return(t<<1)-(t>4?9:0)}function O(t){for(var e=t.length;--e>=0;)t[e]=0}function C(t){var e=t.state,n=e.pending;n>t.avail_out&&(n=t.avail_out),0!==n&&(r.arraySet(t.output,e.pending_buf,e.pending_out,n,t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,0===e.pending&&(e.pending_out=0))}function L(t,e){o._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,C(t.strm)}function N(t,e){t.pending_buf[t.pending++]=e}function R(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function A(t,e){var n,i,r=t.max_chain_length,o=t.strstart,a=t.prev_length,s=t.nice_match,c=t.strstart>t.w_size-x?t.strstart-(t.w_size-x):0,u=t.window,l=t.w_mask,d=t.prev,f=t.strstart+w,p=u[o+a-1],g=u[o+a];t.prev_length>=t.good_match&&(r>>=2),s>t.lookahead&&(s=t.lookahead);do{if(u[(n=e)+a]===g&&u[n+a-1]===p&&u[n]===u[o]&&u[++n]===u[o+1]){o+=2,n++;do{}while(u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&o<f);if(i=w-(f-o),o=f-w,i>a){if(t.match_start=e,a=i,i>=s)break;p=u[o+a-1],g=u[o+a]}}}while((e=d[e&l])>c&&0!=--r);return a<=t.lookahead?a:t.lookahead}function P(t){var e,n,i,o,c,u,l,d,f,p,g=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=g+(g-x)){r.arraySet(t.window,t.window,g,g,0),t.match_start-=g,t.strstart-=g,t.block_start-=g,e=n=t.hash_size;do{i=t.head[--e],t.head[e]=i>=g?i-g:0}while(--n);e=n=g;do{i=t.prev[--e],t.prev[e]=i>=g?i-g:0}while(--n);o+=g}if(0===t.strm.avail_in)break;if(u=t.strm,l=t.window,d=t.strstart+t.lookahead,f=o,p=void 0,(p=u.avail_in)>f&&(p=f),n=0===p?0:(u.avail_in-=p,r.arraySet(l,u.input,u.next_in,p,d),1===u.state.wrap?u.adler=a(u.adler,l,p,d):2===u.state.wrap&&(u.adler=s(u.adler,l,p,d)),u.next_in+=p,u.total_in+=p,p),t.lookahead+=n,t.lookahead+t.insert>=_)for(c=t.strstart-t.insert,t.ins_h=t.window[c],t.ins_h=(t.ins_h<<t.hash_shift^t.window[c+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[c+_-1])&t.hash_mask,t.prev[c&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=c,c++,t.insert--,!(t.lookahead+t.insert<_)););}while(t.lookahead<x&&0!==t.strm.avail_in)}function M(t,e){for(var n,i;;){if(t.lookahead<x){if(P(t),t.lookahead<x&&e===u)return 1;if(0===t.lookahead)break}if(n=0,t.lookahead>=_&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+_-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==n&&t.strstart-n<=t.w_size-x&&(t.match_length=A(t,n)),t.match_length>=_)if(i=o._tr_tally(t,t.strstart-t.match_start,t.match_length-_),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=_){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+_-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else i=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(L(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<_-1?t.strstart:_-1,4===e?(L(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(L(t,!1),0===t.strm.avail_out)?1:2}function W(t,e){for(var n,i,r;;){if(t.lookahead<x){if(P(t),t.lookahead<x&&e===u)return 1;if(0===t.lookahead)break}if(n=0,t.lookahead>=_&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+_-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=_-1,0!==n&&t.prev_length<t.max_lazy_match&&t.strstart-n<=t.w_size-x&&(t.match_length=A(t,n),t.match_length<=5&&(1===t.strategy||t.match_length===_&&t.strstart-t.match_start>4096)&&(t.match_length=_-1)),t.prev_length>=_&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-_,i=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-_),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+_-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=_-1,t.strstart++,i&&(L(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((i=o._tr_tally(t,0,t.window[t.strstart-1]))&&L(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=o._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<_-1?t.strstart:_-1,4===e?(L(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(L(t,!1),0===t.strm.avail_out)?1:2}function U(t,e,n,i,r){this.good_length=t,this.max_lazy=e,this.nice_length=n,this.max_chain=i,this.func=r}function G(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=p,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new r.Buf16(2*v),this.dyn_dtree=new r.Buf16(2*(2*m+1)),this.bl_tree=new r.Buf16(2*(2*h+1)),O(this.dyn_ltree),O(this.dyn_dtree),O(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new r.Buf16(y+1),this.heap=new r.Buf16(2*g+1),O(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new r.Buf16(2*g+1),O(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function D(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=f,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?b:S,t.adler=2===e.wrap?0:1,e.last_flush=u,o._tr_init(e),l):I(t,d)}function B(t){var e,n=D(t);return n===l&&((e=t.state).window_size=2*e.w_size,O(e.head),e.max_lazy_match=i[e.level].max_lazy,e.good_match=i[e.level].good_length,e.nice_match=i[e.level].nice_length,e.max_chain_length=i[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=_-1,e.match_available=0,e.ins_h=0),n}function F(t,e,n,i,o,a){if(!t)return d;var s=1;if(-1===e&&(e=6),i<0?(s=0,i=-i):i>15&&(s=2,i-=16),o<1||o>9||n!==p||i<8||i>15||e<0||e>9||a<0||a>4)return I(t,d);8===i&&(i=9);var c=new G;return t.state=c,c.strm=t,c.wrap=s,c.gzhead=null,c.w_bits=i,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.hash_bits=o+7,c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+_-1)/_),c.window=new r.Buf8(2*c.w_size),c.head=new r.Buf16(c.hash_size),c.prev=new r.Buf16(c.w_size),c.lit_bufsize=1<<o+6,c.pending_buf_size=4*c.lit_bufsize,c.pending_buf=new r.Buf8(c.pending_buf_size),c.d_buf=1*c.lit_bufsize,c.l_buf=3*c.lit_bufsize,c.level=e,c.strategy=a,c.method=n,B(t)}i=[new U(0,0,0,0,(function(t,e){var n=65535;for(n>t.pending_buf_size-5&&(n=t.pending_buf_size-5);;){if(t.lookahead<=1){if(P(t),0===t.lookahead&&e===u)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var i=t.block_start+n;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,L(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-x&&(L(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(L(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(L(t,!1),t.strm.avail_out),1)})),new U(4,4,8,4,M),new U(4,5,16,8,M),new U(4,6,32,32,M),new U(4,4,16,16,W),new U(8,16,32,32,W),new U(8,16,128,128,W),new U(8,32,128,256,W),new U(32,128,258,1024,W),new U(32,258,258,4096,W)],e.deflateInit=function(t,e){return F(t,e,p,15,8,0)},e.deflateInit2=F,e.deflateReset=B,e.deflateResetKeep=D,e.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?d:(t.state.gzhead=e,l):d},e.deflate=function(t,e){var n,r,a,c;if(!t||!t.state||e>5||e<0)return t?I(t,d):d;if(r=t.state,!t.output||!t.input&&0!==t.avail_in||r.status===E&&4!==e)return I(t,0===t.avail_out?-5:d);if(r.strm=t,n=r.last_flush,r.last_flush=e,r.status===b)if(2===r.wrap)t.adler=0,N(r,31),N(r,139),N(r,8),r.gzhead?(N(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),N(r,255&r.gzhead.time),N(r,r.gzhead.time>>8&255),N(r,r.gzhead.time>>16&255),N(r,r.gzhead.time>>24&255),N(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),N(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(N(r,255&r.gzhead.extra.length),N(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=s(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(N(r,0),N(r,0),N(r,0),N(r,0),N(r,0),N(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),N(r,3),r.status=S);else{var f=p+(r.w_bits-8<<4)<<8;f|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(f|=32),f+=31-f%31,r.status=S,R(r,f),0!==r.strstart&&(R(r,t.adler>>>16),R(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=s(t.adler,r.pending_buf,r.pending-a,a)),C(t),a=r.pending,r.pending!==r.pending_buf_size));)N(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=s(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=s(t.adler,r.pending_buf,r.pending-a,a)),C(t),a=r.pending,r.pending===r.pending_buf_size)){c=1;break}c=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,N(r,c)}while(0!==c);r.gzhead.hcrc&&r.pending>a&&(t.adler=s(t.adler,r.pending_buf,r.pending-a,a)),0===c&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=s(t.adler,r.pending_buf,r.pending-a,a)),C(t),a=r.pending,r.pending===r.pending_buf_size)){c=1;break}c=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,N(r,c)}while(0!==c);r.gzhead.hcrc&&r.pending>a&&(t.adler=s(t.adler,r.pending_buf,r.pending-a,a)),0===c&&(r.status=T)}else r.status=T;if(r.status===T&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&C(t),r.pending+2<=r.pending_buf_size&&(N(r,255&t.adler),N(r,t.adler>>8&255),t.adler=0,r.status=S)):r.status=S),0!==r.pending){if(C(t),0===t.avail_out)return r.last_flush=-1,l}else if(0===t.avail_in&&k(e)<=k(n)&&4!==e)return I(t,-5);if(r.status===E&&0!==t.avail_in)return I(t,-5);if(0!==t.avail_in||0!==r.lookahead||e!==u&&r.status!==E){var g=2===r.strategy?function(t,e){for(var n;;){if(0===t.lookahead&&(P(t),0===t.lookahead)){if(e===u)return 1;break}if(t.match_length=0,n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(L(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(L(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(L(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var n,i,r,a,s=t.window;;){if(t.lookahead<=w){if(P(t),t.lookahead<=w&&e===u)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=_&&t.strstart>0&&(i=s[r=t.strstart-1])===s[++r]&&i===s[++r]&&i===s[++r]){a=t.strstart+w;do{}while(i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&i===s[++r]&&r<a);t.match_length=w-(a-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=_?(n=o._tr_tally(t,1,t.match_length-_),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(L(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(L(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(L(t,!1),0===t.strm.avail_out)?1:2}(r,e):i[r.level].func(r,e);if(3!==g&&4!==g||(r.status=E),1===g||3===g)return 0===t.avail_out&&(r.last_flush=-1),l;if(2===g&&(1===e?o._tr_align(r):5!==e&&(o._tr_stored_block(r,0,0,!1),3===e&&(O(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),C(t),0===t.avail_out))return r.last_flush=-1,l}return 4!==e?l:r.wrap<=0?1:(2===r.wrap?(N(r,255&t.adler),N(r,t.adler>>8&255),N(r,t.adler>>16&255),N(r,t.adler>>24&255),N(r,255&t.total_in),N(r,t.total_in>>8&255),N(r,t.total_in>>16&255),N(r,t.total_in>>24&255)):(R(r,t.adler>>>16),R(r,65535&t.adler)),C(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?l:1)},e.deflateEnd=function(t){var e;return t&&t.state?(e=t.state.status)!==b&&69!==e&&73!==e&&91!==e&&e!==T&&e!==S&&e!==E?I(t,d):(t.state=null,e===S?I(t,-3):l):d},e.deflateSetDictionary=function(t,e){var n,i,o,s,c,u,f,p,g=e.length;if(!t||!t.state)return d;if(2===(s=(n=t.state).wrap)||1===s&&n.status!==b||n.lookahead)return d;for(1===s&&(t.adler=a(t.adler,e,g,0)),n.wrap=0,g>=n.w_size&&(0===s&&(O(n.head),n.strstart=0,n.block_start=0,n.insert=0),p=new r.Buf8(n.w_size),r.arraySet(p,e,g-n.w_size,n.w_size,0),e=p,g=n.w_size),c=t.avail_in,u=t.next_in,f=t.input,t.avail_in=g,t.next_in=0,t.input=e,P(n);n.lookahead>=_;){i=n.strstart,o=n.lookahead-(_-1);do{n.ins_h=(n.ins_h<<n.hash_shift^n.window[i+_-1])&n.hash_mask,n.prev[i&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=i,i++}while(--o);n.strstart=i,n.lookahead=_-1,P(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=_-1,n.match_available=0,t.next_in=u,t.input=f,t.avail_in=c,n.wrap=s,l},e.deflateInfo="pako deflate (from Nodeca project)"},1112:t=>{"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},6560:t=>{"use strict";t.exports=function(t,e){var n,i,r,o,a,s,c,u,l,d,f,p,g,m,h,v,y,_,w,x,b,T,S,E,I;n=t.state,i=t.next_in,E=t.input,r=i+(t.avail_in-5),o=t.next_out,I=t.output,a=o-(e-t.avail_out),s=o+(t.avail_out-257),c=n.dmax,u=n.wsize,l=n.whave,d=n.wnext,f=n.window,p=n.hold,g=n.bits,m=n.lencode,h=n.distcode,v=(1<<n.lenbits)-1,y=(1<<n.distbits)-1;t:do{g<15&&(p+=E[i++]<<g,g+=8,p+=E[i++]<<g,g+=8),_=m[p&v];e:for(;;){if(p>>>=w=_>>>24,g-=w,0==(w=_>>>16&255))I[o++]=65535&_;else{if(!(16&w)){if(0==(64&w)){_=m[(65535&_)+(p&(1<<w)-1)];continue e}if(32&w){n.mode=12;break t}t.msg="invalid literal/length code",n.mode=30;break t}x=65535&_,(w&=15)&&(g<w&&(p+=E[i++]<<g,g+=8),x+=p&(1<<w)-1,p>>>=w,g-=w),g<15&&(p+=E[i++]<<g,g+=8,p+=E[i++]<<g,g+=8),_=h[p&y];n:for(;;){if(p>>>=w=_>>>24,g-=w,!(16&(w=_>>>16&255))){if(0==(64&w)){_=h[(65535&_)+(p&(1<<w)-1)];continue n}t.msg="invalid distance code",n.mode=30;break t}if(b=65535&_,g<(w&=15)&&(p+=E[i++]<<g,(g+=8)<w&&(p+=E[i++]<<g,g+=8)),(b+=p&(1<<w)-1)>c){t.msg="invalid distance too far back",n.mode=30;break t}if(p>>>=w,g-=w,b>(w=o-a)){if((w=b-w)>l&&n.sane){t.msg="invalid distance too far back",n.mode=30;break t}if(T=0,S=f,0===d){if(T+=u-w,w<x){x-=w;do{I[o++]=f[T++]}while(--w);T=o-b,S=I}}else if(d<w){if(T+=u+d-w,(w-=d)<x){x-=w;do{I[o++]=f[T++]}while(--w);if(T=0,d<x){x-=w=d;do{I[o++]=f[T++]}while(--w);T=o-b,S=I}}}else if(T+=d-w,w<x){x-=w;do{I[o++]=f[T++]}while(--w);T=o-b,S=I}for(;x>2;)I[o++]=S[T++],I[o++]=S[T++],I[o++]=S[T++],x-=3;x&&(I[o++]=S[T++],x>1&&(I[o++]=S[T++]))}else{T=o-b;do{I[o++]=I[T++],I[o++]=I[T++],I[o++]=I[T++],x-=3}while(x>2);x&&(I[o++]=I[T++],x>1&&(I[o++]=I[T++]))}break}}break}}while(i<r&&o<s);i-=x=g>>3,p&=(1<<(g-=x<<3))-1,t.next_in=i,t.next_out=o,t.avail_in=i<r?r-i+5:5-(i-r),t.avail_out=o<s?s-o+257:257-(o-s),n.hold=p,n.bits=g}},7040:(t,e,n)=>{"use strict";var i=n(12),r=n(2696),o=n(9456),a=n(6560),s=n(6120),c=0,u=-2,l=1,d=12,f=30,p=852,g=592;function m(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function h(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function v(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=l,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new i.Buf32(p),e.distcode=e.distdyn=new i.Buf32(g),e.sane=1,e.back=-1,c):u}function y(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,v(t)):u}function _(t,e){var n,i;return t&&t.state?(i=t.state,e<0?(n=0,e=-e):(n=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?u:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=n,i.wbits=e,y(t))):u}function w(t,e){var n,i;return t?(i=new h,t.state=i,i.window=null,(n=_(t,e))!==c&&(t.state=null),n):u}var x,b,T=!0;function S(t){if(T){var e;for(x=new i.Buf32(512),b=new i.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(s(1,t.lens,0,288,x,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;s(2,t.lens,0,32,b,0,t.work,{bits:5}),T=!1}t.lencode=x,t.lenbits=9,t.distcode=b,t.distbits=5}function E(t,e,n,r){var o,a=t.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new i.Buf8(a.wsize)),r>=a.wsize?(i.arraySet(a.window,e,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>r&&(o=r),i.arraySet(a.window,e,n-r,o,a.wnext),(r-=o)?(i.arraySet(a.window,e,n-r,r,0),a.wnext=r,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0}e.inflateReset=y,e.inflateReset2=_,e.inflateResetKeep=v,e.inflateInit=function(t){return w(t,15)},e.inflateInit2=w,e.inflate=function(t,e){var n,p,g,h,v,y,_,w,x,b,T,I,k,O,C,L,N,R,A,P,M,W,U,G,D=0,B=new i.Buf8(4),F=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return u;(n=t.state).mode===d&&(n.mode=13),v=t.next_out,g=t.output,_=t.avail_out,h=t.next_in,p=t.input,y=t.avail_in,w=n.hold,x=n.bits,b=y,T=_,W=c;t:for(;;)switch(n.mode){case l:if(0===n.wrap){n.mode=13;break}for(;x<16;){if(0===y)break t;y--,w+=p[h++]<<x,x+=8}if(2&n.wrap&&35615===w){n.check=0,B[0]=255&w,B[1]=w>>>8&255,n.check=o(n.check,B,2,0),w=0,x=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&w)<<8)+(w>>8))%31){t.msg="incorrect header check",n.mode=f;break}if(8!=(15&w)){t.msg="unknown compression method",n.mode=f;break}if(x-=4,M=8+(15&(w>>>=4)),0===n.wbits)n.wbits=M;else if(M>n.wbits){t.msg="invalid window size",n.mode=f;break}n.dmax=1<<M,t.adler=n.check=1,n.mode=512&w?10:d,w=0,x=0;break;case 2:for(;x<16;){if(0===y)break t;y--,w+=p[h++]<<x,x+=8}if(n.flags=w,8!=(255&n.flags)){t.msg="unknown compression method",n.mode=f;break}if(57344&n.flags){t.msg="unknown header flags set",n.mode=f;break}n.head&&(n.head.text=w>>8&1),512&n.flags&&(B[0]=255&w,B[1]=w>>>8&255,n.check=o(n.check,B,2,0)),w=0,x=0,n.mode=3;case 3:for(;x<32;){if(0===y)break t;y--,w+=p[h++]<<x,x+=8}n.head&&(n.head.time=w),512&n.flags&&(B[0]=255&w,B[1]=w>>>8&255,B[2]=w>>>16&255,B[3]=w>>>24&255,n.check=o(n.check,B,4,0)),w=0,x=0,n.mode=4;case 4:for(;x<16;){if(0===y)break t;y--,w+=p[h++]<<x,x+=8}n.head&&(n.head.xflags=255&w,n.head.os=w>>8),512&n.flags&&(B[0]=255&w,B[1]=w>>>8&255,n.check=o(n.check,B,2,0)),w=0,x=0,n.mode=5;case 5:if(1024&n.flags){for(;x<16;){if(0===y)break t;y--,w+=p[h++]<<x,x+=8}n.length=w,n.head&&(n.head.extra_len=w),512&n.flags&&(B[0]=255&w,B[1]=w>>>8&255,n.check=o(n.check,B,2,0)),w=0,x=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((I=n.length)>y&&(I=y),I&&(n.head&&(M=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),i.arraySet(n.head.extra,p,h,I,M)),512&n.flags&&(n.check=o(n.check,p,I,h)),y-=I,h+=I,n.length-=I),n.length))break t;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===y)break t;I=0;do{M=p[h+I++],n.head&&M&&n.length<65536&&(n.head.name+=String.fromCharCode(M))}while(M&&I<y);if(512&n.flags&&(n.check=o(n.check,p,I,h)),y-=I,h+=I,M)break t}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===y)break t;I=0;do{M=p[h+I++],n.head&&M&&n.length<65536&&(n.head.comment+=String.fromCharCode(M))}while(M&&I<y);if(512&n.flags&&(n.check=o(n.check,p,I,h)),y-=I,h+=I,M)break t}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;x<16;){if(0===y)break t;y--,w+=p[h++]<<x,x+=8}if(w!==(65535&n.check)){t.msg="header crc mismatch",n.mode=f;break}w=0,x=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=d;break;case 10:for(;x<32;){if(0===y)break t;y--,w+=p[h++]<<x,x+=8}t.adler=n.check=m(w),w=0,x=0,n.mode=11;case 11:if(0===n.havedict)return t.next_out=v,t.avail_out=_,t.next_in=h,t.avail_in=y,n.hold=w,n.bits=x,2;t.adler=n.check=1,n.mode=d;case d:if(5===e||6===e)break t;case 13:if(n.last){w>>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(0===y)break t;y--,w+=p[h++]<<x,x+=8}switch(n.last=1&w,x-=1,3&(w>>>=1)){case 0:n.mode=14;break;case 1:if(S(n),n.mode=20,6===e){w>>>=2,x-=2;break t}break;case 2:n.mode=17;break;case 3:t.msg="invalid block type",n.mode=f}w>>>=2,x-=2;break;case 14:for(w>>>=7&x,x-=7&x;x<32;){if(0===y)break t;y--,w+=p[h++]<<x,x+=8}if((65535&w)!=(w>>>16^65535)){t.msg="invalid stored block lengths",n.mode=f;break}if(n.length=65535&w,w=0,x=0,n.mode=15,6===e)break t;case 15:n.mode=16;case 16:if(I=n.length){if(I>y&&(I=y),I>_&&(I=_),0===I)break t;i.arraySet(g,p,h,I,v),y-=I,h+=I,_-=I,v+=I,n.length-=I;break}n.mode=d;break;case 17:for(;x<14;){if(0===y)break t;y--,w+=p[h++]<<x,x+=8}if(n.nlen=257+(31&w),w>>>=5,x-=5,n.ndist=1+(31&w),w>>>=5,x-=5,n.ncode=4+(15&w),w>>>=4,x-=4,n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols",n.mode=f;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;x<3;){if(0===y)break t;y--,w+=p[h++]<<x,x+=8}n.lens[F[n.have++]]=7&w,w>>>=3,x-=3}for(;n.have<19;)n.lens[F[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,U={bits:n.lenbits},W=s(0,n.lens,0,19,n.lencode,0,n.work,U),n.lenbits=U.bits,W){t.msg="invalid code lengths set",n.mode=f;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;L=(D=n.lencode[w&(1<<n.lenbits)-1])>>>16&255,N=65535&D,!((C=D>>>24)<=x);){if(0===y)break t;y--,w+=p[h++]<<x,x+=8}if(N<16)w>>>=C,x-=C,n.lens[n.have++]=N;else{if(16===N){for(G=C+2;x<G;){if(0===y)break t;y--,w+=p[h++]<<x,x+=8}if(w>>>=C,x-=C,0===n.have){t.msg="invalid bit length repeat",n.mode=f;break}M=n.lens[n.have-1],I=3+(3&w),w>>>=2,x-=2}else if(17===N){for(G=C+3;x<G;){if(0===y)break t;y--,w+=p[h++]<<x,x+=8}x-=C,M=0,I=3+(7&(w>>>=C)),w>>>=3,x-=3}else{for(G=C+7;x<G;){if(0===y)break t;y--,w+=p[h++]<<x,x+=8}x-=C,M=0,I=11+(127&(w>>>=C)),w>>>=7,x-=7}if(n.have+I>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=f;break}for(;I--;)n.lens[n.have++]=M}}if(n.mode===f)break;if(0===n.lens[256]){t.msg="invalid code -- missing end-of-block",n.mode=f;break}if(n.lenbits=9,U={bits:n.lenbits},W=s(1,n.lens,0,n.nlen,n.lencode,0,n.work,U),n.lenbits=U.bits,W){t.msg="invalid literal/lengths set",n.mode=f;break}if(n.distbits=6,n.distcode=n.distdyn,U={bits:n.distbits},W=s(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,U),n.distbits=U.bits,W){t.msg="invalid distances set",n.mode=f;break}if(n.mode=20,6===e)break t;case 20:n.mode=21;case 21:if(y>=6&&_>=258){t.next_out=v,t.avail_out=_,t.next_in=h,t.avail_in=y,n.hold=w,n.bits=x,a(t,T),v=t.next_out,g=t.output,_=t.avail_out,h=t.next_in,p=t.input,y=t.avail_in,w=n.hold,x=n.bits,n.mode===d&&(n.back=-1);break}for(n.back=0;L=(D=n.lencode[w&(1<<n.lenbits)-1])>>>16&255,N=65535&D,!((C=D>>>24)<=x);){if(0===y)break t;y--,w+=p[h++]<<x,x+=8}if(L&&0==(240&L)){for(R=C,A=L,P=N;L=(D=n.lencode[P+((w&(1<<R+A)-1)>>R)])>>>16&255,N=65535&D,!(R+(C=D>>>24)<=x);){if(0===y)break t;y--,w+=p[h++]<<x,x+=8}w>>>=R,x-=R,n.back+=R}if(w>>>=C,x-=C,n.back+=C,n.length=N,0===L){n.mode=26;break}if(32&L){n.back=-1,n.mode=d;break}if(64&L){t.msg="invalid literal/length code",n.mode=f;break}n.extra=15&L,n.mode=22;case 22:if(n.extra){for(G=n.extra;x<G;){if(0===y)break t;y--,w+=p[h++]<<x,x+=8}n.length+=w&(1<<n.extra)-1,w>>>=n.extra,x-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;L=(D=n.distcode[w&(1<<n.distbits)-1])>>>16&255,N=65535&D,!((C=D>>>24)<=x);){if(0===y)break t;y--,w+=p[h++]<<x,x+=8}if(0==(240&L)){for(R=C,A=L,P=N;L=(D=n.distcode[P+((w&(1<<R+A)-1)>>R)])>>>16&255,N=65535&D,!(R+(C=D>>>24)<=x);){if(0===y)break t;y--,w+=p[h++]<<x,x+=8}w>>>=R,x-=R,n.back+=R}if(w>>>=C,x-=C,n.back+=C,64&L){t.msg="invalid distance code",n.mode=f;break}n.offset=N,n.extra=15&L,n.mode=24;case 24:if(n.extra){for(G=n.extra;x<G;){if(0===y)break t;y--,w+=p[h++]<<x,x+=8}n.offset+=w&(1<<n.extra)-1,w>>>=n.extra,x-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=f;break}n.mode=25;case 25:if(0===_)break t;if(I=T-_,n.offset>I){if((I=n.offset-I)>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=f;break}I>n.wnext?(I-=n.wnext,k=n.wsize-I):k=n.wnext-I,I>n.length&&(I=n.length),O=n.window}else O=g,k=v-n.offset,I=n.length;I>_&&(I=_),_-=I,n.length-=I;do{g[v++]=O[k++]}while(--I);0===n.length&&(n.mode=21);break;case 26:if(0===_)break t;g[v++]=n.length,_--,n.mode=21;break;case 27:if(n.wrap){for(;x<32;){if(0===y)break t;y--,w|=p[h++]<<x,x+=8}if(T-=_,t.total_out+=T,n.total+=T,T&&(t.adler=n.check=n.flags?o(n.check,g,T,v-T):r(n.check,g,T,v-T)),T=_,(n.flags?w:m(w))!==n.check){t.msg="incorrect data check",n.mode=f;break}w=0,x=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;x<32;){if(0===y)break t;y--,w+=p[h++]<<x,x+=8}if(w!==(4294967295&n.total)){t.msg="incorrect length check",n.mode=f;break}w=0,x=0}n.mode=29;case 29:W=1;break t;case f:W=-3;break t;case 31:return-4;default:return u}return t.next_out=v,t.avail_out=_,t.next_in=h,t.avail_in=y,n.hold=w,n.bits=x,(n.wsize||T!==t.avail_out&&n.mode<f&&(n.mode<27||4!==e))&&E(t,t.output,t.next_out,T-t.avail_out)?(n.mode=31,-4):(b-=t.avail_in,T-=t.avail_out,t.total_in+=b,t.total_out+=T,n.total+=T,n.wrap&&T&&(t.adler=n.check=n.flags?o(n.check,g,T,t.next_out-T):r(n.check,g,T,t.next_out-T)),t.data_type=n.bits+(n.last?64:0)+(n.mode===d?128:0)+(20===n.mode||15===n.mode?256:0),(0===b&&0===T||4===e)&&W===c&&(W=-5),W)},e.inflateEnd=function(t){if(!t||!t.state)return u;var e=t.state;return e.window&&(e.window=null),t.state=null,c},e.inflateGetHeader=function(t,e){var n;return t&&t.state?0==(2&(n=t.state).wrap)?u:(n.head=e,e.done=!1,c):u},e.inflateSetDictionary=function(t,e){var n,i=e.length;return t&&t.state?0!==(n=t.state).wrap&&11!==n.mode?u:11===n.mode&&r(1,e,i,0)!==n.check?-3:E(t,e,i,i)?(n.mode=31,-4):(n.havedict=1,c):u},e.inflateInfo="pako inflate (from Nodeca project)"},6120:(t,e,n)=>{"use strict";var i=n(12),r=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(t,e,n,c,u,l,d,f){var p,g,m,h,v,y,_,w,x,b=f.bits,T=0,S=0,E=0,I=0,k=0,O=0,C=0,L=0,N=0,R=0,A=null,P=0,M=new i.Buf16(16),W=new i.Buf16(16),U=null,G=0;for(T=0;T<=15;T++)M[T]=0;for(S=0;S<c;S++)M[e[n+S]]++;for(k=b,I=15;I>=1&&0===M[I];I--);if(k>I&&(k=I),0===I)return u[l++]=20971520,u[l++]=20971520,f.bits=1,0;for(E=1;E<I&&0===M[E];E++);for(k<E&&(k=E),L=1,T=1;T<=15;T++)if(L<<=1,(L-=M[T])<0)return-1;if(L>0&&(0===t||1!==I))return-1;for(W[1]=0,T=1;T<15;T++)W[T+1]=W[T]+M[T];for(S=0;S<c;S++)0!==e[n+S]&&(d[W[e[n+S]]++]=S);if(0===t?(A=U=d,y=19):1===t?(A=r,P-=257,U=o,G-=257,y=256):(A=a,U=s,y=-1),R=0,S=0,T=E,v=l,O=k,C=0,m=-1,h=(N=1<<k)-1,1===t&&N>852||2===t&&N>592)return 1;for(;;){_=T-C,d[S]<y?(w=0,x=d[S]):d[S]>y?(w=U[G+d[S]],x=A[P+d[S]]):(w=96,x=0),p=1<<T-C,E=g=1<<O;do{u[v+(R>>C)+(g-=p)]=_<<24|w<<16|x|0}while(0!==g);for(p=1<<T-1;R&p;)p>>=1;if(0!==p?(R&=p-1,R+=p):R=0,S++,0==--M[T]){if(T===I)break;T=e[n+d[S]]}if(T>k&&(R&h)!==m){for(0===C&&(C=k),v+=E,L=1<<(O=T-C);O+C<I&&!((L-=M[O+C])<=0);)O++,L<<=1;if(N+=1<<O,1===t&&N>852||2===t&&N>592)return 1;u[m=R&h]=k<<24|O<<16|v-l|0}}return 0!==R&&(u[v+R]=T-C<<24|64<<16|0),f.bits=k,0}},9451:t=>{"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},2976:(t,e,n)=>{"use strict";var i=n(12);function r(t){for(var e=t.length;--e>=0;)t[e]=0}var o=256,a=286,s=30,c=15,u=16,l=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],d=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],p=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],g=new Array(576);r(g);var m=new Array(60);r(m);var h=new Array(512);r(h);var v=new Array(256);r(v);var y=new Array(29);r(y);var _,w,x,b=new Array(s);function T(t,e,n,i,r){this.static_tree=t,this.extra_bits=e,this.extra_base=n,this.elems=i,this.max_length=r,this.has_stree=t&&t.length}function S(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function E(t){return t<256?h[t]:h[256+(t>>>7)]}function I(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function k(t,e,n){t.bi_valid>u-n?(t.bi_buf|=e<<t.bi_valid&65535,I(t,t.bi_buf),t.bi_buf=e>>u-t.bi_valid,t.bi_valid+=n-u):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=n)}function O(t,e,n){k(t,n[2*e],n[2*e+1])}function C(t,e){var n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}function L(t,e,n){var i,r,o=new Array(c+1),a=0;for(i=1;i<=c;i++)o[i]=a=a+n[i-1]<<1;for(r=0;r<=e;r++){var s=t[2*r+1];0!==s&&(t[2*r]=C(o[s]++,s))}}function N(t){var e;for(e=0;e<a;e++)t.dyn_ltree[2*e]=0;for(e=0;e<s;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function R(t){t.bi_valid>8?I(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function A(t,e,n,i){var r=2*e,o=2*n;return t[r]<t[o]||t[r]===t[o]&&i[e]<=i[n]}function P(t,e,n){for(var i=t.heap[n],r=n<<1;r<=t.heap_len&&(r<t.heap_len&&A(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!A(e,i,t.heap[r],t.depth));)t.heap[n]=t.heap[r],n=r,r<<=1;t.heap[n]=i}function M(t,e,n){var i,r,a,s,c=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*c]<<8|t.pending_buf[t.d_buf+2*c+1],r=t.pending_buf[t.l_buf+c],c++,0===i?O(t,r,e):(O(t,(a=v[r])+o+1,e),0!==(s=l[a])&&k(t,r-=y[a],s),O(t,a=E(--i),n),0!==(s=d[a])&&k(t,i-=b[a],s))}while(c<t.last_lit);O(t,256,e)}function W(t,e){var n,i,r,o=e.dyn_tree,a=e.stat_desc.static_tree,s=e.stat_desc.has_stree,u=e.stat_desc.elems,l=-1;for(t.heap_len=0,t.heap_max=573,n=0;n<u;n++)0!==o[2*n]?(t.heap[++t.heap_len]=l=n,t.depth[n]=0):o[2*n+1]=0;for(;t.heap_len<2;)o[2*(r=t.heap[++t.heap_len]=l<2?++l:0)]=1,t.depth[r]=0,t.opt_len--,s&&(t.static_len-=a[2*r+1]);for(e.max_code=l,n=t.heap_len>>1;n>=1;n--)P(t,o,n);r=u;do{n=t.heap[1],t.heap[1]=t.heap[t.heap_len--],P(t,o,1),i=t.heap[1],t.heap[--t.heap_max]=n,t.heap[--t.heap_max]=i,o[2*r]=o[2*n]+o[2*i],t.depth[r]=(t.depth[n]>=t.depth[i]?t.depth[n]:t.depth[i])+1,o[2*n+1]=o[2*i+1]=r,t.heap[1]=r++,P(t,o,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var n,i,r,o,a,s,u=e.dyn_tree,l=e.max_code,d=e.stat_desc.static_tree,f=e.stat_desc.has_stree,p=e.stat_desc.extra_bits,g=e.stat_desc.extra_base,m=e.stat_desc.max_length,h=0;for(o=0;o<=c;o++)t.bl_count[o]=0;for(u[2*t.heap[t.heap_max]+1]=0,n=t.heap_max+1;n<573;n++)(o=u[2*u[2*(i=t.heap[n])+1]+1]+1)>m&&(o=m,h++),u[2*i+1]=o,i>l||(t.bl_count[o]++,a=0,i>=g&&(a=p[i-g]),s=u[2*i],t.opt_len+=s*(o+a),f&&(t.static_len+=s*(d[2*i+1]+a)));if(0!==h){do{for(o=m-1;0===t.bl_count[o];)o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[m]--,h-=2}while(h>0);for(o=m;0!==o;o--)for(i=t.bl_count[o];0!==i;)(r=t.heap[--n])>l||(u[2*r+1]!==o&&(t.opt_len+=(o-u[2*r+1])*u[2*r],u[2*r+1]=o),i--)}}(t,e),L(o,l,t.bl_count)}function U(t,e,n){var i,r,o=-1,a=e[1],s=0,c=7,u=4;for(0===a&&(c=138,u=3),e[2*(n+1)+1]=65535,i=0;i<=n;i++)r=a,a=e[2*(i+1)+1],++s<c&&r===a||(s<u?t.bl_tree[2*r]+=s:0!==r?(r!==o&&t.bl_tree[2*r]++,t.bl_tree[32]++):s<=10?t.bl_tree[34]++:t.bl_tree[36]++,s=0,o=r,0===a?(c=138,u=3):r===a?(c=6,u=3):(c=7,u=4))}function G(t,e,n){var i,r,o=-1,a=e[1],s=0,c=7,u=4;for(0===a&&(c=138,u=3),i=0;i<=n;i++)if(r=a,a=e[2*(i+1)+1],!(++s<c&&r===a)){if(s<u)do{O(t,r,t.bl_tree)}while(0!=--s);else 0!==r?(r!==o&&(O(t,r,t.bl_tree),s--),O(t,16,t.bl_tree),k(t,s-3,2)):s<=10?(O(t,17,t.bl_tree),k(t,s-3,3)):(O(t,18,t.bl_tree),k(t,s-11,7));s=0,o=r,0===a?(c=138,u=3):r===a?(c=6,u=3):(c=7,u=4)}}r(b);var D=!1;function B(t,e,n,r){k(t,0+(r?1:0),3),function(t,e,n,r){R(t),I(t,n),I(t,~n),i.arraySet(t.pending_buf,t.window,e,n,t.pending),t.pending+=n}(t,e,n)}e._tr_init=function(t){D||(function(){var t,e,n,i,r,o=new Array(c+1);for(n=0,i=0;i<28;i++)for(y[i]=n,t=0;t<1<<l[i];t++)v[n++]=i;for(v[n-1]=i,r=0,i=0;i<16;i++)for(b[i]=r,t=0;t<1<<d[i];t++)h[r++]=i;for(r>>=7;i<s;i++)for(b[i]=r<<7,t=0;t<1<<d[i]-7;t++)h[256+r++]=i;for(e=0;e<=c;e++)o[e]=0;for(t=0;t<=143;)g[2*t+1]=8,t++,o[8]++;for(;t<=255;)g[2*t+1]=9,t++,o[9]++;for(;t<=279;)g[2*t+1]=7,t++,o[7]++;for(;t<=287;)g[2*t+1]=8,t++,o[8]++;for(L(g,287,o),t=0;t<s;t++)m[2*t+1]=5,m[2*t]=C(t,5);_=new T(g,l,257,a,c),w=new T(m,d,0,s,c),x=new T(new Array(0),f,0,19,7)}(),D=!0),t.l_desc=new S(t.dyn_ltree,_),t.d_desc=new S(t.dyn_dtree,w),t.bl_desc=new S(t.bl_tree,x),t.bi_buf=0,t.bi_valid=0,N(t)},e._tr_stored_block=B,e._tr_flush_block=function(t,e,n,i){var r,a,s=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,n=4093624447;for(e=0;e<=31;e++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<o;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),W(t,t.l_desc),W(t,t.d_desc),s=function(t){var e;for(U(t,t.dyn_ltree,t.l_desc.max_code),U(t,t.dyn_dtree,t.d_desc.max_code),W(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*p[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(a=t.static_len+3+7>>>3)<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!==e?B(t,e,n,i):4===t.strategy||a===r?(k(t,2+(i?1:0),3),M(t,g,m)):(k(t,4+(i?1:0),3),function(t,e,n,i){var r;for(k(t,e-257,5),k(t,n-1,5),k(t,i-4,4),r=0;r<i;r++)k(t,t.bl_tree[2*p[r]+1],3);G(t,t.dyn_ltree,e-1),G(t,t.dyn_dtree,n-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),M(t,t.dyn_ltree,t.dyn_dtree)),N(t),i&&R(t)},e._tr_tally=function(t,e,n){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(v[n]+o+1)]++,t.dyn_dtree[2*E(e)]++),t.last_lit===t.lit_bufsize-1},e._tr_align=function(t){k(t,2,3),O(t,256,g),function(t){16===t.bi_valid?(I(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},6092:t=>{"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var o=e[i]={exports:{}};return t[i].call(o.exports,o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};(()=>{"use strict";n.r(i),n.d(i,{Core:()=>z,EventHub:()=>c.i,I18n:()=>V});var t=n(8856),e=(n(1088),n(9952),n(3001)),r=n(3552),o=n(7556),a=n(5776),s=n(9376),c=n(6348),u=n(6496),l=n(6784),d=n(7828),f=n(568),p=n(2392),g=n(4872),m=n(7320),h=n(7404),v=n(4072),y=n(1304),_=n(3004),w=n(6276),x=n(4404),b=n(1372),T=n(5032),S=n(9200);let E;function I(t){return(0,h.uK)().offline_survey_id&&(0,a.q_)(t.nodes).autoCpltGroups.forEach((t=>{t.data.forEach((t=>{t.icon=(0,_.G)(t.icon)}))})),t}function k(e){e.handleEvents={async handleLangChange(n){await(0,u.Sk)(n.locale,!1)||(0,t.e)(e,{showInitLangSelect:!1})},async handleNextClick(){e.nextLoading||((0,y.ye)(e,!0),await(0,t.E3)().fetchSurveyState(),(0,t.W4)().app.gotoSurveyPage((0,h.uK)()),(0,y.ye)(e,!1))}}}async function O(){if((0,t.E3)().startState)return(0,t.E3)().startState;const n=await async function(){const e=await(0,t.W4)().dev.getCustomSurveyMeta();if(e)return e;{const e=(0,t.E3)().sid;return(0,l.U7)(),E||(0,m.qU)(e)}}();!function(e){if((0,t.E3)().preview)return void(E=e);if(E)return;E=e;const{collector:{channel_configs:n}}=e,i=(0,t.W4)().name,r=n.find((t=>t.type===i));if(r){if(!r.allow_response)throw(0,t.E3)().error((0,m.O)(m.FW.interviewee_invalid_error)),new Error(m.FW.interviewee_invalid_error);E.channel=r,(0,t.W4)().auth.authorize(E)}else E.channel={type:i}}(n),await(0,t.W4)().auth.init(n);const i=await async function(e){const n=await(0,t.W4)().dev.getCustomSurveyPayload();if(n)return{cfpd:n,surveyMeta:e};{let n;try{n=await(e.start_auto?(0,m.kj)(e.diagram_url,{type:"GET"},!0):(0,m.kj)(e.smaller_diagram_url,{type:"GET"},!0))}catch(e){throw(0,t.E3)().error((0,u.GS)(f.CW.global.downloadError)),e}const i=await(0,g.K)(n);return function(e){if(!e.version)return(0,t.E3)().error((0,u.GS)(f.CW.global.upgrade)),void(0,t.E3)().customAbort();e.version<2&&e.nodes.forEach((t=>{let e=[];t.options&&(e=e.concat(t.options)),(0,w.yy)(t)&&(e=e.concat(t.otherOptions)),e.forEach((t=>{10===t.mutexNumber&&(t.mutexNumber=-1)}))}))}(i),{surveyMeta:e,cfpd:I(i)}}}(n),h=await async function(e){var n;const{surveyMeta:i,cfpd:r}=e,{mediaLibrary:s,surveyId:c,disabledLangs:l,testCases:f,variables:p}=r,g=(0,o.c5)(r.nodes,r.nodeGroups),m=(0,a.q_)(g);let h=[];r.langPack?(r.langPack=function(t){if(t instanceof Array)return t;{const e=[];return Object.keys(t).forEach((n=>{const i=t[n];e.push({id:"",locale:n,content:i})})),e}}(r.langPack),h=r.langPack.map((t=>({locale:t.locale,content:t.content})))):i.langs&&(h=i.langs),h=h.filter((t=>t.locale!==m.currentLang));const v=m.currentLang,y=[v,...h.map((t=>t.locale))],_=(null!==(n=null===S.c||void 0===S.c?void 0:S.c.langTable)&&void 0!==n?n:[]).filter((t=>y.includes(t.locale)&&!(null==l?void 0:l.includes(t.locale)))),w=await(0,u.Mh)(_,v),x=!!(0,t.W4)().storage.get("lang-resume");x&&(0,t.W4)().storage.remove("lang-resume"),(0,u.YP)(w);const b={imageList:s.imageList,videoList:s.videoList,nodeList:g,theme:r.theme,nodeGroups:r.nodeGroups||[],variables:(0,o.SA)(r.variables),surveyMeta:E,embedApis:r.embedApis||[],varStyles:r.varStyles,surveyId:c,langs:h,language:w,langTable:_,langResume:x,testCases:f,disabledLangs:l||[],publishedAt:i.published_at,presetRichStyles:r.presetRichStyles};return w===v||(m.i18n&&(0,d.QJ)(m,m.i18n[w]),p.forEach((t=>{t.i18n&&(0,d.gz)(t,t.i18n[w])}))),b}(i),y=await async function(e){if((0,t.E3)().startState)return(0,t.E3)().startState;const{imageList:n,nodeList:i,theme:r,variables:o,varStyles:l,surveyId:d,langResume:p,nodeGroups:g}=e,m=(0,a.q_)(i),{imgScale:h,imgTransType:y,imgTransTime:_,imgPosition:w,welcomeUrl:T,startAuto:S,noWxShare:I,startBtnText:O,hasVar:C,layout:L,showInitLangSelect:N}=m;(0,b.a)(e.presetRichStyles);const R={imageList:n,variables:o,varStyles:l};(0,v.YV)(R);const A=await(0,s.Q9)({},{origin:m}),{interviewee:P}=E,M=P?P.raw_data:(0,t.W4)().auth.userInfo||{},W={...R,embedApis:e.embedApis,nodeGroups:g,origin:m,publishedAt:e.publishedAt,type:m.type,nodeName:m.nodeName,langResume:p,langTable:e.langTable,eventHub:c.i,language:e.language||"en_us",layout:L,startNode:m,sid:(0,t.E3)().sid,noWxShare:I,preview:(0,t.E3)().preview,images:A,surveyId:d,...(0,x.Y)(m),nextButton:O||(0,u.GS)(f.CW.global.start),theme:r.usingTheme,imgScale:h,imgPosition:w,imgTransType:y,imgTransTime:_,welcomeUrl:T,userInfo:M,hasVar:C,parsedPayload:e,startAuto:S||p,showInitLangSelect:(0,u.Mt)(N,e.langTable)};return k(W),W}(h);return await async function(t){const n={state:t},{origin:i}=t,{startName:o,qsnrName:a,questionText:s,describe:u,template:l}=i;t.title=await(0,e.qQ)((0,r.q)(o||a),n),t.summary=await(0,e.qQ)(s,n),t.description=await(0,e.qQ)(u,n),t.template=await(0,T.m)(l,n.state),(0,p.y)(t.theme),(0,c.U3)({origin:i})}(y),await(0,t.W4)().hook.afterFetchStart(y),(y.startAuto||(0,t.W4)().dev.autoRun)&&(y.hidden=!0,(0,t.E3)().startState=y,await y.handleEvents.handleNextClick()),y}var C=n(9948),L=n(1428),N=(n(7768),n(2352));async function R(){return null}const A={name:"other",dev:{parseRealUrl:t=>t,getCustomSurveyPayload:R,getCustomSurveyMeta:R,local:!1,debug:!1,autoRun:!1,realtime:!1,infer:!1},app:{reload(){},openWebLink(){},canHandleReward:()=>!1,getRewardUrl(t){const e=(0,h.SC)(t);return(0,h.Ww)("https:/live.choiceform.com/reward",e)}},network:{initUploader(){},connectSocket(){},closeSocket(){},pushSocket(){}},storage:null,auth:{userInfo:{},init:R,authorize(){},authorizeGift(){},retrieveAuthSurveyMeta:()=>null},hook:{afterFetchReward:R,afterFetchStart:R,afterFetchSurvey:R,afterSetup:R,beforeSetupEnd:R,beforeForceLeave(){},onLangChange(){},onSwitchPage(){},onTitleChange(){},beforeEndSurvey:R,onEndSurvey:R,onRestartSurvey:R,onResumeSurvey:R,onStartNewSurvey:R,beforeGotoNext:R},system:{device:{browser:{name:"",version:""},device:{type:"",vendor:"",model:""},engine:{name:"",version:""},os:{name:"",version:""}},getReferer:()=>"",getLang:()=>"en_us",functionConstructor:Function,translate(t,e){if(e){let n=e?(0,u.At)(t):t;return e&&Object.keys(e).forEach((t=>{n=n.replace(new RegExp("{".concat(t,"}"),"g"),(0,N.Wo)(e[t]))})),n}return t}},ui:{setGlobalStyle(){},setVarStyle(){},loadNodeComponent:R,loadUiEntryTemplates:R,setPresetStyle(){}}};function P(t,e){Object.keys(e).forEach((n=>{const i=e[n];"object"==typeof i?t[n]?null!==i&&P(t[n],i):t[n]=i:void 0!==i&&(t[n]=i)}))}function M(t){return P(A,t),A}var W=n(840);const U={key:"",dynamic:!1,treeUrl:"",templatePath:"",useWxSdk:!1,hostConfig:{LOGO_NAME:"cform",qStaticHost:"https://media.choiceform.com/q-static-assets",recordUrl:"https://tracking.choiceform.com/api/records",host:"https://osapi.choiceform.com",wsHost:"wss://osapi.choiceform.com",cdnHost:"https://media.choiceform.com/os-client-live",mediaHost:"https://media.choiceform.com",publicHost:"https://public.choiceform.com"},setTheme(){},locateError(){},langSrcMap:null,setLocale(){},customAbort(){},switchRoute(){},uploadLog(t){console.info(t)}};var G=n(1344),D=n(1548),B=n(5684),F=n(4316),q=n(8792);function j(){if(!z.initialized)throw new Error("CCCore not yet initialized")}const z={releaseVersion:"3.6.59",releaseDate:"2024-2-28",cfpd:S.c,eventHub:c.i,notifySuspended:!1,theme:(0,p.U)(),util:{convertVarStyle:v.UJ,getTaskInfo:D.S,getAnswer:B.cA,addStartStateDynamics(t){k(t)},addSurveyStateDynamics(t){(0,C.Gg)(t)},addNodeDynamics(t){(0,a.CY)(t)},addOptionDynamics(t){(0,F.yt)(t)},extendImageListGetter(t){(0,v.sf)(t)},loadFakeServers:t=>(0,q.U)(t,!1)},registerEnv(e){const n=M(e);(0,t.oB)(n),z.env=n},async setup(e){if(z.initialized)return z;if(e.dynamic){if(!e.templatePath||!e.treeUrl)throw new Error("setup error, you configed your client as dynanmic, so must provide tempaltePath and treeUrl");if(!e.treeUrl.startsWith("/"))throw new Error("setup error, treeUrl must be absolute path")}Object.assign(z,function(t){const e={...U.hostConfig,...t.hostConfig};return Object.assign(U,{...t,hostConfig:e}),U}(e));const n=(0,h.uK)(),i=n.sid;if(!i&&!(0,t.W4)().dev.realtime)throw new Error("setup error, must provide sid");z.sid=i,z.realTimePreview=(0,t.W4)().dev.realtime;const r=n.type;z.preview=z.realTimePreview||z.sid.length>30||"edit_template"===r||"preview_template"===r,z.preview?z.needPreviewFlag="1"!==n.ban_preview_bar:z.offlineTaskId=n.offline_task_id;const o=z.setTheme;z.setTheme=t=>{o(t),z.themeUpdated=!0,c.i.trigger("SET_PROPS")},(0,f.qq)(z.langSrcMap);const a=z.customAbort;z.customAbort=()=>{throw a&&a(),z.notifySuspended=!0,setTimeout((()=>{z.notifySuspended=!1}),1e3),new Error("custom_abort")};const s=z.error;z.error=t=>{z.startState||z.rewardState||z.setTheme((0,p.U)()),s(t),z.crashed=!0};const l=z.notify;z.notify=t=>{z.notifySuspended||(z.startState||z.rewardState||z.setTheme((0,p.U)()),l(t))},(0,t.W4)().dev.debug&&(z.hostConfig.host="https://osapi.choiceform.com",z.hostConfig.cdnHost="https://media.choiceform.com/os-client-live",z.hostConfig.mediaHost="https://media.choiceform.com"),n.offline_survey_id&&(z.hostConfig.cdnHost=(0,_.G)(z.hostConfig.cdnHost),z.hostConfig.mediaHost=(0,_.G)(z.hostConfig.mediaHost)),z.hostConfig.qApiHost=z.hostConfig.host+"/q/v1",await(0,t.W4)().hook.beforeSetupEnd(z),(0,t.oV)(z),z.initialized=!0,await(0,t.W4)().hook.afterSetup(z),await(0,t.W4)().hook.beforeSetupEnd(z);const d=await(0,u.Mh)(S.c.langTable,"zh_cn");return(0,f.Ki)(d),z},async fetchStartState(){j();const e=await O();return e&&(e.core=z,z.startState=e,(0,t.W4)().hook.onTitleChange(e.title),c.i.trigger("SET_PROPS")),e},async fetchSurveyState(){j(),z.startState&&(0,y.ye)(z.startState,!0);const e=await(0,C.q0)();return e&&(e.core=z,z.surveyState=e,(0,y.ye)(z.startState,!1),(0,t.W4)().hook.onTitleChange(e.title),c.i.trigger("SET_PROPS")),e},async fetchRewardState(){j();const e=await(0,L.uO)();return e&&(e.core=z,z.rewardState=e,(0,t.W4)().hook.onTitleChange(e.quesTitle),c.i.trigger("SET_PROPS")),e},reset(){z.offlineTaskId="",z.initialized=!1,E=null,z.startState=null,z.surveyState=null,(0,L.oD)(),z.rewardState=null,(0,h.gh)(),(0,W.S)(),(0,G.IN)()}},V={mergeLangSrcMap:f.qq,getLangSrcMap:f.Y1}})();var r=exports;for(var o in i)r[o]=i[o];i.__esModule&&Object.defineProperty(r,"__esModule",{value:!0})})();
|