@choiceform/os-client-core 3.6.73 → 3.6.74

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/dist/core.js CHANGED
@@ -1 +1 @@
1
- (()=>{var e={9200:(e,t,n)=>{"use strict";var i=n(3548),r=n(512),o={inflateBase64:function(e){return e=r.Base64.atob(e),(0,i.inflate)(e,{to:"string"})},deflateBase64:function(e){return e=(0,i.deflate)(e,{to:"string"}),r.Base64.btoa(e)},inflatePrefix:function(e){return e=e.substr(7),(0,i.inflate)(e,{to:"string"})},deflatePrefix:function(e){return":CF_PD:"+(e=(0,i.deflate)(e,{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:"ms_my",value:"Bahasa Melayu",bdCode:"may",comment:"马来语"},{locale:"my_mm",value:"မြန်မာ",bdCode:"bur",comment:"缅甸语"},{locale:"ne_np",value:"नेपाली",bdCode:"nep",comment:"尼泊尔语"},{locale:"nl_nl",value:"Nederlands",bdCode:"nl",comment:"荷兰语"},{locale:"no",value:"Bokmål",bdCode:"nor",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:"越南语"}]};t.c=o},568:(e,t,n)=>{"use strict";n.d(t,{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(e){e&&(Object.keys(e).forEach((t=>{i[t.toLowerCase()]=e[t]})),o=i[r])}function s(){return{...i}}function c(e){r=e.toLowerCase(),o=i[r]||i.en_us}function u(){return r}},5684:(e,t,n)=>{"use strict";n.d(t,{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 m=["select","icon_mark","value_mark","upload","menu","slide_rate"],g=["fill","verify"];function h(e){const{type:t}=e;return"region"===t?"predef":t}function v(e,t){const{origin:n}=t;let i;if(t.isOtherOpt)i=n.optionType;else if(!0===n.useComment)i="option_comment";else{const{type:t}=e;i="region"===t?"predef_region":m.includes(t)?"option":g.includes(t)?"comment":t}return i}function y(e,t){const n=function(e){const{loop:t}=e;let n;return t&&(n=t.replacements.map((e=>({node_id:e.loopNodeId.toLowerCase(),index:e.index,option_id:e.uuid.toLowerCase()})))),n}(e),{nodeUuid:i}=e,r=t&&t(e);return{type:h(e),node_id:i.toLowerCase(),items:r,start_time:e.startTime,cost_time:Math.round(e.costTime||0),loop_ctxs:n}}function _(e,t){const n=(0,i.Ml)(t),r=(0,p.O_)(t,e),o={value:(0,f.oV)(r)?"":r,other:!!t.isOtherOpt,type:v(e,t)};if(o.option_id=t.uuid.toLowerCase(),(0,s.is)(t,"xid"in t)){const{optionY:e,optionX:n,xid:i,yid:r}=t;o.row_option_id=r.toLowerCase(),o.col_option_id=i.toLowerCase(),o.row_content=(0,c.Qr)(e.text),o.col_content=(0,c.Qr)(n.text),o.content=o.col_content+"-"+o.row_content}else o.content=n||(0,c.Qr)(t.text);return t.visible||(o.hidden=!0),o}function w(e){return(0,i.gr)(e).reduce(((t,n)=>{var i;return(n.selected||(0,p.QX)(n,e)||void 0===n.selected&&!0===(null===(i=null==n?void 0:n.__cache)||void 0===i?void 0:i.selected))&&t.push(_(e,n)),t}),[])}const x={};function b(e){const t=x[e.type];return t&&t(e)}function T(e){return"object"==typeof e.value?JSON.stringify(e.value):e.value}function S(e,t){return"all"===t||(e?"check"===t:"normal"===t)}async function E(e,t="all",n="committed_url",i=!1){const a=function(e,t){const n=[];return e.renderList.forEach((e=>{if(!S(e.checkMode,t))return;if("data"===e.type)return;const i=b(e);i&&n.push(i)})),n}(e,t),c=i?void 0:await(0,l.ML)(e,n),u={backend_request_params:await(0,l.m0)(e),webhook_params:c,answers:a,var_map_info:(0,o.oJ)(e,t),options_display_info:(0,r.Ud)(e,t),query_params:(0,d.uK)(),time_consuming:Math.ceil((Date.now()-e.startTime)/1e3),status:e.responseStatus};return(0,s.OI)(u.answers,((e,t)=>{"string"==typeof e[t]&&(e[t]=e[t].replace(/,/g,",").replace(/[\r\n]/g," "))})),u}function I(e){switch(e.type){case"verify":return!!e.code;case"location":case"region":case"area":return!!e.value;case"describe":case"lottery":case"end":return!0;default:return(0,i.W4)(e)||(0,i.Om)(e)}}x.select=x.select_image=x.menu=x.select_icon=x.hot_spot=e=>{const t=y(e,w);if((0,u.cd)(e.origin)&&t.items){let e=!1,n=!1;t.items.forEach((t=>{"comment"!==t.type&&(t.hidden?e=!0:n=!0),delete t.hidden})),e&&n&&(t.items=t.items.filter((e=>!e.hidden)))}return t},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=e=>{const t=y(e,w);return t.items&&t.items.forEach((e=>{delete e.hidden})),t},x.location=e=>{const t=y(e,(t=>{const n=(0,i.gr)(e).find((e=>e.selected));return n?[_(t,n)]:[]})),{position:n,indexes:r}=e;return n&&(n.indexes=r,t.location=n),t},x.region=e=>{const t=x.location(e);return t.region=(0,a.Qf)(e.value),t},x.area=e=>x.location(e),x.data=e=>y(e,(e=>(0,i.gr)(e).reduce(((t,n)=>(n.selected&&t.push(_(e,n)),t)),[]))),x.verify=e=>{const t=y(e),{phoneNumber:n,validateType:i,code:r}=e;return"sms"===i&&(t.phone_num=n),t.code=r,t},x.end=e=>({type:h(e),node_id:e.nodeUuid.toLowerCase(),start_time:e.startTime,cost_time:0}),x.logic=e=>{const t=y(e);return t.logic_result=e.logicResult,t}},9536:(e,t,n)=>{"use strict";n.d(t,{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(e){(0,s.e)(e,{selected:!1,value:""})}function d(e,t,n){const o=(0,i.wR)(t);let a=!1,s=!1;return o.forEach((t=>{t!==e&&(0,r.A9)(t,e)&&(t.isOtherOpt?(s=!0,l(t)):(a=!0,n(t)))})),{normalPushed:a,otherPushed:s}}const f={};async function p(e,t){if(!(0,c.g7)(e,t))return;const n=f[t.type];n?await n(e,t):function(e,t){d(e,t,l)}(e,t)}f.heat_map=(e,t)=>{d(e,t,(e=>{(0,s.e)(e,{point:null,value:""})}))},f.upload=async(e,t)=>{const{normalPushed:n}=d(e,t,(e=>{(0,s.e)(e,{value:"",miniValue:"",filePath:"",progress:0,isImage:!1,fileType:"",fileName:"",fileLimits:[],image:null})}));n&&await(0,a.SY)(t)},f.weight=(e,t)=>{const{normalPushed:n}=d(e,t,(e=>{(0,s.e)(e,{value:""})}));n&&t.options.forEach((e=>{(0,s.e)(e,{percent:(0,i.e$)(Number(e.value),t.weightTotal)})}))},f.sequence=(e,t)=>{const{normalPushed:n}=d(e,t,(e=>{(0,s.e)(e,{selected:!1,sortNo:-1})}));n&&t.options.sort(((e,t)=>e.number>t.number?1:-1))},f.matrix=(e,t)=>{(0,i.wR)(t).forEach((t=>{if(t===e)return;const n=(0,r.I9)(e.origin)||(0,r.E5)(e,t),i=(0,r.I9)(t.origin)||(0,r.E5)(t,e),o=(0,r.IN)(e,t)||(0,r.IN)(e,t.optionX)||(0,r.IN)(e,t.optionY)||(0,r.IN)(e.optionX,t)||(0,r.IN)(e.optionY,t)||(0,r.u6)(e,t);(n||i||o)&&l(t)}))},f.cascade=(e,t)=>{const n=(e,t)=>{if(!t||!t.list)return[];if(t.list.find((t=>t.option===e)))return[...t.list];for(const i of t.list){const t=n(e,i);if(t.length>0)return t}return[]},i=t.otherOptions,a=i.includes(e)?[...t.cascade.list]:n(e,t.cascade);i.forEach((e=>{a.push({option:e})})),a.forEach((n=>{n.option!==e&&(0,r.A9)(n.option,e)&&(n.display?(0,o.gF)(n,t):l(n.option))}))}},4384:(e,t,n)=>{"use strict";n.d(t,{Az:()=>i,ay:()=>o,yK:()=>r});const i={refresh:!1,result:!1},r={refresh:!0,result:!0},o={refresh:!1,result:!0}},7801:(e,t,n)=>{"use strict";n.d(t,{_:()=>s,i:()=>a});var i=n(5776),r=n(8856),o=n(5684);function a(e,t){const{nodes:n}=e.parent;return!n.includes(e)&&(t&&(0,r.E3)().uploadLog("".concat(e.runtimeNodeName,": try to change answer after question leaving and rejected"),"warning"),!0)}function s(e,t){const n=e.renderList.filter((e=>!((0,i.S)(e)||!(0,o.Ci)(e.checkMode,t)||!(0,i.K6)(e.origin)||(0,o.Qz)(e))));if(n.length>0){const e=n.map((e=>e.runtimeNodeName)).join();(0,r.E3)().uploadLog("answer lack for: ".concat(e),"warning")}}},1548:(e,t,n)=>{"use strict";n.d(t,{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(e){return e.code?e.phone_num?e.phone_num+" "+e.code:e.code:e.location?(0,a.A)(e.location.address):""}function l(e,t){const n=(0,o.E3)().startState,a=[{title:(0,s.Qr)(n.title),description:(0,s.Qr)(n.description)}];return t.forEach((t=>{const n=(0,i.Uq)(e,t);if(!(0,r.S)(n)){const e={title:(0,s.Qr)(n.title)||n.runtimeNodeName,description:(0,s.Qr)(n.description),value:u(t),options:t.items?t.items.map((e=>({text:e.row_content||e.col_content?e.row_content+"-"+e.col_content:e.content,value:(0,c.wr)(e).toString()}))):[]};a.push(e)}})),a}async function d(){const{surveyState:e}=(0,o.E3)();if(!e)return null;const t=await(0,c.gp)(e,"all");return{result:t,progress:e.progress,nodes:l(e,t.answers)}}},7788:(e,t,n)=>{"use strict";n.d(t,{YZ:()=>g,qc:()=>h,qo:()=>m});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 m(e,t){if(e){const{parent:n}=t;return(0,i.eU)({state:n,request:e,customParam:null,silent:!1})}return d}async function g(e,t){if(e){const{message:n}=e;return await(0,r.wx)(t,e)?d:{valid:!1,message:n||(0,c.GS)(l.CW.verify.invalidFailed)}}return d}async function h(e,t=!1){if(!e.parent.nextLoading&&!t)return d;e.validateFailed=!1;const{origin:n,parent:i}=e,{validation:r}=n;if(!r)return d;const{request:c,logic:l,noPreventNext:h}=r;let v=await m(c,e);return v.valid&&(v=await g(l,i)),!v.valid&&(e.validateFailed=!0,h&&(v=d,(0,a.mU)(i,e)),v.dueToNode=e,await async function(e,t){return"string"!=typeof e.message||(e.message=await(0,s.Oj)(e.message,{state:t}),(0,o.mK)(e.message)||(e.message=await(0,s.qQ)(e.message,{state:t})),e.message.startsWith(f)?(e.type="vital",e.message=e.message.substring(f.length)):e.message.startsWith(p)&&(e.type="alert",e.message=e.message.substring(p.length))),e}(v,i),e.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:(e,t,n)=>{"use strict";n.d(t,{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),m=n(1768),g=n(1344),h=n(6276);const v={valid:!0,message:""};function y(e){if(!(0,o.K6)(e.origin))return v;const t=(0,i.Om)(e)||(0,i.W4)(e);return{valid:t,message:t?"":(0,l.GS)(d.CW.global.answerRequired),messageCode:"global.answerRequired",dueToNode:e}}function _(e,t){if((0,h.IN)(e)){const{otherOptions:t}=e;if(t.some((e=>e.selected)))return 0}return t}async function w(e){if(!(0,o.K6)(e.origin)&&!(0,i.W4)(e))return v;const{options:t}=e,{parent:n}=e;let r=await(0,s.W0)(e.origin.fillMin,{state:n});r=r||t.length,r>t.length&&(r=t.length),r=_(e,r);let a=0;const c=(0,l.GS)(d.CW.fill.itemInputRequired);let u=!1;for(const n of t)(0,p.QX)(n,e)?(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:e}:u?{valid:!1,message:(0,l.GS)(d.CW.fill.inputRequired),dueToNode:e}:v}function x(e,t=!1){const n=(0,h.IN)(e)?e.otherOptions:[],r=t?n:(0,i.wR)(e),a=(0,o.K6)(e.origin),s=(0,l.GS)(d.CW.fill.itemInputRequired),c=r.filter((t=>{const n=function(e,t){const n=!0===e.origin.fillRequired,r=e.selected;return n&&(r||(0,i.yg)(e.origin)&&t)}(t,a)&&!(0,p.QX)(t,e);return n?k(t,s):O(t,s),n}))[0],u=!c;return u?v:{valid:u,message:(0,l.GS)(d.CW.fill.inputRequired),dueToNode:e,dueToOption:c}}async function b(e,t=!1){const n=t?e.options:(0,i.wR)(e),o=[];for(const t of n){let n={valid:!0};(0,p.QX)(t,e)&&(n=await(0,r.uC)(t,e)),n.valid?O(t,n.message):(k(t,n.message),o.push(n))}return o[0]||v}async function T(e){return(0,o._A)(e.origin)&&(0,i.Om)(e)?S(e):v}async function S(e){if(function(e){if("matrix"===e.type)return!1;const t=(0,i.wR)(e).find((e=>e.selected));return!(!t||!(0,m.I9)(t.origin))}(e))return v;const{min:t}=await(0,o.EH)(e,e.parent);return(0,i.wR)(e).filter((e=>!(0,i.yg)(e.origin))).filter((e=>e.selected)).length>=t?v:{valid:!1,message:(0,l.GS)(d.CW.select.limitMin,{min:t}),dueToNode:e}}const E={};async function I(e,t){if(!t.list)return v;const{multiple:n,min:i,max:o,required:a}=t,s=t.text?(0,l.GS)(d.CW.menu.listItem)+t.text:(0,l.GS)(d.CW.menu.topList),c=t.list.filter((e=>e.selected));for(const t of c){const{option:n}=t;if(n.origin.fillRequired&&!(n.value||"").toString().trim())return{valid:!1,dueToNode:e,message:(0,l.GS)(d.CW.menu.inputReq,{text:n.text})};const i=await(0,r.uC)(n,e);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:e,message:(0,l.GS)(d.CW.menu.required,{text:s})};if(n&&u<i&&u>0)return{valid:!1,dueToNode:e,message:(0,l.GS)(d.CW.menu.requiredBetween,{text:s,min:i,max:o})};for(const n of t.list){if(!n.selected)continue;const t=await I(e,n);if(!t.valid)return t}return v}function k(e,t){e.errorMessage!==t&&(0,u.e)(e,{errorMessage:t})}function O(e,t){e.errorMessage===t&&(0,u.e)(e,{errorMessage:""})}function C(e,t){(0,u.E3)().locateError(e,t)}async function L(e,t){if((0,o.S)(e)||e.readonly)return v;const n=function(e){const{origin:{canSkipVideo:t},video:n}=e;return t||!n||n.ended?v:{valid:!1,message:(0,l.GS)(d.CW.video.watchAll),dueToNode:e}}(e);if(!n.valid)return n;const i=E[e.type];let r=i?await i(e):v;return r.valid&&t&&(r=await(0,a.qc)(e)),r.valid&&k(e,r.message),r}E.select=async e=>{const t=y(e);if(!t.valid)return t;let n=await T(e);return n.valid?(n=x(e,!1),n.valid?b(e,!1):n):n},E.select_image=e=>E.select(e),E.fill=async e=>{const t=y(e);if(!t.valid)return t;let n=await w(e);return n.valid?(n=x(e,!0),n.valid?b(e,!1):n):n},E.value_mark=async e=>{const t=y(e);if(!t.valid)return t;let n=await w(e);return n.valid?(n=x(e,!0),n.valid?b(e,!0):n):n},E.icon_mark=async e=>{const t=await E.value_mark(e);return t.valid?(0,o.K6)(e.origin)&&e.options.some((e=>!("rating-nps"===e.iconName)&&"0"===e.value))?{valid:!1,message:(0,l.GS)(d.CW.global.answerRequired),messageCode:"global.answerRequired",dueToNode:e}:v:t},E.sequence=async e=>{let t=y(e);if(!t.valid)return t;const{options:n,origin:i}=e;let r=(0,o.K6)(i)?i.rankCount||n.length:0;const a=n.length;r>a&&(r=a),r=_(e,r);let s=0;const c=n.filter((e=>e.sortNo>0)).sort(((e,t)=>e.sortNo>t.sortNo?1:-1));for(let e=0;e<c.length&&c[e].sortNo===e+1;e++)s++;return r>s?{valid:!1,message:(0,l.GS)(d.CW.rank.limitMin,{min:r}),dueToNode:e}:(t=x(e,!0),t.valid?b(e,!0):t)},E.matrix=async e=>{const t=y(e);if(!t.valid)return t;let n=await async function(e){const{origin:t}=e;return(0,o.cd)(t)?v:(0,o.K6)(t)||(0,i.Om)(e)?(0,o.Un)(t)?S(e):(0,o.ct)(t)||(0,o.gd)(t)||(0,o.cx)(t)?function(e){let t,n,i;(0,o.ct)(e.origin)?(t="yid",n=e.renderOptionsY,i=!1):(0,o.gd)(e.origin)?(t="xid",n=e.renderOptionsX,i=!0):(0,o.cx)(e.origin)&&(e.renderOptionsX.length>e.renderOptionsY.length?(t="yid",n=e.renderOptionsY,i=!1):(t="xid",n=e.renderOptionsX,i=!0));const r=e.options;for(const o of n){const n=o.uuid;if(!r.some((e=>e.selected&&(0,c.oj)(e[t],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:e}}return v}(e):async function(e){const t=(0,o.S2)(e.origin);let{min:n}=await(0,o.EH)(e,e.parent);const i=t?"xid":"yid",r=e[t?"renderOptionsX":"renderOptionsY"],a=e[t?"renderOptionsY":"renderOptionsX"];n>a.length&&(n=a.length);const s=e.options;for(const o of r){const r=o.uuid;if(s.filter((e=>e.selected&&(0,c.oj)(e[i],r))).length<n)return{valid:!1,message:t?(0,l.GS)(d.CW.matrix.colLimitMin,{min:n}):(0,l.GS)(d.CW.matrix.rowLimitMin,{min:n}),dueToNode:e}}return v}(e):v}(e);return n.valid?(n=x(e,!0),n.valid?b(e,!0):n):n},E.region=async e=>!(0,o.K6)(e.origin)||e.value?v:{valid:!1,message:(0,l.GS)(d.CW.global.answerRequired),messageCode:"global.answerRequired",dueToNode:e},E.location=async e=>{const t=await E.region(e);return t.valid||(t.message=(0,l.GS)(d.CW.locate.required)),t},E.upload=async e=>{const t=y(e),{options:n}=e;if(!t.valid)return t;let r=!0,a="";const s=(0,i.iQ)(e,!0);if(!(0,o.K6)(e.origin)&&0===s)return v;const c=await(0,o.YP)(e,e.parent),{max:u}=c,f=_(e,c.min);let m=0;a=(0,l.GS)(d.CW.upload.uploadRequired);let g=!1;for(const t of n)(0,p.QX)(t,e)?(O(t,a),m+=1):!0===t.origin.fillRequired&&(k(t,a),g=!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>m?{valid:!1,message:(0,l.GS)(d.CW.upload.amountLimitMin,{min:f}),dueToNode:e}:g?{valid:!1,message:(0,l.GS)(d.CW.upload.uploadRequired),dueToNode:e}:{valid:r,message:a,dueToNode:e}},E.verify=async e=>{if((0,u.E3)().preview||(0,u.W4)().dev.infer){if(!e.code)return{valid:!1,message:(0,l.GS)(d.CW.global.answerRequired),messageCode:"global.answerRequired",dueToNode:e}}else{const t={valid:!1,message:(0,l.GS)(d.CW.verify.invalidFailed),dueToNode:e},{validateType:n}=e,{code:i,parent:r,nodeUuid:o}=e,a=()=>(e.validateFailTimes+=1,t);if("image"===n){const{serverValidations:n}=e;if(!n)return t;{const{id:e}=n;try{return await(0,f.I1)({code:i},e),v}catch(e){return a()}}}else if("password"===n){const{transactionID:e}=r,t={response_id:e,question_id:o,code:i};try{return await(0,f.eY)(t),v}catch(e){return a()}}else if("sms"===n){const{serverValidations:n}=e;if(!n)return t;{const{id:e}=n;try{return await(0,f.I1)({code:i},e),v}catch(e){return a()}}}}return v},E.menu=E.select,E.area=async e=>y(e),E.select_icon=async e=>{const t=y(e);return t.valid?T(e):t},E.weight=async e=>{if(!(0,o.K6)(e.origin)&&!(0,i.W4)(e))return v;const t=y(e);if(!t.valid)return t;let{weightTotal:n}=e;n=_(e,n);const{options:r}=e,a=r.reduce(((e,t)=>e+Number(t.value)),0);if(0===n){const t=x(e,!1);if(!t.valid)return t}return n>a&&!0!==e.origin.relax?{valid:!1,message:(0,l.GS)(d.CW.weight.totalLimitMin,{min:n}),dueToNode:e}:v},E.cascade=async e=>{if(!(0,o.K6)(e.origin)&&!(0,i.Om)(e))return v;const{cascade:t}=e,n=y(e);return n.valid?I(e,t):n},E.hot_spot=async e=>{const t=function(e){if(!(0,o.K6)(e.origin))return v;const t=(0,i.Om)(e);return{valid:t,message:t?"":(0,l.GS)(d.CW.global.answerRequired),messageCode:"global.answerRequired",dueToNode:e}}(e);if(!t.valid)return t;let n=await T(e);return n.valid?(n=x(e,!1),n.valid?b(e,!1):n):n},E.heat_map=async e=>y(e),E.slide_rate=E.value_mark,E.max_diff=async e=>{const t=e.tasks.every((e=>e.done));return{valid:t,dueToNode:t?null:e,message:t?"":(0,l.GS)(d.CW.maxDiff.all)}};const N=(0,c.Cu)((async(e,t)=>{if(t&&k(t,(await(0,r.uC)(t,e)).message),e){const t=await R([e]);t.message||k(e,t.message),(0,g.ew)(e)}}),250);async function R(e,t=!1,n=!1){const i=[];for(const r of e){const e=await L(r,t);e.valid||(n&&k(e.dueToNode,e.message),i.push(e),(0,g.ew)(r))}return i[0]||v}},9677:(e,t,n)=>{"use strict";n.d(t,{KA:()=>c,_u:()=>l,mK:()=>u,uC:()=>g}),n(7768),n(9624);var i=n(3001),r=n(6496),o=n(4708),a=n(568),s=n(2352);function c(e){return/^1[0-9][0-9]\d{8}$/i.test(e)}function u(e){return/[-a-zA-Z0-9@:%_+.~#?&/=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_+.~#?&/=]*)?/gi.test(e)}async function l(e,t){const{parent:n}=t,{origin:r}=e;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(e,t,n){return t<=e&&n>=e}function f(e,t,n){return d(e,t,n)?"":(0,r.GS)(a.CW.fill.valueLimit,{min:t,max:n})}const p={};async function m(e,t,n){const{itemsMax:i,itemsMin:s}=await(0,o.jJ)(t,n),c=e.split(/[,,]/).reduce(((e,t)=>t.trim()?e+1:e),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 g(e,t){const n=(0,s.Wo)(e.value),{origin:i}=e,r=i.fillType,o=p[r];if(!o||(0,s.oV)(n)&&"auto_complete"!==r)return{valid:!0,message:""};const{parent:a}=t;a.context.option=e;const c=await o(n,e,t);return a.context.option=null,c.valid||(c.dueToOption=e,c.dueToNode=t),c}p.chars=async(e,t,n)=>{const{start:i,end:o}=await l(t,n);let{tolerance:s}=t.origin;s=s||[];const c=function(e,t=[]){if(0===t.length)return"";e=e.replace(/[\s,,]/g,"");let n="";const i=[];t.includes("number")&&(n+="0-9.",i.push((0,r.GS)(a.CW.fill.number))),t.includes("alphabet")&&(n+="a-zA-Z",i.push((0,r.GS)(a.CW.fill.alphabet))),t.includes("chinese")&&(n+="一-龥",i.push((0,r.GS)(a.CW.fill.chinese)));const o=i.join(" "),s=new RegExp("^["+n+"]+$");return e.match(s)?"":(0,r.GS)(a.CW.fill.onlyAllow,{text:o})}(e,s)||function(e,t,n){return d(e.length,t,n)?"":(0,r.GS)(a.CW.fill.charsLimit,{min:t,max:n})}(e,i,o);return{valid:!c,message:c}},p.email=async e=>{const t=function(e){return/^[\w-\.]+@([\w-]+\.)+[\w-]+$/i.test(e)}(e);return{valid:t,message:t?"":(0,r.GS)(a.CW.fill.needEmail)}},p.float=async(e,t,n)=>{if(!function(e){return/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(e)}(e))return{valid:!1,message:(0,r.GS)(a.CW.fill.inputDecimal)};const{origin:i}=t;if(i.scale&&!function(e,t){return new RegExp("\\d+\\.\\d{".concat(t,"}$")).test(e)}(e,i.scale))return{valid:!1,message:(0,r.GS)(a.CW.fill.inputDecimalDigits,{scale:i.scale})};const{start:o,end:s}=await l(t,n),c=f(Number(e),o,s);return{valid:!c,message:c}},p.integer=async(e,t,n)=>{if(!function(e){return/^[-]?\d+$/.test(e)}(e=e.replace(/\s/g,"")))return{valid:!1,message:(0,r.GS)(a.CW.fill.inputInteger)};const i=Number(e),{start:o,end:s}=await l(t,n),c=f(i,o,s);return{valid:!c,message:c}},p.none=async()=>({valid:!0,message:""}),p.phone_number=async e=>{const t=c(e);return{valid:t,message:t?"":(0,r.GS)(a.CW.fill.needPhoneNumber)}},p.postcode=async e=>{const t=function(e){return/^[0-9][0-9]{5}$/.test(e)}(e);return{valid:t,message:t?"":(0,r.GS)(a.CW.fill.needZipCode)}},p.url=async e=>{const t=u(e);return{valid:t,message:t?"":(0,r.GS)(a.CW.fill.needUrl)}},p.auto_complete=async(e,t,n)=>!e&&t.atcpTrigger?{valid:!1,message:(0,r.GS)(a.CW.fill.atcpLabelOnly),dueToNode:n,dueToOption:t}:m(e,t,n),p.list_select=(e,t,n)=>m(e,t,n)},984:(e,t,n)=>{"use strict";n.d(t,{O_:()=>s,QX:()=>l,g7:()=>o}),n(9624);var i=n(2352),r=n(3001);function o(e,t){return e.selected||l(e,t)}const a={};function s(e,t){let n="";const i=a[t.type];return n=e.isOtherOpt||!i?e.value:i(e),"string"==typeof n&&(n=(0,r.Qr)(n)),n}function c(e,t){let n=s(e,t);return"string"==typeof n&&(n=n.trim()),!(0,i.oV)(n)}a.upload=e=>e.filePath,a.sequence=e=>e.sortNo,a.heat_map=e=>e.point,a.max_diff=e=>e.records;const u={};function l(e,t){return(u[t.type]||c)(e,t)}u.sequence=(e,t)=>-1!==e.sortNo&&c(e,t)},9796:(e,t,n)=>{"use strict";n.d(t,{Co:()=>f,GM:()=>g,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(e,t){const{options:n,passRefs:i,refMaps:r}=await(0,a.q0)(e,t.origin,null,!0);(0,d.GO)(t,r);const o=await(0,l.o9)(t,n,i);return(0,s.uQ)(t,o)}function p(e,t,n=!1){const{loopStack:i}=t;return i.find(((t,o)=>(!n||o===i.length-1)&&(0,r.oj)(t.node.nodeUuid,e.nodeUuid)))}async function m(e,t,n,i,r,o){const a=(0,u.C2)(r),s={state:e,usage:{node:t,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 g={_skip:(e,t,n)=>o.G.findNext(e,t,n),async _init(e,t,n){const{varList:o,origin:{loopStart:a,destList:s}}=t;if(0===o.length)return g._skip(e,t,n);const{loopStack:c}=n,u=s.find((e=>(0,r.oj)(e.selfPortId,a.uuid))).destInputId,l=(0,i.gR)(e,u),d=o[0],{origin:f}=t,p=c[c.length-1],h=await m(n,t,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(e,t,n){const{nodeUuid:o}=t,{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],g=await m(n,t,o,d,f,p),h=(0,i.gR)(e,l);return u[u.length-1]=g,{target:h,loop:(0,r.O0)(s),loopStack:(0,r.O0)(a)}},async _end(e,t,n){const{loopStack:i}=n;i.pop();const a=await o.G.findNext(e,t,n);if(i.length>0){const e=(0,r.O0)(i);a.loop=e[e.length-1],a.loopStack=e}return a},findNext(e,t,n){const i=p(t,n,!0);if(i){const{currentIndex:r,varList:o}=i;return r===o.length-1?g._end(e,t,n):g._increase(e,t,n)}return g._init(e,t,n)}}},8956:(e,t,n)=>{"use strict";n.d(t,{kF:()=>E,WU:()=>k});var i=n(5776);function r(e,t,n,r,o){return o||(o=(0,i.MR)(e,t,n.uuid)),o||r.origin.parentRandomId||t.length&&(o=(0,i.gR)(e,t[t.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(e,t){const{destList:n,output:c}=t.origin,u=(0,a.IN)(t)?t.otherOptions:[],l=s.includes(t.type)?u:(0,o.wR)(t),d=l&&l.find((e=>e.selected));return{target:r(e,n,c,t,d&&(0,i.MR)(e,n,d.uuid))}}},u={async findNext(e,t,n){const{origin:{destList:r,parentRandomId:a}}=t,s=(0,o.GE)(t);let u=s&&(0,i.MR)(e,r,s.uuid);return u||(u=(await c.findNext(e,t,n)).target),u||!r.length||a||(u=(0,i.gR)(e,r[0].destInputId)),{target:u}}};var l=n(2331),d=(n(2048),n(4060));const f={async findNext(e,t){const{origin:n,parent:r}=t,{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);t.logicResult=p;const m=p?a:l;return{target:(0,i.MR)(e,s,m.uuid)}}};var p=n(6940),m=n(9796);n(5960),n(9952);const g={async findNext(e,t){const{origin:n,options:o,otherOptions:a}=t,{destList:s,output:c}=n,u=[...o.filter((e=>e.selected)).sort(((e,t)=>e.cascadePath.length<t.cascadePath.length?1:-1)),...a.filter((e=>e.selected))];let l;for(const t of u)if(l=(0,i.MR)(e,s,t.uuid),l)break;return{target:r(e,s,c,t,l)}}};var h=n(9216),v=n(556),y=n(8184),_=n(8856),w=n(6072);const x={cascade:g,logic:f,uniqueness_verification:{async findNext(e,t){const{origin:n,parent:r}=t,{output:o,destList:a,outputN:s}=n;let c=!0;const u=r.verifyUniquenessUri,l=r.uniquenessVerification;if(u&&l&&l.enabled&&!(0,_.E3)().preview){const e={enabled:!1,method:u.method,url:u.url,params:l.params};c=(await(0,w.eU)({state:r,request:e,customParam:null,silent:!1,shouldCombineSystem:!1})).valid}t.verificationResult=c;const d=c?o:s;return{target:(0,i.MR)(e,a,d.uuid)}}},loop:m.GM,sequence:u,random:p.qM};function b(e){const t=x[e];if(!t)throw new Error("lack next rules for this type of node...");return t}["describe","check","end","start","verify","data","max_diff"].forEach((e=>{x[e]=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((e=>{x[e]=c}));const T=["check","break_point"];function S(e,t){return"loop"===e.type?!(0,m.iO)(e,t):!T.includes(e.type)}function E(e,t,n){return k(e,(0,y.e_)({target:n},t),t)}async function I(e,t,n,r){const{target:o,loop:a,random:s}=r,c=t.random;if(o){const e=t.loop,{loopStack:n}=t;!a&&e&&(0,i.uK)(o,t.origin)&&(r.loopStack=n,r.loop=e),o.parentRandomId&&c&&!s&&(r.random=c)}else if(c){const t=(0,v.So)(c.node.nodeUuid,n.loopStack);return k(e,(0,h.QL)(n.renderList,t),n)}return r}async function k(e,t,n){let i,r,o=t,a=b(o.type),s=!0;for(;s&&(r=await I(e,o,n,await a.findNext(e,o,n)),i=r.target,i);)S(i,n)?s=!1:(o=(0,y.e_)(r,n),a=b(i.type));return r}},2331:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});var i=n(5776);const r={async findNext(e,t){const{destList:n,output:r}=t.origin;return{target:(0,i.MR)(e,n,r&&r.uuid)}}}},6788:(e,t,n)=>{"use strict";n.d(t,{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(e){return i.has(e)}function o(e){i.add(e)}},6940:(e,t,n)=>{"use strict";n.d(t,{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(e,t){e&&0!==e.length&&(c=e,t.forEach((n=>{if(e.includes(n.nodeUuid)){(0,s.c)(n.nodeUuid);const e=t.find((e=>e.nodeUuid===n.parentRandomId));e&&l.add(e.nodeUuid)}})))}const f={async _init(e,t,n){const{origin:o}=t;let u=function(e,t){const{destList:n,randomStart:o}=t.origin,a={};n.forEach(((t,n)=>{if((0,i.oj)(t.selfPortId,o.uuid)){const o=(0,r.gR)(e,t.destInputId).groupNumber||"N/A_"+n,s=a[o];if(s){const e=(0,i.ec)(s.length+1);s.splice(e,0,t.destInputId)}else a[o]=[t.destInputId]}}));const s=function(e,t){const{customDestCount:n}=t.origin;if(!n||n>=e.length)return e;for(;e.length>n;)e.splice((0,i.ec)(e.length),1);return e}(Object.keys(a),t);let c=[];for(;s.length>0;){const e=(0,i.ec)(s.length);c=c.concat(a[s[e]]),s.splice(e,1)}return c}(e,t);!function(e,t){const{parent:{nodeList:n},origin:{customNodeCount:o,nodeUuid:a}}=t;l.has(a)||o&&(e.forEach((e=>{const t=[];let a=(0,r.gR)(n,e);for(;a;)t.push(a),a=(0,r.MR)(n,a.destList,a.output.uuid);for(;t.length>o;){const e=(0,i.ec)(t.length),n=t[e].nodeUuid;(0,s.c)(n),c.push(n),t.splice(e,1)}})),l.add(a))}(u,t),u=(0,a.wn)(u,t);let d=[];t.random&&(d=t.random.stack.concat(t.random));const f={stack:d,node:o,destPortIds:u,currentIndex:0};return n.push(f),{target:(0,r.gR)(e,u[0]),random:{...f}}},async _increase(e,t){t.currentIndex+=1;const{currentIndex:n,destPortIds:i}=t;return{target:(0,r.gR)(e,i[n]),random:{...t}}},_end:(e,t,n)=>o.G.findNext(e,t,n),findNext(e,t,n){const{randomList:r}=n,{nodeUuid:o}=t,a=r.find((e=>(0,i.oj)(e.node.nodeUuid,o)));if(a){const{currentIndex:i,destPortIds:r}=a;return i===r.length-1?f._end(e,t,n):f._increase(e,a)}return f._init(e,t,r)}}},7192:(e,t,n)=>{"use strict";n.d(t,{GI:()=>o,Un:()=>c}),n(9952);var i=n(5876),r=n(9348);function o(e){const t=e.split(":"),n={};if(1===t.length)n.baseId=t[0];else if(2===t.length)n.nodeId=t[0],n.nodePartId=t[1];else if(3===t.length){n.nodeId=t[0];const e=t[1];e.match(/^[a-z0-9]{8}$/)?n.optId=e:n.optFilterId=e,n.optPartId=t[2]}return n}function a(e){const t=[],n=e.getAttribute("data-ph-cfg");if(n){const e=JSON.parse(n);Object.keys(e).forEach((n=>{t.push({name:n,value:c(e[n])})}))}const i=e.getAttribute("data-img-size")||":",[r,o]=i.split(":").map((e=>Number(e))),a={phParams:t,limitSrc:Number(e.getAttribute("data-limit-src"))||0,limitRnd:e.getAttribute("data-limit-rnd")||"-1",imgHeight:o,imgWidth:r,outOfResult:!!e.getAttribute("data-out-of-result"),disorder:!!e.getAttribute("data-disorder")},s=e.getAttribute("data-limit");if(s){const[e,t,n]=s.split(":");a.limitType=Number(e)||1,a.limitStart=c(t),a.limitEnd=c(n)}return a}function s(e){["data-id","data-limit","data-limit-src","data-limit-rnd","data-ph-cfg","data-img-size","data-disorder","data-out-of-result"].forEach((t=>{e.removeAttribute(t)}))}function c(e){if(!e)return e;if(!function(e){return e.includes("var-tag")&&e.includes("data-id".concat("="))}(e=String(e)))return e;const t=document.createElement("div");t.innerHTML=e;const n=t.querySelectorAll(".var-tag");for(const e of n)if(!e.hasAttribute("data-v-config")){const t=o(e.getAttribute("data-id")),n=a(e);s(e);const c=(0,r.A)(t);e.setAttribute("data-v-id",c);const u=(0,i._m)(n);u&&e.setAttribute("data-v-config",u)}return t.innerHTML}},3048:(e,t,n)=>{"use strict";n.d(t,{W:()=>o,a:()=>a});var i=n(556),r=n(7192);function o(e){const t=e;return t.referUuid?{index:t.index,config:{phParams:[],limitEnd:t.limitEnd,limitSrc:t.limitSrc,limitStart:t.limitStart,limitType:t.limitType,disorder:t.disorder,limitRnd:t.limitRnd},identity:(0,r.GI)(t.uuid),uuid:t.referUuid}:t}function a(e,t){const n=e;if(n.limit){const e=t.find((e=>e.uuid===n.referId));return(0,i.kt)(e.referUuid)}return n.referId}},7404:(e,t,n)=>{"use strict";n.d(t,{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(e){const t={...e};return delete t.appid,delete t.code,delete t.state,t}function l(e){const t=Object.create(null);return"string"!=typeof e?t:(e=e.trim().replace(/^([?#&])/,""))?(e.split("&").forEach((e=>{const n=e.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===t[i]?t[i]=r:Array.isArray(t[i])?t[i].push(r):t[i]=[t[i],r]})),{...t}):t}function d(e){(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(e))}function f(e,t){if("string"==typeof t)try{t=JSON.parse(t)}catch(e){}const n=function(e){const t=[];return Object.keys(e).forEach((n=>{if(void 0!==e[n]){const i="".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(e[n]));t.push(i)}})),t.join("&")}(t),i=e.match(/\?/)?"&":"?";return e+i+n}},2172:(e,t,n)=>{"use strict";n.d(t,{a:()=>o}),n(9952);var i=n(1344),r=n(8856);async function o(e){const{currentStartTime:t,nodes:n}=e,o=(new Date).getTime(),a=Math.abs(o-t)/n.length;for(const e of n){const t=e.costTime||0;(0,r.e)(e,{costTime:t+a,endTime:o}),await(0,i.mi)(e)}(0,r.e)(e,{currentStartTime:o})}},2524:(e,t,n)=>{"use strict";n.d(t,{w:()=>s});var i=n(8856),r=n(9193),o=n(1304),a=n(6796);async function s(e){const t=(0,a.k9)(e);(0,i.e)(e,{nodes:t});let n=null;if((0,a.O2)(e)){const t=(0,a.Oi)(e);n=t&&e.parsedPayload.nodeGroups.find((e=>e.id===t.origin.groupId))}if((0,i.e)(e,{inSingleGroup:n}),n&&n.renderAsTable){const o=(0,r.y)(t,n);(0,i.e)(e,{groupTable:o})}else(0,i.e)(e,{groupTable:void 0});const s=await(0,o.uC)(e);(0,i.e)(e,{prevButton:(0,o.Qb)(e),nextButton:s,needProgressBar:e.progressBarRequired&&"lottery"!==e.current.type})}},6348:(e,t,n)=>{"use strict";n.d(t,{U3:()=>u,i:()=>s,oP:()=>c});var i=n(5776),r=n(8856);let o,a={};const s={on(e,t){a[e]||(a[e]=[]),a[e].push(t)},off(e,t){e||(a={}),a[e]&&(a[e]=t?a[e].filter((e=>e!==t)):[])},one(e,t){const n=i=>{t(i),s.off(e,n)};s.on(e,n)},trigger(e,t={}){if(a[e])try{a[e].forEach((n=>n({type:e,...t,data:t},t)))}catch(e){(0,r.E3)().uploadLog(e)}}};function c(e){"gift"!==e.type&&(s.trigger("ANSWER_CHANGE",e),(0,i.CY)(e))}function u(e,t=!1){e!==o&&(s.trigger("SWITCH_NODE",e),o=e,t&&(0,r.W4)().hook.onSwitchPage())}},9193:(e,t,n)=>{"use strict";n.d(t,{y:()=>r});var i=n(556);function r(e,t){if(0===e.length)return;const n=e[0].loop.varList.map((t=>{const{text:n,uuid:i}=t,r=e.filter((e=>e.loop.replacements[0].uuid===i));return{uuid:i,title:n,cells:o(r)}})),i=n.reduce(((e,t)=>t.cells.length>e.cells.length?t:e),{cells:[]}),r=i.cells;n.forEach((e=>{e.cells=r.map((t=>e.cells.find((e=>e.node.nodeUuid===t.node.nodeUuid))||a(void 0)))}));const s=i.cells.map((e=>({uuid:e.node.nodeUuid,title:e.node.title})));return{title:t.tableTitle,header:s,rows:n}}function o(e){return e.map(a)}function a(e){const t=(null==e?void 0:e.renderId)||(0,i.YF)();return e.headHidden=!0,{uuid:t,node:e}}},7556:(e,t,n)=>{"use strict";n.d(t,{SA:()=>s,c5:()=>a}),n(7768);var i=n(3552),r=n(8348);function o(e){const t=":"+(0,r.yy)().LOOP_IMG.uuid,n="-0000-0000-0000-000000000000";return e.indexOf(n)&&(e=e.replace(n,t)),e}function a(e,t){return e.filter((e=>e.used)).map((e=>(function(e){const{image:t,options:n}=e;t&&(t.id=o(t.id)),n&&n.forEach((e=>{e.image&&(e.image.id=o(e.image.id))}))}(e),e.destList=e.destList.filter((e=>!e.designOnly)),function(e){const t=e;t.questionText=(0,i.q)(t.questionText),t.describe=(0,i.q)(t.describe);let n=[];t.options&&(n=n.concat(t.options)),t.otherOptions&&(n=n.concat(t.otherOptions)),t.optionsX&&(n=n.concat(t.optionsX)),t.optionsY&&(n=n.concat(t.optionsY)),n.forEach((e=>{e.text=(0,i.q)(e.text)}))}(e),e)))}function s(e){return e.forEach((e=>{e.value=(0,i.q)(e.value)})),e}},1304:(e,t,n)=>{"use strict";n.d(t,{eO:()=>X,ek:()=>z,ef:()=>Q,ID:()=>j,uC:()=>D,gv:()=>B,Qb:()=>G,Wf:()=>H,I7:()=>Y,e0:()=>K,YR:()=>M,ye:()=>F,KY:()=>q}),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(560),f=n(8956),p=n(8856),m=n(6496),g=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(e,t,n){const{actions:i}=t.origin;if(i&&!(0,y.K)()&&!(0,p.E3)().realTimePreview){if("forward_enter"===e){if(S[t.renderId])return;S[t.renderId]=!0}if("backward_leave"===e&&delete S[t.renderId],"forward_leave"===e){if(E[t.renderId])return;E[t.renderId]=!0}"backward_leave"===e&&delete E[t.renderId];for(const r of i){if(r.disabled||r.event!==e)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)({state:n,request:r.request,customParam:null,silent:!0});else{const i={state:n},o={question_id:t.nodeUuid,response_id:n.transactionID,locale:n.language,event:e,type:r.type};if("email"===r.type){const{email:e}=r,t={...o,email:(await(0,x.E3)(e.address,i)).replace(/\s/g,""),content:await(0,x.qQ)(e.content,i),title:(await(0,x.E3)(e.title,i)).trim()};await(0,_.G8)(t)}else{const{sms:e}=r,t={};for(const n of e.params)t[n.name]=(await(0,x.E3)(n.value,i)).trim();const n={...o,url:(await(0,x.E3)(e.url,i)).replace(/\s/g,""),content:t};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(e){let{prev:t}=e;const n=[];let i=t&&(0,o.S)(t);for(;i;)n.push({node:t,reason:i}),t=t.prev,i=t&&(0,o.S)(t);return{prev:t,skipList:n,current:e}}function G(e){if((0,p.E3)().realTimePreview)return"";const{prevEnabled:t,themeMode:n}=e,i=(0,C.Oi)(e),{prev:r}=U(i),o=i.type;return t&&n&&"end"!==o&&"lottery"!==o?e.prevBtnText:(0,p.E3)().preview&&"end"===o?(0,m.GS)(v.CW.global.backTest):t&&r&&(i.checkMode===r.checkMode||(0,p.E3)().preview)&&!W.includes(o)?e.inSingleGroup?e.inSingleGroup.prevText||e.prevBtnText||(0,m.GS)(v.CW.global.previous):e.prevBtnText:""}async function D(e){const{formalResult:t}=e,n=e.current;if((0,R.is)(n,"end"===n.type)){const i=n.endBtnText||(0,m.GS)(v.CW.global.go);if(n.linkUrl)return i;if(t&&t.reward||(0,p.E3)().preview&&n.origin.useReward)return n.qrCode||e.fakeCommitted?"":i;{const{target:t}=await g.G.findNext(e.nodeList,n,e);return t&&"lottery"===t.type?i:""}}if((0,R.is)(n,"lottery"===n.type)){const e=(0,m.GS)(v.CW.reward.get);return n.linkUrl?n.endBtnText||e:n.goal?n.qrCode?"":e:""}return e.inSingleGroup?e.inSingleGroup.nextText||e.nextBtnText||(0,m.GS)(v.CW.global.next):e.nextBtnText}function B(e,t){const n=[];let i=1;const r=e[t];let a=e[t+i],s=a&&(0,o.S)(a);for(;a&&s;)n.push({node:a,reason:s}),i+=1,a=e[t+i],s=a&&(0,o.S)(a);return{next:a,skipList:n,current:r}}async function q(e){const t=await(0,c.iW)(e.nodes,!0,(0,C.O2)(e));if(t.valid){if((0,C.O2)(e)){(0,p.e)(e,{current:e.nodes[e.nodes.length-1]});for(const t of e.nodes)await I("forward_leave",t,e)}else await I("forward_leave",e.current,e);return await(0,s.AD)(e,e.current,{type:"page_next",delay:200}),!0}return function(e,t){const{valid:n,message:r,dueToNode:o,dueToOption:a}=t,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"===t.type)throw(0,p.E3)().error(t.message),new Error("next vital error: "+t.message);"alert"===t.type?(0,p.E3)().alert(t.message):(e.inSingleGroup||(0,p.E3)().notify(t.message,t),(0,c.Oe)(t,e))}(e,t),!1}function F(e,t){(0,p.e)(e,{nextLoading:t})}function j(e){F(e,!0),P={state:e}}async function z(e){F(e,!1),P&&(await Y(P.state),P=void 0)}function V(e,t,n){(0,i.U3)({origin:t,parent:e},!0);const a={...(0,r.uK)(),rid:String(n.id),locale:e.language,qid:e.surveyId,rt:t.giftType};if("red_envelope"!==t.giftType||(0,p.E3)().preview)(0,u.ID)(n,t,e.theme,(0,o.q_)(e.nodeList)),(0,p.W4)().hook.beforeForceLeave(),(0,p.W4)().app.openWebLink((0,p.W4)().app.getRewardUrl(a)),(0,p.E3)().customAbort();else{const t={...a,tid:e.transactionID},{formalResult:{authorizer:{app_id:n,component_appid:i}}}=e;(0,p.W4)().auth.authorizeGift(n,i,t,"end"),(0,p.E3)().customAbort()}}function K(e,t){t.linkUrl?((0,p.W4)().hook.beforeForceLeave(),(0,p.W4)().app.openWebLink(t.linkUrl),(0,p.E3)().customAbort()):V(e,(0,o.o1)(e.nodeList,t.rewardRaw.gift_id),t.rewardRaw)}async function Y(e){const t=function(e){const{renderList:t}=e,n=e.nodes[e.nodes.length-1];return B(t,(0,s.SM)(t,n))}(e),{current:n,next:c}=t;return"end"===n.type?async function(e,t){const{linkUrl:n,origin:s}=t;if(n)return void(0,r.ML)(n);const c=(0,o.MR)(e.nodeList,s.destList,s.output&&s.output.uuid);if(!c)return;const d=(0,u.G3)(e,c);if((0,R.is)(c,"lottery"===c.type)){const t=await(0,l.yI)(c,d,e);(0,a.cR)(t,e,!(!d||!d.id)),(0,p.e)(e,{current:t}),(0,i.U3)(t,!0)}else V(e,c,d);await(0,O.w)(e)}(e,n):(await(0,p.W4)().hook.beforeGotoNext(),(await(0,d.e)(e,{valid:!0,message:""},n,c)).valid?(function(e){if((0,p.E3)().preview)return;const t=function(e){const{nodes:t,renderList:n}=e,i=t[t.length-1];let r=i,a=[r];for((0,C.ms)(i.nodeUuid,e.nodeGroups)&&(a=n.filter((e=>e.origin.groupId===i.origin.groupId)),r=a[0]);r.prev&&(0,o.S)(r.prev)&&!(0,C.ms)(r.prev.nodeUuid,e.nodeGroups);)a.unshift(r.prev),r=r.prev;return a}(e),n=t.map((e=>(0,L.cA)(e))).filter((e=>!!e));(0,p.W4)().network.pushSocket("update",{answers:n}),clearTimeout(N)}(e),async function(e,t){const{next:n,current:r}=t;(0,p.e)(e,{current:n}),n.reached=!0,(0,a.EZ)(r,n),(0,i.U3)(n,!0),(0,h.K8)(e),await(0,k.iq)(e),await(0,O.w)(e),F(e,!1),(0,o.CY)(r),(0,s.S_)(e,e.current),i.i.trigger("NEXT_OK")}(e,t)):F(e,!1))}async function H(e){const t=(0,C.Oi)(e),{prev:n,skipList:r}=U(t);if(n){if((0,C.ms)(t.nodeUuid,e.nodeGroups)){const t=[...e.nodes].reverse();for(const n of t)await I("backward_leave",n,e)}else await I("backward_leave",t,e);for(const t of r)await I("backward_enter",t.node,e),await I("backward_leave",t.node,e);if((0,p.e)(e,{current:n}),await(0,A.a)(e),(0,i.U3)(n,!0),(0,h.K8)(e),await(0,k.iq)(e),await(0,O.w)(e),(0,a.aS)(t,n),(0,s.S_)(e,e.current),i.i.trigger("PREV_OK"),(0,C.ms)(n.nodeUuid,e.nodeGroups)){const t=[...e.nodes].reverse();for(const n of t)await I("backward_enter",n,e)}else await I("backward_enter",n,e)}}async function Q(e,t){const{nodeList:n,current:i}=e,r=await(0,f.WU)(n,i,e),{target:o}=r;return o?X(e,r,t):null}async function X(e,t,n){const i=(0,l.e_)(t,e);if(n&&n(i))return null;if(e&&e.current&&"logic"===e.current.type){const t=(0,o.S)(e.current);t&&(0,a.U3)(e,e.current,t)}if(e&&e.current&&"uniqueness_verification"===e.current.type){const t=(0,o.S)(e.current);t&&(0,a.eK)(e,e.current,t)}const r=await(0,l.o9)(i,e.current);(0,p.e)(e,{current:r}),await I("forward_enter",r,e);const s=(0,o.S)(r);return s&&((0,a.YZ)(e,r,s),await I("forward_leave",r,e)),r}},8412:(e,t,n)=>{"use strict";n.d(t,{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(e){return e&&"end"!==e.type}function u(e,t){if(!e)return e;const n=e.parentRandomId||e.circleNode1Id;return n&&(e=u(e=(0,i.o1)(t,n),t)),e}function l(e,t){let n;t=u(t,e);const{output:o,destList:a}=t,{outputN:s}=t,l=(0,r.sf)(t);if(o&&(n=(0,i.MR)(e,a,o.uuid)),!c(n))if(s)n=(0,i.MR)(e,a,s.uuid);else if(l)for(const t of l)if(n=(0,i.MR)(e,a,t.uuid),c(n))break;return n}function d(e){return!s.includes(e.type)&&!e.autoSkip}function f(e){if((0,a.W4)().dev.infer)return;const{percent:t,index:n}=function(e){const t=function(e){const t=e.renderList.filter((e=>d(e.origin)));return(0,o.SM)(t,e.current)}(e),n=function(e,t){const{nodeList:n,current:i}=t;let r=e,o=l(n,i.origin);for(;o;)d(o)&&(r+=1),o=l(n,o);return"end"!==i.type&&(r+=1),r}(t,e);return-1===t?{index:-1,fullLength:n,percent:0}:{percent:Math.round(t/n*100),fullLength:n,index:t}}(e);n>-1&&(0,a.e)(e,{progress:t})}},9216:(e,t,n)=>{"use strict";n.d(t,{AD:()=>v,QL:()=>m,SM:()=>g,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 m(e,t){return t=t.toLowerCase(),e.find((e=>e.renderId.toLowerCase()===t))}function g(e,t){for(let r=0;r<e.length;r++){if(n=e[r],i=t,(0,a.oj)(n.renderId,i.renderId))return r}var n,i;return-1}function h(e,t){(0,s.e)(e,{refreshing:t})}function v(e,t,n){if(h(e,!0),clearTimeout(p),n.initial&&(0,l.U3)(e.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(e,t,n)}catch(e){o(e)}r()}),i)}))}return w(e,t,n)}function y(e,t){const{circleNode1Id:n}=t.origin;n?(0,s.e)(e,{loopStack:(0,a.O0)(t.loopStack)}):(0,s.e)(e,{loopStack:[]});const i=e.randomList,r=t.random;i.forEach((e=>{r?(0,a.oj)(e.node.nodeUuid,r.node.nodeUuid)?e.currentIndex=r.currentIndex:r.stack.some((t=>(0,a.oj)(e.node.nodeUuid,t.node.nodeUuid)))||(e.currentIndex=-1):e.currentIndex=-1}))}function _(e,t){const n=function(e,t){let n=e;if(!t)return n;for(const e of t)n+="-"+(0,a.kt)(e.option_id);return n}(t.node_id,t.loop_ctxs);return m(e.renderList,n)}async function w(e,t,n){h(e,!0);const a=e.renderList;y(e,t=t||e.current);const l=g(a,t),p=await async function(e,t,n){const a=n.type;let c=[...e.renderList];c=c.length>0?c:[t];const u=g(c,t);if(u<0)return c;c.length=u,c.push(t),(0,s.e)(e,{renderList:c}),(0,f.O2)(e)&&await(0,o.qc)(t);let l=null;const d=t=>!(0,f.ym)(t,l,e.nodeGroups);let p=null;for("page_inner"===a&&(l=t,p=d);;){const t=await(0,i.ef)(e,p);if(!t)break;if(c.push(t),f.AN.includes(t.type))break;if(!(0,r.S)(t)){if(l||(l=t,(0,f.ms)(l.nodeUuid,e.nodeGroups)&&(p=d)),!(0,f.ym)(l,t,e.nodeGroups))break;await(0,o.qc)(t)}}return c}(e,t,n),m=n.initial?(0,i.gv)(p,l).next:t;(0,s.e)(e,{current:m}),h(e,!1),y(e,t),await(0,d.w)(e),n.initial||(await(0,i.ek)(e),e.inSingleGroup&&(0,u.K8)(e)),(0,c.Y1)()}},1428:(e,t,n)=>{"use strict";n.d(t,{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),m=n(7320),g=n(5170),h=n(5224),v=n(2392),y=n(7828),_=n(4404),w=n(3132),x=n(5032);let b=null;function T(e,t){if((0,s.E3)().preview){const n={id:-1,code:"12345678"};if((0,a.is)(t,"gift"===t.type))return{...n,type:t.giftType,gift_id:t.nodeUuid};{const r=(0,a.my)(t.options,1)[0],o=(0,i.MR)(e.nodeList,t.destList,r.uuid);return{...n,type:o.giftType,gift_id:o.nodeUuid,lottery_id:t.nodeUuid,lottery_option_id:r.uuid}}}return e.formalResult.reward}function S(e,t,n,i){const r="custom"===t.giftType;if((0,s.E3)().preview||r){i.useCustomLogo&&(t.useCustomLogo=i.useCustomLogo,t.logoImage=i.logoImage,t.logoText=i.logoText,i.i18n&&Object.keys(i.i18n).forEach((e=>{const n=i.i18n[e];t.i18n[e].logoText=n.logoText})));const r={};"custom"===t.giftType?r.custom={giftNode:t,theme:n,qrCode:e.code,rewardId:e.id}:r.redEnvelope={theme:n,recipient:(0,h.x)(),gift:{id:e.id,title:t.activityName,description:t.blessings,config:{gift_name:""},origin:t},amount:t.giftCount,type:"red_envelope"},(0,s.W4)().storage.set("cached_reward",JSON.stringify(r))}}function E(e){const t=(0,s.W4)().storage.get("cached_reward");if(!t)return;const n=JSON.parse(t);let i;const{custom:r,redEnvelope:o}=n;return r?i=r.rewardId:o&&(i=o.gift.id),i===e?n:void 0}function I(){b=null}async function k(){if(b)return b;const e=(0,o.uK)(),{rt:t,rid:n,code:i,qid:a,tid:h,locale:T,reward_from_qr_code:S}=e;let I;(0,c.Uj)(T);let k,C={};if("red_envelope"===t){let t;(0,s.E3)().preview?t=E(Number(n)).redEnvelope:!i&&S?t=O:(n&&!i&&((0,s.W4)().auth.authorizeGift(e.aid,e.cid,e,"scan_qr_code"),(0,s.E3)().customAbort()),t=function(e){var t;const n=e.gift.origin,i={...e,gift:{...null==e?void 0:e.gift,origin:{...null===(t=null==e?void 0:e.gift)||void 0===t?void 0:t.origin,i18n:{},logoText:""}}};if(!n)return i;const r=n.i18n;if(!r)return i;const o={};return Object.keys(r).forEach((e=>{const t=r[e];o[e]={activityName:t.gift_name,blessings:t.gift_wishing,endBtnText:t.end_btn_text,logoText:t.logo_text}})),i.gift.origin.i18n=o,i}(await(0,m.MT)({code:i},n)));const{gift:r,theme:o,isTemporaryForWXQrcode:u}=t;I=r.origin,C=t.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 e=E(Number(n));if(!e)return(0,s.E3)().error((0,c.GS)(p.CW.global.invalidReward)),null;const{custom:t}=e;I=t.giftNode,k={qrCode:t.qrCode,rewardToMessage:I.needSendNote,theme:t.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:{...g._,async handlePrevClick(){(0,s.W4)().app.gotoStartPage((0,o.uK)())},handleOptionClick:async(e,t)=>(await(0,u.o)(e,t)).result,handleQuestionInput:async(e,t)=>(await(0,l.s)(e,t)).result,async handleNextClick(){I.linkUrl&&(0,o.ML)(I.linkUrl)},async handleGetRewardWX(){(0,s.W4)().auth.authorizeGift(e.aid,e.cid,e,"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:(e,t,n)=>{"use strict";n.d(t,{ML:()=>p,YP:()=>m,m0:()=>h,wH:()=>g}),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(e,t){const n=(0,u.Wo)(e.result);return e&&(0,a.mK)(n)?(setTimeout((()=>{(0,r.ML)(n)})),{type:"LINK",done:!0}):{type:t,done:!0}}async function p(e,t){let n="";const{parsedPayload:{surveyMeta:{collector:r}}}=e;if(!r)return;const{sampler_config:o}=r;o&&(n=o[t]||"");const a="BACKEND:";if(!n||0!==n.indexOf(a))return;const s=n.replace(a,"").split("&"),c={};for(const t of s){const[n,r]=t.split("=");c[n]=await(0,i.cb)(r,e)}return c}async function m(e,t){const{parsedPayload:{surveyMeta:{collector:{sampler_config:n}}}}=t,a=n&&n[e];if(!a)return o.i.trigger("SAMPLER_TRANSFER",{method:"ABORT"}),{type:"ABORT",done:!1};const u=a.trim(),p=u.startsWith("{{")&&u.endsWith("}}"),m=await(0,i.cb)(u,t,!p);return m.trim().startsWith("BACKEND")?{type:"BACKEND",done:!0}:m.trim().startsWith("http")?async function(e,t){return(0,r.ML)(t),o.i.trigger("SAMPLER_TRANSFER",{method:"LINK",url:t,type:e}),{type:"LINK",done:!0}}(e,m):async function(e,t,n){const i=n.indexOf(":"),a=n.substring(0,i).toUpperCase(),u=n.substring(i+1),p=u.indexOf("?"),m=-1===p?u:u.substring(0,p);let g={};if(-1!==p){const e=-1===p?"":u.substring(p);e&&(g=e?(0,r.Yj)(e):{})}let h={type:a,done:!1};if("FAKE"===a)h=f(await(0,c.E)({url:m,data:(0,l.a8)(g,e),silent:!1,responseId:null==e?void 0:e.transactionID}),a);else if("GET"===a||"POST"===a){const e="GET"===a?"GET":"POST";try{h=f(await(0,s.SY)(m,{type:e,data:g}),a)}catch(e){(0,d.E3)().uploadLog("数据转移接口出错"+JSON.stringify(e),"warning")}}return o.i.trigger("SAMPLER_TRANSFER",{url:m,data:g,method:a,type:t}),h}(t,e,m)}function g(e){return"LINK"===e.type&&e.done}async function h(e){var t,n;const{context:r}=e,o=r.node,a=null!==(n=null===(t=null==o?void 0:o.backendRequest)||void 0===t?void 0:t.params)&&void 0!==n?n:[],s={};for(const t of a){const{name:n,value:r}=t;s[n]=await(0,i.E3)(r,{state:e,joinBy:","})}return 0===a.length?void 0:s}},6796:(e,t,n)=>{"use strict";n.d(t,{AN:()=>u,O2:()=>c,Oi:()=>a,k9:()=>s,ms:()=>o,ym:()=>l});var i=n(5776),r=n(8856);function o(e,t){return t.some((t=>t.singlePage&&t.nodes.includes(e)))}function a(e){return s(e)[0]||e.current}function s(e){const{current:t,renderList:n}=e,a=[t],s=n.indexOf(t);let c=s-1,u=t;for(;;){const t=n[c--];if(!l(t,u,e.nodeGroups))break;(0,i.S)(t)||(a.unshift(t),u=t)}let d=s+1,f=t;for(;;){const t=n[d++];if(!l(t,f,e.nodeGroups))break;(0,i.S)(t)||(a.push(t),f=t)}return o(a[0].nodeUuid,e.nodeGroups)&&(a.forEach((e=>{(0,r.e)(e,{pageEnd:!1,pageStart:!1})})),(0,r.e)(a[0],{pageStart:!0}),(0,r.e)(a[a.length-1],{pageEnd:!0})),a}function c(e){const t=a(e);return t&&o(t.nodeUuid,e.nodeGroups)}const u=["end","lottery","gift"];function l(e,t,n){return!(!e||!t)&&!u.includes(e.type)&&!u.includes(t.type)&&o(e.nodeUuid,n)&&o(t.nodeUuid,n)&&function(e,t){return!(!e.origin.groupId||!t.origin.groupId||t.origin.groupId!==e.origin.groupId)&&(!t.loop&&!e.loop||!(t.loop&&!e.loop||!t.loop&&e.loop||t.loop.destInputId!==e.loop.destInputId||t.loop.node.groupId!==t.origin.groupId&&t.loop.currentIndex!==e.loop.currentIndex))}(e,t)}},560:(e,t,n)=>{"use strict";n.d(t,{S:()=>S,e:()=>E});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),m=n(568),g=n(2352),h=n(2524),v=n(7801),y=n(6620);const _={valid:!0,message:""},w={valid:!1,message:""};let x=!1,b=!1,T=!1;function S(){x=!1,b=!1,T=!1}function E(e,t,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}),I(e,t,r)}async function I(e,t,n){const S=n.pop(),E=await async function(e,t,n,S){const E=n.checkMode,I=S.checkMode,N=S.type;if("end"===N&&(clearInterval(e.timer),(0,f.e)(e,{limitTime:void 0})),(0,f.E3)().preview)return t;if(E){if("end"===N)return async function(e,t,n){if(T)return w;(0,f.W4)().network.closeSocket(),T=!0;const u=k(e,n);(0,c.ye)(e,!0),(0,v._)(e,"all"),await(0,f.W4)().hook.beforeEndSurvey(e);try{const t=await(0,o.gp)(e,"all","examine_skipped_url"),n=await(0,r.eI)(t,e.transactionID);e.responseStatus=n.status,await(0,f.W4)().hook.onEndSurvey(e)}catch(t){const n=(0,g.Wo)(t?JSON.stringify(t):"")||"";return(0,f.E3)().uploadLog("skip提交失败 "+n,"warning"),(0,f.E3)().notify((0,p.GS)(m.CW.global.tryAgain)),T=!1,(0,c.ye)(e,!1),w}i.i.trigger("CHECK_FAIL"),(0,f.W4)().network.closeSocket();try{await(0,d.ig)(e),u||(0,a.W2)(t,n,e),await(0,s.Ed)(e,n),(0,c.ye)(e,!1),O(e);const i=await(0,l.YP)("examine_skipped_url",e);if((0,l.wH)(i))return w}catch(e){(0,f.E3)().uploadLog("skip提交后续处理失败"+JSON.stringify(e),"warning")}return _}(e,n,S);if(!I)return async function(e){if(b)return w;b=!0,(0,c.ye)(e,!0);const t=await(0,o.gp)(e,"check","examine_failed_url"),n=t.answers.length;(0,v._)(e,"check");try{const o=await(0,r.KY)(t,e.transactionID);return(0,a.Sg)(e,n),(0,c.ye)(e,!1),e.responseStatus=o.status,i.i.trigger("CHECK_SUBMIT"),_}catch(t){await(0,f.W4)().hook.onEndSurvey(e),await(0,d.ig)(e);const i=(0,r.SC)(t);return L(i)?await C(e,n,"examine_failed_url",i):(b=!1,(0,f.E3)().uploadLog(JSON.stringify(t),"warning"),(0,f.E3)().notify((0,p.GS)(m.CW.global.tryAgain))),(0,c.ye)(e,!1),w}}(e)}return"end"===N?async function(e,t){var n;if(x)return w;(0,f.W4)().network.closeSocket(),x=!0;const b=k(e,t)||function(e,t){const{renderList:n,startTime:i}=e,r=function(e,t){const n=(0,p.GS)(m.CW.global.notTarget),{minTime:i,timeLessText:r}=e;return i&&i>t?r||n:""}(e,Math.ceil((Date.now()-i)/1e3));if(r){e.fakeCommitted=!0;const i=n[n.length-1];return(0,f.e)(i,{hasReward:!1,title:r}),(0,a.kB)(t,e),!0}return!1}(e,t);(0,c.ye)(e,!0),(0,v._)(e,"normal");const T=await(0,o.gp)(e,"normal","committed_url");let S,E;await async function(e,t,n){const i=t.verifyUniquenessUri,r=t.uniquenessVerification;if(i&&r.enabled&&n.origin.doUniquenessVerification&&!(0,f.E3)().preview){const n=await(0,y.aI)(t,r.params,!1);Object.keys(n).length>0&&(e.verification_params=n)}}(T,e,t),await(0,f.W4)().hook.beforeEndSurvey(e);try{S=await(0,r._K)(T,e.transactionID);const t=S.response||S;e.responseStatus=t.status,await(0,f.W4)().hook.onEndSurvey(e)}catch(t){const o=(0,r.SC)(t);if(L(o))await C(e,T.answers.length,"examine_failed_on_commit_url",o);else if(o===r.aS.response_overflow){O(e);const t=await(0,l.YP)("overflow_url",e);(0,l.wH)(t)||e.ignoreSubmittingResult||(0,f.E3)().error((0,r.O)(o)),e.responseStatus="committed",i.i.trigger("QUOTA_FAIL"),(0,f.W4)().network.closeSocket()}else{const i=null!==(n=(0,g.Wo)(t?JSON.stringify(t):""))&&void 0!==n?n:"";(0,f.E3)().uploadLog("正式提交失败: "+i,"warning"),e.ignoreSubmittingResult||(0,f.E3)().notify((0,p.GS)(m.CW.global.tryAgain)),(0,c.ye)(e,!1),x=!1}if(!e.ignoreSubmittingResult)return w;await(0,f.W4)().hook.onEndSurvey(e),S={}}e.formalResult=S;try{await(0,s.Ed)(e,t),b?E=await(0,l.YP)("invalid_url",e):((0,a.kv)(t,e,T.answers.length,S),S.reward&&(0,f.e)(t,{hasReward:!0}),await async function(e,t){const{formalResult:{reward:n}}=t;if(n&&"red_envelope"===n.type&&!n.lottery_id&&!(0,f.W4)().app.canHandleReward())return(0,u._M)(t,e)}(t,e),E=await(0,l.YP)("committed_url",e))}catch(e){(0,f.E3)().uploadLog("正式提交后续处理错误"+JSON.stringify(e))}return await(0,d.ig)(e),(0,c.ye)(e,!1),O(e),i.i.trigger("FULL_SUBMIT"),await(0,h.w)(e),(0,l.wH)(E)?w:_}(e,S):t}(e,t,S.prev,S.next);return 0===n.length||"vital"===E.type?E:I(e,E,n)}function k(e,t){const{oneReplyPerTerminal:n,sid:i}=e;return!!t.origin.abandonAnswer&&(e.fakeCommitted=!0,(0,a.kr)(t,e),n&&(0,f.W4)().storage.set(i,"1"),!0)}function O(e){const{oneReplyPerTerminal:t,sid:n}=e;t&&(0,f.W4)().storage.set(n,"1")}async function C(e,t,n,o){(0,a.ms)(e,t),O(e);const s=await(0,l.YP)(n,e);(0,l.wH)(s)||(0,f.E3)().error((0,r.O)(o)),e.responseStatus="examine_failed",i.i.trigger("QUOTA_FAIL"),(0,f.W4)().network.closeSocket()}function L(e){return e===r.aS.quota_not_match||e===r.aS.quota_full}},9948:(e,t,n)=>{"use strict";n.d(t,{Gg:()=>z,q0:()=>X,ER:()=>H,Y1:()=>q});var i=n(5776),r=n(8956),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),m=n(7788),g=n(9216),h=n(7320),v=n(7556),y=n(560),_=(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 q=(0,k.Cu)((()=>{(0,T.E3)().realTimePreview||K()||w.i.trigger("STRETCH_OK")}));function F(e){return!K()&&!(0,W.i)(e,!0)}function j(e){(0,b.K)()||(e.answerChangedSinceStart=!0)}function z(e){e.handleEvents={...I._,handleQuickAnswer:t=>(j(e),(0,N.E)(t)),async handleLangChange(e){await(0,S.Sk)(e.locale,!0)},async handleCascadeInput(e,t,n,i){if(!F(i))return null;const r=(0,_.cv)(e,t,n,i);return this.handleOptionInput(e,r,i).then((e=>e))},handleOptionAssistInput:(t,n,i,r)=>((0,T.e)(i.assistValue,{[n]:t}),j(e),Y({result:!0},r)),handleCascadeClick:async(e,t,n)=>F(n)?Y(await(0,_.GA)(e,t,n),n).then((e=>e)):null,async handleMenuClick(e,t){const n=()=>t.options.filter((e=>e.selected)).map((e=>e.text));return F(t)?(await this.handleOptionClick(t.options[e],t),n()):n()},async handleOptionClick(t,n){if(!F(n))return null;const i=await(0,c.o)(t,n);return i.result&&(0,p.me)(t,n),j(e),Y(i,n).then((e=>e))},async handleOptionInput(t,n,i){if(!F(i))return null;const r=await(0,s.wf)(t,n,i);return r.result&&(0,p.ui)(t,n,i),j(e),Y(r,i).then((e=>e))},handleAutoCpltInput:async(e,t,n)=>((0,s.I5)(e,t,n),(0,p.Ux)(e,t,n)),async handleSequenceInput(t,n,i,r){if(!F(i))return null;const o=r.sortNo,a=await(0,d.W)(t,n,i),s=r.sortNo;if(a.result&&o!==s){const e=i.options.findIndex((e=>e===r));(0,p.we)(e,i)}return j(e),Y(a,i).then((e=>e))},async handleQuestionInput(t,n){if(!F(n))return null;const i=await(0,u.s)(t,n);return i.result&&(0,p.Oo)(t,n),j(e),Y(i,n).then((e=>e))},handleLocateFailed(t){const n=(0,u.S)(t);return n.result&&(0,p.m_)(t),j(e),Y(n,t).then((e=>e))},async handlePrevClick(){if(!(0,T.E3)().realTimePreview&&!V()&&e.prevButton&&!K())return(0,p.Id)(e.current),(0,o.Wf)(e).then((e=>e))},handleMaxDiffInput(t,n,i,r){if(!F(r))return null;const o=(0,l.w)(t,n,i);return j(e),Y(o,r).then((e=>e))},async handleNextClick(){if((0,T.E3)().realTimePreview||K()||V()&&(0,o.YR)())return;(0,o.ye)(e,!0),await(0,G.a)(e);const{current:t}=e;if((0,p.GS)(t),"lottery"===t.type)(0,o.e0)(e,t),(0,o.ye)(e,!1);else if(await async function(e){const t=e.filter((e=>!!e.origin.backtracking));let n=!1;for(const e of t){const{origin:{backtracking:t},parent:i}=e;if(t.targetNodeUuid){const{logic:r,request:o}=t;let a=await(0,m.qo)(o,e);if(a.valid&&(a=await(0,m.YZ)(r,i)),n=a.valid,n)return(0,T.e)(i,{current:e}),n}}return n}(e.nodes))await async function(e){await(0,k.W_)(200);const t=e.current,{backtracking:{targetNodeUuid:n}}=t.origin,r=await async function(e,t){const n=[...e.renderList].reverse(),r=n.findIndex((e=>(0,k.oj)(e.nodeUuid,t)));for(let e=r;e>=0;e--){const t=n[e];if(!(0,i.S)(t))return t}return n[r]}(e,n);return await async function(e,t){const{renderList:n}=e,i=n.findIndex((e=>e.renderId===t.renderId)),r=n.slice(i).map((({renderId:e})=>e));await(0,x.Yp)(e,r),(0,T.e)(e,{current:t});const a=(0,M.k9)(e),s=a.indexOf(t),c=a.slice(s),u=[];let l=t.prev;for(const t of c){const{origin:n,loop:i,random:r,loopStack:o}=t,a=(0,f.e_)({target:n,loop:i,random:r,loopStack:o},e),s=await(0,f.o9)(a,l);l=s,u.push(s)}await(0,T.W4)().hook.beforeGotoNext(),(0,T.e)(e,{current:u[0],nodes:a.slice(0,s).concat(u),renderList:n.slice(0,i).concat(u)}),(0,o.ye)(e,!1),w.i.trigger("NEXT_OK"),(0,w.U3)(e.current,!0)}(e,r),(0,O.K8)(e),await(0,x.iq)(e),await(0,P.w)(e),r}(e),(0,o.ye)(e,!1);else if(await(0,o.KY)(e)){if(!V())return(0,o.I7)(e);(0,o.ID)(e)}else(0,o.ye)(e,!1)}},Object.keys(e.handleEvents).forEach((t=>{const n=e.handleEvents[t];e.handleEvents[t]=async(...t)=>{(0,g.S_)(e,e.current);const i=await n.apply(e.handleEvents,t);return(0,g.S_)(e,e.current),i}}))}function V(){return(0,T.E3)().surveyState.refreshing}function K(){return(0,T.E3)().surveyState.nextLoading||V()}async function Y(e,t){(0,B.kZ)(t)&&await(0,D.e)(t),(0,w.U3)(t),await(0,x.mi)(t);const n=t.parent;return(0,T.E3)().realTimePreview||(n.inSingleGroup?((0,T.e)(n,{current:t}),await(0,g.AD)(n,t,{type:"page_inner",delay:60})):q()),(0,w.oP)(t),e.result}function H(e,t={}){return e=e||(0,T.E3)().surveyState,(0,T.e)(e,{renderList:[],current:null,loopStack:[],randomList:[],...t}),Q(e)}async function Q(e){(0,o.ye)(e,!0);const t=e.nodeList,n=(0,i.q_)(t),a=await(0,r.kF)(t,e,n);!function(e,t){const n=(new Date).getTime();(0,T.e)(e,{nextBtnText:t.nextBtnText||(0,S.GS)(C.CW.global.next),prevBtnText:t.prevBtnText||(0,S.GS)(C.CW.global.previous),prevEnabled:!0===t.goBackEnabled,startTime:n,currentStartTime:n})}(e,n),await(0,o.eO)(e,a,null);const{current:s}=e,c=(0,i.S)(s),u=(0,M.O2)(e);if(c||u){const t=u?"page_inner":"page_next";await(0,g.AD)(e,s,{type:t,initial:!0})}else(0,T.e)(e,{renderList:[s]}),await(0,P.w)(e),q();(0,O.K8)(e);const l=e.current;return l.reached=!0,(0,p.IU)(e,l),w.i.trigger("START_OK"),await(0,x.aC)(e),s!==l&&await(0,y.e)(e,{valid:!0,message:""},s,l),(0,w.U3)(e.current,!0),(0,o.ye)(e,!1),e}async function X(){const e=(0,T.W4)();if((0,T.E3)().surveyState)return(0,T.E3)().surveyState;const t=await async function(){const e=(0,T.E3)().sid,t=(0,T.E3)().startState;if(!t)return(0,T.W4)().app.gotoStartPage((0,R.uK)()),(0,T.E3)().customAbort(),null;if((0,T.E3)().preview)return t;const{parsedPayload:{surveyMeta:n}}=t,{payload_digest:i,channel:r,interviewee:o}=n;!function(e,t){(0,T.W4)().dev.autoRun||(0,T.W4)().storage.get(e)&&t&&!(0,T.E3)().preview&&((0,T.E3)().error((0,S.GS)(C.CW.global.antiAgain)),(0,T.E3)().customAbort())}(e,!1===n.collector.multiple_response);const a={code:e,payload_digest:i,platform:r.type,interviewee_id:o&&o.id,query_params:(0,R.uK)()};try{const e=await(0,h._Y)(a);return t.transactionID=e.id,t.status=e.status,t.platform=e.platform,t.digest=i,t.channel=r,(0,T.W4)().network.connectSocket(e.id,n.collector.id),t}catch(e){throw(0,h.cA)(e),e}}();if(!t)return null;await async function(e){const{parsedPayload:t,startNode:n,language:i}=e;if(!(0,T.E3)().preview&&!t.surveyMeta.start_auto){const{surveyMeta:{diagram_url:e}}=t;let n;try{n=await(0,h.kj)(e,{type:"GET"},!0)}catch(e){throw(0,T.E3)().error((0,S.GS)(C.CW.global.downloadError)),e}const i=await(0,L.K)(n);t.nodeList=(0,v.c5)(i.nodes,t.nodeGroups),t.uniquenessVerification=i.uniquenessVerification}(0,E.O_)(n.autoCpltGroups,i);const{nodeList:r,variables:o,nodeGroups:a}=t;if(n.currentLang!==i){const e=t.langs.find((e=>e.locale===i));if(e){const t=await async function(e,t){if(!U[e.locale]){const t=async()=>{let t;if(e.content)t=e.content;else{const n=await(0,h.kj)(e.url,{type:"GET"},!0);t=await(0,L.K)(n)}return t};U[e.locale]=t()}return U[e.locale]}(e);(0,E.w3)({nodes:r,variables:o,groups:a},t)}}}(t);const n=function(e){const{parsedPayload:t,userInfo:n,theme:i,hasVar:r,sid:o,langTable:s,startNode:c,surveyId:u,summary:l,language:d,images:f,langResume:p,title:m,transactionID:g,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}=e,{nodeList:R,surveyMeta:P,testCases:M,uniquenessVerification:W}=t;let U=!1;(0,A.U)()||P.collector&&(U=!1===P.collector.multiple_response);const{fakedServers:G,autoCpltGroups:D,noWxShare:B,previewShadowNodes:q,previewQuickAnswer:F,ignoreSubmittingResult:j,qNumberRequired:V,asterisksRequired:K,progressBarRequired:Y,nodeTypeInfoRequired:H,limitTime:Q,minTime:X,timeoutText:Z,timeLessText:J,resumeEnabled:$}=c,ee={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:q&&!(0,T.W4)().dev.autoRun,previewQuickAnswer:F,ignoreSubmittingResult:j,langResume:p,langTable:s,testCases:M,progress:0,resumeEnabled:$||(0,A.U)(),images:f,eventHub:w.i,language:d,sid:o,parsedPayload:t,digest:y,channel:_,transactionID:g,status:h,platform:v,fakedServers:G,autoCpltGroups:D,noWxShare:B,theme:i,userInfo:n,responseStatus:"created",context:{node:void 0,option:void 0},completeUrl:"",quotaFullUrl:"",screenOutUrl:"",title:m,summary:l,bonusLimitTime:"",nodeList:R,companyID:"",oneReplyPerTerminal:U,surveyId:u,qNumberRequired:V,asterisksRequired:K,progressBarRequired:Y,nodeTypeInfoRequired:H,preview:(0,T.E3)().preview,nextBtnText:"",prevBtnText:"",prevEnabled:!1,randomList:[],loopStack:[],startTime:0,currentStartTime:0,renderList:[],current:void 0,limitTime:Q||void 0,minTime:X,timeoutText:Z||"",timeLessText:J||"",timer:-1,restTime:(0,a.KM)(Q),hasVar:r,nextLoading:!1,refreshing:!1,phoneUsed:!1,phoneNumber:"",startNode:c,nodes:[],prevButton:"",nextButton:"",inSingleGroup:null,needProgressBar:!1,verifyUniquenessUri:P.verify_uniqueness_uri,uniquenessVerification:W};return z(ee),ee}(t);return(0,T.E3)().surveyState=n,e.network.initUploader(),await async function(e){const{startNode:t}=e,n=(0,f.e_)({target:t},e),i=await(0,m.qc)(n,!0);i.valid?e.initValidationPassed=!0:((0,T.E3)().error(i.message||(0,S.GS)(C.CW.verify.failed)),(0,T.E3)().customAbort())}(n),await async function(e){if(await Q(e),function(e){let t=e.limitTime;t&&(e.timer=setInterval((async()=>{t--,t||((0,p.sH)(e),clearInterval(e.timer),(0,x.ig)(e),(0,T.E3)().error(e.timeoutText||(0,S.GS)(C.CW.global.timeOver))),(0,T.e)(e,{restTime:(0,a.KM)(t)})}),1e3))}(e),e.langResume||e.resumeEnabled&&!(0,T.E3)().preview){const t=await(0,b.y)(e);(0,T.e)(e,{answerResumer:t}),e.langResume&&setTimeout((()=>e.answerResumer.handleSure()),1e3)}e.answerResumer&&e.answerResumer.show||(0,T.W4)().hook.onStartNewSurvey(e)}(n),await e.hook.afterFetchSurvey(n),n}},5170:(e,t,n)=>{"use strict";n.d(t,{_:()=>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(e){const t=l[e]||0;return Date.now()-t<3e4?((0,s.E3)().notify((0,c.GS)(i.CW.verify.tooFrequent)),null):()=>{l[e]=Date.now()}}const f={handleInputPhone(e,t){return this.handleQuestionInput({phoneNumber:e},t)},handleInputCode(e,t){return this.handleQuestionInput({code:e},t)},handleAutoLocate(e,t){return this.handleQuestionInput(e,t)},handleManualLocate(e,t){return this.handleQuestionInput(e,t)},handleGetCodeClick:e=>async function(e){return(0,u.is)(e,"verify"===e.type)?async function(e){const{parent:t,nodeUuid:n,phoneNumber:u,validateType:l}=e,{transactionID:f}=t;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(e.renderId);if(!n)return!1;p={...p,phone_num:u},e.messageGetFailed=!1;try{const i=await(0,a.eY)(p);e.serverValidations=i,t.phoneNumber=u,t.phoneUsed=i.phone_num_used,t.phoneUsed&&(0,o.U1)(t,e),n()}catch(t){return e.messageGetFailed=!0,!1}}else if("image"===l){const t=await(0,a.eY)(p);e.serverValidations=t,(0,s.e)(e,{captcha:t.image})}return!0}(e):async function(e){if((0,s.E3)().preview)return(0,s.E3)().notify((0,c.GS)(i.CW.preview.noMessage)),!1;const{phoneNumber:t,rewardId:n}=e;if(!(0,r.KA)(t))return(0,s.E3)().notify((0,c.GS)(i.CW.fill.needPhoneNumber)),!1;const o=d(e.renderId);if(!o)return!1;e.messageGetFailed=!1;try{await(0,a.ae)({phone_num:t},n),o()}catch(t){return e.messageGetFailed=!0,!1}return!0}(e)}(e)}},3120:(e,t,n)=>{"use strict";n.d(t,{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(e,t){return(0,i.oV)(t)||e.length<=t?[...e]:s(e.map((e=>({...e.option,cascade:e}))),t).map((e=>e.cascade))}function s(e,t){return(0,i.oV)(t)||e.length<=t?[...e]:d(e.map((e=>{const t=e.origin.inferList.reduce(((e,t)=>(t.active&&"select"===t.type&&(e+=t.weight),e)),0);return{option:e,weight:t}})),t).map((e=>e.option))}function c(e){return e.filter((e=>{const{option:t}=e;return!(!t||!t.origin.inferList)&&t.origin.inferList.some((e=>e.active))}))}function u(e,t){return e.filter((e=>e.origin.inferList.some((e=>e.active&&e.type===t))))}async function l(e,t){if(!e)return;const n=t.parent;e.origin.inferList=e.origin.inferList||[];for(const t of e.origin.inferList){const{activeConfig:i}=t;i?(n.context.option=e,t.active=await(0,r.wx)(n,i),n.context.option=null):t.active=!0}}function d(e,t){if(e=[...e],(0,i.oV)(t)||e.length<=t)return e;const n=e.reduce(((e,t)=>e+t.weight),0);let r=0,o=0,a=e.map((e=>{const t=e.weight/n;o=r+t;const i={item:e,floor:r,ceil:o};return r=o,i}));const s=[];for(;s.length<t;){const e=Math.random()*o,t=a.find((t=>t.floor<=e&&t.ceil>e));t&&(s.push(t.item),a=a.filter((e=>e!==t)))}return s}async function f(e,t){const{parent:n}=t,i=[];for(const t of e)i.push(await(0,o.E3)(t.candidates,{state:n,joinBy:","}));return i.join(",")}function p(e){const t={},n=[];return e.split(",").forEach((e=>{let i=e,r=1;const o=e.match(/\(([\d\.]+)\)$/);o&&(i=e.replace(/\([\d\.]+\)$/,""),r=parseFloat(o[1]));const a=t[i];if(a)a.weight+=r;else{const e={text:i,weight:r};n.push(e),t[i]=e}})),n.filter((e=>0!==e.weight))}},1488:(e,t,n)=>{"use strict";n.d(t,{A9:()=>g,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(e,t){let{start:n,end:i}=await(0,o._u)(e,t);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(e,t,n){return!!t&&t.some((t=>{if(t.startsWith("/")&&t.endsWith("/")){const n=t.substring(1,t.length-1),i=new RegExp(n);return!!e.match(i)}return n?n(e,t):e===t}))}async function d(e,t,n){let i=0,r=await e();for(;l(r,t,n);)if(r=await e(),i++,i>10)throw new Error("Hard to infer, rejected 10 times");return r}async function f(e,t,n=1){if(!e.origin.inferList)return{value:"",antis:null};const i=e.origin.inferList.filter((e=>e.active&&"input"===e.type));if(0===i.length)return{value:"",antis:null};const r=await(0,a.eQ)(i,t);if(""===r.replace(/,/g,""))return{value:"__FORCE_EMPTY__",antis:null};const o=[];if(r.split(",").forEach((e=>{e.startsWith("!")?o.push(e.substring(1)):e.match(/\(0\)$/)&&o.push(e.replace(/\(0\)$/,""))})),o.length)return{value:"",antis:o};const s=(0,a.wJ)(r);return{value:(0,a.CI)(s,n).map((e=>e.text)).join(","),antis:null}}function p(){return"1"+h(1e9,9999999999)}function m(e){return c[e]||Math.random().toString().replace("0.","")}async function g(){return c||(c=await(0,s.kj)("https://media.choiceform.com/infer/infer.json",{type:"GET",contentType:"application/json"},!1),c)}function h(e=0,t=10,n=0){const i=Math.pow(10,n);return e*=i,t*=i,((0,r.ai)(e,t)/i).toString()}function v(e,t=1,n=10){const i=Math.min(1e4,n);let o=m(e);for(;o.length<i;)o+=m(e);const a=o.length,s=(0,r.ai)(i,a),c=s-(0,r.ai)(t,i),u=o.substring(c,s);return""===u.trim()?v(e,t,i):u}function y(e=0,t=5e3,n=3){e=Math.max(e,0),t=Math.min(t,5e3);let i=(0,r.ai)(e,t).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(e,t){const n=_[e.origin.fillType]||_.none,i=await n(e,t);return"__FORCE_EMPTY__"===i?"":i}_.auto_complete=async(e,t)=>{let{completeGroups:n}=e;const{itemsMax:o,itemsMin:a}=await(0,i.jJ)(e,t),s=(0,r.ai)(a,o)||1,{value:c,antis:u}=await f(e,t,s);return c||(u&&(n=n.filter((e=>!l(e.name,u)))),(0,r.my)(n,s).map((e=>e.name)).join(","))},_.chars=async(e,t)=>{const{value:n,antis:i}=await f(e,t);if(n)return n;const{tolerance:r}=e.origin,{start:o,end:a}=await u(e,t);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"===t.parent.language?"chinese":"alphabet",o,a):v("zh_cn"===t.parent.language?"chinese":"alphabet",o,a)),i)},_.date=async(e,t)=>{const{value:n,antis:i}=await f(e,t);if(n)return n;const{grade:r}=e,{start:o,end:a}=await u(e,t);return d((()=>y(o,a,r)),i)},_.date_range=async(e,t)=>{const{value:n,antis:i}=await f(e,t);if(n)return n;const r=y(1960,2050,3),o=Number(r.split(" ")[0]);return d((()=>{const e=y(o,2060);return r+" - "+e}),i)},_.email=async(e,t)=>{const{value:n,antis:i}=await f(e,t);return n||d((()=>((0,r.Av)(1,6)+"@"+(0,r.Av)(1,6)+"."+(0,r.Av)(1,4)).toLowerCase()),i)},_.float=async(e,t)=>{const{value:n,antis:i}=await f(e,t);if(n)return n;const{scale:r}=e;return d((async()=>{const{start:n,end:i}=await u(e,t);return h(n,i,r)}),i)},_.integer=async(e,t)=>{const{value:n,antis:i}=await f(e,t);if(n)return n;const{start:r,end:o}=await u(e,t);return d((()=>h(r,o)),i)},_.list_select=async(e,t)=>{let{selectList:n}=e;const{itemsMax:o,itemsMin:a}=await(0,i.jJ)(e,t),s=(0,r.ai)(a||1,o||1)||1,{value:c,antis:u}=await f(e,t,s);return c||(u&&(n=n.filter((e=>!l(e,u)))),(0,r.my)(n,s).join(","))},_.none=async(e,t)=>{const{value:n,antis:i}=await f(e,t);return n||d((()=>v("zh_cn"===t.parent.language?"chinese":"alphabet",1,10)),i)},_.phone_number=async(e,t)=>{const{value:n,antis:i}=await f(e,t);return n||d((()=>p()),i)},_.postcode=async(e,t)=>{const{value:n,antis:i}=await f(e,t);return n||await d((()=>h(1e5,999999)),i)},_.time=async(e,t)=>{const{value:n,antis:i}=await f(e,t);return n||await d((()=>h(1,25)+":"+h(1,60)),i)},_.time_range=async(e,t)=>{const{value:n,antis:i}=await f(e,t);return n||await d((()=>{const e=h(1,20);return e+":"+h(1,60)+" - "+h(Number(e)+1,24)+":"+h(1,60)}),i)},_.time_duration=async(e,t)=>{const{value:n,antis:i}=await f(e,t);if(n)return n;const{grade:r}=e;return await d((()=>{if(r<=3){let e=h(1,20)+"d";return r>1&&(e+=" "+h(1,24)+"h"),r>2&&(e+=" "+h(1,60)+"m"),e}{let e=h(1,60)+"h";return r>4&&(e+=h(1,60)+"m"),r>5&&(e+=h(1,60)),e}}),i)},_.url=async(e,t)=>{const{value:n,antis:i}=await f(e,t);return n||await d((()=>("https://"+(0,r.Av)(1,3)+"."+(0,r.Av)(1,6)+"."+(0,r.Av)(1,3)).toLowerCase()),i)}},8360:(e,t,n)=>{"use strict";n.d(t,{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 m(e,t){const n={};e.sortNo&&(n.sortNo=-1),e.selected&&(n.selected=!1),e.value&&(n.value=""),await(0,l.UR)(e,t),(0,c.e)(e,n)}async function g(e,t){(0,c.e)(e,{selected:!1}),e.option.origin&&await(0,l.UR)(e.option,t),e.list&&e.list.forEach((e=>g(e,t)))}async function h(e){(0,p._O)(e)&&(0,c.e)(e.video,{ended:!0});let t=[];(0,p.G6)(e)&&(t=[...t,...e.options]),(0,p.IN)(e)&&(t=[...t,...e.otherOptions]);for(const n of t)await m(n,e);const{cascade:n}=e;n&&await g(n,e)}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(e){const{regions:t}=e,n=e.infoRange||"county",i=function(e){const t=k((0,o.wR)(e),1)[0];if(!t||t.isOtherOpt)return null;const n=t.origin.inferList.some((e=>e.active));return n?t:null}(e);if(i){const e=i.text.split("-");return{address:e,indexes:(0,f.Cm)(e,t),point:{lat:i.origin.latitude,lng:i.origin.longitude}}}{const e=(0,r.ec)(t.length);let i=(0,d.Wo)(e);const o=t[e],a=[o.name,"",""];if("province"!==n){const e=(0,r.ec)(o.cities.length),t=o.cities[e];if(a[1]=t.name,i=i+" "+e,"city"!==n){const e=(0,r.ec)(t.areas.length),n=t.areas[e];n&&(a[2]=n.name,i=i+" "+e)}}return{address:a,indexes:i,point:{lng:0,lat:0}}}}async function x(e,t){const{value:n}=await(0,a.hS)(e,t);if(n)return"__FORCE_EMPTY__"===n?"":n;const{fileLimits:i}=e,o=(0,r.my)(i,1)[0];return y[o]}async function b(e,t){const n=[],i=[];e.forEach((e=>{if((0,o.yg)(e.origin))n.push(e);else{let t=!0;(0,v.I9)(e.origin)&&(0,d.oV)(e.origin.inferList)&&(t=Math.random()>.9),t&&i.push(e)}})),await O(i,t,1);const a=(0,r.ai)(1,n.length);E(n,t,a)}async function T(e,t){const{parent:n,origin:i}=t;let o=await(0,s.W0)(i.fillMin,{state:n});o=o||0;let a=e.length;o&&i.inputInferLimit>o&&i.inputInferLimit<a&&(a=i.inputInferLimit);const c=o?(0,r.ai)(o,a):a;return(0,r.my)(e,c)}async function S(e,t){e.parent.context.option=t;const n=await(0,a.EZ)(t,e);return e.parent.context.option=null,await e.parent.handleEvents.handleOptionInput(n,t,e)}function E(e,t,n){(0,r.my)(e,n).forEach((e=>S(t,e)))}async function I(e,t){if(await e.parent.handleEvents.handleOptionClick(t,e),t.useComment)return S(e,t)}function k(e,t){const n=(0,l.Mx)(e,"select"),i=[],o=[];if(n.forEach((e=>{e.origin.inferList.every((e=>0===Number(e.weight)))||e.disabled?i.push(e):o.push(e)})),o.length>0)return(0,l.WW)(o,t);{let n=e.filter((e=>!e.disabled));return i.length>0&&(n=e.filter((e=>!i.includes(e)))),(0,r.my)(n,t)}}async function O(e,t,n){const i=k(e,n).sort(((e,t)=>(0,v.I9)(e.origin)?1:(0,v.e4)(e.origin,t.origin)));for(const e of i)await I(t,e)}async function C(e,t){const{multiple:n,min:i,max:o,list:a}=e;if(!a)return;const s=function(e,t){const n=(0,l.cX)(e);return n.length>0?(0,l.WY)(n,t):(0,r.my)(e,t)}(a,n?(0,r.ai)(i||1,o||1):1);for(const n of s){const i=a.indexOf(n);await t.parent.handleEvents.handleCascadeClick(i,e,t),await C(n,t)}}async function L(e){const t=(0,o.wR)(e),n=e.origin;let a=1;if((0,i._A)(n)){const t=await(0,i.EH)(e,e.parent),{min:o}=t;let{max:s}=t;const{selectInferLimit:c}=n;c>o&&c<s&&(s=c),a=(0,r.ai)(o||1,s)}const s=[],c=[];t.forEach((e=>{(0,o.yg)(e.origin)?c.push(e):s.push(e)})),await O(s,e,a);const u=(0,r.ai)(1,c.length);E(c,e,u)}function N(e,t){const n=[];for(let i=e;i<=t;i++)n.push(i);return n}function R(e,t,n){const i=[];for(let r=e;r<t;r+=n)i.push(r);return i.push(t),i}async function A(e,t,n){const i=[...n].sort(),{value:o,antis:s}=await(0,a.hS)(e,t,1);if(o){if("__FORCE_EMPTY__"===o)return"0";{const e=i[0],t=i[i.length-1];return o<e?e:o>t?t:o}}{const e=()=>(0,r.my)(n,1)[0];return(0,a.EP)(e,s)}}function P(e){let[t,n]=e.split("~").map((e=>Number(e)));return t>n&&([n,t]=[t,n]),[t,n]}function M(e,t,n){const[i,o]=e.split("_");let a,s;if(i.includes("~")){const[e,t]=P(i);a=(0,r.ai)(e,t)}else a=Math.min(Math.max(Number(i),0),t);if(o.includes("~")){const[e,t]=P(o);s=(0,r.ai)(e,t)}else s=Math.min(Math.max(Number(o),0),n);return{x:a,y:s}}function W(e,t){const[n,i]=e.split("_").map((e=>Number(e))),[r,o]=t.split("_");let a=!1,s=!1;if(r.includes("~")){const[e,t]=P(r);a=e<=n&&n<=t}else a=Number(r)===n;if(o.includes("~")){const[e,t]=P(o);s=e<=i&&i<=t}else s=Number(o)===i;return a&&s}async function U(e,t){const{value:n,antis:i}=await(0,a.hS)(e,t,1),{mapImgHeight:o,mapImgWidth:s}=t;if(n)return"__FORCE_EMPTY__"===n?null:M(n,s,o);{const e=()=>(0,r.ec)(s)+"_"+(0,r.ec)(o);return M(await(0,a.EP)(e,i,W),s,o)}}function G(e,t){let n=t.filter((t=>!(-1!==t.sortNo||!t.origin.inferList)&&t.origin.inferList.some((t=>{if(!t.active)return!1;const n=(0,l.wJ)(t.candidates),i=(0,l.CI)(n,1);return i.length>0&&Number(i[0].text)<=e}))));0===n.length&&(n=t.filter((e=>-1===e.sortNo)));const i=(0,r.my)(n,1)[0];i&&(0,c.e)(i,{sortNo:e,selected:!0})}async function D(e){return await(0,a.A9)(),async function(e,t){const{type:n,readonly:i}=e;if(i)return(0,u.Y1)();await h(e);const r=_[n]||L;await r(e)}(e)}_.select=L,_.value_mark=async e=>{const{options:t,otherOptions:n}=e,i=await T(t,e);for(const t of i){const n=t.minValue||1,i=t.maxValue||5,r=t.step,o=await A(t,e,R(n,i,r).map((e=>(0,d.Wo)(e))));await e.parent.handleEvents.handleOptionInput(o,t,e)}await b(n,e)},_.heat_map=async e=>{const{options:t,otherOptions:n}=e;for(const n of t){const t=await U(n,e);t&&await e.parent.handleEvents.handleQuestionInput(t,e)}await b(n,e)},_.icon_mark=async e=>{const{options:t,otherOptions:n}=e,i=await T(t,e);for(const t of i){const n="rating-nps"===t.iconName,i=n?0:1,r=(n?t.iconCount-1:t.iconCount)||5,o=await A(t,e,N(i,r).map((e=>(0,d.Wo)(e))));await e.parent.handleEvents.handleOptionInput(o,t,e)}await b(n,e)},_.slide_rate=async e=>{const{options:t,rateOptions:n,otherOptions:i}=e,r=await T(t,e),o=n.map((e=>e.value));for(const t of r){const n=await A(t,e,o);await e.parent.handleEvents.handleOptionInput(n,t,e)}await b(i,e)},_.weight=async e=>{let{weightTotal:t}=e;const{options:n,otherOptions:i}=e;t<=0&&(t=100);const o=[],a=[];n.forEach((e=>{const{inferList:t}=e.origin;t&&t.some((e=>e.active))?o.push(e):a.push(e)}));const s=[];for(const n of o){const i=n.origin.inferList.filter((e=>e.active)),r=await(0,l.eQ)(i,e),o=(0,l.wJ)(r),a=(0,l.CI)(o,1),c=Number(a[0].text);s.push(c),t-=c}const c=(0,r.Sq)(t,a.length),u=s.concat(c),d=o.concat(a);for(const[t,n]of d.entries()){const i=u[t];await e.parent.handleEvents.handleOptionInput(i.toString(),n,e)}await b(i,e)},_.fill=async e=>{const{options:t,otherOptions:n}=e,i=await T(t,e);for(const t of i)await S(e,t);await b(n,e)},_.sequence=async e=>{const{options:t,otherOptions:n}=e,i=t.length;let r=1;for(;r<=i;)G(r,t),r+=1;t.sort(((e,t)=>e.sortNo>t.sortNo?1:-1)),await b(n,e),(0,u.Y1)()},_.cascade=async e=>{const{cascade:t,otherOptions:n}=e;return await C(t,e),b(n,e)},_.describe=async()=>{(0,u.Y1)()},_.max_diff=async e=>{const t=function(e){const t=[],{options:n,itemCountPerTask:i,taskCount:r}=e,o=Math.ceil(r*i/n.length);return e.options.forEach((e=>{if(!e.origin.inferList)return;let n=e.origin.inferList.reduce(((e,t)=>(t.active&&(e+=t.candidates.split(",").map((e=>Number(e)||0)).reduce(((e,t)=>e+t),0)),e)),0);n>o?n=o:n<-o&&(n=-o),n&&t.push({needValue:n,option:e})})),t}(e),{tasks:n,parent:{handleEvents:i}}=e;for(const o of n){let n=o.items.find((e=>t.find((t=>{const n=t.option===e.option&&t.needValue>0;return n&&(t.needValue-=1),n})))),a=o.items.find((e=>t.find((t=>{const n=t.option===e.option&&t.needValue<0;return n&&(t.needValue+=1),n}))));if(!n){const e=o.items.filter((e=>t.every((t=>t.option!==e.option))));n=(0,r.my)(e,1)[0]}if(!a||a===n){const e=o.items.filter((e=>t.every((t=>t.option!==e.option))&&e!==n));a=(0,r.my)(e,1)[0]}await i.handleMaxDiffInput(1,n,o,e),await i.handleMaxDiffInput(-1,a,o,e)}},_.upload=async e=>{const{options:t,otherOptions:n}=e,{min:o,max:a}=await(0,i.YP)(e,e.parent),s=(0,r.ai)(o||1,a),c=(0,r.my)(t,s);for(const t of c)await e.parent.handleEvents.handleOptionInput({filePath:await x(t,e)},t,e);await b(n,e)},_.region=e=>{const{indexes:t}=w(e);return e.parent.handleEvents.handleQuestionInput(t,e)},_.location=e=>{const{address:t,point:n}=w(e),i={address:{province:t[0],city:t[1],district:t[2],country:""},point:{lat:n.lat||Number((0,a.Ep)(0,90)),lng:n.lng||Number((0,a.Ep)(0,180))}};return e.parent.handleEvents.handleQuestionInput(i,e)},_.area=_.location,_.matrix=async e=>{const{options:t,flatten:n,otherOptions:o,origin:a}=e,{min:s,max:c}=await(0,i.EH)(e,e.parent);if((0,i.cd)(a))await O(t,e,1);else if((0,i.cx)(a)){let t=n;const i=n[0].list.length;n.length>i&&(t=(0,r.my)(n,i));const o=[];for(const n of t){const t=n.list.filter(((e,t)=>!o.includes(t)));if(0===t.length)break;await O(t,e,1);const i=n.list.findIndex((e=>e.selected));o.push(i)}}else if((0,i.ct)(a)||(0,i.gd)(a))for(const t of n)await O(t.list,e,1);else if((0,i.KC)(a)||(0,i.S2)(a))for(const t of n){const n=(0,r.ai)(s||1,c);await O(t.list,e,n)}else if((0,i.Un)(a)){const n=(0,r.ai)(s||1,c);await O(t,e,n)}await b(o,e)},_.end=async()=>{},_.verify=e=>e.parent.handleEvents.handleQuestionInput({phoneNumber:(0,a.uc)(),code:(0,a.sh)("number")},e)},8792:(e,t,n)=>{"use strict";n.d(t,{U:()=>u,e:()=>c}),n(7768),n(9952);var i=n(8856);const r=[],o=[/^https:\/\/[^.]+\.choiceform\.com\//,/^http:\/\/localhost/],a={};async function s(e,t){if(!a[e]){const n=async()=>{const n=(0,i.W4)().network.getFakeHost();if(!function(e){return o.some((t=>!!e.match(t)))}(e))throw new Error("can not load plugin files from untrusted site: "+e);n.currentSpace=e,await(0,i.W4)().network.loadFakeFile("".concat(e,".js"),{crossorigin:"anonymous"},t),n.currentSpace="",r.push(e)};a[e]=n()}return a[e]}async function c(e){const t=(0,i.W4)().network.getFakeHost().fakedServers;if(!t[e]){const t=e.replace(/\/[^/]+$/,"");await s(t,!0)}return t[e]}async function u(e,t){let n=e.startNode.fakedServers.concat(function(e){if((0,i.E3)().preview)return[];const{parsedPayload:{surveyMeta:{collector:{sampler_config:t}}}}=e;return t?["committed_url","examine_failed_url","examine_skipped_url","invalid_url"].reduce(((e,n)=>{const i=t[n];if(i&&0===i.indexOf("FAKE:")){const t=i.substring(5,i.lastIndexOf("/"));e.includes(t)||e.push(t)}return e}),[]):[]}(e));if(n=n.filter((e=>!r.includes(e))),n&&0!==n.length)for(const e of n)await s(e,t)}},4732:(e,t,n)=>{"use strict";n.d(t,{y:()=>r});const i={actions:[]};function r(e){i.actions.push(e)}},6784:(e,t,n)=>{"use strict";n.d(t,{EZ:()=>R,GS:()=>N,IU:()=>X,Id:()=>C,ML:()=>q,Oo:()=>O,Q3:()=>F,Sg:()=>M,U1:()=>x,U3:()=>V,U7:()=>Q,Ux:()=>S,W2:()=>A,Wy:()=>Z,YZ:()=>z,aS:()=>L,cR:()=>B,eK:()=>K,kB:()=>W,kr:()=>U,kv:()=>D,mT:()=>Y,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 m=1e4;let g=-1;function h(){const{dev:{local:e}}=(0,l.W4)(),{preview:t,realTimePreview:n,hostConfig:{recordUrl:i}}=(0,l.E3)();return!(e||t||n||!i)}function v(e,t=!1){if((0,s.K)()&&(!t||"start"===e.type))return;e.description=(0,a.Qr)(e.description);const n=e.description;if(h()){const i=p[p.length-1];i&&(n.includes(i.description)||i.description.includes(n))&&p.pop(),p.push(e),t&&y()}}function y(){if(h()){if(clearTimeout(g),p.length>0){const e=p;p=[];const t=(0,l.E3)().hostConfig.recordUrl;(0,c.SY)(t,{type:"POST",data:{records:e}})}g=setTimeout(y,m)}}function _(e,t,n,i,r){var o,a,s;const{surveyId:c,transactionID:u,userInfo:f}=n;let p,m,g,h,v,y,_;if(("gift"===i||"start"===i&&f)&&(p=f.nickname,m=f.openid,p&&(h=(0,l.W4)().name)),"start"===i&&(g=JSON.stringify((0,d.uK)())),t&&e){const t=e;t.yid?(y=t?t.yid:void 0,_=t?t.xid:void 0):v=e?e.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:t?t.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:m,query_params:g}}function w(e){const t=(0,f.kZ)(e)?e.title:"",n=e.loop?"[".concat(e.nodeName,":").concat(t,"]"):"[".concat(e.nodeName,"]");return(0,a.Qr)(n)}function x(e,t){(0,l.W4)().dev.infer||v(_(null,t,e,"used_phone","在题目:".concat(w(t),"中检测到重复使用的手机号:").concat(e.phoneNumber)))}function b(e,t){(0,l.W4)().dev.infer||v(_(null,t,e,"verify_fail","在题目:".concat(w(t),"高级验证失败")))}function T(e,t){if((0,l.W4)().dev.infer)return;const{type:n,parent:i}=t;if("upload"===n||"verify"===n||"gift"===n)return;let o,s="",c="";if("menu"===n||"cascade"===n)c=(0,u.wR)(t).reduce(((t,n)=>(n.selected&&(t+="[".concat(n.text,"]")),e=n,t)),""),o=c?"select":"deselect",s=c?"选中":"清除所有选中";else{const i=e.selected;if(o=i?"select":"deselect",s=i?"选中":"取消选中","select_icon"===n||"select_image"===n)c="[".concat((0,r.oB)(e.origin),"]");else if("matrix"===t.type)if(e.isOtherOpt)c="[".concat(e.text,"]");else{const t=e;c="[".concat((0,a.Qr)(t.optionX.text)," ").concat((0,a.Qr)(t.optionX.text),"]")}else c="[".concat((0,a.Qr)(e.text),"]")}const d="在题目:".concat(w(t),"中").concat(s,"选项:").concat(c);v(_(e,t,i,o,d))}function S(e,t,n){if((0,l.W4)().dev.infer)return;const i="在题目:".concat(w(n),"的选项:[").concat((0,a.Qr)(t.text),"]中输入自动填充触发文字:").concat(e);v(_(t,n,n.parent,"auto_complete",i))}function E(e,t,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="打分:"+t.value,o="rate"):"upload"===n.type?(r=e?"上传图片":"清除图片",o="upload"):(r="输入:"+t.value,o="input"),v(_(t,n,i,o,"在题目:".concat(w(n),"的选项:[").concat((0,a.Qr)(t.text),"]中").concat(r)))}function I(e,t){if((0,l.W4)().dev.infer)return;const n=t.parent,i=t.options[e];i&&(-1===i.sortNo?v(_(i,t,n,"cancel_sort","在题目:".concat(w(t),"中取消了对选项:[").concat((0,a.Qr)(i.text),"]的排序"))):v(_(i,t,n,"sort","在题目:".concat(w(t),"中将选项:[").concat((0,a.Qr)(i.text),"]排序到第").concat(i.sortNo,"位"))))}function k(e){if((0,l.W4)().dev.infer)return;const t="在题目:".concat(w(e),"中 定位失败");v(_(null,e,e.parent,"locate_failed",t))}function O(e,t){if((0,l.W4)().dev.infer)return;const n=t.parent,i=t.type,r=t.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 t=typeof e;if("string"===t)a="输入:"+e;else if("object"===t){const{code:t,phoneNumber:n}=e;void 0!==n?(o="input_phone",a="的手机号码中输入:".concat(n)):(o="input_code",a="的密码/验证码中输入:".concat(t))}}v(_(null,t,n,o,"在题目:".concat(w(t),"中").concat(a)))}function C(e){(0,l.W4)().dev.infer||v(_(null,e,e.parent,"prev","在题目:".concat(w(e),"中点击上一题")))}function L(e,t){(0,l.W4)().dev.infer||v(_(null,t,e.parent,"prev","返回到题目: ".concat(w(t),",由题目:").concat(w(e),"后退而来")))}function N(e){(0,l.W4)().dev.infer||v(_(null,e,e.parent,"next","在题目:".concat(w(e),"中点击下一题")))}function R(e,t){(0,l.W4)().dev.infer||v(_(null,t,e.parent,"next","end"===t.type?"到达结束节点: ".concat(w(t),",由题目:").concat(w(e),"前进而来"):"进入题目: ".concat(w(t),",由题目:").concat(w(e),"前进而来")))}function A(e,t,n){(0,l.W4)().dev.infer||v(_(null,t,n,"check_fail","从".concat(w(e),"走向甄别失败")),!0)}function P(e,t){(0,l.W4)().dev.infer||v(_(null,e.current,e,"quota_fail","配额失败,答案数:".concat(t)),!0)}function M(e,t){(0,l.W4)().dev.infer||v(_(null,e.current,e,"check_submit","甄别提交,答案数:".concat(t)))}function W(e,t){(0,l.W4)().dev.infer||v(_(null,e,t,"time_less","答题时间太少被排除"),!0)}function U(e,t){(0,l.W4)().dev.infer||v(_(null,e,t,"abandon_answer","按结束节点要求抛弃答案"),!0)}function G(e){(0,l.W4)().dev.infer||v(_(null,e.current,e,"time_over","答题超时未完成"),!0)}function D(e,t,n,i){(0,l.W4)().dev.infer||v(_(null,e,t,"full_submit","正式提交,答案数:".concat(n,"个答案 \n 提交回应:").concat(JSON.stringify(i))),!0)}function B(e,t,n=!1){(0,l.W4)().dev.infer||v(_(null,e,t,n?"lottery_goal":"lottery_fail",n?"抽奖:中奖":"抽奖:未中奖"),!0)}function q(e,t){(0,l.W4)().dev.infer||v(_(null,e,t,"gift","领奖"),!0)}function F(e,t,n,i,r){(0,l.W4)().dev.infer||v(_(t,n,e,"auto_input","在题目:".concat(w(n),"中自动填充选项:[").concat(i,"],期待值:[").concat(r,"]")))}function j(e,t,n,i="成功"){(0,l.W4)().dev.infer||v(_(null,n,e,"auto_skip","在题目:".concat(w(n),"中尝试自动选中选项:[").concat((0,a.Qr)(t.text),"]").concat(i)))}function z(e,t,n){if((0,l.W4)().dev.infer)return;const i="自动跳过题目:".concat(w(t)," by ").concat(n);"logic"!==t.type&&"uniqueness_verification"!==t.type&&v(_(null,t,e,"auto_skip",i))}function V(e,t,n){(0,l.W4)().dev.infer||v(_(null,t,e,"auto_skip","自动跳过题目:".concat(w(t)," by ").concat(n)+" logicResult:".concat(t.logicResult)))}function K(e,t,n){(0,l.W4)().dev.infer||v(_(null,t,e,"auto_skip","自动跳过题目:".concat(w(t)," by ").concat(n)+" does verification passed:".concat(t.verificationResult)))}function Y(e,t,n){(0,l.W4)().dev.infer||v(_(null,n,e,"opt_display","在题目:".concat(w(n),"中显示选项:[").concat((0,a.Qr)(t.text),"]")))}function H(){const e="browser_uuid";let t=(0,l.W4)().storage.get(e);return t||(t=(0,o.YF)(),(0,l.W4)().storage.set(e,t)),t}function Q(){if((0,l.W4)().dev.infer)return;const e=(0,d.uK)();e.code&&e.state||v({type:"enter",collector_code:(0,l.E3)().sid,browser_uuid:H(),recorded_at:(0,i.kF)(),description:"来自"+(0,l.W4)().system.getReferer()},!0)}function X(e,t){if((0,l.W4)().dev.infer)return;let n="开始答题,进入到题目: ".concat(w(t)," ");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,t,e,"start",n);s.browser_uuid=H(),s.collector_code=(0,l.E3)().sid,v(s,!0)}function Z(e,t){(0,l.W4)().dev.infer||v(_(null,null,e,"resume","开始断点续答:"+t),!0)}},5667:(e,t,n)=>{"use strict";n.d(t,{E:()=>a});var i=n(8856),r=n(8792);let o=!1;async function a(e){const{url:t,data:n,silent:a,responseId:s}=e,c=t+JSON.stringify(n),u=await(0,r.e)(t);if(!u){const e="FAKE NOT FOUND:".concat(t);throw(0,i.E3)().error(e),new Error(e+(s?" responseId is: ".concat(s):""))}let l=null;try{if(l=await u(n,(0,i.E3)()),l.exception)throw l.exception}catch(e){if(!(0,i.E3)().realTimePreview){const t="FAKE ERROR:".concat(c," ").concat(e.stack&&e.stack.split("\n")[0]);throw a||(0,i.E3)().error(t),new Error(t+(s?" responseId is: ".concat(s):""))}l={result:""}}return o&&console.info(n,l),o&&console.info(JSON.stringify(n),JSON.stringify(l)),l}},7320:(e,t,n)=>{"use strict";n.d(t,{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:()=>m,eI:()=>w,eY:()=>b,kj:()=>g,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(e,t,n){const i=await(0,o.W4)().network.request(e,t,n);if((r=i).status>=200&&r.status<300)return function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}(i.response);throw i;var r}function p(e){const t=JSON.parse(e&&e.response||"{}");return t&&d.includes(t.status)?t.code+"":""}function m(e){const t=p(e);if(t!==c&&t){if(l[t])return;u[t]?(0,o.E3)().error(k(t)):(0,o.E3)().notify(k(t))}}async function g(e,t,n){try{return await f(e,t,n)}catch(n){throw m(n),(0,o.E3)().uploadLog("api error: ".concat(t.type,":").concat(e," ").concat(JSON.stringify(n))),n}}function h(e,t={type:"GET"},n=!1){return g(e,t={...t,contentType:"application/json"},n)}async function v(e){if((0,o.E3)().preview)return async function(e){if("00000000-0000-0000-0000-000000000000"===e)return{smaller_diagram_url:"http://localhost:12345/unit_test_payload.json"};const t=(0,i.uK)(),n=t.type;let r=(0,o.E3)().hostConfig.qApiHost+"/surveys/"+e+"/preview";"preview_template"===n?r=(0,o.E3)().hostConfig.host+"/v1/public_templates/"+e:"edit_template"===n&&(r=(0,o.E3)().hostConfig.host+"/v1/templates/"+e);const a=await h(r,{type:"GET",jwt:t.jwt}),{diagram:s}=a;return{smaller_diagram_url:a.diagram_url||s.diagram_url,langs:a.langs}}(e);const t=(0,o.W4)().auth.retrieveAuthSurveyMeta();return t||h((0,o.E3)().hostConfig.qApiHost+"/surveys/"+e,{type:"GET"}).catch((e=>{throw function(e){e&&d.includes(e.status)||(0,o.E3)().error((0,r.GS)(a.CW.global.downloadError))}(e),e}))}function y(e){const t=(0,o.E3)().hostConfig.qApiHost+"/responses";return c=u.multi_responses_error,h(t,{type:"POST",data:e},!0).then((e=>(c="",e))).catch((n=>{throw(0,o.E3)().uploadLog("getResponseInfo failed, url is ".concat(t,", options are ").concat(JSON.stringify({type:"POST",data:e}))),c="",n}))}function _(e,t){return h((0,o.E3)().hostConfig.qApiHost+"/responses/"+t+"/examine",{type:"PUT",data:e})}function w(e,t){return h((0,o.E3)().hostConfig.qApiHost+"/responses/"+t+"/skip",{type:"PUT",data:e})}function x(e,t){return h((0,o.E3)().hostConfig.qApiHost+"/responses/"+t,{type:"PUT",data:e})}async function b(e){if((0,o.E3)().preview)return(0,o.E3)().notify((0,r.GS)(a.CW.preview.noMessage)),{};const t=(0,o.E3)().hostConfig.qApiHost+"/validations";e.question_id=e.question_id.toLowerCase();const n=await h(t,{type:"POST",data:e});return e.phone_num&&(0,o.E3)().notify((0,r.GS)(a.CW.verify.sendSuccess)),n}async function T(e,t){return(0,o.E3)().preview?((0,o.E3)().notify((0,r.GS)(a.CW.preview.noMessage)),{}):h((0,o.E3)().hostConfig.qApiHost+"/validations/"+t,{type:"PUT",data:e})}async function S(e,t){const n=(0,o.W4)().storage.get("gift-"+e.code);if(n)return JSON.parse(n);const i=(0,o.E3)().hostConfig.qApiHost+"/rewards/"+t+"/red_envelope",r=await g(i,{type:"POST",data:e},!1);return(0,o.W4)().storage.set("gift-"+e.code,JSON.stringify(r)),r}async function E(e,t){if((0,o.E3)().preview)return{};const n=(0,o.E3)().hostConfig.qApiHost+"/rewards/"+t+"/custom";try{const t=await g(n,{type:"PUT",data:e},!1);return(0,o.E3)().notify((0,r.GS)(a.CW.verify.sendSuccess)),t}catch(e){throw(0,o.E3)().notify((0,r.GS)(a.CW.verify.sendFailed)),e}}async function I(e){(0,s.y)(e);const{preview:t}=(0,o.E3)(),{dev:{autoRun:n,infer:i}}=(0,o.W4)();return t||n||i?null:g((0,o.E3)().hostConfig.qApiHost+"/webhooks",{type:"POST",data:e},!1)}function k(e){return(0,r.GS)(a.CW.backEnd[e])||e}},3004:(e,t,n)=>{"use strict";n.d(t,{G:()=>r,U:()=>o}),n(7768);var i=n(7404);function r(e){const t=(0,i.uK)().offline_survey_id;return t?e.replace(/^https?:\/\//,"/".concat(t,"/")):e}function o(){return!!(0,i.uK)().offline_survey_id}},6072:(e,t,n)=>{"use strict";n.d(t,{Ed:()=>m,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({state:e,request:t,customParam:n,silent:o,shouldCombineSystem:f=!0}){const{method:p,embedId:m}=t,g="embed"===p,h="fake"===p;if((0,a.E3)().realTimePreview&&!g&&!h||!function(e){const t=e.params instanceof Array;return"embed"===e.method?!(!t||!e.embedId):!(!t||!e.url)}(t))return{...d};const v=await(0,r.Oj)(t.url,{state:e}),y=await(0,i.aI)(e,t.params,f);n&&Object.keys(n).forEach((e=>{n[e]&&(y[e]=n[e])}));let _=null;if(g)_=await async function(e){const{embedId:t,data:n,embedApis:i,responseId:r}=e,o=function(e,t){const n=t.find((t=>t.id===e));return n?(n.fn||(n.fn=function(e){if(e.fn)return e.fn;let t,n=e.code.replace(/<br>/g,"");n="(function(){ /* embedApi.".concat(e.name," */ ").concat(n,"})()");try{return t=(0,s.y)(n,!0),t}catch(e){return()=>({result:"",message:""})}}(n)),n.fn):null}(t,i);let c;try{c=await o(n,(0,a.E3)())}catch(e){const n="EMBED ERROR:".concat(function(e,t){const n=t.find((t=>t.id===e));return n?n.name:e}(t,i)," ").concat(e.stack&&e.stack.split("\n")[0]);throw(0,a.E3)().error(n),new Error(n+(r?" responseId is: ".concat(r):""))}return c}({embedId:m,data:y,embedApis:e.embedApis,responseId:null==e?void 0:e.transactionID});else if("fake"===p)_=await(0,c.E)({url:v,data:y,silent:o,responseId:null==e?void 0:e.transactionID});else{let t="GET";"post"===p&&(t="POST");let n=null;try{n=await(0,u.Kk)((0,a.W4)().dev.parseRealUrl(v),{type:t,data:y,contentType:"application/json"},!1)}catch(n){const i="REAL ERROR:".concat(t," ").concat(v," ").concat(JSON.stringify(n));o||(0,a.E3)().error(i);const r=i+((null==e?void 0:e.transactionID)?" responseId is: ".concat(null==e?void 0:e.transactionID):"");throw new Error(r)}l&&console.info({...y,url:v},n),_=n}return _}async function p(e){const t=await f(e);return void 0===t.valid&&(t.valid=!!t.result),t.valid||t.message||(t.message="^_^"),t}async function m(e,t){try{const{request:n}=t.origin;n&&(await f({state:e,request:n,customParam:null,silent:!0}),e.endRequested=!0,o.i.trigger("END_REQ"))}catch(e){(0,a.E3)().uploadLog(e)}}},4708:(e,t,n)=>{"use strict";n.d(t,{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:()=>g,u6:()=>_,wR:()=>m,yg:()=>u}),n(9952);var i=n(984),r=n(556),o=n(6276),a=n(3001);function s(e,t){const n=e.loopStack,i=t.uuid;return(0,r.So)(i,n)}function c(e,t){return e.find((e=>(0,r.oj)(e.uuid,t)))}function u(e){return"comment"===e.optionType}function l(e){return m(e).some((e=>e.selected))}function d(e,t=!1){return m(e).filter((n=>(!t||!n.isOtherOpt)&&(0,i.QX)(n,e))).length}function f(e){return m(e).some((t=>(0,i.QX)(t,e)))}function p(e){const t=[],n=e=>{if("children"in e)for(const t of e.children)n(t);else t.push(e)};for(const t of e.optionGroups)n(t);return t}function m(e){let t=[];return(0,o.G6)(e)&&(t=(0,o.QB)(e)?[...t,...p(e)]:[...t,...e.options]),(0,o.IN)(e)&&(t=[...t,...e.otherOptions]),t}function g(e){let t=[];return(0,o.uo)(e)&&(t=[...t,...e.options]),(0,o.yy)(e)&&(t=[...t,...e.otherOptions]),t}function h(e){let t=m(e);const{hiddenOptions:n}=e;return n&&(t=[...t,...n]),t}function v(e){const{renderOptionsX:t,renderOptionsY:n,otherOptions:i}=e;return t.concat(n,i)}function y(e){const{options:t,origin:n}=e,i=t.find((e=>e.origin.seqTarget));return i&&i.selected?n.options[i.sortNo-1]:n.output}function _(e){return"yid"in e&&"xid"in e}async function w(e,t){const{parent:n}=t,{origin:i}=e;return{itemsMax:await(0,a.W0)(i.itemsMax,{state:n}),itemsMin:await(0,a.W0)(i.itemsMin,{state:n})}}function x(e){return e.passRef||{}}function b(e,t){const n=x(e);return e[t]||n[t]}function T(e){return e.assistValue?Object.keys(e.assistValue).reduce(((t,n)=>(e.assistValue[n]&&(t+=e.assistValue[n])&&(t+=" "),t)),""):""}function S(e,t){return e/t*100+"%"}},1768:(e,t,n)=>{"use strict";n.d(t,{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(e){return e&&-1===e.mutexNumber}function a(e,t){return(e.mutexNumber||0)>(t.mutexNumber||0)?1:-1}function s(e,t){return!(!e||!t)&&!(!e.xid||!t.xid)&&(!(!o(e.optionX.origin)||t.yid!==e.yid)||o(e.optionY.origin)&&t.xid===e.xid)}function c(e,t){return!(!e||!t)&&("comment"!==e.origin.optionType||"option"!==t.origin.optionType)&&("option"!==e.origin.optionType||"comment"!==t.origin.optionType)&&(!(!o(e.origin)&&!o(t.origin))||u(e,t))}function u(e,t){return!(!e||!t||(0,i.oV)(e.origin.mutexNumber)||e.origin.mutexNumber!==t.origin.mutexNumber)}function l(e,t){return!(!e||!t)&&!(!e.xid||!t.xid)&&(!(!u(e.optionX,t.optionX)||t.yid!==e.yid)||u(e.optionY,t.optionY)&&t.xid===e.xid)}function d(e,t){const n={};(0,r.gr)(e).forEach((e=>{const t=e.origin;(0,r.yg)(t)||(n[t.mutexNumber]?n[t.mutexNumber]+=1:n[t.mutexNumber]=1)}));const i=Object.keys(n).reduce(((e,t)=>("0"===t||"undefined"===t?e+=n[t]:Number(t)<10&&(e+=1),e)),0);return t>i&&(t=i),t}function f(e,t){return!!o(t.origin)||e.some((e=>e!==t&&e.selected&&c(t,e)))}},4196:(e,t,n)=>{"use strict";n.d(t,{GA:()=>f,cv:()=>d,gF:()=>m}),n(9952);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(e,t,n,r){const a=n.list[t];(0,o.e)(a.option,{value:e});const s=r.options.find((e=>e.cascadePath===a.resultId));return(0,i.yg)(a.option.origin)&&(e?g(a,r):m(a,r)),s}async function f(e,t,n){const d=t.list[e];if(!d)return u.Az;const f=t.list.filter((e=>function(e){return e.selected&&!(0,i.yg)(e.option.origin)}(e))),{option:h}=d;if(f.includes(d))m(d,n);else{const e=(0,c.Gg)(t.list.map((e=>e.option)),d.option);if(t.multiple){if(f.length>=t.max&&!e)return(0,o.E3)().notify((0,r.GS)(a.CW.menu.limitMax,{text:t.text?(0,r.GS)(a.CW.menu.listItem)+t.text:(0,r.GS)(a.CW.menu.topList),max:(0,s.Wo)(t.max)})),u.Az}else t.list.forEach((e=>{e.selected&&m(e,n)}));e&&function(e,t,n){for(const t of n)(-1===e.option.origin.mutexNumber||-1===t.option.origin.mutexNumber||e.option.origin.mutexNumber&&t.option.origin.mutexNumber===e.option.origin.mutexNumber)&&p(t);t.options.forEach((t=>{e.resultId.includes(t.cascadePath)||(0,o.e)(t,{selected:!1})}))}(d,n,t.list.filter((e=>e.resultId!==d.resultId))),g(d,n)}return await(0,l.e)(h,n),u.ay}function p(e){(0,o.e)(e,{selected:!1}),(0,o.e)(e.option,{selected:!1});const t=e.list;t&&0!==t.length&&t.forEach((e=>{p(e)}))}function m(e,t){p(e),t.options.forEach((t=>{t.cascadePath.includes(e.resultId)&&(0,o.e)(t,{selected:!1})}))}function g(e,t){(0,o.e)(e,{selected:!0}),(0,o.e)(e.option,{selected:!0}),t.options.forEach((t=>{e.resultId.includes(t.cascadePath)&&(0,o.e)(t,{selected:!0})}))}},7688:(e,t,n)=>{"use strict";n.d(t,{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 m={};function g(e,t,n){t.forEach((t=>{(0,s.oj)(t.uuid,e.uuid)||t[n]!==e[n]||(0,c.e)(t,{selected:!1})}))}function h(e,t){t.forEach((t=>{t.uuid!==e.uuid&&(0,c.e)(t,{selected:!1})}))}function v(e,t,n=!1){if(e.selected)(0,c.e)(e,{selected:!1});else{(0,c.e)(e,{selected:!0});const r=(0,p.IN)(t)?t.otherOptions:[];h(e,n?r:(0,i.wR)(t))}return f.yK}async function y(e,t){const n=m[t.type];if(n){const i=await n(e,t);return i.noValidate||(0,r.c9)(t),await(0,d.e)(e,t),i}return f.Az}m.select=async(e,t)=>{if(e.selected)return(0,c.e)(e,{selected:!1}),f.yK;const n=await(0,o._R)(t,e);return n.valid?((0,c.e)(e,{selected:!0}),(0,o.cd)(t.origin)&&h(e,(0,i.wR)(t)),f.yK):((0,c.E3)().notify(n.message),f.Az)},m.select_icon=m.select,m.select_image=m.select,m.matrix=async(e,t)=>{if(e.selected)return(0,c.e)(e,{selected:!1}),f.yK;const n=await(0,o.IZ)(t,e);if(!n.valid)return(0,c.E3)().notify(n.message),f.Az;const{origin:r}=t;return(0,c.e)(e,{selected:!0}),(0,o.cd)(r)?h(e,(0,i.wR)(t)):(0,o.cx)(r)?(g(e,t.options,"yid"),g(e,t.options,"xid")):(0,o.ct)(r)?g(e,t.options,"yid"):(0,o.gd)(r)&&g(e,t.options,"xid"),f.yK},m.upload=async(e,t)=>{var n,i;if(e.isOtherOpt)return v(e,t,!0);{const{parent:r,fullUploaded:o,origin:s}=t;let d=await(0,a.W0)(s.maxUploadCount,{state:r});d=d||t.options.length;const p=e.value;if(o&&!p&&!e.origin.fillRequired)return(0,c.E3)().notify((0,u.GS)(l.CW.upload.amountLimitMax,{max:d})),f.Az;const m={onprogress(t){(0,c.e)(e,{progress:t})},accept:e.accept,nodeId:t.renderId,optionId:e.renderId},g=await(0,c.W4)().network.upload(m);return await(null===(i=(n=r.handleEvents).handleOptionInput)||void 0===i?void 0:i.call(n,g,e,t)),f.ay}},m.menu=m.select,m.cascade=async(e,t)=>(e.isOtherOpt&&v(e,t,!0),f.yK),m.hot_spot=m.select,m.icon_mark=m.value_mark=m.slide_rate=m.fill=m.weight=m.heat_map=async(e,t)=>e.isOtherOpt?v(e,t,!0):f.ay,m.sequence=async(e,t)=>e.isOtherOpt?v(e,t,!0):f.ay},4556:(e,t,n)=>{"use strict";n.d(t,{I5:()=>m,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(e,t){const n=t.value||"data:image/gif;base64,R0lGODlhAQABAAAAACw=";n&&(0,a.e)(e,{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(e,t){const n=String(e);return e===t.value?c:((0,a.e)(t,{value:n}),u)}async function p(e,t,n){let o;if("number"==typeof e&&(e=String(e)),t.isOtherOpt)o=f(e,t);else{const i=l[n.type];o=i?await i(e,t,n):f(e,t)}return o.noValidate||(0,r.c9)(n,t),await(0,i.e)(t,n),o}function m(e,t,n){t.atcpTrigger=e,(0,r.c9)(n,t)}l.icon_mark=async(e,t)=>(e===t.value&&(e=String(Number(e)-1)),(0,a.e)(t,{value:e}),u),l.weight=async(e,t,n)=>{if(e===t.value)return c;const{options:i}=n,r=n.weightTotal,o=i.reduce(((e,n)=>n!==t?e+Number(n.value):e),0),l=r-o;return Number(e)>l&&(e=String(l)),(0,a.e)(t,{value:e}),i.forEach((e=>{const t=Number(e.value);(0,a.e)(e,{percent:(0,s.e$)(t,r)})})),u},l.upload=async(e,t,n)=>(e||(await(0,a.W4)().network.removeUpload({nodeId:n.renderId,optionId:t.renderId}),e=(0,i.I)()),(0,a.e)(t,e),await(0,o.SY)(n),d(t,e),{refresh:!0,result:!0}),l.slide_rate=async(e,t)=>f(e,t),l.fill=async(e,t)=>f(e,t)},3568:(e,t,n)=>{"use strict";n.d(t,{c:()=>i});const i=Object.keys({field_1:"",field_2:"",field_3:"",field_4:"",field_5:"",field_6:""})},3244:(e,t,n)=>{"use strict";n.d(t,{At:()=>o,Cm:()=>a,KQ:()=>r});var i=n(5548);function r(e,t){return e.find((e=>e.origin.radius>=(0,i.c)(t,{lng:e.origin.longitude,lat:e.origin.latitude})))||e[e.length-1]}function o(e,t){if(0===e.length)return;const n=t.split("-");return e.find((e=>e.text.split("-").every(((e,t)=>{const i=n[t];return!(!i||!i.includes(e))}))))||e[e.length-1]}function a(e,t){const n=t.map((e=>e.name)).indexOf(e[0]);let i=String(n);const r=t[n];if(e[1]&&r){const t=r.cities.map((e=>e.name)).indexOf(e[1]);i+=" "+t;const n=r.cities[t];if(e[2]&&n){const t=n.areas.map((e=>e.name)).indexOf(e[1]);i+=""+t}}return i}},6764:(e,t,n)=>{"use strict";n.d(t,{sZ:()=>a,uE:()=>d,uQ:()=>l}),n(5960);var i=n(556),r=n(5776),o=n(6796);function a(e){const t=[];return e.forEach(((e,n)=>{const r=(0,i.ec)(n+1);t.splice(r,0,e)})),t}const s={};function c(e,t,n){let r=[];return r=n?u(e):t?function(e,t){const n=[],r={};e.forEach(((e,i)=>{const o=e.origin;if(o.refOptId){let a="";if(t&&(a=o.referId),a){const t=r[a];t?t.list.push(e):r[a]={headIndex:i,list:[e]}}else n.push(e)}else n.push(e)}));let o=[];return n.forEach((e=>{const t=(0,i.ec)(o.length+1);o.splice(t,0,e)})),Object.keys(r).map((e=>r[e])).sort(((e,t)=>e.headIndex>t.headIndex?1:-1)).forEach((e=>{o=o.concat(e.list)})),o}(e,t):function(e){const t=[];return e.forEach((e=>{const n=(0,i.ec)(t.length+1);t.splice(n,0,e)})),t}(e),r}function u(e,t){return t=(t||Math.round(10*Math.random()))%e.length,e.slice(t).concat(e.slice(0,t))}function l(e,t){const{renderId:n,origin:i}=e,{followRandom:a,circulation:u}=i;if(!(0,r.Oi)(e))return t;if((0,o.ms)(e.nodeUuid,e.parent.nodeGroups)){let i=s[e.nodeUuid];if(i)return t.sort(((e,t)=>i[e.uuid]>i[t.uuid]?1:-1));{const e=c(t,a,u);return s[n]=i={},e.forEach(((e,t)=>{i[e.uuid]=t})),e}}return c(t,a,u)}function d(e,t,n){const{randomType:i}=e.origin;return"col"!==i&&"row_col"!==i||(t=l(e,t)),"row"!==i&&"row_col"!==i||(n=l(e,n)),"col_loop"===i&&(t=u(t)),"row_loop"===i&&(n=u(n)),{optionsX:t,optionsY:n}}},4316:(e,t,n)=>{"use strict";n.d(t,{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 m(e){const{autoInputConfig:t}=e.origin;if(!t)return"";const{defaultValue:n}=t;return n&&(0,f.Wo)(n).trim()?n:""}const g={};async function h(e,t,n,i,r){if(!m(e))return p;const{parent:o}=t,a=await(0,c.W0)(m(e),{state:o});let s=String(a);return a>=n&&a<=i||(s=r),(0,d.e)(e,{value:s}),{done:!0,actualValue:s,expectedValue:a}}async function v(e,t){const n=g[t.type];if(n){t.parent.context.option=e;const i=await n(e,t);return!!i.done&&((0,l.Q3)(t.parent,e,t,i.actualValue,i.expectedValue),!0)}return!1}g.fill=async(e,t)=>{if(!m(e))return p;const{parent:n}=t,i=await(0,c.E3)(m(e),{state:n});return(0,d.e)(e,{value:i}),{done:!0,actualValue:i,expectedValue:i}},g.value_mark=(e,t)=>h(e,t,e.minValue,e.maxValue,""),g.icon_mark=(e,t)=>h(e,t,0,e.iconCount,""),g.slide_rate=(e,t)=>{const{rateOptions:n}=t;return h(e,t,0,n.length,"")},g.weight=(e,t)=>h(e,t,0,e.maxValue||t.weightTotal,""),g.sequence=async(e,t)=>{if(!m(e))return p;const n=t.options.length,{parent:i}=t,r=await(0,c.W0)(m(e),{state:i});let o=r;return r>=1&&r<=n||(o=-1),(0,d.e)(e,{sortNo:o,selected:o>=1}),{done:!0,actualValue:o,expectedValue:r}},n(2048);var y=n(4060),_=n(6276);async function w(e,t){const n=t.parent;n.context.option=e;const i=await async function(e,t){return!!t&&(0,y.wx)(e,t)}(n,e.origin.selectConfig);e.autoSelectMarked=!!i}const x=["select","select_icon","select_image","menu","hot_spot","data"];var b=n(1344),T=n(6348);async function S(e,t,n,i=!1){const r=n.origin.options.find((n=>n.xid===e.uuid&&n.yid===t.uuid)),o={...await N(n,r,null),optionX:e,optionY:t,text:i?e.text:t.text,xid:e.uuid,yid:t.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(e){Object.defineProperty(e,"selected",{get(){return this.__cache.selected},set(e){"select-input"===this.inputType&&(e?this.value=this.__cache.value||this.value:(this.__cache.value=this.value,this.value="")),this.__cache.selected=e,e&&(0,E.I9)(this.origin)&&setTimeout((()=>{T.i.trigger("OPT_EXCLUDE",this)})),e?T.i.trigger("OPT_SELECT",this):T.i.trigger("OPT_DESELECT",this)}})}async function N(e,t,n){const{parent:i}=e,o={origin:t,isOtherOpt:t.isOtherOpt,customData:{},__cache:{selected:!1,value:""},inputType:U(t,e.type),value:"",renderId:(0,r.qY)(e,t),uuid:t.uuid,label:t.label,number:t.number,optComment:t.optComment,optionType:t.optionType,useComment:t.useComment,passRef:n};return i.context.option=o,o.text=await(0,c.qQ)(t.text,{state:i,usage:{node:e,optionId:t.uuid}}),L(o),o.isOtherOpt&&(await A(o,e),(0,r.yg)(t)||await w(o,e)),function(e){const{origin:t}=e;!0===t.useComment?(0,d.e)(e,{placeholder:t.optComment}):"input"===e.inputType&&(0,d.e)(e,{placeholder:e.text})}(o),await(0,a.Il)(o,i),o}async function R(e,t,n){const i=[];for(const r of t){const t=n.find((e=>e.uuid===r.uuid)),o=await N(e,r,t);i.push(o)}return i}function A(e,t){return(0,d.e)(e,{inputType:U(e.origin,t.type)}),G(e,t)}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(e,t){if(e.isOtherOpt){let t="select";return(0,r.yg)(e)?t="input":!0===e.useComment&&(t="select-input"),t}return W.includes(t)?!0===e.useComment?"select-input":"select":P.includes(t)?"input":M.includes(t)?"select":void 0}async function G(e,t){if(!(0,_.cp)(e))return;const{origin:n}=e,i=e.origin.fillType;if(!i)return;const{parent:o}=t;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 e=(new Date).getFullYear(),t=l,n=f;void 0!==l&&(l=new Date(l,0,1),e<t&&(a=l)),void 0!==f&&(f=new Date(f,11,31),e>n&&(a=f))}"auto_complete"===i&&(s=function(e,t=[]){const{autoCpltGroups:n}=e;return t.reduce(((e,t)=>{const i=n.find((e=>e.id===t));return i&&(e=e.concat(i.data)),e}),[])}(o,n.autoCpltIds),u=await(0,b.$7)(t.parent.sid));let p=[];"list_select"===i&&(p=F((await(0,c.E3)(n.selectText,{state:o,joinBy:","})).split(",")));const m=await(0,r.jJ)(e,t),g=await(0,O._u)(e,t);(0,d.e)(e,{itemsMax:m.itemsMax,itemsMin:m.itemsMin,fillStart:g.start,fillEnd:g.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(e,t,n=!1){const{options:r,otherOptions:o,hiddenOptions:a}=e,s={options:[],otherOptions:o,hiddenOptions:[]};if(r){const n=function(e){const t=e.filter((e=>"top-fixed"===e.origin.position)).sort(((e,t)=>e.number-t.number)),n=e.filter((e=>"bottom-fixed"===e.origin.position)).sort(((e,t)=>e.number-t.number)),i=e.filter((e=>"top-fixed"!==e.origin.position&&"bottom-fixed"!==e.origin.position));return t.concat(i).concat(n)}((0,i.uQ)(e,r));for(const e of n)s.options.push(await t(e))}if(a)for(const e of a){const n=e.isOtherOpt?e:await t(e);s.hiddenOptions.push(n)}n&&j([...s.options,...s.otherOptions]),(0,d.e)(e,s)}const B={};async function q(e,t){return e.image?e.image:await(0,a.Md)(t,e)}function F(e){const t={};return e.map((e=>{const n=t[e];return n?(t[e]=n+1,"".concat(e,"(").concat(n,")")):(t[e]=2,e)}))}function j(e){F(e.map((e=>e.text))).forEach(((t,n)=>{e[n].text=t}))}function z(e){return e&&e.path?(0,d.E3)().hostConfig.mediaHost+e.path:""}function V(e){const t=z(e);return{normalIconUrl:t,activeIconUrl:K(t)}}function K(e){return e.replace("/outline/","/glyph/")}function Y(e){const{origin:t,passRef:n}=e;return n&&n.normalIconUrl?{normalIconUrl:n.normalIconUrl,activeIconUrl:n.activeIconUrl}:V(t.icon)}async function H(e,t){if((0,_.G6)(e)){await async function(e,t){const{origin:n}=e;let i={options:[]};if((0,I.is)(n,"matrix"===n.type)){const{options:r,refMaps:o,passRefs:c}=await(0,a.q0)(t,e.origin,"xid"),u=await R(e,r,c),l=await(0,s.s$)(t,u,e),{options:d,refMaps:f,passRefs:p}=await(0,a.q0)(t,e.origin,"yid"),m=await R(e,d,p),g=await(0,s.Ah)(t,m,e);(0,k.GO)(e,[...o,...f]);const h=await R(e,n.otherOptions,[]),v=await(0,s.is)(t,h,e);i={options:[],optionsX:l,optionsY:g,otherOptions:v.visibleList,hiddenOptions:v.hiddenList}}else if(n.options){const n=await(0,a.q0)(t,e.origin);let r=n.options;(0,_.IN)(e)&&(r=r.concat(e.origin.otherOptions));const o=await R(e,r,n.passRefs),c=await(0,s.is)(t,o,e),u=[],l=[];c.visibleList.forEach((e=>{e.isOtherOpt?l.push(e):u.push(e)})),(0,k.GO)(e,n.refMaps),i={options:u,otherOptions:l,hiddenOptions:c.hiddenList}}(0,d.e)(e,i)}(e,t);const n=B[e.type];n&&await n(e),function(e){if((0,d.E3)().realTimePreview)return;if(!(0,_.G6)(e))return;let t;C.includes(e.type)?t=e=>!!e.text:"select_image"===e.type?t=e=>!!e.image:"slide_rate"===e.type&&(t=e=>!!e.text||!!e.image),t&&(e.options=e.options.filter(t))}(e),function(e){const{options:t,type:n,parent:i}=e;let r=(0,_.IN)(e)?e.otherOptions:[];x.includes(n)&&(r=[...r,...t]);const a=r.filter((e=>e.autoSelectMarked)).reverse();if((0,o._A)(e.origin))a.forEach((t=>{(0,d.e)(t,{selected:!0}),(0,l.y)(i,t,e)}));else{const[t,...n]=a;n.forEach((t=>{t.autoSelectMarked=!1,(0,l.y)(i,t,e,"因冲突被终止")})),t&&((0,d.e)(t,{selected:!0}),(0,l.y)(i,t,e))}}(e),t.context.option=null}}B.select=e=>D(e,(async function(t){return await G(t,e),await w(t,e),t})),B.fill=e=>D(e,(async function(t){return t.inputType="input",t.prefix=t.origin.prefix,t.suffix=t.origin.suffix,await G(t,e),t.placeholder=(0,c.Qr)(t.text),await v(t,e),t})),B.value_mark=e=>D(e,(async function(t){const{parent:n,origin:i}=e;t.value="";const r=await(0,c.W0)(i.markMin,{state:n}),o=await(0,c.W0)(i.markMax,{state:n});return(0,d.e)(t,{minValue:r,step:i.markStep,maxValue:o,minValueText:i.minText,maxValueText:i.maxText}),await v(t,e),t})),B.icon_mark=e=>D(e,(async function(t){return t.value="",(0,d.e)(t,{iconCount:e.origin.markImgCount||5,iconName:e.origin.markImgName||"rating-number"}),await v(t,e),t})),B.sequence=async e=>{let t=!1;await D(e,(async n=>((0,d.e)(n,{sortNo:-1}),await v(n,e)&&(t=!0),n))),t&&e.options.sort(((e,t)=>e.sortNo>t.sortNo?1:-1))},B.matrix=async e=>{const t=(0,i.uE)(e,e.optionsX,e.optionsY),{parent:n,origin:r}=e,a=[];for(const i of t.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:e,optionId:i.uuid}})});const s=new Map;a.forEach(((e,t)=>{s.set(e,t)})),a.sort(((e,t)=>{switch("".concat(e.origin.position,"___").concat(t.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(e),i=s.get(t);return n&&i?n-i:e.number-t.number}}}));const u=[];for(const i of t.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:e,optionId:i.uuid}})});const l=new Map;u.forEach(((e,t)=>{l.set(e,t)})),u.sort(((e,t)=>{switch("".concat(e.origin.position,"___").concat(t.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(e),i=l.get(t);return n&&i?n-i:e.number-t.number}}}));for(const t of e.otherOptions)await A(t,e);const f={otherOptions:e.otherOptions,renderOptionsX:a.filter((e=>e.visible)),renderOptionsY:u.filter((e=>e.visible))},p=(0,o.ct)(r)||(0,o.KC)(r),m=await async function(e,t,n,i=!1){const r=[],o=[];let a=e,s=t;i&&(a=t,s=e);for(const e of a)if(e.visible){const t={text:e.text,list:[]};for(const r of s)if(r.visible){let a=e,s=r;i&&(s=e,a=r);const c=await S(a,s,n,i);o.push(c),t.list.push(c)}r.push(t)}return{flatten:r,options:o,fullOptions:o}}(a,u,e,p),g=function(e,t,n){const i=[];return t.forEach((t=>{if(t.visible){const r=[];e.forEach((e=>{if(e.visible){const i=n.find((n=>n.xid===e.uuid&&n.yid===t.uuid));if(!i)throw new Error("matrix item not found");r.push(i)}})),i.push(r)}})),{matrix:i}}(a,u,m.options);(0,d.e)(e,{...f,...m,...g})},B.select_image=e=>D(e,(async t=>(t.image=await q(t,e),await w(t,e),t))),B.upload=e=>D(e,(async e=>(e.filePath="",e.value="",e.fileName="",e.fileType="",e.progress=0,e.isImage=!1,e.fileLimits=[...e.origin.fileLimits||["image"]],e.accept=(0,u.A)(e.fileLimits),e))),B.menu=e=>D(e,(async t=>(await G(t,e),await w(t,e),t)),!0),B.select_icon=e=>D(e,(async t=>{const n={...t,...Y(t)};return await w(n,e),n})),B.weight=e=>{const{parent:t}=e;return D(e,(async n=>{let i=await(0,c.W0)(n.origin.maxMark,{state:t});const r=await(0,o.iw)(e.origin,t);return(!i||i>r)&&(i=r),(0,d.e)(n,{percent:"0%",color:n.origin.color,maxValue:i,value:""}),await v(n,e),n}))},B.cascade=e=>D(e,(async e=>(e.text="",e.cascadePath=e.origin.cascadePath,e))),B.data=async e=>{for(const t of e.options)await w(t,e)},B.hot_spot=async e=>await D(e,(async t=>{await G(t,e),await w(t,e);let n=t.origin.graphs;if("points"in t){const{points:e,x:i,y:r}=t.origin;n=[{points:e,x:i,y:r,uuid:(0,I.YF)()}]}const i=n.map((e=>{const{area:t,pathD:n}=e.points.reduce(((t,n,i)=>{t.pathD?t.pathD+=" L":t.pathD+="M",t.pathD+=n.x+" "+n.y;const r=e.points[i+1];return r?t.area+=n.y+r.y*(r.x-n.x)/2:t.pathD+=" Z",t}),{area:0,pathD:""});return{...e,area:t,pathD:n,transform:"translate(".concat(e.x,",").concat(e.y,")")}}));return(0,d.e)(t,{graphs:i,color:t.origin.color}),t})),B.heat_map=(e,t)=>D(e,(async function(e){return e})),B.max_diff=e=>D(e,(async function(t){return t.value="0",t.image=await q(t,e),t.records=[],t})),B.slide_rate=async e=>{const{rateOptions:t}=e.origin,n=[];for(const i of t){const t=await N(e,i,null);await(0,s.Ej)(e.parent,t,e)&&n.push(i)}return e.rateOptions=n.map((e=>{const{icon:t}=e;return{...V(t),text:(0,c.gt)(e.text),value:e.value,uuid:e.uuid,customData:{}}})),D(e,(async t=>((0,d.e)(t,{image:await q(t,e),value:""}),await v(t,e),t)))}},6332:(e,t,n)=>{"use strict";n.d(t,{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(e,t,n){const{origin:r}=t,a=r.displayConfig;if(a){n.hasOptShowHide=!0,e.context.option=t;const r=await(0,i.wx)(e,a);return r&&(0,o.mT)(e,t,n),e.context.option=null,r}return!0}async function c(e,t,n){const i=[],r=[];for(const o of t)await s(e,o,n)?(o.visible=!0,i.push(o)):(o.visible=!1,r.push(o));return{visibleList:i,hiddenList:r}}async function u(e,t,n){for(const i of t)i.visible=await s(e,i,n);return t}async function l(e,t,n){t=await u(e,t,n);for(const e of t)e.visible=e.visible&&"hidden"!==e.width;return t}async function d(e,t,n){t=await u(e,t,n);for(const e of t)e.visible=e.visible&&"hidden"!==e.height;return t}function f(e,t){const{renderList:n}=e,i=[];return n.forEach((e=>{if(!(0,a.Ci)(e.checkMode,t))return;const{hasOptShowHide:n,nodeUuid:o,loop:s}=e;if(n){const t="matrix"===e.type?(0,r.IZ)(e):(0,r.wR)(e);let n;s&&(n=s.replacements.map((e=>e.index))),i.push({node_id:o.toLowerCase(),loop_idxs:n,option_ids:t.map((e=>e.uuid.toLowerCase()))})}})),i}},5776:(e,t,n)=>{"use strict";n.d(t,{AF:()=>v,CA:()=>G,CY:()=>h,EH:()=>A,IZ:()=>M,K6:()=>_,KC:()=>L,MR:()=>T,Oi:()=>w,S:()=>q,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:()=>F}),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:""},m=["region","location","area","describe","end","logic","uniqueness_verification","loop","lottery","verify"],g={};function h(e){(0,s.e)(e,{hasAnswer:(0,d.Qz)(e)})}function v(e,t){if(8!==t.length)return t;let n=g[t];if(!n){const i=e.nodeList.find((e=>(0,r.oj)(e.nodeUuid,t)));if(i)return n=g[t]=i.nodeUuid,i.nodeUuid}return n}function y(e){return e.find((e=>"start"===e.type))}function _(e){return!0===e.answerRequired}function w(e){return(0,r.is)(e,"matrix"===e.type)?function(e){const{randomType:t}=e.origin;return"col"===t||"row_col"===t||"row"===t}(e):!0===e.origin.randomOptionY}function x(e){const t=e.loopStack,n=e.nodeUuid;return(0,r.So)(n,t)}function b(e,t){if(t)return e.find((e=>e.input&&(0,r.oj)(e.input.uuid,t)||e.loopEnd&&(0,r.oj)(e.loopEnd.uuid,t)))}function T(e,t,n){const i=t.find((e=>(0,r.oj)(e.selfPortId,n)));if(i&&i.destInputId)return b(e,i.destInputId)}function S(e){return(0,r.is)(e,"matrix"===e.type)?"multi"===e.matrixSelect:!0===e.multiSelect}function E(e){return(0,r.is)(e,"matrix"===e.type)?"single"===e.matrixSelect:!0!==e.multiSelect}function I(e){return"single_row"===e.matrixSelect}function k(e){return"single_col"===e.matrixSelect}function O(e){return"single_row_col"===e.matrixSelect}function C(e){return S(e)&&"all"===e.multiType}function L(e){return S(e)&&"row"===e.multiType}function N(e){return S(e)&&"col"===e.multiType}async function R(e,t){const{origin:n}=e,i=!0===n.limitEnabled;let r=i?await(0,o.W0)(n.maxUploadCount,{state:t}):e.options.length,a=i?await(0,o.W0)(n.minUploadCount,{state:t}):1;const s=e.options.length;return a||(a=1),r||(r=s),a>s&&(a=s),a>r&&(a=r),{max:r,min:a}}async function A(e,t){const{origin:n}=e;if(!S(n))return{min:1,max:1};const{multiMin:a,multiMax:s}=n;let c=await(0,o.W0)(a,{state:t}),u=await(0,o.W0)(s,{state:t});const d=(0,i.gr)(e).length;return(0,r.is)(e,"matrix"===e.type)||(c=(0,l.uE)(e,c)),c||(c=1),u||(u=d),c>d&&(c=d),c>u&&(c=u),{min:c,max:u}}const P=(e,t,n,i)=>{let r=0;r=i?e.filter((e=>e[i]===t[i]&&e.selected)).length:e.filter((e=>e.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(e,t){if(!S(e.origin)||(0,l.I9)(t.origin)||!t.isOtherOpt&&((0,l.I9)(t.optionX.origin)||(0,l.I9)(t.optionY.origin)))return p;const n=C(e.origin);if(!n&&!(0,i.u6)(t))return p;const r=(0,i.wR)(e),{max:o}=await A(e,e.parent);return n?P(r,t,o):N(e.origin)?P(r,t,o,"xid"):L(e.origin)?P(r,t,o,"yid"):p}async function W(e,t){if(!S(e.origin))return p;const{max:n}=await A(e,e.parent),r=(0,i.wR)(e),o=!(r.filter((e=>e.selected)).length===n)||(0,l.Gg)(r,t);return{valid:o,message:o?"":(0,a.GS)(c.CW.select.limitMax,{max:n})}}function U(e,t){return e.find((e=>(0,r.oj)(e.nodeUuid,t)))}const G=["logic","random","loop","uniqueness_verification"],D=[...G,"data"];function B(e){(0,s.E3)().preview&&e.autoSkip&&e.parent.previewShadowNodes&&!D.includes(e.type)&&(e.readonly=!0)}function q(e){if(e.forceSkipReason)return e.forceSkipReason;if("data"===e.type)return"data_hidden";if(e.autoSkip)return function(e){return(0,s.E3)().preview&&e.parent.previewShadowNodes&&!D.includes(e.type)}(e)?"":"setting";if((0,f.I)(e.nodeUuid))return"random_group";const t=(0,i.wR)(e);return!m.includes(e.type)&&t&&0===t.length?"no_options":""}function F(e,t){return!(!e.circleNode1Id&&!e.circleNode2Id)&&(0,r.oj)(e.circleNode1Id,t.circleNode1Id)&&(0,r.oj)(e.circleNode2Id,t.circleNode2Id)}async function j(e,t){const{options:n}=e;let i=await(0,o.W0)(e.total,{state:t})||100,r=0;for(const e of n){const n=await(0,o.W0)(e.maxMark,{state:t});if(void 0===n){r=-1;break}r+=n}return r>0&&r<i&&(i=r),i}async function z(e){const{max:t}=await R(e,e.parent),n=t===e.options.filter((t=>(0,u.QX)(t,e))).length;(0,s.e)(e,{fullUploaded:n})}},908:(e,t,n)=>{"use strict";n.d(t,{S:()=>m,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(e,t,n,i){e&&((0,c.e)(e,{selected:!0}),t.forEach((t=>{t!==e&&(0,c.e)(t,{selected:!1})}))),(0,c.e)(i,{value:n})}const f={};async function p(e,t){const n=f[t.type],i=n?await n(e,t):l.Az;return i.noValidate||(0,s.c9)(t),i}function m(e){return e.failed=!0,e.succeed=!1,e.origin.failedSkip&&(e.failedSkipActivated=!0,e.autoSkip=!0),l.yK}f.region=(e,t)=>{t.indexes=e;const n=(0,r.wR)(t),a=(0,i.qu)(e);d((0,o.At)(n,a),n,a,t);const s=a.split("-"),c={country:"",province:s[0]||"",city:s[1]||"",district:s[2]||""};return t.parent.address=c,t.position={address:c},l.yK},f.location=(e,t)=>{t.succeed=!0,t.failed=!1,t.failedSkipActivated=!1;const n=(0,a.A)(e.address,"-",t.infoRange),i=(0,r.wR)(t);return d((0,o.At)(i,n),i,n,t),(0,c.e)(t.parent,{point:e.point,address:e.address}),t.position=e,l.yK},f.area=(e,t)=>{t.succeed=!0,t.failed=!1,t.failedSkipActivated=!1;const n=(0,a.A)(e.address,"-","street"),i=(0,r.wR)(t);return d((0,o.KQ)(i,e.point),i,n,t),(0,c.e)(t.parent,{point:e.point,address:e.address}),t.position=e,l.yK},f.verify=(e,t)=>((0,c.e)(t,e),{...l.yK,noValidate:!0}),f.gift=(e,t)=>((0,c.e)(t,e),l.ay),f.heat_map=async(e,t)=>{const n={x:Math.round(e.x),y:Math.round(e.y)},{options:i}=t,r=i[t.clickTimes%i.length];return(0,c.e)(r,{point:n,value:JSON.stringify(n)}),t.clickTimes+=1,await(0,u.e)(r,t),l.ay}},1576:(e,t,n)=>{"use strict";n.d(t,{w:()=>o});var i=n(8856);function r(e,t){(0,i.e)(e,{value:t});const{option:n}=e;n.records.find((t=>t.round===e.round)).value=t,(0,i.e)(n,{value:n.records.reduce(((e,t)=>e+t.value),0).toString()})}function o(e,t,n){if(t.value===e)return{result:!0};r(t,e),n.items.forEach((e=>{e!==t&&e.value===t.value&&r(e,0)}));const o=n.items.some((e=>1===e.value)),a=n.items.some((e=>-1===e.value));return(0,i.e)(n,{done:o&&a}),{result:!0}}},6680:(e,t,n)=>{"use strict";n.d(t,{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(e){return"[object Map]"!==Object.prototype.toString.call(e)}async function a(e,t,n){const{options:a}=n;if(!function(e,t){if(o(e))return!0;if(e.size!==t.length)return!1;const n=new Array(t.length).fill(!1);for(const[i,r]of e)r>=0&&r<t.length&&(n[r]=!0);return n.every((e=>e))}(e,a)||!function(e,t){if(e.size!==t.length)return!1;const n=Array.from(e.values()).filter((e=>-1!==e));for(const e of n)if(e<1||e>t.length)return!1;return i=n,new Set(i).size===i.length;var i}(t,a))return{result:!1};let s;for(const[e,n]of t)e.sortNo!==n&&((0,i.e)(e,{sortNo:n,selected:-1!==n}),e.selected&&(s=e));if(!o(e)){const t=[];for(const[n,i]of e)t[i]=n;(0,i.e)(a,t)}return s&&await(0,r.e)(s,n),{result:!0}}},4404:(e,t,n)=>{"use strict";n.d(t,{Y:()=>r});var i=n(8856);function r(e){if(!e)return{};const{useCustomLogo:t,logoText:n,logoImage:r,showLogoInEachPage:o,logoImageShowWidth:a}=e;let s="";if(r){const e=r.name;s=(0,i.E3)().hostConfig.mediaHost+"/"+e}return{useCustomLogo:t,logoImageUrl:s,logoText:n,showLogoInEachPage:o,logoImageShowWidth:a}}},8184:(e,t,n)=>{"use strict";n.d(t,{_M:()=>oe,yI:()=>re,o9:()=>ie,e_:()=>ne});var i=n(4316),r=n(5776),o=n(8084),a=n(6496),s=n(568),c=n(8856);const u={select:async e=>{const t=(0,r._A)(e.origin);let n=(0,a.GS)(s.CW.select.single);if(t){n=(0,a.GS)(s.CW.select.multi);const{min:t,max:i}=await(0,r.EH)(e,e.parent);return{typeName:n,typeDescription:(0,a.GS)(s.CW.select.limitBetween,{min:t,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 e=>{const t=e.weightTotal;let n=(0,a.GS)(s.CW.weight.total,{total:t});return n+=!0===e.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 e=>{const t=e.origin.rankCount,n=Number(t)?(0,a.GS)(s.CW.rank.limitMin,{min:t}):(0,a.GS)(s.CW.rank.limitAll);return{typeName:(0,a.GS)(s.CW.rank.name),typeDescription:n}},menu:async e=>({...await u.select(e),typeName:(0,a.GS)(s.CW.menu.name)}),select_icon:e=>u.select(e),select_image:e=>u.select(e),upload:async e=>{const t=(0,a.GS)(s.CW.upload.name);if(!0===e.origin.limitEnabled){const{min:n,max:i}=await(0,r.YP)(e,e.parent);return{typeName:t,typeDescription:(0,a.GS)(s.CW.upload.amountLimit,{min:n,max:i})}}return{typeName:t,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 e=>{const{origin:t}=e;if((0,r.cd)(t))return{typeName:(0,a.GS)(s.CW.matrix.single)};if((0,r._A)(t)){const{min:n,max:i}=await(0,r.EH)(e,e.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)(t)?(o=(0,a.GS)(s.CW.matrix.multiCol),c=(0,a.GS)(s.CW.matrix.colLimitBetween,{min:n,max:i})):(0,r.KC)(e.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)(t)?{typeName:(0,a.GS)(s.CW.matrix.singleRow),typeDescription:(0,a.GS)(s.CW.matrix.eachRowOne)}:(0,r.gd)(t)?{typeName:(0,a.GS)(s.CW.matrix.singleCol),typeDescription:(0,a.GS)(s.CW.matrix.eachColOne)}:(0,r.cx)(t)?{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),m=n(1344),g=n(8348),h=n(7404),v=(n(9952),n(4708)),y=n(6764),_=n(6332),w=n(556),x=n(9376);function b(e){return 1===e?"bottom":2===e?"top":"center"}function T(e,t,n,i,r=""){const{resultId:o,text:a}=t,s=o&&e.options.find((e=>e.cascadePath===o)),c=r?r+"=>"+a:a;return s&&(s.text=c),n.nodeTypeInfoRequired||(t.hint=""),t.list&&t.list.forEach((t=>{t.text=T(e,t,n,i,c)})),t.text}async function S(e,t){const{destList:n,cascadeStart:i}=t.origin,o=(0,r.MR)(e.nodeList,n,i.uuid);o&&(t.cascade=await E(t,e,o,""))}async function E(e,t,n,o,c){c?await(0,i.wz)(c,e):c={uuid:"",text:""};const{nodeList:u}=t,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(e,t,n){let r=n.cachedCasMenuOpts;r||(r=n.cachedCasMenuOpts={});const o=r[e.nodeUuid];if(o)return o;{const{options:o,passRefs:a}=await(0,x.q0)(t,e),s=await(0,i.o9)(n,o,a),c=await(0,_.is)(t,s,n),u={...ne({target:e},t),renderId:(0,w.So)(e.nodeUuid,n.loopStack)},l=await(0,i.o9)(n,e.otherOptions,[]),d=await(0,_.is)(t,l,n),f={options:(0,y.uQ)(u,c.visibleList),otherOptions:d.visibleList};return r[e.nodeUuid]=f,f}}(n,t,e),p={...ne({target:n},t),...f,parent:t},m=(0,r._A)(n),{min:g,max:h}=await(0,r.EH)(p,t),{destList:T,output:S}=n,I=(0,r.K6)(n),k=[],O=m?(0,a.GS)(s.CW.cascade.selectBetween,{min:g||1,max:h}):(0,a.GS)(s.CW.cascade.selectSome,{amount:1}),C={...d,list:k,multiple:m,min:g,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(e,t,i,l,n);k.push(o)}return C}function I(e,t,n){const i=function(e){const t=[];return e.forEach((e=>{const{pickedTimes:n}=e;t[n]?t[n].push(e):t[n]=[e]})),t}(e),r={items:[],done:!1};let o=t;for(const e of i)if(e){const t=(0,w.my)(e,o);if(t.forEach((e=>{r.items.push({option:e.option,value:0,round:n}),e.option.records.push({round:n,value:0}),e.pickedTimes+=1})),o-=t.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(e){return"group"===e.type}function R(e){return"type"in e&&"group"===e.type}async function A(e,t){const{options:n,origin:i}=e;let r=i.optionGroups||[];if(o=e.type,!L.includes(o))return{optionGroups:void 0};var o;const a=function(e,t){const{optionRefers:n,refOptions:i}=e.origin;let r=[];const o=[];return n.forEach((e=>{const{identity:{nodeId:n}}=(0,k.W)(e);if(n&&!o.includes(n)){o.push(n);const e=(0,O.IH)(t,n);if(!e)return;const a=W(M(e.optionGroups||[],e.origin.optionGroupsRelationship||C),i);r=r.concat(a)}})),r}(e,t);if(r=r.concat(a),0==r.length)return{optionGroups:void 0};const s=function(e,t){const n={};!function e(t){t.forEach((t=>{N(t)?t.children.forEach((t=>{N(t)?e(t.children):n[t.optionUuid]=t.groupUuids})):n[t.optionUuid]=t.groupUuids}))}(t);const i=[];e.forEach((e=>{n[e.uuid]||i.push(e)}));const r=[];return i.forEach((e=>{const t={text:e.text,optionUuid:e.uuid,groupUuids:[],type:"option",currentLevel:1};r.push(t)})),r}(n,r);r=function(e,t,n){const i=e.concat(t),r=(e,t)=>{if(N(e)){const n=e;let i=t;for(const e of n.children)i=Math.min(r(e,i),i);return i}{const t=e,i=n.map((e=>e.uuid)).indexOf(t.optionUuid);return-1===i?Number.MAX_VALUE:i}};return i.sort(((e,t)=>r(e,Number.MAX_VALUE)-r(t,Number.MAX_VALUE)))}(r,s,n);let c=await U(r,n,t);return c=P(c),c=function(e,t){const{randomOptionY:n,circulation:i,followRandom:r}=e.origin;return i?q(t):n?r?t:B(t):t}(e,c),F(c,n),c=j(c),{optionGroups:c}}function P(e){const t=[];return e.forEach((e=>{R(e)?function(e){const{children:t}=e;return!(!t||0===t.length)&&0!==P(t).length}(e)&&t.push(e):t.push(e)})),t}function M(e,t){return(e||[]).map((e=>{if(R(e)){const n=(0,w.O0)(e),{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,t)}}{const n=(0,w.O0)(e),{text:i,uuid:r}=n;return{type:"option",text:i,optionUuid:r,groupUuids:t.optionsRelationship[r]||[]}}}))}function W(e,t){return e.map((e=>function(e,t){if(N(e)){const n=W(e.children,t);return e.children=[...n],e}{const{optionUuid:n,type:i,groupUuids:r,text:o,currentLevel:a}=e,s=t.find((e=>(0,w.oj)(n,e.refOptId)));return void 0===s?e:{type:i,groupUuids:r||[],text:o,currentLevel:a,optionUuid:s.uuid}}}(e,t)))}async function U(e,t,n){const i=[];for(const r of e){const e=await G(r,t,n);e&&i.push(e)}return i}async function G(e,t,n){if(N(e))return{uuid:e.uuid,type:e.type,groupTitle:await(0,l.qQ)(e.groupTitle,{state:n}),showGroupTitle:e.showGroupTitle,randomMode:e.randomMode,children:await U(e.children,t,n),currentLevel:e.currentLevel};{const{optionUuid:n}=e;return t.find((e=>e.uuid===n))}}const D=(e,t)=>{const{groups:n,options:i}=(e=>e.reduce(((e,t,n)=>{const{groups:i,options:r}=e;return R(t)?i.push({group:t,index:n}):r.push({uuid:t.uuid,option:t,index:n}),e}),{groups:[],options:[]}))(e),r=t.reduce(((e,t)=>{const{uuid:n}=t,r=i.find((({uuid:e})=>e===n));return r&&e.push(r.option),e}),[]);return n.forEach((({group:e,index:t})=>{r.splice(t,0,e)})),r},B=e=>function(e){const t=[];return e.forEach((e=>{const n=(0,w.ec)(t.length+1);t.splice(n,0,e)})),t}(e),q=e=>{return t=e,n=(n||Math.round(10*Math.random()))%t.length,t.slice(n).concat(t.slice(0,n));var t,n};function F(e,t){e.forEach((e=>{if(R(e)){const{randomMode:n,children:i}=e;F(i||[],t);const r={followNode:()=>D(i,t),noRandom:()=>i,random:()=>B(i),circulation:()=>q(i)};e.children=r[n]()}}))}function j(e){let t=[],n=[];const i=[];return e.forEach((e=>{if(R(e))e.children=j(e.children),i.push(e);else{const r=e.origin,{position:o}=r;"top-fixed"===o?t.push(e):"bottom-fixed"===o?n.push(e):i.push(e)}})),t=t.sort(((e,t)=>e.number-t.number)),n=n.sort(((e,t)=>e.number-t.number)),[...t,...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"];function J(e,t,n){let i=e.indexOf(t)+n;return i<0?i=0:i>e.length-1&&(i=e.length-1),e[i]}const $={};function ee(e){const{origin:t}=e;return{mapImage:t.mapImage&&(0,d.a)(t.mapImage),mapImgHeight:t.mapImgHeight,mapImgWidth:t.mapImgWidth}}async function te(e){const{loop:t,parent:n,origin:i}=e,{lockLoopCount:r}=i;let o=i.nodeName.split("/")[0];if(o&&i.circleNode1Id&&!r&&!(0,c.E3)().realTimePreview){const e=(0,g.yy)();let r=await e.C_OL_LBL.getText({state:n});if(r||(r=t.node.nodeName+"_"+await e.C_OL_NUM.getText({state:n})),o=r+"_"+o,i.circleNode2Id){let i=await e.C_IL_LBL.getText({state:n});i||(i=t.node.nodeName+"_"+await e.C_IL_NUM.getText({state:n})),o=i+"_"+o}}return o}function ne(e,t){const{target:n,loop:i,random:r,loopStack:o}=e;return{customData:{},nodeUuid:n.nodeUuid,nodeName:n.nodeName,origin:n,loop:i,random:r,loopStack:o,type:n.type,parent:t}}async function ie(e,t){const n={...e,hasAnswer:!1,autoSkip:e.origin.autoSkip,reached:!1,readonly:!1,embedVarMaps:[],pageStart:!1,pageEnd:!1,checkMode:e.origin.checkMode,runtimeNodeName:await te(e),startTime:(new Date).toISOString(),costTime:0,endTime:0,realtimePreview:(0,c.E3)().realTimePreview,renderId:(0,r.YJ)(e),prev:t,errorMessage:""},o=e.parent;if(r.CA.includes(n.type))return async function(e,t){(0,c.e)(e,{autoSkip:!0,number:""});const n=$[e.type];return n&&await n(e),e}(n);const{qNumberRequired:a}=o;a&&function(e){"end"!==e.type&&"describe"!==e.type&&(0,c.e)(e,{number:e.runtimeNodeName})}(n),function(e){(0,c.e)(e,{validateFailTimes:0,validateFailed:!1})}(n),function(e){const{origin:t}=e;(0,c.e)(e,{asterisks:!0===t.answerRequired&&e.parent.asterisksRequired})}(n),await async function(e){const t=e,{origin:n}=t;var i;n.image?(0,c.e)(t,{imgScale:n.imgScale,imgPosition:n.imgPosition,imgTransTime:n.imgTransTime,imgTransType:n.imgTransType,images:await(0,x.Q9)(e.parent,t)}):(0,c.e)(t,{images:[]}),n.video&&(0,c.e)(t,{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(e){if((0,K.Oo)(e)){const{origin:t}=e;(0,c.e)(e,{layout:t.layout,template:await(0,Y.m)(t.template,e.parent)})}}(n),await(0,i.u_)(n,o),await async function(e,t){const n=await A(e,t);return(0,c.e)(e,{optionGroups:n.optionGroups}),n}(n,o);const s=$[n.type];return s&&await s(n),o.context.node=n,await async function(e){const t=e.origin,n=await(0,r.EH)(e,e.parent),i=(0,r._A)(t);(0,c.e)(e,{...n,multiple:i,selectType:i?"checkbox":"radio"})}(n),await(0,H.S)(n),(0,c.W4)().dev.infer||await async function(e){if(!e.parent.nodeTypeInfoRequired)return;const t=u[e.type],n=t?await t(e):null;n&&(n.typeDescription="",(0,c.e)(e,n))}(n),(0,r.j$)(n),await async function(e){(0,K.G6)(e)&&await async function(e){if(!(0,c.E3)().realTimePreview)if((0,w.is)(e,"sequence"===e.type)){if(1===e.options.length){const t=e.options[0];(0,c.e)(t,{selected:!0,sortNo:1}),(0,Q.we)(0,e)}}else if((0,w.is)(e,Z.includes(e.type))&&!await(0,X.yG)(e.origin.showWithSingleRefOpt,e.parent)){let t=[...e.options];if((0,K.IN)(e)&&(t=[...t,...e.otherOptions]),1===t.length){const n=t[0];n.origin.isRef&&((0,c.e)(n,{selected:!0}),(0,Q.y)(e.parent,n,e,"single_ref_select_opt"),e.forceSkipReason="single_ref_select_opt",e.autoSkip=!0)}}}(e)}(n),(0,m._4)(n),n}async function re(e,t,n){const i=!(!t||!t.id);let r;e.showRewards&&(r=e.options.map((e=>({rewardName:e.rewardName,rewardCount:e.rewardCount}))));const o=i?e.success:e.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,m=(0,d.a)({width:o.imageWidth,height:o.imageHeight,name:o.imageName,id:"",originName:"",type:"image"});let g;if(i){const n=e.options.find((e=>e.uuid===t.lottery_option_id));n&&(g=n.rewardName)}const h=ne({target:e},n),v=await ie(h,n.current);return(0,c.e)(v,{rewardRaw:t,rewardTime:(0,z.kF)(),goal:i,rewardImage:m.name?m:void 0,rewardTitle:f,rewardDescribe:p,rewardList:r,rewardName:g,showRewards:e.showRewards}),!(0,c.E3)().preview&&i&&((0,c.W4)().app.canHandleReward()||"red_envelope"!==t.type||await oe(n,v)),v}async function oe(e,t){const{formalResult:{reward:n,authorizer:i},nodeList:o}=e,{app_id:a,component_appid:s}=i,u=(0,r.o1)(o,n.gift_id);t.linkUrl=await(0,l.Oj)(u.linkUrl,{state:e}),t.endBtnText=u.endBtnText||"";const d={rid:String(n.id),aid:a,cid:s,qid:e.surveyId,tid:e.transactionID,sid:(0,h.uK)().sid,rt:"red_envelope",locale:e.language,reward_from_qr_code:"true"};t.qrCode=(0,c.W4)().app.getRewardUrl(d)}$.region=async e=>{(0,c.e)(e,{indexes:"0 0 0",value:"",regions:await(0,o.iM)(),infoRange:e.origin.infoRange})},$.end=async e=>{const{parent:t}=e,n=await(0,l.Oj)(e.origin.linkUrl,{state:t});(0,c.e)(e,{hasReward:!1,linkUrl:n,endBtnText:e.origin.endBtnText,backendRequest:e.origin.backendRequest})},$.location=async e=>{(0,c.e)(e,{regions:await(0,o.iM)(),infoRange:e.origin.infoRange,value:""})},$.value_mark=async e=>{(0,c.e)(e,{showInput:e.origin.showInput})},$.icon_mark=async e=>{(0,c.e)(e,{inverseValue:e.origin.inverseValue})},$.menu=async e=>{const{origin:t}=e;(0,c.e)(e,{placeholder:t.placeholder||(0,a.GS)(s.CW.menu.clickToSelect),display:b(t.menuType),lineCount:t.lineCount})},$.area=async e=>{(0,c.e)(e,{infoRange:"street",regions:await(0,o.iM)()})},$.verify=async e=>{(0,c.e)(e,{value:"",phoneNumber:"",code:"",validateType:e.origin.validateType})},$.weight=async e=>{const{origin:t,parent:n}=e,i=await(0,r.iw)(t,n);(0,c.e)(e,{weightTotal:i,unit:t.unit,distributeBy:t.distributeBy})},$.max_diff=async e=>{const{origin:t}=e,n=function(e){const{options:t,origin:n}=e,{taskCount:i,itemCountPerTask:r}=n,o=t.map((e=>({option:e,pickedTimes:0}))),a=[];for(let e=0;e<i;e++)a.push(I(o,r,e+1));return a}(e);(0,c.e)(e,{itemCountPerTask:t.itemCountPerTask,taskCount:t.taskCount,positiveDesc:t.positiveDesc,negativeDesc:t.negativeDesc,tasks:n,currentTask:n[0],gotoNextTask(){(0,c.e)(e,{currentTask:J(e.tasks,e.currentTask,1)})},gotoPrevTask(){(0,c.e)(e,{currentTask:J(e.tasks,e.currentTask,-1)})},gotoTask(t){(0,c.e)(e,{currentTask:t})}})},$.slide_rate=async e=>{(0,c.e)(e,{currentOption:e.options[0],gotoNextOption(){(0,c.e)(e,{currentOption:J(e.options,e.currentOption,1)})},gotoPrevOption(){(0,c.e)(e,{currentOption:J(e.options,e.currentOption,-1)})},gotoOption(t){(0,c.e)(e,{currentOption:t})}})},$.select_image=async e=>{(0,c.e)(e,{picFitType:e.origin.picFitType,needBgColor:e.origin.needBgColor,optImgScale:e.origin.optImgScale})},$.cascade=async e=>{await S(e.parent,e),function(e){const t=[],n=e=>{t.push(e),e.list&&e.list.forEach((e=>n(e)))};n(e.cascade),e.options.forEach((n=>{if(n.origin.useComment){const r=t.find((e=>e.resultId===n.cascadePath));n.inputType=(0,i.kd)(r.option.origin,e.type)}}))}(e),T(e,e.cascade,e.parent,e.loop,""),e.options=e.options.filter((e=>!!e.text)),(0,f.So)(e,e.options)},$.hot_spot=async e=>{(0,c.e)(e,{...ee(e),autoShowRect:e.origin.autoShowRect,autoShowText:e.origin.autoShowText})},$.heat_map=async e=>{(0,c.e)(e,{...ee(e),clickTimes:0,pointColor:e.origin.pointColor,pointRadius:e.origin.pointRadius})},$.loop=async e=>{const{parent:t}=e;(0,p.iO)(e,t)||(e.varList=await(0,p.Co)(t,e))}},1103:(e,t,n)=>{"use strict";n.d(t,{S:()=>s,e:()=>a});var i=n(8856),r=n(6276),o=n(3001);async function a(e){const{parent:t,origin:n}=e,r=await(0,o.qQ)(n.describe,{state:t,usage:{node:e,exclusiveId:"description"}});(0,i.e)(e,{description:r})}async function s(e){(0,r.kZ)(e)&&(e.headHidden=e.origin.headHidden,await async function(e){const{parent:t,origin:n}=e,r=await(0,o.qQ)(n.questionText,{spaceRep:" ",state:t,usage:{node:e,exclusiveId:"title"}});(0,i.e)(e,{title:r})}(e),await a(e))}},5032:(e,t,n)=>{"use strict";n.d(t,{m:()=>o}),n(9952);var i=n(8856),r=n(3001);async function o(e,t){if(!e)return{param:{}};const n=await(0,i.W4)().ui.loadNodeComponent(e,!0),o={};if(e.params)for(const n of e.params)o[n.name]=await(0,r.E3)(n.value,{state:t},"URL");return{name:e.name,id:e.id,component:n,param:o}}},1344:(e,t,n)=>{"use strict";n.d(t,{ew:()=>M,mi:()=>W,ig:()=>j,Yp:()=>z,$7:()=>Y,io:()=>G,IN:()=>F,ay:()=>B,wn:()=>q,_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(e,t){t&&e&&(t.selected=e.selected,t.option.selected=e.selected,t.list&&e.list&&t.list.forEach((t=>{const n=e.list.find((e=>e.resultId===t.resultId));n&&p(n,t)})))}function m(e){return e?{selected:e.selected,resultId:e.resultId,list:e.list&&e.list.map((e=>m(e)))}:null}function g(e,t){t.startTime=e.startTime,t.costTime=e.costTime,t.type=e.type,function(e,t){t.validateFailTimes=e.validateFailTimes,t.validateFailed=e.validateFailed}(e,t)}f.max_diff={cache(e,t){t.tasks=e.tasks.map((e=>({items:e.items.map((e=>({uuid:e.option.uuid,value:e.value,round:e.round}))),done:e.done}))),t.currentTaskIndex=e.tasks.indexOf(e.currentTask)},use(e,t){e.tasks&&(t.tasks=e.tasks.map((e=>({items:e.items.map((e=>({option:(0,i.oz)(t.options,e.uuid),value:e.value,round:e.round}))),done:e.done}))),t.currentTask=t.tasks[e.currentTaskIndex||0])}},f.slide_rate={use(e,t){t.currentOption=t.options[e.currentTaskIndex||0]},cache(e,t){t.currentTaskIndex=e.options.indexOf(e.currentOption)}},f.cascade={use(e,t){p(e.cascade,t.cascade)},cache(e,t){t.cascade=m(e.cascade)}},f.verify={borrow(e,t){t.code=e.code,t.phoneNumber=e.phoneNumber}},f.region={borrow(e,t){t.indexes=e.indexes,t.position=e.position,t.value=e.value}},f.location=f.area={borrow(e,t){f.region.borrow(e,t),t.succeed=e.succeed,t.failed=e.failed,t.failedSkipActivated=e.failedSkipActivated}},f.sequence={use(e,t){e.rankList&&t.options.sort(((t,n)=>e.rankList.indexOf(t.uuid)>e.rankList.indexOf(n.uuid)?1:-1))},cache(e,t){t.rankList=e.options.map((e=>e.uuid))}},f.heat_map={use(e,t){t.clickTimes=e.options.length}};const h=["select","select_icon","select_image","menu","hot_spot"];var v=n(4556),y=n(2352);const _={};function w(e,t,n){t.value=e.value,t.selected=e.selected,e.assistValue&&(t.assistValue=t.assistValue||{},Object.keys(e.assistValue).forEach((n=>{(0,y.oV)(e.assistValue[n])||(t.assistValue[n]=e.assistValue[n])})),"cache"===n&&0===Object.keys(t.assistValue).length&&delete t.assistValue)}function x(e,t,n){if(w(e,t,"use"),!t.isOtherOpt){const i=_[n];i&&(i.use?i.use(e,t):i.borrow&&i.borrow(e,t))}}_.max_diff={borrow(e,t){e.records&&(t.records=e.records.map((e=>({...e}))))}},_.sequence={borrow(e,t){t.sortNo=e.sortNo}},_.heat_map={borrow(e,t){e.point&&(t.point={...e.point})}},_.weight={borrow(e,t){t.percent=e.percent}},_.upload={borrow(e,t){t.fileName=e.fileName,t.fileType=e.fileType,t.filePath=e.filePath,t.isImage=e.isImage},cache(e,t){_.upload.borrow(e,t),t.value=e.miniValue||e.value},use(e,t){_.upload.borrow(e,t),t.fileName&&(0,v.Y5)(t,e)}};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(e){const{offlineTaskId:t,preview:n}=(0,c.E3)();if(n)return C+(0,u.kt)(e);{const n=O+(0,u.kt)(e);return t?n+"_with_"+t:n}}function P(e,t){const n={};return function(e,t,n){if(t.uuid=e.uuid,w(e,t,"cache"),!e.isOtherOpt){const i=_[n];i&&(i.cache?i.cache(e,t):i.borrow&&i.borrow(e,t))}}(e,n,t),n}function M(e){if((0,c.W4)().dev.infer||T)return;if((0,r.S)(e)||E.includes(e.type)||e.readonly)return;const t={error:e.errorMessage||void 0,options:{}};(0,i.wR)(e).forEach((e=>{t.options[e.renderId]=e.errorMessage||void 0})),R.error[e.renderId]=t}async function W(e){if((0,c.W4)().dev.infer||T)return;if((0,r.S)(e)||E.includes(e.type)||e.readonly)return;const t={};!function(e,t){g(e,t);const n=f[t.type];n&&(n.cache?n.cache(e,t):n.borrow&&n.borrow(e,t))}(e,t);const n=(0,o.cA)(e);if(n&&n.items){const i=n.items.map((e=>e.option_id.toLowerCase())),r=e=>!!n.items&&i.includes(e.uuid.toLowerCase());(0,d.G6)(e)&&(t.options=e.options.filter(r).map((t=>P(t,e.type)))),(0,d.IN)(e)&&(t.otherOptions=e.otherOptions.filter(r).map((t=>P(t,e.type))))}R.responseId=e.parent.transactionID,R.data[e.renderId]=t;const i=e.parent.randomList;i&&(R.randomList=i.map((e=>({nodeId:e.node.nodeUuid,destPortIds:e.destPortIds}))),R.randomAbandonedNodeIds=(0,b.mU)()),await U(e.parent)}async function U(e){const{sid:t,renderList:n}=e,i=A(t);R.locale=(0,l.qe)();const r=Object.keys(R.data);R.count=0;for(const e of n)if(r.includes(e.renderId)&&(R.count+=1),e.renderId===R.point)break;await(0,c.W4)().storage.setVital(i,JSON.stringify(function(e){const t=e.data,n={};return Object.keys(t).forEach((e=>{const i={...t[e]};"upload"===i.type&&(i.options=i.options.map((e=>((e={...e}).miniValue&&(e.value=e.miniValue,delete e.miniValue),e)))),n[e]=i})),{...e,data:n}}(R)))}async function G(e){const t=A(e),n=await(0,c.W4)().storage.getVital(t);if(n){const e=JSON.parse(n);return S||(S=e.locale),e}return null}function D(e){if((0,c.W4)().dev.infer)return e;if((0,r.S)(e)||E.includes(e.type)||e.readonly)return e;!function(e){const t=R.error[e.renderId];t&&(e.errorMessage=t.error||"",(0,i.wR)(e).forEach((e=>{e.errorMessage=t.options[e.renderId]||""})))}(e);const t=R.data[e.renderId];return t?(function(e,t,n){const r=(0,i.wR)(e);let o=[];t.options&&(o=[...o,...t.options]),t.otherOptions&&(o=[...o,...t.otherOptions]);for(const e of r){const t=(0,i.oz)(o,e.uuid);t&&x(t,e,n)}}(e,t,e.type),function(e,t){g(e,t);const n=f[t.type];n&&(n.use?n.use(e,t):n.borrow&&n.borrow(e,t))}(t,e),function(e){if((0,r._A)(e.origin)||!(0,d.G6)(e))return;let t=(0,d.IN)(e)?e.otherOptions:[];h.includes(e.type)&&(t=[...t,...e.options]);const n=t.filter((e=>e.selected));if(n.length<=1)return;const i=[];n.forEach((e=>{e.autoSelectMarked?(0,c.e)(e,{selected:!1,autoSelectMarked:!1}):i.push(e)})),i.length>1&&i.forEach(((e,t)=>{t<i.length-1&&(0,c.e)(e,{selected:!1})}))}(e),I&&I(e),e):(I&&I(e),e)}async function B(e,t,n){R=e,L=[...e.randomList||[]],(0,b.ID)(e.randomAbandonedNodeIds,t.nodeList),N=e.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=e=>{o(),I=null,k=null,a.i.trigger("END_MEMORY",t.current),setTimeout((()=>{n.onEnd(e)}),250)};const o=()=>{a.i.off("NEXT_OK",u),a.i.off("STRETCH_OK",u),a.i.off("NEXT_OK",c),T=!1},c=(e,t)=>{"NEXT_FAIL"===e.type&&t?n.onSuspend():k({failed:!0,error:t})},u=()=>t.current.renderId===N?k({failed:!1,error:""}):t.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 q(e,t){if(!L)return e;const n=L.find((e=>e.nodeId===t.nodeUuid));if(!n)return e;const i=n.destPortIds,r=[],o=[];return e.forEach((e=>{i.includes(e)?r.push(e):o.push(e)})),r.sort(((e,t)=>i.indexOf(e)>i.indexOf(t)?1:-1)),[...r,...o]}function F(){R={responseId:"",data:{},error:{},point:"",count:0,randomList:[],randomAbandonedNodeIds:[],locale:""}}async function j(e){F();const t=A(e.sid);await(0,c.W4)().storage.removeVital(t)}async function z(e,t){t.forEach((e=>{delete R.data[e]})),await U(e)}function V(e){T||(R.point=e.current.renderId)}async function K(e){V(e),await U(e)}async function Y(e){return e?(S||await G(e),S):""}},5616:(e,t,n)=>{"use strict";n.d(t,{K:()=>d,y:()=>l});var i=n(1344),r=n(6784),o=n(8856),a=n(6496),s=n(568);class c{constructor(e,t){if(e&&e.data&&Object.keys(e.data).length>0){const{langResume:n}=t;this.holder=e,this.state=t,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 e=this;return this.state.enterMode="resume",(0,o.e)(e,{sureText:"",denyText:"",show:!0,resuming:!0}),(0,r.Wy)(this.state,e.holder.responseId||""),await(0,o.W4)().hook.onResumeSurvey(this.state),(0,i.ay)(this.holder,this.state,{onEnd(){e.end()},onProgress(t){(0,o.e)(e,{show:!0}),(0,o.e)(e,{message:t})},onSuspend(){e.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(e){const t=await(0,i.io)(e.sid);return u=new c(t,e),u}function d(){return u&&u.resuming}},2392:(e,t,n)=>{"use strict";n.d(t,{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(e={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}){e.error=e.error||e.contrast,e.button=e.button||e.contrast,(0,i.E3)().theme=e,(0,i.E3)().setTheme(e)}},1372:(e,t,n)=>{"use strict";n.d(t,{a:()=>a});var i=n(8856),r=n(556);const o="prs-";function a(e=[]){const t=function(e){let t="";return e.forEach((e=>{t+="\n .".concat(o).concat((0,r.kt)(e.id)," {\n ").concat(function(e){let t="";const{backgroundColor:n,bold:i,color:r,fontSize:o,italic:a,lineThrough:s,underline:c}=e;return n&&(t+="background-color: ".concat(n,";")),r&&(t+="color: ".concat(r,"; ")),i&&(t+="font-weight: bold;"),a&&(t+="font-style: italic;"),s&&(t+="text-decoration: line-through;"),c&&(t+="text-decoration: underline;"),o&&(t+="font-size: ".concat(o,";")),t}(e.value),"\n }\n ")})),t}(e);(0,i.W4)().ui.setPresetStyle(t,e)}},8856:(e,t,n)=>{"use strict";n.d(t,{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(e){a=e}function u(e){o=e}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(e,t){e&&t&&(Object.keys(t).forEach((n=>{e[n]=t[n]})),o.silentSetter||s())}i.i.on("ERROR_ABORT",((e,t)=>{d().error(t)}))},1884:(e,t,n)=>{"use strict";function i(e){if(!e)return"00:00";const t=e%60;return r((e-t)/60)+":"+r(t)}function r(e){let t=e+"";return 1===t.length&&(t="0"+t),t}function o(){const e=new Date;return e.getFullYear()+"-"+r(e.getMonth()+1)+"-"+r(e.getDate())+" "+r(e.getHours())+":"+r(e.getMinutes())+":"+r(e.getSeconds())}n.d(t,{KM:()=>i,Kk:()=>r,kF:()=>o})},8084:(e,t,n)=>{"use strict";n.d(t,{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((e=>{e.cities&&0!==e.cities.length||(e.cities=[{name:e.name,code:e.code,areas:[{name:e.name,code:e.code}]}]),e.cities.forEach((e=>{e.areas&&0!==e.areas.length||(e.areas=[{name:e.name,code:e.code}])}))}))),o}function s(e){if(!e)return"";const t=e.split("-"),n=t[0],i=o.find((e=>n.includes(e.name)));if(!i)return"";const r=i?i.code+"":"",a=t[1];if(!a)return r;const s=i.cities.find((e=>a.includes(e.name)));if(!s)return r;const c=s?s.code+"":"",u=t[2];if(!u)return c;const l=s.areas.find((e=>u.includes(e.name)));return(l?l.code+"":"")||c||r||""}function c(e){const t=e.split(" ").map((e=>Number(e))),n=t.length,i=o[t[0]];let r,a,s=i.name;return n>1&&(r=i.cities[t[1]],s+="-"+r.name,n>2&&(a=r.areas[t[2]],s+="-"+a.name)),s}},3684:(e,t,n)=>{"use strict";n.d(t,{y:()=>r});var i=n(8856);function r(e,t){return new(0,(0,i.W4)().system.functionConstructor)("".concat(t?"return":""," ").concat(e))()}},6496:(e,t,n)=>{"use strict";n.d(t,{At:()=>h,GS:()=>v,Mh:()=>f,Mt:()=>y,Sk:()=>p,Uj:()=>m,YP:()=>g}),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:e}=(0,a.uK)(),t="language";return e?t+e:t}async function l(){return(0,o.W4)().storage.getVital(u())}function d(e,t){return!!t&&e.some((e=>e.locale===t))}async function f(e,t){const n=await l();if(d(e,n))return n;const i=function(){const e=(0,o.W4)().system.getLang();return e?function(e){const t=e.replace(/-/g,"_").toLowerCase(),n=s.c.langTable.find((e=>e.locale.startsWith(t)));return n?n.locale:t}(e):"en_us"}();return d(e,i)?i:t}async function p(e,t){return e!==await l()&&(g(e,!0),await async function(e){return(0,o.W4)().storage.setVital(u(),e)}(e),(0,o.W4)().storage.set("anti-show-init-lang-select","true"),t&&(0,o.W4)().storage.set("lang-resume","true"),(0,o.W4)().hook.beforeForceLeave(),(0,o.W4)().app.reload(),!0)}function m(e){let t="en_us";c.includes(e)&&(t=e),r.Ki(t),(0,o.E3)().setLocale(t),i.i.trigger("LANG_CHANGE");const n=s.c.langTable.find((t=>t.locale===e));(0,o.W4)().hook.onLangChange(n)}function g(e="en_us",t=!1){return t||m(e),e}function h(e){return e.replace(/\{(\w+),.+?(\w+)\}\s?\}/g,((e,t,n)=>"{".concat(t,"} ").concat(n)))}function v(e,t){return t?(0,o.W4)().system.translate(e,t):e}function y(e,t){const n=e&&t.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:(e,t,n)=>{"use strict";n.d(t,{a:()=>a,k:()=>o});var i=n(4756),r=n(8856);function o(e){return(0,r.E3)().hostConfig.mediaHost+"/"+e}function a(e){const{width:t,height:n,name:r,id:a,originName:s}=e,c=o(r);return{ratio:Math.round(n/t*1e5)/1e5,url:c,natural:(0,i.Q)(c,"!m720"),thumbnail:(0,i.Q)(c,"!avatar"),large:(0,i.Q)(c,"!m1080"),width:t,height:n,id:a,originName:s,name:r}}},4872:(e,t,n)=>{"use strict";n.d(t,{K:()=>r});var i=n(9200);async function r(e){return"string"==typeof e?JSON.parse(i.c.inflateBase64(e)):e}},7828:(e,t,n)=>{"use strict";n.d(t,{O_:()=>m,QJ:()=>g,__:()=>h,gz:()=>v,w3:()=>p}),n(9952);var i=n(556),r=n(3568),o=n(6276);function a(e,t){e.questionText=t.questionText||"",e.describe=t.describe||""}function s(e,t){e.mapping&&t.mapping&&r.c.forEach((n=>{const i=e.mapping[n];i&&"object"==typeof i||(e.mapping[n]=t.mapping[n]||"")}))}function c(e,t){let n=[];e.options&&(n=[...n,...e.options]),e.refOptions&&(n=[...n,...e.refOptions]),(0,o.yy)(e)&&(n=[...n,...e.otherOptions]),t.options&&Object.keys(t.options).forEach((r=>{const o=n.find((e=>(0,i.kt)(e.uuid)===r));o&&function(e,t,n){(function(e,t){return!(e.isRef||!e.isOtherOpt&&["cascade","region","area","location"].includes(t.type))})(e,n)&&(e.text=t.text||""),e.optComment=t.optComment||"",s(e,t),e.selectText=t.selectText,e.autoInputConfig&&t.autoInputConfig&&(e.autoInputConfig.defaultValue=t.autoInputConfig.defaultValue||"")}(o,t.options[r],e)}))}function u(e,t){e&&t&&e.logic&&t.logic&&(e.logic.message=t.logic.message||"")}function l(e,t){a(e,t),c(e,t),u(e.validation,t.validation),function(e,t){const{optionGroups:n}=e;if(!n)return;const r=t.optionGroups||{},o=e=>{e.forEach((e=>{if((0,i.is)(e,"group"===e.type)){const t=(0,i.kt)(e.uuid),n=r[t];n&&(e.groupTitle=n.groupTitle);const a=e.children||[];o(a)}}))};o(n)}(e,t)}const d={};function f(e,t){e.value=t.value||""}function p(e,t={}){const{nodes:n,variables:r,groups:o}=t,{nodes:a,variables:s,groups:c}=e;a&&n&&Object.keys(n).forEach((e=>{const t=n[e],r=a.find((t=>t.nodeUuid&&(0,i.kt)(t.nodeUuid)===e));r&&function(e,t){const n=d[e.type];n?n(e,t):l(e,t)}(r,t)})),s&&r&&Object.keys(r).forEach((e=>{const t=r[e],n=s.find((t=>(0,i.kt)(t.uuid)===e));n&&f(n,t)})),c&&o&&Object.keys(o).forEach((e=>{const t=o[e],n=c.find((t=>(0,i.kt)(t.id)===e));n&&function(e,t){e.prevText=t.prevText||"",e.nextText=t.nextText||""}(n,t)}))}function m(e,t){e&&e.forEach((e=>{e.data.forEach((e=>{const n=e[t];n&&(e.name=n)}))}))}function g(e,t){t&&d.start(e,t)}function h(e,t){t&&d.gift(e,t)}function v(e,t){t&&f(e,t)}d.end=(e,t)=>{a(e,t),e.endBtnText=t.endBtnText||""},d.gift=(e,t)=>{a(e,t),e.activityName=t.activityName||"",e.endBtnText=t.endBtnText||"",e.blessings=t.questionText||""},d.loop=(e,t)=>{(t.options||e.options)&&Object.keys(t.options).forEach((n=>{const r=e.options.find((e=>(0,i.kt)(e.uuid)===n));r&&(r.text=t.options[n].text)}))},d.lottery=(e,t)=>{(t.options||e.options)&&Object.keys(t.options).forEach((n=>{const r=e.options.find((e=>(0,i.kt)(e.uuid)===n));r&&(r.rewardName=t.options[n].rewardName)})),t.success&&(e.success.title=t.success.title||"",e.success.summary=t.success.summary||""),t.fail&&(e.fail.title=t.fail.title||"",e.fail.summary=t.fail.summary||"")},d.value_mark=(e,t)=>{l(e,t),e.minText&&(e.minText=t.minText||"",e.maxText=t.maxText||"")},d.menu=(e,t)=>{l(e,t),e.placeholder=t.placeholder||""},d.start=(e,t)=>{e.questionText=t.questionText||"",e.startName=t.startName||"",e.logoText=t.logoText||"",e.startBtnText=t.startBtnText||"",e.nextBtnText=t.nextBtnText||"",e.prevBtnText=t.prevBtnText||"",e.timeoutText=t.timeoutText||"",e.timeLessText=t.timeLessText||"",u(e.validation,t.validation)},d.slide_rate=(e,t)=>{l(e,t),(t.options||e.rateOptions)&&Object.keys(t.options).forEach((n=>{const r=e.rateOptions.find((e=>(0,i.kt)(e.uuid)===n));r&&(r.text=t.options[n].text)}))},d.matrix=(e,t)=>{if(a(e,t),u(e.validation,t.validation),t.options){let n=[];e.optionsX&&(n=[...n,...e.optionsX]),e.optionsY&&(n=[...n,...e.optionsY]),e.otherOptions&&(n=[...n,...e.otherOptions]);const r=e.options||[];Object.keys(t.options).forEach((e=>{const o=t.options[e],a=r.find((t=>(0,i.kt)(t.uuid)===e));if(a)s(a,o);else{const t=n.find((t=>(0,i.kt)(t.uuid)===e));t&&(t.text=o.text||"")}}))}},d.data=(e,t)=>{c(e,t),e.options&&e.options.forEach((e=>{delete e.optComment,delete e.value}))}},5548:(e,t,n)=>{"use strict";function i(e,t="-",n="street"){let i=e.province;return"province"!==n&&e.city&&(i+=t+e.city,"city"!==n&&e.district&&(i+=t+e.district,"county"!==n&&(e.street&&(i+=t+e.street),e.street_number&&(i+=e.street_number)))),i}function r(e){return e*(Math.PI/180)}function o(e,t){const n=r(t.lat-e.lat),i=r(t.lng-e.lng),o=Math.sin(n/2)*Math.sin(n/2)+Math.cos(r(e.lat))*Math.cos(r(t.lat))*Math.sin(i/2)*Math.sin(i/2);return 2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o))*6371*1e3}n.d(t,{A:()=>i,c:()=>o})},556:(e,t,n)=>{"use strict";n.d(t,{Av:()=>c,Cu:()=>w,DB:()=>l,O0:()=>_,OI:()=>v,Qh:()=>o,So:()=>u,Sq:()=>y,W_:()=>b,YF:()=>d,aO:()=>a,ai:()=>m,ec:()=>g,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(e){return e.replace(/</g,"_-v-w^l-t-_").replace(/>/g,"^-v-w_g-t-^")}function a(e){return e.replace(/_-v-w\^l-t-_/g,"<").replace(/\^-v-w_g-t-\^/g,">")}function s(e,t){return t}function c(e=1,t=5){const n=m(e,t),i=r.length;let o="";for(let e=0;e<n;e++){const e=m(0,i);o+=r[e]}return o}function u(e,t){if(36!==e.length)throw new Error("invalid uuid");return t?l(e,t.map((e=>f(e.varList[e.currentIndex].uuid)))):e}function l(e,t){if(36!==e.length)throw new Error("invalid uuid");return t&&t.forEach((t=>{e+="-"+f(t)})),e}function d(){const e=new Array(36);let t,n=0;for(let i=0;i<36;i++)8==i||13==i||18==i||23==i?e[i]="-":14==i?e[i]="4":(n<=2&&(n=33554432+16777216*Math.random()|0),t=15&n,n>>=4,e[i]=r[19==i?3&t|8:t]);return e.join("").toLowerCase()}function f(e){return e.substring(e.length-8)}function p(e="",t=""){return e=e.toLowerCase(),t=t.toLowerCase(),8===e.length&&36===t.length?e===f(t):36===e.length&&8===t.length?f(e)===t:e===t}function m(e,t){return e>t&&([e,t]=[t,e]),e+g(t-e+1)}function g(e){return Math.floor(Math.random()*e)}function h(e,t){const n=[...e];if((0,i.oV)(t))return n;if(0===(t=Number(t)))return[];if(t<0||isNaN(t))return n;if(1===t)return n.splice(g(n.length),1);const r=[];for(n.length<t&&(t=n.length);r.length<t;){const e=g(n.length);r.push(n.splice(e,1)[0])}return r}function v(e,t){e&&"object"==typeof e&&Object.keys(e).forEach((n=>{const i=e[n];Array.isArray(i)&&i.forEach((e=>{v(e,t)})),"object"==typeof i&&v(i,t),t(e,n)}))}function y(e,t){if(e<t)throw new Error("can not random distribute");const n=function(e,t){const n=[];for(;n.length<t;){const t=m(1,e-1);n.includes(t)||n.push(t)}return n.sort(((e,t)=>e>t?1:-1)),n}(e,t-1),i=n.map(((e,t)=>e-(n[t-1]||0)));return i.push(e-n[n.length-1]),i}function _(e){const t=new WeakMap;return function e(n){if(!n||"object"!=typeof n)return n;if(n instanceof Array)return n.map((t=>e(t)));const i=t.get(n);if(i)return i;const r={};return t.set(n,r),Object.keys(n).forEach((t=>{r[t]=e(n[t])})),r}(e)}function w(e,t=0){let n=-1;return function(...i){const r=this;clearTimeout(n),n=setTimeout((()=>{e.apply(r,i)}),t)}}async function x(e,t,n){const i=[];e.replace(t,((e,...t)=>(i.push(n(e,...t)),e)));const r=await Promise.all(i);return e.replace(t,(()=>r.shift()))}function b(e=0){return new Promise((t=>setTimeout(t,e)))}async function T(e){return e}},6276:(e,t,n)=>{"use strict";function i(e){return!!e.origin.layout}function r(e){const t=e.origin;return void 0!==t.questionText||void 0!==t.describe}function o(e){return!!e.origin.options}function a(e){return!!e.origin.optionGroups}function s(e){return!!e.origin.fillType}function c(e){return!!e.otherOptions}function u(e){return!!e.options}function l(e){return!!e.origin.otherOptions}function d(e){return!!e.video}n.d(t,{G6:()=>o,IN:()=>l,Oo:()=>i,QB:()=>a,_O:()=>d,cp:()=>s,kZ:()=>r,uo:()=>u,yy:()=>c})},2352:(e,t,n)=>{"use strict";function i(e){return o(e)?"":String(e)}function r(e){if(o(e))return"";const t=Number(e);return isNaN(t)?e:t}function o(e){return e instanceof Array?0===e.length:"boolean"!=typeof e&&0!==e&&!e}n.d(t,{Wo:()=>i,oV:()=>o,uI:()=>r})},4756:(e,t,n)=>{"use strict";n.d(t,{A:()=>o,Q:()=>r});var i=n(3004);function r(e,t){return e.endsWith(".svg")||(0,i.U)()?e:e+t}function o(e=[]){const t=[];return e.includes("video")&&t.push("video/*"),e.includes("audio")&&t.push("audio/*"),e.includes("image")&&t.push("image/*"),e.includes("doc")&&t.push("text/plain","application/json","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".csv",".docx",".pdf",".log"),t.join()}},5224:(e,t,n)=>{"use strict";n.d(t,{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:(e,t,n)=>{"use strict";n.d(t,{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(e){if("SCRIPT"===e.tagName)e.parentElement&&e.parentElement.removeChild(e);else{r.forEach((t=>{e.removeAttribute("on"+t)}));for(let t=e.children.length-1;t>=0;t--){const n=e.children[t];1===n.nodeType&&o(n)}}}function a(e){if(!e||e.includes("data-safe-html="))return e;const t=(0,i.W4)().system.newDiv();return t.innerHTML=e,o(t),t.innerHTML}},5876:(e,t,n)=>{"use strict";function i(e){const t={limitType:1,limitSrc:0,limitStart:"0",limitEnd:"0",limitRnd:"-1",phParams:[],disorder:!1,outOfResult:!1,imgHeight:0,imgWidth:0,ignoreCase:!1};if(e){const n=JSON.parse(e);return{...t,...n}}return t}n.d(t,{Qr:()=>r,_m:()=>o,cF:()=>i,mE:()=>a});const r=e=>{if(!e)return!1;const{limitSrc:t,limitType:n,limitStart:i,limitEnd:r}=e;return!(!t||!n||1==n&&"0"==i&&"0"==r)};function o(e){const t=function(e){if(!e)return e;const t={};return e.phParams&&e.phParams.length>0&&(t.phParams=e.phParams),r(e)&&(t.limitSrc=e.limitSrc,t.limitType=e.limitType,t.limitStart=e.limitStart,t.limitEnd=e.limitEnd),"-1"!=e.limitRnd&&(t.limitRnd=e.limitRnd),e.disorder&&(t.disorder=e.disorder),e.outOfResult&&(t.outOfResult=e.outOfResult),Number(e.imgHeight)&&(t.imgHeight=e.imgHeight),Number(e.imgWidth)&&(t.imgWidth=e.imgWidth),0===Object.keys(t).length?void 0:t}(e);return t?JSON.stringify(t):""}function a(e){const t={};return e.forEach((e=>{t[e.name]=e.value})),t}},4072:(e,t,n)=>{"use strict";n.d(t,{Ij:()=>h,UJ:()=>u,WK:()=>p,YV:()=>c,ee:()=>m,kx:()=>g,sf:()=>d}),n(7768);var i=n(3001),r=n(3132),o=n(556),a=n(8348),s=n(8856);function c(e){d(e.imageList),function(e){let t="";e.forEach((e=>{e.name.includes("TO_GLOBAL")&&"var-html"===e.type&&(t+=(0,i.uO)(e.value).replace(/<style>/g,"").replace(/<\/style>/g,""))})),(0,s.W4)().ui.setGlobalStyle(t)}(e.variables),function(e){if(e){const t=l(e.allJson,null)+l(e.strJson,"var-string")+l(e.expJson,"var-expression")+l(e.reqJson,"var-request")+l(e.loopJson,"var-loop");(0,s.W4)().ui.setVarStyle(t,e)}}(e.varStyles)}function u(e){let t="";return e.bold&&(t+="font-weight: bold;"),e.italic&&(t+="font-style: italic;"),e.underline?t+="text-decoration: underline;":e.lineThrough&&(t+="text-decoration: line-through;"),e.color&&(t+="color: ".concat(e.color,";")),e.backgroundColor&&(t+="background-color: ".concat(e.backgroundColor,";")),e.fontSize&&(t+="font-size: ".concat(e.fontSize,";"),t+="line-height: 1.4;"),t}function l(e,t){if(!e)return"";let n=t?".var-light.".concat(t,":not([in-edist]) {"):".var-light:not([in-edist]) {";return n+=u(e),n+="}",n}function d(e){const t=async function(e){const{varInfo:t,pureText:n}=e;return n?this.fileName:h((0,r.k)(this.serverFileName),t.config,this.fileName)};e.forEach((e=>{e.getText=t,e.isMedia=!0,e.type="var-media"}))}function f(e){if(e)return{...e,identity:{baseId:e.uuid}}}function p(e="",t){return f(t.find((t=>t.name===e)))}function m(e="",t){return t.find((t=>(0,o.oj)(t.id,e)))}function g(e="",t){let n;const i=m(e,t.imageList);return i?n={...i,type:"var-media",uuid:i.id,name:""}:(n=t.variables.find((t=>(0,o.oj)(t.uuid,e))),n||(n=(0,a._O)(e))),f(n)}function h(e="",t={imgHeight:0,imgWidth:0},n="Image",i=!1){let r="##"+e;return i||(r+="?w=".concat(t.imgWidth||0,"&h=").concat(t.imgHeight||0),n&&(r+="#"+n)),r+"##"}},9348:(e,t,n)=>{"use strict";n.d(t,{A:()=>r,U:()=>o}),n(7768);const i=["nodeId","nodePartId","optFilterId","optId","optPartId","loopNodeId","loopRoundId","innerLoopNodeId","innerLoopRoundId"];function r(e){return e.baseId?e.baseId:i.map((t=>e[t]||"")).join(":").replace(/:+$/,"")}function o(e){if(!e.includes(":"))return{baseId:e};const t=e.split(":"),n={};return t.forEach(((e,t)=>{const r=i[t];n[r]=e})),n}},488:(e,t,n)=>{"use strict";n.d(t,{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),m=n(5876),g=n(7192),h=n(9216),v=n(8260),y=n(5776),_=n(4316);function w(e){e=(0,g.Un)(e);const t=(0,f.W4)().system.newDiv();return t.innerHTML=e,t}function x(e="",t){return t||(t=w(e)),[...t.querySelectorAll(".var-tag")]}function b(e=""){return String(e).includes("var-tag")}function T(e){return(0,o.is)(e,1===e.nodeType)&&e.classList.contains("var-tag")}function S(e,t=""){const{loopStack:n,context:i}=e;let{renderList:r}=e;const a=(0,y.AF)(e,t);if(!a)return;const s=(0,o.So)(a,n);return i.node&&(r=[...r,i.node]),r.find((e=>s.startsWith(e.renderId)))}function E(e,t,n,i){if(!n)return null;const r=[n];i&&r.push(i);const a=(0,y.AF)(e,t);if(!a)return;const s=(0,o.DB)(a,r);return(0,h.QL)(e.renderList,s)}function I(e){return{name:e.innerText,identity:(0,p.U)(e.getAttribute("data-v-id")),config:(0,m.cF)(e.getAttribute("data-v-config")),inEdist:e.parentElement&&!!e.parentElement.getAttribute("edist")}}function k(e,t){return C(e,I(t))}function O(e){const{identity:t,config:n}=e;let i=(0,p.A)(t);if(!n)return i;if((0,m.Qr)(n)){const{limitSrc:e,limitType:t,limitStart:r,limitEnd:o}=n;i+="_".concat(e,"_").concat(t,":").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 e=(0,m.mE)(o);i+="_".concat(JSON.stringify(e))}return i}function C(e,t){const n=O(t={...t,config:t.config||{}}),{identity:i,config:r,name:o,inEdist:a}=t,d=(0,p.A)(i),f={identity:i,config:r},{baseId:m,nodeId:g,nodePartId:h,optFilterId:y,optId:_,optPartId:w,loopRoundId:x,innerLoopRoundId:b}=i;if(m){if(P(m)){const[e,t]=m.split("URL_PARAM=");return{...f,type:"var-string",uuid:"URL_PARAM=".concat(t)}}const t=(0,u.kx)(m,e);return t?{...f,...t,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(e,g,x,b),!T)return}else if(c.Ux(h))I=g;else if(T=S(e,g),!T)return;if(h){const e=(0,l._O)(h);return e&&{...f,uuid:d,name:o,node:T,nodePart:e,lookupLoopNodeId:I,isMedia:"var-media"===e.type,type:e.type,mapId:n,inEdist:a}}const k=(0,l._O)(w,T);if(!k)return;const C="var-media"===k.type;if(y){const e=(0,l._O)(y,T);if(!e)return;return{...f,inEdist:a,name:o,node:T,optionPart:k,optionFilter:e,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(e,t){let n=[];const{varInfo:{optionFilter:s,option:c,config:u}}=e,l=await(0,i.W0)(u.limitRnd,e);if(0===l&&!t)return[];const d=e.specifiedOpt||c;n=d&&await(0,r.U)(e)?[d]:s&&s.filter?await s.filter(e):[];const f=t?t(n,l):(0,o.my)(n,l);return u.disorder?(0,a.sZ)(f):f}async function N(e){const{varInfo:{nodePart:t,optionPart:n,option:i}}=e,o=e.specifiedOpt||i;if(t&&t.getBool)return t.getBool(e);if(o)return await(0,r.U)(e)&&await n.getBool({...e,specifiedOpt:o});if(n.inBunch)return n.getBool(e);{const t=await L(e),i=[];for(const r of t){const t=await n.getText({...e,specifiedOpt:r});t&&i.push(t)}return i.length>0}}async function R(e){const{varInfo:{nodePart:t,optionPart:n,option:i}}=e,o=e.specifiedOpt||i,a=e.joinBy||" ";if(t&&t.getText)return t.getText(e);if(o)return await(0,r.U)(e)?n.getText({...e,specifiedOpt:o}):"";if(n.inBunch)return n.getText(e);{const t=await L(e),i=[];for(const r of t){const t=await n.getText({...e,specifiedOpt:r});(0,d.oV)(t)||i.push(t)}return i.join(a)}}async function A(e){const t={};t.text=await R(e);const n=await async function(e){const{varInfo:{nodePart:t,optionPart:n,option:i,isMedia:o}}=e;if(!o)return[];const a=e.specifiedOpt||i;if(t&&t.getImages)return t.getImages(e);if(a)return await(0,r.U)(e)&&n.getImages?n.getImages({...e,specifiedOpt:a}):[];{const t=await L(e),i=[];if(n.getImages)for(const r of t){const t=await n.getImages({...e,specifiedOpt:r});i.push(t[0])}return i}}(e);t.image=n[0];const i=await async function(e){const{varInfo:{optionPart:t,option:n}}=e;if(!t)return[];const i=e.specifiedOpt||n;if(i)return await(0,r.U)(e)&&t.getIcon?[t.getIcon({...e,specifiedOpt:i})]:[];{const n=await L(e);return t.getIcon?n.map((n=>t.getIcon({...e,specifiedOpt:n}))):[]}}(e),o=i[0];return o&&(t.normalIconUrl=o,t.activeIconUrl=(0,_.WG)(o)),t}function P(e){return e&&e.startsWith("URL_PARAM=")}},8107:(e,t,n)=>{"use strict";n.d(t,{M4:()=>f,MH:()=>m,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(e){const{loopStack:t}=e;return t?t[t.length-1]:null}function d(e,t,n){const{state:{loopStack:r}}=e,o=r&&r[t];if(o){const e=o.replacements[t];if(e)return(0,i.k5)(n(e))}return(0,i.k5)(n())}async function f(e,t){const{varInfo:{lookupLoopNodeId:n,config:r},state:o}=e,a=l(o);if(!a)return"";const s=m(n,a.replacements);return(0,i.k5)(t(s,r))}function p(e){return function(){if(!u){const e=(0,o.yy)();u=[],Object.keys(e).forEach((t=>{const{uuid:n,type:i}=e[t];"var-loop"===i&&u.push(n)}))}return u}().includes(e)}function m(e,t){return t.find((t=>(0,i.oj)(t.loopNodeId,e)))}function g(e,t={imgHeight:0,imgWidth:0}){if(e){const{imgHeight:n,imgWidth:i}=t;let r=void 0===e.refText?e.text:e.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(e,t){if(e&&e.image){const{image:n}=e;return(0,r.Ij)(n.url,t)}return""}function v(e){return e&&(0,s.Wo)(e.index+1)}function y(e){return e&&e.value}function _(e){return e&&(0,s.Wo)(e.number)}function w(e){return e&&e.label}function x(e){e.C_OL_TXT.getText=e=>d(e,0,g),e.C_OL_IDX.getText=e=>d(e,0,v),e.C_OL_NUM.getText=e=>d(e,0,_),e.C_OL_VAL.getText=e=>d(e,0,y),e.C_OL_LBL.getText=e=>d(e,0,w),e.C_IL_TXT.getText=e=>d(e,1,g),e.C_IL_IDX.getText=e=>d(e,1,v),e.C_IL_NUM.getText=e=>d(e,1,_),e.C_IL_VAL.getText=e=>d(e,1,y),e.C_IL_LBL.getText=e=>d(e,1,w),c.c.forEach((t=>{!function(t){const n=t.split("_")[1],i="C_IL_MAP_"+n,r=(e,n)=>d(e,n,(n=>{if(!n)return"";const{mapping:i}=n;return(0,a.C)(i,t,e)}));e["C_OL_MAP_"+n].getText=e=>r(e,0),e[i].getText=e=>r(e,1)}(t)}))}function b(e){e.LOOP.getText=e=>f(e,g),e.LOOP_IMG.getText=e=>f(e,h),e.LOOP_INDEX.getText=e=>f(e,v),e.LOOP_NUM.getText=e=>f(e,_),e.LOOP_VAL.getText=e=>f(e,y),e.LOOP_LBL.getText=e=>f(e,w),c.c.forEach((t=>{!function(t){const n=t.split("_")[1];e["LOOP_MAP_"+n].getText=e=>f(e,(n=>(0,a.C)(n.mapping,t,e)))}(t)}))}},8348:(e,t,n)=>{"use strict";n.d(t,{yy:()=>b,_O:()=>w,cK:()=>g}),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),m=n(9200);const g="waiting fo extend";let h=!1;Math.avg=(...e)=>{let t=0;const n=e.length;for(let i=0;i<n;i++)t+=Number(e[i]);return t/n};const v={YEAR:{uuid:"YEAR",type:"var-string",getText:g},MONTH:{uuid:"MONTH",type:"var-string",getText:g},DATE:{uuid:"DATE",type:"var-string",getText:g},DAY:{uuid:"DAY",type:"var-string",getText:g},URL_KEY:{uuid:"URL_KEY",type:"var-string",getText:g},QUES_ID:{uuid:"QUES_ID",type:"var-string",getText:g},WX_ID:{uuid:"WX_ID",type:"var-string",getText:g},WX_SRC:{uuid:"WX_SRC",type:"var-string",getText:g},WX_NAME:{uuid:"WX_NAME",type:"var-string",getText:g},WX_UN_ID:{uuid:"WX_UN_ID",type:"var-string",getText:g},RES_ID:{uuid:"RES_ID",type:"var-string",getText:g},CLTR_ID:{uuid:"CLTR_ID",type:"var-string",getText:g},CLTR_CODE:{uuid:"CLTR_CODE",type:"var-string",getText:g},CLTR_NAME:{uuid:"CLTR_NAME",type:"var-string",getText:g},CURR:{uuid:"CLANG",type:"var-string",getText:g},LKTP:{uuid:"LKTP",type:"var-string",getText:g},START_TIME:{uuid:"S_T",type:"var-string",getText:g},COST_TIME:{uuid:"C_T",type:"var-string",getText:g},DVC_OSN:{uuid:"DVC_OSN",type:"var-string",getText:g},DVC_OSV:{uuid:"DVC_OSV",type:"var-string",getText:g},DVC_BRSN:{uuid:"DVC_BRSN",type:"var-string",getText:g},DVC_BRSV:{uuid:"DVC_BRSV",type:"var-string",getText:g},DVC_VDR:{uuid:"DVC_VDR",type:"var-string",getText:g},DVC_MDL:{uuid:"DVC_MDL",type:"var-string",getText:g},DVC_TYPE:{uuid:"DVC_TYPE",type:"var-string",category:"DEVICE",getText:g},RESULT:{uuid:"RESULT",type:"var-string",getText:g},C_OPT_TEXT:{uuid:"COTTX",type:"var-string",getText:g},C_OPT_NUM:{uuid:"CONUM",type:"var-string",getText:g},C_OPT_VAL:{uuid:"COVAL",type:"var-string",getText:g},C_OPT_LBL:{uuid:"COLBL",type:"var-string",getText:g},C_OPT_IPT:{uuid:"COIPT",type:"var-string",category:"CTPT",getText:g},C_OPT_ASI:{uuid:"COASI",type:"var-string",category:"CTPT",getText:g},C_OL_TXT:{uuid:"COLTXT",type:"var-string",getText:g},C_OL_IDX:{uuid:"COLIDX",type:"var-string",getText:g},C_OL_VAL:{uuid:"COLVAL",type:"var-string",getText:g},C_OL_NUM:{uuid:"COLNUM",type:"var-string",getText:g},C_OL_LBL:{uuid:"COLLBL",type:"var-string",getText:g},C_IL_TXT:{uuid:"CILTXT",type:"var-string",getText:g},C_IL_IDX:{uuid:"CILIDX",type:"var-string",getText:g},C_IL_VAL:{uuid:"CILVAL",type:"var-string",getText:g},C_IL_NUM:{uuid:"CILNUM",type:"var-string",getText:g},C_IL_LBL:{uuid:"CILLBL",type:"var-string",getText:g},POSITION:{uuid:"_P_OS",type:"var-string",getText:g},FAIL_SKIP:{uuid:"L_FAIL_SKIP",type:"var-bool",getText:g,getBool:g},FAILED:{uuid:"L_FAILED",type:"var-bool",getText:g,getBool:g},SUCCEED:{uuid:"L_SUCCEED",type:"var-bool",getText:g,getBool:g},COUNTRY:{uuid:"_C_NTY",type:"var-string",getText:g},PROVINCE:{uuid:"_P_ROV",type:"var-string",getText:g},CITY:{uuid:"_C_ITY",type:"var-string",getText:g},DISTRICT:{uuid:"_D_TRT",type:"var-string",getText:g},QUES_IMAGE:{uuid:"QI",type:"var-media",getText:g,getImages:g},QUES_TEXT:{uuid:"QT",type:"var-string",getText:g},QUES_LABEL:{uuid:"QL",type:"var-string",getText:g},QUES_DESC:{uuid:"QD",type:"var-string",getText:g},QUES_NAME:{uuid:"QN",type:"var-string",getText:g},QUES_RUNTIME_NAME:{uuid:"QRTN",type:"var-string",getText:g},PHONE_NUMBER:{uuid:"PN",type:"var-string",getText:g},PASSWORD:{uuid:"PSW",type:"var-string",getText:g},USED_PHONE:{uuid:"UPN",type:"var-bool",getText:g,getBool:g},VALIDATE_FAILED:{uuid:"VF",type:"var-bool",getText:g,getBool:g},VALIDATE_FAIL_TIMES:{uuid:"VFT",type:"var-expression",getText:g,getBool:g},QUES_TIME:{uuid:"DRTN",type:"var-string",getText:g,getBool:g},QUES_RS:{uuid:"QRS",type:"var-string",getText:g},Q_TIME_OVER:{uuid:"QTOR",type:"var-bool",getText:g,getBool:g},Q_TIME_LESS:{uuid:"QTLS",type:"var-bool",getText:g,getBool:g},MATCHED_OPTS:{uuid:"MTO",type:"var-string",filter:g},UNMATCHED_OPTS:{uuid:"UMTO",type:"var-string",filter:g},MARKED_OPTS:{uuid:"MKO",type:"var-string",filter:g},UNMARKED_OPTS:{uuid:"UMKO",type:"var-string",filter:g},RANKED_OPTS:{uuid:"RKO",type:"var-string",filter:g},UNRANKED_OPTS:{uuid:"URKO",type:"var-string",filter:g},CHECKED_OPTS:{uuid:"CKO",type:"var-string",filter:g},UNCHECKED_OPTS:{uuid:"UCKO",type:"var-string",filter:g},INPUTTED_OPTS:{uuid:"INO",type:"var-string",filter:g},UN_INPUTTED_OPTS:{uuid:"UINO",type:"var-string",filter:g},ALL_OPTS:{uuid:"ALO",type:"var-string",filter:g},SPECIFIED_OPT:{uuid:"SPO",type:"var-string"},OPT_TEXT:{uuid:"OTXX",type:"var-string",getText:g},OPT_TEXT_X:{uuid:"OTXY",type:"var-string",getText:g},OPT_TEXT_Y:{uuid:"OTX",type:"var-string",getText:g},OPT_NUMBER:{uuid:"ONM",type:"var-string",getText:g},OPT_SELECTED:{uuid:"OSL",type:"var-bool",getBool:g,getText:g},OPT_NUMBER_X:{uuid:"ONMX",type:"var-string",getText:g},OPT_NUMBER_Y:{uuid:"ONMY",type:"var-string",getText:g},OPT_IMAGE:{uuid:"OMG",type:"var-media",getText:g,getImages:g},OPT_ICON:{uuid:"OIC",type:"var-string",getText:g,getIcon:g},OPT_MARK:{uuid:"OMA",type:"var-string",getText:g},OPT_RANK:{uuid:"ORA",type:"var-string",getText:g},OPT_INPUT:{uuid:"OIN",type:"var-string",getText:g},OPT_LABEL:{uuid:"OLB",type:"var-string",getText:g},OPT_GROUP_TITLE:{uuid:"OPT_GROUP_TITLE",type:"var-string",getText:g},OPT_COUNT:{uuid:"OCT",type:"var-expression",inBunch:!0,getText:g},OPT_SAME_MARK:{uuid:"OSM",type:"var-bool",inBunch:!0,getBool:g,getText:g},OPT_DIFF_MARK:{uuid:"ODM",type:"var-bool",inBunch:!0,getBool:g,getText:g},OPT_SAME_VALUE:{uuid:"OSV",type:"var-bool",inBunch:!0,getBool:g,getText:g},OPT_DIFF_VALUE:{uuid:"ODV",type:"var-bool",inBunch:!0,getBool:g,getText:g},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:g,getImages:g},LOOP_IMG:{uuid:"LPIMG",type:"var-loop",getText:g,getImages:g},LOOP_INDEX:{uuid:"LPIDX",type:"var-loop",getText:g},LOOP_VAL:{uuid:"LPVAL",type:"var-loop",getText:g},LOOP_NUM:{uuid:"LPNUM",type:"var-loop",getText:g},LOOP_LBL:{uuid:"LPLBL",type:"var-loop",getText:g}};for(const e of m.c.langTable){const t="LANG_"+e.locale.toUpperCase(),n=t;v[t]={uuid:n,type:"var-string",getText:async()=>e.locale}}for(let e=2;e<21;e++){const t="URL_KEY_"+e;v[t]={uuid:t,type:"var-string",getText:g}}function y(e,t){const n=t.origin.optionMappingHeads;if(n){const t=n.find((t=>t.field==="field_"+e));if(t)return{type:"image"===t.type?"var-media":"var-string"}}return null}for(let e=1;e<7;e++)v["OPT_ASTV_"+e]={uuid:"OASTV_"+e,type:"var-string",getText:g},v["OPT_MAP_"+e]={uuid:"OM_"+e,type:"var-string",getText:g,getDynamicProps:t=>y(e,t)},v["C_OPT_MAP_"+e]={uuid:"COMAP"+e,type:"var-string",getText:g},v["C_OL_MAP_"+e]={uuid:"COLMAP"+e,type:"var-string",getText:g},v["C_IL_MAP_"+e]={uuid:"CILMAP"+e,type:"var-string",getText:g},v["LOOP_MAP_"+e]={uuid:"LPMAP"+e,type:"var-loop",getText:g};const _=Object.keys(v);function w(e,t){for(const n of _)if(v[n].uuid===e){let e=v[n];if(e.getDynamicProps&&t){const n=e.getDynamicProps(t);n&&(e={...e,...n})}return e}}function x(){h||(function(){const e=[];_.forEach((t=>{if(!(v[t]instanceof Function)){if(e.indexOf(v[t].uuid)>0)throw new Error("error duplicated uuid in implicit var config: "+v[t].uuid);e.push(v[t].uuid)}}))}(),(0,i.M)(v),(0,p.nS)(v),(0,p.yG)(v),function(e){e.OPT_INPUT.getText=async e=>(0,a.Y5)(e.specifiedOpt,"value"),e.OPT_LABEL.getText=async e=>e.specifiedOpt.label||"",c.c.forEach((t=>{!function(t){const n=t.split("_")[1];e["OPT_MAP_"+n].getText=async e=>{const{specifiedOpt:n}=e,{mapping:r}=n;return(0,i.C)(r,t,e)}}(t),function(t){const n=t.split("_")[1];e["OPT_ASTV_"+n].getText=async e=>{const n=e.specifiedOpt.assistValue;return n&&n[t]||""}}(t)})),e.OPT_MARK.getText=e.OPT_INPUT.getText,e.OPT_TEXT.getText=async e=>{const t=e.specifiedOpt,n=(0,a.Ml)(t);if(n)return n;const{optionY:i,optionX:r}=t;return r?r.text+"_"+i.text:(0,a.Y5)(t,"text")},e.OPT_NUMBER.getText=async e=>(0,s.Wo)(e.specifiedOpt.number),e.OPT_RANK.getText=async e=>{const t=e.specifiedOpt.sortNo;return(0,s.Wo)(t)},e.OPT_TEXT_X.getText=async e=>e.specifiedOpt.optionX.text,e.OPT_TEXT_Y.getText=async e=>e.specifiedOpt.optionY.text,e.OPT_NUMBER_X.getText=async e=>{const t=e.specifiedOpt.optionX.number;return(0,s.Wo)(t)},e.OPT_NUMBER_Y.getText=async e=>{const t=e.specifiedOpt.optionY.number;return(0,s.Wo)(t)},e.OPT_IMAGE.getText=async e=>{const{varInfo:{config:t},specifiedOpt:n,pureText:i}=e,o=(0,a.Y5)(n,"image");return i?n.text:o?(0,r.Ij)(o.url,t,o.originName):""},e.OPT_ICON.getText=async e=>e.specifiedOpt.text,e.OPT_COUNT.getText=async e=>{const t=await(0,o.ms)(e);return(0,s.Wo)(t.length)},e.OPT_GROUP_TITLE.getText=async e=>{const{optionGroups:t,optionGroupsRelationship:n}=e.varInfo.node.origin;if(!t||!n)return"";const i=e.specifiedOpt.uuid;return function e(t,n){const[i,...r]=n,o=t.find((e=>e.uuid===i));if(o){const t=[o.groupTitle],{children:n}=o;if(n&&0!==n.length&&0!==r.length){const i=e(n||[],r);return[...t,...i]}return t}return[]}(t||[],n.optionsRelationship[i]).join("/")}}(v),function(e){async function t(e,t){const{varInfo:n,needOtherOpt:i}=e,r=n.node,o=(0,a.gr)(r),s=[];for(const n of o)!i&&n.isOtherOpt||t&&!t(n,r)||!await(0,u.U)({...e,specifiedOpt:n})||s.push(n);return s}e.MATCHED_OPTS.filter=e=>t(e,l.e2),e.RANKED_OPTS.filter=e.MATCHED_OPTS.filter,e.CHECKED_OPTS.filter=e.MATCHED_OPTS.filter,e.UNMATCHED_OPTS.filter=e=>t(e,l.gb),e.UNRANKED_OPTS.filter=e.UNMATCHED_OPTS.filter,e.UNCHECKED_OPTS.filter=e.UNMATCHED_OPTS.filter,e.MARKED_OPTS.filter=e=>t(e,l.yu),e.INPUTTED_OPTS.filter=e.MARKED_OPTS.filter,e.UNMARKED_OPTS.filter=e=>t(e,l.sb),e.UN_INPUTTED_OPTS.filter=e.UNMARKED_OPTS.filter,e.ALL_OPTS.filter=async e=>(0,d.Qr)(e.varInfo.config)?t(e):e.varInfo.node.options}(v),function(e,t){!function(e,t){t.forEach((t=>{const n=e[t];"function"==typeof n.getText&&(n.getBool=async function(e){const t=await this.getText(e);return!(0,s.oV)(t)})})),e.OPT_COUNT.getBool=async function(e){return!!await this.getText(e)}}(e,t),e.OPT_SELECTED.getBool=async e=>e.specifiedOpt.selected,e.OPT_SAME_MARK.getBool=async e=>{const t=await(0,o.ms)(e);return function(e,t){if((0,s.oV)(t))return!0;(t<0||t>e.length)&&(t=e.length);const n={};for(const i of e){const e=i.value;if(n[e]?n[e]+=1:n[e]=1,n[e]>=t)return!0}return!1}(t,t.length)},e.OPT_DIFF_MARK.getBool=async e=>{const t=await(0,o.ms)(e);return function(e,t){if((0,s.oV)(t))return!0;(t<0||t>e.length)&&(t=e.length);const n={};for(const i of e)if(n[i.value]=!0,Object.keys(n).length>=t)return!0;return!1}(t,t.length)},e.OPT_SAME_VALUE.getBool=e.OPT_SAME_MARK.getBool,e.OPT_DIFF_VALUE.getBool=e.OPT_DIFF_MARK.getBool,e.FAIL_SKIP.getBool=async e=>!!e.varInfo.node.failedSkipActivated,e.FAILED.getBool=async e=>!!e.varInfo.node.failed,e.SUCCEED.getBool=async e=>!!e.varInfo.node.succeed,e.USED_PHONE.getBool=async e=>!!e.state.phoneUsed,e.VALIDATE_FAILED.getBool=async e=>e.varInfo.node.validateFailed,e.Q_TIME_OVER.getBool=async e=>{const{origin:{maxAnswerTime:t},costTime:n}=e.varInfo.node,i=1e3*t;return!!(i&&n&&i<n)},e.Q_TIME_LESS.getBool=async e=>{const{origin:{minAnswerTime:t},costTime:n}=e.varInfo.node,i=1e3*t;return!!(i&&n&&i>n)},function(e,t){function n(e){return this.getBool(e)}t.forEach((t=>{const i=e[t];"function"==typeof i.getBool&&i.getText===g&&(i.getText=n)}))}(e,t)}(v,_),(0,f.wi)(v),function(){let e="";if(_.forEach((t=>{const n=v[t];if(["filter","getText","getImages","getIcon","getBool"].forEach((i=>{n[i]===g&&(e+=t+"=>"+i+"\n")})),n.getText){const e=n.getText;n.getText=async function(...t){const{keepWrap:n}=t[0],i=e.apply(this,t),r=await i;if("string"==typeof r&&!n){const e=/<span var-name=".+?" class="var-light var-(\w+?)">(.+?)<\/span>/g;return(0,s.Wo)(r).replace(e,((e,t,n)=>"media"===t?e:n))}return(0,s.oV)(r)?"":r}}})),e)throw new Error("lack var implement for:\n"+e)}(),h=!0)}function b(){return h||x(),v}x()},9572:(e,t,n)=>{"use strict";n.d(t,{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(e){return{type:"image",width:e.originWidth,height:e.originHeight,name:e.serverFileName,id:e.id,originName:e.fileName}}async function l(e,t){if(!t)return[];const n=(0,o.ee)(t.uuid,e.imageList);if(n)return[(0,a.a)(u(n))];if(t.value){let n=[];const i=(0,r.oB)(t.value);for(const t of i){const i=await l(e,(0,r.yI)(e,t));n=n.concat(i)}return n}{const{option:n,optionPart:i}=t,o=t.node;return o?i?(await(0,r.ms)({state:e,varInfo:t,specifiedOpt:n})).map((e=>(0,s.Y5)(e,"image"))):o.images||[]:[]}}function d(e=""){return e&&"string"==typeof e?e.replace(/##((?:http|data:image|\/).+?)##/g,"$1"):e}function f(e){async function t(e,t){const n=e&&e[t]||"";return"string"==typeof n?[]:[n]}e.QUES_IMAGE.getImages=async e=>{var t;const n=null===(t=e.varInfo)||void 0===t?void 0:t.node;return(null==n?void 0:n.images)||[]},e.OPT_IMAGE.getImages=async e=>{const{varInfo:{option:t},specifiedOpt:n}=e,i=n||t;return[(0,s.Y5)(i,"image")]},e.LOOP.getImages=e.LOOP_IMG.getImages=async e=>{const{state:t,varInfo:{lookupLoopNodeId:n}}=e,r=i.Wy(t);if(!r)return[];const o=i.MH(n,r.replacements);return o&&o.image?[o.image]:[]},e.OPT_ICON.getIcon=e=>e.specifiedOpt.normalIconUrl||"",c.c.forEach((n=>{!function(n){const i=n.split("_")[1];e["OPT_MAP_"+i].getImages=e=>{const{specifiedOpt:i}=e,{mapping:r}=i;return t(r,n)}}(n),function(n){const i=n.split("_")[1];e["C_OPT_MAP_"+i].getImages=async e=>{const{state:{context:{option:i}}}=e;if(!i)return[];const{mapping:r}=i;return t(r,n)}}(n),function(n){const r=n.split("_")[1],o="C_IL_MAP_"+r;function a(e,r){return i.WG(e,r,(e=>{if(!e)return[];const{mapping:i}=e;return t(i,n)}))}e["C_OL_MAP_"+r].getImages=e=>a(e,0),e[o].getImages=e=>a(e,1)}(n),function(n){const r=n.split("_")[1];e["LOOP_MAP_"+r].getImages=e=>i.M4(e,(e=>t(e.mapping,n)))}(n)}))}},1880:(e,t,n)=>{"use strict";n.d(t,{C:()=>p,M:()=>m}),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(e,t,n){const i=e&&e[t]||"";if("string"==typeof i)return i;{const{pureText:e,varInfo:{config:t},specifiedOpt:o}=n;return e?o?o.text:"":(0,r.Ij)(i.url,t,i.originName)}}function m(e){function t(t){e["URL_KEY_"+t].getText=async()=>{const e="key"+t;return(0,c.uK)()[e]}}e.URL_KEY.getText=async()=>{const e=(0,c.uK)();return e.key1||e.key};for(let e=2;e<=20;e++)t(e);function n(e){const{varInfo:t,state:n}=e;let i;const r=t.node;return r&&(i=r.position&&r.position.address),i||(i=n.address),i}e.YEAR.getText=async()=>(new Date).getFullYear().toString(),e.MONTH.getText=async()=>{const e=(new Date).getMonth()+1;return(0,l.Kk)(e)},e.DATE.getText=async()=>{const e=(new Date).getDate();return(0,l.Kk)(e)},e.DAY.getText=async e=>{const t=(new Date).getDay();return"zh_cn"===e.state.language?["星期日","星期一","星期二","星期三","星期四","星期五","星期六"][t]:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][t]},e.QUES_ID.getText=async e=>e.state.surveyId,e.WX_ID.getText=async e=>{const{state:{userInfo:t}}=e;return t&&t.openid},e.WX_SRC.getText=async()=>(0,o.W4)().name,e.WX_NAME.getText=async e=>{const{state:{userInfo:t}}=e;return t&&t.nickname},e.WX_UN_ID.getText=async e=>{const{state:{userInfo:t}}=e;return t&&t.unionid},e.RES_ID.getText=async e=>{const{state:t}=e;return t.transactionID},e.CLTR_ID.getText=async()=>"",e.CLTR_CODE.getText=async()=>(0,o.E3)().preview?"":(0,o.E3)().sid,e.CLTR_NAME.getText=async e=>{if((0,o.E3)().preview)return"";const{state:{parsedPayload:t}}=e;if(t){const{surveyMeta:{collector:{name:e}}}=t;return e}return""},e.START_TIME.getText=async e=>{const t=e.state.startTime;return(0,s.Wo)(t)},e.COST_TIME.getText=async e=>{const t=(new Date).getTime()-e.state.startTime;return(0,s.Wo)(t)},e.RESULT.getText=async e=>{const{state:t}=e,n=await(0,i.gp)(t,"all",void 0,!0);return JSON.stringify(n)},e.CURR.getText=async e=>e.state.language,e.LKTP.getText=async()=>(0,d.i)(),e.C_OPT_TEXT.getText=async e=>{const{state:{context:{option:t}}}=e;return t?(0,a.Y5)(t,"text"):""},e.C_OPT_NUM.getText=async e=>{const{state:{context:{option:t}}}=e,n=t&&t.number;return(0,s.Wo)(n)},e.C_OPT_VAL.getText=async e=>{const{state:{context:{option:t}}}=e;return t?(0,a.Y5)(t,"value"):""},e.C_OPT_LBL.getText=async e=>{const{state:{context:{option:t}}}=e;return t&&t.label||""},e.C_OPT_IPT.getText=async e=>{const{state:{context:{option:t}}}=e;return t?"<input data-iptc-holder='".concat(t.renderId,"' hidden='true' />"):""},e.C_OPT_ASI.getText=async e=>{const{state:{context:{option:t}}}=e;return t?"<input data-asic-holder='".concat(t.renderId,"' hidden='true' />"):""},u.c.forEach((t=>{!function(t){const n=t.split("_")[1];e["C_OPT_MAP_"+n].getText=async e=>{const{state:{context:{option:n}}}=e;if(!n)return"";const{mapping:i}=n;return p(i,t,e)}}(t)})),e.POSITION.getText=async e=>{const{state:{point:t}}=e;return t?t.lat+","+t.lng:""},e.COUNTRY.getText=async e=>{const t=n(e);return t&&t.country},e.PROVINCE.getText=async e=>{const t=n(e);return t&&t.province},e.CITY.getText=async e=>{const t=n(e);return t&&t.city},e.DISTRICT.getText=async e=>{const t=n(e);return t&&t.district},e.QUES_IMAGE.getText=async e=>{const{varInfo:t,pureText:n}=e,i=t.node;return n?i.images.reduce(((e,t)=>e+" "+t.originName),""):i.images.reduce(((e,n)=>e+(0,r.Ij)(n.url,t.config,n.originName)),"")},e.QUES_DESC.getText=async e=>e.varInfo.node.description,e.QUES_LABEL.getText=async e=>e.varInfo.node.origin.label||"",e.QUES_TEXT.getText=async e=>e.varInfo.node.title,e.QUES_NAME.getText=async e=>e.varInfo.node.nodeName,e.QUES_RUNTIME_NAME.getText=async e=>e.varInfo.node.runtimeNodeName,e.PHONE_NUMBER.getText=async e=>e.varInfo.node.phoneNumber,e.PASSWORD.getText=async e=>e.varInfo.node.code,e.QUES_TIME.getText=async e=>(0,s.Wo)(e.varInfo.node.costTime),e.QUES_RS.getText=async e=>JSON.stringify((0,i.cA)(e.varInfo.node)),e.VALIDATE_FAIL_TIMES.getText=async e=>e.varInfo.node.validateFailTimes+"",e.DVC_BRSN.getText=async()=>(0,o.W4)().system.device.browser.name||f,e.DVC_BRSV.getText=async()=>(0,o.W4)().system.device.browser.version||f,e.DVC_OSN.getText=async()=>(0,o.W4)().system.device.os.name||f,e.DVC_OSV.getText=async()=>(0,o.W4)().system.device.os.version||f,e.DVC_VDR.getText=async()=>(0,o.W4)().system.device.device.vendor||f,e.DVC_MDL.getText=async()=>(0,o.W4)().system.device.device.model||f,e.DVC_TYPE.getText=async()=>(0,o.W4)().system.device.device.type||f}},6524:(e,t,n)=>{"use strict";n.d(t,{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(e){return e.selected}function s(e){return!e.selected}function c(e,t){return(0,o.QX)(e,t)}function u(e,t){return!(0,o.QX)(e,t)}const l=(e,t,n,i=!1)=>{if((0,r.oV)(t[n]))return NaN;const o={};e.forEach((e=>{let t=(e[n]+"").replace(/(\s|&nbsp;)/g,"");const i=parseFloat(t);isNaN(i)||(t=i),(0,r.oV)(t)||(o[t]?o[t].push(e):o[t]=[e])}));const a=Object.keys(o).sort(((e,t)=>{const n=Number(e),r=Number(t);return isNaN(n)||isNaN(r)?i?e>t?1:-1:e<t?1:-1:i?n>r?1:-1:n<r?1:-1}));for(let e=0;e<a.length;e++)if(o[a[e]].includes(t))return e+1;return NaN},d={};function f(e,t,n){const r=d[t];return r?r(function(e){let t=null;const{varInfo:n}=e,r=n.node,o=n.optionFilter,{selectIds:l,unselectIds:d,inputIds:f,uninputIds:p}=function(){const e=(0,i.yy)();return{selectIds:[e.CHECKED_OPTS.uuid,e.RANKED_OPTS.uuid,e.MATCHED_OPTS.uuid],unselectIds:[e.UNCHECKED_OPTS.uuid,e.UNRANKED_OPTS.uuid,e.UNMATCHED_OPTS.uuid],inputIds:[e.INPUTTED_OPTS.uuid,e.MARKED_OPTS.uuid],uninputIds:[e.UN_INPUTTED_OPTS.uuid,e.UNMARKED_OPTS.uuid]}}();return o&&(l.includes(o.uuid)?t=a:d.includes(o.uuid)?t=s:f.includes(o.uuid)?t=c:p.includes(o.uuid)&&(t=u)),t?r.options.filter((e=>t(e,r))):r.options}(n),e):NaN}d[1]=(e,t)=>t.number,d[14]=(e,t)=>l(e,t,"number",!0),d[15]=(e,t)=>l(e,t,"number",!1),d[2]=(e,t)=>t.text,d[12]=(e,t)=>l(e,t,"text",!0),d[13]=(e,t)=>l(e,t,"text",!1),d[3]=(e,t)=>t.value,d[4]=(e,t)=>l(e,t,"value",!0),d[5]=(e,t)=>l(e,t,"value",!1),d[6]=(e,t)=>t.sortNo,d[7]=(e,t)=>l(e,t,"sortNo",!0),d[8]=(e,t)=>l(e,t,"sortNo",!1),d[9]=(e,t)=>t.value,d[10]=(e,t)=>l(e,t,"value",!0),d[11]=(e,t)=>l(e,t,"value",!1)},1820:(e,t,n)=>{"use strict";n.d(t,{i:()=>r});var i=n(8856);function r(){return(0,i.E3)().realTimePreview?"realtime_preview":(0,i.E3)().preview?"preview":"formal"}},4060:(e,t,n)=>{"use strict";n.d(t,{IB:()=>l,uy:()=>g,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:(e,t,n)=>(t>n&&([t,n]=[n,t]),u[5](e,t,0)&&u[6](e,n,0)),2:(e,t,n)=>!u[1](e,t,n),11:(e,t)=>{const n=(0,c.Wo)(e).split(",").filter((e=>""!==e.trim())),i=(0,c.Wo)(t).split(",").filter((e=>""!==e.trim()));return n.some((e=>(e=e.trim(),i.some((t=>(t=t.trim(),e.includes(t)))))))},12:(e,t)=>!u[11](e,t,0),3:(e,t)=>(0,c.Wo)(e)===(0,c.Wo)(t),4:(e,t)=>!u[3](e,t,0),5:(e,t)=>{const n=(0,c.uI)(e),i=(0,c.uI)(t);return"number"==typeof n&&"number"==typeof i?n>i:(0,c.Wo)(n)>(0,c.Wo)(i)},6:(e,t)=>{const n=(0,c.uI)(e),i=(0,c.uI)(t);return"number"==typeof n&&"number"==typeof i?n<i:(0,c.Wo)(n)<(0,c.Wo)(i)},7:(e,t)=>!u[6](e,t,0),8:(e,t)=>!u[5](e,t,0),9:(e,t)=>{const n=(0,c.Wo)(e).split(",").filter((e=>""!==e.trim())),i=(0,c.Wo)(t).split(",").filter((e=>""!==e.trim()));return n.some((e=>(e=e.trim(),i.some((t=>(t=t.trim())===e)))))},10:(e,t)=>!u[9](e,t,0),13:e=>(0,c.Wo)(e).split(",").every((e=>""===e.trim())),14:(e,t)=>!u[13](e,t),15:(e,t)=>!u[16](e,t),16:(e,t)=>(0,c.Wo)(e).split(",").every((e=>{const t=e.trim();return"false"===t||""===t}))},l={request:e=>!!e,bool:e=>!!e,mark:(e,t)=>l.input(e,t),input:(e,t)=>{let n=e,i=t.markStart,r=t.markEnd;return t.ignoreCase&&("string"==typeof n&&(n=n.toLowerCase()),"string"==typeof i&&(i=i.toLowerCase()),"string"==typeof r&&(r=r.toLowerCase())),u[t.markId](n,i,r)}};function d(e,t){"string"==typeof e&&(e=(0,o.Qr)(e));const n=l[t.limitType],i=n?n(e,t):!!e;return{value:i,reason:i?void 0:{type:"value_unmatch",expected:t.markStart,expectedEnd:t.markEnd,limit:t.markId,actual:e}}}async function f(e,t){const{text:n}=e.relatedEmbed,i=g(e.markId)?",":void 0;return d(await(0,o.qQ)(n,{state:t,joinBy:i}),e)}async function p(e,t){const{relatedVarId:n}=e,i={identity:{baseId:n}},r=(0,s.of)(t,i);if(!r)return{value:!1,reason:{type:"var_not_found"}};const a=g(e.markId)?",":void 0;return d(await(0,o.Wi)({state:t,varInfo:r,joinBy:a}),e)}function m(e,t){const{relatedNodeId:n,relatedOptionId:o,limitType:s,markId:c}=t,u=function(e,t){const{loopStack:n,renderList:o}=e,{relatedNodeId:a}=t;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}(e,t);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((e=>function(e,t){return(0,r.oj)(e.option_id,t)}(e,o))),p=l[s];if(p){const e=f?(0,a.wr)(f):"",i=p(e,t),r={value:i};return i||(r.reason={type:"node_unmatch",limit:c,actual:e,expected:t.markStart,expectedEnd:t.markEnd,nodeId:n,optionId:o}),r}{const e=-2===c?!f:!!f,t={value:e};return e||(t.reason={type:"node_unmatch",limit:c,nodeId:n,optionId:o,expected:-1===c,actual:2===c}),t}}function g(e){return 9===e||10===e||11===e||12===e||13===e||14===e||15===e||16===e}async function h(e,t){return{start:g(e.markId)?await(0,o.E3)(e.markStart,{state:t,joinBy:","}):await(0,o.wh)(e.markStart,{state:t}),end:await(0,o.wh)(e.markEnd,{state:t})}}async function v(e,t){const{options:n,reverse:i,logicType:r}=t,o=await y(e,n,r);return i?!o.value:o.value}async function y(e,t,n){if(!t)return{value:!0};const i=[];for(const n of t){const t={...n},{relatedVarId:r,relatedEmbed:o,isGroup:a,groupLogicList:s,groupLogicType:c}=t,{start:u,end:l}=await h(t,e);let d;t.markEnd=l,t.markStart=u,d=a?await y(e,s,c):o?await f(t,e):r?await p(t,e):m(e,t),i.push(d)}return{value:!i["and"===n?"some":"every"]((e=>!e.value)),details:i}}async function _(e,t){return"object"==typeof e&&null!==e?v(t,e):!!e}},8260:(e,t,n)=>{"use strict";n.d(t,{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(e){return"LOOP_ALL_ROUND"===e}function d(e){return l(e.loopRoundId)||l(e.innerLoopRoundId)}async function f(e){const t=[],{state:n,varInfo:{identity:r}}=e,{loopNodeId:a,loopRoundId:s,innerLoopNodeId:u,innerLoopRoundId:d}=r,f=(0,i.AF)(n,a);if(!f)return"";const m=(0,c.IH)(n,f);if(!m)return"";let g=[];g=l(s)?m.varList.map((e=>(0,o.kt)(e.uuid))):[s];for(const r of g)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((e=>(0,o.kt)(e.uuid))):[d];for(const n of a){const i=await p(e,r,n);t.push(i)}}else{const n=await p(e,r);t.push(n)}return t.join(e.joinBy)}function p(e,t,n){const{varInfo:{config:i,identity:o}}=e,c=function(e,t){const n=(0,r.W4)().system.newSpan();return n.setAttribute("class","var-tag".concat(" ","var-string")),n.setAttribute("data-v-id",(0,s.A)(e.identity)),n.setAttribute("data-v-config",(0,a._m)(e.config)),n.outerHTML}({config:i,identity:{...o,loopRoundId:t,innerLoopRoundId:n}});return(0,u.qQ)(c,e)}},9376:(e,t,n)=>{"use strict";n.d(t,{Il:()=>w,Md:()=>h,Q9:()=>g,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),m=n(9572);async function g(e,t){const{loop:n}=t,i=n&&n.node.nodeUuid,{image:r}=t.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:e,varInfo:{node:t,lookupLoopNodeId:i}});{const t={identity:{baseId:r.id}};return await(0,m.cT)(e,(0,c.of)(e,t))}}async function h(e,t){const{origin:n,passRef:i}=t;if(i&&i.image)return i.image;const{parent:r,loop:o}=e,s=o&&o.node.nodeUuid,{image:l,text:f}=n;if(!l)return;const g=(0,u.yy)();let h;if("image"===l.type)h=(0,d.a)(l);else if(s&&p.Ux(l.id))h=(await g.LOOP_IMG.getImages({state:r,varInfo:{option:t,lookupLoopNodeId:s}}))[0];else{const e={identity:{baseId:l.id}};h=(await(0,m.cT)(r,(0,c.of)(r,e)))[0]}return!f&&h&&"variable"===l.type&&(0,a.KS)({node:e,optionId:t.uuid},{mapId:l.id},h.originName),h}function v(e){return!(!e||!(0,l.E3)().realTimePreview&&!(e.text||e.image||e.normalIconUrl))}async function y(e,t,n){const{optionPart:r,optionFilter:o}=t;let{option:a}=t;if(!r||r.inBunch)return{valid:!0};if(!a){const r=await o.filter({state:e,varInfo:t});a=(0,i.oz)(r,n.refOptId)}return{valid:!!a,srcOpt:a,srcRuntimeIndex:a?(0,i.wR)(t.node).indexOf(a):void 0}}function _(e,t){if(!t)return null;const n=(0,f.a)(e,t);for(const e of t){const t=(0,f.W)(e);if((0,o.oj)(t.uuid,n))return t}return null}async function w(e,t){const{origin:{mapping:n}}=e;if(e.mapping={field_1:"",field_2:"",field_3:"",field_4:"",field_5:"",field_6:""},t.context.option=e,n)for(const i of Object.keys(n)){const o=i,a=n[o];e.mapping[o]="string"==typeof a?await(0,r.qQ)(a,{state:t}):(0,d.a)(a)}e.assistValue={field_1:"",field_2:"",field_3:"",field_4:"",field_5:"",field_6:""},t.context.option=null}async function x(e,t,n,u=!1){let l=[],d=[],f=[],{refOptions:p,options:m,optionRefers:g}=t;if((0,o.is)(t,!!n)&&("xid"===n?(p=t.refOptionsX,m=t.optionsX,g=t.optionXRefers):"yid"===n&&(p=t.refOptionsY,m=t.optionsY,g=t.optionYRefers)),m&&p&&0!==p.length){l=[...m];const t={};for(const n of p){const o=_(n,g);if(!o)continue;const a=o.config||{},s=await(0,r.W0)(a.limitRnd,{state:e});if(0===s)continue;let l=null,d=null;const f=(0,c.of)(e,o);if(!f)continue;const{valid:p,srcOpt:m,srcRuntimeIndex:h}=await y(e,f,n);if(!p)continue;const w={state:e,varInfo:f,specifiedOpt:m,pureText:!u,keepWrap:!0};if(f.node&&(l=await(0,c.uZ)(w),m&&(d={uuid:n.uuid,value:m.value,optComment:m.optComment,image:(0,i.Y5)(m,"image"),number:m.number,text:m.text,label:m.label,mapping:m.mapping&&{...m.mapping},normalIconUrl:(0,i.Y5)(m,"normalIconUrl"),activeIconUrl:(0,i.Y5)(m,"activeIconUrl")})),v(l)){const e={srcRuntimeIndex:h,option:{...n,...l},passRef:d},i=o.uuid;t[i]?t[i].candidates.push(e):t[i]={candidates:[e],limitRnd:s,varInfo:f,disorder:a.disorder}}}Object.keys(t).forEach((e=>{const{limitRnd:n,candidates:i,varInfo:r,disorder:c}=t[e];let u=(0,o.my)(i,n);c?u=(0,s.sZ)(u):u.sort(((e,t)=>e.srcRuntimeIndex>t.srcRuntimeIndex?1:-1));const p=u.map((e=>e.option)),m=u.map((e=>e.passRef));f=f.concat((0,a.SW)(r,p)),l=l.concat(p),d=d.concat(m)}))}else l=m;return{options:l,refMaps:f,passRefs:d}}},3080:(e,t,n)=>{"use strict";n.d(t,{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(e,t,n){const{node:i,optionId:r,exclusiveId:o}=e;let a=i.embedVarMaps;if(a||(a=i.embedVarMaps=[]),o){const e=a.find((e=>e.exclusiveId===o&&e.var_id===t.mapId));if(e)return void(e.value=n)}a.push({type:"embed",var_id:t.mapId,value:n,option_id:r&&r.toLowerCase(),exclusiveId:o})}function s(e){const{text:t,image:n,icon:i}=e;if(t)return t;if(n)return n.originName;if(i){const e=(0,o.sV)(i).match(/#[^#]+$/);return e&&e[0]||""}return""}function c(e,t){return t.map((t=>({option_id:t.uuid.toLowerCase(),value:s(t),type:"ref",var_id:e.uuid})))}function u(e,t){e.referVarMaps?e.referVarMaps=e.referVarMaps.concat(t):e.referVarMaps=t}function l(e,t){const n=e.casVarMaps=[];t.forEach((e=>{e.text&&n.push({type:"cascade",option_id:e.uuid.toLowerCase(),value:e.text})}))}function d(e,t){const{renderList:n}=e,o=[];return n.forEach((e=>{if(!(0,r.Ci)(e.checkMode,t))return;const{nodeUuid:n,loop:a}=e;let{embedVarMaps:s,referVarMaps:c,casVarMaps:u}=e;s=function(e){if(e){let t=[];const n=[];return e.forEach((e=>{delete e.exclusiveId,e.option_id?t.push(e):n.push(e)})),t=function(e){let t=[];const n={};return e.forEach((e=>{const{var_id:t,value:i}=e;let r=n[t];r?(r.values.includes(i)||r.values.push(i),r.maps.push(e)):r=n[t]={values:[i],maps:[e]}})),Object.keys(n).forEach((e=>{const i=n[e],{values:r,maps:o}=i;if(r.length>1)t=t.concat(o);else{const e=o[0];o.length>1&&(e.option_id="all"),t.push(e)}})),t}(t),n.concat(t)}return[]}(s),c=c||[],u=u||[];const l=s.concat(c,u);if(l.length>0){let e;l.forEach((e=>{e.value=(0,i.Qr)(e.value)})),a&&(e=a.replacements.map((e=>e.index))),o.push({node_id:n.toLowerCase(),loop_idxs:e,var_maps:l})}})),o}},8832:(e,t,n)=>{"use strict";n.d(t,{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(e){if(!(0,s.Qr)(e.varInfo.config))return!0;const{varInfo:{option:t}}=e,n=e.varInfo.node,u=e.specifiedOpt||t,{limitType:l,limitStart:d,limitEnd:f,limitSrc:p,ignoreCase:m}=function(e,t){if(!t)return{};const{limitType:n}=t;if(n>=0)return t;const i=c[n];let r;const o=e.options.filter((e=>e.selected)).map((e=>e.number)).sort();return r=5===i||7===i?(0,a.Wo)(o[o.length-1]||0):(0,a.Wo)(o[0]||0),{...t,limitType:i,limitStart:r}}(n,e.varInfo.config),g=(0,i.KE)(u,p,e),h=Number(l),v=(0,r.uy)(h)?await(0,o.E3)(d,{...e,joinBy:","}):await(0,o.wh)(d,e),y=await(0,o.wh)(f,e);return r.IB.input(g,{markId:h,markStart:v,markEnd:y,ignoreCase:m})}},6620:(e,t,n)=>{"use strict";n.d(t,{a8:()=>a,aI:()=>s}),n(9952);var i=n(3001),r=n(8856),o=n(1820);function a(e,t){return{_LANG_:t.language,_LINK_TYPE_:(0,o.i)(),_IS_INFER_:(0,r.W4)().dev.infer?"Y":"",...e}}async function s(e,t=[],n=!0){const r={};for(const n of t){const{name:t,value:o}=n;t.startsWith("_url_")?r[t]=await(0,i.Oj)(o,{state:e}):t.startsWith("_html_")?r[t]=await(0,i.qQ)(o,{state:e},!0):r[t]=await(0,i.E3)(o,{state:e,joinBy:","},"URL")}return n?a(r,e):r}},3001:(e,t,n)=>{"use strict";n.d(t,{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(e){let t=!0;try{t=!!(0,i.y)(e,!0)}catch(t){console.info("error bool: ",e)}return t}function o(e,t,n){return function(e,t,n){return!!(t.length&&""!==n&&e&&e[e.length-1].match(/[\d)]/))}(e,t,n)&&(e+=t[t.length-1]),e+n}function a(e){return"("===e[e.length-1]&&(e+="0"),e+")"}var s=n(556),c=n(6072),u=n(3552),l=n(3080),d=n(488),f=n(9572),p=n(4072),m=n(8348),g=n(8856),h=n(2352),v=n(7404),y=n(5876),_=n(8260);function w(e){return e&&("var-html"===e.type||"var-request"===e.type||"var-loop"===e.type)}function x(e="",t=!1){if(e=(e=T(e,t)).replace(/&lt;/g,"<").replace(/&gt;/g,">"),t)for(;e.includes("&lt;")||e.includes("&gt;");)e=e.replace(/&lt;/g,"<").replace(/&gt;/g,">");return e}function b(e=""){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;")}function T(e="",t=!1){if(e=e.replace(/&amp;/g,"&"),t)for(;e.includes("&amp;");)e.replace(/&amp;/g,"&");return e}function S(e="",t,n,i,r){let o='<span var-name="'+n+'" class="var-light '+t+'"'+(i?'in-edist="1">':">")+e+"</span>";return r&&(o=(0,s.Qh)(o)),o}function E(e=""){return e.match(/<(\w+).+?<\/\1>/)||(e="<span>".concat(e,"</span>")),[...(0,d.gQ)(e).childNodes]}async function I(e="",t,n=!1){e+="";const{state:i,innerJoinBy:r,varInfo:o,usage:a}=t,c=t.spaceRep||"";e=e.replace(/&nbsp;/g,c);const u=t.joinBy||" ";if((0,d.iq)(e)){const c=(0,d.gQ)(e),f=(0,d.oB)(e,c);for(const e of f){const t=(0,d.yI)(i,e);let s="";if(t?s=await R({state:i,varInfo:t,joinBy:r||u}):(0,g.E3)().realTimePreview&&(s=S(e.innerHTML,"var-empty",e.innerText,!1,!0)),s=(0,h.oV)(s)?"":(0,h.Wo)(s).trim(),a){const n=t||{mapId:(0,d.sl)((0,d.im)(e))};(0,l.KS)(a,n,s)}const c=!o&&t&&s&&!n;let f=[];w(t)?(c&&(s=S(s,t.type,t.name,t.inEdist,!1)),f=s?E(s):[""]):(c&&(s=S(s,t.type,t.name,t.inEdist,!0)),e.innerText=s,f=[(0,g.W4)().system.newTextNode(e.innerHTML)]),k(e,f)}const p=function(e,t,n=""){if(w(t))return x(e.innerHTML);let i="";if(n){const r=[];for(const n of e.childNodes){let e="";if((0,s.is)(n,1===n.nodeType)){if("SPAN"===n.tagName&&!n.innerText&&0===n.childNodes.length)continue;e=n.outerHTML}else e=n.textContent.trim(),t||(e=b(e));e&&r.push(T(e))}i=r.join(n)}else i=T(e.innerHTML);return i=i.replace(/([\r\n]|^\s*|\s*$)/g,"").replace(/&lt;br&gt;/g,""),i=T((0,s.aO)(i)),i}(c,o,u);return L(p,t)}return e+""}function k(e,t){const n=e.parentElement;t.forEach((t=>{if("string"==typeof t){if(""!==t){const i=(0,g.W4)().system.newTextNode(t);n.insertBefore(i,e)}}else n.insertBefore(t,e)})),n.removeChild(e)}async function O(e="",t,n="WRAPPED_URL"){return L(C(await I(e,t,!0),n),t)}function C(e="",t="WRAPPED_URL"){if(!e||"string"!=typeof e)return e;e=e.replace(/<style>.*?<\/style>/g,"");let n=(0,d.gQ)(e).innerText;return n=(0,d.gQ)(n).innerText,"URL"===t&&(n=(0,f.yH)(n)),n.trim()}function L(e,t){return","===t.joinBy?(e+"").trim().replace(/(?:^\s*,|\s*,\s*,\s*|\s*,$)/,""):e}async function N(e="",t){let n=await I(e,{...t,innerJoinBy:","},!0);return n=C(x(n,!0)),n=n.replace(/####/g,"|").replace(/##/g,"").replace(/\s+/g,""),n=L(n,t),n}async function R(e){let t="";const{varInfo:n}=e;if((0,_.g)(n.identity))t=await(0,_.u)(e);else if(n.getText)t=await n.getText(e);else{const{identity:{baseId:l}}=n;if((0,d._i)(l)){const[e,n]=l.split("URL_PARAM=");t=(0,v.uK)()[n]}else n.nodePart||n.node?t=await(0,d.Ge)(e):"var-string"===n.type?t=await function(e){const{varInfo:t}=e;return t.getText?t.getText(e):I(t.value,e)}(e):"var-expression"===n.type?t=await async function(e){const t=(0,m.yy)(),{varInfo:n,state:r}=e;let s="";const c=(0,d.gQ)(n.value).childNodes,u=[];let l="";for(const e of c)if((0,d.yE)(e)){if(l){const e=parseFloat(l);if(isNaN(e))return e;s=o(s,u,e),l=""}const n=(0,d.yI)(r,e);if(n){const e=n.split;if(n.uuid===t.EXP_OP.uuid)s+="(";else if(n.uuid===t.EXP_CP.uuid)s=a(s);else if(e)s=o(s,u,n.expOpr),u.push(e);else if(n.expOpr)u.length&&(s=a(s),u.pop()),s=o(s,u,n.expOpr);else{const e=u[u.length-1];s=o(s,u,await R({state:r,varInfo:n,joinBy:e||"+"})||0)}}else l+="0"}else l+=e.textContent.replace(/\s/g,"");for(l&&(s=o(s,u,parseFloat(l)));u.length;)s=a(s),u.pop();return function(e){let t=0;try{t=(0,i.y)(e,!0)}catch(n){t=NaN,console.info("error exp: ",e)}return t}(s)}(e):"var-media"===n.type?t=await async function(e){const{varInfo:t,state:n}=e,{config:i}=t,r=e.joinBy||" ",o=(0,d.oB)(t.value),a=[];for(const e of o){const t=(0,d.yI)(n,e);if(!t)continue;const{imgHeight:o,imgWidth:s}=i;(o||s)&&(t.config={...t.config,imgHeight:o,imgWidth:s});const c=await R({state:n,varInfo:t,joinBy:r});(0,h.oV)(c)||a.push(c)}return a.join(r)}(e):"var-bool"===n.type?t=await async function(e){const{varInfo:t,state:n}=e;if(t.getBool)return t.getBool(e);const{nodePart:i,node:o}=t;if(i||o)return(0,d.aL)(e);const a=(0,d.oB)(t.value);let s="";for(const t of a){const i=(0,d.yI)(n,t);if(i)if(i.blOpr)s+=i.blOpr;else if(i.getBool)s+=r(await i.getBool(e))?"1":"0";else{const e=await R({state:n,varInfo:i});s+="string"==typeof e?"0"===e?e:e?"1":"0":r(e)?"1":"0"}}return r(s)}(e):"var-request"===n.type?t=await async function(e){const{varInfo:{request:t,config:n},state:i}=e;if(t){let e=null;if(n&&n.phParams){e={};for(const t of n.phParams)e[t.name]=await O(t.value,{state:i,joinBy:","},"URL")}const{result:r}=await(0,c.eU)({state:i,request:t,customParam:e,silent:!1});return"string"!=typeof r?r:(0,u.q)(r)}return""}(e):"var-html"===n.type&&(t=await async function(e){const{varInfo:t,state:n}=e,i=t.getText?await t.getText(e):await I(t.value,e),r=(0,u.q)(x(i));return await function(e,t,n){const i=(0,y.mE)(e);return(0,s.eg)(t,/{{{?(.+?)}}}?/g,(async(e,t)=>{const r=t.indexOf("=");let o=t,a="";r>-1&&(o=t.substring(0,r),a=t.substring(r+1));const s=i[o]||"";let c="";return s&&(c=e.startsWith("{{{")?await I(s,{state:n}):await O(s,{state:n},"URL")),c||a}))}(t.config.phParams,r,n)}(e))}return(0,d.iq)(t)&&(t=await I(t,e)),t}async function A(e="",t,n=!1){if("number"==typeof e)return e;if((0,h.oV)(e))return n?NaN:"";const i=Number(e);if(isNaN(i)){const i=await O(e,t);if((0,h.oV)(i))return n?NaN:"";const r=Number(i);return isNaN(r)?n?NaN:i:r}return i}async function P(e="",t){if("number"==typeof e)return e;const n=await A(e,t,!0);return Number(n)}async function M(e="",t,n=!1){return(0,h.oV)(e)?"":(0,s.eg)((0,h.Wo)(e),/{{(.+?)}}/g,(async(e,i)=>{let r=await async function(e,t){if(e.match(/key(?:\d+)?/))return(0,v.uK)()[e];{const n=(0,p.WK)(e,t.variables);return n?C(await R({varInfo:n,state:t,joinBy:","})):""}}(i,t);return r&&n&&(r=encodeURIComponent(r)),"".concat(r||"")}))}function W(e=""){return e.replace(/(?:^<div>|<\/div>$)/g,"")}},3040:e=>{e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},6960:(e,t,n)=>{var i=n(6840);e.exports=function(e){if(!i(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},5775:(e,t,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)}),e.exports=function(e){s[a][e]=!0}},3696:(e,t,n)=>{"use strict";var i=n(8540).charAt;e.exports=function(e,t,n){return t+(n?i(e,t).length:1)}},5968:(e,t,n)=>{var i=n(6840);e.exports=function(e){if(!i(e))throw TypeError(String(e)+" is not an object");return e}},7299:(e,t,n)=>{var i=n(2576),r=n(1688),o=n(9924),a=function(e){return function(t,n,a){var s,c=i(t),u=r(c.length),l=o(a,u);if(e&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((e||l in c)&&c[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},1452:(e,t,n)=>{"use strict";var i=n(996);e.exports=function(e,t){var n=[][e];return!!n&&i((function(){n.call(null,t||function(){throw 1},1)}))}},4916:(e,t,n)=>{var i=n(5968);e.exports=function(e,t,n,r){try{return r?t(i(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&i(o.call(e)),t}}},5996:e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},6400:(e,t,n)=>{var i=n(8928),r=n(5996),o=n(3280)("toStringTag"),a="Arguments"==r(function(){return arguments}());e.exports=i?r:function(e){var t,n,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:a?r(t):"Object"==(i=r(t))&&"function"==typeof t.callee?"Arguments":i}},1528:(e,t,n)=>{"use strict";var i=n(5968),r=n(3040);e.exports=function(){for(var e=i(this),t=r(e.add),n=0,o=arguments.length;n<o;n++)t.call(e,arguments[n]);return e}},6792:(e,t,n)=>{"use strict";var i=n(5968),r=n(3040);e.exports=function(){for(var e,t=i(this),n=r(t.delete),o=!0,a=0,s=arguments.length;a<s;a++)e=n.call(t,arguments[a]),o=o&&e;return!!o}},8580:(e,t,n)=>{var i=n(3944),r=n(3412),o=n(2456),a=n(3984);e.exports=function(e,t){for(var n=r(t),s=a.f,c=o.f,u=0;u<n.length;u++){var l=n[u];i(e,l)||s(e,l,c(t,l))}}},9700:(e,t,n)=>{var i=n(996);e.exports=!i((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},3419:(e,t,n)=>{"use strict";var i=n(7963).IteratorPrototype,r=n(5156),o=n(4848),a=n(3532),s=n(476),c=function(){return this};e.exports=function(e,t,n){var u=t+" Iterator";return e.prototype=r(i,{next:o(1,n)}),a(e,u,!1,!0),s[u]=c,e}},784:(e,t,n)=>{var i=n(376),r=n(3984),o=n(4848);e.exports=i?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},4848:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},9436:(e,t,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),m=p.IteratorPrototype,g=p.BUGGY_SAFARI_ITERATORS,h=l("iterator"),v="keys",y="values",_="entries",w=function(){return this};e.exports=function(e,t,n,l,p,x,b){r(n,t,l);var T,S,E,I=function(e){if(e===p&&N)return N;if(!g&&e in C)return C[e];switch(e){case v:case y:case _:return function(){return new n(this,e)}}return function(){return new n(this)}},k=t+" Iterator",O=!1,C=e.prototype,L=C[h]||C["@@iterator"]||p&&C[p],N=!g&&L||I(p),R="Array"==t&&C.entries||L;if(R&&(T=o(R.call(new e)),m!==Object.prototype&&T.next&&(d||o(T)===m||(a?a(T,m):"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[t]=N,p)if(S={values:I(y),keys:x?N:I(v),entries:I(_)},b)for(E in S)(g||O||!(E in C))&&u(C,E,S[E]);else i({target:t,proto:!0,forced:g||O},S);return S}},376:(e,t,n)=>{var i=n(996);e.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4111:(e,t,n)=>{var i=n(4280),r=n(6840),o=i.document,a=r(o)&&r(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},3060:e=>{e.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:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2808:(e,t,n)=>{var i=n(4280),r=n(2456).f,o=n(784),a=n(7376),s=n(1016),c=n(8580),u=n(7724);e.exports=function(e,t){var n,l,d,f,p,m=e.target,g=e.global,h=e.stat;if(n=g?i:h?i[m]||s(m,{}):(i[m]||{}).prototype)for(l in t){if(f=t[l],d=e.noTargetGet?(p=r(n,l))&&p.value:n[l],!u(g?l:m+(h?".":"#")+l,e.forced)&&void 0!==d){if(typeof f==typeof d)continue;c(f,d)}(e.sham||d&&d.sham)&&o(f,"sham",!0),a(n,l,f,e)}}},996:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},8284:(e,t,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 e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),l="$0"==="a".replace(/./,"$0"),d=o("replace"),f=!!/./[d]&&""===/./[d]("a","$0"),p=!r((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,d){var m=o(e),g=!r((function(){var t={};return t[m]=function(){return 7},7!=""[e](t)})),h=g&&!r((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[c]=function(){return n},n.flags="",n[m]=/./[m]),n.exec=function(){return t=!0,null},n[m](""),!t}));if(!g||!h||"replace"===e&&(!u||!l||f)||"split"===e&&!p){var v=/./[m],y=n(m,""[e],(function(e,t,n,i,r){return t.exec===a?g&&!r?{done:!0,value:v.call(t,n,i)}:{done:!0,value:e.call(n,t,i)}:{done:!1}}),{REPLACE_KEEPS_$0:l,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:f}),_=y[0],w=y[1];i(String.prototype,e,_),i(RegExp.prototype,m,2==t?function(e,t){return w.call(e,this,t)}:function(e){return w.call(e,this)})}d&&s(RegExp.prototype[m],"sham",!0)}},3596:(e,t,n)=>{var i=n(3040);e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,r){return e.call(t,n,i,r)}}return function(){return e.apply(t,arguments)}}},3904:(e,t,n)=>{var i=n(2328),r=n(4280),o=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?o(i[e])||o(r[e]):i[e]&&i[e][t]||r[e]&&r[e][t]}},6648:(e,t,n)=>{var i=n(6400),r=n(476),o=n(3280)("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||r[i(e)]}},460:(e,t,n)=>{var i=n(5968),r=n(6648);e.exports=function(e){var t=r(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return i(t.call(e))}},4516:(e,t,n)=>{var i=n(8820),r=n(460);e.exports=i?r:function(e){return Map.prototype.entries.call(e)}},4892:(e,t,n)=>{var i=n(8820),r=n(460);e.exports=i?r:function(e){return Set.prototype.values.call(e)}},4280:(e,t,n)=>{var i=function(e){return e&&e.Math==Math&&e};e.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:e=>{var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},1976:e=>{e.exports={}},4128:(e,t,n)=>{var i=n(3904);e.exports=i("document","documentElement")},4544:(e,t,n)=>{var i=n(376),r=n(996),o=n(4111);e.exports=!i&&!r((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},8048:(e,t,n)=>{var i=n(996),r=n(5996),o="".split;e.exports=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==r(e)?o.call(e,""):Object(e)}:Object},196:(e,t,n)=>{var i=n(7536),r=Function.toString;"function"!=typeof i.inspectSource&&(i.inspectSource=function(e){return r.call(e)}),e.exports=i.inspectSource},8264:(e,t,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 m=new p,g=m.get,h=m.has,v=m.set;i=function(e,t){return v.call(m,e,t),t},r=function(e){return g.call(m,e)||{}},o=function(e){return h.call(m,e)}}else{var y=d("state");f[y]=!0,i=function(e,t){return u(e,y,t),t},r=function(e){return l(e,y)?e[y]:{}},o=function(e){return l(e,y)}}e.exports={set:i,get:r,has:o,enforce:function(e){return o(e)?r(e):i(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=r(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},3976:(e,t,n)=>{var i=n(3280),r=n(476),o=i("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||a[o]===e)}},1444:(e,t,n)=>{var i=n(5996);e.exports=Array.isArray||function(e){return"Array"==i(e)}},7724:(e,t,n)=>{var i=n(996),r=/#|\.prototype\./,o=function(e,t){var n=s[a(e)];return n==u||n!=c&&("function"==typeof t?i(t):!!t)},a=o.normalize=function(e){return String(e).replace(r,".").toLowerCase()},s=o.data={},c=o.NATIVE="N",u=o.POLYFILL="P";e.exports=o},6840:e=>{e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},8820:e=>{e.exports=!1},596:(e,t,n)=>{var i=n(5968),r=n(3976),o=n(1688),a=n(3596),s=n(6648),c=n(4916),u=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,l,d){var f,p,m,g,h,v,y,_=a(t,n,l?2:1);if(d)f=e;else{if("function"!=typeof(p=s(e)))throw TypeError("Target is not iterable");if(r(p)){for(m=0,g=o(e.length);g>m;m++)if((h=l?_(i(y=e[m])[0],y[1]):_(e[m]))&&h instanceof u)return h;return new u(!1)}f=p.call(e)}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(e){return new u(!0,e)}},7963:(e,t,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})),e.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:f}},476:e=>{e.exports={}},5976:(e,t,n)=>{var i=n(996);e.exports=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())}))},4688:(e,t,n)=>{var i=n(4280),r=n(196),o=i.WeakMap;e.exports="function"==typeof o&&/native code/.test(r(o))},5156:(e,t,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"),m=function(){},g=function(e){return"<"+f+">"+e+"</"+f+">"},h=function(){try{i=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t,n;h=i?function(e){e.write(g("")),e.close();var t=e.parentWindow.Object;return e=null,t}(i):(t=u("iframe"),n="java"+f+":",t.style.display="none",c.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(g("document.F=Object")),e.close(),e.F);for(var r=a.length;r--;)delete h[d][a[r]];return h()};s[p]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(m[d]=r(e),n=new m,m[d]=null,n[p]=e):n=h(),void 0===t?n:o(n,t)}},6800:(e,t,n)=>{var i=n(376),r=n(3984),o=n(5968),a=n(3008);e.exports=i?Object.defineProperties:function(e,t){o(e);for(var n,i=a(t),s=i.length,c=0;s>c;)r.f(e,n=i[c++],t[n]);return e}},3984:(e,t,n)=>{var i=n(376),r=n(4544),o=n(5968),a=n(5880),s=Object.defineProperty;t.f=i?s:function(e,t,n){if(o(e),t=a(t,!0),o(n),r)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},2456:(e,t,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;t.f=i?l:function(e,t){if(e=a(e),t=s(t,!0),u)try{return l(e,t)}catch(e){}if(c(e,t))return o(!r.f.call(e,t),e[t])}},220:(e,t,n)=>{var i=n(1216),r=n(2552).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,r)}},7928:(e,t)=>{t.f=Object.getOwnPropertySymbols},5432:(e,t,n)=>{var i=n(3944),r=n(8648),o=n(7996),a=n(9700),s=o("IE_PROTO"),c=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=r(e),i(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?c:null}},1216:(e,t,n)=>{var i=n(3944),r=n(2576),o=n(7299).indexOf,a=n(1976);e.exports=function(e,t){var n,s=r(e),c=0,u=[];for(n in s)!i(a,n)&&i(s,n)&&u.push(n);for(;t.length>c;)i(s,n=t[c++])&&(~o(u,n)||u.push(n));return u}},3008:(e,t,n)=>{var i=n(1216),r=n(2552);e.exports=Object.keys||function(e){return i(e,r)}},8:(e,t)=>{"use strict";var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,r=i&&!n.call({1:2},1);t.f=r?function(e){var t=i(this,e);return!!t&&t.enumerable}:n},1640:(e,t,n)=>{var i=n(5968),r=n(6960);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,o){return i(n),r(o),t?e.call(n,o):n.__proto__=o,n}}():void 0)},3412:(e,t,n)=>{var i=n(3904),r=n(220),o=n(7928),a=n(5968);e.exports=i("Reflect","ownKeys")||function(e){var t=r.f(a(e)),n=o.f;return n?t.concat(n(e)):t}},2328:(e,t,n)=>{var i=n(4280);e.exports=i},7376:(e,t,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");(e.exports=function(e,t,n,s){var c=!!s&&!!s.unsafe,u=!!s&&!!s.enumerable,f=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof t||o(n,"name")||r(n,"name",t),l(n).source=d.join("string"==typeof t?t:"")),e!==i?(c?!f&&e[t]&&(u=!0):delete e[t],u?e[t]=n:r(e,t,n)):u?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&u(this).source||s(this)}))},9792:(e,t,n)=>{var i=n(5996),r=n(2804);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==i(e))throw TypeError("RegExp#exec called on incompatible receiver");return r.call(e,t)}},2804:(e,t,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(e){var t,n,i,r,a=this,u=d&&a.sticky,p=o.call(a),m=a.source,g=0,h=e;return u&&(-1===(p=p.replace("y","")).indexOf("g")&&(p+="g"),h=String(e).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==e[a.lastIndex-1])&&(m="(?: "+m+")",h=" "+h,g++),n=new RegExp("^(?:"+m+")",p)),f&&(n=new RegExp("^"+m+"$(?!\\s)",p)),l&&(t=a.lastIndex),i=s.call(u?n:a,h),u?i?(i.input=i.input.slice(g),i[0]=i[0].slice(g),i.index=a.lastIndex,a.lastIndex+=i[0].length):a.lastIndex=0:l&&i&&(a.lastIndex=a.global?i.index+i[0].length:t),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}),e.exports=u},736:(e,t,n)=>{"use strict";var i=n(5968);e.exports=function(){var e=i(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},8288:(e,t,n)=>{"use strict";var i=n(996);function r(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=i((function(){var e=r("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=i((function(){var e=r("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},1952:e=>{e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},4004:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},1016:(e,t,n)=>{var i=n(4280),r=n(784);e.exports=function(e,t){try{r(i,e,t)}catch(n){i[e]=t}return t}},3532:(e,t,n)=>{var i=n(3984).f,r=n(3944),o=n(3280)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,o)&&i(e,o,{configurable:!0,value:t})}},7996:(e,t,n)=>{var i=n(9364),r=n(1732),o=i("keys");e.exports=function(e){return o[e]||(o[e]=r(e))}},7536:(e,t,n)=>{var i=n(4280),r=n(1016),o="__core-js_shared__",a=i[o]||r(o,{});e.exports=a},9364:(e,t,n)=>{var i=n(8820),r=n(7536);(e.exports=function(e,t){return r[e]||(r[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:i?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},592:(e,t,n)=>{var i=n(5968),r=n(3040),o=n(3280)("species");e.exports=function(e,t){var n,a=i(e).constructor;return void 0===a||null==(n=i(a)[o])?t:r(n)}},8540:(e,t,n)=>{var i=n(3509),r=n(1952),o=function(e){return function(t,n){var o,a,s=String(r(t)),c=i(n),u=s.length;return c<0||c>=u?e?"":void 0:(o=s.charCodeAt(c))<55296||o>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?e?s.charAt(c):o:e?s.slice(c,c+2):a-56320+(o-55296<<10)+65536}};e.exports={codeAt:o(!1),charAt:o(!0)}},9616:(e,t,n)=>{var i=n(996),r=n(2308);e.exports=function(e){return i((function(){return!!r[e]()||"​…᠎"!="​…᠎"[e]()||r[e].name!==e}))}},6452:(e,t,n)=>{var i=n(1952),r="["+n(2308)+"]",o=RegExp("^"+r+r+"*"),a=RegExp(r+r+"*$"),s=function(e){return function(t){var n=String(i(t));return 1&e&&(n=n.replace(o,"")),2&e&&(n=n.replace(a,"")),n}};e.exports={start:s(1),end:s(2),trim:s(3)}},9924:(e,t,n)=>{var i=n(3509),r=Math.max,o=Math.min;e.exports=function(e,t){var n=i(e);return n<0?r(n+t,0):o(n,t)}},2576:(e,t,n)=>{var i=n(8048),r=n(1952);e.exports=function(e){return i(r(e))}},3509:e=>{var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:t)(e)}},1688:(e,t,n)=>{var i=n(3509),r=Math.min;e.exports=function(e){return e>0?r(i(e),9007199254740991):0}},8648:(e,t,n)=>{var i=n(1952);e.exports=function(e){return Object(i(e))}},5880:(e,t,n)=>{var i=n(6840);e.exports=function(e,t){if(!i(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!i(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},8928:(e,t,n)=>{var i={};i[n(3280)("toStringTag")]="z",e.exports="[object z]"===String(i)},1732:e=>{var t=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++t+n).toString(36)}},5112:(e,t,n)=>{var i=n(5976);e.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3280:(e,t,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;e.exports=function(e){return o(u,e)||(s&&o(l,e)?u[e]=l[e]:u[e]=d("Symbol."+e)),u[e]}},2308:e=>{e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},3224:(e,t,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);e.exports=s(Array,"Array",(function(e,t){u(this,{type:c,target:i(e),index:0,kind:t})}),(function(){var e=l(this),t=e.target,n=e.kind,i=e.index++;return!t||i>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:i,done:!1}:"values"==n?{value:t[i],done:!1}:{value:[i,t[i]],done:!1}}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},2048:(e,t,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:(e,t,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(e){return void 0===e?u.call(o(this)):u.call(o(this),r(e))}})},4016:(e,t,n)=>{"use strict";var i=n(2808),r=n(2804);i({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},7768:(e,t,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,m=/\$([$&'`]|\d\d?|<[^>]*>)/g,g=/\$([$&'`]|\d\d?)/g;i("replace",2,(function(e,t,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[e];return void 0!==o?o.call(n,r,i):t.call(String(r),n,i)},function(e,i){if(!h&&v||"string"==typeof i&&-1===i.indexOf(y)){var o=n(t,e,this,i);if(o.done)return o.value}var c=r(e),p=String(this),m="function"==typeof i;m||(i=String(i));var g=c.global;if(g){var w=c.unicode;c.lastIndex=0}for(var x=[];;){var b=l(c,p);if(null===b)break;if(x.push(b),!g)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(m){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 _(e,n,i,r,a,s){var c=i+e.length,u=r.length,l=g;return void 0!==a&&(a=o(a),l=m),t.call(s,l,(function(t,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return e;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 t;if(l>u){var d=p(l/10);return 0===d?t:d<=u?void 0===r[d-1]?o.charAt(1):r[d-1]+o.charAt(1):t}s=r[l-1]}return void 0===s?"":s}))}}))},9624:(e,t,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:(e,t,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 e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof f?new l(e):void 0===e?l():l(e);return""===e&&(d[t]=!0),t};u(f,l);var p=f.prototype=l.prototype;p.constructor=f;var m=p.toString,g="Symbol(test)"==String(l("test")),h=/^Symbol\((.*)\)[^)]+$/;c(p,"description",{configurable:!0,get:function(){var e=s(this)?this.valueOf():this,t=m.call(e);if(a(d,e))return"";var n=g?t.slice(7,-1):t.replace(h,"$1");return""===n?void 0:n}}),i({global:!0,forced:!0},{Symbol:f})}},3656:(e,t,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:(e,t,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(e){var t=o(this),n=s(t),i=a(e,arguments.length>1?arguments[1]:void 0,3);return!c(n,(function(e,n){if(!i(n,e,t))return c.stop()}),void 0,!0,!0).stopped}})},9896:(e,t,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(e){var t=a(this),n=l(t),i=c(e,arguments.length>1?arguments[1]:void 0,3),r=new(u(t,o("Map"))),f=s(r.set);return d(n,(function(e,n){i(n,e,t)&&f.call(r,e,n)}),void 0,!0,!0),r}})},8252:(e,t,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(e){var t=o(this),n=s(t),i=a(e,arguments.length>1?arguments[1]:void 0,3);return c(n,(function(e,n){if(i(n,e,t))return c.stop(e)}),void 0,!0,!0).result}})},6832:(e,t,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(e){var t=o(this),n=s(t),i=a(e,arguments.length>1?arguments[1]:void 0,3);return c(n,(function(e,n){if(i(n,e,t))return c.stop(n)}),void 0,!0,!0).result}})},7240:(e,t,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(e){return c(a(o(this)),(function(t,n){if(s(n,e))return c.stop()}),void 0,!0,!0).stopped}})},2288:(e,t,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(e){return s(a(o(this)),(function(t,n){if(n===e)return s.stop(t)}),void 0,!0,!0).result}})},5396:(e,t,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(e){var t=a(this),n=l(t),i=c(e,arguments.length>1?arguments[1]:void 0,3),r=new(u(t,o("Map"))),f=s(r.set);return d(n,(function(e,n){f.call(r,i(n,e,t),n)}),void 0,!0,!0),r}})},2480:(e,t,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(e){var t=a(this),n=l(t),i=c(e,arguments.length>1?arguments[1]:void 0,3),r=new(u(t,o("Map"))),f=s(r.set);return d(n,(function(e,n){f.call(r,e,i(n,e,t))}),void 0,!0,!0),r}})},7190:(e,t,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(e){for(var t=o(this),n=a(t.set),i=0;i<arguments.length;)s(arguments[i++],n,t,!0);return t}})},5036:(e,t,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(e){var t=o(this),n=s(t),i=arguments.length<2,r=i?void 0:arguments[1];if(a(e),c(n,(function(n,o){i?(i=!1,r=o):r=e(r,o,n,t)}),void 0,!0,!0),i)throw TypeError("Reduce of empty map with no initial value");return r}})},4736:(e,t,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(e){var t=o(this),n=s(t),i=a(e,arguments.length>1?arguments[1]:void 0,3);return c(n,(function(e,n){if(i(n,e,t))return c.stop()}),void 0,!0,!0).stopped}})},2520:(e,t,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(e,t){var n=o(this),i=arguments.length;a(t);var r=n.has(e);if(!r&&i<3)throw TypeError("Updating absent value");var s=r?n.get(e):a(i>2?arguments[2]:void 0)(e,n);return n.set(e,t(s,e,n)),n}})},9328:(e,t,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:(e,t,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:(e,t,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(e){var t=a(this),n=new(c(t,o("Set")))(t),i=s(n.delete);return u(e,(function(e){i.call(n,e)})),n}})},9708:(e,t,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(e){var t=o(this),n=s(t),i=a(e,arguments.length>1?arguments[1]:void 0,3);return!c(n,(function(e){if(!i(e,e,t))return c.stop()}),void 0,!1,!0).stopped}})},7976:(e,t,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(e){var t=a(this),n=l(t),i=c(e,arguments.length>1?arguments[1]:void 0,3),r=new(u(t,o("Set"))),f=s(r.add);return d(n,(function(e){i(e,e,t)&&f.call(r,e)}),void 0,!1,!0),r}})},5600:(e,t,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(e){var t=o(this),n=s(t),i=a(e,arguments.length>1?arguments[1]:void 0,3);return c(n,(function(e){if(i(e,e,t))return c.stop(e)}),void 0,!1,!0).result}})},7452:(e,t,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(e){var t=a(this),n=new(c(t,o("Set"))),i=s(t.has),r=s(n.add);return u(e,(function(e){i.call(t,e)&&r.call(n,e)})),n}})},8636:(e,t,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(e){var t=o(this),n=a(t.has);return!s(e,(function(e){if(!0===n.call(t,e))return s.stop()})).stopped}})},1524:(e,t,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(e){var t=c(this),n=a(e),i=n.has;return"function"!=typeof i&&(n=new(o("Set"))(e),i=s(n.has)),!u(t,(function(e){if(!1===i.call(n,e))return u.stop()}),void 0,!1,!0).stopped}})},8836:(e,t,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(e){var t=o(this),n=a(t.has);return!s(e,(function(e){if(!1===n.call(t,e))return s.stop()})).stopped}})},5040:(e,t,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(e){var t=o(this),n=a(t),i=void 0===e?",":String(e),r=[];return s(n,r.push,r,!1,!0),r.join(i)}})},1728:(e,t,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(e){var t=a(this),n=l(t),i=c(e,arguments.length>1?arguments[1]:void 0,3),r=new(u(t,o("Set"))),f=s(r.add);return d(n,(function(e){f.call(r,i(e,e,t))}),void 0,!1,!0),r}})},80:(e,t,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(e){var t=o(this),n=s(t),i=arguments.length<2,r=i?void 0:arguments[1];if(a(e),c(n,(function(n){i?(i=!1,r=n):r=e(r,n,n,t)}),void 0,!1,!0),i)throw TypeError("Reduce of empty set with no initial value");return r}})},1124:(e,t,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(e){var t=o(this),n=s(t),i=a(e,arguments.length>1?arguments[1]:void 0,3);return c(n,(function(e){if(i(e,e,t))return c.stop()}),void 0,!1,!0).stopped}})},9600:(e,t,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(e){var t=a(this),n=new(c(t,o("Set")))(t),i=s(n.delete),r=s(n.add);return u(e,(function(e){i.call(n,e)||r.call(n,e)})),n}})},8932:(e,t,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(e){var t=a(this),n=new(c(t,o("Set")))(t);return u(e,s(n.add),n),n}})},6056:(e,t,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:(e,t,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(e){p[c]=l}if(p[u]||a(p,u,d),r[d])for(var m in o)if(p[m]!==o[m])try{a(p,m,o[m])}catch(e){p[m]=o[m]}}}},512:function(e,t,n){"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g&&n.g,e.exports=function(){"use strict";var e,t="3.7.2",n=t,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=(e={},c.forEach((function(t,n){return e[t]=n})),e),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(e,t){return void 0===t&&(t=function(e){return e}),new Uint8Array(Array.prototype.slice.call(e,0).map(t))},p=function(e){return e.replace(/=/g,"").replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"}))},m=function(e){return e.replace(/[^A-Za-z0-9\+\/]/g,"")},g=function(e){for(var t,n,i,r,o="",a=e.length%3,s=0;s<e.length;){if((n=e.charCodeAt(s++))>255||(i=e.charCodeAt(s++))>255||(r=e.charCodeAt(s++))>255)throw new TypeError("invalid character found");o+=c[(t=n<<16|i<<8|r)>>18&63]+c[t>>12&63]+c[t>>6&63]+c[63&t]}return a?o.slice(0,a-3)+"===".substring(a):o},h=r?function(e){return btoa(e)}:o?function(e){return Buffer.from(e,"binary").toString("base64")}:g,v=o?function(e){return Buffer.from(e).toString("base64")}:function(e){for(var t=[],n=0,i=e.length;n<i;n+=4096)t.push(d.apply(null,e.subarray(n,n+4096)));return h(t.join(""))},y=function(e,t){return void 0===t&&(t=!1),t?p(v(e)):v(e)},_=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?d(192|t>>>6)+d(128|63&t):d(224|t>>>12&15)+d(128|t>>>6&63)+d(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return d(240|t>>>18&7)+d(128|t>>>12&63)+d(128|t>>>6&63)+d(128|63&t)},w=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,x=function(e){return e.replace(w,_)},b=o?function(e){return Buffer.from(e,"utf8").toString("base64")}:s?function(e){return v(s.encode(e))}:function(e){return h(x(e))},T=function(e,t){return void 0===t&&(t=!1),t?p(b(e)):b(e)},S=function(e){return T(e,!0)},E=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,I=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return d(55296+(t>>>10))+d(56320+(1023&t));case 3:return d((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return d((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},k=function(e){return e.replace(E,I)},O=function(e){if(e=e.replace(/\s+/g,""),!l.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));for(var t,n,i,r="",o=0;o<e.length;)t=u[e.charAt(o++)]<<18|u[e.charAt(o++)]<<12|(n=u[e.charAt(o++)])<<6|(i=u[e.charAt(o++)]),r+=64===n?d(t>>16&255):64===i?d(t>>16&255,t>>8&255):d(t>>16&255,t>>8&255,255&t);return r},C=i?function(e){return atob(m(e))}:o?function(e){return Buffer.from(e,"base64").toString("binary")}:O,L=o?function(e){return f(Buffer.from(e,"base64"))}:function(e){return f(C(e),(function(e){return e.charCodeAt(0)}))},N=function(e){return L(A(e))},R=o?function(e){return Buffer.from(e,"base64").toString("utf8")}:a?function(e){return a.decode(L(e))}:function(e){return k(C(e))},A=function(e){return m(e.replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})))},P=function(e){return R(A(e))},M=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}},W=function(){var e=function(e,t){return Object.defineProperty(String.prototype,e,M(t))};e("fromBase64",(function(){return P(this)})),e("toBase64",(function(e){return T(this,e)})),e("toBase64URI",(function(){return T(this,!0)})),e("toBase64URL",(function(){return T(this,!0)})),e("toUint8Array",(function(){return N(this)}))},U=function(){var e=function(e,t){return Object.defineProperty(Uint8Array.prototype,e,M(t))};e("toBase64",(function(e){return y(this,e)})),e("toBase64URI",(function(){return y(this,!0)})),e("toBase64URL",(function(){return y(this,!0)}))},G={version:t,VERSION:n,atob:C,atobPolyfill:O,btoa:h,btoaPolyfill:g,fromBase64:P,toBase64:T,encode:T,encodeURI:S,encodeURL:S,utob:x,btou:k,decode:P,isValid:function(e){if("string"!=typeof e)return!1;var t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:y,toUint8Array:N,extendString:W,extendUint8Array:U,extendBuiltins:function(){W(),U()},Base64:{}};return Object.keys(G).forEach((function(e){return G.Base64[e]=G[e]})),G}()},3548:(e,t,n)=>{"use strict";var i={};(0,n(12).assign)(i,n(3400),n(7888),n(944)),e.exports=i},3400:(e,t,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(e){if(!(this instanceof p))return new p(e);this.options=r.assign({level:l,method:f,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.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,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==u)throw new Error(a[n]);if(t.header&&i.deflateSetHeader(this.strm,t.header),t.dictionary){var m;if(m="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(n=i.deflateSetDictionary(this.strm,m))!==u)throw new Error(a[n]);this._dict_set=!0}}function m(e,t){var n=new p(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}p.prototype.push=function(e,t){var n,a,s=this.strm,l=this.options.chunkSize;if(this.ended)return!1;a=t===~~t?t:!0===t?4:0,"string"==typeof e?s.input=o.string2buf(e):"[object ArrayBuffer]"===c.call(e)?s.input=new Uint8Array(e):s.input=e,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(e){this.chunks.push(e)},p.prototype.onEnd=function(e){e===u&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=p,t.deflate=m,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,m(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,m(e,t)}},7888:(e,t,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(e){if(!(this instanceof d))return new d(e);this.options=r.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.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,t.windowBits);if(n!==a.Z_OK)throw new Error(s[n]);this.header=new u,i.inflateGetHeader(this.strm,this.header)}function f(e,t){var n=new d(t);if(n.push(e,!0),n.err)throw n.msg||s[n.err];return n.result}d.prototype.push=function(e,t){var n,s,c,u,d,f,p=this.strm,m=this.options.chunkSize,g=this.options.dictionary,h=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?p.input=o.binstring2buf(e):"[object ArrayBuffer]"===l.call(e)?p.input=new Uint8Array(e):p.input=e,p.next_in=0,p.avail_in=p.input.length;do{if(0===p.avail_out&&(p.output=new r.Buf8(m),p.next_out=0,p.avail_out=m),(n=i.inflate(p,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&g&&(f="string"==typeof g?o.string2buf(g):"[object ArrayBuffer]"===l.call(g)?new Uint8Array(g):g,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=m-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(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=d,t.inflate=f,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,f(e,t)},t.ungzip=f},12:(e,t)=>{"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var r in n)i(n,r)&&(e[r]=n[r])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var r={arraySet:function(e,t,n,i,r){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+i),r);else for(var o=0;o<i;o++)e[r+o]=t[n+o]},flattenChunks:function(e){var t,n,i,r,o,a;for(i=0,t=0,n=e.length;t<n;t++)i+=e[t].length;for(a=new Uint8Array(i),r=0,t=0,n=e.length;t<n;t++)o=e[t],a.set(o,r),r+=o.length;return a}},o={arraySet:function(e,t,n,i,r){for(var o=0;o<i;o++)e[r+o]=t[n+o]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,r)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,o))},t.setTyped(n)},3352:(e,t,n)=>{"use strict";var i=n(12),r=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(e){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){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(e,t){if(t<65537&&(e.subarray&&o||!e.subarray&&r))return String.fromCharCode.apply(null,i.shrinkBuf(e,t));for(var n="",a=0;a<t;a++)n+=String.fromCharCode(e[a]);return n}a[254]=a[254]=1,t.string2buf=function(e){var t,n,r,o,a,s=e.length,c=0;for(o=0;o<s;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),c+=n<128?1:n<2048?2:n<65536?3:4;for(t=new i.Buf8(c),a=0,o=0;a<c;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},t.buf2binstring=function(e){return c(e,e.length)},t.binstring2buf=function(e){for(var t=new i.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t},t.buf2string=function(e,t){var n,i,r,o,s=t||e.length,u=new Array(2*s);for(i=0,n=0;n<s;)if((r=e[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&e[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)},t.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}},2696:e=>{"use strict";e.exports=function(e,t,n,i){for(var r=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{o=o+(r=r+t[i++]|0)|0}while(--a);r%=65521,o%=65521}return r|o<<16|0}},944:e=>{"use strict";e.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:e=>{"use strict";var t=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();e.exports=function(e,n,i,r){var o=t,a=r+i;e^=-1;for(var s=r;s<a;s++)e=e>>>8^o[255&(e^n[s])];return-1^e}},9379:(e,t,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,m=286,g=30,h=19,v=2*m+1,y=15,_=3,w=258,x=w+_+1,b=42,T=103,S=113,E=666;function I(e,t){return e.msg=c[t],t}function k(e){return(e<<1)-(e>4?9:0)}function O(e){for(var t=e.length;--t>=0;)e[t]=0}function C(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(r.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function L(e,t){o._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,C(e.strm)}function N(e,t){e.pending_buf[e.pending++]=t}function R(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function A(e,t){var n,i,r=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-x?e.strstart-(e.w_size-x):0,u=e.window,l=e.w_mask,d=e.prev,f=e.strstart+w,p=u[o+a-1],m=u[o+a];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do{if(u[(n=t)+a]===m&&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(e.match_start=t,a=i,i>=s)break;p=u[o+a-1],m=u[o+a]}}}while((t=d[t&l])>c&&0!=--r);return a<=e.lookahead?a:e.lookahead}function P(e){var t,n,i,o,c,u,l,d,f,p,m=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-x)){r.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;do{i=e.head[--t],e.head[t]=i>=m?i-m:0}while(--n);t=n=m;do{i=e.prev[--t],e.prev[t]=i>=m?i-m:0}while(--n);o+=m}if(0===e.strm.avail_in)break;if(u=e.strm,l=e.window,d=e.strstart+e.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),e.lookahead+=n,e.lookahead+e.insert>=_)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+_-1])&e.hash_mask,e.prev[c&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=c,c++,e.insert--,!(e.lookahead+e.insert<_)););}while(e.lookahead<x&&0!==e.strm.avail_in)}function M(e,t){for(var n,i;;){if(e.lookahead<x){if(P(e),e.lookahead<x&&t===u)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=_&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+_-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-x&&(e.match_length=A(e,n)),e.match_length>=_)if(i=o._tr_tally(e,e.strstart-e.match_start,e.match_length-_),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=_){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+_-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else i=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(L(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<_-1?e.strstart:_-1,4===t?(L(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(L(e,!1),0===e.strm.avail_out)?1:2}function W(e,t){for(var n,i,r;;){if(e.lookahead<x){if(P(e),e.lookahead<x&&t===u)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=_&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+_-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=_-1,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-x&&(e.match_length=A(e,n),e.match_length<=5&&(1===e.strategy||e.match_length===_&&e.strstart-e.match_start>4096)&&(e.match_length=_-1)),e.prev_length>=_&&e.match_length<=e.prev_length){r=e.strstart+e.lookahead-_,i=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-_),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=r&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+_-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=_-1,e.strstart++,i&&(L(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((i=o._tr_tally(e,0,e.window[e.strstart-1]))&&L(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=o._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<_-1?e.strstart:_-1,4===t?(L(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(L(e,!1),0===e.strm.avail_out)?1:2}function U(e,t,n,i,r){this.good_length=e,this.max_lazy=t,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*g+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*m+1),O(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new r.Buf16(2*m+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(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=f,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?b:S,e.adler=2===t.wrap?0:1,t.last_flush=u,o._tr_init(t),l):I(e,d)}function B(e){var t,n=D(e);return n===l&&((t=e.state).window_size=2*t.w_size,O(t.head),t.max_lazy_match=i[t.level].max_lazy,t.good_match=i[t.level].good_length,t.nice_match=i[t.level].nice_length,t.max_chain_length=i[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=_-1,t.match_available=0,t.ins_h=0),n}function q(e,t,n,i,o,a){if(!e)return d;var s=1;if(-1===t&&(t=6),i<0?(s=0,i=-i):i>15&&(s=2,i-=16),o<1||o>9||n!==p||i<8||i>15||t<0||t>9||a<0||a>4)return I(e,d);8===i&&(i=9);var c=new G;return e.state=c,c.strm=e,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=t,c.strategy=a,c.method=n,B(e)}i=[new U(0,0,0,0,(function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(P(e),0===e.lookahead&&t===u)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+n;if((0===e.strstart||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,L(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-x&&(L(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(L(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(L(e,!1),e.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)],t.deflateInit=function(e,t){return q(e,t,p,15,8,0)},t.deflateInit2=q,t.deflateReset=B,t.deflateResetKeep=D,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?d:(e.state.gzhead=t,l):d},t.deflate=function(e,t){var n,r,a,c;if(!e||!e.state||t>5||t<0)return e?I(e,d):d;if(r=e.state,!e.output||!e.input&&0!==e.avail_in||r.status===E&&4!==t)return I(e,0===e.avail_out?-5:d);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===b)if(2===r.wrap)e.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&&(e.adler=s(e.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,e.adler>>>16),R(r,65535&e.adler)),e.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&&(e.adler=s(e.adler,r.pending_buf,r.pending-a,a)),C(e),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&&(e.adler=s(e.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&&(e.adler=s(e.adler,r.pending_buf,r.pending-a,a)),C(e),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&&(e.adler=s(e.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&&(e.adler=s(e.adler,r.pending_buf,r.pending-a,a)),C(e),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&&(e.adler=s(e.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(e),r.pending+2<=r.pending_buf_size&&(N(r,255&e.adler),N(r,e.adler>>8&255),e.adler=0,r.status=S)):r.status=S),0!==r.pending){if(C(e),0===e.avail_out)return r.last_flush=-1,l}else if(0===e.avail_in&&k(t)<=k(n)&&4!==t)return I(e,-5);if(r.status===E&&0!==e.avail_in)return I(e,-5);if(0!==e.avail_in||0!==r.lookahead||t!==u&&r.status!==E){var m=2===r.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(P(e),0===e.lookahead)){if(t===u)return 1;break}if(e.match_length=0,n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(L(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(L(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(L(e,!1),0===e.strm.avail_out)?1:2}(r,t):3===r.strategy?function(e,t){for(var n,i,r,a,s=e.window;;){if(e.lookahead<=w){if(P(e),e.lookahead<=w&&t===u)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=_&&e.strstart>0&&(i=s[r=e.strstart-1])===s[++r]&&i===s[++r]&&i===s[++r]){a=e.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);e.match_length=w-(a-r),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=_?(n=o._tr_tally(e,1,e.match_length-_),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(L(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(L(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(L(e,!1),0===e.strm.avail_out)?1:2}(r,t):i[r.level].func(r,t);if(3!==m&&4!==m||(r.status=E),1===m||3===m)return 0===e.avail_out&&(r.last_flush=-1),l;if(2===m&&(1===t?o._tr_align(r):5!==t&&(o._tr_stored_block(r,0,0,!1),3===t&&(O(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),C(e),0===e.avail_out))return r.last_flush=-1,l}return 4!==t?l:r.wrap<=0?1:(2===r.wrap?(N(r,255&e.adler),N(r,e.adler>>8&255),N(r,e.adler>>16&255),N(r,e.adler>>24&255),N(r,255&e.total_in),N(r,e.total_in>>8&255),N(r,e.total_in>>16&255),N(r,e.total_in>>24&255)):(R(r,e.adler>>>16),R(r,65535&e.adler)),C(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?l:1)},t.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==b&&69!==t&&73!==t&&91!==t&&t!==T&&t!==S&&t!==E?I(e,d):(e.state=null,t===S?I(e,-3):l):d},t.deflateSetDictionary=function(e,t){var n,i,o,s,c,u,f,p,m=t.length;if(!e||!e.state)return d;if(2===(s=(n=e.state).wrap)||1===s&&n.status!==b||n.lookahead)return d;for(1===s&&(e.adler=a(e.adler,t,m,0)),n.wrap=0,m>=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,t,m-n.w_size,n.w_size,0),t=p,m=n.w_size),c=e.avail_in,u=e.next_in,f=e.input,e.avail_in=m,e.next_in=0,e.input=t,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,e.next_in=u,e.input=f,e.avail_in=c,n.wrap=s,l},t.deflateInfo="pako deflate (from Nodeca project)"},1112:e=>{"use strict";e.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:e=>{"use strict";e.exports=function(e,t){var n,i,r,o,a,s,c,u,l,d,f,p,m,g,h,v,y,_,w,x,b,T,S,E,I;n=e.state,i=e.next_in,E=e.input,r=i+(e.avail_in-5),o=e.next_out,I=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),c=n.dmax,u=n.wsize,l=n.whave,d=n.wnext,f=n.window,p=n.hold,m=n.bits,g=n.lencode,h=n.distcode,v=(1<<n.lenbits)-1,y=(1<<n.distbits)-1;e:do{m<15&&(p+=E[i++]<<m,m+=8,p+=E[i++]<<m,m+=8),_=g[p&v];t:for(;;){if(p>>>=w=_>>>24,m-=w,0==(w=_>>>16&255))I[o++]=65535&_;else{if(!(16&w)){if(0==(64&w)){_=g[(65535&_)+(p&(1<<w)-1)];continue t}if(32&w){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}x=65535&_,(w&=15)&&(m<w&&(p+=E[i++]<<m,m+=8),x+=p&(1<<w)-1,p>>>=w,m-=w),m<15&&(p+=E[i++]<<m,m+=8,p+=E[i++]<<m,m+=8),_=h[p&y];n:for(;;){if(p>>>=w=_>>>24,m-=w,!(16&(w=_>>>16&255))){if(0==(64&w)){_=h[(65535&_)+(p&(1<<w)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(b=65535&_,m<(w&=15)&&(p+=E[i++]<<m,(m+=8)<w&&(p+=E[i++]<<m,m+=8)),(b+=p&(1<<w)-1)>c){e.msg="invalid distance too far back",n.mode=30;break e}if(p>>>=w,m-=w,b>(w=o-a)){if((w=b-w)>l&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}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=m>>3,p&=(1<<(m-=x<<3))-1,e.next_in=i,e.next_out=o,e.avail_in=i<r?r-i+5:5-(i-r),e.avail_out=o<s?s-o+257:257-(o-s),n.hold=p,n.bits=m}},7040:(e,t,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,m=592;function g(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<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(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=l,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new i.Buf32(p),t.distcode=t.distdyn=new i.Buf32(m),t.sane=1,t.back=-1,c):u}function y(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,v(e)):u}function _(e,t){var n,i;return e&&e.state?(i=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?u:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=n,i.wbits=t,y(e))):u}function w(e,t){var n,i;return e?(i=new h,e.state=i,i.window=null,(n=_(e,t))!==c&&(e.state=null),n):u}var x,b,T=!0;function S(e){if(T){var t;for(x=new i.Buf32(512),b=new i.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,x,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,b,0,e.work,{bits:5}),T=!1}e.lencode=x,e.lenbits=9,e.distcode=b,e.distbits=5}function E(e,t,n,r){var o,a=e.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,t,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,t,n-r,o,a.wnext),(r-=o)?(i.arraySet(a.window,t,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}t.inflateReset=y,t.inflateReset2=_,t.inflateResetKeep=v,t.inflateInit=function(e){return w(e,15)},t.inflateInit2=w,t.inflate=function(e,t){var n,p,m,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),q=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return u;(n=e.state).mode===d&&(n.mode=13),v=e.next_out,m=e.output,_=e.avail_out,h=e.next_in,p=e.input,y=e.avail_in,w=n.hold,x=n.bits,b=y,T=_,W=c;e:for(;;)switch(n.mode){case l:if(0===n.wrap){n.mode=13;break}for(;x<16;){if(0===y)break e;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){e.msg="incorrect header check",n.mode=f;break}if(8!=(15&w)){e.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){e.msg="invalid window size",n.mode=f;break}n.dmax=1<<M,e.adler=n.check=1,n.mode=512&w?10:d,w=0,x=0;break;case 2:for(;x<16;){if(0===y)break e;y--,w+=p[h++]<<x,x+=8}if(n.flags=w,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=f;break}if(57344&n.flags){e.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 e;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 e;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 e;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 e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===y)break e;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 e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===y)break e;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 e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;x<16;){if(0===y)break e;y--,w+=p[h++]<<x,x+=8}if(w!==(65535&n.check)){e.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),e.adler=n.check=0,n.mode=d;break;case 10:for(;x<32;){if(0===y)break e;y--,w+=p[h++]<<x,x+=8}e.adler=n.check=g(w),w=0,x=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=v,e.avail_out=_,e.next_in=h,e.avail_in=y,n.hold=w,n.bits=x,2;e.adler=n.check=1,n.mode=d;case d:if(5===t||6===t)break e;case 13:if(n.last){w>>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(0===y)break e;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===t){w>>>=2,x-=2;break e}break;case 2:n.mode=17;break;case 3:e.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 e;y--,w+=p[h++]<<x,x+=8}if((65535&w)!=(w>>>16^65535)){e.msg="invalid stored block lengths",n.mode=f;break}if(n.length=65535&w,w=0,x=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(I=n.length){if(I>y&&(I=y),I>_&&(I=_),0===I)break e;i.arraySet(m,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 e;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){e.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 e;y--,w+=p[h++]<<x,x+=8}n.lens[q[n.have++]]=7&w,w>>>=3,x-=3}for(;n.have<19;)n.lens[q[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){e.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 e;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 e;y--,w+=p[h++]<<x,x+=8}if(w>>>=C,x-=C,0===n.have){e.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 e;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 e;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){e.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]){e.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){e.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){e.msg="invalid distances set",n.mode=f;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(y>=6&&_>=258){e.next_out=v,e.avail_out=_,e.next_in=h,e.avail_in=y,n.hold=w,n.bits=x,a(e,T),v=e.next_out,m=e.output,_=e.avail_out,h=e.next_in,p=e.input,y=e.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 e;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 e;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){e.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 e;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 e;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 e;y--,w+=p[h++]<<x,x+=8}w>>>=R,x-=R,n.back+=R}if(w>>>=C,x-=C,n.back+=C,64&L){e.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 e;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){e.msg="invalid distance too far back",n.mode=f;break}n.mode=25;case 25:if(0===_)break e;if(I=T-_,n.offset>I){if((I=n.offset-I)>n.whave&&n.sane){e.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=m,k=v-n.offset,I=n.length;I>_&&(I=_),_-=I,n.length-=I;do{m[v++]=O[k++]}while(--I);0===n.length&&(n.mode=21);break;case 26:if(0===_)break e;m[v++]=n.length,_--,n.mode=21;break;case 27:if(n.wrap){for(;x<32;){if(0===y)break e;y--,w|=p[h++]<<x,x+=8}if(T-=_,e.total_out+=T,n.total+=T,T&&(e.adler=n.check=n.flags?o(n.check,m,T,v-T):r(n.check,m,T,v-T)),T=_,(n.flags?w:g(w))!==n.check){e.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 e;y--,w+=p[h++]<<x,x+=8}if(w!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=f;break}w=0,x=0}n.mode=29;case 29:W=1;break e;case f:W=-3;break e;case 31:return-4;default:return u}return e.next_out=v,e.avail_out=_,e.next_in=h,e.avail_in=y,n.hold=w,n.bits=x,(n.wsize||T!==e.avail_out&&n.mode<f&&(n.mode<27||4!==t))&&E(e,e.output,e.next_out,T-e.avail_out)?(n.mode=31,-4):(b-=e.avail_in,T-=e.avail_out,e.total_in+=b,e.total_out+=T,n.total+=T,n.wrap&&T&&(e.adler=n.check=n.flags?o(n.check,m,T,e.next_out-T):r(n.check,m,T,e.next_out-T)),e.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===t)&&W===c&&(W=-5),W)},t.inflateEnd=function(e){if(!e||!e.state)return u;var t=e.state;return t.window&&(t.window=null),e.state=null,c},t.inflateGetHeader=function(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?u:(n.head=t,t.done=!1,c):u},t.inflateSetDictionary=function(e,t){var n,i=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?u:11===n.mode&&r(1,t,i,0)!==n.check?-3:E(e,t,i,i)?(n.mode=31,-4):(n.havedict=1,c):u},t.inflateInfo="pako inflate (from Nodeca project)"},6120:(e,t,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];e.exports=function(e,t,n,c,u,l,d,f){var p,m,g,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[t[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===e||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!==t[n+S]&&(d[W[t[n+S]]++]=S);if(0===e?(A=U=d,y=19):1===e?(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,g=-1,h=(N=1<<k)-1,1===e&&N>852||2===e&&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=m=1<<O;do{u[v+(R>>C)+(m-=p)]=_<<24|w<<16|x|0}while(0!==m);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=t[n+d[S]]}if(T>k&&(R&h)!==g){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===e&&N>852||2===e&&N>592)return 1;u[g=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:e=>{"use strict";e.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:(e,t,n)=>{"use strict";var i=n(12);function r(e){for(var t=e.length;--t>=0;)e[t]=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],m=new Array(576);r(m);var g=new Array(60);r(g);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(e,t,n,i,r){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=i,this.max_length=r,this.has_stree=e&&e.length}function S(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function E(e){return e<256?h[e]:h[256+(e>>>7)]}function I(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function k(e,t,n){e.bi_valid>u-n?(e.bi_buf|=t<<e.bi_valid&65535,I(e,e.bi_buf),e.bi_buf=t>>u-e.bi_valid,e.bi_valid+=n-u):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function O(e,t,n){k(e,n[2*t],n[2*t+1])}function C(e,t){var n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}function L(e,t,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<=t;r++){var s=e[2*r+1];0!==s&&(e[2*r]=C(o[s]++,s))}}function N(e){var t;for(t=0;t<a;t++)e.dyn_ltree[2*t]=0;for(t=0;t<s;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function R(e){e.bi_valid>8?I(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function A(e,t,n,i){var r=2*t,o=2*n;return e[r]<e[o]||e[r]===e[o]&&i[t]<=i[n]}function P(e,t,n){for(var i=e.heap[n],r=n<<1;r<=e.heap_len&&(r<e.heap_len&&A(t,e.heap[r+1],e.heap[r],e.depth)&&r++,!A(t,i,e.heap[r],e.depth));)e.heap[n]=e.heap[r],n=r,r<<=1;e.heap[n]=i}function M(e,t,n){var i,r,a,s,c=0;if(0!==e.last_lit)do{i=e.pending_buf[e.d_buf+2*c]<<8|e.pending_buf[e.d_buf+2*c+1],r=e.pending_buf[e.l_buf+c],c++,0===i?O(e,r,t):(O(e,(a=v[r])+o+1,t),0!==(s=l[a])&&k(e,r-=y[a],s),O(e,a=E(--i),n),0!==(s=d[a])&&k(e,i-=b[a],s))}while(c<e.last_lit);O(e,256,t)}function W(e,t){var n,i,r,o=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,u=t.stat_desc.elems,l=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<u;n++)0!==o[2*n]?(e.heap[++e.heap_len]=l=n,e.depth[n]=0):o[2*n+1]=0;for(;e.heap_len<2;)o[2*(r=e.heap[++e.heap_len]=l<2?++l:0)]=1,e.depth[r]=0,e.opt_len--,s&&(e.static_len-=a[2*r+1]);for(t.max_code=l,n=e.heap_len>>1;n>=1;n--)P(e,o,n);r=u;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],P(e,o,1),i=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=i,o[2*r]=o[2*n]+o[2*i],e.depth[r]=(e.depth[n]>=e.depth[i]?e.depth[n]:e.depth[i])+1,o[2*n+1]=o[2*i+1]=r,e.heap[1]=r++,P(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,i,r,o,a,s,u=t.dyn_tree,l=t.max_code,d=t.stat_desc.static_tree,f=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,m=t.stat_desc.extra_base,g=t.stat_desc.max_length,h=0;for(o=0;o<=c;o++)e.bl_count[o]=0;for(u[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(o=u[2*u[2*(i=e.heap[n])+1]+1]+1)>g&&(o=g,h++),u[2*i+1]=o,i>l||(e.bl_count[o]++,a=0,i>=m&&(a=p[i-m]),s=u[2*i],e.opt_len+=s*(o+a),f&&(e.static_len+=s*(d[2*i+1]+a)));if(0!==h){do{for(o=g-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[g]--,h-=2}while(h>0);for(o=g;0!==o;o--)for(i=e.bl_count[o];0!==i;)(r=e.heap[--n])>l||(u[2*r+1]!==o&&(e.opt_len+=(o-u[2*r+1])*u[2*r],u[2*r+1]=o),i--)}}(e,t),L(o,l,e.bl_count)}function U(e,t,n){var i,r,o=-1,a=t[1],s=0,c=7,u=4;for(0===a&&(c=138,u=3),t[2*(n+1)+1]=65535,i=0;i<=n;i++)r=a,a=t[2*(i+1)+1],++s<c&&r===a||(s<u?e.bl_tree[2*r]+=s:0!==r?(r!==o&&e.bl_tree[2*r]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.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(e,t,n){var i,r,o=-1,a=t[1],s=0,c=7,u=4;for(0===a&&(c=138,u=3),i=0;i<=n;i++)if(r=a,a=t[2*(i+1)+1],!(++s<c&&r===a)){if(s<u)do{O(e,r,e.bl_tree)}while(0!=--s);else 0!==r?(r!==o&&(O(e,r,e.bl_tree),s--),O(e,16,e.bl_tree),k(e,s-3,2)):s<=10?(O(e,17,e.bl_tree),k(e,s-3,3)):(O(e,18,e.bl_tree),k(e,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(e,t,n,r){k(e,0+(r?1:0),3),function(e,t,n,r){R(e),I(e,n),I(e,~n),i.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n)}t._tr_init=function(e){D||(function(){var e,t,n,i,r,o=new Array(c+1);for(n=0,i=0;i<28;i++)for(y[i]=n,e=0;e<1<<l[i];e++)v[n++]=i;for(v[n-1]=i,r=0,i=0;i<16;i++)for(b[i]=r,e=0;e<1<<d[i];e++)h[r++]=i;for(r>>=7;i<s;i++)for(b[i]=r<<7,e=0;e<1<<d[i]-7;e++)h[256+r++]=i;for(t=0;t<=c;t++)o[t]=0;for(e=0;e<=143;)m[2*e+1]=8,e++,o[8]++;for(;e<=255;)m[2*e+1]=9,e++,o[9]++;for(;e<=279;)m[2*e+1]=7,e++,o[7]++;for(;e<=287;)m[2*e+1]=8,e++,o[8]++;for(L(m,287,o),e=0;e<s;e++)g[2*e+1]=5,g[2*e]=C(e,5);_=new T(m,l,257,a,c),w=new T(g,d,0,s,c),x=new T(new Array(0),f,0,19,7)}(),D=!0),e.l_desc=new S(e.dyn_ltree,_),e.d_desc=new S(e.dyn_dtree,w),e.bl_desc=new S(e.bl_tree,x),e.bi_buf=0,e.bi_valid=0,N(e)},t._tr_stored_block=B,t._tr_flush_block=function(e,t,n,i){var r,a,s=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<o;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),W(e,e.l_desc),W(e,e.d_desc),s=function(e){var t;for(U(e,e.dyn_ltree,e.l_desc.max_code),U(e,e.dyn_dtree,e.d_desc.max_code),W(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*p[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),r=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!==t?B(e,t,n,i):4===e.strategy||a===r?(k(e,2+(i?1:0),3),M(e,m,g)):(k(e,4+(i?1:0),3),function(e,t,n,i){var r;for(k(e,t-257,5),k(e,n-1,5),k(e,i-4,4),r=0;r<i;r++)k(e,e.bl_tree[2*p[r]+1],3);G(e,e.dyn_ltree,t-1),G(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),M(e,e.dyn_ltree,e.dyn_dtree)),N(e),i&&R(e)},t._tr_tally=function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(v[n]+o+1)]++,e.dyn_dtree[2*E(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){k(e,2,3),O(e,256,m),function(e){16===e.bi_valid?(I(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},6092:e=>{"use strict";e.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}}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{"use strict";n.r(i),n.d(i,{Core:()=>z,EventHub:()=>c.i,I18n:()=>V});var e=n(8856),t=(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),m=n(4872),g=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(e){return(0,h.uK)().offline_survey_id&&(0,a.q_)(e.nodes).autoCpltGroups.forEach((e=>{e.data.forEach((e=>{e.icon=(0,_.G)(e.icon)}))})),e}function k(t){t.handleEvents={async handleLangChange(n){await(0,u.Sk)(n.locale,!1)||(0,e.e)(t,{showInitLangSelect:!1})},async handleNextClick(){t.nextLoading||((0,y.ye)(t,!0),await(0,e.E3)().fetchSurveyState(),(0,e.W4)().app.gotoSurveyPage((0,h.uK)()),(0,y.ye)(t,!1))}}}async function O(){if((0,e.E3)().startState)return(0,e.E3)().startState;const n=await async function(){const t=await(0,e.W4)().dev.getCustomSurveyMeta();if(t)return t;{const t=(0,e.E3)().sid;return(0,l.U7)(),E||(0,g.qU)(t)}}();!function(t){if((0,e.E3)().preview)return void(E=t);if(E)return;E=t;const{collector:{channel_configs:n}}=t,i=(0,e.W4)().name,r=n.find((e=>e.type===i));if(r){if(!r.allow_response)throw(0,e.E3)().error((0,g.O)(g.FW.interviewee_invalid_error)),new Error(g.FW.interviewee_invalid_error);E.channel=r,(0,e.W4)().auth.authorize(E)}else E.channel={type:i}}(n),await(0,e.W4)().auth.init(n);const i=await async function(t){const n=await(0,e.W4)().dev.getCustomSurveyPayload();if(n)return{cfpd:n,surveyMeta:t};{let n;try{n=await(t.start_auto?(0,g.kj)(t.diagram_url,{type:"GET"},!0):(0,g.kj)(t.smaller_diagram_url,{type:"GET"},!0))}catch(t){throw(0,e.E3)().error((0,u.GS)(f.CW.global.downloadError)),t}const i=await(0,m.K)(n);return function(t){if(!t.version)return(0,e.E3)().error((0,u.GS)(f.CW.global.upgrade)),void(0,e.E3)().customAbort();t.version<2&&t.nodes.forEach((e=>{let t=[];e.options&&(t=t.concat(e.options)),(0,w.yy)(e)&&(t=t.concat(e.otherOptions)),t.forEach((e=>{10===e.mutexNumber&&(e.mutexNumber=-1)}))}))}(i),{surveyMeta:t,cfpd:I(i)}}}(n),h=await async function(t){var n;const{surveyMeta:i,cfpd:r}=t,{mediaLibrary:s,surveyId:c,disabledLangs:l,testCases:f,variables:p}=r,m=(0,o.c5)(r.nodes,r.nodeGroups),g=(0,a.q_)(m);let h=[];r.langPack?(r.langPack=function(e){if(e instanceof Array)return e;{const t=[];return Object.keys(e).forEach((n=>{const i=e[n];t.push({id:"",locale:n,content:i})})),t}}(r.langPack),h=r.langPack.map((e=>({locale:e.locale,content:e.content})))):i.langs&&(h=i.langs),h=h.filter((e=>e.locale!==g.currentLang));const v=g.currentLang,y=[v,...h.map((e=>e.locale))],_=(null!==(n=null===S.c||void 0===S.c?void 0:S.c.langTable)&&void 0!==n?n:[]).filter((e=>y.includes(e.locale)&&!(null==l?void 0:l.includes(e.locale)))),w=await(0,u.Mh)(_,v),x=!!(0,e.W4)().storage.get("lang-resume");x&&(0,e.W4)().storage.remove("lang-resume"),(0,u.YP)(w);const b={imageList:s.imageList,videoList:s.videoList,nodeList:m,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,uniquenessVerification:r.uniquenessVerification};return w===v||(g.i18n&&(0,d.QJ)(g,g.i18n[w]),p.forEach((e=>{e.i18n&&(0,d.gz)(e,e.i18n[w])}))),b}(i),y=await async function(t){if((0,e.E3)().startState)return(0,e.E3)().startState;const{imageList:n,nodeList:i,theme:r,variables:o,varStyles:l,surveyId:d,langResume:p,nodeGroups:m}=t,g=(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}=g;(0,b.a)(t.presetRichStyles);const R={imageList:n,variables:o,varStyles:l};(0,v.YV)(R);const A=await(0,s.Q9)({},{origin:g}),{interviewee:P}=E,M=P?P.raw_data:(0,e.W4)().auth.userInfo||{},W={...R,embedApis:t.embedApis,nodeGroups:m,origin:g,publishedAt:t.publishedAt,type:g.type,nodeName:g.nodeName,langResume:p,langTable:t.langTable,eventHub:c.i,language:t.language||"en_us",layout:L,startNode:g,sid:(0,e.E3)().sid,noWxShare:I,preview:(0,e.E3)().preview,images:A,surveyId:d,...(0,x.Y)(g),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:t,startAuto:S||p,showInitLangSelect:(0,u.Mt)(N,t.langTable)};return k(W),W}(h);return await async function(e){const n={state:e},{origin:i}=e,{startName:o,qsnrName:a,questionText:s,describe:u,template:l}=i;e.title=await(0,t.qQ)((0,r.q)(o||a),n),e.summary=await(0,t.qQ)(s,n),e.description=await(0,t.qQ)(u,n),e.template=await(0,T.m)(l,n.state),(0,p.y)(e.theme),(0,c.U3)({origin:i})}(y),await(0,e.W4)().hook.afterFetchStart(y),(y.startAuto||(0,e.W4)().dev.autoRun)&&(y.hidden=!0,(0,e.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:e=>e,getCustomSurveyPayload:R,getCustomSurveyMeta:R,local:!1,debug:!1,autoRun:!1,realtime:!1,infer:!1},app:{reload(){},openWebLink(){},canHandleReward:()=>!1,getRewardUrl(e){const t=(0,h.SC)(e);return(0,h.Ww)("https:/live.choiceform.com/reward",t)}},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(e,t){if(t){let n=t?(0,u.At)(e):e;return t&&Object.keys(t).forEach((e=>{n=n.replace(new RegExp("{".concat(e,"}"),"g"),(0,N.Wo)(t[e]))})),n}return e}},ui:{setGlobalStyle(){},setVarStyle(){},loadNodeComponent:R,loadUiEntryTemplates:R,setPresetStyle(){}}};function P(e,t){Object.keys(t).forEach((n=>{const i=t[n];"object"==typeof i?e[n]?null!==i&&P(e[n],i):e[n]=i:void 0!==i&&(e[n]=i)}))}function M(e){return P(A,e),A}var W=n(560);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(e){console.info(e)}};var G=n(1344),D=n(1548),B=n(5684),q=n(4316),F=n(8792);function j(){if(!z.initialized)throw new Error("CCCore not yet initialized")}const z={releaseVersion:"3.6.73",releaseDate:"2024-8-13",cfpd:S.c,eventHub:c.i,notifySuspended:!1,theme:(0,p.U)(),util:{convertVarStyle:v.UJ,getTaskInfo:D.S,getAnswer:B.cA,addStartStateDynamics(e){k(e)},addSurveyStateDynamics(e){(0,C.Gg)(e)},addNodeDynamics(e){(0,a.CY)(e)},addOptionDynamics(e){(0,q.yt)(e)},extendImageListGetter(e){(0,v.sf)(e)},loadFakeServers:e=>(0,F.U)(e,!1)},registerEnv(t){const n=M(t);(0,e.oB)(n),z.env=n},async setup(t){if(z.initialized)return z;if(t.dynamic){if(!t.templatePath||!t.treeUrl)throw new Error("setup error, you configed your client as dynanmic, so must provide tempaltePath and treeUrl");if(!t.treeUrl.startsWith("/"))throw new Error("setup error, treeUrl must be absolute path")}Object.assign(z,function(e){const t={...U.hostConfig,...e.hostConfig};return Object.assign(U,{...e,hostConfig:t}),U}(t));const n=(0,h.uK)(),i=n.sid;if(!i&&!(0,e.W4)().dev.realtime)throw new Error("setup error, must provide sid");z.sid=i,z.realTimePreview=(0,e.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=e=>{o(e),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=e=>{z.startState||z.rewardState||z.setTheme((0,p.U)()),s(e),z.crashed=!0};const l=z.notify;z.notify=(e,t)=>{z.notifySuspended||(z.startState||z.rewardState||z.setTheme((0,p.U)()),l(e,t))},(0,e.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,e.W4)().hook.beforeSetupEnd(z),(0,e.oV)(z),z.initialized=!0,await(0,e.W4)().hook.afterSetup(z),await(0,e.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 t=await O();return t&&(t.core=z,z.startState=t,(0,e.W4)().hook.onTitleChange(t.title),c.i.trigger("SET_PROPS")),t},async fetchSurveyState(){j(),z.startState&&(0,y.ye)(z.startState,!0);const t=await(0,C.q0)();return t&&(t.core=z,z.surveyState=t,(0,y.ye)(z.startState,!1),(0,e.W4)().hook.onTitleChange(t.title),c.i.trigger("SET_PROPS")),t},async fetchRewardState(){j();const t=await(0,L.uO)();return t&&(t.core=z,z.rewardState=t,(0,e.W4)().hook.onTitleChange(t.quesTitle),c.i.trigger("SET_PROPS")),t},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})})();
1
+ (()=>{var e={9200:(e,t,n)=>{"use strict";var i=n(3548),r=n(512),o={inflateBase64:function(e){return e=r.Base64.atob(e),(0,i.inflate)(e,{to:"string"})},deflateBase64:function(e){return e=(0,i.deflate)(e,{to:"string"}),r.Base64.btoa(e)},inflatePrefix:function(e){return e=e.substr(7),(0,i.inflate)(e,{to:"string"})},deflatePrefix:function(e){return":CF_PD:"+(e=(0,i.deflate)(e,{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:"ms_my",value:"Bahasa Melayu",bdCode:"may",comment:"马来语"},{locale:"my_mm",value:"မြန်မာ",bdCode:"bur",comment:"缅甸语"},{locale:"ne_np",value:"नेपाली",bdCode:"nep",comment:"尼泊尔语"},{locale:"nl_nl",value:"Nederlands",bdCode:"nl",comment:"荷兰语"},{locale:"no",value:"Bokmål",bdCode:"nor",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:"越南语"}]};t.c=o},568:(e,t,n)=>{"use strict";n.d(t,{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(e){e&&(Object.keys(e).forEach((t=>{i[t.toLowerCase()]=e[t]})),o=i[r])}function s(){return{...i}}function c(e){r=e.toLowerCase(),o=i[r]||i.en_us}function u(){return r}},5684:(e,t,n)=>{"use strict";n.d(t,{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 m=["select","icon_mark","value_mark","upload","menu","slide_rate"],g=["fill","verify"];function h(e){const{type:t}=e;return"region"===t?"predef":t}function v(e,t){const{origin:n}=t;let i;if(t.isOtherOpt)i=n.optionType;else if(!0===n.useComment)i="option_comment";else{const{type:t}=e;i="region"===t?"predef_region":m.includes(t)?"option":g.includes(t)?"comment":t}return i}function y(e,t){const n=function(e){const{loop:t}=e;let n=[];return t&&(n=t.replacements.map((e=>({node_id:e.loopNodeId.toLowerCase(),index:e.index,option_id:e.uuid.toLowerCase()})))),n}(e),{nodeUuid:i}=e,r=t&&t(e);return{type:h(e),node_id:i.toLowerCase(),items:r,start_time:e.startTime,cost_time:Math.round(e.costTime||0),loop_ctxs:n}}function _(e,t){const n=(0,i.Ml)(t),r=(0,p.O_)(t,e),o={value:(0,f.oV)(r)?"":r,other:!!t.isOtherOpt,type:v(e,t)};if(o.option_id=t.uuid.toLowerCase(),(0,s.is)(t,"xid"in t)){const{optionY:e,optionX:n,xid:i,yid:r}=t;o.row_option_id=r.toLowerCase(),o.col_option_id=i.toLowerCase(),o.row_content=(0,c.Qr)(e.text),o.col_content=(0,c.Qr)(n.text),o.content=o.col_content+"-"+o.row_content}else o.content=n||(0,c.Qr)(t.text);return t.visible||(o.hidden=!0),o}function w(e){return(0,i.gr)(e).reduce(((t,n)=>{var i;return(n.selected||(0,p.QX)(n,e)||void 0===n.selected&&!0===(null===(i=null==n?void 0:n.__cache)||void 0===i?void 0:i.selected))&&t.push(_(e,n)),t}),[])}const x={};function b(e){const t=x[e.type];return t&&t(e)}function T(e){return"object"==typeof e.value?JSON.stringify(e.value):e.value}function S(e,t){return"all"===t||(e?"check"===t:"normal"===t)}async function E(e,t="all",n="committed_url",i=!1){const a=function(e,t){const n=[];return e.renderList.forEach((e=>{if(!S(e.checkMode,t))return;if("data"===e.type)return;const i=b(e);i&&n.push(i)})),n}(e,t),c=i?void 0:await(0,l.ML)(e,n),u=await(0,l.m0)(e),f={backend_request_params:null!=u?u:{},webhook_params:null!=c?c:{},answers:a,var_map_info:(0,o.oJ)(e,t),options_display_info:(0,r.Ud)(e,t),query_params:(0,d.uK)(),time_consuming:Math.ceil((Date.now()-e.startTime)/1e3),status:e.responseStatus};return(0,s.OI)(f.answers,((e,t)=>{"string"==typeof e[t]&&(e[t]=e[t].replace(/,/g,",").replace(/[\r\n]/g," "))})),f}function I(e){switch(e.type){case"verify":return!!e.code;case"location":case"region":case"area":return!!e.value;case"describe":case"lottery":case"end":return!0;default:return(0,i.W4)(e)||(0,i.Om)(e)}}x.select=x.select_image=x.menu=x.select_icon=x.hot_spot=e=>{const t=y(e,w);if((0,u.cd)(e.origin)&&t.items){let e=!1,n=!1;t.items.forEach((t=>{"comment"!==t.type&&(t.hidden?e=!0:n=!0),delete t.hidden})),e&&n&&(t.items=t.items.filter((e=>!e.hidden)))}return t},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=e=>{const t=y(e,w);return t.items&&t.items.forEach((e=>{delete e.hidden})),t},x.location=e=>{const t=y(e,(t=>{const n=(0,i.gr)(e).find((e=>e.selected));return n?[_(t,n)]:[]})),{position:n,indexes:r}=e;return n&&(n.indexes=r,t.location=n),t},x.region=e=>{const t=x.location(e);return t&&(t.region=(0,a.Qf)(e.value)),t},x.area=e=>x.location(e),x.data=e=>y(e,(e=>(0,i.gr)(e).reduce(((t,n)=>(n.selected&&t.push(_(e,n)),t)),[]))),x.verify=e=>{const t=y(e),{phoneNumber:n,validateType:i,code:r}=e;return"sms"===i&&(t.phone_num=n),t.code=r,t},x.end=e=>({type:h(e),node_id:e.nodeUuid.toLowerCase(),start_time:e.startTime,cost_time:0}),x.logic=e=>{const t=y(e);return t.logic_result=e.logicResult,t}},9536:(e,t,n)=>{"use strict";n.d(t,{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:""}}function l(e){(0,s.e)(e,{selected:!1,value:""})}function d(e,t,n){const o=(0,i.wR)(t);let a=!1,s=!1;return o.forEach((t=>{t!==e&&(0,r.A9)(t,e)&&(t.isOtherOpt?(s=!0,l(t)):(a=!0,n(t)))})),{normalPushed:a,otherPushed:s}}const f={};async function p(e,t){if(!(0,c.g7)(e,t))return;const n=f[t.type];n?await n(e,t):function(e,t){d(e,t,l)}(e,t)}f.heat_map=(e,t)=>{d(e,t,(e=>{(0,s.e)(e,{point:null,value:""})}))},f.upload=async(e,t)=>{const{normalPushed:n}=d(e,t,(e=>{(0,s.e)(e,{value:"",miniValue:"",filePath:"",progress:0,isImage:!1,fileType:"",fileName:"",image:null})}));n&&await(0,a.SY)(t)},f.weight=(e,t)=>{const{normalPushed:n}=d(e,t,(e=>{(0,s.e)(e,{value:""})}));n&&t.options.forEach((e=>{(0,s.e)(e,{percent:(0,i.e$)(Number(e.value),t.weightTotal)})}))},f.sequence=(e,t)=>{const{normalPushed:n}=d(e,t,(e=>{(0,s.e)(e,{selected:!1,sortNo:-1})}));n&&t.options.sort(((e,t)=>e.number>t.number?1:-1))},f.matrix=(e,t)=>{(0,i.wR)(t).forEach((t=>{if(t===e)return;const n=(0,r.I9)(e.origin)||(0,r.E5)(e,t),i=(0,r.I9)(t.origin)||(0,r.E5)(t,e),o=(0,r.IN)(e,t)||(0,r.IN)(e,t.optionX)||(0,r.IN)(e,t.optionY)||(0,r.IN)(e.optionX,t)||(0,r.IN)(e.optionY,t)||(0,r.u6)(e,t);(n||i||o)&&l(t)}))},f.cascade=(e,t)=>{const n=(e,t)=>{if(!t||!t.list)return[];if(t.list.find((t=>t.option===e)))return[...t.list];for(const i of t.list){const t=n(e,i);if(t.length>0)return t}return[]},i=t.otherOptions,a=i.includes(e)?[...t.cascade.list]:n(e,t.cascade);i.forEach((e=>{a.push({option:e})})),a.forEach((n=>{n.option!==e&&(0,r.A9)(n.option,e)&&(n.display?(0,o.gF)(n,t):l(n.option))}))}},4384:(e,t,n)=>{"use strict";n.d(t,{Az:()=>i,ay:()=>o,yK:()=>r});const i={refresh:!1,result:!1},r={refresh:!0,result:!0},o={refresh:!1,result:!0}},7801:(e,t,n)=>{"use strict";n.d(t,{_:()=>s,i:()=>a});var i=n(5776),r=n(8856),o=n(5684);function a(e,t){const{nodes:n}=e.parent;return!n.includes(e)&&(t&&(0,r.E3)().uploadLog("".concat(e.runtimeNodeName,": try to change answer after question leaving and rejected"),"warning"),!0)}function s(e,t){const n=e.renderList.filter((e=>!((0,i.S)(e)||!(0,o.Ci)(e.checkMode,t)||!(0,i.K6)(e.origin)||(0,o.Qz)(e))));if(n.length>0){const e=n.map((e=>e.runtimeNodeName)).join();(0,r.E3)().uploadLog("answer lack for: ".concat(e),"warning")}}},1548:(e,t,n)=>{"use strict";n.d(t,{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(e){return e.code?e.phone_num?e.phone_num+" "+e.code:e.code:e.location?(0,a.A)(e.location.address):""}function l(e,t){const n=(0,o.E3)().startState,a=[{title:(0,s.Qr)(n.title),description:(0,s.Qr)(n.description)}];return t.forEach((t=>{const n=(0,i.Uq)(e,t);if(!(0,r.S)(n)){const e={title:(0,s.Qr)(n.title)||n.runtimeNodeName,description:(0,s.Qr)(n.description),value:u(t),options:t.items?t.items.map((e=>({text:e.row_content||e.col_content?e.row_content+"-"+e.col_content:e.content,value:(0,c.wr)(e).toString()}))):[]};a.push(e)}})),a}async function d(){const{surveyState:e}=(0,o.E3)();if(!e)return null;const t=await(0,c.gp)(e,"all");return{result:t,progress:e.progress,nodes:l(e,t.answers)}}},7788:(e,t,n)=>{"use strict";n.d(t,{YZ:()=>g,qc:()=>h,qo:()=>m});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 m(e,t){if(e){const{parent:n}=t;return(0,i.eU)({state:n,request:e,customParam:null,silent:!1})}return d}async function g(e,t){if(e){const{message:n}=e;return await(0,r.wx)(t,e)?d:{valid:!1,message:n||(0,c.GS)(l.CW.verify.invalidFailed)}}return d}async function h(e,t=!1){if(!e.parent.nextLoading&&!t)return d;e.validateFailed=!1;const{origin:n,parent:i}=e,{validation:r}=n;if(!r)return d;const{request:c,logic:l,noPreventNext:h}=r;let v=await m(c,e);return v.valid&&(v=await g(l,i)),!v.valid&&(e.validateFailed=!0,h&&(v=d,(0,a.mU)(i,e)),v.dueToNode=e,await async function(e,t){return"string"!=typeof e.message||(e.message=await(0,s.Oj)(e.message,{state:t}),(0,o.mK)(e.message)||(e.message=await(0,s.qQ)(e.message,{state:t})),e.message.startsWith(f)?(e.type="vital",e.message=e.message.substring(f.length)):e.message.startsWith(p)&&(e.type="alert",e.message=e.message.substring(p.length))),e}(v,i),e.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:(e,t,n)=>{"use strict";n.d(t,{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),m=n(1768),g=n(1344),h=n(6276);const v={valid:!0,message:""};function y(e){if(!(0,o.K6)(e.origin))return v;const t=(0,i.Om)(e)||(0,i.W4)(e);return{valid:t,message:t?"":(0,l.GS)(d.CW.global.answerRequired),messageCode:"global.answerRequired",dueToNode:e}}function _(e,t){if((0,h.IN)(e)){const{otherOptions:t}=e;if(t.some((e=>e.selected)))return 0}return t}async function w(e){if(!(0,o.K6)(e.origin)&&!(0,i.W4)(e))return v;const{options:t}=e,{parent:n}=e;let r=await(0,s.W0)(e.origin.fillMin,{state:n});r=r||t.length,r>t.length&&(r=t.length),r=_(e,r);let a=0;const c=(0,l.GS)(d.CW.fill.itemInputRequired);let u=!1;for(const n of t)(0,p.QX)(n,e)?(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:e}:u?{valid:!1,message:(0,l.GS)(d.CW.fill.inputRequired),dueToNode:e}:v}function x(e,t=!1){const n=(0,h.IN)(e)?e.otherOptions:[],r=t?n:(0,i.wR)(e),a=(0,o.K6)(e.origin),s=(0,l.GS)(d.CW.fill.itemInputRequired),c=r.filter((t=>{const n=function(e,t){const n=!0===e.origin.fillRequired,r=e.selected;return n&&(r||(0,i.yg)(e.origin)&&t)}(t,a)&&!(0,p.QX)(t,e);return n?k(t,s):O(t,s),n}))[0],u=!c;return u?v:{valid:u,message:(0,l.GS)(d.CW.fill.inputRequired),dueToNode:e,dueToOption:c}}async function b(e,t=!1){const n=t?e.options:(0,i.wR)(e),o=[];for(const t of n){let n={valid:!0};(0,p.QX)(t,e)&&(n=await(0,r.uC)(t,e)),n.valid?O(t,n.message):(k(t,n.message),o.push(n))}return o[0]||v}async function T(e){return(0,o._A)(e.origin)&&(0,i.Om)(e)?S(e):v}async function S(e){if(function(e){if("matrix"===e.type)return!1;const t=(0,i.wR)(e).find((e=>e.selected));return!(!t||!(0,m.I9)(t.origin))}(e))return v;const{min:t}=await(0,o.EH)(e,e.parent);return(0,i.wR)(e).filter((e=>!(0,i.yg)(e.origin))).filter((e=>e.selected)).length>=t?v:{valid:!1,message:(0,l.GS)(d.CW.select.limitMin,{min:t}),dueToNode:e}}const E={};async function I(e,t){if(!t.list)return v;const{multiple:n,min:i,max:o,required:a}=t,s=t.text?(0,l.GS)(d.CW.menu.listItem)+t.text:(0,l.GS)(d.CW.menu.topList),c=t.list.filter((e=>e.selected));for(const t of c){const{option:n}=t;if(n.origin.fillRequired&&!(n.value||"").toString().trim())return{valid:!1,dueToNode:e,message:(0,l.GS)(d.CW.menu.inputReq,{text:n.text})};const i=await(0,r.uC)(n,e);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:e,message:(0,l.GS)(d.CW.menu.required,{text:s})};if(n&&u<i&&u>0)return{valid:!1,dueToNode:e,message:(0,l.GS)(d.CW.menu.requiredBetween,{text:s,min:i,max:o})};for(const n of t.list){if(!n.selected)continue;const t=await I(e,n);if(!t.valid)return t}return v}function k(e,t){e.errorMessage!==t&&(0,u.e)(e,{errorMessage:t})}function O(e,t){e.errorMessage===t&&(0,u.e)(e,{errorMessage:""})}function C(e,t){(0,u.E3)().locateError(e,t)}async function L(e,t){if((0,o.S)(e)||e.readonly)return v;const n=function(e){const{origin:{canSkipVideo:t},video:n}=e;return t||!n||n.ended?v:{valid:!1,message:(0,l.GS)(d.CW.video.watchAll),dueToNode:e}}(e);if(!n.valid)return n;const i=E[e.type];let r=i?await i(e):v;return r.valid&&t&&(r=await(0,a.qc)(e)),r.valid&&k(e,r.message),r}E.select=async e=>{const t=y(e);if(!t.valid)return t;let n=await T(e);return n.valid?(n=x(e,!1),n.valid?b(e,!1):n):n},E.select_image=e=>E.select(e),E.fill=async e=>{const t=y(e);if(!t.valid)return t;let n=await w(e);return n.valid?(n=x(e,!0),n.valid?b(e,!1):n):n},E.value_mark=async e=>{const t=y(e);if(!t.valid)return t;let n=await w(e);return n.valid?(n=x(e,!0),n.valid?b(e,!0):n):n},E.icon_mark=async e=>{const t=await E.value_mark(e);return t.valid?(0,o.K6)(e.origin)&&e.options.some((e=>!("rating-nps"===e.iconName)&&"0"===e.value))?{valid:!1,message:(0,l.GS)(d.CW.global.answerRequired),messageCode:"global.answerRequired",dueToNode:e}:v:t},E.sequence=async e=>{let t=y(e);if(!t.valid)return t;const{options:n,origin:i}=e;let r=(0,o.K6)(i)?i.rankCount||n.length:0;const a=n.length;r>a&&(r=a),r=_(e,r);let s=0;const c=n.filter((e=>e.sortNo>0)).sort(((e,t)=>e.sortNo>t.sortNo?1:-1));for(let e=0;e<c.length&&c[e].sortNo===e+1;e++)s++;return r>s?{valid:!1,message:(0,l.GS)(d.CW.rank.limitMin,{min:r}),dueToNode:e}:(t=x(e,!0),t.valid?b(e,!0):t)},E.matrix=async e=>{const t=y(e);if(!t.valid)return t;let n=await async function(e){const{origin:t}=e;return(0,o.cd)(t)?v:(0,o.K6)(t)||(0,i.Om)(e)?(0,o.Un)(t)?S(e):(0,o.ct)(t)||(0,o.gd)(t)||(0,o.cx)(t)?function(e){let t,n,i;(0,o.ct)(e.origin)?(t="yid",n=e.renderOptionsY,i=!1):(0,o.gd)(e.origin)?(t="xid",n=e.renderOptionsX,i=!0):(0,o.cx)(e.origin)&&(e.renderOptionsX.length>e.renderOptionsY.length?(t="yid",n=e.renderOptionsY,i=!1):(t="xid",n=e.renderOptionsX,i=!0));const r=e.options;for(const o of n){const n=o.uuid;if(!r.some((e=>e.selected&&(0,c.oj)(e[t],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:e}}return v}(e):async function(e){const t=(0,o.S2)(e.origin);let{min:n}=await(0,o.EH)(e,e.parent);const i=t?"xid":"yid",r=e[t?"renderOptionsX":"renderOptionsY"],a=e[t?"renderOptionsY":"renderOptionsX"];n>a.length&&(n=a.length);const s=e.options;for(const o of r){const r=o.uuid;if(s.filter((e=>e.selected&&(0,c.oj)(e[i],r))).length<n)return{valid:!1,message:t?(0,l.GS)(d.CW.matrix.colLimitMin,{min:n}):(0,l.GS)(d.CW.matrix.rowLimitMin,{min:n}),dueToNode:e}}return v}(e):v}(e);return n.valid?(n=x(e,!0),n.valid?b(e,!0):n):n},E.region=async e=>!(0,o.K6)(e.origin)||e.value?v:{valid:!1,message:(0,l.GS)(d.CW.global.answerRequired),messageCode:"global.answerRequired",dueToNode:e},E.location=async e=>{const t=await E.region(e);return t.valid||(t.message=(0,l.GS)(d.CW.locate.required)),t},E.upload=async e=>{const t=y(e),{options:n}=e;if(!t.valid)return t;let r=!0,a="";const s=(0,i.iQ)(e,!0);if(!(0,o.K6)(e.origin)&&0===s)return v;const c=await(0,o.YP)(e,e.parent),{max:u}=c,f=_(e,c.min);let m=0;a=(0,l.GS)(d.CW.upload.uploadRequired);let g=!1;for(const t of n)(0,p.QX)(t,e)?(O(t,a),m+=1):!0===t.origin.fillRequired&&(k(t,a),g=!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>m?{valid:!1,message:(0,l.GS)(d.CW.upload.amountLimitMin,{min:f}),dueToNode:e}:g?{valid:!1,message:(0,l.GS)(d.CW.upload.uploadRequired),dueToNode:e}:{valid:r,message:a,dueToNode:e}},E.verify=async e=>{if((0,u.E3)().preview||(0,u.W4)().dev.infer){if(!e.code)return{valid:!1,message:(0,l.GS)(d.CW.global.answerRequired),messageCode:"global.answerRequired",dueToNode:e}}else{const t={valid:!1,message:(0,l.GS)(d.CW.verify.invalidFailed),dueToNode:e},{validateType:n}=e,{code:i,parent:r,nodeUuid:o}=e,a=()=>(e.validateFailTimes+=1,t);if("image"===n){const{serverValidations:n}=e;if(!n)return t;{const{id:e}=n;try{return await(0,f.I1)({code:i},e),v}catch(e){return a()}}}else if("password"===n){const{transactionID:e}=r,t={response_id:e,question_id:o,code:i};try{return await(0,f.eY)(t),v}catch(e){return a()}}else if("sms"===n){const{serverValidations:n}=e;if(!n)return t;{const{id:e}=n;try{return await(0,f.I1)({code:i},e),v}catch(e){return a()}}}}return v},E.menu=E.select,E.area=async e=>y(e),E.select_icon=async e=>{const t=y(e);return t.valid?T(e):t},E.weight=async e=>{if(!(0,o.K6)(e.origin)&&!(0,i.W4)(e))return v;const t=y(e);if(!t.valid)return t;let{weightTotal:n}=e;n=_(e,n);const{options:r}=e,a=r.reduce(((e,t)=>e+Number(t.value)),0);if(0===n){const t=x(e,!1);if(!t.valid)return t}return n>a&&!0!==e.origin.relax?{valid:!1,message:(0,l.GS)(d.CW.weight.totalLimitMin,{min:n}),dueToNode:e}:v},E.cascade=async e=>{if(!(0,o.K6)(e.origin)&&!(0,i.Om)(e))return v;const{cascade:t}=e,n=y(e);return n.valid?I(e,t):n},E.hot_spot=async e=>{const t=function(e){if(!(0,o.K6)(e.origin))return v;const t=(0,i.Om)(e);return{valid:t,message:t?"":(0,l.GS)(d.CW.global.answerRequired),messageCode:"global.answerRequired",dueToNode:e}}(e);if(!t.valid)return t;let n=await T(e);return n.valid?(n=x(e,!1),n.valid?b(e,!1):n):n},E.heat_map=async e=>y(e),E.slide_rate=E.value_mark,E.max_diff=async e=>{const t=e.tasks.every((e=>e.done));return{valid:t,dueToNode:t?null:e,message:t?"":(0,l.GS)(d.CW.maxDiff.all)}};const N=(0,c.Cu)((async(e,t)=>{if(t&&k(t,(await(0,r.uC)(t,e)).message),e){const t=await R([e]);t.message||k(e,t.message),(0,g.ew)(e)}}),250);async function R(e,t=!1,n=!1){const i=[];for(const r of e){const e=await L(r,t);e.valid||(n&&k(e.dueToNode,e.message),i.push(e),(0,g.ew)(r))}return i[0]||v}},9677:(e,t,n)=>{"use strict";n.d(t,{KA:()=>c,_u:()=>l,mK:()=>u,uC:()=>g}),n(7768),n(9624);var i=n(3001),r=n(6496),o=n(4708),a=n(568),s=n(2352);function c(e){return/^1[0-9][0-9]\d{8}$/i.test(e)}function u(e){return/[-a-zA-Z0-9@:%_+.~#?&/=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_+.~#?&/=]*)?/gi.test(e)}async function l(e,t){const{parent:n}=t,{origin:r}=e;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(e,t,n){return t<=e&&n>=e}function f(e,t,n){return d(e,t,n)?"":(0,r.GS)(a.CW.fill.valueLimit,{min:t,max:n})}const p={};async function m(e,t,n){const{itemsMax:i,itemsMin:s}=await(0,o.jJ)(t,n),c=e.split(/[,,]/).reduce(((e,t)=>t.trim()?e+1:e),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 g(e,t){const n=(0,s.Wo)(e.value),{origin:i}=e,r=i.fillType,o=p[r];if(!o||(0,s.oV)(n)&&"auto_complete"!==r)return{valid:!0,message:""};const{parent:a}=t;a.context.option=e;const c=await o(n,e,t);return a.context.option=null,c.valid||(c.dueToOption=e,c.dueToNode=t),c}p.chars=async(e,t,n)=>{const{start:i,end:o}=await l(t,n);let{tolerance:s}=t.origin;s=s||[];const c=function(e,t=[]){if(0===t.length)return"";e=e.replace(/[\s,,]/g,"");let n="";const i=[];t.includes("number")&&(n+="0-9.",i.push((0,r.GS)(a.CW.fill.number))),t.includes("alphabet")&&(n+="a-zA-Z",i.push((0,r.GS)(a.CW.fill.alphabet))),t.includes("chinese")&&(n+="一-龥",i.push((0,r.GS)(a.CW.fill.chinese)));const o=i.join(" "),s=new RegExp("^["+n+"]+$");return e.match(s)?"":(0,r.GS)(a.CW.fill.onlyAllow,{text:o})}(e,s)||function(e,t,n){return d(e.length,t,n)?"":(0,r.GS)(a.CW.fill.charsLimit,{min:t,max:n})}(e,i,o);return{valid:!c,message:c}},p.email=async e=>{const t=function(e){return/^[\w-\.]+@([\w-]+\.)+[\w-]+$/i.test(e)}(e);return{valid:t,message:t?"":(0,r.GS)(a.CW.fill.needEmail)}},p.float=async(e,t,n)=>{if(!function(e){return/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(e)}(e))return{valid:!1,message:(0,r.GS)(a.CW.fill.inputDecimal)};const{origin:i}=t;if(i.scale&&!function(e,t){return new RegExp("\\d+\\.\\d{".concat(t,"}$")).test(e)}(e,i.scale))return{valid:!1,message:(0,r.GS)(a.CW.fill.inputDecimalDigits,{scale:i.scale})};const{start:o,end:s}=await l(t,n),c=f(Number(e),o,s);return{valid:!c,message:c}},p.integer=async(e,t,n)=>{if(!function(e){return/^[-]?\d+$/.test(e)}(e=e.replace(/\s/g,"")))return{valid:!1,message:(0,r.GS)(a.CW.fill.inputInteger)};const i=Number(e),{start:o,end:s}=await l(t,n),c=f(i,o,s);return{valid:!c,message:c}},p.none=async()=>({valid:!0,message:""}),p.phone_number=async e=>{const t=c(e);return{valid:t,message:t?"":(0,r.GS)(a.CW.fill.needPhoneNumber)}},p.postcode=async e=>{const t=function(e){return/^[0-9][0-9]{5}$/.test(e)}(e);return{valid:t,message:t?"":(0,r.GS)(a.CW.fill.needZipCode)}},p.url=async e=>{const t=u(e);return{valid:t,message:t?"":(0,r.GS)(a.CW.fill.needUrl)}},p.auto_complete=async(e,t,n)=>!e&&t.atcpTrigger?{valid:!1,message:(0,r.GS)(a.CW.fill.atcpLabelOnly),dueToNode:n,dueToOption:t}:m(e,t,n),p.list_select=(e,t,n)=>m(e,t,n)},984:(e,t,n)=>{"use strict";n.d(t,{O_:()=>s,QX:()=>l,g7:()=>o}),n(9624);var i=n(2352),r=n(3001);function o(e,t){return e.selected||l(e,t)}const a={};function s(e,t){let n="";const i=a[t.type];return n=e.isOtherOpt||!i?e.value:i(e),"string"==typeof n&&(n=(0,r.Qr)(n)),n}function c(e,t){let n=s(e,t);return"string"==typeof n&&(n=n.trim()),!(0,i.oV)(n)}a.upload=e=>e.filePath,a.sequence=e=>e.sortNo,a.heat_map=e=>e.point,a.max_diff=e=>e.records;const u={};function l(e,t){return(u[t.type]||c)(e,t)}u.sequence=(e,t)=>-1!==e.sortNo&&c(e,t)},9796:(e,t,n)=>{"use strict";n.d(t,{Co:()=>f,GM:()=>g,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(e,t){const{options:n,passRefs:i,refMaps:r}=await(0,a.q0)(e,t.origin,null,!0);(0,d.GO)(t,r);const o=await(0,l.o9)(t,n,i);return(0,s.uQ)(t,o)}function p(e,t,n=!1){const{loopStack:i}=t;return i.find(((t,o)=>(!n||o===i.length-1)&&(0,r.oj)(t.node.nodeUuid,e.nodeUuid)))}async function m(e,t,n,i,r,o){const a=(0,u.C2)(r),s={state:e,usage:{node:t,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 g={_skip:(e,t,n)=>o.G.findNext(e,t,n),async _init(e,t,n){const{varList:o,origin:{loopStart:a,destList:s}}=t;if(0===o.length)return g._skip(e,t,n);const{loopStack:c}=n,u=s.find((e=>(0,r.oj)(e.selfPortId,a.uuid))).destInputId,l=(0,i.gR)(e,u),d=o[0],{origin:f}=t,p=c[c.length-1],h=await m(n,t,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(e,t,n){const{nodeUuid:o}=t,{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],g=await m(n,t,o,d,f,p),h=(0,i.gR)(e,l);return u[u.length-1]=g,{target:h,loop:(0,r.O0)(s),loopStack:(0,r.O0)(a)}},async _end(e,t,n){const{loopStack:i}=n;i.pop();const a=await o.G.findNext(e,t,n);if(i.length>0){const e=(0,r.O0)(i);a.loop=e[e.length-1],a.loopStack=e}return a},findNext(e,t,n){const i=p(t,n,!0);if(i){const{currentIndex:r,varList:o}=i;return r===o.length-1?g._end(e,t,n):g._increase(e,t,n)}return g._init(e,t,n)}}},8956:(e,t,n)=>{"use strict";n.d(t,{kF:()=>E,WU:()=>k});var i=n(5776);function r(e,t,n,r,o){return o||(o=(0,i.MR)(e,t,n.uuid)),o||r.origin.parentRandomId||t.length&&(o=(0,i.gR)(e,t[t.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(e,t){const{destList:n,output:c}=t.origin,u=(0,a.IN)(t)?t.otherOptions:[],l=s.includes(t.type)?u:(0,o.wR)(t),d=l&&l.find((e=>e.selected));return{target:r(e,n,c,t,d&&(0,i.MR)(e,n,d.uuid))}}},u={async findNext(e,t,n){const{origin:{destList:r,parentRandomId:a}}=t,s=(0,o.GE)(t);let u=s&&(0,i.MR)(e,r,s.uuid);return u||(u=(await c.findNext(e,t,n)).target),u||!r.length||a||(u=(0,i.gR)(e,r[0].destInputId)),{target:u}}};var l=n(2331),d=(n(2048),n(4060));const f={async findNext(e,t){const{origin:n,parent:r}=t,{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);t.logicResult=p;const m=p?a:l;return{target:(0,i.MR)(e,s,m.uuid)}}};var p=n(6940),m=n(9796);n(5960),n(9952);const g={async findNext(e,t){const{origin:n,options:o,otherOptions:a}=t,{destList:s,output:c}=n,u=[...o.filter((e=>e.selected)).sort(((e,t)=>e.cascadePath.length<t.cascadePath.length?1:-1)),...a.filter((e=>e.selected))];let l;for(const t of u)if(l=(0,i.MR)(e,s,t.uuid),l)break;return{target:r(e,s,c,t,l)}}};var h=n(9216),v=n(556),y=n(8184),_=n(8856),w=n(6072);const x={cascade:g,logic:f,uniqueness_verification:{async findNext(e,t){const{origin:n,parent:r}=t,{output:o,destList:a,outputN:s}=n;let c=!0;const u=r.verifyUniquenessUri,l=r.uniquenessVerification;if(u&&l&&l.enabled&&!(0,_.E3)().preview){const e={enabled:!1,method:u.method,url:u.url,params:l.params};c=(await(0,w.eU)({state:r,request:e,customParam:null,silent:!1,shouldCombineSystem:!1})).valid}t.verificationResult=c;const d=c?o:s;return{target:(0,i.MR)(e,a,d.uuid)}}},loop:m.GM,sequence:u,random:p.qM};function b(e){const t=x[e];if(!t)throw new Error("lack next rules for this type of node...");return t}["describe","check","end","start","verify","data","max_diff"].forEach((e=>{x[e]=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((e=>{x[e]=c}));const T=["check","break_point"];function S(e,t){return"loop"===e.type?!(0,m.iO)(e,t):!T.includes(e.type)}function E(e,t,n){return k(e,(0,y.e_)({target:n},t),t)}async function I(e,t,n,r){const{target:o,loop:a,random:s}=r,c=t.random;if(o){const e=t.loop,{loopStack:n}=t;!a&&e&&(0,i.uK)(o,t.origin)&&(r.loopStack=n,r.loop=e),o.parentRandomId&&c&&!s&&(r.random=c)}else if(c){const t=(0,v.So)(c.node.nodeUuid,n.loopStack);return k(e,(0,h.QL)(n.renderList,t),n)}return r}async function k(e,t,n){let i,r,o=t,a=b(o.type),s=!0;for(;s&&(r=await I(e,o,n,await a.findNext(e,o,n)),i=r.target,i);)S(i,n)?s=!1:(o=(0,y.e_)(r,n),a=b(i.type));return r}},2331:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});var i=n(5776);const r={async findNext(e,t){const{destList:n,output:r}=t.origin;return{target:(0,i.MR)(e,n,r&&r.uuid)}}}},6788:(e,t,n)=>{"use strict";n.d(t,{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(e){return i.has(e)}function o(e){i.add(e)}},6940:(e,t,n)=>{"use strict";n.d(t,{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(e,t){e&&0!==e.length&&(c=e,t.forEach((n=>{if(e.includes(n.nodeUuid)){(0,s.c)(n.nodeUuid);const e=t.find((e=>e.nodeUuid===n.parentRandomId));e&&l.add(e.nodeUuid)}})))}const f={async _init(e,t,n){const{origin:o}=t;let u=function(e,t){const{destList:n,randomStart:o}=t.origin,a={};n.forEach(((t,n)=>{if((0,i.oj)(t.selfPortId,o.uuid)){const o=(0,r.gR)(e,t.destInputId).groupNumber||"N/A_"+n,s=a[o];if(s){const e=(0,i.ec)(s.length+1);s.splice(e,0,t.destInputId)}else a[o]=[t.destInputId]}}));const s=function(e,t){const{customDestCount:n}=t.origin;if(!n||n>=e.length)return e;for(;e.length>n;)e.splice((0,i.ec)(e.length),1);return e}(Object.keys(a),t);let c=[];for(;s.length>0;){const e=(0,i.ec)(s.length);c=c.concat(a[s[e]]),s.splice(e,1)}return c}(e,t);!function(e,t){const{parent:{nodeList:n},origin:{customNodeCount:o,nodeUuid:a}}=t;l.has(a)||o&&(e.forEach((e=>{const t=[];let a=(0,r.gR)(n,e);for(;a;)t.push(a),a=(0,r.MR)(n,a.destList,a.output.uuid);for(;t.length>o;){const e=(0,i.ec)(t.length),n=t[e].nodeUuid;(0,s.c)(n),c.push(n),t.splice(e,1)}})),l.add(a))}(u,t),u=(0,a.wn)(u,t);let d=[];t.random&&(d=t.random.stack.concat(t.random));const f={stack:d,node:o,destPortIds:u,currentIndex:0};return n.push(f),{target:(0,r.gR)(e,u[0]),random:{...f}}},async _increase(e,t){t.currentIndex+=1;const{currentIndex:n,destPortIds:i}=t;return{target:(0,r.gR)(e,i[n]),random:{...t}}},_end:(e,t,n)=>o.G.findNext(e,t,n),findNext(e,t,n){const{randomList:r}=n,{nodeUuid:o}=t,a=r.find((e=>(0,i.oj)(e.node.nodeUuid,o)));if(a){const{currentIndex:i,destPortIds:r}=a;return i===r.length-1?f._end(e,t,n):f._increase(e,a)}return f._init(e,t,r)}}},7192:(e,t,n)=>{"use strict";n.d(t,{GI:()=>o,Un:()=>c}),n(9952);var i=n(5876),r=n(9348);function o(e){const t=e.split(":"),n={};if(1===t.length)n.baseId=t[0];else if(2===t.length)n.nodeId=t[0],n.nodePartId=t[1];else if(3===t.length){n.nodeId=t[0];const e=t[1];e.match(/^[a-z0-9]{8}$/)?n.optId=e:n.optFilterId=e,n.optPartId=t[2]}return n}function a(e){const t=[],n=e.getAttribute("data-ph-cfg");if(n){const e=JSON.parse(n);Object.keys(e).forEach((n=>{t.push({name:n,value:c(e[n])})}))}const i=e.getAttribute("data-img-size")||":",[r,o]=i.split(":").map((e=>Number(e))),a={phParams:t,limitSrc:Number(e.getAttribute("data-limit-src"))||0,limitRnd:e.getAttribute("data-limit-rnd")||"-1",imgHeight:o,imgWidth:r,outOfResult:!!e.getAttribute("data-out-of-result"),disorder:!!e.getAttribute("data-disorder")},s=e.getAttribute("data-limit");if(s){const[e,t,n]=s.split(":");a.limitType=Number(e)||1,a.limitStart=c(t),a.limitEnd=c(n)}return a}function s(e){["data-id","data-limit","data-limit-src","data-limit-rnd","data-ph-cfg","data-img-size","data-disorder","data-out-of-result"].forEach((t=>{e.removeAttribute(t)}))}function c(e){if(!e)return e;if(!function(e){return e.includes("var-tag")&&e.includes("data-id".concat("="))}(e=String(e)))return e;const t=document.createElement("div");t.innerHTML=e;const n=t.querySelectorAll(".var-tag");for(const e of n)if(!e.hasAttribute("data-v-config")){const t=o(e.getAttribute("data-id")),n=a(e);s(e);const c=(0,r.A)(t);e.setAttribute("data-v-id",c);const u=(0,i._m)(n);u&&e.setAttribute("data-v-config",u)}return t.innerHTML}},3048:(e,t,n)=>{"use strict";n.d(t,{W:()=>o,a:()=>a});var i=n(556),r=n(7192);function o(e){const t=e;return t.referUuid?{index:t.index,config:{phParams:[],limitEnd:t.limitEnd,limitSrc:t.limitSrc,limitStart:t.limitStart,limitType:t.limitType,disorder:t.disorder,limitRnd:t.limitRnd},identity:(0,r.GI)(t.uuid),uuid:t.referUuid}:t}function a(e,t){const n=e;if(n.limit){const e=t.find((e=>e.uuid===n.referId));return(0,i.kt)(e.referUuid)}return n.referId}},7404:(e,t,n)=>{"use strict";n.d(t,{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(e){const t={...e};return delete t.appid,delete t.code,delete t.state,t}function l(e){const t=Object.create(null);return"string"!=typeof e?t:(e=e.trim().replace(/^([?#&])/,""))?(e.split("&").forEach((e=>{const n=e.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===t[i]?t[i]=r:Array.isArray(t[i])?t[i].push(r):t[i]=[t[i],r]})),{...t}):t}function d(e){(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(e))}function f(e,t){if("string"==typeof t)try{t=JSON.parse(t)}catch(e){}const n=function(e){const t=[];return Object.keys(e).forEach((n=>{if(void 0!==e[n]){const i="".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(e[n]));t.push(i)}})),t.join("&")}(t),i=e.match(/\?/)?"&":"?";return e+i+n}},2172:(e,t,n)=>{"use strict";n.d(t,{a:()=>o}),n(9952);var i=n(1344),r=n(8856);async function o(e){const{currentStartTime:t,nodes:n}=e,o=(new Date).getTime(),a=Math.abs(o-t)/n.length;for(const e of n){const t=e.costTime||0;(0,r.e)(e,{costTime:t+a,endTime:o}),await(0,i.mi)(e)}(0,r.e)(e,{currentStartTime:o})}},2524:(e,t,n)=>{"use strict";n.d(t,{w:()=>s});var i=n(8856),r=n(9193),o=n(1304),a=n(6796);async function s(e){const t=(0,a.k9)(e);(0,i.e)(e,{nodes:t});let n=null;if((0,a.O2)(e)){const t=(0,a.Oi)(e);n=t&&e.parsedPayload.nodeGroups.find((e=>e.id===t.origin.groupId))}if((0,i.e)(e,{inSingleGroup:n}),n&&n.renderAsTable){const o=(0,r.y)(t,n);(0,i.e)(e,{groupTable:o})}else(0,i.e)(e,{groupTable:void 0});const s=await(0,o.uC)(e);(0,i.e)(e,{prevButton:(0,o.Qb)(e),nextButton:s,needProgressBar:e.progressBarRequired&&"lottery"!==e.current.type})}},6348:(e,t,n)=>{"use strict";n.d(t,{U3:()=>u,i:()=>s,oP:()=>c});var i=n(5776),r=n(8856);let o,a={};const s={on(e,t){a[e]||(a[e]=[]),a[e].push(t)},off(e,t){e||(a={}),a[e]&&(a[e]=t?a[e].filter((e=>e!==t)):[])},one(e,t){const n=i=>{t(i),s.off(e,n)};s.on(e,n)},trigger(e,t={}){if(a[e])try{a[e].forEach((n=>n({type:e,...t,data:t},t)))}catch(e){(0,r.E3)().uploadLog(e)}}};function c(e){"gift"!==e.type&&(s.trigger("ANSWER_CHANGE",e),(0,i.CY)(e))}function u(e,t=!1){e!==o&&(s.trigger("SWITCH_NODE",e),o=e,t&&(0,r.W4)().hook.onSwitchPage())}},9193:(e,t,n)=>{"use strict";n.d(t,{y:()=>r});var i=n(556);function r(e,t){if(0===e.length)return;const n=e[0].loop.varList.map((t=>{const{text:n,uuid:i}=t,r=e.filter((e=>e.loop.replacements[0].uuid===i));return{uuid:i,title:n,cells:o(r)}})),i=n.reduce(((e,t)=>t.cells.length>e.cells.length?t:e),{cells:[]}),r=i.cells;n.forEach((e=>{e.cells=r.map((t=>e.cells.find((e=>e.node.nodeUuid===t.node.nodeUuid))||a(void 0)))}));const s=i.cells.map((e=>({uuid:e.node.nodeUuid,title:e.node.title})));return{title:t.tableTitle,header:s,rows:n}}function o(e){return e.map(a)}function a(e){const t=(null==e?void 0:e.renderId)||(0,i.YF)();return e.headHidden=!0,{uuid:t,node:e}}},7556:(e,t,n)=>{"use strict";n.d(t,{SA:()=>s,c5:()=>a}),n(7768);var i=n(3552),r=n(8348);function o(e){const t=":"+(0,r.yy)().LOOP_IMG.uuid,n="-0000-0000-0000-000000000000";return e.indexOf(n)&&(e=e.replace(n,t)),e}function a(e,t){return e.filter((e=>e.used)).map((e=>(function(e){const{image:t,options:n}=e;t&&(t.id=o(t.id)),n&&n.forEach((e=>{e.image&&(e.image.id=o(e.image.id))}))}(e),e.destList=e.destList.filter((e=>!e.designOnly)),function(e){const t=e;t.questionText=(0,i.q)(t.questionText),t.describe=(0,i.q)(t.describe);let n=[];t.options&&(n=n.concat(t.options)),t.otherOptions&&(n=n.concat(t.otherOptions)),t.optionsX&&(n=n.concat(t.optionsX)),t.optionsY&&(n=n.concat(t.optionsY)),n.forEach((e=>{e.text=(0,i.q)(e.text)}))}(e),e)))}function s(e){return e.forEach((e=>{e.value=(0,i.q)(e.value)})),e}},1304:(e,t,n)=>{"use strict";n.d(t,{eO:()=>X,ek:()=>z,ef:()=>Q,ID:()=>j,uC:()=>D,gv:()=>B,Qb:()=>G,Wf:()=>H,I7:()=>Y,e0:()=>K,YR:()=>M,ye:()=>F,KY:()=>q}),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(560),f=n(8956),p=n(8856),m=n(6496),g=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(e,t,n){const{actions:i}=t.origin;if(i&&!(0,y.K)()&&!(0,p.E3)().realTimePreview){if("forward_enter"===e){if(S[t.renderId])return;S[t.renderId]=!0}if("backward_leave"===e&&delete S[t.renderId],"forward_leave"===e){if(E[t.renderId])return;E[t.renderId]=!0}"backward_leave"===e&&delete E[t.renderId];for(const r of i){if(r.disabled||r.event!==e)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)({state:n,request:r.request,customParam:null,silent:!0});else{const i={state:n},o={question_id:t.nodeUuid,response_id:n.transactionID,locale:n.language,event:e,type:r.type};if("email"===r.type){const{email:e}=r,t={...o,email:(await(0,x.E3)(e.address,i)).replace(/\s/g,""),content:await(0,x.qQ)(e.content,i),title:(await(0,x.E3)(e.title,i)).trim()};await(0,_.G8)(t)}else{const{sms:e}=r,t={};for(const n of e.params)t[n.name]=(await(0,x.E3)(n.value,i)).trim();const n={...o,url:(await(0,x.E3)(e.url,i)).replace(/\s/g,""),content:t};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(e){let{prev:t}=e;const n=[];let i=t&&(0,o.S)(t);for(;i;)n.push({node:t,reason:i}),t=t.prev,i=t&&(0,o.S)(t);return{prev:t,skipList:n,current:e}}function G(e){if((0,p.E3)().realTimePreview)return"";const{prevEnabled:t,themeMode:n}=e,i=(0,C.Oi)(e),{prev:r}=U(i),o=i.type;return t&&n&&"end"!==o&&"lottery"!==o?e.prevBtnText:(0,p.E3)().preview&&"end"===o?(0,m.GS)(v.CW.global.backTest):t&&r&&(i.checkMode===r.checkMode||(0,p.E3)().preview)&&!W.includes(o)?e.inSingleGroup?e.inSingleGroup.prevText||e.prevBtnText||(0,m.GS)(v.CW.global.previous):e.prevBtnText:""}async function D(e){const{formalResult:t}=e,n=e.current;if((0,R.is)(n,"end"===n.type)){const i=n.endBtnText||(0,m.GS)(v.CW.global.go);if(n.linkUrl)return i;if(t&&t.reward||(0,p.E3)().preview&&n.origin.useReward)return n.qrCode||e.fakeCommitted?"":i;{const{target:t}=await g.G.findNext(e.nodeList,n,e);return t&&"lottery"===t.type?i:""}}if((0,R.is)(n,"lottery"===n.type)){const e=(0,m.GS)(v.CW.reward.get);return n.linkUrl?n.endBtnText||e:n.goal?n.qrCode?"":e:""}return e.inSingleGroup?e.inSingleGroup.nextText||e.nextBtnText||(0,m.GS)(v.CW.global.next):e.nextBtnText}function B(e,t){const n=[];let i=1;const r=e[t];let a=e[t+i],s=a&&(0,o.S)(a);for(;a&&s;)n.push({node:a,reason:s}),i+=1,a=e[t+i],s=a&&(0,o.S)(a);return{next:a,skipList:n,current:r}}async function q(e){const t=await(0,c.iW)(e.nodes,!0,(0,C.O2)(e));if(t.valid){if((0,C.O2)(e)){(0,p.e)(e,{current:e.nodes[e.nodes.length-1]});for(const t of e.nodes)await I("forward_leave",t,e)}else await I("forward_leave",e.current,e);return await(0,s.AD)(e,e.current,{type:"page_next",delay:200}),!0}return function(e,t){const{valid:n,message:r,dueToNode:o,dueToOption:a}=t,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"===t.type)throw(0,p.E3)().error(t.message),new Error("next vital error: "+t.message);"alert"===t.type?(0,p.E3)().alert(t.message):(e.inSingleGroup||(0,p.E3)().notify(t.message,t),(0,c.Oe)(t,e))}(e,t),!1}function F(e,t){(0,p.e)(e,{nextLoading:t})}function j(e){F(e,!0),P={state:e}}async function z(e){F(e,!1),P&&(await Y(P.state),P=void 0)}function V(e,t,n){(0,i.U3)({origin:t,parent:e},!0);const a={...(0,r.uK)(),rid:String(n.id),locale:e.language,qid:e.surveyId,rt:t.giftType};if("red_envelope"!==t.giftType||(0,p.E3)().preview)(0,u.ID)(n,t,e.theme,(0,o.q_)(e.nodeList)),(0,p.W4)().hook.beforeForceLeave(),(0,p.W4)().app.openWebLink((0,p.W4)().app.getRewardUrl(a)),(0,p.E3)().customAbort();else{const t={...a,tid:e.transactionID},{formalResult:{authorizer:{app_id:n,component_appid:i}}}=e;(0,p.W4)().auth.authorizeGift(n,i,t,"end"),(0,p.E3)().customAbort()}}function K(e,t){t.linkUrl?((0,p.W4)().hook.beforeForceLeave(),(0,p.W4)().app.openWebLink(t.linkUrl),(0,p.E3)().customAbort()):V(e,(0,o.o1)(e.nodeList,t.rewardRaw.gift_id),t.rewardRaw)}async function Y(e){const t=function(e){const{renderList:t}=e,n=e.nodes[e.nodes.length-1];return B(t,(0,s.SM)(t,n))}(e),{current:n,next:c}=t;return"end"===n.type?async function(e,t){const{linkUrl:n,origin:s}=t;if(n)return void(0,r.ML)(n);const c=(0,o.MR)(e.nodeList,s.destList,s.output&&s.output.uuid);if(!c)return;const d=(0,u.G3)(e,c);if((0,R.is)(c,"lottery"===c.type)){const t=await(0,l.yI)(c,d,e);(0,a.cR)(t,e,!(!d||!d.id)),(0,p.e)(e,{current:t}),(0,i.U3)(t,!0)}else V(e,c,d);await(0,O.w)(e)}(e,n):(await(0,p.W4)().hook.beforeGotoNext(),(await(0,d.e)(e,{valid:!0,message:""},n,c)).valid?(function(e){if((0,p.E3)().preview)return;const t=function(e){const{nodes:t,renderList:n}=e,i=t[t.length-1];let r=i,a=[r];for((0,C.ms)(i.nodeUuid,e.nodeGroups)&&(a=n.filter((e=>e.origin.groupId===i.origin.groupId)),r=a[0]);r.prev&&(0,o.S)(r.prev)&&!(0,C.ms)(r.prev.nodeUuid,e.nodeGroups);)a.unshift(r.prev),r=r.prev;return a}(e),n=t.map((e=>(0,L.cA)(e))).filter((e=>!!e));(0,p.W4)().network.pushSocket("update",{answers:n}),clearTimeout(N)}(e),async function(e,t){const{next:n,current:r}=t;(0,p.e)(e,{current:n}),n.reached=!0,(0,a.EZ)(r,n),(0,i.U3)(n,!0),(0,h.K8)(e),await(0,k.iq)(e),await(0,O.w)(e),F(e,!1),(0,o.CY)(r),(0,s.S_)(e,e.current),i.i.trigger("NEXT_OK")}(e,t)):F(e,!1))}async function H(e){const t=(0,C.Oi)(e),{prev:n,skipList:r}=U(t);if(n){if((0,C.ms)(t.nodeUuid,e.nodeGroups)){const t=[...e.nodes].reverse();for(const n of t)await I("backward_leave",n,e)}else await I("backward_leave",t,e);for(const t of r)await I("backward_enter",t.node,e),await I("backward_leave",t.node,e);if((0,p.e)(e,{current:n}),await(0,A.a)(e),(0,i.U3)(n,!0),(0,h.K8)(e),await(0,k.iq)(e),await(0,O.w)(e),(0,a.aS)(t,n),(0,s.S_)(e,e.current),i.i.trigger("PREV_OK"),(0,C.ms)(n.nodeUuid,e.nodeGroups)){const t=[...e.nodes].reverse();for(const n of t)await I("backward_enter",n,e)}else await I("backward_enter",n,e)}}async function Q(e,t){const{nodeList:n,current:i}=e,r=await(0,f.WU)(n,i,e),{target:o}=r;return o?X(e,r,t):null}async function X(e,t,n){const i=(0,l.e_)(t,e);if(n&&n(i))return null;if(e&&e.current&&"logic"===e.current.type){const t=(0,o.S)(e.current);t&&(0,a.U3)(e,e.current,t)}if(e&&e.current&&"uniqueness_verification"===e.current.type){const t=(0,o.S)(e.current);t&&(0,a.eK)(e,e.current,t)}const r=await(0,l.o9)(i,e.current);(0,p.e)(e,{current:r}),await I("forward_enter",r,e);const s=(0,o.S)(r);return s&&((0,a.YZ)(e,r,s),await I("forward_leave",r,e)),r}},8412:(e,t,n)=>{"use strict";n.d(t,{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(e){return e&&"end"!==e.type}function u(e,t){if(!e)return e;const n=e.parentRandomId||e.circleNode1Id;return n&&(e=u(e=(0,i.o1)(t,n),t)),e}function l(e,t){let n;t=u(t,e);const{output:o,destList:a}=t,{outputN:s}=t,l=(0,r.sf)(t);if(o&&(n=(0,i.MR)(e,a,o.uuid)),!c(n))if(s)n=(0,i.MR)(e,a,s.uuid);else if(l)for(const t of l)if(n=(0,i.MR)(e,a,t.uuid),c(n))break;return n}function d(e){return!s.includes(e.type)&&!e.autoSkip}function f(e){if((0,a.W4)().dev.infer)return;const{percent:t,index:n}=function(e){const t=function(e){const t=e.renderList.filter((e=>d(e.origin)));return(0,o.SM)(t,e.current)}(e),n=function(e,t){const{nodeList:n,current:i}=t;let r=e,o=l(n,i.origin);for(;o;)d(o)&&(r+=1),o=l(n,o);return"end"!==i.type&&(r+=1),r}(t,e);return-1===t?{index:-1,fullLength:n,percent:0}:{percent:Math.round(t/n*100),fullLength:n,index:t}}(e);n>-1&&(0,a.e)(e,{progress:t})}},9216:(e,t,n)=>{"use strict";n.d(t,{AD:()=>v,QL:()=>m,SM:()=>g,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 m(e,t){return t=t.toLowerCase(),e.find((e=>e.renderId.toLowerCase()===t))}function g(e,t){for(let r=0;r<e.length;r++){if(n=e[r],i=t,(0,a.oj)(n.renderId,i.renderId))return r}var n,i;return-1}function h(e,t){(0,s.e)(e,{refreshing:t})}function v(e,t,n){if(h(e,!0),clearTimeout(p),n.initial&&(0,l.U3)(e.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(e,t,n)}catch(e){o(e)}r()}),i)}))}return w(e,t,n)}function y(e,t){const{circleNode1Id:n}=t.origin;n?(0,s.e)(e,{loopStack:(0,a.O0)(t.loopStack)}):(0,s.e)(e,{loopStack:[]});const i=e.randomList,r=t.random;i.forEach((e=>{r?(0,a.oj)(e.node.nodeUuid,r.node.nodeUuid)?e.currentIndex=r.currentIndex:r.stack.some((t=>(0,a.oj)(e.node.nodeUuid,t.node.nodeUuid)))||(e.currentIndex=-1):e.currentIndex=-1}))}function _(e,t){const n=function(e,t){let n=e;if(!t)return n;for(const e of t)n+="-"+(0,a.kt)(e.option_id);return n}(t.node_id,t.loop_ctxs);return m(e.renderList,n)}async function w(e,t,n){h(e,!0);const a=e.renderList;y(e,t=t||e.current);const l=g(a,t),p=await async function(e,t,n){const a=n.type;let c=[...e.renderList];c=c.length>0?c:[t];const u=g(c,t);if(u<0)return c;c.length=u,c.push(t),(0,s.e)(e,{renderList:c}),(0,f.O2)(e)&&await(0,o.qc)(t);let l=null;const d=t=>!(0,f.ym)(t,l,e.nodeGroups);let p=null;for("page_inner"===a&&(l=t,p=d);;){const t=await(0,i.ef)(e,p);if(!t)break;if(c.push(t),f.AN.includes(t.type))break;if(!(0,r.S)(t)){if(l||(l=t,(0,f.ms)(l.nodeUuid,e.nodeGroups)&&(p=d)),!(0,f.ym)(l,t,e.nodeGroups))break;await(0,o.qc)(t)}}return c}(e,t,n),m=n.initial?(0,i.gv)(p,l).next:t;(0,s.e)(e,{current:m}),h(e,!1),y(e,t),await(0,d.w)(e),n.initial||(await(0,i.ek)(e),e.inSingleGroup&&(0,u.K8)(e)),(0,c.Y1)()}},1428:(e,t,n)=>{"use strict";n.d(t,{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),m=n(7320),g=n(5170),h=n(5224),v=n(2392),y=n(7828),_=n(4404),w=n(3132),x=n(5032);let b=null;function T(e,t){if((0,s.E3)().preview){const n={id:-1,code:"12345678"};if((0,a.is)(t,"gift"===t.type))return{...n,type:t.giftType,gift_id:t.nodeUuid};{const r=(0,a.my)(t.options,1)[0],o=(0,i.MR)(e.nodeList,t.destList,r.uuid);return{...n,type:o.giftType,gift_id:o.nodeUuid,lottery_id:t.nodeUuid,lottery_option_id:r.uuid}}}return e.formalResult.reward}function S(e,t,n,i){const r="custom"===t.giftType;if((0,s.E3)().preview||r){i.useCustomLogo&&(t.useCustomLogo=i.useCustomLogo,t.logoImage=i.logoImage,t.logoText=i.logoText,i.i18n&&Object.keys(i.i18n).forEach((e=>{const n=i.i18n[e];t.i18n[e].logoText=n.logoText})));const r={};"custom"===t.giftType?r.custom={giftNode:t,theme:n,qrCode:e.code,rewardId:e.id}:r.redEnvelope={theme:n,recipient:(0,h.x)(),gift:{id:e.id,title:t.activityName,description:t.blessings,config:{gift_name:""},origin:t},amount:t.giftCount,type:"red_envelope"},(0,s.W4)().storage.set("cached_reward",JSON.stringify(r))}}function E(e){const t=(0,s.W4)().storage.get("cached_reward");if(!t)return;const n=JSON.parse(t);let i;const{custom:r,redEnvelope:o}=n;return r?i=r.rewardId:o&&(i=o.gift.id),i===e?n:void 0}function I(){b=null}async function k(){if(b)return b;const e=(0,o.uK)(),{rt:t,rid:n,code:i,qid:a,tid:h,locale:T,reward_from_qr_code:S}=e;let I;(0,c.Uj)(T);let k,C={};if("red_envelope"===t){let t;(0,s.E3)().preview?t=E(Number(n)).redEnvelope:!i&&S?t=O:(n&&!i&&((0,s.W4)().auth.authorizeGift(e.aid,e.cid,e,"scan_qr_code"),(0,s.E3)().customAbort()),t=function(e){var t;const n=e.gift.origin,i={...e,gift:{...null==e?void 0:e.gift,origin:{...null===(t=null==e?void 0:e.gift)||void 0===t?void 0:t.origin,i18n:{},logoText:""}}};if(!n)return i;const r=n.i18n;if(!r)return i;const o={};return Object.keys(r).forEach((e=>{const t=r[e];o[e]={activityName:t.gift_name,blessings:t.gift_wishing,endBtnText:t.end_btn_text,logoText:t.logo_text}})),i.gift.origin.i18n=o,i}(await(0,m.MT)({code:i},n)));const{gift:r,theme:o,isTemporaryForWXQrcode:u}=t;I=r.origin,C=t.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 e=E(Number(n));if(!e)return(0,s.E3)().error((0,c.GS)(p.CW.global.invalidReward)),null;const{custom:t}=e;I=t.giftNode,k={qrCode:t.qrCode,rewardToMessage:I.needSendNote,theme:t.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:{...g._,async handlePrevClick(){(0,s.W4)().app.gotoStartPage((0,o.uK)())},handleOptionClick:async(e,t)=>(await(0,u.o)(e,t)).result,handleQuestionInput:async(e,t)=>(await(0,l.s)(e,t)).result,async handleNextClick(){I.linkUrl&&(0,o.ML)(I.linkUrl)},async handleGetRewardWX(){(0,s.W4)().auth.authorizeGift(e.aid,e.cid,e,"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:(e,t,n)=>{"use strict";n.d(t,{ML:()=>p,YP:()=>m,m0:()=>h,wH:()=>g}),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(e,t){const n=(0,u.Wo)(e.result);return e&&(0,a.mK)(n)?(setTimeout((()=>{(0,r.ML)(n)})),{type:"LINK",done:!0}):{type:t,done:!0}}async function p(e,t){let n="";const{parsedPayload:{surveyMeta:{collector:r}}}=e;if(!r)return;const{sampler_config:o}=r;o&&(n=o[t]||"");const a="BACKEND:";if(!n||0!==n.indexOf(a))return;const s=n.replace(a,"").split("&"),c={};for(const t of s){const[n,r]=t.split("=");c[n]=await(0,i.cb)(r,e)}return c}async function m(e,t){const{parsedPayload:{surveyMeta:{collector:{sampler_config:n}}}}=t,a=n&&n[e];if(!a)return o.i.trigger("SAMPLER_TRANSFER",{method:"ABORT"}),{type:"ABORT",done:!1};const u=a.trim(),p=u.startsWith("{{")&&u.endsWith("}}"),m=await(0,i.cb)(u,t,!p);return m.trim().startsWith("BACKEND")?{type:"BACKEND",done:!0}:m.trim().startsWith("http")?async function(e,t){return(0,r.ML)(t),o.i.trigger("SAMPLER_TRANSFER",{method:"LINK",url:t,type:e}),{type:"LINK",done:!0}}(e,m):async function(e,t,n){const i=n.indexOf(":"),a=n.substring(0,i).toUpperCase(),u=n.substring(i+1),p=u.indexOf("?"),m=-1===p?u:u.substring(0,p);let g={};if(-1!==p){const e=-1===p?"":u.substring(p);e&&(g=e?(0,r.Yj)(e):{})}let h={type:a,done:!1};if("FAKE"===a)h=f(await(0,c.E)({url:m,data:(0,l.a8)(g,e),silent:!1,responseId:null==e?void 0:e.transactionID}),a);else if("GET"===a||"POST"===a){const e="GET"===a?"GET":"POST";try{h=f(await(0,s.SY)(m,{type:e,data:g}),a)}catch(e){(0,d.E3)().uploadLog("数据转移接口出错"+JSON.stringify(e),"warning")}}return o.i.trigger("SAMPLER_TRANSFER",{url:m,data:g,method:a,type:t}),h}(t,e,m)}function g(e){return"LINK"===e.type&&e.done}async function h(e){var t,n;const{context:r}=e,o=r.node,a=null!==(n=null===(t=null==o?void 0:o.backendRequest)||void 0===t?void 0:t.params)&&void 0!==n?n:[],s={};for(const t of a){const{name:n,value:r}=t;s[n]=await(0,i.E3)(r,{state:e,joinBy:","})}return 0===a.length?void 0:s}},6796:(e,t,n)=>{"use strict";n.d(t,{AN:()=>u,O2:()=>c,Oi:()=>a,k9:()=>s,ms:()=>o,ym:()=>l});var i=n(5776),r=n(8856);function o(e,t){return t.some((t=>t.singlePage&&t.nodes.includes(e)))}function a(e){return s(e)[0]||e.current}function s(e){const{current:t,renderList:n}=e,a=[t],s=n.indexOf(t);let c=s-1,u=t;for(;;){const t=n[c--];if(!l(t,u,e.nodeGroups))break;(0,i.S)(t)||(a.unshift(t),u=t)}let d=s+1,f=t;for(;;){const t=n[d++];if(!l(t,f,e.nodeGroups))break;(0,i.S)(t)||(a.push(t),f=t)}return o(a[0].nodeUuid,e.nodeGroups)&&(a.forEach((e=>{(0,r.e)(e,{pageEnd:!1,pageStart:!1})})),(0,r.e)(a[0],{pageStart:!0}),(0,r.e)(a[a.length-1],{pageEnd:!0})),a}function c(e){const t=a(e);return t&&o(t.nodeUuid,e.nodeGroups)}const u=["end","lottery","gift"];function l(e,t,n){return!(!e||!t)&&!u.includes(e.type)&&!u.includes(t.type)&&o(e.nodeUuid,n)&&o(t.nodeUuid,n)&&function(e,t){return!(!e.origin.groupId||!t.origin.groupId||t.origin.groupId!==e.origin.groupId)&&(!t.loop&&!e.loop||!(t.loop&&!e.loop||!t.loop&&e.loop||t.loop.destInputId!==e.loop.destInputId||t.loop.node.groupId!==t.origin.groupId&&t.loop.currentIndex!==e.loop.currentIndex))}(e,t)}},560:(e,t,n)=>{"use strict";n.d(t,{S:()=>S,e:()=>E});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),m=n(568),g=n(2352),h=n(2524),v=n(7801),y=n(6620);const _={valid:!0,message:""},w={valid:!1,message:""};let x=!1,b=!1,T=!1;function S(){x=!1,b=!1,T=!1}function E(e,t,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}),I(e,t,r)}async function I(e,t,n){const S=n.pop(),E=await async function(e,t,n,S){const E=n.checkMode,I=S.checkMode,N=S.type;if("end"===N&&(clearInterval(e.timer),(0,f.e)(e,{limitTime:void 0})),(0,f.E3)().preview)return t;if(E){if("end"===N)return async function(e,t,n){if(T)return w;(0,f.W4)().network.closeSocket(),T=!0;const u=k(e,n);(0,c.ye)(e,!0),(0,v._)(e,"all"),await(0,f.W4)().hook.beforeEndSurvey(e);try{const t=await(0,o.gp)(e,"all","examine_skipped_url"),n=await(0,r.eI)(t,e.transactionID);e.responseStatus=n.status,await(0,f.W4)().hook.onEndSurvey(e)}catch(t){const n=(0,g.Wo)(t?JSON.stringify(t):"")||"";return(0,f.E3)().uploadLog("skip提交失败 "+n,"warning"),(0,f.E3)().notify((0,p.GS)(m.CW.global.tryAgain)),T=!1,(0,c.ye)(e,!1),w}i.i.trigger("CHECK_FAIL"),(0,f.W4)().network.closeSocket();try{await(0,d.ig)(e),u||(0,a.W2)(t,n,e),await(0,s.Ed)(e,n),(0,c.ye)(e,!1),O(e);const i=await(0,l.YP)("examine_skipped_url",e);if((0,l.wH)(i))return w}catch(e){(0,f.E3)().uploadLog("skip提交后续处理失败"+JSON.stringify(e),"warning")}return _}(e,n,S);if(!I)return async function(e){if(b)return w;b=!0,(0,c.ye)(e,!0);const t=await(0,o.gp)(e,"check","examine_failed_url"),n=t.answers.length;(0,v._)(e,"check");try{const o=await(0,r.KY)(t,e.transactionID);return(0,a.Sg)(e,n),(0,c.ye)(e,!1),e.responseStatus=o.status,i.i.trigger("CHECK_SUBMIT"),_}catch(t){await(0,f.W4)().hook.onEndSurvey(e),await(0,d.ig)(e);const i=(0,r.SC)(t);return L(i)?await C(e,n,"examine_failed_url",i):(b=!1,(0,f.E3)().uploadLog(JSON.stringify(t),"warning"),(0,f.E3)().notify((0,p.GS)(m.CW.global.tryAgain))),(0,c.ye)(e,!1),w}}(e)}return"end"===N?async function(e,t){var n;if(x)return w;(0,f.W4)().network.closeSocket(),x=!0;const b=k(e,t)||function(e,t){const{renderList:n,startTime:i}=e,r=function(e,t){const n=(0,p.GS)(m.CW.global.notTarget),{minTime:i,timeLessText:r}=e;return i&&i>t?r||n:""}(e,Math.ceil((Date.now()-i)/1e3));if(r){e.fakeCommitted=!0;const i=n[n.length-1];return(0,f.e)(i,{hasReward:!1,title:r}),(0,a.kB)(t,e),!0}return!1}(e,t);(0,c.ye)(e,!0),(0,v._)(e,"normal");const T=await(0,o.gp)(e,"normal","committed_url");let S,E;await async function(e,t,n){const i=t.verifyUniquenessUri,r=t.uniquenessVerification;if(i&&r.enabled&&n.origin.doUniquenessVerification&&!(0,f.E3)().preview){const n=await(0,y.aI)(t,r.params,!1);Object.keys(n).length>0&&(e.verification_params=n)}}(T,e,t),await(0,f.W4)().hook.beforeEndSurvey(e);try{S=await(0,r._K)(T,e.transactionID);const t=S.response||S;e.responseStatus=t.status,await(0,f.W4)().hook.onEndSurvey(e)}catch(t){const o=(0,r.SC)(t);if(L(o))await C(e,T.answers.length,"examine_failed_on_commit_url",o);else if(o===r.aS.response_overflow){O(e);const t=await(0,l.YP)("overflow_url",e);(0,l.wH)(t)||e.ignoreSubmittingResult||(0,f.E3)().error((0,r.O)(o)),e.responseStatus="committed",i.i.trigger("QUOTA_FAIL"),(0,f.W4)().network.closeSocket()}else{const i=null!==(n=(0,g.Wo)(t?JSON.stringify(t):""))&&void 0!==n?n:"";(0,f.E3)().uploadLog("正式提交失败: "+i,"warning"),e.ignoreSubmittingResult||(0,f.E3)().notify((0,p.GS)(m.CW.global.tryAgain)),(0,c.ye)(e,!1),x=!1}if(!e.ignoreSubmittingResult)return w;await(0,f.W4)().hook.onEndSurvey(e),S={}}e.formalResult=S;try{await(0,s.Ed)(e,t),b?E=await(0,l.YP)("invalid_url",e):((0,a.kv)(t,e,T.answers.length,S),S.reward&&(0,f.e)(t,{hasReward:!0}),await async function(e,t){const{formalResult:{reward:n}}=t;if(n&&"red_envelope"===n.type&&!n.lottery_id&&!(0,f.W4)().app.canHandleReward())return(0,u._M)(t,e)}(t,e),E=await(0,l.YP)("committed_url",e))}catch(e){(0,f.E3)().uploadLog("正式提交后续处理错误"+JSON.stringify(e))}return await(0,d.ig)(e),(0,c.ye)(e,!1),O(e),i.i.trigger("FULL_SUBMIT"),await(0,h.w)(e),(0,l.wH)(E)?w:_}(e,S):t}(e,t,S.prev,S.next);return 0===n.length||"vital"===E.type?E:I(e,E,n)}function k(e,t){const{oneReplyPerTerminal:n,sid:i}=e;return!!t.origin.abandonAnswer&&(e.fakeCommitted=!0,(0,a.kr)(t,e),n&&(0,f.W4)().storage.set(i,"1"),!0)}function O(e){const{oneReplyPerTerminal:t,sid:n}=e;t&&(0,f.W4)().storage.set(n,"1")}async function C(e,t,n,o){(0,a.ms)(e,t),O(e);const s=await(0,l.YP)(n,e);(0,l.wH)(s)||(0,f.E3)().error((0,r.O)(o)),e.responseStatus="examine_failed",i.i.trigger("QUOTA_FAIL"),(0,f.W4)().network.closeSocket()}function L(e){return e===r.aS.quota_not_match||e===r.aS.quota_full}},9948:(e,t,n)=>{"use strict";n.d(t,{Gg:()=>z,q0:()=>X,ER:()=>H,Y1:()=>q});var i=n(5776),r=n(8956),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),m=n(7788),g=n(9216),h=n(7320),v=n(7556),y=n(560),_=(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 q=(0,k.Cu)((()=>{(0,T.E3)().realTimePreview||K()||w.i.trigger("STRETCH_OK")}));function F(e){return!K()&&!(0,W.i)(e,!0)}function j(e){(0,b.K)()||(e.answerChangedSinceStart=!0)}function z(e){e.handleEvents={...I._,handleQuickAnswer:t=>(j(e),(0,N.E)(t)),async handleLangChange(e){await(0,S.Sk)(e.locale,!0)},async handleCascadeInput(e,t,n,i){if(!F(i))return null;const r=(0,_.cv)(e,t,n,i);return this.handleOptionInput(e,r,i).then((e=>e))},handleOptionAssistInput:(t,n,i,r)=>((0,T.e)(i.assistValue,{[n]:t}),j(e),Y({result:!0},r)),handleCascadeClick:async(e,t,n)=>F(n)?Y(await(0,_.GA)(e,t,n),n).then((e=>e)):null,async handleMenuClick(e,t){const n=()=>t.options.filter((e=>e.selected)).map((e=>e.text));return F(t)?(await this.handleOptionClick(t.options[e],t),n()):n()},async handleOptionClick(t,n){if(!F(n))return null;const i=await(0,c.o)(t,n);return i.result&&(0,p.me)(t,n),j(e),Y(i,n).then((e=>e))},async handleOptionInput(t,n,i){if(!F(i))return null;const r=await(0,s.wf)(t,n,i);return r.result&&(0,p.ui)(t,n,i),j(e),Y(r,i).then((e=>e))},handleAutoCpltInput:async(e,t,n)=>((0,s.I5)(e,t,n),(0,p.Ux)(e,t,n)),async handleSequenceInput(t,n,i,r){if(!F(i))return null;const o=r.sortNo,a=await(0,d.W)(t,n,i),s=r.sortNo;if(a.result&&o!==s){const e=i.options.findIndex((e=>e===r));(0,p.we)(e,i)}return j(e),Y(a,i).then((e=>e))},async handleQuestionInput(t,n){if(!F(n))return null;const i=await(0,u.s)(t,n);return i.result&&(0,p.Oo)(t,n),j(e),Y(i,n).then((e=>e))},handleLocateFailed(t){const n=(0,u.S)(t);return n.result&&(0,p.m_)(t),j(e),Y(n,t).then((e=>e))},async handlePrevClick(){if(!(0,T.E3)().realTimePreview&&!V()&&e.prevButton&&!K())return(0,p.Id)(e.current),(0,o.Wf)(e).then((e=>e))},handleMaxDiffInput(t,n,i,r){if(!F(r))return null;const o=(0,l.w)(t,n,i);return j(e),Y(o,r).then((e=>e))},async handleNextClick(){if((0,T.E3)().realTimePreview||K()||V()&&(0,o.YR)())return;(0,o.ye)(e,!0),await(0,G.a)(e);const{current:t}=e;if((0,p.GS)(t),"lottery"===t.type)(0,o.e0)(e,t),(0,o.ye)(e,!1);else if(await async function(e){const t=e.filter((e=>!!e.origin.backtracking));let n=!1;for(const e of t){const{origin:{backtracking:t},parent:i}=e;if(t.targetNodeUuid){const{logic:r,request:o}=t;let a=await(0,m.qo)(o,e);if(a.valid&&(a=await(0,m.YZ)(r,i)),n=a.valid,n)return(0,T.e)(i,{current:e}),n}}return n}(e.nodes))await async function(e){await(0,k.W_)(200);const t=e.current,{backtracking:{targetNodeUuid:n}}=t.origin,r=await async function(e,t){const n=[...e.renderList].reverse(),r=n.findIndex((e=>(0,k.oj)(e.nodeUuid,t)));for(let e=r;e>=0;e--){const t=n[e];if(!(0,i.S)(t))return t}return n[r]}(e,n);return await async function(e,t){const{renderList:n}=e,i=n.findIndex((e=>e.renderId===t.renderId)),r=n.slice(i).map((({renderId:e})=>e));await(0,x.Yp)(e,r),(0,T.e)(e,{current:t});const a=(0,M.k9)(e),s=a.indexOf(t),c=a.slice(s),u=[];let l=t.prev;for(const t of c){const{origin:n,loop:i,random:r,loopStack:o}=t,a=(0,f.e_)({target:n,loop:i,random:r,loopStack:o},e),s=await(0,f.o9)(a,l);l=s,u.push(s)}await(0,T.W4)().hook.beforeGotoNext(),(0,T.e)(e,{current:u[0],nodes:a.slice(0,s).concat(u),renderList:n.slice(0,i).concat(u)}),(0,o.ye)(e,!1),w.i.trigger("NEXT_OK"),(0,w.U3)(e.current,!0)}(e,r),(0,O.K8)(e),await(0,x.iq)(e),await(0,P.w)(e),r}(e),(0,o.ye)(e,!1);else if(await(0,o.KY)(e)){if(!V())return(0,o.I7)(e);(0,o.ID)(e)}else(0,o.ye)(e,!1)}},Object.keys(e.handleEvents).forEach((t=>{const n=e.handleEvents[t];e.handleEvents[t]=async(...t)=>{(0,g.S_)(e,e.current);const i=await n.apply(e.handleEvents,t);return(0,g.S_)(e,e.current),i}}))}function V(){return(0,T.E3)().surveyState.refreshing}function K(){return(0,T.E3)().surveyState.nextLoading||V()}async function Y(e,t){(0,B.kZ)(t)&&await(0,D.e)(t),(0,w.U3)(t),await(0,x.mi)(t);const n=t.parent;return(0,T.E3)().realTimePreview||(n.inSingleGroup?((0,T.e)(n,{current:t}),await(0,g.AD)(n,t,{type:"page_inner",delay:60})):q()),(0,w.oP)(t),e.result}function H(e,t={}){return e=e||(0,T.E3)().surveyState,(0,T.e)(e,{renderList:[],current:null,loopStack:[],randomList:[],...t}),Q(e)}async function Q(e){(0,o.ye)(e,!0);const t=e.nodeList,n=(0,i.q_)(t),a=await(0,r.kF)(t,e,n);!function(e,t){const n=(new Date).getTime();(0,T.e)(e,{nextBtnText:t.nextBtnText||(0,S.GS)(C.CW.global.next),prevBtnText:t.prevBtnText||(0,S.GS)(C.CW.global.previous),prevEnabled:!0===t.goBackEnabled,startTime:n,currentStartTime:n})}(e,n),await(0,o.eO)(e,a,null);const{current:s}=e,c=(0,i.S)(s),u=(0,M.O2)(e);if(c||u){const t=u?"page_inner":"page_next";await(0,g.AD)(e,s,{type:t,initial:!0})}else(0,T.e)(e,{renderList:[s]}),await(0,P.w)(e),q();(0,O.K8)(e);const l=e.current;return l.reached=!0,(0,p.IU)(e,l),w.i.trigger("START_OK"),await(0,x.aC)(e),s!==l&&await(0,y.e)(e,{valid:!0,message:""},s,l),(0,w.U3)(e.current,!0),(0,o.ye)(e,!1),e}async function X(){const e=(0,T.W4)();if((0,T.E3)().surveyState)return(0,T.E3)().surveyState;const t=await async function(){const e=(0,T.E3)().sid,t=(0,T.E3)().startState;if(!t)return(0,T.W4)().app.gotoStartPage((0,R.uK)()),(0,T.E3)().customAbort(),null;if((0,T.E3)().preview)return t;const{parsedPayload:{surveyMeta:n}}=t,{payload_digest:i,channel:r,interviewee:o}=n;!function(e,t){(0,T.W4)().dev.autoRun||(0,T.W4)().storage.get(e)&&t&&!(0,T.E3)().preview&&((0,T.E3)().error((0,S.GS)(C.CW.global.antiAgain)),(0,T.E3)().customAbort())}(e,!1===n.collector.multiple_response);const a={code:e,payload_digest:i,platform:r.type,interviewee_id:o&&o.id,query_params:(0,R.uK)()};try{const e=await(0,h._Y)(a);return t.transactionID=e.id,t.status=e.status,t.platform=e.platform,t.digest=i,t.channel=r,(0,T.W4)().network.connectSocket(e.id,n.collector.id),t}catch(e){throw(0,h.cA)(e),e}}();if(!t)return null;await async function(e){const{parsedPayload:t,startNode:n,language:i}=e;if(!(0,T.E3)().preview&&!t.surveyMeta.start_auto){const{surveyMeta:{diagram_url:e}}=t;let n;try{n=await(0,h.kj)(e,{type:"GET"},!0)}catch(e){throw(0,T.E3)().error((0,S.GS)(C.CW.global.downloadError)),e}const i=await(0,L.K)(n);t.nodeList=(0,v.c5)(i.nodes,t.nodeGroups),t.uniquenessVerification=i.uniquenessVerification}(0,E.O_)(n.autoCpltGroups,i);const{nodeList:r,variables:o,nodeGroups:a}=t;if(n.currentLang!==i){const e=t.langs.find((e=>e.locale===i));if(e){const t=await async function(e,t){if(!U[e.locale]){const t=async()=>{let t;if(e.content)t=e.content;else{const n=await(0,h.kj)(e.url,{type:"GET"},!0);t=await(0,L.K)(n)}return t};U[e.locale]=t()}return U[e.locale]}(e);(0,E.w3)({nodes:r,variables:o,groups:a},t)}}}(t);const n=function(e){const{parsedPayload:t,userInfo:n,theme:i,hasVar:r,sid:o,langTable:s,startNode:c,surveyId:u,summary:l,language:d,images:f,langResume:p,title:m,transactionID:g,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}=e,{nodeList:R,surveyMeta:P,testCases:M,uniquenessVerification:W}=t;let U=!1;(0,A.U)()||P.collector&&(U=!1===P.collector.multiple_response);const{fakedServers:G,autoCpltGroups:D,noWxShare:B,previewShadowNodes:q,previewQuickAnswer:F,ignoreSubmittingResult:j,qNumberRequired:V,asterisksRequired:K,progressBarRequired:Y,nodeTypeInfoRequired:H,limitTime:Q,minTime:X,timeoutText:Z,timeLessText:J,resumeEnabled:$}=c,ee={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:q&&!(0,T.W4)().dev.autoRun,previewQuickAnswer:F,ignoreSubmittingResult:j,langResume:p,langTable:s,testCases:M,progress:0,resumeEnabled:$||(0,A.U)(),images:f,eventHub:w.i,language:d,sid:o,parsedPayload:t,digest:y,channel:_,transactionID:g,status:h,platform:v,fakedServers:G,autoCpltGroups:D,noWxShare:B,theme:i,userInfo:n,responseStatus:"created",context:{node:void 0,option:void 0},completeUrl:"",quotaFullUrl:"",screenOutUrl:"",title:m,summary:l,bonusLimitTime:"",nodeList:R,companyID:"",oneReplyPerTerminal:U,surveyId:u,qNumberRequired:V,asterisksRequired:K,progressBarRequired:Y,nodeTypeInfoRequired:H,preview:(0,T.E3)().preview,nextBtnText:"",prevBtnText:"",prevEnabled:!1,randomList:[],loopStack:[],startTime:0,currentStartTime:0,renderList:[],current:void 0,limitTime:Q||void 0,minTime:X,timeoutText:Z||"",timeLessText:J||"",timer:-1,restTime:(0,a.KM)(Q),hasVar:r,nextLoading:!1,refreshing:!1,phoneUsed:!1,phoneNumber:"",startNode:c,nodes:[],prevButton:"",nextButton:"",inSingleGroup:null,needProgressBar:!1,verifyUniquenessUri:P.verify_uniqueness_uri,uniquenessVerification:W};return z(ee),ee}(t);return(0,T.E3)().surveyState=n,e.network.initUploader(),await async function(e){const{startNode:t}=e,n=(0,f.e_)({target:t},e),i=await(0,m.qc)(n,!0);i.valid?e.initValidationPassed=!0:((0,T.E3)().error(i.message||(0,S.GS)(C.CW.verify.failed)),(0,T.E3)().customAbort())}(n),await async function(e){if(await Q(e),function(e){let t=e.limitTime;t&&(e.timer=setInterval((async()=>{t--,t||((0,p.sH)(e),clearInterval(e.timer),(0,x.ig)(e),(0,T.E3)().error(e.timeoutText||(0,S.GS)(C.CW.global.timeOver))),(0,T.e)(e,{restTime:(0,a.KM)(t)})}),1e3))}(e),e.langResume||e.resumeEnabled&&!(0,T.E3)().preview){const t=await(0,b.y)(e);(0,T.e)(e,{answerResumer:t}),e.langResume&&setTimeout((()=>e.answerResumer.handleSure()),1e3)}e.answerResumer&&e.answerResumer.show||(0,T.W4)().hook.onStartNewSurvey(e)}(n),await e.hook.afterFetchSurvey(n),n}},5170:(e,t,n)=>{"use strict";n.d(t,{_:()=>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(e){const t=l[e]||0;return Date.now()-t<3e4?((0,s.E3)().notify((0,c.GS)(i.CW.verify.tooFrequent)),null):()=>{l[e]=Date.now()}}const f={handleInputPhone(e,t){return this.handleQuestionInput({phoneNumber:e},t)},handleInputCode(e,t){return this.handleQuestionInput({code:e},t)},handleAutoLocate(e,t){return this.handleQuestionInput(e,t)},handleManualLocate(e,t){return this.handleQuestionInput(e,t)},handleGetCodeClick:e=>async function(e){return(0,u.is)(e,"verify"===e.type)?async function(e){const{parent:t,nodeUuid:n,phoneNumber:u,validateType:l}=e,{transactionID:f}=t;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(e.renderId);if(!n)return!1;p={...p,phone_num:u},e.messageGetFailed=!1;try{const i=await(0,a.eY)(p);e.serverValidations=i,t.phoneNumber=u,t.phoneUsed=i.phone_num_used,t.phoneUsed&&(0,o.U1)(t,e),n()}catch(t){return e.messageGetFailed=!0,!1}}else if("image"===l){const t=await(0,a.eY)(p);e.serverValidations=t,(0,s.e)(e,{captcha:t.image})}return!0}(e):async function(e){if((0,s.E3)().preview)return(0,s.E3)().notify((0,c.GS)(i.CW.preview.noMessage)),!1;const{phoneNumber:t,rewardId:n}=e;if(!(0,r.KA)(t))return(0,s.E3)().notify((0,c.GS)(i.CW.fill.needPhoneNumber)),!1;const o=d(e.renderId);if(!o)return!1;e.messageGetFailed=!1;try{await(0,a.ae)({phone_num:t},n),o()}catch(t){return e.messageGetFailed=!0,!1}return!0}(e)}(e)}},3120:(e,t,n)=>{"use strict";n.d(t,{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(e,t){return(0,i.oV)(t)||e.length<=t?[...e]:s(e.map((e=>({...e.option,cascade:e}))),t).map((e=>e.cascade))}function s(e,t){return(0,i.oV)(t)||e.length<=t?[...e]:d(e.map((e=>{const t=e.origin.inferList.reduce(((e,t)=>(t.active&&"select"===t.type&&(e+=t.weight),e)),0);return{option:e,weight:t}})),t).map((e=>e.option))}function c(e){return e.filter((e=>{const{option:t}=e;return!(!t||!t.origin.inferList)&&t.origin.inferList.some((e=>e.active))}))}function u(e,t){return e.filter((e=>e.origin.inferList.some((e=>e.active&&e.type===t))))}async function l(e,t){if(!e)return;const n=t.parent;e.origin.inferList=e.origin.inferList||[];for(const t of e.origin.inferList){const{activeConfig:i}=t;i?(n.context.option=e,t.active=await(0,r.wx)(n,i),n.context.option=null):t.active=!0}}function d(e,t){if(e=[...e],(0,i.oV)(t)||e.length<=t)return e;const n=e.reduce(((e,t)=>e+t.weight),0);let r=0,o=0,a=e.map((e=>{const t=e.weight/n;o=r+t;const i={item:e,floor:r,ceil:o};return r=o,i}));const s=[];for(;s.length<t;){const e=Math.random()*o,t=a.find((t=>t.floor<=e&&t.ceil>e));t&&(s.push(t.item),a=a.filter((e=>e!==t)))}return s}async function f(e,t){const{parent:n}=t,i=[];for(const t of e)i.push(await(0,o.E3)(t.candidates,{state:n,joinBy:","}));return i.join(",")}function p(e){const t={},n=[];return e.split(",").forEach((e=>{let i=e,r=1;const o=e.match(/\(([\d\.]+)\)$/);o&&(i=e.replace(/\([\d\.]+\)$/,""),r=parseFloat(o[1]));const a=t[i];if(a)a.weight+=r;else{const e={text:i,weight:r};n.push(e),t[i]=e}})),n.filter((e=>0!==e.weight))}},1488:(e,t,n)=>{"use strict";n.d(t,{A9:()=>g,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(e,t){let{start:n,end:i}=await(0,o._u)(e,t);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(e,t,n){return!!t&&t.some((t=>{if(t.startsWith("/")&&t.endsWith("/")){const n=t.substring(1,t.length-1),i=new RegExp(n);return!!e.match(i)}return n?n(e,t):e===t}))}async function d(e,t,n){let i=0,r=await e();for(;l(r,t,n);)if(r=await e(),i++,i>10)throw new Error("Hard to infer, rejected 10 times");return r}async function f(e,t,n=1){if(!e.origin.inferList)return{value:"",antis:null};const i=e.origin.inferList.filter((e=>e.active&&"input"===e.type));if(0===i.length)return{value:"",antis:null};const r=await(0,a.eQ)(i,t);if(""===r.replace(/,/g,""))return{value:"__FORCE_EMPTY__",antis:null};const o=[];if(r.split(",").forEach((e=>{e.startsWith("!")?o.push(e.substring(1)):e.match(/\(0\)$/)&&o.push(e.replace(/\(0\)$/,""))})),o.length)return{value:"",antis:o};const s=(0,a.wJ)(r);return{value:(0,a.CI)(s,n).map((e=>e.text)).join(","),antis:null}}function p(){return"1"+h(1e9,9999999999)}function m(e){return c[e]||Math.random().toString().replace("0.","")}async function g(){return c||(c=await(0,s.kj)("https://media.choiceform.com/infer/infer.json",{type:"GET",contentType:"application/json"},!1),c)}function h(e=0,t=10,n=0){const i=Math.pow(10,n);return e*=i,t*=i,((0,r.ai)(e,t)/i).toString()}function v(e,t=1,n=10){const i=Math.min(1e4,n);let o=m(e);for(;o.length<i;)o+=m(e);const a=o.length,s=(0,r.ai)(i,a),c=s-(0,r.ai)(t,i),u=o.substring(c,s);return""===u.trim()?v(e,t,i):u}function y(e=0,t=5e3,n=3){e=Math.max(e,0),t=Math.min(t,5e3);let i=(0,r.ai)(e,t).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(e,t){const n=_[e.origin.fillType]||_.none,i=await n(e,t);return"__FORCE_EMPTY__"===i?"":i}_.auto_complete=async(e,t)=>{let{completeGroups:n}=e;const{itemsMax:o,itemsMin:a}=await(0,i.jJ)(e,t),s=(0,r.ai)(a,o)||1,{value:c,antis:u}=await f(e,t,s);return c||(u&&(n=n.filter((e=>!l(e.name,u)))),(0,r.my)(n,s).map((e=>e.name)).join(","))},_.chars=async(e,t)=>{const{value:n,antis:i}=await f(e,t);if(n)return n;const{tolerance:r}=e.origin,{start:o,end:a}=await u(e,t);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"===t.parent.language?"chinese":"alphabet",o,a):v("zh_cn"===t.parent.language?"chinese":"alphabet",o,a)),i)},_.date=async(e,t)=>{const{value:n,antis:i}=await f(e,t);if(n)return n;const{grade:r}=e,{start:o,end:a}=await u(e,t);return d((()=>y(o,a,r)),i)},_.date_range=async(e,t)=>{const{value:n,antis:i}=await f(e,t);if(n)return n;const r=y(1960,2050,3),o=Number(r.split(" ")[0]);return d((()=>{const e=y(o,2060);return r+" - "+e}),i)},_.email=async(e,t)=>{const{value:n,antis:i}=await f(e,t);return n||d((()=>((0,r.Av)(1,6)+"@"+(0,r.Av)(1,6)+"."+(0,r.Av)(1,4)).toLowerCase()),i)},_.float=async(e,t)=>{const{value:n,antis:i}=await f(e,t);if(n)return n;const{scale:r}=e;return d((async()=>{const{start:n,end:i}=await u(e,t);return h(n,i,r)}),i)},_.integer=async(e,t)=>{const{value:n,antis:i}=await f(e,t);if(n)return n;const{start:r,end:o}=await u(e,t);return d((()=>h(r,o)),i)},_.list_select=async(e,t)=>{let{selectList:n}=e;const{itemsMax:o,itemsMin:a}=await(0,i.jJ)(e,t),s=(0,r.ai)(a||1,o||1)||1,{value:c,antis:u}=await f(e,t,s);return c||(u&&(n=n.filter((e=>!l(e,u)))),(0,r.my)(n,s).join(","))},_.none=async(e,t)=>{const{value:n,antis:i}=await f(e,t);return n||d((()=>v("zh_cn"===t.parent.language?"chinese":"alphabet",1,10)),i)},_.phone_number=async(e,t)=>{const{value:n,antis:i}=await f(e,t);return n||d((()=>p()),i)},_.postcode=async(e,t)=>{const{value:n,antis:i}=await f(e,t);return n||await d((()=>h(1e5,999999)),i)},_.time=async(e,t)=>{const{value:n,antis:i}=await f(e,t);return n||await d((()=>h(1,25)+":"+h(1,60)),i)},_.time_range=async(e,t)=>{const{value:n,antis:i}=await f(e,t);return n||await d((()=>{const e=h(1,20);return e+":"+h(1,60)+" - "+h(Number(e)+1,24)+":"+h(1,60)}),i)},_.time_duration=async(e,t)=>{const{value:n,antis:i}=await f(e,t);if(n)return n;const{grade:r}=e;return await d((()=>{if(r<=3){let e=h(1,20)+"d";return r>1&&(e+=" "+h(1,24)+"h"),r>2&&(e+=" "+h(1,60)+"m"),e}{let e=h(1,60)+"h";return r>4&&(e+=h(1,60)+"m"),r>5&&(e+=h(1,60)),e}}),i)},_.url=async(e,t)=>{const{value:n,antis:i}=await f(e,t);return n||await d((()=>("https://"+(0,r.Av)(1,3)+"."+(0,r.Av)(1,6)+"."+(0,r.Av)(1,3)).toLowerCase()),i)}},8360:(e,t,n)=>{"use strict";n.d(t,{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 m(e,t){const n={};e.sortNo&&(n.sortNo=-1),e.selected&&(n.selected=!1),e.value&&(n.value=""),await(0,l.UR)(e,t),(0,c.e)(e,n)}async function g(e,t){(0,c.e)(e,{selected:!1}),e.option.origin&&await(0,l.UR)(e.option,t),e.list&&e.list.forEach((e=>g(e,t)))}async function h(e){(0,p._O)(e)&&(0,c.e)(e.video,{ended:!0});let t=[];(0,p.G6)(e)&&(t=[...t,...e.options]),(0,p.IN)(e)&&(t=[...t,...e.otherOptions]);for(const n of t)await m(n,e);const{cascade:n}=e;n&&await g(n,e)}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(e){const{regions:t}=e,n=e.infoRange||"county",i=function(e){const t=k((0,o.wR)(e),1)[0];if(!t||t.isOtherOpt)return null;const n=t.origin.inferList.some((e=>e.active));return n?t:null}(e);if(i){const e=i.text.split("-");return{address:e,indexes:(0,f.Cm)(e,t),point:{lat:i.origin.latitude,lng:i.origin.longitude}}}{const e=(0,r.ec)(t.length);let i=(0,d.Wo)(e);const o=t[e],a=[o.name,"",""];if("province"!==n){const e=(0,r.ec)(o.cities.length),t=o.cities[e];if(a[1]=t.name,i=i+" "+e,"city"!==n){const e=(0,r.ec)(t.areas.length),n=t.areas[e];n&&(a[2]=n.name,i=i+" "+e)}}return{address:a,indexes:i,point:{lng:0,lat:0}}}}async function x(e,t){const{value:n}=await(0,a.hS)(e,t);if(n)return"__FORCE_EMPTY__"===n?"":n;const{fileLimits:i}=e,o=(0,r.my)(i,1)[0];return"record_audio"===o?y.audio:y[o]}async function b(e,t){const n=[],i=[];e.forEach((e=>{if((0,o.yg)(e.origin))n.push(e);else{let t=!0;(0,v.I9)(e.origin)&&(0,d.oV)(e.origin.inferList)&&(t=Math.random()>.9),t&&i.push(e)}})),await O(i,t,1);const a=(0,r.ai)(1,n.length);E(n,t,a)}async function T(e,t){const{parent:n,origin:i}=t;let o=await(0,s.W0)(i.fillMin,{state:n});o=o||0;let a=e.length;o&&i.inputInferLimit>o&&i.inputInferLimit<a&&(a=i.inputInferLimit);const c=o?(0,r.ai)(o,a):a;return(0,r.my)(e,c)}async function S(e,t){e.parent.context.option=t;const n=await(0,a.EZ)(t,e);return e.parent.context.option=null,await e.parent.handleEvents.handleOptionInput(n,t,e)}function E(e,t,n){(0,r.my)(e,n).forEach((e=>S(t,e)))}async function I(e,t){if(await e.parent.handleEvents.handleOptionClick(t,e),t.useComment)return S(e,t)}function k(e,t){const n=(0,l.Mx)(e,"select"),i=[],o=[];if(n.forEach((e=>{e.origin.inferList.every((e=>0===Number(e.weight)))||e.disabled?i.push(e):o.push(e)})),o.length>0)return(0,l.WW)(o,t);{let n=e.filter((e=>!e.disabled));return i.length>0&&(n=e.filter((e=>!i.includes(e)))),(0,r.my)(n,t)}}async function O(e,t,n){const i=k(e,n).sort(((e,t)=>(0,v.I9)(e.origin)?1:(0,v.e4)(e.origin,t.origin)));for(const e of i)await I(t,e)}async function C(e,t){const{multiple:n,min:i,max:o,list:a}=e;if(!a)return;const s=function(e,t){const n=(0,l.cX)(e);return n.length>0?(0,l.WY)(n,t):(0,r.my)(e,t)}(a,n?(0,r.ai)(i||1,o||1):1);for(const n of s){const i=a.indexOf(n);await t.parent.handleEvents.handleCascadeClick(i,e,t),await C(n,t)}}async function L(e){const t=(0,o.wR)(e),n=e.origin;let a=1;if((0,i._A)(n)){const t=await(0,i.EH)(e,e.parent),{min:o}=t;let{max:s}=t;const{selectInferLimit:c}=n;c>o&&c<s&&(s=c),a=(0,r.ai)(o||1,s)}const s=[],c=[];t.forEach((e=>{(0,o.yg)(e.origin)?c.push(e):s.push(e)})),await O(s,e,a);const u=(0,r.ai)(1,c.length);E(c,e,u)}function N(e,t){const n=[];for(let i=e;i<=t;i++)n.push(i);return n}function R(e,t,n){const i=[];for(let r=e;r<t;r+=n)i.push(r);return i.push(t),i}async function A(e,t,n){const i=[...n].sort(),{value:o,antis:s}=await(0,a.hS)(e,t,1);if(o){if("__FORCE_EMPTY__"===o)return"0";{const e=i[0],t=i[i.length-1];return o<e?e:o>t?t:o}}{const e=()=>(0,r.my)(n,1)[0];return(0,a.EP)(e,s)}}function P(e){let[t,n]=e.split("~").map((e=>Number(e)));return t>n&&([n,t]=[t,n]),[t,n]}function M(e,t,n){const[i,o]=e.split("_");let a,s;if(i.includes("~")){const[e,t]=P(i);a=(0,r.ai)(e,t)}else a=Math.min(Math.max(Number(i),0),t);if(o.includes("~")){const[e,t]=P(o);s=(0,r.ai)(e,t)}else s=Math.min(Math.max(Number(o),0),n);return{x:a,y:s}}function W(e,t){const[n,i]=e.split("_").map((e=>Number(e))),[r,o]=t.split("_");let a=!1,s=!1;if(r.includes("~")){const[e,t]=P(r);a=e<=n&&n<=t}else a=Number(r)===n;if(o.includes("~")){const[e,t]=P(o);s=e<=i&&i<=t}else s=Number(o)===i;return a&&s}async function U(e,t){const{value:n,antis:i}=await(0,a.hS)(e,t,1),{mapImgHeight:o,mapImgWidth:s}=t;if(n)return"__FORCE_EMPTY__"===n?null:M(n,s,o);{const e=()=>(0,r.ec)(s)+"_"+(0,r.ec)(o);return M(await(0,a.EP)(e,i,W),s,o)}}function G(e,t){let n=t.filter((t=>!(-1!==t.sortNo||!t.origin.inferList)&&t.origin.inferList.some((t=>{if(!t.active)return!1;const n=(0,l.wJ)(t.candidates),i=(0,l.CI)(n,1);return i.length>0&&Number(i[0].text)<=e}))));0===n.length&&(n=t.filter((e=>-1===e.sortNo)));const i=(0,r.my)(n,1)[0];i&&(0,c.e)(i,{sortNo:e,selected:!0})}async function D(e){return await(0,a.A9)(),async function(e,t){const{type:n,readonly:i}=e;if(i)return(0,u.Y1)();await h(e);const r=_[n]||L;await r(e)}(e)}_.select=L,_.value_mark=async e=>{const{options:t,otherOptions:n}=e,i=await T(t,e);for(const t of i){const n=t.minValue||1,i=t.maxValue||5,r=t.step,o=await A(t,e,R(n,i,r).map((e=>(0,d.Wo)(e))));await e.parent.handleEvents.handleOptionInput(o,t,e)}await b(n,e)},_.heat_map=async e=>{const{options:t,otherOptions:n}=e;for(const n of t){const t=await U(n,e);t&&await e.parent.handleEvents.handleQuestionInput(t,e)}await b(n,e)},_.icon_mark=async e=>{const{options:t,otherOptions:n}=e,i=await T(t,e);for(const t of i){const n="rating-nps"===t.iconName,i=n?0:1,r=(n?t.iconCount-1:t.iconCount)||5,o=await A(t,e,N(i,r).map((e=>(0,d.Wo)(e))));await e.parent.handleEvents.handleOptionInput(o,t,e)}await b(n,e)},_.slide_rate=async e=>{const{options:t,rateOptions:n,otherOptions:i}=e,r=await T(t,e),o=n.map((e=>e.value));for(const t of r){const n=await A(t,e,o);await e.parent.handleEvents.handleOptionInput(n,t,e)}await b(i,e)},_.weight=async e=>{let{weightTotal:t}=e;const{options:n,otherOptions:i}=e;t<=0&&(t=100);const o=[],a=[];n.forEach((e=>{const{inferList:t}=e.origin;t&&t.some((e=>e.active))?o.push(e):a.push(e)}));const s=[];for(const n of o){const i=n.origin.inferList.filter((e=>e.active)),r=await(0,l.eQ)(i,e),o=(0,l.wJ)(r),a=(0,l.CI)(o,1),c=Number(a[0].text);s.push(c),t-=c}const c=(0,r.Sq)(t,a.length),u=s.concat(c),d=o.concat(a);for(const[t,n]of d.entries()){const i=u[t];await e.parent.handleEvents.handleOptionInput(i.toString(),n,e)}await b(i,e)},_.fill=async e=>{const{options:t,otherOptions:n}=e,i=await T(t,e);for(const t of i)await S(e,t);await b(n,e)},_.sequence=async e=>{const{options:t,otherOptions:n}=e,i=t.length;let r=1;for(;r<=i;)G(r,t),r+=1;t.sort(((e,t)=>e.sortNo>t.sortNo?1:-1)),await b(n,e),(0,u.Y1)()},_.cascade=async e=>{const{cascade:t,otherOptions:n}=e;return await C(t,e),b(n,e)},_.describe=async()=>{(0,u.Y1)()},_.max_diff=async e=>{const t=function(e){const t=[],{options:n,itemCountPerTask:i,taskCount:r}=e,o=Math.ceil(r*i/n.length);return e.options.forEach((e=>{if(!e.origin.inferList)return;let n=e.origin.inferList.reduce(((e,t)=>(t.active&&(e+=t.candidates.split(",").map((e=>Number(e)||0)).reduce(((e,t)=>e+t),0)),e)),0);n>o?n=o:n<-o&&(n=-o),n&&t.push({needValue:n,option:e})})),t}(e),{tasks:n,parent:{handleEvents:i}}=e;for(const o of n){let n=o.items.find((e=>t.find((t=>{const n=t.option===e.option&&t.needValue>0;return n&&(t.needValue-=1),n})))),a=o.items.find((e=>t.find((t=>{const n=t.option===e.option&&t.needValue<0;return n&&(t.needValue+=1),n}))));if(!n){const e=o.items.filter((e=>t.every((t=>t.option!==e.option))));n=(0,r.my)(e,1)[0]}if(!a||a===n){const e=o.items.filter((e=>t.every((t=>t.option!==e.option))&&e!==n));a=(0,r.my)(e,1)[0]}await i.handleMaxDiffInput(1,n,o,e),await i.handleMaxDiffInput(-1,a,o,e)}},_.upload=async e=>{const{options:t,otherOptions:n}=e,{min:o,max:a}=await(0,i.YP)(e,e.parent),s=(0,r.ai)(o||1,a),c=(0,r.my)(t,s);for(const t of c)await e.parent.handleEvents.handleOptionInput({filePath:await x(t,e)},t,e);await b(n,e)},_.region=e=>{const{indexes:t}=w(e);return e.parent.handleEvents.handleQuestionInput(t,e)},_.location=e=>{const{address:t,point:n}=w(e),i={address:{province:t[0],city:t[1],district:t[2],country:""},point:{lat:n.lat||Number((0,a.Ep)(0,90)),lng:n.lng||Number((0,a.Ep)(0,180))}};return e.parent.handleEvents.handleQuestionInput(i,e)},_.area=_.location,_.matrix=async e=>{const{options:t,flatten:n,otherOptions:o,origin:a}=e,{min:s,max:c}=await(0,i.EH)(e,e.parent);if((0,i.cd)(a))await O(t,e,1);else if((0,i.cx)(a)){let t=n;const i=n[0].list.length;n.length>i&&(t=(0,r.my)(n,i));const o=[];for(const n of t){const t=n.list.filter(((e,t)=>!o.includes(t)));if(0===t.length)break;await O(t,e,1);const i=n.list.findIndex((e=>e.selected));o.push(i)}}else if((0,i.ct)(a)||(0,i.gd)(a))for(const t of n)await O(t.list,e,1);else if((0,i.KC)(a)||(0,i.S2)(a))for(const t of n){const n=(0,r.ai)(s||1,c);await O(t.list,e,n)}else if((0,i.Un)(a)){const n=(0,r.ai)(s||1,c);await O(t,e,n)}await b(o,e)},_.end=async()=>{},_.verify=e=>e.parent.handleEvents.handleQuestionInput({phoneNumber:(0,a.uc)(),code:(0,a.sh)("number")},e)},8792:(e,t,n)=>{"use strict";n.d(t,{U:()=>u,e:()=>c}),n(7768),n(9952);var i=n(8856);const r=[],o=[/^https:\/\/[^.]+\.choiceform\.com\//,/^http:\/\/localhost/],a={};async function s(e,t){if(!a[e]){const n=async()=>{const n=(0,i.W4)().network.getFakeHost();if(!function(e){return o.some((t=>!!e.match(t)))}(e))throw new Error("can not load plugin files from untrusted site: "+e);n.currentSpace=e,await(0,i.W4)().network.loadFakeFile("".concat(e,".js"),{crossorigin:"anonymous"},t),n.currentSpace="",r.push(e)};a[e]=n()}return a[e]}async function c(e){const t=(0,i.W4)().network.getFakeHost().fakedServers;if(!t[e]){const t=e.replace(/\/[^/]+$/,"");await s(t,!0)}return t[e]}async function u(e,t){let n=e.startNode.fakedServers.concat(function(e){if((0,i.E3)().preview)return[];const{parsedPayload:{surveyMeta:{collector:{sampler_config:t}}}}=e;return t?["committed_url","examine_failed_url","examine_skipped_url","invalid_url"].reduce(((e,n)=>{const i=t[n];if(i&&0===i.indexOf("FAKE:")){const t=i.substring(5,i.lastIndexOf("/"));e.includes(t)||e.push(t)}return e}),[]):[]}(e));if(n=n.filter((e=>!r.includes(e))),n&&0!==n.length)for(const e of n)await s(e,t)}},4732:(e,t,n)=>{"use strict";n.d(t,{y:()=>r});const i={actions:[]};function r(e){i.actions.push(e)}},6784:(e,t,n)=>{"use strict";n.d(t,{EZ:()=>R,GS:()=>N,IU:()=>X,Id:()=>C,ML:()=>q,Oo:()=>O,Q3:()=>F,Sg:()=>M,U1:()=>x,U3:()=>V,U7:()=>Q,Ux:()=>S,W2:()=>A,Wy:()=>Z,YZ:()=>z,aS:()=>L,cR:()=>B,eK:()=>K,kB:()=>W,kr:()=>U,kv:()=>D,mT:()=>Y,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 m=1e4;let g=-1;function h(){const{dev:{local:e}}=(0,l.W4)(),{preview:t,realTimePreview:n,hostConfig:{recordUrl:i}}=(0,l.E3)();return!(e||t||n||!i)}function v(e,t=!1){if((0,s.K)()&&(!t||"start"===e.type))return;e.description=(0,a.Qr)(e.description);const n=e.description;if(h()){const i=p[p.length-1];i&&(n.includes(i.description)||i.description.includes(n))&&p.pop(),p.push(e),t&&y()}}function y(){if(h()){if(clearTimeout(g),p.length>0){const e=p;p=[];const t=(0,l.E3)().hostConfig.recordUrl;(0,c.SY)(t,{type:"POST",data:{records:e}})}g=setTimeout(y,m)}}function _(e,t,n,i,r){var o,a,s;const{surveyId:c,transactionID:u,userInfo:f}=n;let p,m,g,h,v,y,_;if(("gift"===i||"start"===i&&f)&&(p=f.nickname,m=f.openid,p&&(h=(0,l.W4)().name)),"start"===i&&(g=JSON.stringify((0,d.uK)())),t&&e){const t=e;t.yid?(y=t?t.yid:void 0,_=t?t.xid:void 0):v=e?e.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:t?t.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:m,query_params:g}}function w(e){const t=(0,f.kZ)(e)?e.title:"",n=e.loop?"[".concat(e.nodeName,":").concat(t,"]"):"[".concat(e.nodeName,"]");return(0,a.Qr)(n)}function x(e,t){(0,l.W4)().dev.infer||v(_(null,t,e,"used_phone","在题目:".concat(w(t),"中检测到重复使用的手机号:").concat(e.phoneNumber)))}function b(e,t){(0,l.W4)().dev.infer||v(_(null,t,e,"verify_fail","在题目:".concat(w(t),"高级验证失败")))}function T(e,t){if((0,l.W4)().dev.infer)return;const{type:n,parent:i}=t;if("upload"===n||"verify"===n||"gift"===n)return;let o,s="",c="";if("menu"===n||"cascade"===n)c=(0,u.wR)(t).reduce(((t,n)=>(n.selected&&(t+="[".concat(n.text,"]")),e=n,t)),""),o=c?"select":"deselect",s=c?"选中":"清除所有选中";else{const i=e.selected;if(o=i?"select":"deselect",s=i?"选中":"取消选中","select_icon"===n||"select_image"===n)c="[".concat((0,r.oB)(e.origin),"]");else if("matrix"===t.type)if(e.isOtherOpt)c="[".concat(e.text,"]");else{const t=e;c="[".concat((0,a.Qr)(t.optionX.text)," ").concat((0,a.Qr)(t.optionX.text),"]")}else c="[".concat((0,a.Qr)(e.text),"]")}const d="在题目:".concat(w(t),"中").concat(s,"选项:").concat(c);v(_(e,t,i,o,d))}function S(e,t,n){if((0,l.W4)().dev.infer)return;const i="在题目:".concat(w(n),"的选项:[").concat((0,a.Qr)(t.text),"]中输入自动填充触发文字:").concat(e);v(_(t,n,n.parent,"auto_complete",i))}function E(e,t,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="打分:"+t.value,o="rate"):"upload"===n.type?(r=e?"上传图片":"清除图片",o="upload"):(r="输入:"+t.value,o="input"),v(_(t,n,i,o,"在题目:".concat(w(n),"的选项:[").concat((0,a.Qr)(t.text),"]中").concat(r)))}function I(e,t){if((0,l.W4)().dev.infer)return;const n=t.parent,i=t.options[e];i&&(-1===i.sortNo?v(_(i,t,n,"cancel_sort","在题目:".concat(w(t),"中取消了对选项:[").concat((0,a.Qr)(i.text),"]的排序"))):v(_(i,t,n,"sort","在题目:".concat(w(t),"中将选项:[").concat((0,a.Qr)(i.text),"]排序到第").concat(i.sortNo,"位"))))}function k(e){if((0,l.W4)().dev.infer)return;const t="在题目:".concat(w(e),"中 定位失败");v(_(null,e,e.parent,"locate_failed",t))}function O(e,t){if((0,l.W4)().dev.infer)return;const n=t.parent,i=t.type,r=t.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 t=typeof e;if("string"===t)a="输入:"+e;else if("object"===t){const{code:t,phoneNumber:n}=e;void 0!==n?(o="input_phone",a="的手机号码中输入:".concat(n)):(o="input_code",a="的密码/验证码中输入:".concat(t))}}v(_(null,t,n,o,"在题目:".concat(w(t),"中").concat(a)))}function C(e){(0,l.W4)().dev.infer||v(_(null,e,e.parent,"prev","在题目:".concat(w(e),"中点击上一题")))}function L(e,t){(0,l.W4)().dev.infer||v(_(null,t,e.parent,"prev","返回到题目: ".concat(w(t),",由题目:").concat(w(e),"后退而来")))}function N(e){(0,l.W4)().dev.infer||v(_(null,e,e.parent,"next","在题目:".concat(w(e),"中点击下一题")))}function R(e,t){(0,l.W4)().dev.infer||v(_(null,t,e.parent,"next","end"===t.type?"到达结束节点: ".concat(w(t),",由题目:").concat(w(e),"前进而来"):"进入题目: ".concat(w(t),",由题目:").concat(w(e),"前进而来")))}function A(e,t,n){(0,l.W4)().dev.infer||v(_(null,t,n,"check_fail","从".concat(w(e),"走向甄别失败")),!0)}function P(e,t){(0,l.W4)().dev.infer||v(_(null,e.current,e,"quota_fail","配额失败,答案数:".concat(t)),!0)}function M(e,t){(0,l.W4)().dev.infer||v(_(null,e.current,e,"check_submit","甄别提交,答案数:".concat(t)))}function W(e,t){(0,l.W4)().dev.infer||v(_(null,e,t,"time_less","答题时间太少被排除"),!0)}function U(e,t){(0,l.W4)().dev.infer||v(_(null,e,t,"abandon_answer","按结束节点要求抛弃答案"),!0)}function G(e){(0,l.W4)().dev.infer||v(_(null,e.current,e,"time_over","答题超时未完成"),!0)}function D(e,t,n,i){(0,l.W4)().dev.infer||v(_(null,e,t,"full_submit","正式提交,答案数:".concat(n,"个答案 \n 提交回应:").concat(JSON.stringify(i))),!0)}function B(e,t,n=!1){(0,l.W4)().dev.infer||v(_(null,e,t,n?"lottery_goal":"lottery_fail",n?"抽奖:中奖":"抽奖:未中奖"),!0)}function q(e,t){(0,l.W4)().dev.infer||v(_(null,e,t,"gift","领奖"),!0)}function F(e,t,n,i,r){(0,l.W4)().dev.infer||v(_(t,n,e,"auto_input","在题目:".concat(w(n),"中自动填充选项:[").concat(i,"],期待值:[").concat(r,"]")))}function j(e,t,n,i="成功"){(0,l.W4)().dev.infer||v(_(null,n,e,"auto_skip","在题目:".concat(w(n),"中尝试自动选中选项:[").concat((0,a.Qr)(t.text),"]").concat(i)))}function z(e,t,n){if((0,l.W4)().dev.infer)return;const i="自动跳过题目:".concat(w(t)," by ").concat(n);"logic"!==t.type&&"uniqueness_verification"!==t.type&&v(_(null,t,e,"auto_skip",i))}function V(e,t,n){(0,l.W4)().dev.infer||v(_(null,t,e,"auto_skip","自动跳过题目:".concat(w(t)," by ").concat(n)+" logicResult:".concat(t.logicResult)))}function K(e,t,n){(0,l.W4)().dev.infer||v(_(null,t,e,"auto_skip","自动跳过题目:".concat(w(t)," by ").concat(n)+" does verification passed:".concat(t.verificationResult)))}function Y(e,t,n){(0,l.W4)().dev.infer||v(_(null,n,e,"opt_display","在题目:".concat(w(n),"中显示选项:[").concat((0,a.Qr)(t.text),"]")))}function H(){const e="browser_uuid";let t=(0,l.W4)().storage.get(e);return t||(t=(0,o.YF)(),(0,l.W4)().storage.set(e,t)),t}function Q(){if((0,l.W4)().dev.infer)return;const e=(0,d.uK)();e.code&&e.state||v({type:"enter",collector_code:(0,l.E3)().sid,browser_uuid:H(),recorded_at:(0,i.kF)(),description:"来自"+(0,l.W4)().system.getReferer()},!0)}function X(e,t){if((0,l.W4)().dev.infer)return;let n="开始答题,进入到题目: ".concat(w(t)," ");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,t,e,"start",n);s.browser_uuid=H(),s.collector_code=(0,l.E3)().sid,v(s,!0)}function Z(e,t){(0,l.W4)().dev.infer||v(_(null,null,e,"resume","开始断点续答:"+t),!0)}},5667:(e,t,n)=>{"use strict";n.d(t,{E:()=>a});var i=n(8856),r=n(8792);let o=!1;async function a(e){const{url:t,data:n,silent:a,responseId:s}=e,c=t+JSON.stringify(n),u=await(0,r.e)(t);if(!u){const e="FAKE NOT FOUND:".concat(t);throw(0,i.E3)().error(e),new Error(e+(s?" responseId is: ".concat(s):""))}let l=null;try{if(l=await u(n,(0,i.E3)()),l.exception)throw l.exception}catch(e){if(!(0,i.E3)().realTimePreview){const t="FAKE ERROR:".concat(c," ").concat(e.stack&&e.stack.split("\n")[0]);throw a||(0,i.E3)().error(t),new Error(t+(s?" responseId is: ".concat(s):""))}l={result:""}}return o&&console.info(n,l),o&&console.info(JSON.stringify(n),JSON.stringify(l)),l}},7320:(e,t,n)=>{"use strict";n.d(t,{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:()=>m,eI:()=>w,eY:()=>b,kj:()=>g,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(e,t,n){const i=await(0,o.W4)().network.request(e,t,n);if((r=i).status>=200&&r.status<300)return function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}(i.response);throw i;var r}function p(e){const t=JSON.parse(e&&e.response||"{}");return t&&d.includes(t.status)?t.code+"":""}function m(e){const t=p(e);if(t!==c&&t){if(l[t])return;u[t]?(0,o.E3)().error(k(t)):(0,o.E3)().notify(k(t))}}async function g(e,t,n){try{return await f(e,t,n)}catch(n){throw m(n),(0,o.E3)().uploadLog("api error: ".concat(t.type,":").concat(e," ").concat(JSON.stringify(n))),n}}function h(e,t={type:"GET"},n=!1){return g(e,t={...t,contentType:"application/json"},n)}async function v(e){if((0,o.E3)().preview)return async function(e){if("00000000-0000-0000-0000-000000000000"===e)return{smaller_diagram_url:"http://localhost:12345/unit_test_payload.json"};const t=(0,i.uK)(),n=t.type;let r=(0,o.E3)().hostConfig.qApiHost+"/surveys/"+e+"/preview";"preview_template"===n?r=(0,o.E3)().hostConfig.host+"/v1/public_templates/"+e:"edit_template"===n&&(r=(0,o.E3)().hostConfig.host+"/v1/templates/"+e);const a=await h(r,{type:"GET",jwt:t.jwt}),{diagram:s}=a;return{smaller_diagram_url:a.diagram_url||s.diagram_url,langs:a.langs}}(e);const t=(0,o.W4)().auth.retrieveAuthSurveyMeta();return t||h((0,o.E3)().hostConfig.qApiHost+"/surveys/"+e,{type:"GET"}).catch((e=>{throw function(e){e&&d.includes(e.status)||(0,o.E3)().error((0,r.GS)(a.CW.global.downloadError))}(e),e}))}function y(e){const t=(0,o.E3)().hostConfig.qApiHost+"/responses";return c=u.multi_responses_error,h(t,{type:"POST",data:e},!0).then((e=>(c="",e))).catch((n=>{throw(0,o.E3)().uploadLog("getResponseInfo failed, url is ".concat(t,", options are ").concat(JSON.stringify({type:"POST",data:e}))),c="",n}))}function _(e,t){return h((0,o.E3)().hostConfig.qApiHost+"/responses/"+t+"/examine",{type:"PUT",data:e})}function w(e,t){return h((0,o.E3)().hostConfig.qApiHost+"/responses/"+t+"/skip",{type:"PUT",data:e})}function x(e,t){return h((0,o.E3)().hostConfig.qApiHost+"/responses/"+t,{type:"PUT",data:e})}async function b(e){if((0,o.E3)().preview)return(0,o.E3)().notify((0,r.GS)(a.CW.preview.noMessage)),{};const t=(0,o.E3)().hostConfig.qApiHost+"/validations";e.question_id=e.question_id.toLowerCase();const n=await h(t,{type:"POST",data:e});return e.phone_num&&(0,o.E3)().notify((0,r.GS)(a.CW.verify.sendSuccess)),n}async function T(e,t){return(0,o.E3)().preview?((0,o.E3)().notify((0,r.GS)(a.CW.preview.noMessage)),{}):h((0,o.E3)().hostConfig.qApiHost+"/validations/"+t,{type:"PUT",data:e})}async function S(e,t){const n=(0,o.W4)().storage.get("gift-"+e.code);if(n)return JSON.parse(n);const i=(0,o.E3)().hostConfig.qApiHost+"/rewards/"+t+"/red_envelope",r=await g(i,{type:"POST",data:e},!1);return(0,o.W4)().storage.set("gift-"+e.code,JSON.stringify(r)),r}async function E(e,t){if((0,o.E3)().preview)return{};const n=(0,o.E3)().hostConfig.qApiHost+"/rewards/"+t+"/custom";try{const t=await g(n,{type:"PUT",data:e},!1);return(0,o.E3)().notify((0,r.GS)(a.CW.verify.sendSuccess)),t}catch(e){throw(0,o.E3)().notify((0,r.GS)(a.CW.verify.sendFailed)),e}}async function I(e){(0,s.y)(e);const{preview:t}=(0,o.E3)(),{dev:{autoRun:n,infer:i}}=(0,o.W4)();return t||n||i?null:g((0,o.E3)().hostConfig.qApiHost+"/webhooks",{type:"POST",data:e},!1)}function k(e){return(0,r.GS)(a.CW.backEnd[e])||e}},3004:(e,t,n)=>{"use strict";n.d(t,{G:()=>r,U:()=>o}),n(7768);var i=n(7404);function r(e){const t=(0,i.uK)().offline_survey_id;return t?e.replace(/^https?:\/\//,"/".concat(t,"/")):e}function o(){return!!(0,i.uK)().offline_survey_id}},6072:(e,t,n)=>{"use strict";n.d(t,{Ed:()=>m,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({state:e,request:t,customParam:n,silent:o,shouldCombineSystem:f=!0}){const{method:p,embedId:m}=t,g="embed"===p,h="fake"===p;if((0,a.E3)().realTimePreview&&!g&&!h||!function(e){const t=e.params instanceof Array;return"embed"===e.method?!(!t||!e.embedId):!(!t||!e.url)}(t))return{...d};const v=await(0,r.Oj)(t.url,{state:e}),y=await(0,i.aI)(e,t.params,f);n&&Object.keys(n).forEach((e=>{n[e]&&(y[e]=n[e])}));let _=null;if(g)_=await async function(e){const{embedId:t,data:n,embedApis:i,responseId:r}=e,o=function(e,t){const n=t.find((t=>t.id===e));return n?(n.fn||(n.fn=function(e){if(e.fn)return e.fn;let t,n=e.code.replace(/<br>/g,"");n="(function(){ /* embedApi.".concat(e.name," */ ").concat(n,"})()");try{return t=(0,s.y)(n,!0),t}catch(e){return()=>({result:"",message:""})}}(n)),n.fn):null}(t,i);let c;try{c=await o(n,(0,a.E3)())}catch(e){const n="EMBED ERROR:".concat(function(e,t){const n=t.find((t=>t.id===e));return n?n.name:e}(t,i)," ").concat(e.stack&&e.stack.split("\n")[0]);throw(0,a.E3)().error(n),new Error(n+(r?" responseId is: ".concat(r):""))}return c}({embedId:m,data:y,embedApis:e.embedApis,responseId:null==e?void 0:e.transactionID});else if("fake"===p)_=await(0,c.E)({url:v,data:y,silent:o,responseId:null==e?void 0:e.transactionID});else{let t="GET";"post"===p&&(t="POST");let n=null;try{n=await(0,u.Kk)((0,a.W4)().dev.parseRealUrl(v),{type:t,data:y,contentType:"application/json"},!1)}catch(n){const i="REAL ERROR:".concat(t," ").concat(v," ").concat(JSON.stringify(n));o||(0,a.E3)().error(i);const r=i+((null==e?void 0:e.transactionID)?" responseId is: ".concat(null==e?void 0:e.transactionID):"");throw new Error(r)}l&&console.info({...y,url:v},n),_=n}return _}async function p(e){const t=await f(e);return void 0===t.valid&&(t.valid=!!t.result),t.valid||t.message||(t.message="^_^"),t}async function m(e,t){try{const{request:n}=t.origin;n&&(await f({state:e,request:n,customParam:null,silent:!0}),e.endRequested=!0,o.i.trigger("END_REQ"))}catch(e){(0,a.E3)().uploadLog(e)}}},4708:(e,t,n)=>{"use strict";n.d(t,{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:()=>g,u6:()=>_,wR:()=>m,yg:()=>u}),n(9952);var i=n(984),r=n(556),o=n(6276),a=n(3001);function s(e,t){const n=e.loopStack,i=t.uuid;return(0,r.So)(i,n)}function c(e,t){return e.find((e=>(0,r.oj)(e.uuid,t)))}function u(e){return"comment"===e.optionType}function l(e){return m(e).some((e=>e.selected))}function d(e,t=!1){return m(e).filter((n=>(!t||!n.isOtherOpt)&&(0,i.QX)(n,e))).length}function f(e){return m(e).some((t=>(0,i.QX)(t,e)))}function p(e){const t=[],n=e=>{if("children"in e)for(const t of e.children)n(t);else t.push(e)};for(const t of e.optionGroups)n(t);return t}function m(e){let t=[];return(0,o.G6)(e)&&(t=(0,o.QB)(e)?[...t,...p(e)]:[...t,...e.options]),(0,o.IN)(e)&&(t=[...t,...e.otherOptions]),t}function g(e){let t=[];return(0,o.uo)(e)&&(t=[...t,...e.options]),(0,o.yy)(e)&&(t=[...t,...e.otherOptions]),t}function h(e){let t=m(e);const{hiddenOptions:n}=e;return n&&(t=[...t,...n]),t}function v(e){const{renderOptionsX:t,renderOptionsY:n,otherOptions:i}=e;return t.concat(n,i)}function y(e){const{options:t,origin:n}=e,i=t.find((e=>e.origin.seqTarget));return i&&i.selected?n.options[i.sortNo-1]:n.output}function _(e){return"yid"in e&&"xid"in e}async function w(e,t){const{parent:n}=t,{origin:i}=e;return{itemsMax:await(0,a.W0)(i.itemsMax,{state:n}),itemsMin:await(0,a.W0)(i.itemsMin,{state:n})}}function x(e){return e.passRef||{}}function b(e,t){const n=x(e);return e[t]||n[t]}function T(e){return e.assistValue?Object.keys(e.assistValue).reduce(((t,n)=>(e.assistValue[n]&&(t+=e.assistValue[n])&&(t+=" "),t)),""):""}function S(e,t){return e/t*100+"%"}},1768:(e,t,n)=>{"use strict";n.d(t,{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(e){return e&&-1===e.mutexNumber}function a(e,t){return(e.mutexNumber||0)>(t.mutexNumber||0)?1:-1}function s(e,t){return!(!e||!t)&&!(!e.xid||!t.xid)&&(!(!o(e.optionX.origin)||t.yid!==e.yid)||o(e.optionY.origin)&&t.xid===e.xid)}function c(e,t){return!(!e||!t)&&("comment"!==e.origin.optionType||"option"!==t.origin.optionType)&&("option"!==e.origin.optionType||"comment"!==t.origin.optionType)&&(!(!o(e.origin)&&!o(t.origin))||u(e,t))}function u(e,t){return!(!e||!t||(0,i.oV)(e.origin.mutexNumber)||e.origin.mutexNumber!==t.origin.mutexNumber)}function l(e,t){return!(!e||!t)&&!(!e.xid||!t.xid)&&(!(!u(e.optionX,t.optionX)||t.yid!==e.yid)||u(e.optionY,t.optionY)&&t.xid===e.xid)}function d(e,t){const n={};(0,r.gr)(e).forEach((e=>{const t=e.origin;(0,r.yg)(t)||(n[t.mutexNumber]?n[t.mutexNumber]+=1:n[t.mutexNumber]=1)}));const i=Object.keys(n).reduce(((e,t)=>("0"===t||"undefined"===t?e+=n[t]:Number(t)<10&&(e+=1),e)),0);return t>i&&(t=i),t}function f(e,t){return!!o(t.origin)||e.some((e=>e!==t&&e.selected&&c(t,e)))}},4196:(e,t,n)=>{"use strict";n.d(t,{GA:()=>f,cv:()=>d,gF:()=>m}),n(9952);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(e,t,n,r){const a=n.list[t];(0,o.e)(a.option,{value:e});const s=r.options.find((e=>e.cascadePath===a.resultId));return(0,i.yg)(a.option.origin)&&(e?g(a,r):m(a,r)),s}async function f(e,t,n){const d=t.list[e];if(!d)return u.Az;const f=t.list.filter((e=>function(e){return e.selected&&!(0,i.yg)(e.option.origin)}(e))),{option:h}=d;if(f.includes(d))m(d,n);else{const e=(0,c.Gg)(t.list.map((e=>e.option)),d.option);if(t.multiple){if(f.length>=t.max&&!e)return(0,o.E3)().notify((0,r.GS)(a.CW.menu.limitMax,{text:t.text?(0,r.GS)(a.CW.menu.listItem)+t.text:(0,r.GS)(a.CW.menu.topList),max:(0,s.Wo)(t.max)})),u.Az}else t.list.forEach((e=>{e.selected&&m(e,n)}));e&&function(e,t,n){for(const t of n)(-1===e.option.origin.mutexNumber||-1===t.option.origin.mutexNumber||e.option.origin.mutexNumber&&t.option.origin.mutexNumber===e.option.origin.mutexNumber)&&p(t);t.options.forEach((t=>{e.resultId.includes(t.cascadePath)||(0,o.e)(t,{selected:!1})}))}(d,n,t.list.filter((e=>e.resultId!==d.resultId))),g(d,n)}return await(0,l.e)(h,n),u.ay}function p(e){(0,o.e)(e,{selected:!1}),(0,o.e)(e.option,{selected:!1});const t=e.list;t&&0!==t.length&&t.forEach((e=>{p(e)}))}function m(e,t){p(e),t.options.forEach((t=>{t.cascadePath.includes(e.resultId)&&(0,o.e)(t,{selected:!1})}))}function g(e,t){(0,o.e)(e,{selected:!0}),(0,o.e)(e.option,{selected:!0}),t.options.forEach((t=>{e.resultId.includes(t.cascadePath)&&(0,o.e)(t,{selected:!0})}))}},7688:(e,t,n)=>{"use strict";n.d(t,{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 m={};function g(e,t,n){t.forEach((t=>{(0,s.oj)(t.uuid,e.uuid)||t[n]!==e[n]||(0,c.e)(t,{selected:!1})}))}function h(e,t){t.forEach((t=>{t.uuid!==e.uuid&&(0,c.e)(t,{selected:!1})}))}function v(e,t,n=!1){if(e.selected)(0,c.e)(e,{selected:!1});else{(0,c.e)(e,{selected:!0});const r=(0,p.IN)(t)?t.otherOptions:[];h(e,n?r:(0,i.wR)(t))}return f.yK}async function y(e,t){const n=m[t.type];if(n){const i=await n(e,t);return i.noValidate||(0,r.c9)(t),await(0,d.e)(e,t),i}return f.Az}m.select=async(e,t)=>{var n;if(e.selected)return(0,c.e)(e,{selected:!1}),f.yK;const r=await(0,o._R)(t,e);return r.valid?((0,c.e)(e,{selected:!0}),(0,o.cd)(t.origin)&&h(e,(0,i.wR)(t)),f.yK):((0,c.E3)().notify(null!==(n=null==r?void 0:r.message)&&void 0!==n?n:""),f.Az)},m.select_icon=m.select,m.select_image=m.select,m.matrix=async(e,t)=>{var n;if(e.selected)return(0,c.e)(e,{selected:!1}),f.yK;const r=await(0,o.IZ)(t,e);if(!r.valid)return(0,c.E3)().notify(null!==(n=null==r?void 0:r.message)&&void 0!==n?n:""),f.Az;const{origin:a}=t;return(0,c.e)(e,{selected:!0}),(0,o.cd)(a)?h(e,(0,i.wR)(t)):(0,o.cx)(a)?(g(e,t.options,"yid"),g(e,t.options,"xid")):(0,o.ct)(a)?g(e,t.options,"yid"):(0,o.gd)(a)&&g(e,t.options,"xid"),f.yK},m.upload=async(e,t)=>{var n,i,r;if(e.isOtherOpt)return v(e,t,!0);{const{parent:o,fullUploaded:s,origin:d}=t;let p=await(0,a.W0)(d.maxUploadCount,{state:o});p=p||t.options.length;const m=e.value;if(s&&!m&&!e.origin.fillRequired)return(0,c.E3)().notify((0,u.GS)(l.CW.upload.amountLimitMax,{max:p})),f.Az;const g={onprogress(t){(0,c.e)(e,{progress:t})},accept:e.accept,nodeId:t.renderId,optionId:e.renderId,recordedAudioFile:null===(n=e.customData)||void 0===n?void 0:n.file},h=await(0,c.W4)().network.upload(g);return await(null===(r=(i=o.handleEvents).handleOptionInput)||void 0===r?void 0:r.call(i,h,e,t)),f.ay}},m.menu=m.select,m.cascade=async(e,t)=>(e.isOtherOpt&&v(e,t,!0),f.yK),m.hot_spot=m.select,m.icon_mark=m.value_mark=m.slide_rate=m.fill=m.weight=m.heat_map=async(e,t)=>e.isOtherOpt?v(e,t,!0):f.ay,m.sequence=async(e,t)=>e.isOtherOpt?v(e,t,!0):f.ay},4556:(e,t,n)=>{"use strict";n.d(t,{I5:()=>m,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(e,t){const n=t.value||"data:image/gif;base64,R0lGODlhAQABAAAAACw=";n&&(0,a.e)(e,{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(e,t){const n=String(e);return e===t.value?c:((0,a.e)(t,{value:n}),u)}async function p(e,t,n){let o;if("number"==typeof e&&(e=String(e)),t.isOtherOpt)o=f(e,t);else{const i=l[n.type];o=i?await i(e,t,n):f(e,t)}return o.noValidate||(0,r.c9)(n,t),await(0,i.e)(t,n),o}function m(e,t,n){t.atcpTrigger=e,(0,r.c9)(n,t)}l.icon_mark=async(e,t)=>(e===t.value&&(e=String(Number(e)-1)),(0,a.e)(t,{value:e}),u),l.weight=async(e,t,n)=>{if(e===t.value)return c;const{options:i}=n,r=n.weightTotal,o=i.reduce(((e,n)=>n!==t?e+Number(n.value):e),0),l=r-o;return Number(e)>l&&(e=String(l)),(0,a.e)(t,{value:e}),i.forEach((e=>{const t=Number(e.value);(0,a.e)(e,{percent:(0,s.e$)(t,r)})})),u},l.upload=async(e,t,n)=>(e||(await(0,a.W4)().network.removeUpload({nodeId:n.renderId,optionId:t.renderId}),e=(0,i.I)()),(0,a.e)(t,e),await(0,o.SY)(n),d(t,e),{refresh:!0,result:!0}),l.slide_rate=async(e,t)=>f(e,t),l.fill=async(e,t)=>f(e,t)},3568:(e,t,n)=>{"use strict";n.d(t,{c:()=>i});const i=Object.keys({field_1:"",field_2:"",field_3:"",field_4:"",field_5:"",field_6:""})},3244:(e,t,n)=>{"use strict";n.d(t,{At:()=>o,Cm:()=>a,KQ:()=>r});var i=n(5548);function r(e,t){return e.find((e=>e.origin.radius>=(0,i.c)(t,{lng:e.origin.longitude,lat:e.origin.latitude})))||e[e.length-1]}function o(e,t){if(0===e.length)return;const n=t.split("-");return e.find((e=>e.text.split("-").every(((e,t)=>{const i=n[t];return!(!i||!i.includes(e))}))))||e[e.length-1]}function a(e,t){const n=t.map((e=>e.name)).indexOf(e[0]);let i=String(n);const r=t[n];if(e[1]&&r){const t=r.cities.map((e=>e.name)).indexOf(e[1]);i+=" "+t;const n=r.cities[t];if(e[2]&&n){const t=n.areas.map((e=>e.name)).indexOf(e[1]);i+=""+t}}return i}},6764:(e,t,n)=>{"use strict";n.d(t,{sZ:()=>a,uE:()=>d,uQ:()=>l}),n(5960);var i=n(556),r=n(5776),o=n(6796);function a(e){const t=[];return e.forEach(((e,n)=>{const r=(0,i.ec)(n+1);t.splice(r,0,e)})),t}const s={};function c(e,t,n){let r=[];return r=n?u(e):t?function(e,t){const n=[],r={};e.forEach(((e,i)=>{const o=e.origin;if(o.refOptId){let a="";if(t&&(a=o.referId),a){const t=r[a];t?t.list.push(e):r[a]={headIndex:i,list:[e]}}else n.push(e)}else n.push(e)}));let o=[];return n.forEach((e=>{const t=(0,i.ec)(o.length+1);o.splice(t,0,e)})),Object.keys(r).map((e=>r[e])).sort(((e,t)=>e.headIndex>t.headIndex?1:-1)).forEach((e=>{o=o.concat(e.list)})),o}(e,t):function(e){const t=[];return e.forEach((e=>{const n=(0,i.ec)(t.length+1);t.splice(n,0,e)})),t}(e),r}function u(e,t){return t=(t||Math.round(10*Math.random()))%e.length,e.slice(t).concat(e.slice(0,t))}function l(e,t){const{renderId:n,origin:i}=e,{followRandom:a,circulation:u}=i;if(!(0,r.Oi)(e))return t;if((0,o.ms)(e.nodeUuid,e.parent.nodeGroups)){let i=s[e.nodeUuid];if(i)return t.sort(((e,t)=>i[e.uuid]>i[t.uuid]?1:-1));{const e=c(t,a,u);return s[n]=i={},e.forEach(((e,t)=>{i[e.uuid]=t})),e}}return c(t,a,u)}function d(e,t,n){const{randomType:i}=e.origin;return"col"!==i&&"row_col"!==i||(t=l(e,t)),"row"!==i&&"row_col"!==i||(n=l(e,n)),"col_loop"===i&&(t=u(t)),"row_loop"===i&&(n=u(n)),{optionsX:t,optionsY:n}}},4316:(e,t,n)=>{"use strict";n.d(t,{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 m(e){const{autoInputConfig:t}=e.origin;if(!t)return"";const{defaultValue:n}=t;return n&&(0,f.Wo)(n).trim()?n:""}const g={};async function h(e,t,n,i,r){if(!m(e))return p;const{parent:o}=t,a=await(0,c.W0)(m(e),{state:o});let s=String(a);return a>=n&&a<=i||(s=r),(0,d.e)(e,{value:s}),{done:!0,actualValue:s,expectedValue:a}}async function v(e,t){const n=g[t.type];if(n){t.parent.context.option=e;const i=await n(e,t);return!!i.done&&((0,l.Q3)(t.parent,e,t,i.actualValue,i.expectedValue),!0)}return!1}g.fill=async(e,t)=>{if(!m(e))return p;const{parent:n}=t,i=await(0,c.E3)(m(e),{state:n});return(0,d.e)(e,{value:i}),{done:!0,actualValue:i,expectedValue:i}},g.value_mark=(e,t)=>h(e,t,e.minValue,e.maxValue,""),g.icon_mark=(e,t)=>h(e,t,0,e.iconCount,""),g.slide_rate=(e,t)=>{const{rateOptions:n}=t;return h(e,t,0,n.length,"")},g.weight=(e,t)=>h(e,t,0,e.maxValue||t.weightTotal,""),g.sequence=async(e,t)=>{if(!m(e))return p;const n=t.options.length,{parent:i}=t,r=await(0,c.W0)(m(e),{state:i});let o=r;return r>=1&&r<=n||(o=-1),(0,d.e)(e,{sortNo:o,selected:o>=1}),{done:!0,actualValue:o,expectedValue:r}},n(2048);var y=n(4060),_=n(6276);async function w(e,t){const n=t.parent;n.context.option=e;const i=await async function(e,t){return!!t&&(0,y.wx)(e,t)}(n,e.origin.selectConfig);e.autoSelectMarked=!!i}const x=["select","select_icon","select_image","menu","hot_spot","data"];var b=n(1344),T=n(6348);async function S(e,t,n,i=!1){const r=n.origin.options.find((n=>n.xid===e.uuid&&n.yid===t.uuid)),o={...await N(n,r,null),optionX:e,optionY:t,text:i?e.text:t.text,xid:e.uuid,yid:t.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(e){Object.defineProperty(e,"selected",{get(){return this.__cache.selected},set(e){"select-input"===this.inputType&&(e?this.value=this.__cache.value||this.value:(this.__cache.value=this.value,this.value="")),this.__cache.selected=e,e&&(0,E.I9)(this.origin)&&setTimeout((()=>{T.i.trigger("OPT_EXCLUDE",this)})),e?T.i.trigger("OPT_SELECT",this):T.i.trigger("OPT_DESELECT",this)}})}async function N(e,t,n){const{parent:i}=e,o={origin:t,isOtherOpt:t.isOtherOpt,customData:{},__cache:{selected:!1,value:""},inputType:U(t,e.type),value:"",renderId:(0,r.qY)(e,t),uuid:t.uuid,label:t.label,number:t.number,optComment:t.optComment,optionType:t.optionType,useComment:t.useComment,passRef:n};return i.context.option=o,o.text=await(0,c.qQ)(t.text,{state:i,usage:{node:e,optionId:t.uuid}}),L(o),o.isOtherOpt&&(await A(o,e),(0,r.yg)(t)||await w(o,e)),function(e){const{origin:t}=e;!0===t.useComment?(0,d.e)(e,{placeholder:t.optComment}):"input"===e.inputType&&(0,d.e)(e,{placeholder:e.text})}(o),await(0,a.Il)(o,i),o}async function R(e,t,n){const i=[];for(const r of t){const t=n.find((e=>e.uuid===r.uuid)),o=await N(e,r,t);i.push(o)}return i}function A(e,t){return(0,d.e)(e,{inputType:U(e.origin,t.type)}),G(e,t)}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(e,t){if(e.isOtherOpt){let t="select";return(0,r.yg)(e)?t="input":!0===e.useComment&&(t="select-input"),t}return W.includes(t)?!0===e.useComment?"select-input":"select":P.includes(t)?"input":M.includes(t)?"select":void 0}async function G(e,t){if(!(0,_.cp)(e))return;const{origin:n}=e,i=e.origin.fillType;if(!i)return;const{parent:o}=t;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 e=(new Date).getFullYear(),t=l,n=f;void 0!==l&&(l=new Date(l,0,1),e<t&&(a=l)),void 0!==f&&(f=new Date(f,11,31),e>n&&(a=f))}"auto_complete"===i&&(s=function(e,t=[]){const{autoCpltGroups:n}=e;return t.reduce(((e,t)=>{const i=n.find((e=>e.id===t));return i&&(e=e.concat(i.data)),e}),[])}(o,n.autoCpltIds),u=await(0,b.$7)(t.parent.sid));let p=[];"list_select"===i&&(p=F((await(0,c.E3)(n.selectText,{state:o,joinBy:","})).split(",")));const m=await(0,r.jJ)(e,t),g=await(0,O._u)(e,t);(0,d.e)(e,{itemsMax:m.itemsMax,itemsMin:m.itemsMin,fillStart:g.start,fillEnd:g.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(e,t,n=!1){const{options:r,otherOptions:o,hiddenOptions:a}=e,s={options:[],otherOptions:o,hiddenOptions:[]};if(r){const n=function(e){const t=e.filter((e=>"top-fixed"===e.origin.position)).sort(((e,t)=>e.number-t.number)),n=e.filter((e=>"bottom-fixed"===e.origin.position)).sort(((e,t)=>e.number-t.number)),i=e.filter((e=>"top-fixed"!==e.origin.position&&"bottom-fixed"!==e.origin.position));return t.concat(i).concat(n)}((0,i.uQ)(e,r));for(const e of n)s.options.push(await t(e))}if(a)for(const e of a){const n=e.isOtherOpt?e:await t(e);s.hiddenOptions.push(n)}n&&j([...s.options,...s.otherOptions]),(0,d.e)(e,s)}const B={};async function q(e,t){return e.image?e.image:await(0,a.Md)(t,e)}function F(e){const t={};return e.map((e=>{const n=t[e];return n?(t[e]=n+1,"".concat(e,"(").concat(n,")")):(t[e]=2,e)}))}function j(e){F(e.map((e=>e.text))).forEach(((t,n)=>{e[n].text=t}))}function z(e){return e&&e.path?(0,d.E3)().hostConfig.mediaHost+e.path:""}function V(e){const t=z(e);return{normalIconUrl:t,activeIconUrl:K(t)}}function K(e){return e.replace("/outline/","/glyph/")}function Y(e){const{origin:t,passRef:n}=e;return n&&n.normalIconUrl?{normalIconUrl:n.normalIconUrl,activeIconUrl:n.activeIconUrl}:V(t.icon)}async function H(e,t){if((0,_.G6)(e)){await async function(e,t){const{origin:n}=e;let i={options:[]};if((0,I.is)(n,"matrix"===n.type)){const{options:r,refMaps:o,passRefs:c}=await(0,a.q0)(t,e.origin,"xid"),u=await R(e,r,c),l=await(0,s.s$)(t,u,e),{options:d,refMaps:f,passRefs:p}=await(0,a.q0)(t,e.origin,"yid"),m=await R(e,d,p),g=await(0,s.Ah)(t,m,e);(0,k.GO)(e,[...o,...f]);const h=await R(e,n.otherOptions,[]),v=await(0,s.is)(t,h,e);i={options:[],optionsX:l,optionsY:g,otherOptions:v.visibleList,hiddenOptions:v.hiddenList}}else if(n.options){const n=await(0,a.q0)(t,e.origin);let r=n.options;(0,_.IN)(e)&&(r=r.concat(e.origin.otherOptions));const o=await R(e,r,n.passRefs),c=await(0,s.is)(t,o,e),u=[],l=[];c.visibleList.forEach((e=>{e.isOtherOpt?l.push(e):u.push(e)})),(0,k.GO)(e,n.refMaps),i={options:u,otherOptions:l,hiddenOptions:c.hiddenList}}(0,d.e)(e,i)}(e,t);const n=B[e.type];n&&await n(e),function(e){if((0,d.E3)().realTimePreview)return;if(!(0,_.G6)(e))return;let t;C.includes(e.type)?t=e=>!!e.text:"select_image"===e.type?t=e=>!!e.image:"slide_rate"===e.type&&(t=e=>!!e.text||!!e.image),t&&(e.options=e.options.filter(t))}(e),function(e){const{options:t,type:n,parent:i}=e;let r=(0,_.IN)(e)?e.otherOptions:[];x.includes(n)&&(r=[...r,...t]);const a=r.filter((e=>e.autoSelectMarked)).reverse();if((0,o._A)(e.origin))a.forEach((t=>{(0,d.e)(t,{selected:!0}),(0,l.y)(i,t,e)}));else{const[t,...n]=a;n.forEach((t=>{t.autoSelectMarked=!1,(0,l.y)(i,t,e,"因冲突被终止")})),t&&((0,d.e)(t,{selected:!0}),(0,l.y)(i,t,e))}}(e),t.context.option=null}}B.select=e=>D(e,(async function(t){return await G(t,e),await w(t,e),t})),B.fill=e=>D(e,(async function(t){return t.inputType="input",t.prefix=t.origin.prefix,t.suffix=t.origin.suffix,await G(t,e),t.placeholder=(0,c.Qr)(t.text),await v(t,e),t})),B.value_mark=e=>D(e,(async function(t){const{parent:n,origin:i}=e;t.value="";const r=await(0,c.W0)(i.markMin,{state:n}),o=await(0,c.W0)(i.markMax,{state:n});return(0,d.e)(t,{minValue:r,step:i.markStep,maxValue:o,minValueText:i.minText,maxValueText:i.maxText}),await v(t,e),t})),B.icon_mark=e=>D(e,(async function(t){return t.value="",(0,d.e)(t,{iconCount:e.origin.markImgCount||5,iconName:e.origin.markImgName||"rating-number"}),await v(t,e),t})),B.sequence=async e=>{let t=!1;await D(e,(async n=>((0,d.e)(n,{sortNo:-1}),await v(n,e)&&(t=!0),n))),t&&e.options.sort(((e,t)=>e.sortNo>t.sortNo?1:-1))},B.matrix=async e=>{const t=(0,i.uE)(e,e.optionsX,e.optionsY),{parent:n,origin:r}=e,a=[];for(const i of t.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:e,optionId:i.uuid}})});const s=new Map;a.forEach(((e,t)=>{s.set(e,t)})),a.sort(((e,t)=>{switch("".concat(e.origin.position,"___").concat(t.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(e),i=s.get(t);return n&&i?n-i:e.number-t.number}}}));const u=[];for(const i of t.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:e,optionId:i.uuid}})});const l=new Map;u.forEach(((e,t)=>{l.set(e,t)})),u.sort(((e,t)=>{switch("".concat(e.origin.position,"___").concat(t.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(e),i=l.get(t);return n&&i?n-i:e.number-t.number}}}));for(const t of e.otherOptions)await A(t,e);const f={otherOptions:e.otherOptions,renderOptionsX:a.filter((e=>e.visible)),renderOptionsY:u.filter((e=>e.visible))},p=(0,o.ct)(r)||(0,o.KC)(r),m=await async function(e,t,n,i=!1){const r=[],o=[];let a=e,s=t;i&&(a=t,s=e);for(const e of a)if(e.visible){const t={text:e.text,list:[]};for(const r of s)if(r.visible){let a=e,s=r;i&&(s=e,a=r);const c=await S(a,s,n,i);o.push(c),t.list.push(c)}r.push(t)}return{flatten:r,options:o,fullOptions:o}}(a,u,e,p),g=function(e,t,n){const i=[];return t.forEach((t=>{if(t.visible){const r=[];e.forEach((e=>{if(e.visible){const i=n.find((n=>n.xid===e.uuid&&n.yid===t.uuid));if(!i)throw new Error("matrix item not found");r.push(i)}})),i.push(r)}})),{matrix:i}}(a,u,m.options);(0,d.e)(e,{...f,...m,...g})},B.select_image=e=>D(e,(async t=>(t.image=await q(t,e),await w(t,e),t))),B.upload=e=>D(e,(async e=>(e.filePath="",e.value="",e.fileName="",e.fileType="",e.progress=0,e.isImage=!1,e.fileLimits=[...e.origin.fileLimits||["image"]],e.accept=(0,u.A)(e.fileLimits),e))),B.menu=e=>D(e,(async t=>(await G(t,e),await w(t,e),t)),!0),B.select_icon=e=>D(e,(async t=>{const n={...t,...Y(t)};return await w(n,e),n})),B.weight=e=>{const{parent:t}=e;return D(e,(async n=>{let i=await(0,c.W0)(n.origin.maxMark,{state:t});const r=await(0,o.iw)(e.origin,t);return(!i||i>r)&&(i=r),(0,d.e)(n,{percent:"0%",color:n.origin.color,maxValue:i,value:""}),await v(n,e),n}))},B.cascade=e=>D(e,(async e=>(e.text="",e.cascadePath=e.origin.cascadePath,e))),B.data=async e=>{for(const t of e.options)await w(t,e)},B.hot_spot=async e=>await D(e,(async t=>{await G(t,e),await w(t,e);let n=t.origin.graphs;if("points"in t){const{points:e,x:i,y:r}=t.origin;n=[{points:e,x:i,y:r,uuid:(0,I.YF)()}]}const i=n.map((e=>{const{area:t,pathD:n}=e.points.reduce(((t,n,i)=>{t.pathD?t.pathD+=" L":t.pathD+="M",t.pathD+=n.x+" "+n.y;const r=e.points[i+1];return r?t.area+=n.y+r.y*(r.x-n.x)/2:t.pathD+=" Z",t}),{area:0,pathD:""});return{...e,area:t,pathD:n,transform:"translate(".concat(e.x,",").concat(e.y,")")}}));return(0,d.e)(t,{graphs:i,color:t.origin.color}),t})),B.heat_map=(e,t)=>D(e,(async function(e){return e})),B.max_diff=e=>D(e,(async function(t){return t.value="0",t.image=await q(t,e),t.records=[],t})),B.slide_rate=async e=>{const{rateOptions:t}=e.origin,n=[];for(const i of t){const t=await N(e,i,null);await(0,s.Ej)(e.parent,t,e)&&n.push(i)}return e.rateOptions=n.map((e=>{const{icon:t}=e;return{...V(t),text:(0,c.gt)(e.text),value:e.value,uuid:e.uuid,customData:{}}})),D(e,(async t=>((0,d.e)(t,{image:await q(t,e),value:""}),await v(t,e),t)))}},6332:(e,t,n)=>{"use strict";n.d(t,{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(e,t,n){const{origin:r}=t,a=r.displayConfig;if(a){n.hasOptShowHide=!0,e.context.option=t;const r=await(0,i.wx)(e,a);return r&&(0,o.mT)(e,t,n),e.context.option=null,r}return!0}async function c(e,t,n){const i=[],r=[];for(const o of t)await s(e,o,n)?(o.visible=!0,i.push(o)):(o.visible=!1,r.push(o));return{visibleList:i,hiddenList:r}}async function u(e,t,n){for(const i of t)i.visible=await s(e,i,n);return t}async function l(e,t,n){t=await u(e,t,n);for(const e of t)e.visible=e.visible&&"hidden"!==e.width;return t}async function d(e,t,n){t=await u(e,t,n);for(const e of t)e.visible=e.visible&&"hidden"!==e.height;return t}function f(e,t){const{renderList:n}=e,i=[];return n.forEach((e=>{if(!(0,a.Ci)(e.checkMode,t))return;const{hasOptShowHide:n,nodeUuid:o,loop:s}=e;if(n){const t="matrix"===e.type?(0,r.IZ)(e):(0,r.wR)(e);let n;s&&(n=s.replacements.map((e=>e.index))),i.push({node_id:o.toLowerCase(),loop_idxs:n,option_ids:t.map((e=>e.uuid.toLowerCase()))})}})),i}},5776:(e,t,n)=>{"use strict";n.d(t,{AF:()=>v,CA:()=>G,CY:()=>h,EH:()=>A,IZ:()=>M,K6:()=>_,KC:()=>L,MR:()=>T,Oi:()=>w,S:()=>q,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:()=>F}),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:""},m=["region","location","area","describe","end","logic","uniqueness_verification","loop","lottery","verify"],g={};function h(e){(0,s.e)(e,{hasAnswer:(0,d.Qz)(e)})}function v(e,t){if(8!==t.length)return t;let n=g[t];if(!n){const i=e.nodeList.find((e=>(0,r.oj)(e.nodeUuid,t)));if(i)return n=g[t]=i.nodeUuid,i.nodeUuid}return n}function y(e){return e.find((e=>"start"===e.type))}function _(e){return!0===e.answerRequired}function w(e){return(0,r.is)(e,"matrix"===e.type)?function(e){const{randomType:t}=e.origin;return"col"===t||"row_col"===t||"row"===t}(e):!0===e.origin.randomOptionY}function x(e){const t=e.loopStack,n=e.nodeUuid;return(0,r.So)(n,t)}function b(e,t){if(t)return e.find((e=>e.input&&(0,r.oj)(e.input.uuid,t)||e.loopEnd&&(0,r.oj)(e.loopEnd.uuid,t)))}function T(e,t,n){const i=t.find((e=>(0,r.oj)(e.selfPortId,n)));if(i&&i.destInputId)return b(e,i.destInputId)}function S(e){return(0,r.is)(e,"matrix"===e.type)?"multi"===e.matrixSelect:!0===e.multiSelect}function E(e){return(0,r.is)(e,"matrix"===e.type)?"single"===e.matrixSelect:!0!==e.multiSelect}function I(e){return"single_row"===e.matrixSelect}function k(e){return"single_col"===e.matrixSelect}function O(e){return"single_row_col"===e.matrixSelect}function C(e){return S(e)&&"all"===e.multiType}function L(e){return S(e)&&"row"===e.multiType}function N(e){return S(e)&&"col"===e.multiType}async function R(e,t){const{origin:n}=e,i=!0===n.limitEnabled;let r=i?await(0,o.W0)(n.maxUploadCount,{state:t}):e.options.length,a=i?await(0,o.W0)(n.minUploadCount,{state:t}):1;const s=e.options.length;return a||(a=1),r||(r=s),a>s&&(a=s),a>r&&(a=r),{max:r,min:a}}async function A(e,t){const{origin:n}=e;if(!S(n))return{min:1,max:1};const{multiMin:a,multiMax:s}=n;let c=await(0,o.W0)(a,{state:t}),u=await(0,o.W0)(s,{state:t});const d=(0,i.gr)(e).length;return(0,r.is)(e,"matrix"===e.type)||(c=(0,l.uE)(e,c)),c||(c=1),u||(u=d),c>d&&(c=d),c>u&&(c=u),{min:c,max:u}}const P=(e,t,n,i)=>{let r=0;r=i?e.filter((e=>e[i]===t[i]&&e.selected)).length:e.filter((e=>e.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(e,t){if(!S(e.origin)||(0,l.I9)(t.origin)||!t.isOtherOpt&&((0,l.I9)(t.optionX.origin)||(0,l.I9)(t.optionY.origin)))return p;const n=C(e.origin);if(!n&&!(0,i.u6)(t))return p;const r=(0,i.wR)(e),{max:o}=await A(e,e.parent);return n?P(r,t,o):N(e.origin)?P(r,t,o,"xid"):L(e.origin)?P(r,t,o,"yid"):p}async function W(e,t){if(!S(e.origin))return p;const{max:n}=await A(e,e.parent),r=(0,i.wR)(e),o=!(r.filter((e=>e.selected)).length===n)||(0,l.Gg)(r,t);return{valid:o,message:o?"":(0,a.GS)(c.CW.select.limitMax,{max:n})}}function U(e,t){return e.find((e=>(0,r.oj)(e.nodeUuid,t)))}const G=["logic","random","loop","uniqueness_verification"],D=[...G,"data"];function B(e){(0,s.E3)().preview&&e.autoSkip&&e.parent.previewShadowNodes&&!D.includes(e.type)&&(e.readonly=!0)}function q(e){if(e.forceSkipReason)return e.forceSkipReason;if("data"===e.type)return"data_hidden";if(e.autoSkip)return function(e){return(0,s.E3)().preview&&e.parent.previewShadowNodes&&!D.includes(e.type)}(e)?"":"setting";if((0,f.I)(e.nodeUuid))return"random_group";const t=(0,i.wR)(e);return!m.includes(e.type)&&t&&0===t.length?"no_options":""}function F(e,t){return!(!e.circleNode1Id&&!e.circleNode2Id)&&(0,r.oj)(e.circleNode1Id,t.circleNode1Id)&&(0,r.oj)(e.circleNode2Id,t.circleNode2Id)}async function j(e,t){const{options:n}=e;let i=await(0,o.W0)(e.total,{state:t})||100,r=0;for(const e of n){const n=await(0,o.W0)(e.maxMark,{state:t});if(void 0===n){r=-1;break}r+=n}return r>0&&r<i&&(i=r),i}async function z(e){const{max:t}=await R(e,e.parent),n=t===e.options.filter((t=>(0,u.QX)(t,e))).length;(0,s.e)(e,{fullUploaded:n})}},908:(e,t,n)=>{"use strict";n.d(t,{S:()=>m,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(e,t,n,i){e&&((0,c.e)(e,{selected:!0}),t.forEach((t=>{t!==e&&(0,c.e)(t,{selected:!1})}))),(0,c.e)(i,{value:n})}const f={};async function p(e,t){const n=f[t.type],i=n?await n(e,t):l.Az;return i.noValidate||(0,s.c9)(t),i}function m(e){return e.failed=!0,e.succeed=!1,e.origin.failedSkip&&(e.failedSkipActivated=!0,e.autoSkip=!0),l.yK}f.region=(e,t)=>{t.indexes=e;const n=(0,r.wR)(t),a=(0,i.qu)(e);d((0,o.At)(n,a),n,a,t);const s=a.split("-"),c={country:"",province:s[0]||"",city:s[1]||"",district:s[2]||""};return t.parent.address=c,t.position={address:c},l.yK},f.location=(e,t)=>{t.succeed=!0,t.failed=!1,t.failedSkipActivated=!1;const n=(0,a.A)(e.address,"-",t.infoRange),i=(0,r.wR)(t);return d((0,o.At)(i,n),i,n,t),(0,c.e)(t.parent,{point:e.point,address:e.address}),t.position=e,l.yK},f.area=(e,t)=>{t.succeed=!0,t.failed=!1,t.failedSkipActivated=!1;const n=(0,a.A)(e.address,"-","street"),i=(0,r.wR)(t);return d((0,o.KQ)(i,e.point),i,n,t),(0,c.e)(t.parent,{point:e.point,address:e.address}),t.position=e,l.yK},f.verify=(e,t)=>((0,c.e)(t,e),{...l.yK,noValidate:!0}),f.gift=(e,t)=>((0,c.e)(t,e),l.ay),f.heat_map=async(e,t)=>{const n={x:Math.round(e.x),y:Math.round(e.y)},{options:i}=t,r=i[t.clickTimes%i.length];return(0,c.e)(r,{point:n,value:JSON.stringify(n)}),t.clickTimes+=1,await(0,u.e)(r,t),l.ay}},1576:(e,t,n)=>{"use strict";n.d(t,{w:()=>o});var i=n(8856);function r(e,t){(0,i.e)(e,{value:t});const{option:n}=e;n.records.find((t=>t.round===e.round)).value=t,(0,i.e)(n,{value:n.records.reduce(((e,t)=>e+t.value),0).toString()})}function o(e,t,n){if(t.value===e)return{result:!0};r(t,e),n.items.forEach((e=>{e!==t&&e.value===t.value&&r(e,0)}));const o=n.items.some((e=>1===e.value)),a=n.items.some((e=>-1===e.value));return(0,i.e)(n,{done:o&&a}),{result:!0}}},6680:(e,t,n)=>{"use strict";n.d(t,{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(e){return"[object Map]"!==Object.prototype.toString.call(e)}async function a(e,t,n){const{options:a}=n;if(!function(e,t){if(o(e))return!0;if(e.size!==t.length)return!1;const n=new Array(t.length).fill(!1);for(const[i,r]of e)r>=0&&r<t.length&&(n[r]=!0);return n.every((e=>e))}(e,a)||!function(e,t){if(e.size!==t.length)return!1;const n=Array.from(e.values()).filter((e=>-1!==e));for(const e of n)if(e<1||e>t.length)return!1;return i=n,new Set(i).size===i.length;var i}(t,a))return{result:!1};let s;for(const[e,n]of t)e.sortNo!==n&&((0,i.e)(e,{sortNo:n,selected:-1!==n}),e.selected&&(s=e));if(!o(e)){const t=[];for(const[n,i]of e)t[i]=n;(0,i.e)(a,t)}return s&&await(0,r.e)(s,n),{result:!0}}},4404:(e,t,n)=>{"use strict";n.d(t,{Y:()=>r});var i=n(8856);function r(e){if(!e)return{};const{useCustomLogo:t,logoText:n,logoImage:r,showLogoInEachPage:o,logoImageShowWidth:a}=e;let s="";if(r){const e=r.name;s=(0,i.E3)().hostConfig.mediaHost+"/"+e}return{useCustomLogo:t,logoImageUrl:s,logoText:n,showLogoInEachPage:o,logoImageShowWidth:a}}},8184:(e,t,n)=>{"use strict";n.d(t,{_M:()=>oe,yI:()=>re,o9:()=>ie,e_:()=>ne});var i=n(4316),r=n(5776),o=n(8084),a=n(6496),s=n(568),c=n(8856);const u={select:async e=>{const t=(0,r._A)(e.origin);let n=(0,a.GS)(s.CW.select.single);if(t){n=(0,a.GS)(s.CW.select.multi);const{min:t,max:i}=await(0,r.EH)(e,e.parent);return{typeName:n,typeDescription:(0,a.GS)(s.CW.select.limitBetween,{min:t,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 e=>{const t=e.weightTotal;let n=(0,a.GS)(s.CW.weight.total,{total:t});return n+=!0===e.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 e=>{const t=e.origin.rankCount,n=Number(t)?(0,a.GS)(s.CW.rank.limitMin,{min:t}):(0,a.GS)(s.CW.rank.limitAll);return{typeName:(0,a.GS)(s.CW.rank.name),typeDescription:n}},menu:async e=>({...await u.select(e),typeName:(0,a.GS)(s.CW.menu.name)}),select_icon:e=>u.select(e),select_image:e=>u.select(e),upload:async e=>{const t=(0,a.GS)(s.CW.upload.name);if(!0===e.origin.limitEnabled){const{min:n,max:i}=await(0,r.YP)(e,e.parent);return{typeName:t,typeDescription:(0,a.GS)(s.CW.upload.amountLimit,{min:n,max:i})}}return{typeName:t,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 e=>{const{origin:t}=e;if((0,r.cd)(t))return{typeName:(0,a.GS)(s.CW.matrix.single)};if((0,r._A)(t)){const{min:n,max:i}=await(0,r.EH)(e,e.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)(t)?(o=(0,a.GS)(s.CW.matrix.multiCol),c=(0,a.GS)(s.CW.matrix.colLimitBetween,{min:n,max:i})):(0,r.KC)(e.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)(t)?{typeName:(0,a.GS)(s.CW.matrix.singleRow),typeDescription:(0,a.GS)(s.CW.matrix.eachRowOne)}:(0,r.gd)(t)?{typeName:(0,a.GS)(s.CW.matrix.singleCol),typeDescription:(0,a.GS)(s.CW.matrix.eachColOne)}:(0,r.cx)(t)?{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),m=n(1344),g=n(8348),h=n(7404),v=(n(9952),n(4708)),y=n(6764),_=n(6332),w=n(556),x=n(9376);function b(e){return 1===e?"bottom":2===e?"top":"center"}function T(e,t,n,i,r=""){const{resultId:o,text:a}=t,s=o&&e.options.find((e=>e.cascadePath===o)),c=r?r+"=>"+a:a;return s&&(s.text=c),n.nodeTypeInfoRequired||(t.hint=""),t.list&&t.list.forEach((t=>{t.text=T(e,t,n,i,c)})),t.text}async function S(e,t){const{destList:n,cascadeStart:i}=t.origin,o=(0,r.MR)(e.nodeList,n,i.uuid);o&&(t.cascade=await E(t,e,o,""))}async function E(e,t,n,o,c){c?await(0,i.wz)(c,e):c={uuid:"",text:""};const{nodeList:u}=t,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(e,t,n){let r=n.cachedCasMenuOpts;r||(r=n.cachedCasMenuOpts={});const o=r[e.nodeUuid];if(o)return o;{const{options:o,passRefs:a}=await(0,x.q0)(t,e),s=await(0,i.o9)(n,o,a),c=await(0,_.is)(t,s,n),u={...ne({target:e},t),renderId:(0,w.So)(e.nodeUuid,n.loopStack)},l=await(0,i.o9)(n,e.otherOptions,[]),d=await(0,_.is)(t,l,n),f={options:(0,y.uQ)(u,c.visibleList),otherOptions:d.visibleList};return r[e.nodeUuid]=f,f}}(n,t,e),p={...ne({target:n},t),...f,parent:t},m=(0,r._A)(n),{min:g,max:h}=await(0,r.EH)(p,t),{destList:T,output:S}=n,I=(0,r.K6)(n),k=[],O=m?(0,a.GS)(s.CW.cascade.selectBetween,{min:g||1,max:h}):(0,a.GS)(s.CW.cascade.selectSome,{amount:1}),C={...d,list:k,multiple:m,min:g,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(e,t,i,l,n);k.push(o)}return C}function I(e,t,n){const i=function(e){const t=[];return e.forEach((e=>{const{pickedTimes:n}=e;t[n]?t[n].push(e):t[n]=[e]})),t}(e),r={items:[],done:!1};let o=t;for(const e of i)if(e){const t=(0,w.my)(e,o);if(t.forEach((e=>{r.items.push({option:e.option,value:0,round:n}),e.option.records.push({round:n,value:0}),e.pickedTimes+=1})),o-=t.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(e){return"group"===e.type}function R(e){return"type"in e&&"group"===e.type}async function A(e,t){const{options:n,origin:i}=e;let r=i.optionGroups||[];if(o=e.type,!L.includes(o))return{optionGroups:void 0};var o;const a=function(e,t){const{optionRefers:n,refOptions:i}=e.origin;let r=[];const o=[];return n.forEach((e=>{const{identity:{nodeId:n}}=(0,k.W)(e);if(n&&!o.includes(n)){o.push(n);const e=(0,O.IH)(t,n);if(!e)return;const a=W(M(e.optionGroups||[],e.origin.optionGroupsRelationship||C),i);r=r.concat(a)}})),r}(e,t);if(r=r.concat(a),0==r.length)return{optionGroups:void 0};const s=function(e,t){const n={};!function e(t){t.forEach((t=>{N(t)?t.children.forEach((t=>{N(t)?e(t.children):n[t.optionUuid]=t.groupUuids})):n[t.optionUuid]=t.groupUuids}))}(t);const i=[];e.forEach((e=>{n[e.uuid]||i.push(e)}));const r=[];return i.forEach((e=>{const t={text:e.text,optionUuid:e.uuid,groupUuids:[],type:"option",currentLevel:1};r.push(t)})),r}(n,r);r=function(e,t,n){const i=e.concat(t),r=(e,t)=>{if(N(e)){const n=e;let i=t;for(const e of n.children)i=Math.min(r(e,i),i);return i}{const t=e,i=n.map((e=>e.uuid)).indexOf(t.optionUuid);return-1===i?Number.MAX_VALUE:i}};return i.sort(((e,t)=>r(e,Number.MAX_VALUE)-r(t,Number.MAX_VALUE)))}(r,s,n);let c=await U(r,n,t);return c=P(c),c=function(e,t){const{randomOptionY:n,circulation:i,followRandom:r}=e.origin;return i?q(t):n?r?t:B(t):t}(e,c),F(c,n),c=j(c),{optionGroups:c}}function P(e){const t=[];return e.forEach((e=>{R(e)?function(e){const{children:t}=e;return!(!t||0===t.length)&&0!==P(t).length}(e)&&t.push(e):t.push(e)})),t}function M(e,t){return(e||[]).map((e=>{if(R(e)){const n=(0,w.O0)(e),{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,t)}}{const n=(0,w.O0)(e),{text:i,uuid:r}=n;return{type:"option",text:i,optionUuid:r,groupUuids:t.optionsRelationship[r]||[]}}}))}function W(e,t){return e.map((e=>function(e,t){if(N(e)){const n=W(e.children,t);return e.children=[...n],e}{const{optionUuid:n,type:i,groupUuids:r,text:o,currentLevel:a}=e,s=t.find((e=>(0,w.oj)(n,e.refOptId)));return void 0===s?e:{type:i,groupUuids:r||[],text:o,currentLevel:a,optionUuid:s.uuid}}}(e,t)))}async function U(e,t,n){const i=[];for(const r of e){const e=await G(r,t,n);e&&i.push(e)}return i}async function G(e,t,n){if(N(e))return{uuid:e.uuid,type:e.type,groupTitle:await(0,l.qQ)(e.groupTitle,{state:n}),showGroupTitle:e.showGroupTitle,randomMode:e.randomMode,children:await U(e.children,t,n),currentLevel:e.currentLevel};{const{optionUuid:n}=e;return t.find((e=>e.uuid===n))}}const D=(e,t)=>{const{groups:n,options:i}=(e=>e.reduce(((e,t,n)=>{const{groups:i,options:r}=e;return R(t)?i.push({group:t,index:n}):r.push({uuid:t.uuid,option:t,index:n}),e}),{groups:[],options:[]}))(e),r=t.reduce(((e,t)=>{const{uuid:n}=t,r=i.find((({uuid:e})=>e===n));return r&&e.push(r.option),e}),[]);return n.forEach((({group:e,index:t})=>{r.splice(t,0,e)})),r},B=e=>function(e){const t=[];return e.forEach((e=>{const n=(0,w.ec)(t.length+1);t.splice(n,0,e)})),t}(e),q=e=>{return t=e,n=(n||Math.round(10*Math.random()))%t.length,t.slice(n).concat(t.slice(0,n));var t,n};function F(e,t){e.forEach((e=>{if(R(e)){const{randomMode:n,children:i}=e;F(i||[],t);const r={followNode:()=>D(i,t),noRandom:()=>i,random:()=>B(i),circulation:()=>q(i)};e.children=r[n]()}}))}function j(e){let t=[],n=[];const i=[];return e.forEach((e=>{if(R(e))e.children=j(e.children),i.push(e);else{const r=e.origin,{position:o}=r;"top-fixed"===o?t.push(e):"bottom-fixed"===o?n.push(e):i.push(e)}})),t=t.sort(((e,t)=>e.number-t.number)),n=n.sort(((e,t)=>e.number-t.number)),[...t,...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"];function J(e,t,n){let i=e.indexOf(t)+n;return i<0?i=0:i>e.length-1&&(i=e.length-1),e[i]}const $={};function ee(e){const{origin:t}=e;return{mapImage:t.mapImage&&(0,d.a)(t.mapImage),mapImgHeight:t.mapImgHeight,mapImgWidth:t.mapImgWidth}}async function te(e){const{loop:t,parent:n,origin:i}=e,{lockLoopCount:r}=i;let o=i.nodeName.split("/")[0];if(o&&i.circleNode1Id&&!r&&!(0,c.E3)().realTimePreview){const e=(0,g.yy)();let r=await e.C_OL_LBL.getText({state:n});if(r||(r=t.node.nodeName+"_"+await e.C_OL_NUM.getText({state:n})),o=r+"_"+o,i.circleNode2Id){let i=await e.C_IL_LBL.getText({state:n});i||(i=t.node.nodeName+"_"+await e.C_IL_NUM.getText({state:n})),o=i+"_"+o}}return o}function ne(e,t){const{target:n,loop:i,random:r,loopStack:o}=e;return{customData:{},nodeUuid:n.nodeUuid,nodeName:n.nodeName,origin:n,loop:i,random:r,loopStack:o,type:n.type,parent:t}}async function ie(e,t){const n={...e,hasAnswer:!1,autoSkip:e.origin.autoSkip,reached:!1,readonly:!1,embedVarMaps:[],pageStart:!1,pageEnd:!1,checkMode:e.origin.checkMode,runtimeNodeName:await te(e),startTime:(new Date).toISOString(),costTime:0,endTime:0,realtimePreview:(0,c.E3)().realTimePreview,renderId:(0,r.YJ)(e),prev:t,errorMessage:""},o=e.parent;if(r.CA.includes(n.type))return async function(e,t){(0,c.e)(e,{autoSkip:!0,number:""});const n=$[e.type];return n&&await n(e),e}(n);const{qNumberRequired:a}=o;a&&function(e){"end"!==e.type&&"describe"!==e.type&&(0,c.e)(e,{number:e.runtimeNodeName})}(n),function(e){(0,c.e)(e,{validateFailTimes:0,validateFailed:!1})}(n),function(e){const{origin:t}=e;(0,c.e)(e,{asterisks:!0===t.answerRequired&&e.parent.asterisksRequired})}(n),await async function(e){const t=e,{origin:n}=t;var i;n.image?(0,c.e)(t,{imgScale:n.imgScale,imgPosition:n.imgPosition,imgTransTime:n.imgTransTime,imgTransType:n.imgTransType,images:await(0,x.Q9)(e.parent,t)}):(0,c.e)(t,{images:[]}),n.video&&(0,c.e)(t,{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(e){if((0,K.Oo)(e)){const{origin:t}=e;(0,c.e)(e,{layout:t.layout,template:await(0,Y.m)(t.template,e.parent)})}}(n),await(0,i.u_)(n,o),await async function(e,t){const n=await A(e,t);return(0,c.e)(e,{optionGroups:n.optionGroups}),n}(n,o);const s=$[n.type];return s&&await s(n),o.context.node=n,await async function(e){const t=e.origin,n=await(0,r.EH)(e,e.parent),i=(0,r._A)(t);(0,c.e)(e,{...n,multiple:i,selectType:i?"checkbox":"radio"})}(n),await(0,H.S)(n),(0,c.W4)().dev.infer||await async function(e){if(!e.parent.nodeTypeInfoRequired)return;const t=u[e.type],n=t?await t(e):null;n&&(n.typeDescription="",(0,c.e)(e,n))}(n),(0,r.j$)(n),await async function(e){(0,K.G6)(e)&&await async function(e){if(!(0,c.E3)().realTimePreview)if((0,w.is)(e,"sequence"===e.type)){if(1===e.options.length){const t=e.options[0];(0,c.e)(t,{selected:!0,sortNo:1}),(0,Q.we)(0,e)}}else if((0,w.is)(e,Z.includes(e.type))&&!await(0,X.yG)(e.origin.showWithSingleRefOpt,e.parent)){let t=[...e.options];if((0,K.IN)(e)&&(t=[...t,...e.otherOptions]),1===t.length){const n=t[0];n.origin.isRef&&((0,c.e)(n,{selected:!0}),(0,Q.y)(e.parent,n,e,"single_ref_select_opt"),e.forceSkipReason="single_ref_select_opt",e.autoSkip=!0)}}}(e)}(n),(0,m._4)(n),n}async function re(e,t,n){const i=!(!t||!t.id);let r;e.showRewards&&(r=e.options.map((e=>({rewardName:e.rewardName,rewardCount:e.rewardCount}))));const o=i?e.success:e.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,m=(0,d.a)({width:o.imageWidth,height:o.imageHeight,name:o.imageName,id:"",originName:"",type:"image"});let g;if(i){const n=e.options.find((e=>e.uuid===t.lottery_option_id));n&&(g=n.rewardName)}const h=ne({target:e},n),v=await ie(h,n.current);return(0,c.e)(v,{rewardRaw:t,rewardTime:(0,z.kF)(),goal:i,rewardImage:m.name?m:void 0,rewardTitle:f,rewardDescribe:p,rewardList:r,rewardName:g,showRewards:e.showRewards}),!(0,c.E3)().preview&&i&&((0,c.W4)().app.canHandleReward()||"red_envelope"!==t.type||await oe(n,v)),v}async function oe(e,t){const{formalResult:{reward:n,authorizer:i},nodeList:o}=e,{app_id:a,component_appid:s}=i,u=(0,r.o1)(o,n.gift_id);t.linkUrl=await(0,l.Oj)(u.linkUrl,{state:e}),t.endBtnText=u.endBtnText||"";const d={rid:String(n.id),aid:a,cid:s,qid:e.surveyId,tid:e.transactionID,sid:(0,h.uK)().sid,rt:"red_envelope",locale:e.language,reward_from_qr_code:"true"};t.qrCode=(0,c.W4)().app.getRewardUrl(d)}$.region=async e=>{(0,c.e)(e,{indexes:"0 0 0",value:"",regions:await(0,o.iM)(),infoRange:e.origin.infoRange})},$.end=async e=>{const{parent:t}=e,n=await(0,l.Oj)(e.origin.linkUrl,{state:t});(0,c.e)(e,{hasReward:!1,linkUrl:n,endBtnText:e.origin.endBtnText,backendRequest:e.origin.backendRequest})},$.location=async e=>{(0,c.e)(e,{regions:await(0,o.iM)(),infoRange:e.origin.infoRange,value:""})},$.value_mark=async e=>{(0,c.e)(e,{showInput:e.origin.showInput})},$.icon_mark=async e=>{(0,c.e)(e,{inverseValue:e.origin.inverseValue})},$.menu=async e=>{const{origin:t}=e;(0,c.e)(e,{placeholder:t.placeholder||(0,a.GS)(s.CW.menu.clickToSelect),display:b(t.menuType),lineCount:t.lineCount})},$.area=async e=>{(0,c.e)(e,{infoRange:"street",regions:await(0,o.iM)()})},$.verify=async e=>{(0,c.e)(e,{value:"",phoneNumber:"",code:"",validateType:e.origin.validateType})},$.weight=async e=>{const{origin:t,parent:n}=e,i=await(0,r.iw)(t,n);(0,c.e)(e,{weightTotal:i,unit:t.unit,distributeBy:t.distributeBy})},$.max_diff=async e=>{const{origin:t}=e,n=function(e){const{options:t,origin:n}=e,{taskCount:i,itemCountPerTask:r}=n,o=t.map((e=>({option:e,pickedTimes:0}))),a=[];for(let e=0;e<i;e++)a.push(I(o,r,e+1));return a}(e);(0,c.e)(e,{itemCountPerTask:t.itemCountPerTask,taskCount:t.taskCount,positiveDesc:t.positiveDesc,negativeDesc:t.negativeDesc,tasks:n,currentTask:n[0],gotoNextTask(){(0,c.e)(e,{currentTask:J(e.tasks,e.currentTask,1)})},gotoPrevTask(){(0,c.e)(e,{currentTask:J(e.tasks,e.currentTask,-1)})},gotoTask(t){(0,c.e)(e,{currentTask:t})}})},$.slide_rate=async e=>{(0,c.e)(e,{currentOption:e.options[0],gotoNextOption(){(0,c.e)(e,{currentOption:J(e.options,e.currentOption,1)})},gotoPrevOption(){(0,c.e)(e,{currentOption:J(e.options,e.currentOption,-1)})},gotoOption(t){(0,c.e)(e,{currentOption:t})}})},$.select_image=async e=>{(0,c.e)(e,{picFitType:e.origin.picFitType,needBgColor:e.origin.needBgColor,optImgScale:e.origin.optImgScale})},$.cascade=async e=>{await S(e.parent,e),function(e){const t=[],n=e=>{t.push(e),e.list&&e.list.forEach((e=>n(e)))};n(e.cascade),e.options.forEach((n=>{if(n.origin.useComment){const r=t.find((e=>e.resultId===n.cascadePath));n.inputType=(0,i.kd)(r.option.origin,e.type)}}))}(e),T(e,e.cascade,e.parent,e.loop,""),e.options=e.options.filter((e=>!!e.text)),(0,f.So)(e,e.options)},$.hot_spot=async e=>{(0,c.e)(e,{...ee(e),autoShowRect:e.origin.autoShowRect,autoShowText:e.origin.autoShowText})},$.heat_map=async e=>{(0,c.e)(e,{...ee(e),clickTimes:0,pointColor:e.origin.pointColor,pointRadius:e.origin.pointRadius})},$.loop=async e=>{const{parent:t}=e;(0,p.iO)(e,t)||(e.varList=await(0,p.Co)(t,e))}},1103:(e,t,n)=>{"use strict";n.d(t,{S:()=>s,e:()=>a});var i=n(8856),r=n(6276),o=n(3001);async function a(e){const{parent:t,origin:n}=e,r=await(0,o.qQ)(n.describe,{state:t,usage:{node:e,exclusiveId:"description"}});(0,i.e)(e,{description:r})}async function s(e){(0,r.kZ)(e)&&(e.headHidden=e.origin.headHidden,await async function(e){const{parent:t,origin:n}=e,r=await(0,o.qQ)(n.questionText,{spaceRep:" ",state:t,usage:{node:e,exclusiveId:"title"}});(0,i.e)(e,{title:r})}(e),await a(e))}},5032:(e,t,n)=>{"use strict";n.d(t,{m:()=>o}),n(9952);var i=n(8856),r=n(3001);async function o(e,t){if(!e)return{param:{}};const n=await(0,i.W4)().ui.loadNodeComponent(e,!0),o={};if(e.params)for(const n of e.params)o[n.name]=await(0,r.E3)(n.value,{state:t},"URL");return{name:e.name,id:e.id,component:n,param:o}}},1344:(e,t,n)=>{"use strict";n.d(t,{ew:()=>M,mi:()=>W,ig:()=>j,Yp:()=>z,$7:()=>Y,io:()=>G,IN:()=>F,ay:()=>B,wn:()=>q,_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(e,t){t&&e&&(t.selected=e.selected,t.option.selected=e.selected,t.list&&e.list&&t.list.forEach((t=>{const n=e.list.find((e=>e.resultId===t.resultId));n&&p(n,t)})))}function m(e){return e?{selected:e.selected,resultId:e.resultId,list:e.list&&e.list.map((e=>m(e)))}:null}function g(e,t){t.startTime=e.startTime,t.costTime=e.costTime,t.type=e.type,function(e,t){t.validateFailTimes=e.validateFailTimes,t.validateFailed=e.validateFailed}(e,t)}f.max_diff={cache(e,t){t.tasks=e.tasks.map((e=>({items:e.items.map((e=>({uuid:e.option.uuid,value:e.value,round:e.round}))),done:e.done}))),t.currentTaskIndex=e.tasks.indexOf(e.currentTask)},use(e,t){e.tasks&&(t.tasks=e.tasks.map((e=>({items:e.items.map((e=>({option:(0,i.oz)(t.options,e.uuid),value:e.value,round:e.round}))),done:e.done}))),t.currentTask=t.tasks[e.currentTaskIndex||0])}},f.slide_rate={use(e,t){t.currentOption=t.options[e.currentTaskIndex||0]},cache(e,t){t.currentTaskIndex=e.options.indexOf(e.currentOption)}},f.cascade={use(e,t){p(e.cascade,t.cascade)},cache(e,t){t.cascade=m(e.cascade)}},f.verify={borrow(e,t){t.code=e.code,t.phoneNumber=e.phoneNumber}},f.region={borrow(e,t){t.indexes=e.indexes,t.position=e.position,t.value=e.value}},f.location=f.area={borrow(e,t){f.region.borrow(e,t),t.succeed=e.succeed,t.failed=e.failed,t.failedSkipActivated=e.failedSkipActivated}},f.sequence={use(e,t){e.rankList&&t.options.sort(((t,n)=>e.rankList.indexOf(t.uuid)>e.rankList.indexOf(n.uuid)?1:-1))},cache(e,t){t.rankList=e.options.map((e=>e.uuid))}},f.heat_map={use(e,t){t.clickTimes=e.options.length}};const h=["select","select_icon","select_image","menu","hot_spot"];var v=n(4556),y=n(2352);const _={};function w(e,t,n){t.value=e.value,t.selected=e.selected,e.assistValue&&(t.assistValue=t.assistValue||{},Object.keys(e.assistValue).forEach((n=>{(0,y.oV)(e.assistValue[n])||(t.assistValue[n]=e.assistValue[n])})),"cache"===n&&0===Object.keys(t.assistValue).length&&delete t.assistValue)}function x(e,t,n){if(w(e,t,"use"),!t.isOtherOpt){const i=_[n];i&&(i.use?i.use(e,t):i.borrow&&i.borrow(e,t))}}_.max_diff={borrow(e,t){e.records&&(t.records=e.records.map((e=>({...e}))))}},_.sequence={borrow(e,t){t.sortNo=e.sortNo}},_.heat_map={borrow(e,t){e.point&&(t.point={...e.point})}},_.weight={borrow(e,t){t.percent=e.percent}},_.upload={borrow(e,t){t.fileName=e.fileName,t.fileType=e.fileType,t.filePath=e.filePath,t.isImage=e.isImage},cache(e,t){_.upload.borrow(e,t),t.value=e.miniValue||e.value},use(e,t){_.upload.borrow(e,t),t.fileName&&(0,v.Y5)(t,e)}};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(e){const{offlineTaskId:t,preview:n}=(0,c.E3)();if(n)return C+(0,u.kt)(e);{const n=O+(0,u.kt)(e);return t?n+"_with_"+t:n}}function P(e,t){const n={};return function(e,t,n){if(t.uuid=e.uuid,w(e,t,"cache"),!e.isOtherOpt){const i=_[n];i&&(i.cache?i.cache(e,t):i.borrow&&i.borrow(e,t))}}(e,n,t),n}function M(e){if((0,c.W4)().dev.infer||T)return;if((0,r.S)(e)||E.includes(e.type)||e.readonly)return;const t={error:e.errorMessage||void 0,options:{}};(0,i.wR)(e).forEach((e=>{t.options[e.renderId]=e.errorMessage||void 0})),R.error[e.renderId]=t}async function W(e){if((0,c.W4)().dev.infer||T)return;if((0,r.S)(e)||E.includes(e.type)||e.readonly)return;const t={};!function(e,t){g(e,t);const n=f[t.type];n&&(n.cache?n.cache(e,t):n.borrow&&n.borrow(e,t))}(e,t);const n=(0,o.cA)(e);if(n&&n.items){const i=n.items.map((e=>e.option_id.toLowerCase())),r=e=>!!n.items&&i.includes(e.uuid.toLowerCase());(0,d.G6)(e)&&(t.options=e.options.filter(r).map((t=>P(t,e.type)))),(0,d.IN)(e)&&(t.otherOptions=e.otherOptions.filter(r).map((t=>P(t,e.type))))}R.responseId=e.parent.transactionID,R.data[e.renderId]=t;const i=e.parent.randomList;i&&(R.randomList=i.map((e=>({nodeId:e.node.nodeUuid,destPortIds:e.destPortIds}))),R.randomAbandonedNodeIds=(0,b.mU)()),await U(e.parent)}async function U(e){const{sid:t,renderList:n}=e,i=A(t);R.locale=(0,l.qe)();const r=Object.keys(R.data);R.count=0;for(const e of n)if(r.includes(e.renderId)&&(R.count+=1),e.renderId===R.point)break;await(0,c.W4)().storage.setVital(i,JSON.stringify(function(e){const t=e.data,n={};return Object.keys(t).forEach((e=>{const i={...t[e]};"upload"===i.type&&(i.options=i.options.map((e=>((e={...e}).miniValue&&(e.value=e.miniValue,delete e.miniValue),e)))),n[e]=i})),{...e,data:n}}(R)))}async function G(e){const t=A(e),n=await(0,c.W4)().storage.getVital(t);if(n){const e=JSON.parse(n);return S||(S=e.locale),e}return null}function D(e){if((0,c.W4)().dev.infer)return e;if((0,r.S)(e)||E.includes(e.type)||e.readonly)return e;!function(e){const t=R.error[e.renderId];t&&(e.errorMessage=t.error||"",(0,i.wR)(e).forEach((e=>{e.errorMessage=t.options[e.renderId]||""})))}(e);const t=R.data[e.renderId];return t?(function(e,t,n){const r=(0,i.wR)(e);let o=[];t.options&&(o=[...o,...t.options]),t.otherOptions&&(o=[...o,...t.otherOptions]);for(const e of r){const t=(0,i.oz)(o,e.uuid);t&&x(t,e,n)}}(e,t,e.type),function(e,t){g(e,t);const n=f[t.type];n&&(n.use?n.use(e,t):n.borrow&&n.borrow(e,t))}(t,e),function(e){if((0,r._A)(e.origin)||!(0,d.G6)(e))return;let t=(0,d.IN)(e)?e.otherOptions:[];h.includes(e.type)&&(t=[...t,...e.options]);const n=t.filter((e=>e.selected));if(n.length<=1)return;const i=[];n.forEach((e=>{e.autoSelectMarked?(0,c.e)(e,{selected:!1,autoSelectMarked:!1}):i.push(e)})),i.length>1&&i.forEach(((e,t)=>{t<i.length-1&&(0,c.e)(e,{selected:!1})}))}(e),I&&I(e),e):(I&&I(e),e)}async function B(e,t,n){R=e,L=[...e.randomList||[]],(0,b.ID)(e.randomAbandonedNodeIds,t.nodeList),N=e.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=e=>{o(),I=null,k=null,a.i.trigger("END_MEMORY",t.current),setTimeout((()=>{n.onEnd(e)}),250)};const o=()=>{a.i.off("NEXT_OK",u),a.i.off("STRETCH_OK",u),a.i.off("NEXT_OK",c),T=!1},c=(e,t)=>{"NEXT_FAIL"===e.type&&t?n.onSuspend():k({failed:!0,error:t})},u=()=>t.current.renderId===N?k({failed:!1,error:""}):t.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 q(e,t){if(!L)return e;const n=L.find((e=>e.nodeId===t.nodeUuid));if(!n)return e;const i=n.destPortIds,r=[],o=[];return e.forEach((e=>{i.includes(e)?r.push(e):o.push(e)})),r.sort(((e,t)=>i.indexOf(e)>i.indexOf(t)?1:-1)),[...r,...o]}function F(){R={responseId:"",data:{},error:{},point:"",count:0,randomList:[],randomAbandonedNodeIds:[],locale:""}}async function j(e){F();const t=A(e.sid);await(0,c.W4)().storage.removeVital(t)}async function z(e,t){t.forEach((e=>{delete R.data[e]})),await U(e)}function V(e){T||(R.point=e.current.renderId)}async function K(e){V(e),await U(e)}async function Y(e){return e?(S||await G(e),S):""}},5616:(e,t,n)=>{"use strict";n.d(t,{K:()=>d,y:()=>l});var i=n(1344),r=n(6784),o=n(8856),a=n(6496),s=n(568);class c{constructor(e,t){if(e&&e.data&&Object.keys(e.data).length>0){const{langResume:n}=t;this.holder=e,this.state=t,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 e=this;return this.state.enterMode="resume",(0,o.e)(e,{sureText:"",denyText:"",show:!0,resuming:!0}),(0,r.Wy)(this.state,e.holder.responseId||""),await(0,o.W4)().hook.onResumeSurvey(this.state),(0,i.ay)(this.holder,this.state,{onEnd(){e.end()},onProgress(t){(0,o.e)(e,{show:!0}),(0,o.e)(e,{message:t})},onSuspend(){e.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(e){const t=await(0,i.io)(e.sid);return u=new c(t,e),u}function d(){return u&&u.resuming}},2392:(e,t,n)=>{"use strict";n.d(t,{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(e={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}){e.error=e.error||e.contrast,e.button=e.button||e.contrast,(0,i.E3)().theme=e,(0,i.E3)().setTheme(e)}},1372:(e,t,n)=>{"use strict";n.d(t,{a:()=>a});var i=n(8856),r=n(556);const o="prs-";function a(e=[]){const t=function(e){let t="";return e.forEach((e=>{t+="\n .".concat(o).concat((0,r.kt)(e.id)," {\n ").concat(function(e){let t="";const{backgroundColor:n,bold:i,color:r,fontSize:o,italic:a,lineThrough:s,underline:c}=e;return n&&(t+="background-color: ".concat(n,";")),r&&(t+="color: ".concat(r,"; ")),i&&(t+="font-weight: bold;"),a&&(t+="font-style: italic;"),s&&(t+="text-decoration: line-through;"),c&&(t+="text-decoration: underline;"),o&&(t+="font-size: ".concat(o,";")),t}(e.value),"\n }\n ")})),t}(e);(0,i.W4)().ui.setPresetStyle(t,e)}},8856:(e,t,n)=>{"use strict";n.d(t,{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(e){a=e}function u(e){o=e}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(e,t){e&&t&&(Object.keys(t).forEach((n=>{e[n]=t[n]})),o.silentSetter||s())}i.i.on("ERROR_ABORT",((e,t)=>{d().error(t)}))},1884:(e,t,n)=>{"use strict";function i(e){if(!e)return"00:00";const t=e%60;return r((e-t)/60)+":"+r(t)}function r(e){let t=e+"";return 1===t.length&&(t="0"+t),t}function o(){const e=new Date;return e.getFullYear()+"-"+r(e.getMonth()+1)+"-"+r(e.getDate())+" "+r(e.getHours())+":"+r(e.getMinutes())+":"+r(e.getSeconds())}n.d(t,{KM:()=>i,Kk:()=>r,kF:()=>o})},8084:(e,t,n)=>{"use strict";n.d(t,{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((e=>{e.cities&&0!==e.cities.length||(e.cities=[{name:e.name,code:e.code,areas:[{name:e.name,code:e.code}]}]),e.cities.forEach((e=>{e.areas&&0!==e.areas.length||(e.areas=[{name:e.name,code:e.code}])}))}))),o}function s(e){if(!e)return"";const t=e.split("-"),n=t[0],i=o.find((e=>n.includes(e.name)));if(!i)return"";const r=i?i.code+"":"",a=t[1];if(!a)return r;const s=i.cities.find((e=>a.includes(e.name)));if(!s)return r;const c=s?s.code+"":"",u=t[2];if(!u)return c;const l=s.areas.find((e=>u.includes(e.name)));return(l?l.code+"":"")||c||r||""}function c(e){const t=e.split(" ").map((e=>Number(e))),n=t.length,i=o[t[0]];let r,a,s=i.name;return n>1&&(r=i.cities[t[1]],s+="-"+r.name,n>2&&(a=r.areas[t[2]],s+="-"+a.name)),s}},3684:(e,t,n)=>{"use strict";n.d(t,{y:()=>r});var i=n(8856);function r(e,t){return new(0,(0,i.W4)().system.functionConstructor)("".concat(t?"return":""," ").concat(e))()}},6496:(e,t,n)=>{"use strict";n.d(t,{At:()=>h,GS:()=>v,Mh:()=>f,Mt:()=>y,Sk:()=>p,Uj:()=>m,YP:()=>g}),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:e}=(0,a.uK)(),t="language";return e?t+e:t}async function l(){return(0,o.W4)().storage.getVital(u())}function d(e,t){return!!t&&e.some((e=>e.locale===t))}async function f(e,t){const n=await l();if(d(e,n))return n;const i=function(){const e=(0,o.W4)().system.getLang();return e?function(e){const t=e.replace(/-/g,"_").toLowerCase(),n=s.c.langTable.find((e=>e.locale.startsWith(t)));return n?n.locale:t}(e):"en_us"}();return d(e,i)?i:t}async function p(e,t){return e!==await l()&&(g(e,!0),await async function(e){return(0,o.W4)().storage.setVital(u(),e)}(e),(0,o.W4)().storage.set("anti-show-init-lang-select","true"),t&&(0,o.W4)().storage.set("lang-resume","true"),(0,o.W4)().hook.beforeForceLeave(),(0,o.W4)().app.reload(),!0)}function m(e){let t="en_us";c.includes(e)&&(t=e),r.Ki(t),(0,o.E3)().setLocale(t),i.i.trigger("LANG_CHANGE");const n=s.c.langTable.find((t=>t.locale===e));(0,o.W4)().hook.onLangChange(n)}function g(e="en_us",t=!1){return t||m(e),e}function h(e){return e.replace(/\{(\w+),.+?(\w+)\}\s?\}/g,((e,t,n)=>"{".concat(t,"} ").concat(n)))}function v(e,t){return t?(0,o.W4)().system.translate(e,t):e}function y(e,t){const n=e&&t.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:(e,t,n)=>{"use strict";n.d(t,{a:()=>a,k:()=>o});var i=n(4756),r=n(8856);function o(e){return(0,r.E3)().hostConfig.mediaHost+"/"+e}function a(e){const{width:t,height:n,name:r,id:a,originName:s}=e,c=o(r);return{ratio:Math.round(n/t*1e5)/1e5,url:c,natural:(0,i.Q)(c,"!m720"),thumbnail:(0,i.Q)(c,"!avatar"),large:(0,i.Q)(c,"!m1080"),width:t,height:n,id:a,originName:s,name:r}}},4872:(e,t,n)=>{"use strict";n.d(t,{K:()=>r});var i=n(9200);async function r(e){return"string"==typeof e?JSON.parse(i.c.inflateBase64(e)):e}},7828:(e,t,n)=>{"use strict";n.d(t,{O_:()=>m,QJ:()=>g,__:()=>h,gz:()=>v,w3:()=>p}),n(9952);var i=n(556),r=n(3568),o=n(6276);function a(e,t){e.questionText=t.questionText||"",e.describe=t.describe||""}function s(e,t){e.mapping&&t.mapping&&r.c.forEach((n=>{const i=e.mapping[n];i&&"object"==typeof i||(e.mapping[n]=t.mapping[n]||"")}))}function c(e,t){let n=[];e.options&&(n=[...n,...e.options]),e.refOptions&&(n=[...n,...e.refOptions]),(0,o.yy)(e)&&(n=[...n,...e.otherOptions]),t.options&&Object.keys(t.options).forEach((r=>{const o=n.find((e=>(0,i.kt)(e.uuid)===r));o&&function(e,t,n){(function(e,t){return!(e.isRef||!e.isOtherOpt&&["cascade","region","area","location"].includes(t.type))})(e,n)&&(e.text=t.text||""),e.optComment=t.optComment||"",s(e,t),e.selectText=t.selectText,e.autoInputConfig&&t.autoInputConfig&&(e.autoInputConfig.defaultValue=t.autoInputConfig.defaultValue||"")}(o,t.options[r],e)}))}function u(e,t){e&&t&&e.logic&&t.logic&&(e.logic.message=t.logic.message||"")}function l(e,t){a(e,t),c(e,t),u(e.validation,t.validation),function(e,t){const{optionGroups:n}=e;if(!n)return;const r=t.optionGroups||{},o=e=>{e.forEach((e=>{if((0,i.is)(e,"group"===e.type)){const t=(0,i.kt)(e.uuid),n=r[t];n&&(e.groupTitle=n.groupTitle);const a=e.children||[];o(a)}}))};o(n)}(e,t)}const d={};function f(e,t){e.value=t.value||""}function p(e,t={}){const{nodes:n,variables:r,groups:o}=t,{nodes:a,variables:s,groups:c}=e;a&&n&&Object.keys(n).forEach((e=>{const t=n[e],r=a.find((t=>t.nodeUuid&&(0,i.kt)(t.nodeUuid)===e));r&&function(e,t){const n=d[e.type];n?n(e,t):l(e,t)}(r,t)})),s&&r&&Object.keys(r).forEach((e=>{const t=r[e],n=s.find((t=>(0,i.kt)(t.uuid)===e));n&&f(n,t)})),c&&o&&Object.keys(o).forEach((e=>{const t=o[e],n=c.find((t=>(0,i.kt)(t.id)===e));n&&function(e,t){e.prevText=t.prevText||"",e.nextText=t.nextText||""}(n,t)}))}function m(e,t){e&&e.forEach((e=>{e.data.forEach((e=>{const n=e[t];n&&(e.name=n)}))}))}function g(e,t){t&&d.start(e,t)}function h(e,t){t&&d.gift(e,t)}function v(e,t){t&&f(e,t)}d.end=(e,t)=>{a(e,t),e.endBtnText=t.endBtnText||""},d.gift=(e,t)=>{a(e,t),e.activityName=t.activityName||"",e.endBtnText=t.endBtnText||"",e.blessings=t.questionText||""},d.loop=(e,t)=>{(t.options||e.options)&&Object.keys(t.options).forEach((n=>{const r=e.options.find((e=>(0,i.kt)(e.uuid)===n));r&&(r.text=t.options[n].text)}))},d.lottery=(e,t)=>{(t.options||e.options)&&Object.keys(t.options).forEach((n=>{const r=e.options.find((e=>(0,i.kt)(e.uuid)===n));r&&(r.rewardName=t.options[n].rewardName)})),t.success&&(e.success.title=t.success.title||"",e.success.summary=t.success.summary||""),t.fail&&(e.fail.title=t.fail.title||"",e.fail.summary=t.fail.summary||"")},d.value_mark=(e,t)=>{l(e,t),e.minText&&(e.minText=t.minText||"",e.maxText=t.maxText||"")},d.menu=(e,t)=>{l(e,t),e.placeholder=t.placeholder||""},d.start=(e,t)=>{e.questionText=t.questionText||"",e.startName=t.startName||"",e.logoText=t.logoText||"",e.startBtnText=t.startBtnText||"",e.nextBtnText=t.nextBtnText||"",e.prevBtnText=t.prevBtnText||"",e.timeoutText=t.timeoutText||"",e.timeLessText=t.timeLessText||"",u(e.validation,t.validation)},d.slide_rate=(e,t)=>{l(e,t),(t.options||e.rateOptions)&&Object.keys(t.options).forEach((n=>{const r=e.rateOptions.find((e=>(0,i.kt)(e.uuid)===n));r&&(r.text=t.options[n].text)}))},d.matrix=(e,t)=>{if(a(e,t),u(e.validation,t.validation),t.options){let n=[];e.optionsX&&(n=[...n,...e.optionsX]),e.optionsY&&(n=[...n,...e.optionsY]),e.otherOptions&&(n=[...n,...e.otherOptions]);const r=e.options||[];Object.keys(t.options).forEach((e=>{const o=t.options[e],a=r.find((t=>(0,i.kt)(t.uuid)===e));if(a)s(a,o);else{const t=n.find((t=>(0,i.kt)(t.uuid)===e));t&&(t.text=o.text||"")}}))}},d.data=(e,t)=>{c(e,t),e.options&&e.options.forEach((e=>{delete e.optComment,delete e.value}))}},5548:(e,t,n)=>{"use strict";function i(e,t="-",n="street"){let i=e.province;return"province"!==n&&e.city&&(i+=t+e.city,"city"!==n&&e.district&&(i+=t+e.district,"county"!==n&&(e.street&&(i+=t+e.street),e.street_number&&(i+=e.street_number)))),i}function r(e){return e*(Math.PI/180)}function o(e,t){const n=r(t.lat-e.lat),i=r(t.lng-e.lng),o=Math.sin(n/2)*Math.sin(n/2)+Math.cos(r(e.lat))*Math.cos(r(t.lat))*Math.sin(i/2)*Math.sin(i/2);return 2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o))*6371*1e3}n.d(t,{A:()=>i,c:()=>o})},556:(e,t,n)=>{"use strict";n.d(t,{Av:()=>c,Cu:()=>w,DB:()=>l,O0:()=>_,OI:()=>v,Qh:()=>o,So:()=>u,Sq:()=>y,W_:()=>b,YF:()=>d,aO:()=>a,ai:()=>m,ec:()=>g,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(e){return e.replace(/</g,"_-v-w^l-t-_").replace(/>/g,"^-v-w_g-t-^")}function a(e){return e.replace(/_-v-w\^l-t-_/g,"<").replace(/\^-v-w_g-t-\^/g,">")}function s(e,t){return t}function c(e=1,t=5){const n=m(e,t),i=r.length;let o="";for(let e=0;e<n;e++){const e=m(0,i);o+=r[e]}return o}function u(e,t){if(36!==e.length)throw new Error("invalid uuid");return t?l(e,t.map((e=>f(e.varList[e.currentIndex].uuid)))):e}function l(e,t){if(36!==e.length)throw new Error("invalid uuid");return t&&t.forEach((t=>{e+="-"+f(t)})),e}function d(){const e=new Array(36);let t,n=0;for(let i=0;i<36;i++)8==i||13==i||18==i||23==i?e[i]="-":14==i?e[i]="4":(n<=2&&(n=33554432+16777216*Math.random()|0),t=15&n,n>>=4,e[i]=r[19==i?3&t|8:t]);return e.join("").toLowerCase()}function f(e){return e.substring(e.length-8)}function p(e="",t=""){return e=e.toLowerCase(),t=t.toLowerCase(),8===e.length&&36===t.length?e===f(t):36===e.length&&8===t.length?f(e)===t:e===t}function m(e,t){return e>t&&([e,t]=[t,e]),e+g(t-e+1)}function g(e){return Math.floor(Math.random()*e)}function h(e,t){const n=[...e];if((0,i.oV)(t))return n;if(0===(t=Number(t)))return[];if(t<0||isNaN(t))return n;if(1===t)return n.splice(g(n.length),1);const r=[];for(n.length<t&&(t=n.length);r.length<t;){const e=g(n.length);r.push(n.splice(e,1)[0])}return r}function v(e,t){e&&"object"==typeof e&&Object.keys(e).forEach((n=>{const i=e[n];Array.isArray(i)&&i.forEach((e=>{v(e,t)})),"object"==typeof i&&v(i,t),t(e,n)}))}function y(e,t){if(e<t)throw new Error("can not random distribute");const n=function(e,t){const n=[];for(;n.length<t;){const t=m(1,e-1);n.includes(t)||n.push(t)}return n.sort(((e,t)=>e>t?1:-1)),n}(e,t-1),i=n.map(((e,t)=>e-(n[t-1]||0)));return i.push(e-n[n.length-1]),i}function _(e){const t=new WeakMap;return function e(n){if(!n||"object"!=typeof n)return n;if(n instanceof Array)return n.map((t=>e(t)));const i=t.get(n);if(i)return i;const r={};return t.set(n,r),Object.keys(n).forEach((t=>{r[t]=e(n[t])})),r}(e)}function w(e,t=0){let n=-1;return function(...i){const r=this;clearTimeout(n),n=setTimeout((()=>{e.apply(r,i)}),t)}}async function x(e,t,n){const i=[];e.replace(t,((e,...t)=>(i.push(n(e,...t)),e)));const r=await Promise.all(i);return e.replace(t,(()=>r.shift()))}function b(e=0){return new Promise((t=>setTimeout(t,e)))}async function T(e){return e}},6276:(e,t,n)=>{"use strict";function i(e){return!!e.origin.layout}function r(e){const t=e.origin;return void 0!==t.questionText||void 0!==t.describe}function o(e){return!!e.origin.options}function a(e){return!!e.origin.optionGroups}function s(e){return!!e.origin.fillType}function c(e){return!!e.otherOptions}function u(e){return!!e.options}function l(e){return!!e.origin.otherOptions}function d(e){return!!e.video}n.d(t,{G6:()=>o,IN:()=>l,Oo:()=>i,QB:()=>a,_O:()=>d,cp:()=>s,kZ:()=>r,uo:()=>u,yy:()=>c})},2352:(e,t,n)=>{"use strict";function i(e){return o(e)?"":String(e)}function r(e){if(o(e))return"";const t=Number(e);return isNaN(t)?e:t}function o(e){return e instanceof Array?0===e.length:"boolean"!=typeof e&&0!==e&&!e}n.d(t,{Wo:()=>i,oV:()=>o,uI:()=>r})},4756:(e,t,n)=>{"use strict";n.d(t,{A:()=>o,Q:()=>r});var i=n(3004);function r(e,t){return e.endsWith(".svg")||(0,i.U)()?e:e+t}function o(e=[]){const t=[];return e.includes("video")&&t.push("video/*"),e.includes("audio")&&t.push("audio/*"),e.includes("image")&&t.push("image/*"),e.includes("doc")&&t.push("text/plain","application/json","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".csv",".docx",".pdf",".log"),t.join()}},5224:(e,t,n)=>{"use strict";n.d(t,{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:(e,t,n)=>{"use strict";n.d(t,{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(e){if("SCRIPT"===e.tagName)e.parentElement&&e.parentElement.removeChild(e);else{r.forEach((t=>{e.removeAttribute("on"+t)}));for(let t=e.children.length-1;t>=0;t--){const n=e.children[t];1===n.nodeType&&o(n)}}}function a(e){if(!e||e.includes("data-safe-html="))return e;const t=(0,i.W4)().system.newDiv();return t.innerHTML=e,o(t),t.innerHTML}},5876:(e,t,n)=>{"use strict";function i(e){const t={limitType:1,limitSrc:0,limitStart:"0",limitEnd:"0",limitRnd:"-1",phParams:[],disorder:!1,outOfResult:!1,imgHeight:0,imgWidth:0,ignoreCase:!1};if(e){const n=JSON.parse(e);return{...t,...n}}return t}n.d(t,{Qr:()=>r,_m:()=>o,cF:()=>i,mE:()=>a});const r=e=>{if(!e)return!1;const{limitSrc:t,limitType:n,limitStart:i,limitEnd:r}=e;return!(!t||!n||1==n&&"0"==i&&"0"==r)};function o(e){const t=function(e){if(!e)return e;const t={};return e.phParams&&e.phParams.length>0&&(t.phParams=e.phParams),r(e)&&(t.limitSrc=e.limitSrc,t.limitType=e.limitType,t.limitStart=e.limitStart,t.limitEnd=e.limitEnd),"-1"!=e.limitRnd&&(t.limitRnd=e.limitRnd),e.disorder&&(t.disorder=e.disorder),e.outOfResult&&(t.outOfResult=e.outOfResult),Number(e.imgHeight)&&(t.imgHeight=e.imgHeight),Number(e.imgWidth)&&(t.imgWidth=e.imgWidth),0===Object.keys(t).length?void 0:t}(e);return t?JSON.stringify(t):""}function a(e){const t={};return e.forEach((e=>{t[e.name]=e.value})),t}},4072:(e,t,n)=>{"use strict";n.d(t,{Ij:()=>h,UJ:()=>u,WK:()=>p,YV:()=>c,ee:()=>m,kx:()=>g,sf:()=>d}),n(7768);var i=n(3001),r=n(3132),o=n(556),a=n(8348),s=n(8856);function c(e){d(e.imageList),function(e){let t="";e.forEach((e=>{e.name.includes("TO_GLOBAL")&&"var-html"===e.type&&(t+=(0,i.uO)(e.value).replace(/<style>/g,"").replace(/<\/style>/g,""))})),(0,s.W4)().ui.setGlobalStyle(t)}(e.variables),function(e){if(e){const t=l(e.allJson,null)+l(e.strJson,"var-string")+l(e.expJson,"var-expression")+l(e.reqJson,"var-request")+l(e.loopJson,"var-loop");(0,s.W4)().ui.setVarStyle(t,e)}}(e.varStyles)}function u(e){let t="";return e.bold&&(t+="font-weight: bold;"),e.italic&&(t+="font-style: italic;"),e.underline?t+="text-decoration: underline;":e.lineThrough&&(t+="text-decoration: line-through;"),e.color&&(t+="color: ".concat(e.color,";")),e.backgroundColor&&(t+="background-color: ".concat(e.backgroundColor,";")),e.fontSize&&(t+="font-size: ".concat(e.fontSize,";"),t+="line-height: 1.4;"),t}function l(e,t){if(!e)return"";let n=t?".var-light.".concat(t,":not([in-edist]) {"):".var-light:not([in-edist]) {";return n+=u(e),n+="}",n}function d(e){const t=async function(e){const{varInfo:t,pureText:n}=e;return n?this.fileName:h((0,r.k)(this.serverFileName),t.config,this.fileName)};e.forEach((e=>{e.getText=t,e.isMedia=!0,e.type="var-media"}))}function f(e){if(e)return{...e,identity:{baseId:e.uuid}}}function p(e="",t){return f(t.find((t=>t.name===e)))}function m(e="",t){return t.find((t=>(0,o.oj)(t.id,e)))}function g(e="",t){let n;const i=m(e,t.imageList);return i?n={...i,type:"var-media",uuid:i.id,name:""}:(n=t.variables.find((t=>(0,o.oj)(t.uuid,e))),n||(n=(0,a._O)(e))),f(n)}function h(e="",t={imgHeight:0,imgWidth:0},n="Image",i=!1){let r="##"+e;return i||(r+="?w=".concat(t.imgWidth||0,"&h=").concat(t.imgHeight||0),n&&(r+="#"+n)),r+"##"}},9348:(e,t,n)=>{"use strict";n.d(t,{A:()=>r,U:()=>o}),n(7768);const i=["nodeId","nodePartId","optFilterId","optId","optPartId","loopNodeId","loopRoundId","innerLoopNodeId","innerLoopRoundId"];function r(e){return e.baseId?e.baseId:i.map((t=>e[t]||"")).join(":").replace(/:+$/,"")}function o(e){if(!e.includes(":"))return{baseId:e};const t=e.split(":"),n={};return t.forEach(((e,t)=>{const r=i[t];n[r]=e})),n}},488:(e,t,n)=>{"use strict";n.d(t,{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),m=n(5876),g=n(7192),h=n(9216),v=n(8260),y=n(5776),_=n(4316);function w(e){e=(0,g.Un)(e);const t=(0,f.W4)().system.newDiv();return t.innerHTML=e,t}function x(e="",t){return t||(t=w(e)),[...t.querySelectorAll(".var-tag")]}function b(e=""){return String(e).includes("var-tag")}function T(e){return(0,o.is)(e,1===e.nodeType)&&e.classList.contains("var-tag")}function S(e,t=""){const{loopStack:n,context:i}=e;let{renderList:r}=e;const a=(0,y.AF)(e,t);if(!a)return;const s=(0,o.So)(a,n);return i.node&&(r=[...r,i.node]),r.find((e=>s.startsWith(e.renderId)))}function E(e,t,n,i){if(!n)return null;const r=[n];i&&r.push(i);const a=(0,y.AF)(e,t);if(!a)return;const s=(0,o.DB)(a,r);return(0,h.QL)(e.renderList,s)}function I(e){return{name:e.innerText,identity:(0,p.U)(e.getAttribute("data-v-id")),config:(0,m.cF)(e.getAttribute("data-v-config")),inEdist:e.parentElement&&!!e.parentElement.getAttribute("edist")}}function k(e,t){return C(e,I(t))}function O(e){const{identity:t,config:n}=e;let i=(0,p.A)(t);if(!n)return i;if((0,m.Qr)(n)){const{limitSrc:e,limitType:t,limitStart:r,limitEnd:o}=n;i+="_".concat(e,"_").concat(t,":").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 e=(0,m.mE)(o);i+="_".concat(JSON.stringify(e))}return i}function C(e,t){const n=O(t={...t,config:t.config||{}}),{identity:i,config:r,name:o,inEdist:a}=t,d=(0,p.A)(i),f={identity:i,config:r},{baseId:m,nodeId:g,nodePartId:h,optFilterId:y,optId:_,optPartId:w,loopRoundId:x,innerLoopRoundId:b}=i;if(m){if(P(m)){const[e,t]=m.split("URL_PARAM=");return{...f,type:"var-string",uuid:"URL_PARAM=".concat(t)}}const t=(0,u.kx)(m,e);return t?{...f,...t,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(e,g,x,b),!T)return}else if(c.Ux(h))I=g;else if(T=S(e,g),!T)return;if(h){const e=(0,l._O)(h);return e&&{...f,uuid:d,name:o,node:T,nodePart:e,lookupLoopNodeId:I,isMedia:"var-media"===e.type,type:e.type,mapId:n,inEdist:a}}const k=(0,l._O)(w,T);if(!k)return;const C="var-media"===k.type;if(y){const e=(0,l._O)(y,T);if(!e)return;return{...f,inEdist:a,name:o,node:T,optionPart:k,optionFilter:e,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(e,t){let n=[];const{varInfo:{optionFilter:s,option:c,config:u}}=e,l=await(0,i.W0)(u.limitRnd,e);if(0===l&&!t)return[];const d=e.specifiedOpt||c;n=d&&await(0,r.U)(e)?[d]:s&&s.filter?await s.filter(e):[];const f=t?t(n,l):(0,o.my)(n,l);return u.disorder?(0,a.sZ)(f):f}async function N(e){const{varInfo:{nodePart:t,optionPart:n,option:i}}=e,o=e.specifiedOpt||i;if(t&&t.getBool)return t.getBool(e);if(o)return await(0,r.U)(e)&&await n.getBool({...e,specifiedOpt:o});if(n.inBunch)return n.getBool(e);{const t=await L(e),i=[];for(const r of t){const t=await n.getText({...e,specifiedOpt:r});t&&i.push(t)}return i.length>0}}async function R(e){const{varInfo:{nodePart:t,optionPart:n,option:i}}=e,o=e.specifiedOpt||i,a=e.joinBy||" ";if(t&&t.getText)return t.getText(e);if(o)return await(0,r.U)(e)?n.getText({...e,specifiedOpt:o}):"";if(n.inBunch)return n.getText(e);{const t=await L(e),i=[];for(const r of t){const t=await n.getText({...e,specifiedOpt:r});(0,d.oV)(t)||i.push(t)}return i.join(a)}}async function A(e){const t={};t.text=await R(e);const n=await async function(e){const{varInfo:{nodePart:t,optionPart:n,option:i,isMedia:o}}=e;if(!o)return[];const a=e.specifiedOpt||i;if(t&&t.getImages)return t.getImages(e);if(a)return await(0,r.U)(e)&&n.getImages?n.getImages({...e,specifiedOpt:a}):[];{const t=await L(e),i=[];if(n.getImages)for(const r of t){const t=await n.getImages({...e,specifiedOpt:r});i.push(t[0])}return i}}(e);t.image=n[0];const i=await async function(e){const{varInfo:{optionPart:t,option:n}}=e;if(!t)return[];const i=e.specifiedOpt||n;if(i)return await(0,r.U)(e)&&t.getIcon?[t.getIcon({...e,specifiedOpt:i})]:[];{const n=await L(e);return t.getIcon?n.map((n=>t.getIcon({...e,specifiedOpt:n}))):[]}}(e),o=i[0];return o&&(t.normalIconUrl=o,t.activeIconUrl=(0,_.WG)(o)),t}function P(e){return e&&e.startsWith("URL_PARAM=")}},8107:(e,t,n)=>{"use strict";n.d(t,{M4:()=>f,MH:()=>m,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(e){const{loopStack:t}=e;return t?t[t.length-1]:null}function d(e,t,n){const{state:{loopStack:r}}=e,o=r&&r[t];if(o){const e=o.replacements[t];if(e)return(0,i.k5)(n(e))}return(0,i.k5)(n())}async function f(e,t){const{varInfo:{lookupLoopNodeId:n,config:r},state:o}=e,a=l(o);if(!a)return"";const s=m(n,a.replacements);return(0,i.k5)(t(s,r))}function p(e){return function(){if(!u){const e=(0,o.yy)();u=[],Object.keys(e).forEach((t=>{const{uuid:n,type:i}=e[t];"var-loop"===i&&u.push(n)}))}return u}().includes(e)}function m(e,t){return t.find((t=>(0,i.oj)(t.loopNodeId,e)))}function g(e,t={imgHeight:0,imgWidth:0}){if(e){const{imgHeight:n,imgWidth:i}=t;let r=void 0===e.refText?e.text:e.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(e,t){if(e&&e.image){const{image:n}=e;return(0,r.Ij)(n.url,t)}return""}function v(e){return e&&(0,s.Wo)(e.index+1)}function y(e){return e&&e.value}function _(e){return e&&(0,s.Wo)(e.number)}function w(e){return e&&e.label}function x(e){e.C_OL_TXT.getText=e=>d(e,0,g),e.C_OL_IDX.getText=e=>d(e,0,v),e.C_OL_NUM.getText=e=>d(e,0,_),e.C_OL_VAL.getText=e=>d(e,0,y),e.C_OL_LBL.getText=e=>d(e,0,w),e.C_IL_TXT.getText=e=>d(e,1,g),e.C_IL_IDX.getText=e=>d(e,1,v),e.C_IL_NUM.getText=e=>d(e,1,_),e.C_IL_VAL.getText=e=>d(e,1,y),e.C_IL_LBL.getText=e=>d(e,1,w),c.c.forEach((t=>{!function(t){const n=t.split("_")[1],i="C_IL_MAP_"+n,r=(e,n)=>d(e,n,(n=>{if(!n)return"";const{mapping:i}=n;return(0,a.C)(i,t,e)}));e["C_OL_MAP_"+n].getText=e=>r(e,0),e[i].getText=e=>r(e,1)}(t)}))}function b(e){e.LOOP.getText=e=>f(e,g),e.LOOP_IMG.getText=e=>f(e,h),e.LOOP_INDEX.getText=e=>f(e,v),e.LOOP_NUM.getText=e=>f(e,_),e.LOOP_VAL.getText=e=>f(e,y),e.LOOP_LBL.getText=e=>f(e,w),c.c.forEach((t=>{!function(t){const n=t.split("_")[1];e["LOOP_MAP_"+n].getText=e=>f(e,(n=>(0,a.C)(n.mapping,t,e)))}(t)}))}},8348:(e,t,n)=>{"use strict";n.d(t,{yy:()=>b,_O:()=>w,cK:()=>g}),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),m=n(9200);const g="waiting fo extend";let h=!1;Math.avg=(...e)=>{let t=0;const n=e.length;for(let i=0;i<n;i++)t+=Number(e[i]);return t/n};const v={YEAR:{uuid:"YEAR",type:"var-string",getText:g},MONTH:{uuid:"MONTH",type:"var-string",getText:g},DATE:{uuid:"DATE",type:"var-string",getText:g},DAY:{uuid:"DAY",type:"var-string",getText:g},URL_KEY:{uuid:"URL_KEY",type:"var-string",getText:g},QUES_ID:{uuid:"QUES_ID",type:"var-string",getText:g},WX_ID:{uuid:"WX_ID",type:"var-string",getText:g},WX_SRC:{uuid:"WX_SRC",type:"var-string",getText:g},WX_NAME:{uuid:"WX_NAME",type:"var-string",getText:g},WX_UN_ID:{uuid:"WX_UN_ID",type:"var-string",getText:g},RES_ID:{uuid:"RES_ID",type:"var-string",getText:g},CLTR_ID:{uuid:"CLTR_ID",type:"var-string",getText:g},CLTR_CODE:{uuid:"CLTR_CODE",type:"var-string",getText:g},CLTR_NAME:{uuid:"CLTR_NAME",type:"var-string",getText:g},CURR:{uuid:"CLANG",type:"var-string",getText:g},LKTP:{uuid:"LKTP",type:"var-string",getText:g},START_TIME:{uuid:"S_T",type:"var-string",getText:g},COST_TIME:{uuid:"C_T",type:"var-string",getText:g},DVC_OSN:{uuid:"DVC_OSN",type:"var-string",getText:g},DVC_OSV:{uuid:"DVC_OSV",type:"var-string",getText:g},DVC_BRSN:{uuid:"DVC_BRSN",type:"var-string",getText:g},DVC_BRSV:{uuid:"DVC_BRSV",type:"var-string",getText:g},DVC_VDR:{uuid:"DVC_VDR",type:"var-string",getText:g},DVC_MDL:{uuid:"DVC_MDL",type:"var-string",getText:g},DVC_TYPE:{uuid:"DVC_TYPE",type:"var-string",category:"DEVICE",getText:g},RESULT:{uuid:"RESULT",type:"var-string",getText:g},C_OPT_TEXT:{uuid:"COTTX",type:"var-string",getText:g},C_OPT_NUM:{uuid:"CONUM",type:"var-string",getText:g},C_OPT_VAL:{uuid:"COVAL",type:"var-string",getText:g},C_OPT_LBL:{uuid:"COLBL",type:"var-string",getText:g},C_OPT_IPT:{uuid:"COIPT",type:"var-string",category:"CTPT",getText:g},C_OPT_ASI:{uuid:"COASI",type:"var-string",category:"CTPT",getText:g},C_OL_TXT:{uuid:"COLTXT",type:"var-string",getText:g},C_OL_IDX:{uuid:"COLIDX",type:"var-string",getText:g},C_OL_VAL:{uuid:"COLVAL",type:"var-string",getText:g},C_OL_NUM:{uuid:"COLNUM",type:"var-string",getText:g},C_OL_LBL:{uuid:"COLLBL",type:"var-string",getText:g},C_IL_TXT:{uuid:"CILTXT",type:"var-string",getText:g},C_IL_IDX:{uuid:"CILIDX",type:"var-string",getText:g},C_IL_VAL:{uuid:"CILVAL",type:"var-string",getText:g},C_IL_NUM:{uuid:"CILNUM",type:"var-string",getText:g},C_IL_LBL:{uuid:"CILLBL",type:"var-string",getText:g},POSITION:{uuid:"_P_OS",type:"var-string",getText:g},FAIL_SKIP:{uuid:"L_FAIL_SKIP",type:"var-bool",getText:g,getBool:g},FAILED:{uuid:"L_FAILED",type:"var-bool",getText:g,getBool:g},SUCCEED:{uuid:"L_SUCCEED",type:"var-bool",getText:g,getBool:g},COUNTRY:{uuid:"_C_NTY",type:"var-string",getText:g},PROVINCE:{uuid:"_P_ROV",type:"var-string",getText:g},CITY:{uuid:"_C_ITY",type:"var-string",getText:g},DISTRICT:{uuid:"_D_TRT",type:"var-string",getText:g},QUES_IMAGE:{uuid:"QI",type:"var-media",getText:g,getImages:g},QUES_TEXT:{uuid:"QT",type:"var-string",getText:g},QUES_LABEL:{uuid:"QL",type:"var-string",getText:g},QUES_DESC:{uuid:"QD",type:"var-string",getText:g},QUES_NAME:{uuid:"QN",type:"var-string",getText:g},QUES_RUNTIME_NAME:{uuid:"QRTN",type:"var-string",getText:g},PHONE_NUMBER:{uuid:"PN",type:"var-string",getText:g},PASSWORD:{uuid:"PSW",type:"var-string",getText:g},USED_PHONE:{uuid:"UPN",type:"var-bool",getText:g,getBool:g},VALIDATE_FAILED:{uuid:"VF",type:"var-bool",getText:g,getBool:g},VALIDATE_FAIL_TIMES:{uuid:"VFT",type:"var-expression",getText:g,getBool:g},QUES_TIME:{uuid:"DRTN",type:"var-string",getText:g,getBool:g},QUES_RS:{uuid:"QRS",type:"var-string",getText:g},Q_TIME_OVER:{uuid:"QTOR",type:"var-bool",getText:g,getBool:g},Q_TIME_LESS:{uuid:"QTLS",type:"var-bool",getText:g,getBool:g},MATCHED_OPTS:{uuid:"MTO",type:"var-string",filter:g},UNMATCHED_OPTS:{uuid:"UMTO",type:"var-string",filter:g},MARKED_OPTS:{uuid:"MKO",type:"var-string",filter:g},UNMARKED_OPTS:{uuid:"UMKO",type:"var-string",filter:g},RANKED_OPTS:{uuid:"RKO",type:"var-string",filter:g},UNRANKED_OPTS:{uuid:"URKO",type:"var-string",filter:g},CHECKED_OPTS:{uuid:"CKO",type:"var-string",filter:g},UNCHECKED_OPTS:{uuid:"UCKO",type:"var-string",filter:g},INPUTTED_OPTS:{uuid:"INO",type:"var-string",filter:g},UN_INPUTTED_OPTS:{uuid:"UINO",type:"var-string",filter:g},ALL_OPTS:{uuid:"ALO",type:"var-string",filter:g},SPECIFIED_OPT:{uuid:"SPO",type:"var-string"},OPT_TEXT:{uuid:"OTXX",type:"var-string",getText:g},OPT_TEXT_X:{uuid:"OTXY",type:"var-string",getText:g},OPT_TEXT_Y:{uuid:"OTX",type:"var-string",getText:g},OPT_NUMBER:{uuid:"ONM",type:"var-string",getText:g},OPT_SELECTED:{uuid:"OSL",type:"var-bool",getBool:g,getText:g},OPT_NUMBER_X:{uuid:"ONMX",type:"var-string",getText:g},OPT_NUMBER_Y:{uuid:"ONMY",type:"var-string",getText:g},OPT_IMAGE:{uuid:"OMG",type:"var-media",getText:g,getImages:g},OPT_ICON:{uuid:"OIC",type:"var-string",getText:g,getIcon:g},OPT_MARK:{uuid:"OMA",type:"var-string",getText:g},OPT_RANK:{uuid:"ORA",type:"var-string",getText:g},OPT_INPUT:{uuid:"OIN",type:"var-string",getText:g},OPT_LABEL:{uuid:"OLB",type:"var-string",getText:g},OPT_GROUP_TITLE:{uuid:"OPT_GROUP_TITLE",type:"var-string",getText:g},OPT_COUNT:{uuid:"OCT",type:"var-expression",inBunch:!0,getText:g},OPT_SAME_MARK:{uuid:"OSM",type:"var-bool",inBunch:!0,getBool:g,getText:g},OPT_DIFF_MARK:{uuid:"ODM",type:"var-bool",inBunch:!0,getBool:g,getText:g},OPT_SAME_VALUE:{uuid:"OSV",type:"var-bool",inBunch:!0,getBool:g,getText:g},OPT_DIFF_VALUE:{uuid:"ODV",type:"var-bool",inBunch:!0,getBool:g,getText:g},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:g,getImages:g},LOOP_IMG:{uuid:"LPIMG",type:"var-loop",getText:g,getImages:g},LOOP_INDEX:{uuid:"LPIDX",type:"var-loop",getText:g},LOOP_VAL:{uuid:"LPVAL",type:"var-loop",getText:g},LOOP_NUM:{uuid:"LPNUM",type:"var-loop",getText:g},LOOP_LBL:{uuid:"LPLBL",type:"var-loop",getText:g}};for(const e of m.c.langTable){const t="LANG_"+e.locale.toUpperCase(),n=t;v[t]={uuid:n,type:"var-string",getText:async()=>e.locale}}for(let e=2;e<21;e++){const t="URL_KEY_"+e;v[t]={uuid:t,type:"var-string",getText:g}}function y(e,t){const n=t.origin.optionMappingHeads;if(n){const t=n.find((t=>t.field==="field_"+e));if(t)return{type:"image"===t.type?"var-media":"var-string"}}return null}for(let e=1;e<7;e++)v["OPT_ASTV_"+e]={uuid:"OASTV_"+e,type:"var-string",getText:g},v["OPT_MAP_"+e]={uuid:"OM_"+e,type:"var-string",getText:g,getDynamicProps:t=>y(e,t)},v["C_OPT_MAP_"+e]={uuid:"COMAP"+e,type:"var-string",getText:g},v["C_OL_MAP_"+e]={uuid:"COLMAP"+e,type:"var-string",getText:g},v["C_IL_MAP_"+e]={uuid:"CILMAP"+e,type:"var-string",getText:g},v["LOOP_MAP_"+e]={uuid:"LPMAP"+e,type:"var-loop",getText:g};const _=Object.keys(v);function w(e,t){for(const n of _)if(v[n].uuid===e){let e=v[n];if(e.getDynamicProps&&t){const n=e.getDynamicProps(t);n&&(e={...e,...n})}return e}}function x(){h||(function(){const e=[];_.forEach((t=>{if(!(v[t]instanceof Function)){if(e.indexOf(v[t].uuid)>0)throw new Error("error duplicated uuid in implicit var config: "+v[t].uuid);e.push(v[t].uuid)}}))}(),(0,i.M)(v),(0,p.nS)(v),(0,p.yG)(v),function(e){e.OPT_INPUT.getText=async e=>(0,a.Y5)(e.specifiedOpt,"value"),e.OPT_LABEL.getText=async e=>e.specifiedOpt.label||"",c.c.forEach((t=>{!function(t){const n=t.split("_")[1];e["OPT_MAP_"+n].getText=async e=>{const{specifiedOpt:n}=e,{mapping:r}=n;return(0,i.C)(r,t,e)}}(t),function(t){const n=t.split("_")[1];e["OPT_ASTV_"+n].getText=async e=>{const n=e.specifiedOpt.assistValue;return n&&n[t]||""}}(t)})),e.OPT_MARK.getText=e.OPT_INPUT.getText,e.OPT_TEXT.getText=async e=>{const t=e.specifiedOpt,n=(0,a.Ml)(t);if(n)return n;const{optionY:i,optionX:r}=t;return r?r.text+"_"+i.text:(0,a.Y5)(t,"text")},e.OPT_NUMBER.getText=async e=>(0,s.Wo)(e.specifiedOpt.number),e.OPT_RANK.getText=async e=>{const t=e.specifiedOpt.sortNo;return(0,s.Wo)(t)},e.OPT_TEXT_X.getText=async e=>e.specifiedOpt.optionX.text,e.OPT_TEXT_Y.getText=async e=>e.specifiedOpt.optionY.text,e.OPT_NUMBER_X.getText=async e=>{const t=e.specifiedOpt.optionX.number;return(0,s.Wo)(t)},e.OPT_NUMBER_Y.getText=async e=>{const t=e.specifiedOpt.optionY.number;return(0,s.Wo)(t)},e.OPT_IMAGE.getText=async e=>{const{varInfo:{config:t},specifiedOpt:n,pureText:i}=e,o=(0,a.Y5)(n,"image");return i?n.text:o?(0,r.Ij)(o.url,t,o.originName):""},e.OPT_ICON.getText=async e=>e.specifiedOpt.text,e.OPT_COUNT.getText=async e=>{const t=await(0,o.ms)(e);return(0,s.Wo)(t.length)},e.OPT_GROUP_TITLE.getText=async e=>{const{optionGroups:t,optionGroupsRelationship:n}=e.varInfo.node.origin;if(!t||!n)return"";const i=e.specifiedOpt.uuid;return function e(t,n){const[i,...r]=n,o=t.find((e=>e.uuid===i));if(o){const t=[o.groupTitle],{children:n}=o;if(n&&0!==n.length&&0!==r.length){const i=e(n||[],r);return[...t,...i]}return t}return[]}(t||[],n.optionsRelationship[i]).join("/")}}(v),function(e){async function t(e,t){const{varInfo:n,needOtherOpt:i}=e,r=n.node,o=(0,a.gr)(r),s=[];for(const n of o)!i&&n.isOtherOpt||t&&!t(n,r)||!await(0,u.U)({...e,specifiedOpt:n})||s.push(n);return s}e.MATCHED_OPTS.filter=e=>t(e,l.e2),e.RANKED_OPTS.filter=e.MATCHED_OPTS.filter,e.CHECKED_OPTS.filter=e.MATCHED_OPTS.filter,e.UNMATCHED_OPTS.filter=e=>t(e,l.gb),e.UNRANKED_OPTS.filter=e.UNMATCHED_OPTS.filter,e.UNCHECKED_OPTS.filter=e.UNMATCHED_OPTS.filter,e.MARKED_OPTS.filter=e=>t(e,l.yu),e.INPUTTED_OPTS.filter=e.MARKED_OPTS.filter,e.UNMARKED_OPTS.filter=e=>t(e,l.sb),e.UN_INPUTTED_OPTS.filter=e.UNMARKED_OPTS.filter,e.ALL_OPTS.filter=async e=>(0,d.Qr)(e.varInfo.config)?t(e):e.varInfo.node.options}(v),function(e,t){!function(e,t){t.forEach((t=>{const n=e[t];"function"==typeof n.getText&&(n.getBool=async function(e){const t=await this.getText(e);return!(0,s.oV)(t)})})),e.OPT_COUNT.getBool=async function(e){return!!await this.getText(e)}}(e,t),e.OPT_SELECTED.getBool=async e=>e.specifiedOpt.selected,e.OPT_SAME_MARK.getBool=async e=>{const t=await(0,o.ms)(e);return function(e,t){if((0,s.oV)(t))return!0;(t<0||t>e.length)&&(t=e.length);const n={};for(const i of e){const e=i.value;if(n[e]?n[e]+=1:n[e]=1,n[e]>=t)return!0}return!1}(t,t.length)},e.OPT_DIFF_MARK.getBool=async e=>{const t=await(0,o.ms)(e);return function(e,t){if((0,s.oV)(t))return!0;(t<0||t>e.length)&&(t=e.length);const n={};for(const i of e)if(n[i.value]=!0,Object.keys(n).length>=t)return!0;return!1}(t,t.length)},e.OPT_SAME_VALUE.getBool=e.OPT_SAME_MARK.getBool,e.OPT_DIFF_VALUE.getBool=e.OPT_DIFF_MARK.getBool,e.FAIL_SKIP.getBool=async e=>!!e.varInfo.node.failedSkipActivated,e.FAILED.getBool=async e=>!!e.varInfo.node.failed,e.SUCCEED.getBool=async e=>!!e.varInfo.node.succeed,e.USED_PHONE.getBool=async e=>!!e.state.phoneUsed,e.VALIDATE_FAILED.getBool=async e=>e.varInfo.node.validateFailed,e.Q_TIME_OVER.getBool=async e=>{const{origin:{maxAnswerTime:t},costTime:n}=e.varInfo.node,i=1e3*t;return!!(i&&n&&i<n)},e.Q_TIME_LESS.getBool=async e=>{const{origin:{minAnswerTime:t},costTime:n}=e.varInfo.node,i=1e3*t;return!!(i&&n&&i>n)},function(e,t){function n(e){return this.getBool(e)}t.forEach((t=>{const i=e[t];"function"==typeof i.getBool&&i.getText===g&&(i.getText=n)}))}(e,t)}(v,_),(0,f.wi)(v),function(){let e="";if(_.forEach((t=>{const n=v[t];if(["filter","getText","getImages","getIcon","getBool"].forEach((i=>{n[i]===g&&(e+=t+"=>"+i+"\n")})),n.getText){const e=n.getText;n.getText=async function(...t){const{keepWrap:n}=t[0],i=e.apply(this,t),r=await i;if("string"==typeof r&&!n){const e=/<span var-name=".+?" class="var-light var-(\w+?)">(.+?)<\/span>/g;return(0,s.Wo)(r).replace(e,((e,t,n)=>"media"===t?e:n))}return(0,s.oV)(r)?"":r}}})),e)throw new Error("lack var implement for:\n"+e)}(),h=!0)}function b(){return h||x(),v}x()},9572:(e,t,n)=>{"use strict";n.d(t,{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(e){return{type:"image",width:e.originWidth,height:e.originHeight,name:e.serverFileName,id:e.id,originName:e.fileName}}async function l(e,t){if(!t)return[];const n=(0,o.ee)(t.uuid,e.imageList);if(n)return[(0,a.a)(u(n))];if(t.value){let n=[];const i=(0,r.oB)(t.value);for(const t of i){const i=await l(e,(0,r.yI)(e,t));n=n.concat(i)}return n}{const{option:n,optionPart:i}=t,o=t.node;return o?i?(await(0,r.ms)({state:e,varInfo:t,specifiedOpt:n})).map((e=>(0,s.Y5)(e,"image"))):o.images||[]:[]}}function d(e=""){return e&&"string"==typeof e?e.replace(/##((?:http|data:image|\/).+?)##/g,"$1"):e}function f(e){async function t(e,t){const n=e&&e[t]||"";return"string"==typeof n?[]:[n]}e.QUES_IMAGE.getImages=async e=>{var t;const n=null===(t=e.varInfo)||void 0===t?void 0:t.node;return(null==n?void 0:n.images)||[]},e.OPT_IMAGE.getImages=async e=>{const{varInfo:{option:t},specifiedOpt:n}=e,i=n||t;return[(0,s.Y5)(i,"image")]},e.LOOP.getImages=e.LOOP_IMG.getImages=async e=>{const{state:t,varInfo:{lookupLoopNodeId:n}}=e,r=i.Wy(t);if(!r)return[];const o=i.MH(n,r.replacements);return o&&o.image?[o.image]:[]},e.OPT_ICON.getIcon=e=>e.specifiedOpt.normalIconUrl||"",c.c.forEach((n=>{!function(n){const i=n.split("_")[1];e["OPT_MAP_"+i].getImages=e=>{const{specifiedOpt:i}=e,{mapping:r}=i;return t(r,n)}}(n),function(n){const i=n.split("_")[1];e["C_OPT_MAP_"+i].getImages=async e=>{const{state:{context:{option:i}}}=e;if(!i)return[];const{mapping:r}=i;return t(r,n)}}(n),function(n){const r=n.split("_")[1],o="C_IL_MAP_"+r;function a(e,r){return i.WG(e,r,(e=>{if(!e)return[];const{mapping:i}=e;return t(i,n)}))}e["C_OL_MAP_"+r].getImages=e=>a(e,0),e[o].getImages=e=>a(e,1)}(n),function(n){const r=n.split("_")[1];e["LOOP_MAP_"+r].getImages=e=>i.M4(e,(e=>t(e.mapping,n)))}(n)}))}},1880:(e,t,n)=>{"use strict";n.d(t,{C:()=>p,M:()=>m}),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(e,t,n){const i=e&&e[t]||"";if("string"==typeof i)return i;{const{pureText:e,varInfo:{config:t},specifiedOpt:o}=n;return e?o?o.text:"":(0,r.Ij)(i.url,t,i.originName)}}function m(e){function t(t){e["URL_KEY_"+t].getText=async()=>{const e="key"+t;return(0,c.uK)()[e]}}e.URL_KEY.getText=async()=>{const e=(0,c.uK)();return e.key1||e.key};for(let e=2;e<=20;e++)t(e);function n(e){const{varInfo:t,state:n}=e;let i;const r=t.node;return r&&(i=r.position&&r.position.address),i||(i=n.address),i}e.YEAR.getText=async()=>(new Date).getFullYear().toString(),e.MONTH.getText=async()=>{const e=(new Date).getMonth()+1;return(0,l.Kk)(e)},e.DATE.getText=async()=>{const e=(new Date).getDate();return(0,l.Kk)(e)},e.DAY.getText=async e=>{const t=(new Date).getDay();return"zh_cn"===e.state.language?["星期日","星期一","星期二","星期三","星期四","星期五","星期六"][t]:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][t]},e.QUES_ID.getText=async e=>e.state.surveyId,e.WX_ID.getText=async e=>{const{state:{userInfo:t}}=e;return t&&t.openid},e.WX_SRC.getText=async()=>(0,o.W4)().name,e.WX_NAME.getText=async e=>{const{state:{userInfo:t}}=e;return t&&t.nickname},e.WX_UN_ID.getText=async e=>{const{state:{userInfo:t}}=e;return t&&t.unionid},e.RES_ID.getText=async e=>{const{state:t}=e;return t.transactionID},e.CLTR_ID.getText=async()=>"",e.CLTR_CODE.getText=async()=>(0,o.E3)().preview?"":(0,o.E3)().sid,e.CLTR_NAME.getText=async e=>{if((0,o.E3)().preview)return"";const{state:{parsedPayload:t}}=e;if(t){const{surveyMeta:{collector:{name:e}}}=t;return e}return""},e.START_TIME.getText=async e=>{const t=e.state.startTime;return(0,s.Wo)(t)},e.COST_TIME.getText=async e=>{const t=(new Date).getTime()-e.state.startTime;return(0,s.Wo)(t)},e.RESULT.getText=async e=>{const{state:t}=e,n=await(0,i.gp)(t,"all",void 0,!0);return JSON.stringify(n)},e.CURR.getText=async e=>e.state.language,e.LKTP.getText=async()=>(0,d.i)(),e.C_OPT_TEXT.getText=async e=>{const{state:{context:{option:t}}}=e;return t?(0,a.Y5)(t,"text"):""},e.C_OPT_NUM.getText=async e=>{const{state:{context:{option:t}}}=e,n=t&&t.number;return(0,s.Wo)(n)},e.C_OPT_VAL.getText=async e=>{const{state:{context:{option:t}}}=e;return t?(0,a.Y5)(t,"value"):""},e.C_OPT_LBL.getText=async e=>{const{state:{context:{option:t}}}=e;return t&&t.label||""},e.C_OPT_IPT.getText=async e=>{const{state:{context:{option:t}}}=e;return t?"<input data-iptc-holder='".concat(t.renderId,"' hidden='true' />"):""},e.C_OPT_ASI.getText=async e=>{const{state:{context:{option:t}}}=e;return t?"<input data-asic-holder='".concat(t.renderId,"' hidden='true' />"):""},u.c.forEach((t=>{!function(t){const n=t.split("_")[1];e["C_OPT_MAP_"+n].getText=async e=>{const{state:{context:{option:n}}}=e;if(!n)return"";const{mapping:i}=n;return p(i,t,e)}}(t)})),e.POSITION.getText=async e=>{const{state:{point:t}}=e;return t?t.lat+","+t.lng:""},e.COUNTRY.getText=async e=>{const t=n(e);return t&&t.country},e.PROVINCE.getText=async e=>{const t=n(e);return t&&t.province},e.CITY.getText=async e=>{const t=n(e);return t&&t.city},e.DISTRICT.getText=async e=>{const t=n(e);return t&&t.district},e.QUES_IMAGE.getText=async e=>{const{varInfo:t,pureText:n}=e,i=t.node;return n?i.images.reduce(((e,t)=>e+" "+t.originName),""):i.images.reduce(((e,n)=>e+(0,r.Ij)(n.url,t.config,n.originName)),"")},e.QUES_DESC.getText=async e=>e.varInfo.node.description,e.QUES_LABEL.getText=async e=>e.varInfo.node.origin.label||"",e.QUES_TEXT.getText=async e=>e.varInfo.node.title,e.QUES_NAME.getText=async e=>e.varInfo.node.nodeName,e.QUES_RUNTIME_NAME.getText=async e=>e.varInfo.node.runtimeNodeName,e.PHONE_NUMBER.getText=async e=>e.varInfo.node.phoneNumber,e.PASSWORD.getText=async e=>e.varInfo.node.code,e.QUES_TIME.getText=async e=>(0,s.Wo)(e.varInfo.node.costTime),e.QUES_RS.getText=async e=>JSON.stringify((0,i.cA)(e.varInfo.node)),e.VALIDATE_FAIL_TIMES.getText=async e=>e.varInfo.node.validateFailTimes+"",e.DVC_BRSN.getText=async()=>(0,o.W4)().system.device.browser.name||f,e.DVC_BRSV.getText=async()=>(0,o.W4)().system.device.browser.version||f,e.DVC_OSN.getText=async()=>(0,o.W4)().system.device.os.name||f,e.DVC_OSV.getText=async()=>(0,o.W4)().system.device.os.version||f,e.DVC_VDR.getText=async()=>(0,o.W4)().system.device.device.vendor||f,e.DVC_MDL.getText=async()=>(0,o.W4)().system.device.device.model||f,e.DVC_TYPE.getText=async()=>(0,o.W4)().system.device.device.type||f}},6524:(e,t,n)=>{"use strict";n.d(t,{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(e){return e.selected}function s(e){return!e.selected}function c(e,t){return(0,o.QX)(e,t)}function u(e,t){return!(0,o.QX)(e,t)}const l=(e,t,n,i=!1)=>{if((0,r.oV)(t[n]))return NaN;const o={};e.forEach((e=>{let t=(e[n]+"").replace(/(\s|&nbsp;)/g,"");const i=parseFloat(t);isNaN(i)||(t=i),(0,r.oV)(t)||(o[t]?o[t].push(e):o[t]=[e])}));const a=Object.keys(o).sort(((e,t)=>{const n=Number(e),r=Number(t);return isNaN(n)||isNaN(r)?i?e>t?1:-1:e<t?1:-1:i?n>r?1:-1:n<r?1:-1}));for(let e=0;e<a.length;e++)if(o[a[e]].includes(t))return e+1;return NaN},d={};function f(e,t,n){const r=d[t];return r?r(function(e){let t=null;const{varInfo:n}=e,r=n.node,o=n.optionFilter,{selectIds:l,unselectIds:d,inputIds:f,uninputIds:p}=function(){const e=(0,i.yy)();return{selectIds:[e.CHECKED_OPTS.uuid,e.RANKED_OPTS.uuid,e.MATCHED_OPTS.uuid],unselectIds:[e.UNCHECKED_OPTS.uuid,e.UNRANKED_OPTS.uuid,e.UNMATCHED_OPTS.uuid],inputIds:[e.INPUTTED_OPTS.uuid,e.MARKED_OPTS.uuid],uninputIds:[e.UN_INPUTTED_OPTS.uuid,e.UNMARKED_OPTS.uuid]}}();return o&&(l.includes(o.uuid)?t=a:d.includes(o.uuid)?t=s:f.includes(o.uuid)?t=c:p.includes(o.uuid)&&(t=u)),t?r.options.filter((e=>t(e,r))):r.options}(n),e):NaN}d[1]=(e,t)=>t.number,d[14]=(e,t)=>l(e,t,"number",!0),d[15]=(e,t)=>l(e,t,"number",!1),d[2]=(e,t)=>t.text,d[12]=(e,t)=>l(e,t,"text",!0),d[13]=(e,t)=>l(e,t,"text",!1),d[3]=(e,t)=>t.value,d[4]=(e,t)=>l(e,t,"value",!0),d[5]=(e,t)=>l(e,t,"value",!1),d[6]=(e,t)=>t.sortNo,d[7]=(e,t)=>l(e,t,"sortNo",!0),d[8]=(e,t)=>l(e,t,"sortNo",!1),d[9]=(e,t)=>t.value,d[10]=(e,t)=>l(e,t,"value",!0),d[11]=(e,t)=>l(e,t,"value",!1)},1820:(e,t,n)=>{"use strict";n.d(t,{i:()=>r});var i=n(8856);function r(){return(0,i.E3)().realTimePreview?"realtime_preview":(0,i.E3)().preview?"preview":"formal"}},4060:(e,t,n)=>{"use strict";n.d(t,{IB:()=>l,uy:()=>g,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:(e,t,n)=>(t>n&&([t,n]=[n,t]),u[5](e,t,0)&&u[6](e,n,0)),2:(e,t,n)=>!u[1](e,t,n),11:(e,t)=>{const n=(0,c.Wo)(e).split(",").filter((e=>""!==e.trim())),i=(0,c.Wo)(t).split(",").filter((e=>""!==e.trim()));return n.some((e=>(e=e.trim(),i.some((t=>(t=t.trim(),e.includes(t)))))))},12:(e,t)=>!u[11](e,t,0),3:(e,t)=>(0,c.Wo)(e)===(0,c.Wo)(t),4:(e,t)=>!u[3](e,t,0),5:(e,t)=>{const n=(0,c.uI)(e),i=(0,c.uI)(t);return"number"==typeof n&&"number"==typeof i?n>i:(0,c.Wo)(n)>(0,c.Wo)(i)},6:(e,t)=>{const n=(0,c.uI)(e),i=(0,c.uI)(t);return"number"==typeof n&&"number"==typeof i?n<i:(0,c.Wo)(n)<(0,c.Wo)(i)},7:(e,t)=>!u[6](e,t,0),8:(e,t)=>!u[5](e,t,0),9:(e,t)=>{const n=(0,c.Wo)(e).split(",").filter((e=>""!==e.trim())),i=(0,c.Wo)(t).split(",").filter((e=>""!==e.trim()));return n.some((e=>(e=e.trim(),i.some((t=>(t=t.trim())===e)))))},10:(e,t)=>!u[9](e,t,0),13:e=>(0,c.Wo)(e).split(",").every((e=>""===e.trim())),14:(e,t)=>!u[13](e,t),15:(e,t)=>!u[16](e,t),16:(e,t)=>(0,c.Wo)(e).split(",").every((e=>{const t=e.trim();return"false"===t||""===t}))},l={request:e=>!!e,bool:e=>!!e,mark:(e,t)=>l.input(e,t),input:(e,t)=>{let n=e,i=t.markStart,r=t.markEnd;return t.ignoreCase&&("string"==typeof n&&(n=n.toLowerCase()),"string"==typeof i&&(i=i.toLowerCase()),"string"==typeof r&&(r=r.toLowerCase())),u[t.markId](n,i,r)}};function d(e,t){"string"==typeof e&&(e=(0,o.Qr)(e));const n=l[t.limitType],i=n?n(e,t):!!e;return{value:i,reason:i?void 0:{type:"value_unmatch",expected:t.markStart,expectedEnd:t.markEnd,limit:t.markId,actual:e}}}async function f(e,t){const{text:n}=e.relatedEmbed,i=g(e.markId)?",":void 0;return d(await(0,o.qQ)(n,{state:t,joinBy:i}),e)}async function p(e,t){const{relatedVarId:n}=e,i={identity:{baseId:n}},r=(0,s.of)(t,i);if(!r)return{value:!1,reason:{type:"var_not_found"}};const a=g(e.markId)?",":void 0;return d(await(0,o.Wi)({state:t,varInfo:r,joinBy:a}),e)}function m(e,t){const{relatedNodeId:n,relatedOptionId:o,limitType:s,markId:c}=t,u=function(e,t){const{loopStack:n,renderList:o}=e,{relatedNodeId:a}=t;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}(e,t);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((e=>function(e,t){return(0,r.oj)(e.option_id,t)}(e,o))),p=l[s];if(p){const e=f?(0,a.wr)(f):"",i=p(e,t),r={value:i};return i||(r.reason={type:"node_unmatch",limit:c,actual:e,expected:t.markStart,expectedEnd:t.markEnd,nodeId:n,optionId:o}),r}{const e=-2===c?!f:!!f,t={value:e};return e||(t.reason={type:"node_unmatch",limit:c,nodeId:n,optionId:o,expected:-1===c,actual:2===c}),t}}function g(e){return 9===e||10===e||11===e||12===e||13===e||14===e||15===e||16===e}async function h(e,t){return{start:g(e.markId)?await(0,o.E3)(e.markStart,{state:t,joinBy:","}):await(0,o.wh)(e.markStart,{state:t}),end:await(0,o.wh)(e.markEnd,{state:t})}}async function v(e,t){const{options:n,reverse:i,logicType:r}=t,o=await y(e,n,r);return i?!o.value:o.value}async function y(e,t,n){if(!t)return{value:!0};const i=[];for(const n of t){const t={...n},{relatedVarId:r,relatedEmbed:o,isGroup:a,groupLogicList:s,groupLogicType:c}=t,{start:u,end:l}=await h(t,e);let d;t.markEnd=l,t.markStart=u,d=a?await y(e,s,c):o?await f(t,e):r?await p(t,e):m(e,t),i.push(d)}return{value:!i["and"===n?"some":"every"]((e=>!e.value)),details:i}}async function _(e,t){return"object"==typeof e&&null!==e?v(t,e):!!e}},8260:(e,t,n)=>{"use strict";n.d(t,{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(e){return"LOOP_ALL_ROUND"===e}function d(e){return l(e.loopRoundId)||l(e.innerLoopRoundId)}async function f(e){const t=[],{state:n,varInfo:{identity:r}}=e,{loopNodeId:a,loopRoundId:s,innerLoopNodeId:u,innerLoopRoundId:d}=r,f=(0,i.AF)(n,a);if(!f)return"";const m=(0,c.IH)(n,f);if(!m)return"";let g=[];g=l(s)?m.varList.map((e=>(0,o.kt)(e.uuid))):[s];for(const r of g)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((e=>(0,o.kt)(e.uuid))):[d];for(const n of a){const i=await p(e,r,n);t.push(i)}}else{const n=await p(e,r);t.push(n)}return t.join(e.joinBy)}function p(e,t,n){const{varInfo:{config:i,identity:o}}=e,c=function(e,t){const n=(0,r.W4)().system.newSpan();return n.setAttribute("class","var-tag".concat(" ","var-string")),n.setAttribute("data-v-id",(0,s.A)(e.identity)),n.setAttribute("data-v-config",(0,a._m)(e.config)),n.outerHTML}({config:i,identity:{...o,loopRoundId:t,innerLoopRoundId:n}});return(0,u.qQ)(c,e)}},9376:(e,t,n)=>{"use strict";n.d(t,{Il:()=>w,Md:()=>h,Q9:()=>g,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),m=n(9572);async function g(e,t){const{loop:n}=t,i=n&&n.node.nodeUuid,{image:r}=t.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:e,varInfo:{node:t,lookupLoopNodeId:i}});{const t={identity:{baseId:r.id}};return await(0,m.cT)(e,(0,c.of)(e,t))}}async function h(e,t){const{origin:n,passRef:i}=t;if(i&&i.image)return i.image;const{parent:r,loop:o}=e,s=o&&o.node.nodeUuid,{image:l,text:f}=n;if(!l)return;const g=(0,u.yy)();let h;if("image"===l.type)h=(0,d.a)(l);else if(s&&p.Ux(l.id))h=(await g.LOOP_IMG.getImages({state:r,varInfo:{option:t,lookupLoopNodeId:s}}))[0];else{const e={identity:{baseId:l.id}};h=(await(0,m.cT)(r,(0,c.of)(r,e)))[0]}return!f&&h&&"variable"===l.type&&(0,a.KS)({node:e,optionId:t.uuid},{mapId:l.id},h.originName),h}function v(e){return!(!e||!(0,l.E3)().realTimePreview&&!(e.text||e.image||e.normalIconUrl))}async function y(e,t,n){const{optionPart:r,optionFilter:o}=t;let{option:a}=t;if(!r||r.inBunch)return{valid:!0};if(!a){const r=await o.filter({state:e,varInfo:t});a=(0,i.oz)(r,n.refOptId)}return{valid:!!a,srcOpt:a,srcRuntimeIndex:a?(0,i.wR)(t.node).indexOf(a):void 0}}function _(e,t){if(!t)return null;const n=(0,f.a)(e,t);for(const e of t){const t=(0,f.W)(e);if((0,o.oj)(t.uuid,n))return t}return null}async function w(e,t){const{origin:{mapping:n}}=e;if(e.mapping={field_1:"",field_2:"",field_3:"",field_4:"",field_5:"",field_6:""},t.context.option=e,n)for(const i of Object.keys(n)){const o=i,a=n[o];e.mapping[o]="string"==typeof a?await(0,r.qQ)(a,{state:t}):(0,d.a)(a)}e.assistValue={field_1:"",field_2:"",field_3:"",field_4:"",field_5:"",field_6:""},t.context.option=null}async function x(e,t,n,u=!1){let l=[],d=[],f=[],{refOptions:p,options:m,optionRefers:g}=t;if((0,o.is)(t,!!n)&&("xid"===n?(p=t.refOptionsX,m=t.optionsX,g=t.optionXRefers):"yid"===n&&(p=t.refOptionsY,m=t.optionsY,g=t.optionYRefers)),m&&p&&0!==p.length){l=[...m];const t={};for(const n of p){const o=_(n,g);if(!o)continue;const a=o.config||{},s=await(0,r.W0)(a.limitRnd,{state:e});if(0===s)continue;let l=null,d=null;const f=(0,c.of)(e,o);if(!f)continue;const{valid:p,srcOpt:m,srcRuntimeIndex:h}=await y(e,f,n);if(!p)continue;const w={state:e,varInfo:f,specifiedOpt:m,pureText:!u,keepWrap:!0};if(f.node&&(l=await(0,c.uZ)(w),m&&(d={uuid:n.uuid,value:m.value,optComment:m.optComment,image:(0,i.Y5)(m,"image"),number:m.number,text:m.text,label:m.label,mapping:m.mapping&&{...m.mapping},normalIconUrl:(0,i.Y5)(m,"normalIconUrl"),activeIconUrl:(0,i.Y5)(m,"activeIconUrl")})),v(l)){const e={srcRuntimeIndex:h,option:{...n,...l},passRef:d},i=o.uuid;t[i]?t[i].candidates.push(e):t[i]={candidates:[e],limitRnd:s,varInfo:f,disorder:a.disorder}}}Object.keys(t).forEach((e=>{const{limitRnd:n,candidates:i,varInfo:r,disorder:c}=t[e];let u=(0,o.my)(i,n);c?u=(0,s.sZ)(u):u.sort(((e,t)=>e.srcRuntimeIndex>t.srcRuntimeIndex?1:-1));const p=u.map((e=>e.option)),m=u.map((e=>e.passRef));f=f.concat((0,a.SW)(r,p)),l=l.concat(p),d=d.concat(m)}))}else l=m;return{options:l,refMaps:f,passRefs:d}}},3080:(e,t,n)=>{"use strict";n.d(t,{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(e,t,n){const{node:i,optionId:r,exclusiveId:o}=e;let a=i.embedVarMaps;if(a||(a=i.embedVarMaps=[]),o){const e=a.find((e=>e.exclusiveId===o&&e.var_id===t.mapId));if(e)return void(e.value=n)}a.push({type:"embed",var_id:t.mapId,value:n,option_id:r&&r.toLowerCase(),exclusiveId:o})}function s(e){const{text:t,image:n,icon:i}=e;if(t)return t;if(n)return n.originName;if(i){const e=(0,o.sV)(i).match(/#[^#]+$/);return e&&e[0]||""}return""}function c(e,t){return t.map((t=>({option_id:t.uuid.toLowerCase(),value:s(t),type:"ref",var_id:e.uuid})))}function u(e,t){e.referVarMaps?e.referVarMaps=e.referVarMaps.concat(t):e.referVarMaps=t}function l(e,t){const n=e.casVarMaps=[];t.forEach((e=>{e.text&&n.push({type:"cascade",option_id:e.uuid.toLowerCase(),value:e.text})}))}function d(e,t){const{renderList:n}=e,o=[];return n.forEach((e=>{if(!(0,r.Ci)(e.checkMode,t))return;const{nodeUuid:n,loop:a}=e;let{embedVarMaps:s,referVarMaps:c,casVarMaps:u}=e;s=function(e){if(e){let t=[];const n=[];return e.forEach((e=>{delete e.exclusiveId,e.option_id?t.push(e):n.push(e)})),t=function(e){let t=[];const n={};return e.forEach((e=>{const{var_id:t,value:i}=e;let r=n[t];r?(r.values.includes(i)||r.values.push(i),r.maps.push(e)):r=n[t]={values:[i],maps:[e]}})),Object.keys(n).forEach((e=>{const i=n[e],{values:r,maps:o}=i;if(r.length>1)t=t.concat(o);else{const e=o[0];o.length>1&&(e.option_id="all"),t.push(e)}})),t}(t),n.concat(t)}return[]}(s),c=c||[],u=u||[];const l=s.concat(c,u);if(l.length>0){let e;l.forEach((e=>{e.value=(0,i.Qr)(e.value)})),a&&(e=a.replacements.map((e=>e.index))),o.push({node_id:n.toLowerCase(),loop_idxs:e,var_maps:l})}})),o}},8832:(e,t,n)=>{"use strict";n.d(t,{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(e){if(!(0,s.Qr)(e.varInfo.config))return!0;const{varInfo:{option:t}}=e,n=e.varInfo.node,u=e.specifiedOpt||t,{limitType:l,limitStart:d,limitEnd:f,limitSrc:p,ignoreCase:m}=function(e,t){if(!t)return{};const{limitType:n}=t;if(n>=0)return t;const i=c[n];let r;const o=e.options.filter((e=>e.selected)).map((e=>e.number)).sort();return r=5===i||7===i?(0,a.Wo)(o[o.length-1]||0):(0,a.Wo)(o[0]||0),{...t,limitType:i,limitStart:r}}(n,e.varInfo.config),g=(0,i.KE)(u,p,e),h=Number(l),v=(0,r.uy)(h)?await(0,o.E3)(d,{...e,joinBy:","}):await(0,o.wh)(d,e),y=await(0,o.wh)(f,e);return r.IB.input(g,{markId:h,markStart:v,markEnd:y,ignoreCase:m})}},6620:(e,t,n)=>{"use strict";n.d(t,{a8:()=>a,aI:()=>s}),n(9952);var i=n(3001),r=n(8856),o=n(1820);function a(e,t){return{_LANG_:t.language,_LINK_TYPE_:(0,o.i)(),_IS_INFER_:(0,r.W4)().dev.infer?"Y":"",...e}}async function s(e,t=[],n=!0){const r={};for(const n of t){const{name:t,value:o}=n;t.startsWith("_url_")?r[t]=await(0,i.Oj)(o,{state:e}):t.startsWith("_html_")?r[t]=await(0,i.qQ)(o,{state:e},!0):r[t]=await(0,i.E3)(o,{state:e,joinBy:","},"URL")}return n?a(r,e):r}},3001:(e,t,n)=>{"use strict";n.d(t,{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(e){let t=!0;try{t=!!(0,i.y)(e,!0)}catch(t){console.info("error bool: ",e)}return t}function o(e,t,n){return function(e,t,n){return!!(t.length&&""!==n&&e&&e[e.length-1].match(/[\d)]/))}(e,t,n)&&(e+=t[t.length-1]),e+n}function a(e){return"("===e[e.length-1]&&(e+="0"),e+")"}var s=n(556),c=n(6072),u=n(3552),l=n(3080),d=n(488),f=n(9572),p=n(4072),m=n(8348),g=n(8856),h=n(2352),v=n(7404),y=n(5876),_=n(8260);function w(e){return e&&("var-html"===e.type||"var-request"===e.type||"var-loop"===e.type)}function x(e="",t=!1){if(e=(e=T(e,t)).replace(/&lt;/g,"<").replace(/&gt;/g,">"),t)for(;e.includes("&lt;")||e.includes("&gt;");)e=e.replace(/&lt;/g,"<").replace(/&gt;/g,">");return e}function b(e=""){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;")}function T(e="",t=!1){if(e=e.replace(/&amp;/g,"&"),t)for(;e.includes("&amp;");)e.replace(/&amp;/g,"&");return e}function S(e="",t,n,i,r){let o='<span var-name="'+n+'" class="var-light '+t+'"'+(i?'in-edist="1">':">")+e+"</span>";return r&&(o=(0,s.Qh)(o)),o}function E(e=""){return e.match(/<(\w+).+?<\/\1>/)||(e="<span>".concat(e,"</span>")),[...(0,d.gQ)(e).childNodes]}async function I(e="",t,n=!1){e+="";const{state:i,innerJoinBy:r,varInfo:o,usage:a}=t,c=t.spaceRep||"";e=e.replace(/&nbsp;/g,c);const u=t.joinBy||" ";if((0,d.iq)(e)){const c=(0,d.gQ)(e),f=(0,d.oB)(e,c);for(const e of f){const t=(0,d.yI)(i,e);let s="";if(t?s=await R({state:i,varInfo:t,joinBy:r||u}):(0,g.E3)().realTimePreview&&(s=S(e.innerHTML,"var-empty",e.innerText,!1,!0)),s=(0,h.oV)(s)?"":(0,h.Wo)(s).trim(),a){const n=t||{mapId:(0,d.sl)((0,d.im)(e))};(0,l.KS)(a,n,s)}const c=!o&&t&&s&&!n;let f=[];w(t)?(c&&(s=S(s,t.type,t.name,t.inEdist,!1)),f=s?E(s):[""]):(c&&(s=S(s,t.type,t.name,t.inEdist,!0)),e.innerText=s,f=[(0,g.W4)().system.newTextNode(e.innerHTML)]),k(e,f)}const p=function(e,t,n=""){if(w(t))return x(e.innerHTML);let i="";if(n){const r=[];for(const n of e.childNodes){let e="";if((0,s.is)(n,1===n.nodeType)){if("SPAN"===n.tagName&&!n.innerText&&0===n.childNodes.length)continue;e=n.outerHTML}else e=n.textContent.trim(),t||(e=b(e));e&&r.push(T(e))}i=r.join(n)}else i=T(e.innerHTML);return i=i.replace(/([\r\n]|^\s*|\s*$)/g,"").replace(/&lt;br&gt;/g,""),i=T((0,s.aO)(i)),i}(c,o,u);return L(p,t)}return e+""}function k(e,t){const n=e.parentElement;t.forEach((t=>{if("string"==typeof t){if(""!==t){const i=(0,g.W4)().system.newTextNode(t);n.insertBefore(i,e)}}else n.insertBefore(t,e)})),n.removeChild(e)}async function O(e="",t,n="WRAPPED_URL"){return L(C(await I(e,t,!0),n),t)}function C(e="",t="WRAPPED_URL"){if(!e||"string"!=typeof e)return e;e=e.replace(/<style>.*?<\/style>/g,"");let n=(0,d.gQ)(e).innerText;return n=(0,d.gQ)(n).innerText,"URL"===t&&(n=(0,f.yH)(n)),n.trim()}function L(e,t){return","===t.joinBy?(e+"").trim().replace(/(?:^\s*,|\s*,\s*,\s*|\s*,$)/,""):e}async function N(e="",t){let n=await I(e,{...t,innerJoinBy:","},!0);return n=C(x(n,!0)),n=n.replace(/####/g,"|").replace(/##/g,"").replace(/\s+/g,""),n=L(n,t),n}async function R(e){let t="";const{varInfo:n}=e;if((0,_.g)(n.identity))t=await(0,_.u)(e);else if(n.getText)t=await n.getText(e);else{const{identity:{baseId:l}}=n;if((0,d._i)(l)){const[e,n]=l.split("URL_PARAM=");t=(0,v.uK)()[n]}else n.nodePart||n.node?t=await(0,d.Ge)(e):"var-string"===n.type?t=await function(e){const{varInfo:t}=e;return t.getText?t.getText(e):I(t.value,e)}(e):"var-expression"===n.type?t=await async function(e){const t=(0,m.yy)(),{varInfo:n,state:r}=e;let s="";const c=(0,d.gQ)(n.value).childNodes,u=[];let l="";for(const e of c)if((0,d.yE)(e)){if(l){const e=parseFloat(l);if(isNaN(e))return e;s=o(s,u,e),l=""}const n=(0,d.yI)(r,e);if(n){const e=n.split;if(n.uuid===t.EXP_OP.uuid)s+="(";else if(n.uuid===t.EXP_CP.uuid)s=a(s);else if(e)s=o(s,u,n.expOpr),u.push(e);else if(n.expOpr)u.length&&(s=a(s),u.pop()),s=o(s,u,n.expOpr);else{const e=u[u.length-1];s=o(s,u,await R({state:r,varInfo:n,joinBy:e||"+"})||0)}}else l+="0"}else l+=e.textContent.replace(/\s/g,"");for(l&&(s=o(s,u,parseFloat(l)));u.length;)s=a(s),u.pop();return function(e){let t=0;try{t=(0,i.y)(e,!0)}catch(n){t=NaN,console.info("error exp: ",e)}return t}(s)}(e):"var-media"===n.type?t=await async function(e){const{varInfo:t,state:n}=e,{config:i}=t,r=e.joinBy||" ",o=(0,d.oB)(t.value),a=[];for(const e of o){const t=(0,d.yI)(n,e);if(!t)continue;const{imgHeight:o,imgWidth:s}=i;(o||s)&&(t.config={...t.config,imgHeight:o,imgWidth:s});const c=await R({state:n,varInfo:t,joinBy:r});(0,h.oV)(c)||a.push(c)}return a.join(r)}(e):"var-bool"===n.type?t=await async function(e){const{varInfo:t,state:n}=e;if(t.getBool)return t.getBool(e);const{nodePart:i,node:o}=t;if(i||o)return(0,d.aL)(e);const a=(0,d.oB)(t.value);let s="";for(const t of a){const i=(0,d.yI)(n,t);if(i)if(i.blOpr)s+=i.blOpr;else if(i.getBool)s+=r(await i.getBool(e))?"1":"0";else{const e=await R({state:n,varInfo:i});s+="string"==typeof e?"0"===e?e:e?"1":"0":r(e)?"1":"0"}}return r(s)}(e):"var-request"===n.type?t=await async function(e){const{varInfo:{request:t,config:n},state:i}=e;if(t){let e=null;if(n&&n.phParams){e={};for(const t of n.phParams)e[t.name]=await O(t.value,{state:i,joinBy:","},"URL")}const{result:r}=await(0,c.eU)({state:i,request:t,customParam:e,silent:!1});return"string"!=typeof r?r:(0,u.q)(r)}return""}(e):"var-html"===n.type&&(t=await async function(e){const{varInfo:t,state:n}=e,i=t.getText?await t.getText(e):await I(t.value,e),r=(0,u.q)(x(i));return await function(e,t,n){const i=(0,y.mE)(e);return(0,s.eg)(t,/{{{?(.+?)}}}?/g,(async(e,t)=>{const r=t.indexOf("=");let o=t,a="";r>-1&&(o=t.substring(0,r),a=t.substring(r+1));const s=i[o]||"";let c="";return s&&(c=e.startsWith("{{{")?await I(s,{state:n}):await O(s,{state:n},"URL")),c||a}))}(t.config.phParams,r,n)}(e))}return(0,d.iq)(t)&&(t=await I(t,e)),t}async function A(e="",t,n=!1){if("number"==typeof e)return e;if((0,h.oV)(e))return n?NaN:"";const i=Number(e);if(isNaN(i)){const i=await O(e,t);if((0,h.oV)(i))return n?NaN:"";const r=Number(i);return isNaN(r)?n?NaN:i:r}return i}async function P(e="",t){if("number"==typeof e)return e;const n=await A(e,t,!0);return Number(n)}async function M(e="",t,n=!1){return(0,h.oV)(e)?"":(0,s.eg)((0,h.Wo)(e),/{{(.+?)}}/g,(async(e,i)=>{let r=await async function(e,t){if(e.match(/key(?:\d+)?/))return(0,v.uK)()[e];{const n=(0,p.WK)(e,t.variables);return n?C(await R({varInfo:n,state:t,joinBy:","})):""}}(i,t);return r&&n&&(r=encodeURIComponent(r)),"".concat(r||"")}))}function W(e=""){return e.replace(/(?:^<div>|<\/div>$)/g,"")}},3040:e=>{e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},6960:(e,t,n)=>{var i=n(6840);e.exports=function(e){if(!i(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},5775:(e,t,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)}),e.exports=function(e){s[a][e]=!0}},3696:(e,t,n)=>{"use strict";var i=n(8540).charAt;e.exports=function(e,t,n){return t+(n?i(e,t).length:1)}},5968:(e,t,n)=>{var i=n(6840);e.exports=function(e){if(!i(e))throw TypeError(String(e)+" is not an object");return e}},7299:(e,t,n)=>{var i=n(2576),r=n(1688),o=n(9924),a=function(e){return function(t,n,a){var s,c=i(t),u=r(c.length),l=o(a,u);if(e&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((e||l in c)&&c[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},1452:(e,t,n)=>{"use strict";var i=n(996);e.exports=function(e,t){var n=[][e];return!!n&&i((function(){n.call(null,t||function(){throw 1},1)}))}},4916:(e,t,n)=>{var i=n(5968);e.exports=function(e,t,n,r){try{return r?t(i(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&i(o.call(e)),t}}},5996:e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},6400:(e,t,n)=>{var i=n(8928),r=n(5996),o=n(3280)("toStringTag"),a="Arguments"==r(function(){return arguments}());e.exports=i?r:function(e){var t,n,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:a?r(t):"Object"==(i=r(t))&&"function"==typeof t.callee?"Arguments":i}},1528:(e,t,n)=>{"use strict";var i=n(5968),r=n(3040);e.exports=function(){for(var e=i(this),t=r(e.add),n=0,o=arguments.length;n<o;n++)t.call(e,arguments[n]);return e}},6792:(e,t,n)=>{"use strict";var i=n(5968),r=n(3040);e.exports=function(){for(var e,t=i(this),n=r(t.delete),o=!0,a=0,s=arguments.length;a<s;a++)e=n.call(t,arguments[a]),o=o&&e;return!!o}},8580:(e,t,n)=>{var i=n(3944),r=n(3412),o=n(2456),a=n(3984);e.exports=function(e,t){for(var n=r(t),s=a.f,c=o.f,u=0;u<n.length;u++){var l=n[u];i(e,l)||s(e,l,c(t,l))}}},9700:(e,t,n)=>{var i=n(996);e.exports=!i((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},3419:(e,t,n)=>{"use strict";var i=n(7963).IteratorPrototype,r=n(5156),o=n(4848),a=n(3532),s=n(476),c=function(){return this};e.exports=function(e,t,n){var u=t+" Iterator";return e.prototype=r(i,{next:o(1,n)}),a(e,u,!1,!0),s[u]=c,e}},784:(e,t,n)=>{var i=n(376),r=n(3984),o=n(4848);e.exports=i?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},4848:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},9436:(e,t,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),m=p.IteratorPrototype,g=p.BUGGY_SAFARI_ITERATORS,h=l("iterator"),v="keys",y="values",_="entries",w=function(){return this};e.exports=function(e,t,n,l,p,x,b){r(n,t,l);var T,S,E,I=function(e){if(e===p&&N)return N;if(!g&&e in C)return C[e];switch(e){case v:case y:case _:return function(){return new n(this,e)}}return function(){return new n(this)}},k=t+" Iterator",O=!1,C=e.prototype,L=C[h]||C["@@iterator"]||p&&C[p],N=!g&&L||I(p),R="Array"==t&&C.entries||L;if(R&&(T=o(R.call(new e)),m!==Object.prototype&&T.next&&(d||o(T)===m||(a?a(T,m):"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[t]=N,p)if(S={values:I(y),keys:x?N:I(v),entries:I(_)},b)for(E in S)(g||O||!(E in C))&&u(C,E,S[E]);else i({target:t,proto:!0,forced:g||O},S);return S}},376:(e,t,n)=>{var i=n(996);e.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4111:(e,t,n)=>{var i=n(4280),r=n(6840),o=i.document,a=r(o)&&r(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},3060:e=>{e.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:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2808:(e,t,n)=>{var i=n(4280),r=n(2456).f,o=n(784),a=n(7376),s=n(1016),c=n(8580),u=n(7724);e.exports=function(e,t){var n,l,d,f,p,m=e.target,g=e.global,h=e.stat;if(n=g?i:h?i[m]||s(m,{}):(i[m]||{}).prototype)for(l in t){if(f=t[l],d=e.noTargetGet?(p=r(n,l))&&p.value:n[l],!u(g?l:m+(h?".":"#")+l,e.forced)&&void 0!==d){if(typeof f==typeof d)continue;c(f,d)}(e.sham||d&&d.sham)&&o(f,"sham",!0),a(n,l,f,e)}}},996:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},8284:(e,t,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 e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),l="$0"==="a".replace(/./,"$0"),d=o("replace"),f=!!/./[d]&&""===/./[d]("a","$0"),p=!r((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,d){var m=o(e),g=!r((function(){var t={};return t[m]=function(){return 7},7!=""[e](t)})),h=g&&!r((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[c]=function(){return n},n.flags="",n[m]=/./[m]),n.exec=function(){return t=!0,null},n[m](""),!t}));if(!g||!h||"replace"===e&&(!u||!l||f)||"split"===e&&!p){var v=/./[m],y=n(m,""[e],(function(e,t,n,i,r){return t.exec===a?g&&!r?{done:!0,value:v.call(t,n,i)}:{done:!0,value:e.call(n,t,i)}:{done:!1}}),{REPLACE_KEEPS_$0:l,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:f}),_=y[0],w=y[1];i(String.prototype,e,_),i(RegExp.prototype,m,2==t?function(e,t){return w.call(e,this,t)}:function(e){return w.call(e,this)})}d&&s(RegExp.prototype[m],"sham",!0)}},3596:(e,t,n)=>{var i=n(3040);e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,r){return e.call(t,n,i,r)}}return function(){return e.apply(t,arguments)}}},3904:(e,t,n)=>{var i=n(2328),r=n(4280),o=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?o(i[e])||o(r[e]):i[e]&&i[e][t]||r[e]&&r[e][t]}},6648:(e,t,n)=>{var i=n(6400),r=n(476),o=n(3280)("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||r[i(e)]}},460:(e,t,n)=>{var i=n(5968),r=n(6648);e.exports=function(e){var t=r(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return i(t.call(e))}},4516:(e,t,n)=>{var i=n(8820),r=n(460);e.exports=i?r:function(e){return Map.prototype.entries.call(e)}},4892:(e,t,n)=>{var i=n(8820),r=n(460);e.exports=i?r:function(e){return Set.prototype.values.call(e)}},4280:(e,t,n)=>{var i=function(e){return e&&e.Math==Math&&e};e.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:e=>{var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},1976:e=>{e.exports={}},4128:(e,t,n)=>{var i=n(3904);e.exports=i("document","documentElement")},4544:(e,t,n)=>{var i=n(376),r=n(996),o=n(4111);e.exports=!i&&!r((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},8048:(e,t,n)=>{var i=n(996),r=n(5996),o="".split;e.exports=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==r(e)?o.call(e,""):Object(e)}:Object},196:(e,t,n)=>{var i=n(7536),r=Function.toString;"function"!=typeof i.inspectSource&&(i.inspectSource=function(e){return r.call(e)}),e.exports=i.inspectSource},8264:(e,t,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 m=new p,g=m.get,h=m.has,v=m.set;i=function(e,t){return v.call(m,e,t),t},r=function(e){return g.call(m,e)||{}},o=function(e){return h.call(m,e)}}else{var y=d("state");f[y]=!0,i=function(e,t){return u(e,y,t),t},r=function(e){return l(e,y)?e[y]:{}},o=function(e){return l(e,y)}}e.exports={set:i,get:r,has:o,enforce:function(e){return o(e)?r(e):i(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=r(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},3976:(e,t,n)=>{var i=n(3280),r=n(476),o=i("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||a[o]===e)}},1444:(e,t,n)=>{var i=n(5996);e.exports=Array.isArray||function(e){return"Array"==i(e)}},7724:(e,t,n)=>{var i=n(996),r=/#|\.prototype\./,o=function(e,t){var n=s[a(e)];return n==u||n!=c&&("function"==typeof t?i(t):!!t)},a=o.normalize=function(e){return String(e).replace(r,".").toLowerCase()},s=o.data={},c=o.NATIVE="N",u=o.POLYFILL="P";e.exports=o},6840:e=>{e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},8820:e=>{e.exports=!1},596:(e,t,n)=>{var i=n(5968),r=n(3976),o=n(1688),a=n(3596),s=n(6648),c=n(4916),u=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,l,d){var f,p,m,g,h,v,y,_=a(t,n,l?2:1);if(d)f=e;else{if("function"!=typeof(p=s(e)))throw TypeError("Target is not iterable");if(r(p)){for(m=0,g=o(e.length);g>m;m++)if((h=l?_(i(y=e[m])[0],y[1]):_(e[m]))&&h instanceof u)return h;return new u(!1)}f=p.call(e)}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(e){return new u(!0,e)}},7963:(e,t,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})),e.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:f}},476:e=>{e.exports={}},5976:(e,t,n)=>{var i=n(996);e.exports=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())}))},4688:(e,t,n)=>{var i=n(4280),r=n(196),o=i.WeakMap;e.exports="function"==typeof o&&/native code/.test(r(o))},5156:(e,t,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"),m=function(){},g=function(e){return"<"+f+">"+e+"</"+f+">"},h=function(){try{i=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t,n;h=i?function(e){e.write(g("")),e.close();var t=e.parentWindow.Object;return e=null,t}(i):(t=u("iframe"),n="java"+f+":",t.style.display="none",c.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(g("document.F=Object")),e.close(),e.F);for(var r=a.length;r--;)delete h[d][a[r]];return h()};s[p]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(m[d]=r(e),n=new m,m[d]=null,n[p]=e):n=h(),void 0===t?n:o(n,t)}},6800:(e,t,n)=>{var i=n(376),r=n(3984),o=n(5968),a=n(3008);e.exports=i?Object.defineProperties:function(e,t){o(e);for(var n,i=a(t),s=i.length,c=0;s>c;)r.f(e,n=i[c++],t[n]);return e}},3984:(e,t,n)=>{var i=n(376),r=n(4544),o=n(5968),a=n(5880),s=Object.defineProperty;t.f=i?s:function(e,t,n){if(o(e),t=a(t,!0),o(n),r)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},2456:(e,t,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;t.f=i?l:function(e,t){if(e=a(e),t=s(t,!0),u)try{return l(e,t)}catch(e){}if(c(e,t))return o(!r.f.call(e,t),e[t])}},220:(e,t,n)=>{var i=n(1216),r=n(2552).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,r)}},7928:(e,t)=>{t.f=Object.getOwnPropertySymbols},5432:(e,t,n)=>{var i=n(3944),r=n(8648),o=n(7996),a=n(9700),s=o("IE_PROTO"),c=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=r(e),i(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?c:null}},1216:(e,t,n)=>{var i=n(3944),r=n(2576),o=n(7299).indexOf,a=n(1976);e.exports=function(e,t){var n,s=r(e),c=0,u=[];for(n in s)!i(a,n)&&i(s,n)&&u.push(n);for(;t.length>c;)i(s,n=t[c++])&&(~o(u,n)||u.push(n));return u}},3008:(e,t,n)=>{var i=n(1216),r=n(2552);e.exports=Object.keys||function(e){return i(e,r)}},8:(e,t)=>{"use strict";var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,r=i&&!n.call({1:2},1);t.f=r?function(e){var t=i(this,e);return!!t&&t.enumerable}:n},1640:(e,t,n)=>{var i=n(5968),r=n(6960);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,o){return i(n),r(o),t?e.call(n,o):n.__proto__=o,n}}():void 0)},3412:(e,t,n)=>{var i=n(3904),r=n(220),o=n(7928),a=n(5968);e.exports=i("Reflect","ownKeys")||function(e){var t=r.f(a(e)),n=o.f;return n?t.concat(n(e)):t}},2328:(e,t,n)=>{var i=n(4280);e.exports=i},7376:(e,t,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");(e.exports=function(e,t,n,s){var c=!!s&&!!s.unsafe,u=!!s&&!!s.enumerable,f=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof t||o(n,"name")||r(n,"name",t),l(n).source=d.join("string"==typeof t?t:"")),e!==i?(c?!f&&e[t]&&(u=!0):delete e[t],u?e[t]=n:r(e,t,n)):u?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&u(this).source||s(this)}))},9792:(e,t,n)=>{var i=n(5996),r=n(2804);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==i(e))throw TypeError("RegExp#exec called on incompatible receiver");return r.call(e,t)}},2804:(e,t,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(e){var t,n,i,r,a=this,u=d&&a.sticky,p=o.call(a),m=a.source,g=0,h=e;return u&&(-1===(p=p.replace("y","")).indexOf("g")&&(p+="g"),h=String(e).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==e[a.lastIndex-1])&&(m="(?: "+m+")",h=" "+h,g++),n=new RegExp("^(?:"+m+")",p)),f&&(n=new RegExp("^"+m+"$(?!\\s)",p)),l&&(t=a.lastIndex),i=s.call(u?n:a,h),u?i?(i.input=i.input.slice(g),i[0]=i[0].slice(g),i.index=a.lastIndex,a.lastIndex+=i[0].length):a.lastIndex=0:l&&i&&(a.lastIndex=a.global?i.index+i[0].length:t),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}),e.exports=u},736:(e,t,n)=>{"use strict";var i=n(5968);e.exports=function(){var e=i(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},8288:(e,t,n)=>{"use strict";var i=n(996);function r(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=i((function(){var e=r("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=i((function(){var e=r("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},1952:e=>{e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},4004:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},1016:(e,t,n)=>{var i=n(4280),r=n(784);e.exports=function(e,t){try{r(i,e,t)}catch(n){i[e]=t}return t}},3532:(e,t,n)=>{var i=n(3984).f,r=n(3944),o=n(3280)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,o)&&i(e,o,{configurable:!0,value:t})}},7996:(e,t,n)=>{var i=n(9364),r=n(1732),o=i("keys");e.exports=function(e){return o[e]||(o[e]=r(e))}},7536:(e,t,n)=>{var i=n(4280),r=n(1016),o="__core-js_shared__",a=i[o]||r(o,{});e.exports=a},9364:(e,t,n)=>{var i=n(8820),r=n(7536);(e.exports=function(e,t){return r[e]||(r[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:i?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},592:(e,t,n)=>{var i=n(5968),r=n(3040),o=n(3280)("species");e.exports=function(e,t){var n,a=i(e).constructor;return void 0===a||null==(n=i(a)[o])?t:r(n)}},8540:(e,t,n)=>{var i=n(3509),r=n(1952),o=function(e){return function(t,n){var o,a,s=String(r(t)),c=i(n),u=s.length;return c<0||c>=u?e?"":void 0:(o=s.charCodeAt(c))<55296||o>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?e?s.charAt(c):o:e?s.slice(c,c+2):a-56320+(o-55296<<10)+65536}};e.exports={codeAt:o(!1),charAt:o(!0)}},9616:(e,t,n)=>{var i=n(996),r=n(2308);e.exports=function(e){return i((function(){return!!r[e]()||"​…᠎"!="​…᠎"[e]()||r[e].name!==e}))}},6452:(e,t,n)=>{var i=n(1952),r="["+n(2308)+"]",o=RegExp("^"+r+r+"*"),a=RegExp(r+r+"*$"),s=function(e){return function(t){var n=String(i(t));return 1&e&&(n=n.replace(o,"")),2&e&&(n=n.replace(a,"")),n}};e.exports={start:s(1),end:s(2),trim:s(3)}},9924:(e,t,n)=>{var i=n(3509),r=Math.max,o=Math.min;e.exports=function(e,t){var n=i(e);return n<0?r(n+t,0):o(n,t)}},2576:(e,t,n)=>{var i=n(8048),r=n(1952);e.exports=function(e){return i(r(e))}},3509:e=>{var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:t)(e)}},1688:(e,t,n)=>{var i=n(3509),r=Math.min;e.exports=function(e){return e>0?r(i(e),9007199254740991):0}},8648:(e,t,n)=>{var i=n(1952);e.exports=function(e){return Object(i(e))}},5880:(e,t,n)=>{var i=n(6840);e.exports=function(e,t){if(!i(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!i(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},8928:(e,t,n)=>{var i={};i[n(3280)("toStringTag")]="z",e.exports="[object z]"===String(i)},1732:e=>{var t=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++t+n).toString(36)}},5112:(e,t,n)=>{var i=n(5976);e.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3280:(e,t,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;e.exports=function(e){return o(u,e)||(s&&o(l,e)?u[e]=l[e]:u[e]=d("Symbol."+e)),u[e]}},2308:e=>{e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},3224:(e,t,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);e.exports=s(Array,"Array",(function(e,t){u(this,{type:c,target:i(e),index:0,kind:t})}),(function(){var e=l(this),t=e.target,n=e.kind,i=e.index++;return!t||i>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:i,done:!1}:"values"==n?{value:t[i],done:!1}:{value:[i,t[i]],done:!1}}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},2048:(e,t,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:(e,t,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(e){return void 0===e?u.call(o(this)):u.call(o(this),r(e))}})},4016:(e,t,n)=>{"use strict";var i=n(2808),r=n(2804);i({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},7768:(e,t,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,m=/\$([$&'`]|\d\d?|<[^>]*>)/g,g=/\$([$&'`]|\d\d?)/g;i("replace",2,(function(e,t,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[e];return void 0!==o?o.call(n,r,i):t.call(String(r),n,i)},function(e,i){if(!h&&v||"string"==typeof i&&-1===i.indexOf(y)){var o=n(t,e,this,i);if(o.done)return o.value}var c=r(e),p=String(this),m="function"==typeof i;m||(i=String(i));var g=c.global;if(g){var w=c.unicode;c.lastIndex=0}for(var x=[];;){var b=l(c,p);if(null===b)break;if(x.push(b),!g)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(m){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 _(e,n,i,r,a,s){var c=i+e.length,u=r.length,l=g;return void 0!==a&&(a=o(a),l=m),t.call(s,l,(function(t,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return e;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 t;if(l>u){var d=p(l/10);return 0===d?t:d<=u?void 0===r[d-1]?o.charAt(1):r[d-1]+o.charAt(1):t}s=r[l-1]}return void 0===s?"":s}))}}))},9624:(e,t,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:(e,t,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 e=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),t=this instanceof f?new l(e):void 0===e?l():l(e);return""===e&&(d[t]=!0),t};u(f,l);var p=f.prototype=l.prototype;p.constructor=f;var m=p.toString,g="Symbol(test)"==String(l("test")),h=/^Symbol\((.*)\)[^)]+$/;c(p,"description",{configurable:!0,get:function(){var e=s(this)?this.valueOf():this,t=m.call(e);if(a(d,e))return"";var n=g?t.slice(7,-1):t.replace(h,"$1");return""===n?void 0:n}}),i({global:!0,forced:!0},{Symbol:f})}},3656:(e,t,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:(e,t,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(e){var t=o(this),n=s(t),i=a(e,arguments.length>1?arguments[1]:void 0,3);return!c(n,(function(e,n){if(!i(n,e,t))return c.stop()}),void 0,!0,!0).stopped}})},9896:(e,t,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(e){var t=a(this),n=l(t),i=c(e,arguments.length>1?arguments[1]:void 0,3),r=new(u(t,o("Map"))),f=s(r.set);return d(n,(function(e,n){i(n,e,t)&&f.call(r,e,n)}),void 0,!0,!0),r}})},8252:(e,t,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(e){var t=o(this),n=s(t),i=a(e,arguments.length>1?arguments[1]:void 0,3);return c(n,(function(e,n){if(i(n,e,t))return c.stop(e)}),void 0,!0,!0).result}})},6832:(e,t,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(e){var t=o(this),n=s(t),i=a(e,arguments.length>1?arguments[1]:void 0,3);return c(n,(function(e,n){if(i(n,e,t))return c.stop(n)}),void 0,!0,!0).result}})},7240:(e,t,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(e){return c(a(o(this)),(function(t,n){if(s(n,e))return c.stop()}),void 0,!0,!0).stopped}})},2288:(e,t,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(e){return s(a(o(this)),(function(t,n){if(n===e)return s.stop(t)}),void 0,!0,!0).result}})},5396:(e,t,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(e){var t=a(this),n=l(t),i=c(e,arguments.length>1?arguments[1]:void 0,3),r=new(u(t,o("Map"))),f=s(r.set);return d(n,(function(e,n){f.call(r,i(n,e,t),n)}),void 0,!0,!0),r}})},2480:(e,t,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(e){var t=a(this),n=l(t),i=c(e,arguments.length>1?arguments[1]:void 0,3),r=new(u(t,o("Map"))),f=s(r.set);return d(n,(function(e,n){f.call(r,e,i(n,e,t))}),void 0,!0,!0),r}})},7190:(e,t,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(e){for(var t=o(this),n=a(t.set),i=0;i<arguments.length;)s(arguments[i++],n,t,!0);return t}})},5036:(e,t,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(e){var t=o(this),n=s(t),i=arguments.length<2,r=i?void 0:arguments[1];if(a(e),c(n,(function(n,o){i?(i=!1,r=o):r=e(r,o,n,t)}),void 0,!0,!0),i)throw TypeError("Reduce of empty map with no initial value");return r}})},4736:(e,t,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(e){var t=o(this),n=s(t),i=a(e,arguments.length>1?arguments[1]:void 0,3);return c(n,(function(e,n){if(i(n,e,t))return c.stop()}),void 0,!0,!0).stopped}})},2520:(e,t,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(e,t){var n=o(this),i=arguments.length;a(t);var r=n.has(e);if(!r&&i<3)throw TypeError("Updating absent value");var s=r?n.get(e):a(i>2?arguments[2]:void 0)(e,n);return n.set(e,t(s,e,n)),n}})},9328:(e,t,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:(e,t,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:(e,t,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(e){var t=a(this),n=new(c(t,o("Set")))(t),i=s(n.delete);return u(e,(function(e){i.call(n,e)})),n}})},9708:(e,t,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(e){var t=o(this),n=s(t),i=a(e,arguments.length>1?arguments[1]:void 0,3);return!c(n,(function(e){if(!i(e,e,t))return c.stop()}),void 0,!1,!0).stopped}})},7976:(e,t,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(e){var t=a(this),n=l(t),i=c(e,arguments.length>1?arguments[1]:void 0,3),r=new(u(t,o("Set"))),f=s(r.add);return d(n,(function(e){i(e,e,t)&&f.call(r,e)}),void 0,!1,!0),r}})},5600:(e,t,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(e){var t=o(this),n=s(t),i=a(e,arguments.length>1?arguments[1]:void 0,3);return c(n,(function(e){if(i(e,e,t))return c.stop(e)}),void 0,!1,!0).result}})},7452:(e,t,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(e){var t=a(this),n=new(c(t,o("Set"))),i=s(t.has),r=s(n.add);return u(e,(function(e){i.call(t,e)&&r.call(n,e)})),n}})},8636:(e,t,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(e){var t=o(this),n=a(t.has);return!s(e,(function(e){if(!0===n.call(t,e))return s.stop()})).stopped}})},1524:(e,t,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(e){var t=c(this),n=a(e),i=n.has;return"function"!=typeof i&&(n=new(o("Set"))(e),i=s(n.has)),!u(t,(function(e){if(!1===i.call(n,e))return u.stop()}),void 0,!1,!0).stopped}})},8836:(e,t,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(e){var t=o(this),n=a(t.has);return!s(e,(function(e){if(!1===n.call(t,e))return s.stop()})).stopped}})},5040:(e,t,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(e){var t=o(this),n=a(t),i=void 0===e?",":String(e),r=[];return s(n,r.push,r,!1,!0),r.join(i)}})},1728:(e,t,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(e){var t=a(this),n=l(t),i=c(e,arguments.length>1?arguments[1]:void 0,3),r=new(u(t,o("Set"))),f=s(r.add);return d(n,(function(e){f.call(r,i(e,e,t))}),void 0,!1,!0),r}})},80:(e,t,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(e){var t=o(this),n=s(t),i=arguments.length<2,r=i?void 0:arguments[1];if(a(e),c(n,(function(n){i?(i=!1,r=n):r=e(r,n,n,t)}),void 0,!1,!0),i)throw TypeError("Reduce of empty set with no initial value");return r}})},1124:(e,t,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(e){var t=o(this),n=s(t),i=a(e,arguments.length>1?arguments[1]:void 0,3);return c(n,(function(e){if(i(e,e,t))return c.stop()}),void 0,!1,!0).stopped}})},9600:(e,t,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(e){var t=a(this),n=new(c(t,o("Set")))(t),i=s(n.delete),r=s(n.add);return u(e,(function(e){i.call(n,e)||r.call(n,e)})),n}})},8932:(e,t,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(e){var t=a(this),n=new(c(t,o("Set")))(t);return u(e,s(n.add),n),n}})},6056:(e,t,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:(e,t,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(e){p[c]=l}if(p[u]||a(p,u,d),r[d])for(var m in o)if(p[m]!==o[m])try{a(p,m,o[m])}catch(e){p[m]=o[m]}}}},512:function(e,t,n){"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g&&n.g,e.exports=function(){"use strict";var e,t="3.7.2",n=t,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=(e={},c.forEach((function(t,n){return e[t]=n})),e),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(e,t){return void 0===t&&(t=function(e){return e}),new Uint8Array(Array.prototype.slice.call(e,0).map(t))},p=function(e){return e.replace(/=/g,"").replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"}))},m=function(e){return e.replace(/[^A-Za-z0-9\+\/]/g,"")},g=function(e){for(var t,n,i,r,o="",a=e.length%3,s=0;s<e.length;){if((n=e.charCodeAt(s++))>255||(i=e.charCodeAt(s++))>255||(r=e.charCodeAt(s++))>255)throw new TypeError("invalid character found");o+=c[(t=n<<16|i<<8|r)>>18&63]+c[t>>12&63]+c[t>>6&63]+c[63&t]}return a?o.slice(0,a-3)+"===".substring(a):o},h=r?function(e){return btoa(e)}:o?function(e){return Buffer.from(e,"binary").toString("base64")}:g,v=o?function(e){return Buffer.from(e).toString("base64")}:function(e){for(var t=[],n=0,i=e.length;n<i;n+=4096)t.push(d.apply(null,e.subarray(n,n+4096)));return h(t.join(""))},y=function(e,t){return void 0===t&&(t=!1),t?p(v(e)):v(e)},_=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?d(192|t>>>6)+d(128|63&t):d(224|t>>>12&15)+d(128|t>>>6&63)+d(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return d(240|t>>>18&7)+d(128|t>>>12&63)+d(128|t>>>6&63)+d(128|63&t)},w=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,x=function(e){return e.replace(w,_)},b=o?function(e){return Buffer.from(e,"utf8").toString("base64")}:s?function(e){return v(s.encode(e))}:function(e){return h(x(e))},T=function(e,t){return void 0===t&&(t=!1),t?p(b(e)):b(e)},S=function(e){return T(e,!0)},E=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,I=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return d(55296+(t>>>10))+d(56320+(1023&t));case 3:return d((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return d((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},k=function(e){return e.replace(E,I)},O=function(e){if(e=e.replace(/\s+/g,""),!l.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));for(var t,n,i,r="",o=0;o<e.length;)t=u[e.charAt(o++)]<<18|u[e.charAt(o++)]<<12|(n=u[e.charAt(o++)])<<6|(i=u[e.charAt(o++)]),r+=64===n?d(t>>16&255):64===i?d(t>>16&255,t>>8&255):d(t>>16&255,t>>8&255,255&t);return r},C=i?function(e){return atob(m(e))}:o?function(e){return Buffer.from(e,"base64").toString("binary")}:O,L=o?function(e){return f(Buffer.from(e,"base64"))}:function(e){return f(C(e),(function(e){return e.charCodeAt(0)}))},N=function(e){return L(A(e))},R=o?function(e){return Buffer.from(e,"base64").toString("utf8")}:a?function(e){return a.decode(L(e))}:function(e){return k(C(e))},A=function(e){return m(e.replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})))},P=function(e){return R(A(e))},M=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}},W=function(){var e=function(e,t){return Object.defineProperty(String.prototype,e,M(t))};e("fromBase64",(function(){return P(this)})),e("toBase64",(function(e){return T(this,e)})),e("toBase64URI",(function(){return T(this,!0)})),e("toBase64URL",(function(){return T(this,!0)})),e("toUint8Array",(function(){return N(this)}))},U=function(){var e=function(e,t){return Object.defineProperty(Uint8Array.prototype,e,M(t))};e("toBase64",(function(e){return y(this,e)})),e("toBase64URI",(function(){return y(this,!0)})),e("toBase64URL",(function(){return y(this,!0)}))},G={version:t,VERSION:n,atob:C,atobPolyfill:O,btoa:h,btoaPolyfill:g,fromBase64:P,toBase64:T,encode:T,encodeURI:S,encodeURL:S,utob:x,btou:k,decode:P,isValid:function(e){if("string"!=typeof e)return!1;var t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:y,toUint8Array:N,extendString:W,extendUint8Array:U,extendBuiltins:function(){W(),U()},Base64:{}};return Object.keys(G).forEach((function(e){return G.Base64[e]=G[e]})),G}()},3548:(e,t,n)=>{"use strict";var i={};(0,n(12).assign)(i,n(3400),n(7888),n(944)),e.exports=i},3400:(e,t,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(e){if(!(this instanceof p))return new p(e);this.options=r.assign({level:l,method:f,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.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,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==u)throw new Error(a[n]);if(t.header&&i.deflateSetHeader(this.strm,t.header),t.dictionary){var m;if(m="string"==typeof t.dictionary?o.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(n=i.deflateSetDictionary(this.strm,m))!==u)throw new Error(a[n]);this._dict_set=!0}}function m(e,t){var n=new p(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}p.prototype.push=function(e,t){var n,a,s=this.strm,l=this.options.chunkSize;if(this.ended)return!1;a=t===~~t?t:!0===t?4:0,"string"==typeof e?s.input=o.string2buf(e):"[object ArrayBuffer]"===c.call(e)?s.input=new Uint8Array(e):s.input=e,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(e){this.chunks.push(e)},p.prototype.onEnd=function(e){e===u&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Deflate=p,t.deflate=m,t.deflateRaw=function(e,t){return(t=t||{}).raw=!0,m(e,t)},t.gzip=function(e,t){return(t=t||{}).gzip=!0,m(e,t)}},7888:(e,t,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(e){if(!(this instanceof d))return new d(e);this.options=r.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.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,t.windowBits);if(n!==a.Z_OK)throw new Error(s[n]);this.header=new u,i.inflateGetHeader(this.strm,this.header)}function f(e,t){var n=new d(t);if(n.push(e,!0),n.err)throw n.msg||s[n.err];return n.result}d.prototype.push=function(e,t){var n,s,c,u,d,f,p=this.strm,m=this.options.chunkSize,g=this.options.dictionary,h=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?p.input=o.binstring2buf(e):"[object ArrayBuffer]"===l.call(e)?p.input=new Uint8Array(e):p.input=e,p.next_in=0,p.avail_in=p.input.length;do{if(0===p.avail_out&&(p.output=new r.Buf8(m),p.next_out=0,p.avail_out=m),(n=i.inflate(p,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&g&&(f="string"==typeof g?o.string2buf(g):"[object ArrayBuffer]"===l.call(g)?new Uint8Array(g):g,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=m-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(e){this.chunks.push(e)},d.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},t.Inflate=d,t.inflate=f,t.inflateRaw=function(e,t){return(t=t||{}).raw=!0,f(e,t)},t.ungzip=f},12:(e,t)=>{"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var r in n)i(n,r)&&(e[r]=n[r])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var r={arraySet:function(e,t,n,i,r){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+i),r);else for(var o=0;o<i;o++)e[r+o]=t[n+o]},flattenChunks:function(e){var t,n,i,r,o,a;for(i=0,t=0,n=e.length;t<n;t++)i+=e[t].length;for(a=new Uint8Array(i),r=0,t=0,n=e.length;t<n;t++)o=e[t],a.set(o,r),r+=o.length;return a}},o={arraySet:function(e,t,n,i,r){for(var o=0;o<i;o++)e[r+o]=t[n+o]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,r)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,o))},t.setTyped(n)},3352:(e,t,n)=>{"use strict";var i=n(12),r=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(e){r=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){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(e,t){if(t<65537&&(e.subarray&&o||!e.subarray&&r))return String.fromCharCode.apply(null,i.shrinkBuf(e,t));for(var n="",a=0;a<t;a++)n+=String.fromCharCode(e[a]);return n}a[254]=a[254]=1,t.string2buf=function(e){var t,n,r,o,a,s=e.length,c=0;for(o=0;o<s;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),c+=n<128?1:n<2048?2:n<65536?3:4;for(t=new i.Buf8(c),a=0,o=0;a<c;o++)55296==(64512&(n=e.charCodeAt(o)))&&o+1<s&&56320==(64512&(r=e.charCodeAt(o+1)))&&(n=65536+(n-55296<<10)+(r-56320),o++),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},t.buf2binstring=function(e){return c(e,e.length)},t.binstring2buf=function(e){for(var t=new i.Buf8(e.length),n=0,r=t.length;n<r;n++)t[n]=e.charCodeAt(n);return t},t.buf2string=function(e,t){var n,i,r,o,s=t||e.length,u=new Array(2*s);for(i=0,n=0;n<s;)if((r=e[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&e[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)},t.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}},2696:e=>{"use strict";e.exports=function(e,t,n,i){for(var r=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{o=o+(r=r+t[i++]|0)|0}while(--a);r%=65521,o%=65521}return r|o<<16|0}},944:e=>{"use strict";e.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:e=>{"use strict";var t=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();e.exports=function(e,n,i,r){var o=t,a=r+i;e^=-1;for(var s=r;s<a;s++)e=e>>>8^o[255&(e^n[s])];return-1^e}},9379:(e,t,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,m=286,g=30,h=19,v=2*m+1,y=15,_=3,w=258,x=w+_+1,b=42,T=103,S=113,E=666;function I(e,t){return e.msg=c[t],t}function k(e){return(e<<1)-(e>4?9:0)}function O(e){for(var t=e.length;--t>=0;)e[t]=0}function C(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(r.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function L(e,t){o._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,C(e.strm)}function N(e,t){e.pending_buf[e.pending++]=t}function R(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function A(e,t){var n,i,r=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-x?e.strstart-(e.w_size-x):0,u=e.window,l=e.w_mask,d=e.prev,f=e.strstart+w,p=u[o+a-1],m=u[o+a];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do{if(u[(n=t)+a]===m&&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(e.match_start=t,a=i,i>=s)break;p=u[o+a-1],m=u[o+a]}}}while((t=d[t&l])>c&&0!=--r);return a<=e.lookahead?a:e.lookahead}function P(e){var t,n,i,o,c,u,l,d,f,p,m=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-x)){r.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;do{i=e.head[--t],e.head[t]=i>=m?i-m:0}while(--n);t=n=m;do{i=e.prev[--t],e.prev[t]=i>=m?i-m:0}while(--n);o+=m}if(0===e.strm.avail_in)break;if(u=e.strm,l=e.window,d=e.strstart+e.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),e.lookahead+=n,e.lookahead+e.insert>=_)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[c+_-1])&e.hash_mask,e.prev[c&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=c,c++,e.insert--,!(e.lookahead+e.insert<_)););}while(e.lookahead<x&&0!==e.strm.avail_in)}function M(e,t){for(var n,i;;){if(e.lookahead<x){if(P(e),e.lookahead<x&&t===u)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=_&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+_-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-x&&(e.match_length=A(e,n)),e.match_length>=_)if(i=o._tr_tally(e,e.strstart-e.match_start,e.match_length-_),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=_){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+_-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else i=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(L(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<_-1?e.strstart:_-1,4===t?(L(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(L(e,!1),0===e.strm.avail_out)?1:2}function W(e,t){for(var n,i,r;;){if(e.lookahead<x){if(P(e),e.lookahead<x&&t===u)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=_&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+_-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=_-1,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-x&&(e.match_length=A(e,n),e.match_length<=5&&(1===e.strategy||e.match_length===_&&e.strstart-e.match_start>4096)&&(e.match_length=_-1)),e.prev_length>=_&&e.match_length<=e.prev_length){r=e.strstart+e.lookahead-_,i=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-_),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=r&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+_-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=_-1,e.strstart++,i&&(L(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((i=o._tr_tally(e,0,e.window[e.strstart-1]))&&L(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=o._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<_-1?e.strstart:_-1,4===t?(L(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(L(e,!1),0===e.strm.avail_out)?1:2}function U(e,t,n,i,r){this.good_length=e,this.max_lazy=t,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*g+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*m+1),O(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new r.Buf16(2*m+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(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=f,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?b:S,e.adler=2===t.wrap?0:1,t.last_flush=u,o._tr_init(t),l):I(e,d)}function B(e){var t,n=D(e);return n===l&&((t=e.state).window_size=2*t.w_size,O(t.head),t.max_lazy_match=i[t.level].max_lazy,t.good_match=i[t.level].good_length,t.nice_match=i[t.level].nice_length,t.max_chain_length=i[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=_-1,t.match_available=0,t.ins_h=0),n}function q(e,t,n,i,o,a){if(!e)return d;var s=1;if(-1===t&&(t=6),i<0?(s=0,i=-i):i>15&&(s=2,i-=16),o<1||o>9||n!==p||i<8||i>15||t<0||t>9||a<0||a>4)return I(e,d);8===i&&(i=9);var c=new G;return e.state=c,c.strm=e,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=t,c.strategy=a,c.method=n,B(e)}i=[new U(0,0,0,0,(function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(P(e),0===e.lookahead&&t===u)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+n;if((0===e.strstart||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,L(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-x&&(L(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(L(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(L(e,!1),e.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)],t.deflateInit=function(e,t){return q(e,t,p,15,8,0)},t.deflateInit2=q,t.deflateReset=B,t.deflateResetKeep=D,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?d:(e.state.gzhead=t,l):d},t.deflate=function(e,t){var n,r,a,c;if(!e||!e.state||t>5||t<0)return e?I(e,d):d;if(r=e.state,!e.output||!e.input&&0!==e.avail_in||r.status===E&&4!==t)return I(e,0===e.avail_out?-5:d);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===b)if(2===r.wrap)e.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&&(e.adler=s(e.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,e.adler>>>16),R(r,65535&e.adler)),e.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&&(e.adler=s(e.adler,r.pending_buf,r.pending-a,a)),C(e),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&&(e.adler=s(e.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&&(e.adler=s(e.adler,r.pending_buf,r.pending-a,a)),C(e),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&&(e.adler=s(e.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&&(e.adler=s(e.adler,r.pending_buf,r.pending-a,a)),C(e),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&&(e.adler=s(e.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(e),r.pending+2<=r.pending_buf_size&&(N(r,255&e.adler),N(r,e.adler>>8&255),e.adler=0,r.status=S)):r.status=S),0!==r.pending){if(C(e),0===e.avail_out)return r.last_flush=-1,l}else if(0===e.avail_in&&k(t)<=k(n)&&4!==t)return I(e,-5);if(r.status===E&&0!==e.avail_in)return I(e,-5);if(0!==e.avail_in||0!==r.lookahead||t!==u&&r.status!==E){var m=2===r.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(P(e),0===e.lookahead)){if(t===u)return 1;break}if(e.match_length=0,n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(L(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(L(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(L(e,!1),0===e.strm.avail_out)?1:2}(r,t):3===r.strategy?function(e,t){for(var n,i,r,a,s=e.window;;){if(e.lookahead<=w){if(P(e),e.lookahead<=w&&t===u)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=_&&e.strstart>0&&(i=s[r=e.strstart-1])===s[++r]&&i===s[++r]&&i===s[++r]){a=e.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);e.match_length=w-(a-r),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=_?(n=o._tr_tally(e,1,e.match_length-_),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(L(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(L(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(L(e,!1),0===e.strm.avail_out)?1:2}(r,t):i[r.level].func(r,t);if(3!==m&&4!==m||(r.status=E),1===m||3===m)return 0===e.avail_out&&(r.last_flush=-1),l;if(2===m&&(1===t?o._tr_align(r):5!==t&&(o._tr_stored_block(r,0,0,!1),3===t&&(O(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),C(e),0===e.avail_out))return r.last_flush=-1,l}return 4!==t?l:r.wrap<=0?1:(2===r.wrap?(N(r,255&e.adler),N(r,e.adler>>8&255),N(r,e.adler>>16&255),N(r,e.adler>>24&255),N(r,255&e.total_in),N(r,e.total_in>>8&255),N(r,e.total_in>>16&255),N(r,e.total_in>>24&255)):(R(r,e.adler>>>16),R(r,65535&e.adler)),C(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?l:1)},t.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==b&&69!==t&&73!==t&&91!==t&&t!==T&&t!==S&&t!==E?I(e,d):(e.state=null,t===S?I(e,-3):l):d},t.deflateSetDictionary=function(e,t){var n,i,o,s,c,u,f,p,m=t.length;if(!e||!e.state)return d;if(2===(s=(n=e.state).wrap)||1===s&&n.status!==b||n.lookahead)return d;for(1===s&&(e.adler=a(e.adler,t,m,0)),n.wrap=0,m>=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,t,m-n.w_size,n.w_size,0),t=p,m=n.w_size),c=e.avail_in,u=e.next_in,f=e.input,e.avail_in=m,e.next_in=0,e.input=t,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,e.next_in=u,e.input=f,e.avail_in=c,n.wrap=s,l},t.deflateInfo="pako deflate (from Nodeca project)"},1112:e=>{"use strict";e.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:e=>{"use strict";e.exports=function(e,t){var n,i,r,o,a,s,c,u,l,d,f,p,m,g,h,v,y,_,w,x,b,T,S,E,I;n=e.state,i=e.next_in,E=e.input,r=i+(e.avail_in-5),o=e.next_out,I=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),c=n.dmax,u=n.wsize,l=n.whave,d=n.wnext,f=n.window,p=n.hold,m=n.bits,g=n.lencode,h=n.distcode,v=(1<<n.lenbits)-1,y=(1<<n.distbits)-1;e:do{m<15&&(p+=E[i++]<<m,m+=8,p+=E[i++]<<m,m+=8),_=g[p&v];t:for(;;){if(p>>>=w=_>>>24,m-=w,0==(w=_>>>16&255))I[o++]=65535&_;else{if(!(16&w)){if(0==(64&w)){_=g[(65535&_)+(p&(1<<w)-1)];continue t}if(32&w){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}x=65535&_,(w&=15)&&(m<w&&(p+=E[i++]<<m,m+=8),x+=p&(1<<w)-1,p>>>=w,m-=w),m<15&&(p+=E[i++]<<m,m+=8,p+=E[i++]<<m,m+=8),_=h[p&y];n:for(;;){if(p>>>=w=_>>>24,m-=w,!(16&(w=_>>>16&255))){if(0==(64&w)){_=h[(65535&_)+(p&(1<<w)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(b=65535&_,m<(w&=15)&&(p+=E[i++]<<m,(m+=8)<w&&(p+=E[i++]<<m,m+=8)),(b+=p&(1<<w)-1)>c){e.msg="invalid distance too far back",n.mode=30;break e}if(p>>>=w,m-=w,b>(w=o-a)){if((w=b-w)>l&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}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=m>>3,p&=(1<<(m-=x<<3))-1,e.next_in=i,e.next_out=o,e.avail_in=i<r?r-i+5:5-(i-r),e.avail_out=o<s?s-o+257:257-(o-s),n.hold=p,n.bits=m}},7040:(e,t,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,m=592;function g(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<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(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=l,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new i.Buf32(p),t.distcode=t.distdyn=new i.Buf32(m),t.sane=1,t.back=-1,c):u}function y(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,v(e)):u}function _(e,t){var n,i;return e&&e.state?(i=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?u:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=n,i.wbits=t,y(e))):u}function w(e,t){var n,i;return e?(i=new h,e.state=i,i.window=null,(n=_(e,t))!==c&&(e.state=null),n):u}var x,b,T=!0;function S(e){if(T){var t;for(x=new i.Buf32(512),b=new i.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,x,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,b,0,e.work,{bits:5}),T=!1}e.lencode=x,e.lenbits=9,e.distcode=b,e.distbits=5}function E(e,t,n,r){var o,a=e.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,t,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,t,n-r,o,a.wnext),(r-=o)?(i.arraySet(a.window,t,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}t.inflateReset=y,t.inflateReset2=_,t.inflateResetKeep=v,t.inflateInit=function(e){return w(e,15)},t.inflateInit2=w,t.inflate=function(e,t){var n,p,m,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),q=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return u;(n=e.state).mode===d&&(n.mode=13),v=e.next_out,m=e.output,_=e.avail_out,h=e.next_in,p=e.input,y=e.avail_in,w=n.hold,x=n.bits,b=y,T=_,W=c;e:for(;;)switch(n.mode){case l:if(0===n.wrap){n.mode=13;break}for(;x<16;){if(0===y)break e;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){e.msg="incorrect header check",n.mode=f;break}if(8!=(15&w)){e.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){e.msg="invalid window size",n.mode=f;break}n.dmax=1<<M,e.adler=n.check=1,n.mode=512&w?10:d,w=0,x=0;break;case 2:for(;x<16;){if(0===y)break e;y--,w+=p[h++]<<x,x+=8}if(n.flags=w,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=f;break}if(57344&n.flags){e.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 e;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 e;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 e;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 e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===y)break e;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 e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===y)break e;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 e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;x<16;){if(0===y)break e;y--,w+=p[h++]<<x,x+=8}if(w!==(65535&n.check)){e.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),e.adler=n.check=0,n.mode=d;break;case 10:for(;x<32;){if(0===y)break e;y--,w+=p[h++]<<x,x+=8}e.adler=n.check=g(w),w=0,x=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=v,e.avail_out=_,e.next_in=h,e.avail_in=y,n.hold=w,n.bits=x,2;e.adler=n.check=1,n.mode=d;case d:if(5===t||6===t)break e;case 13:if(n.last){w>>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(0===y)break e;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===t){w>>>=2,x-=2;break e}break;case 2:n.mode=17;break;case 3:e.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 e;y--,w+=p[h++]<<x,x+=8}if((65535&w)!=(w>>>16^65535)){e.msg="invalid stored block lengths",n.mode=f;break}if(n.length=65535&w,w=0,x=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(I=n.length){if(I>y&&(I=y),I>_&&(I=_),0===I)break e;i.arraySet(m,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 e;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){e.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 e;y--,w+=p[h++]<<x,x+=8}n.lens[q[n.have++]]=7&w,w>>>=3,x-=3}for(;n.have<19;)n.lens[q[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){e.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 e;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 e;y--,w+=p[h++]<<x,x+=8}if(w>>>=C,x-=C,0===n.have){e.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 e;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 e;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){e.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]){e.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){e.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){e.msg="invalid distances set",n.mode=f;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(y>=6&&_>=258){e.next_out=v,e.avail_out=_,e.next_in=h,e.avail_in=y,n.hold=w,n.bits=x,a(e,T),v=e.next_out,m=e.output,_=e.avail_out,h=e.next_in,p=e.input,y=e.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 e;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 e;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){e.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 e;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 e;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 e;y--,w+=p[h++]<<x,x+=8}w>>>=R,x-=R,n.back+=R}if(w>>>=C,x-=C,n.back+=C,64&L){e.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 e;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){e.msg="invalid distance too far back",n.mode=f;break}n.mode=25;case 25:if(0===_)break e;if(I=T-_,n.offset>I){if((I=n.offset-I)>n.whave&&n.sane){e.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=m,k=v-n.offset,I=n.length;I>_&&(I=_),_-=I,n.length-=I;do{m[v++]=O[k++]}while(--I);0===n.length&&(n.mode=21);break;case 26:if(0===_)break e;m[v++]=n.length,_--,n.mode=21;break;case 27:if(n.wrap){for(;x<32;){if(0===y)break e;y--,w|=p[h++]<<x,x+=8}if(T-=_,e.total_out+=T,n.total+=T,T&&(e.adler=n.check=n.flags?o(n.check,m,T,v-T):r(n.check,m,T,v-T)),T=_,(n.flags?w:g(w))!==n.check){e.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 e;y--,w+=p[h++]<<x,x+=8}if(w!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=f;break}w=0,x=0}n.mode=29;case 29:W=1;break e;case f:W=-3;break e;case 31:return-4;default:return u}return e.next_out=v,e.avail_out=_,e.next_in=h,e.avail_in=y,n.hold=w,n.bits=x,(n.wsize||T!==e.avail_out&&n.mode<f&&(n.mode<27||4!==t))&&E(e,e.output,e.next_out,T-e.avail_out)?(n.mode=31,-4):(b-=e.avail_in,T-=e.avail_out,e.total_in+=b,e.total_out+=T,n.total+=T,n.wrap&&T&&(e.adler=n.check=n.flags?o(n.check,m,T,e.next_out-T):r(n.check,m,T,e.next_out-T)),e.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===t)&&W===c&&(W=-5),W)},t.inflateEnd=function(e){if(!e||!e.state)return u;var t=e.state;return t.window&&(t.window=null),e.state=null,c},t.inflateGetHeader=function(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?u:(n.head=t,t.done=!1,c):u},t.inflateSetDictionary=function(e,t){var n,i=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?u:11===n.mode&&r(1,t,i,0)!==n.check?-3:E(e,t,i,i)?(n.mode=31,-4):(n.havedict=1,c):u},t.inflateInfo="pako inflate (from Nodeca project)"},6120:(e,t,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];e.exports=function(e,t,n,c,u,l,d,f){var p,m,g,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[t[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===e||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!==t[n+S]&&(d[W[t[n+S]]++]=S);if(0===e?(A=U=d,y=19):1===e?(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,g=-1,h=(N=1<<k)-1,1===e&&N>852||2===e&&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=m=1<<O;do{u[v+(R>>C)+(m-=p)]=_<<24|w<<16|x|0}while(0!==m);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=t[n+d[S]]}if(T>k&&(R&h)!==g){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===e&&N>852||2===e&&N>592)return 1;u[g=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:e=>{"use strict";e.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:(e,t,n)=>{"use strict";var i=n(12);function r(e){for(var t=e.length;--t>=0;)e[t]=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],m=new Array(576);r(m);var g=new Array(60);r(g);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(e,t,n,i,r){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=i,this.max_length=r,this.has_stree=e&&e.length}function S(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function E(e){return e<256?h[e]:h[256+(e>>>7)]}function I(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function k(e,t,n){e.bi_valid>u-n?(e.bi_buf|=t<<e.bi_valid&65535,I(e,e.bi_buf),e.bi_buf=t>>u-e.bi_valid,e.bi_valid+=n-u):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function O(e,t,n){k(e,n[2*t],n[2*t+1])}function C(e,t){var n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}function L(e,t,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<=t;r++){var s=e[2*r+1];0!==s&&(e[2*r]=C(o[s]++,s))}}function N(e){var t;for(t=0;t<a;t++)e.dyn_ltree[2*t]=0;for(t=0;t<s;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function R(e){e.bi_valid>8?I(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function A(e,t,n,i){var r=2*t,o=2*n;return e[r]<e[o]||e[r]===e[o]&&i[t]<=i[n]}function P(e,t,n){for(var i=e.heap[n],r=n<<1;r<=e.heap_len&&(r<e.heap_len&&A(t,e.heap[r+1],e.heap[r],e.depth)&&r++,!A(t,i,e.heap[r],e.depth));)e.heap[n]=e.heap[r],n=r,r<<=1;e.heap[n]=i}function M(e,t,n){var i,r,a,s,c=0;if(0!==e.last_lit)do{i=e.pending_buf[e.d_buf+2*c]<<8|e.pending_buf[e.d_buf+2*c+1],r=e.pending_buf[e.l_buf+c],c++,0===i?O(e,r,t):(O(e,(a=v[r])+o+1,t),0!==(s=l[a])&&k(e,r-=y[a],s),O(e,a=E(--i),n),0!==(s=d[a])&&k(e,i-=b[a],s))}while(c<e.last_lit);O(e,256,t)}function W(e,t){var n,i,r,o=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,u=t.stat_desc.elems,l=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<u;n++)0!==o[2*n]?(e.heap[++e.heap_len]=l=n,e.depth[n]=0):o[2*n+1]=0;for(;e.heap_len<2;)o[2*(r=e.heap[++e.heap_len]=l<2?++l:0)]=1,e.depth[r]=0,e.opt_len--,s&&(e.static_len-=a[2*r+1]);for(t.max_code=l,n=e.heap_len>>1;n>=1;n--)P(e,o,n);r=u;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],P(e,o,1),i=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=i,o[2*r]=o[2*n]+o[2*i],e.depth[r]=(e.depth[n]>=e.depth[i]?e.depth[n]:e.depth[i])+1,o[2*n+1]=o[2*i+1]=r,e.heap[1]=r++,P(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,i,r,o,a,s,u=t.dyn_tree,l=t.max_code,d=t.stat_desc.static_tree,f=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,m=t.stat_desc.extra_base,g=t.stat_desc.max_length,h=0;for(o=0;o<=c;o++)e.bl_count[o]=0;for(u[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(o=u[2*u[2*(i=e.heap[n])+1]+1]+1)>g&&(o=g,h++),u[2*i+1]=o,i>l||(e.bl_count[o]++,a=0,i>=m&&(a=p[i-m]),s=u[2*i],e.opt_len+=s*(o+a),f&&(e.static_len+=s*(d[2*i+1]+a)));if(0!==h){do{for(o=g-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[g]--,h-=2}while(h>0);for(o=g;0!==o;o--)for(i=e.bl_count[o];0!==i;)(r=e.heap[--n])>l||(u[2*r+1]!==o&&(e.opt_len+=(o-u[2*r+1])*u[2*r],u[2*r+1]=o),i--)}}(e,t),L(o,l,e.bl_count)}function U(e,t,n){var i,r,o=-1,a=t[1],s=0,c=7,u=4;for(0===a&&(c=138,u=3),t[2*(n+1)+1]=65535,i=0;i<=n;i++)r=a,a=t[2*(i+1)+1],++s<c&&r===a||(s<u?e.bl_tree[2*r]+=s:0!==r?(r!==o&&e.bl_tree[2*r]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.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(e,t,n){var i,r,o=-1,a=t[1],s=0,c=7,u=4;for(0===a&&(c=138,u=3),i=0;i<=n;i++)if(r=a,a=t[2*(i+1)+1],!(++s<c&&r===a)){if(s<u)do{O(e,r,e.bl_tree)}while(0!=--s);else 0!==r?(r!==o&&(O(e,r,e.bl_tree),s--),O(e,16,e.bl_tree),k(e,s-3,2)):s<=10?(O(e,17,e.bl_tree),k(e,s-3,3)):(O(e,18,e.bl_tree),k(e,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(e,t,n,r){k(e,0+(r?1:0),3),function(e,t,n,r){R(e),I(e,n),I(e,~n),i.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n)}t._tr_init=function(e){D||(function(){var e,t,n,i,r,o=new Array(c+1);for(n=0,i=0;i<28;i++)for(y[i]=n,e=0;e<1<<l[i];e++)v[n++]=i;for(v[n-1]=i,r=0,i=0;i<16;i++)for(b[i]=r,e=0;e<1<<d[i];e++)h[r++]=i;for(r>>=7;i<s;i++)for(b[i]=r<<7,e=0;e<1<<d[i]-7;e++)h[256+r++]=i;for(t=0;t<=c;t++)o[t]=0;for(e=0;e<=143;)m[2*e+1]=8,e++,o[8]++;for(;e<=255;)m[2*e+1]=9,e++,o[9]++;for(;e<=279;)m[2*e+1]=7,e++,o[7]++;for(;e<=287;)m[2*e+1]=8,e++,o[8]++;for(L(m,287,o),e=0;e<s;e++)g[2*e+1]=5,g[2*e]=C(e,5);_=new T(m,l,257,a,c),w=new T(g,d,0,s,c),x=new T(new Array(0),f,0,19,7)}(),D=!0),e.l_desc=new S(e.dyn_ltree,_),e.d_desc=new S(e.dyn_dtree,w),e.bl_desc=new S(e.bl_tree,x),e.bi_buf=0,e.bi_valid=0,N(e)},t._tr_stored_block=B,t._tr_flush_block=function(e,t,n,i){var r,a,s=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<o;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),W(e,e.l_desc),W(e,e.d_desc),s=function(e){var t;for(U(e,e.dyn_ltree,e.l_desc.max_code),U(e,e.dyn_dtree,e.d_desc.max_code),W(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*p[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),r=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!==t?B(e,t,n,i):4===e.strategy||a===r?(k(e,2+(i?1:0),3),M(e,m,g)):(k(e,4+(i?1:0),3),function(e,t,n,i){var r;for(k(e,t-257,5),k(e,n-1,5),k(e,i-4,4),r=0;r<i;r++)k(e,e.bl_tree[2*p[r]+1],3);G(e,e.dyn_ltree,t-1),G(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),M(e,e.dyn_ltree,e.dyn_dtree)),N(e),i&&R(e)},t._tr_tally=function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(v[n]+o+1)]++,e.dyn_dtree[2*E(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){k(e,2,3),O(e,256,m),function(e){16===e.bi_valid?(I(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},6092:e=>{"use strict";e.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}}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{"use strict";n.r(i),n.d(i,{Core:()=>z,EventHub:()=>c.i,I18n:()=>V});var e=n(8856),t=(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),m=n(4872),g=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(e){return(0,h.uK)().offline_survey_id&&(0,a.q_)(e.nodes).autoCpltGroups.forEach((e=>{e.data.forEach((e=>{e.icon=(0,_.G)(e.icon)}))})),e}function k(t){t.handleEvents={async handleLangChange(n){await(0,u.Sk)(n.locale,!1)||(0,e.e)(t,{showInitLangSelect:!1})},async handleNextClick(){t.nextLoading||((0,y.ye)(t,!0),await(0,e.E3)().fetchSurveyState(),(0,e.W4)().app.gotoSurveyPage((0,h.uK)()),(0,y.ye)(t,!1))}}}async function O(){if((0,e.E3)().startState)return(0,e.E3)().startState;const n=await async function(){const t=await(0,e.W4)().dev.getCustomSurveyMeta();if(t)return t;{const t=(0,e.E3)().sid;return(0,l.U7)(),E||(0,g.qU)(t)}}();!function(t){if((0,e.E3)().preview)return void(E=t);if(E)return;E=t;const{collector:{channel_configs:n}}=t,i=(0,e.W4)().name,r=n.find((e=>e.type===i));if(r){if(!r.allow_response)throw(0,e.E3)().error((0,g.O)(g.FW.interviewee_invalid_error)),new Error(g.FW.interviewee_invalid_error);E.channel=r,(0,e.W4)().auth.authorize(E)}else E.channel={type:i}}(n),await(0,e.W4)().auth.init(n);const i=await async function(t){const n=await(0,e.W4)().dev.getCustomSurveyPayload();if(n)return{cfpd:n,surveyMeta:t};{let n;try{n=await(t.start_auto?(0,g.kj)(t.diagram_url,{type:"GET"},!0):(0,g.kj)(t.smaller_diagram_url,{type:"GET"},!0))}catch(t){throw(0,e.E3)().error((0,u.GS)(f.CW.global.downloadError)),t}const i=await(0,m.K)(n);return function(t){if(!t.version)return(0,e.E3)().error((0,u.GS)(f.CW.global.upgrade)),void(0,e.E3)().customAbort();t.version<2&&t.nodes.forEach((e=>{let t=[];e.options&&(t=t.concat(e.options)),(0,w.yy)(e)&&(t=t.concat(e.otherOptions)),t.forEach((e=>{10===e.mutexNumber&&(e.mutexNumber=-1)}))}))}(i),{surveyMeta:t,cfpd:I(i)}}}(n),h=await async function(t){var n;const{surveyMeta:i,cfpd:r}=t,{mediaLibrary:s,surveyId:c,disabledLangs:l,testCases:f,variables:p}=r,m=(0,o.c5)(r.nodes,r.nodeGroups),g=(0,a.q_)(m);let h=[];r.langPack?(r.langPack=function(e){if(e instanceof Array)return e;{const t=[];return Object.keys(e).forEach((n=>{const i=e[n];t.push({id:"",locale:n,content:i})})),t}}(r.langPack),h=r.langPack.map((e=>({locale:e.locale,content:e.content})))):i.langs&&(h=i.langs),h=h.filter((e=>e.locale!==g.currentLang));const v=g.currentLang,y=[v,...h.map((e=>e.locale))],_=(null!==(n=null===S.c||void 0===S.c?void 0:S.c.langTable)&&void 0!==n?n:[]).filter((e=>y.includes(e.locale)&&!(null==l?void 0:l.includes(e.locale)))),w=await(0,u.Mh)(_,v),x=!!(0,e.W4)().storage.get("lang-resume");x&&(0,e.W4)().storage.remove("lang-resume"),(0,u.YP)(w);const b={imageList:s.imageList,videoList:s.videoList,nodeList:m,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,uniquenessVerification:r.uniquenessVerification};return w===v||(g.i18n&&(0,d.QJ)(g,g.i18n[w]),p.forEach((e=>{e.i18n&&(0,d.gz)(e,e.i18n[w])}))),b}(i),y=await async function(t){if((0,e.E3)().startState)return(0,e.E3)().startState;const{imageList:n,nodeList:i,theme:r,variables:o,varStyles:l,surveyId:d,langResume:p,nodeGroups:m}=t,g=(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}=g;(0,b.a)(t.presetRichStyles);const R={imageList:n,variables:o,varStyles:l};(0,v.YV)(R);const A=await(0,s.Q9)({},{origin:g}),{interviewee:P}=E,M=P?P.raw_data:(0,e.W4)().auth.userInfo||{},W={...R,embedApis:t.embedApis,nodeGroups:m,origin:g,publishedAt:t.publishedAt,type:g.type,nodeName:g.nodeName,langResume:p,langTable:t.langTable,eventHub:c.i,language:t.language||"en_us",layout:L,startNode:g,sid:(0,e.E3)().sid,noWxShare:I,preview:(0,e.E3)().preview,images:A,surveyId:d,...(0,x.Y)(g),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:t,startAuto:S||p,showInitLangSelect:(0,u.Mt)(N,t.langTable)};return k(W),W}(h);return await async function(e){const n={state:e},{origin:i}=e,{startName:o,qsnrName:a,questionText:s,describe:u,template:l}=i;e.title=await(0,t.qQ)((0,r.q)(o||a),n),e.summary=await(0,t.qQ)(s,n),e.description=await(0,t.qQ)(u,n),e.template=await(0,T.m)(l,n.state),(0,p.y)(e.theme),(0,c.U3)({origin:i})}(y),await(0,e.W4)().hook.afterFetchStart(y),(y.startAuto||(0,e.W4)().dev.autoRun)&&(y.hidden=!0,(0,e.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:e=>e,getCustomSurveyPayload:R,getCustomSurveyMeta:R,local:!1,debug:!1,autoRun:!1,realtime:!1,infer:!1},app:{reload(){},openWebLink(){},canHandleReward:()=>!1,getRewardUrl(e){const t=(0,h.SC)(e);return(0,h.Ww)("https:/live.choiceform.com/reward",t)}},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(e,t){if(t){let n=t?(0,u.At)(e):e;return t&&Object.keys(t).forEach((e=>{n=n.replace(new RegExp("{".concat(e,"}"),"g"),(0,N.Wo)(t[e]))})),n}return e}},ui:{setGlobalStyle(){},setVarStyle(){},loadNodeComponent:R,loadUiEntryTemplates:R,setPresetStyle(){}}};function P(e,t){Object.keys(t).forEach((n=>{const i=t[n];"object"==typeof i?e[n]?null!==i&&P(e[n],i):e[n]=i:void 0!==i&&(e[n]=i)}))}function M(e){return P(A,e),A}var W=n(560);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(e){console.info(e)}};var G=n(1344),D=n(1548),B=n(5684),q=n(4316),F=n(8792);function j(){if(!z.initialized)throw new Error("CCCore not yet initialized")}const z={releaseVersion:"3.6.74",releaseDate:"2024-8-15",cfpd:S.c,eventHub:c.i,notifySuspended:!1,theme:(0,p.U)(),util:{convertVarStyle:v.UJ,getTaskInfo:D.S,getAnswer:B.cA,addStartStateDynamics(e){k(e)},addSurveyStateDynamics(e){(0,C.Gg)(e)},addNodeDynamics(e){(0,a.CY)(e)},addOptionDynamics(e){(0,q.yt)(e)},extendImageListGetter(e){(0,v.sf)(e)},loadFakeServers:e=>(0,F.U)(e,!1)},registerEnv(t){const n=M(t);(0,e.oB)(n),z.env=n},async setup(t){if(z.initialized)return z;if(t.dynamic){if(!t.templatePath||!t.treeUrl)throw new Error("setup error, you configed your client as dynanmic, so must provide tempaltePath and treeUrl");if(!t.treeUrl.startsWith("/"))throw new Error("setup error, treeUrl must be absolute path")}Object.assign(z,function(e){const t={...U.hostConfig,...e.hostConfig};return Object.assign(U,{...e,hostConfig:t}),U}(t));const n=(0,h.uK)(),i=n.sid;if(!i&&!(0,e.W4)().dev.realtime)throw new Error("setup error, must provide sid");z.sid=i,z.realTimePreview=(0,e.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=e=>{o(e),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=e=>{z.startState||z.rewardState||z.setTheme((0,p.U)()),s(e),z.crashed=!0};const l=z.notify;z.notify=(e,t)=>{z.notifySuspended||(z.startState||z.rewardState||z.setTheme((0,p.U)()),l(e,t))},(0,e.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,e.W4)().hook.beforeSetupEnd(z),(0,e.oV)(z),z.initialized=!0,await(0,e.W4)().hook.afterSetup(z),await(0,e.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 t=await O();return t&&(t.core=z,z.startState=t,(0,e.W4)().hook.onTitleChange(t.title),c.i.trigger("SET_PROPS")),t},async fetchSurveyState(){j(),z.startState&&(0,y.ye)(z.startState,!0);const t=await(0,C.q0)();return t&&(t.core=z,z.surveyState=t,(0,y.ye)(z.startState,!1),(0,e.W4)().hook.onTitleChange(t.title),c.i.trigger("SET_PROPS")),t},async fetchRewardState(){j();const t=await(0,L.uO)();return t&&(t.core=z,z.rewardState=t,(0,e.W4)().hook.onTitleChange(t.quesTitle),c.i.trigger("SET_PROPS")),t},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})})();