diff --git a/.gitignore b/.gitignore index 89d4009..672f5d6 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,5 @@ unpackage/dist/dev/ *.pyc config/baidu.json ckpts/* +config/lamWeChat.db +config/weChat.yaml diff --git a/config/weChat.yaml.template b/config/weChat.yaml.template new file mode 100644 index 0000000..c0d07c5 --- /dev/null +++ b/config/weChat.yaml.template @@ -0,0 +1,116 @@ +wechat: + appid: wxa50ed345b253964d #公众号appid + secret: 327ac9ba06d214d2fcfe2e9ed0520684 #公众号秘钥 + serverAddress: http://139.9.53.208/ #服务器地址 微信公众配置地址的前缀 + freeSize: 3 #免费使用次数 + isEnterprise: true #是否为企业微信 + adminNo: b0pOVFM2dnRsZkdLeWl2Zlk2bG9MTFNjUTNGUQ== #管理员微信编号启动会后可发送我的编号获取 + adminWeChat: yanlang123456 #管理员微信号 + access_token: '' #不用填系统用于保存临时值 + access_token_expires_at: 0 #默认0 + commands: #功能列表 + 图生视频: + filename: img2video.json #功能流程图json文件 + params: #参数列表 + image: #参数名称(几个固定参数名称必须如下:图片:image 随机种子:seed 正向提示词:prompt 反向提示词:negative) + isRequired: true #是否必填 + keys: #参数对应json中对应的key + - '38' + - inputs + - image_path + zhName: 图片 #参数中文名称 + motion_bucket: + default: 127 + isRequired: true + keys: + - '12' + - inputs + - motion_bucket_id + max: 200 + min: 0 + type: number + zhName: 运动量 + seed: + default: -1 + isRequired: true + keys: + - '3' + - inputs + - seed + type: text + zhName: 随机种子 + replyText: 请发送您的图片发送“ok”开始任务,如:“ok” #指令说明回复 + 文生图: + filename: text2img.json + params: + ckpt: + isRequired: false + keys: + - '4' + - inputs + - ckpt_name + options: #选项参数 + 冷却混合料SD1.5: chilloutmix_NiPrunedFp32Fix.safetensors #中文名称:英文名称 + 卡通动画片SD1.5: yamer_Cartoon_xenoArcadiaCD.safetensors + 无法控制的SDXL: juggernautXL_version6Rundiffusion.safetensors + 梦想塑造者SD1.5: dreamshaper_8.safetensors + zhName: 基础模型 + height: + default: 512 #默认值 + isRequired: false + keys: + - '14' + - inputs + - height + max: 1024 #最大值 + min: 512 #最小值 + type: number #类型(输入型参数目前只支持 number/text) + zhName: 高度 + lora: + isRequired: false + keys: + - '10' + - inputs + - lora_name + options: + SD1.5-LCM加速: lcm-lora-sdv1-5.safetensors + SDXL-LCM加速: lcm-lora-sdxl.safetensors + zhName: LoRA + negative: + isRequired: false + keys: + - '7' + - inputs + - text + zhName: 反向提示词 + prompt: + isRequired: true + keys: + - '20' + - inputs + - text_trans + zhName: 正向提示词 + seed: + default: -1 + isRequired: true + keys: + - '3' + - inputs + - seed + type: text + zhName: 随机种子 + width: + default: 512 + isRequired: false + keys: + - '14' + - inputs + - width + max: 1024 + min: 512 + type: number + zhName: 宽度 + replyText: 请发送您的中文或英文提示词用“ok”结束,如:“一只小狗ok” + query_commands: #查询指令(固定) + - 查询排队情况 + - 我的编号 diff --git a/config/workflow/img2video.json b/config/workflow/img2video.json new file mode 100644 index 0000000..c62c12e --- /dev/null +++ b/config/workflow/img2video.json @@ -0,0 +1,142 @@ +{ + "3": { + "inputs": { + "seed": 801899397770458, + "steps": 4, + "cfg": 1, + "sampler_name": "lcm", + "scheduler": "karras", + "denoise": 1, + "model": [ + "14", + 0 + ], + "positive": [ + "12", + 0 + ], + "negative": [ + "12", + 1 + ], + "latent_image": [ + "12", + 2 + ] + }, + "class_type": "KSampler" + }, + "8": { + "inputs": { + "samples": [ + "3", + 0 + ], + "vae": [ + "15", + 2 + ] + }, + "class_type": "VAEDecode" + }, + "12": { + "inputs": { + "width": [ + "30", + 0 + ], + "height": [ + "30", + 1 + ], + "video_frames": 25, + "motion_bucket_id": 127, + "fps": 6, + "augmentation_level": 0, + "clip_vision": [ + "15", + 1 + ], + "init_image": [ + "38", + 0 + ], + "vae": [ + "15", + 2 + ] + }, + "class_type": "SVD_img2vid_Conditioning" + }, + "14": { + "inputs": { + "min_cfg": 1, + "model": [ + "33", + 0 + ] + }, + "class_type": "VideoLinearCFGGuidance" + }, + "15": { + "inputs": { + "ckpt_name": "AnimateLCM-SVD-xt-1-1_fp16_comfy.safetensors" + }, + "class_type": "ImageOnlyCheckpointLoader" + }, + "25": { + "inputs": { + "frame_rate": 8, + "loop_count": 0, + "filename_prefix": "AnimateDiff", + "format": "video/h265-mp4", + "pingpong": false, + "save_image": true, + "Sync playback": null, + "images": [ + "8", + 0 + ] + }, + "class_type": "VHS_VideoCombine" + }, + "30": { + "inputs": { + "image": [ + "31", + 0 + ] + }, + "class_type": "Get image size" + }, + "31": { + "inputs": { + "upscale_method": "nearest-exact", + "scale_by": 0.7000000000000001, + "image": [ + "38", + 0 + ] + }, + "class_type": "ImageScaleBy" + }, + "33": { + "inputs": { + "lora_name": "lcm-lora-sdv1-5.safetensors", + "strength_model": 1, + "model": [ + "15", + 0 + ] + }, + "class_type": "LoraLoaderModelOnly" + }, + "38": { + "inputs": { + "image_path": "http://127.0.0.1:8188/view?filename=ComfyUI_00402_.png&type=input&subfolder=&rand=0.9232966295130483", + "RGBA": "false", + "filename_text_extension": "true" + }, + "class_type": "LamLoadPathImage" + } + } \ No newline at end of file diff --git a/config/workflow/text2img.json b/config/workflow/text2img.json new file mode 100644 index 0000000..ddbf516 --- /dev/null +++ b/config/workflow/text2img.json @@ -0,0 +1,125 @@ +{ + "3": { + "inputs": { + "seed": 1068764177227380, + "steps": 5, + "cfg": 1, + "sampler_name": "lcm", + "scheduler": "normal", + "denoise": 1, + "model": [ + "10", + 0 + ], + "positive": [ + "6", + 0 + ], + "negative": [ + "7", + 0 + ], + "latent_image": [ + "5", + 0 + ] + }, + "class_type": "KSampler" + }, + "4": { + "inputs": { + "ckpt_name": "dreamshaper_8.safetensors" + }, + "class_type": "CheckpointLoaderSimple" + }, + "5": { + "inputs": { + "width": [ + "14", + 0 + ], + "height": [ + "14", + 1 + ], + "batch_size": 1 + }, + "class_type": "EmptyLatentImage" + }, + "6": { + "inputs": { + "text": [ + "20", + 0 + ], + "clip": [ + "10", + 1 + ] + }, + "class_type": "CLIPTextEncode" + }, + "7": { + "inputs": { + "text": "undefined", + "clip": [ + "4", + 1 + ] + }, + "class_type": "CLIPTextEncode" + }, + "8": { + "inputs": { + "samples": [ + "3", + 0 + ], + "vae": [ + "4", + 2 + ] + }, + "class_type": "VAEDecode" + }, + "9": { + "inputs": { + "filename_prefix": "ComfyUI", + "images": [ + "8", + 0 + ] + }, + "class_type": "SaveImage" + }, + "10": { + "inputs": { + "lora_name": "lcm-lora-sdv1-5.safetensors", + "strength_model": 1, + "strength_clip": 1, + "model": [ + "4", + 0 + ], + "clip": [ + "4", + 1 + ] + }, + "class_type": "LoraLoader" + }, + "14": { + "inputs": { + "aspect_ratio": "1152×896 ∣ 9:7", + "width": 512, + "height": 512 + }, + "class_type": "AspectRatio" + }, + "20": { + "inputs": { + "text_trans": "一只小狗" + }, + "class_type": "ZhPromptTranslator" + } +} \ No newline at end of file diff --git a/docs/wechat/admin_qr_code.jpg b/docs/wechat/admin_qr_code.jpg new file mode 100644 index 0000000..ce8c21f Binary files /dev/null and b/docs/wechat/admin_qr_code.jpg differ diff --git a/docs/wechat/app.png b/docs/wechat/app.png new file mode 100644 index 0000000..5c146a7 Binary files /dev/null and b/docs/wechat/app.png differ diff --git a/docs/wechat/app2.png b/docs/wechat/app2.png new file mode 100644 index 0000000..dd3ad98 Binary files /dev/null and b/docs/wechat/app2.png differ diff --git a/docs/wechat/video_play.jpeg b/docs/wechat/video_play.jpeg new file mode 100644 index 0000000..10f3f45 Binary files /dev/null and b/docs/wechat/video_play.jpeg differ diff --git a/js/EasyPromptSelecto.js b/js/EasyPromptSelecto.js index 86c8596..8571ca4 100644 --- a/js/EasyPromptSelecto.js +++ b/js/EasyPromptSelecto.js @@ -292,6 +292,7 @@ app.registerExtension({ if(cat_values.join(',')!=Object.keys(pb_cache[prompt_type.value]).join(',')){ cat_values=Object.keys(pb_cache[prompt_type.value]) cat_value='' + category.value=cat_values[0] } return cat_values; } diff --git a/js/static/css/app.css b/js/static/css/app.css new file mode 100644 index 0000000..bc2db63 --- /dev/null +++ b/js/static/css/app.css @@ -0,0 +1,7319 @@ +@charset "UTF-8"; + +html, +body { + width: 100%; + height: 100% +} + +input::-ms-clear, +input::-ms-reveal { + display: none +} + +*, +*:before, +*:after { + box-sizing: border-box +} + +html { + font-family: sans-serif; + line-height: 1.15; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; + -ms-overflow-style: scrollbar; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0) +} + +@-ms-viewport { + width: device-width +} + +body { + margin: 0 +} + +[tabindex="-1"]:focus { + outline: none +} + +hr { + box-sizing: content-box; + height: 0; + overflow: visible +} + +h1, +h2, +h3, +h4, +h5, +h6 { + margin-top: 0; + margin-bottom: .5em; + font-weight: 500 +} + +p { + margin-top: 0; + margin-bottom: 1em +} + +abbr[title], +abbr[data-original-title] { + -webkit-text-decoration: underline dotted; + text-decoration: underline; + text-decoration: underline dotted; + border-bottom: 0; + cursor: help +} + +address { + margin-bottom: 1em; + font-style: normal; + line-height: inherit +} + +input[type=text], +input[type=password], +input[type=number], +textarea { + -webkit-appearance: none +} + +ol, +ul, +dl { + margin-top: 0; + margin-bottom: 1em +} + +ol ol, +ul ul, +ol ul, +ul ol { + margin-bottom: 0 +} + +dt { + font-weight: 500 +} + +dd { + margin-bottom: .5em; + margin-left: 0 +} + +blockquote { + margin: 0 0 1em +} + +dfn { + font-style: italic +} + +b, +strong { + font-weight: bolder +} + +small { + font-size: 80% +} + +sub, +sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline +} + +sub { + bottom: -.25em +} + +sup { + top: -.5em +} + +pre, +code, +kbd, +samp { + font-size: 1em; + font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace +} + +pre { + margin-top: 0; + margin-bottom: 1em; + overflow: auto +} + +figure { + margin: 0 0 1em +} + +img { + vertical-align: middle; + border-style: none +} + +a, +area, +button, +[role=button], +input:not([type=range]), +label, +select, +summary, +textarea { + touch-action: manipulation +} + +table { + border-collapse: collapse +} + +caption { + padding-top: .75em; + padding-bottom: .3em; + text-align: left; + caption-side: bottom +} + +input, +button, +select, +optgroup, +textarea { + margin: 0; + color: inherit; + font-size: inherit; + font-family: inherit; + line-height: inherit +} + +button, +input { + overflow: visible +} + +button, +select { + text-transform: none +} + +button, +html [type=button], +[type=reset], +[type=submit] { + -webkit-appearance: button +} + +button::-moz-focus-inner, +[type=button]::-moz-focus-inner, +[type=reset]::-moz-focus-inner, +[type=submit]::-moz-focus-inner { + padding: 0; + border-style: none +} + +input[type=radio], +input[type=checkbox] { + box-sizing: border-box; + padding: 0 +} + +input[type=date], +input[type=time], +input[type=datetime-local], +input[type=month] { + -webkit-appearance: listbox +} + +textarea { + overflow: auto; + resize: vertical +} + +fieldset { + min-width: 0; + margin: 0; + padding: 0; + border: 0 +} + +legend { + display: block; + width: 100%; + max-width: 100%; + margin-bottom: .5em; + padding: 0; + color: inherit; + font-size: 1.5em; + line-height: inherit; + white-space: normal +} + +progress { + vertical-align: baseline +} + +[type=number]::-webkit-inner-spin-button, +[type=number]::-webkit-outer-spin-button { + height: auto +} + +[type=search] { + outline-offset: -2px; + -webkit-appearance: none +} + +[type=search]::-webkit-search-cancel-button, +[type=search]::-webkit-search-decoration { + -webkit-appearance: none +} + +::-webkit-file-upload-button { + font: inherit; + -webkit-appearance: button +} + +output { + display: inline-block +} + +summary { + display: list-item +} + +template { + display: none +} + +[hidden] { + display: none !important +} + +mark { + padding: .2em; + background-color: #feffe6 +} + +html, +body, +div, +span, +applet, +object, +iframe, +h1, +h2, +h3, +h4, +h5, +h6, +p, +blockquote, +pre, +a, +abbr, +acronym, +address, +big, +cite, +code, +del, +dfn, +em, +img, +ins, +kbd, +q, +s, +samp, +small, +strike, +strong, +sub, +sup, +tt, +var, +b, +u, +i, +center, +dl, +dt, +dd, +ol, +ul, +li, +fieldset, +form, +label, +legend, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td, +article, +aside, +canvas, +details, +embed, +figure, +figcaption, +footer, +header, +hgroup, +menu, +nav, +output, +ruby, +section, +summary, +time, +mark, +audio, +video, +textarea { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline +} + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +menu, +nav, +section { + display: block +} + +body { + line-height: 1; + margin: 0; + font-family: PingFang SC, PingFangSC-Regular, SFUIText, Helvetica Neue, Helvetica, Arial, sans-serif +} + +ol, +ul { + list-style: none +} + +blockquote, +q { + quotes: none +} + +blockquote:before, +blockquote:after, +q:before, +q:after { + content: ""; + content: none +} + +table { + border-collapse: collapse; + border-spacing: 0 +} + +.cursor-p { + cursor: pointer +} + +.ant-popover { + animation: none +} + +.pop-card .ant-popover-content .ant-popover-inner { + padding: 16px; + border-radius: 24px; + max-width: 369px; + background: rgba(255, 255, 255, .15); + backdrop-filter: blur(10px); + -webkit-backdrop-filter: blur(10px); + background-size: 100% 100%; + border: .5px solid linear-gradient(81.68deg, rgba(255, 255, 255, .4) 10.59%, rgba(255, 255, 255, 0) 100.6%) +} + +.pop-card .ant-popover-arrow:before { + background: rgba(255, 255, 255, .15); + backdrop-filter: blur(10px); + -webkit-backdrop-filter: blur(10px) +} + +.pop-card .ant-popover-title { + color: rgba(255, 255, 255, .8); + margin-bottom: 4px +} + +.pop-card .ant-popover-inner .ant-popover-inner-content { + color: #fff +} + +.pop-card .ant-popover-inner .ant-popover-inner-content .notice-hover { + display: flex; + align-items: center; + justify-content: center +} + +.pop-card .ant-popover-inner .ant-popover-inner-content .notice-hover .ant-input-number { + border: 1px solid rgba(255, 255, 255, .3); + background: transparent; + color: #fff +} + +.pop-card .ant-popover-inner .ant-popover-inner-content .notice-hover .ant-popover-inner-content { + color: #fff +} + +.pop-input { + border-radius: 12px +} + +.pop-input .ant-popover-content .ant-popover-inner { + width: 153px; + padding: 10px; + border-radius: 12px; + background-color: rgba(255, 255, 255, .15); + backdrop-filter: blur(20px); + -webkit-backdrop-filter: blur(20px); + background-size: 100% 100% +} + +.pop-input .ant-popover-arrow:before { + background-color: rgba(255, 255, 255, .15); + backdrop-filter: blur(20px); + -webkit-backdrop-filter: blur(20px) +} + +.pop-input .ant-popover-title { + color: rgba(255, 255, 255, .8) +} + +.pop-input .ant-popover-inner .ant-popover-inner-content { + color: #fff +} + +.pop-input .ant-popover-inner .ant-popover-inner-content .notice-hover { + box-sizing: border-box; + height: 32px; + display: flex; + align-items: center; + justify-content: center +} + +.pop-input .ant-popover-inner .ant-popover-inner-content .notice-hover .ant-input-number { + margin-left: 13px; + border-color: transparent; + background: rgba(255, 255, 255, .05); + color: #fff +} + +.pop-input .ant-popover-inner .ant-popover-inner-content .notice-hover .ant-popover-inner-content { + color: #fff +} + +.pop-singel .ant-popover-content .ant-popover-inner { + padding: 8px 12px; + border-radius: 8px; + max-width: 369px; + background: rgba(255, 255, 255, .15); + backdrop-filter: blur(10px); + -webkit-backdrop-filter: blur(10px); + background-size: 100% 100%; + border: .5px solid linear-gradient(81.68deg, rgba(255, 255, 255, .4) 10.59%, rgba(255, 255, 255, 0) 100.6%) +} + +.pop-singel .ant-popover-arrow:before { + background: rgba(255, 255, 255, .15); + backdrop-filter: blur(10px); + -webkit-backdrop-filter: blur(10px) +} + +.pop-singel .ant-popover-title { + color: rgba(255, 255, 255, .8) +} + +.pop-singel .ant-popover-inner .ant-popover-inner-content { + color: #fff +} + +.pop-singel .ant-popover-inner .ant-popover-inner-content .notice-hover { + display: flex; + align-items: center; + justify-content: center +} + +.pop-singel .ant-popover-inner .ant-popover-inner-content .notice-hover .ant-input-number { + border: 1px solid rgba(255, 255, 255, .3); + background: transparent; + color: #fff +} + +.pop-singel .ant-popover-inner .ant-popover-inner-content .notice-hover .ant-popover-inner-content { + color: #fff +} + +input { + caret-color: #40fc43 +} + +.ant-input-number { + border-color: transparent; + box-shadow: none +} + +.ant-input-number-handler:hover .ant-input-number-handler-down-inner, +.ant-input-number .ant-input-number-handler:hover .ant-input-number-handler-up-inner, +.ant-input-number .ant-input-number-handler:hover .ant-input-number-handler-down-inner { + color: #fff +} + +.ant-input { + border-color: transparent +} + +.ant-input:placeholder-shown { + font-size: 13px; + opacity: .5 +} + +.ant-input:focus, +.ant-input:hover, +.ant-input:active, +.ant-input-affix-wrapper:hover .ant-input:not(.ant-input-disabled) { + border-color: rgba(255, 255, 255, .5); + box-shadow: 0 0 0 2px rgba(0, 0, 0, 0) +} + +.ant-input-number-input-wrap:hover { + border: 1px solid rgba(255, 255, 255, .5); + border-radius: 8px +} + +.ant-input-number:focus, +.ant-input-number:hover, +.ant-input-number:active, +.ant-input-number-affix-wrapper:hover .ant-input-number:not(.ant-input-number-disabled) { + border-color: rgba(255, 255, 255, .5); + box-shadow: 0 0 0 2px rgba(0, 0, 0, 0) +} + +.ant-input-number .ant-input-number-input { + padding-right: 4px; + color: #fff +} + +.ant-input-number .ant-input-number-handler { + border-color: rgba(255, 255, 255, .1) +} + +.ant-input-number .ant-input-number-handler-wrap { + background: linear-gradient(0deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .1)), linear-gradient(0deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .05)); + opacity: 1; + border-color: rgba(255, 255, 255, .1) +} + +.ant-input-number-handler-down { + border-block-start: 1px solid rgba(255, 255, 255, .1) +} + +.ant-input-number .ant-input-number-handler-up-inner, +.ant-input-number .ant-input-number-handler-down-inner { + color: #fff; + font-size: 8px +} + +.ant-select-selector { + border-color: rgba(255, 255, 255, .5) +} + +.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer):hover .ant-select-selector { + border-color: rgba(255, 255, 255, .5) +} + +.ant-select-focused.ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer) .ant-select-selector { + border-color: rgba(255, 255, 255, .5) +} + +.ant-select-single.ant-select-open .ant-select-selection-item { + color: rgba(255, 255, 255, .5) +} + +.ant-select .ant-select-selector .ant-select-selection-search .ant-select-selection-item { + font-size: 13px +} + +.ant-select-dropdown { + z-index: 1000; + padding: 13px 0; + background: rgba(255, 255, 255, .1); + color: #fff; + backdrop-filter: blur(10px); + -webkit-backdrop-filter: blur(10px); + box-shadow: 0 4px 40px rgba(2, 10, 29, .4); + border-radius: 9px +} + +.ant-select-dropdown .ant-select, +.ant-select-dropdown .ant-select-single, +.ant-select-dropdown .ant-select-selector, +.ant-select-dropdown .ant-select-item { + color: #fff +} + +.ant-select-dropdown .ant-select-item-option-active:not(.ant-select-item-option-disabled) { + background-color: rgba(255, 255, 255, .1); + color: #fff +} + +.ant-select-dropdown .ant-select-item-option-selected:not(.ant-select-item-option-disabled) { + padding: 5px 20px 5px 12px; + position: relative; + background: transparent; + color: #fff +} + +.ant-select-dropdown .ant-select-item-option-selected:not(.ant-select-item-option-disabled):after { + width: 16px; + height: 16px; + position: absolute; + content: ""; + background: url(https://staticsns.cdn.bcebos.com/amis/2024-1/1704594047813/selected.png); + background-size: 100% 100%; + right: 8px; + top: 8px +} + +::-webkit-scrollbar { + width: 0; + height: 0 +} + +::-webkit-scrollbar-track { + background: transparent +} + +::-webkit-scrollbar-thumb { + border-radius: 3px; + background: transparent +} + +.ant-message-notice .ant-message-notice-content { + background: #27282a !important; + color: #fff +} + +html, +body, +div, +span, +applet, +object, +iframe, +h1, +h2, +h3, +h4, +h5, +h6, +p, +blockquote, +pre, +a, +abbr, +acronym, +address, +big, +cite, +code, +del, +dfn, +em, +img, +ins, +kbd, +q, +s, +samp, +small, +strike, +strong, +sub, +sup, +tt, +var, +b, +u, +i, +center, +dl, +dt, +dd, +ol, +ul, +li, +fieldset, +form, +label, +legend, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td, +article, +aside, +canvas, +details, +embed, +figure, +figcaption, +footer, +header, +hgroup, +menu, +nav, +output, +ruby, +section, +summary, +time, +mark, +audio, +video, +textarea { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline +} + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +menu, +nav, +section { + display: block +} + +body { + line-height: 1; + margin: 0; + font-family: PingFang SC, PingFangSC-Regular, SFUIText, Helvetica Neue, Helvetica, Arial, sans-serif +} + +ol, +ul { + list-style: none +} + +blockquote, +q { + quotes: none +} + +blockquote:before, +blockquote:after, +q:before, +q:after { + content: ""; + content: none +} + +table { + border-collapse: collapse; + border-spacing: 0 +} + +.cursor-p { + cursor: pointer +} + +.aigc-head { + width: 100%; + box-sizing: border-box; + height: 52px; + display: flex; + align-items: center; + justify-content: space-between; + position: relative; + overflow: hidden; + padding: 0 24px +} + +.aigc-head .aigc-head__left-block { + position: relative; + display: flex; + align-items: center +} + +.aigc-head .aigc-head__left-block--logo { + width: 128px +} + +.aigc-head .aigc-head__left-block--logo.link { + cursor: pointer +} + +.aigc-head .aigc-head__left-block--line { + height: 20px; + width: 1px; + margin: 0 10px 0 0; + background-color: rgba(255, 255, 255, .3) +} + +.aigc-head .aigc-head__left-block--txt { + width: 108px +} + +.aigc-head .aigc-head__left-block--beta { + position: absolute; + top: 0; + right: -34px; + width: 28px +} + +.aigc-head .aigc-head__right-block { + display: flex; + align-items: center +} + +.aigc-head .aigc-head__right-block--commonbtn { + padding: 9px 16px; + font-size: 14px; + border-radius: 38px; + border: 1px solid rgba(255, 255, 255, .1); + margin-right: 16px; + cursor: pointer +} + +[data-theme=dark] .aigc-head .aigc-head__right-block--commonbtn { + color: rgba(255, 255, 255, .8) +} + +.aigc-head .aigc-head__right-block--avatarbox { + padding: 1px; + border-radius: 50%; + overflow: hidden; + background: linear-gradient(to right, rgb(229, 250, 87), rgb(64, 252, 67)) +} + +.aigc-head .aigc-head__right-block--avatar { + position: relative; + display: block; + width: 30px; + height: 30px; + border-radius: 50%; + overflow: hidden; + z-index: 1; + background-color: #000; + border: 2px solid #000; + cursor: pointer +} + +.aigc-head .aigc-head__right-block--login { + cursor: pointer; + border-color: #fff +} + +[data-theme=dark] .aigc-head .aigc-head__right-block--login { + color: #fff +} + +.aigc-head .aigc-head__right-block--hover:hover { + border: 1px solid rgba(255, 255, 255, .5) +} + +[data-theme=dark] .aigc-head .aigc-head__right-block--hover:hover { + color: #fff +} + +.pop-com { + background-color: rgba(0, 0, 0, 0); + --antd-arrow-background-color: rgba(255, 255, 255, .15) +} + +.pop-com.soci.ant-popover .ant-popover-inner { + padding: 0 14px; + width: auto +} + +.pop-com .pop-box { + padding: 5px 0 +} + +.pop-com .pop-box .pop-top { + font-size: 14px; + display: flex; + align-items: center; + padding: 0 7px 8px +} + +.pop-com .pop-box .pop-top .pop-avatar { + width: 43px; + height: 43px; + border-radius: 50%; + margin-right: 6px +} + +.pop-com .pop-box .pop-top .pop-username { + font-size: 14px +} + +[data-theme=dark] .pop-com .pop-box .pop-top .pop-username { + color: rgba(255, 255, 255, .8) +} + +.pop-com .pop-box .pop-bottom { + display: flex; + text-align: center; + padding: 0 7px; + border-top: .5px solid rgba(255, 255, 255, .1) +} + +[data-theme=dark] .pop-com .pop-box .pop-bottom { + color: rgba(255, 255, 255, .8) +} + +.pop-com .pop-box .pop-bottom .pop-accitem { + padding: 10px 0; + flex: 1; + cursor: pointer +} + +[data-theme=dark] .pop-com .pop-box .pop-bottom .pop-accitem:hover { + color: #fff +} + +.pop-com .add-soci { + padding: 12px 0 14px; + text-align: center; + font-size: 12px; + color: rgba(255, 255, 255, .5) +} + +.pop-com .add-soci .add-text { + padding-bottom: 4px +} + +.pop-com .add-soci .qr-code { + width: 160px +} + +.pop-com.ant-popover .ant-popover-inner { + padding: 0; + background-color: rgba(255, 255, 255, .15); + border-radius: 24px; + backdrop-filter: blur(10px); + -webkit-backdrop-filter: blur(10px); + width: 258px +} + +.pop-com.ant-popover .ant-popconfirm-description { + margin: 0 +} + +.pop-com.ant-popover .ant-popconfirm-message { + display: none +} + +.pop-com.ant-popover .ant-popover-arrow { + right: 22px +} + + +.aigc-login { + position: fixed; + z-index: 2000; + background-color: rgba(0, 0, 0, .7); + top: 0; + left: 0; + right: 0; + bottom: 0 +} + +.aigc-login .aigc-login__body { + width: 723px; + height: 349px; + position: fixed; + z-index: 1111; + left: 50%; + margin-left: -361px; + top: 50%; + margin-top: -195px; + box-sizing: border-box; + border-radius: 24px; + overflow: hidden +} + +.aigc-login .aigc-login__tab-box { + position: absolute; + width: 296px; + font-size: 16px; + font-weight: 900; + display: flex; + z-index: 10; + right: 0; + top: 30px +} + +.aigc-login .aigc-login__tab { + cursor: pointer; + height: 26px; + width: fit-content; + position: relative; + color: rgba(255, 255, 255, .8) +} + +.aigc-login .aigc-login__tab:hover { + color: #fff +} + +.aigc-login .aigc-login__tab:nth-child(1) { + margin-right: 32px +} + +.aigc-login .aigc-login__tab.active-tab { + color: #40fc43; + font-weight: 400 +} + +.aigc-login .aigc-login__smile-icon { + position: absolute; + width: 19px; + height: 5px; + bottom: 0; + left: 50%; + transform: translate(-50%) +} + +.aigc-login .aigc-login__star-icon { + position: absolute; + width: 20px; + height: 20px; + right: -20px; + top: -4px +} + +.aigc-login .aigc-login__container { + position: relative; + font-size: 14px; + width: 100%; + background: #2c2d2d; + overflow: hidden; + height: 100% +} + +.aigc-login .aigc-login__container .close-img { + position: absolute; + right: 20px; + top: 16px; + cursor: pointer +} + +.aigc-login .aigc-login__container .login-title-text { + float: right; + font-weight: 700; + width: 400px; + font-size: 20px; + margin-bottom: 10px; + margin-left: 24px; + line-height: 46px; + color: #000; + padding-top: 28px +} + +.aigc-login .aigc-login__container .tang-pass-qrcode-title, +.aigc-login .aigc-login__container .tang-pass-qrcode-ullist, +.aigc-login .aigc-login__container .pass-form-logo, +.aigc-login .aigc-login__container .bd-acc-tsina, +.aigc-login .aigc-login__container .tang-pass-sms-tip, +.aigc-login .aigc-login__container .bd-acc-qzone, +.aigc-login .aigc-login__container .pass-form-item-memberPass { + display: none +} + +.aigc-login .aigc-login__container .pass-sms-btn, +.aigc-login .aigc-login__container .pass-sms-link { + display: none !important +} + +.aigc-login .aigc-login__container .Qrcode-status-animation { + position: relative; + top: auto; + left: auto; + width: auto +} + +.aigc-login .aigc-login__container .tang-pass-footerBarQrcode, +.aigc-login .aigc-login__container .tang-pass-footerBarPhoenixSplit { + display: none !important +} + +.aigc-login .aigc-login__container .Qrcode-status-con { + width: auto; + height: auto +} + +.aigc-login .aigc-login__container .phoenix-btn-item { + background: url(https://nd-static.bdstatic.com/aigc-static/yike-aigc/assets/wx.ae88424e.png) no-repeat !important; + background-size: 100% 100% !important; + height: 28px !important; + width: 28px !important; + position: relative !important; + font-size: 0 !important +} + +.aigc-login .aigc-login__container .tang-pass-login { + margin-top: 55px; + float: right; + width: 322px; + visibility: visible !important +} + +.aigc-login .aigc-login__container .tang-pass-login .pass-item-time-timing { + width: 112px +} + +.aigc-login .aigc-login__container .tang-pass-qrcode { + position: absolute; + top: 0; + left: 0; + width: 384px; + height: 100%; + padding-bottom: 60px; + display: flex !important; + flex-wrap: wrap; + flex-direction: column; + justify-content: center; + align-items: center; + box-sizing: border-box; + float: left !important; + margin-top: 0 +} + +.aigc-login .aigc-login__container .tang-pass-qrcode .tang-pass-qrcode-init { + position: relative; + height: 100% +} + +.aigc-login .aigc-login__container .tang-pass-qrcode .tang-pass-qrcode-content { + overflow: auto; + padding: 0; + width: 100%; + height: 100% +} + +.aigc-login .aigc-login__container .tang-pass-qrcode .tang-pass-qrcode-imgWrapper { + display: flex !important; + margin-left: 0 !important; + justify-content: center; + align-items: center; + border: 0; + height: 100% !important; + padding: 36px 0 0; + border-radius: 6px !important +} + +.aigc-login .aigc-login__container .tang-pass-qrcode .text-qrcode { + position: absolute; + top: 30px; + text-align: center; + width: 100%; + color: rgba(255, 255, 255, .8); + font-size: 16px; + font-weight: 900 +} + +.aigc-login .aigc-login__container .tang-pass-qrcode .tang-pass-qrcode-img { + width: 160px !important; + height: 161px !important; + padding: 4px; + background-color: #fff; + border-radius: 6px; + overflow: hidden +} + +.aigc-login .aigc-login__container .tang-pass-qrcode .qr-box-img { + width: 160px !important; + height: 161px !important; + margin-left: 10px !important +} + +.aigc-login .aigc-login__container .tang-pass-footerBar { + position: relative; + width: 100%; + color: #3b75ff !important; + background-color: rgba(241, 241, 241, .1); + padding: 0 35px; + position: absolute; + height: 50px; + line-height: 50px; + bottom: 0; + right: 0 +} + +.aigc-login .aigc-login__container .tang-pass-footerBarPhoenix { + position: absolute; + left: 35px; + width: 200px; + height: 100% +} + +.aigc-login .aigc-login__container .tang-pass-footerBarPhoenix .tang-pass-login-phoenix { + padding: 0; + margin-top: 10px +} + +.aigc-login .aigc-login__container .tang-pass-footerBarULogin { + display: none !important +} + +.aigc-login .aigc-login__container .regist { + position: absolute; + right: 35px; + color: #40fc43 +} + +.aigc-login .aigc-login__container .pass-form-item-smsVerifyCode { + width: 314px; + margin-bottom: 0 +} + +.aigc-login .aigc-login__container .pass-form-item-smsVerifyCode .pass-form-item-unrecevie { + position: relative !important; + top: 12px !important +} + +.aigc-login .aigc-login__container .pass-text-input-smsVerifyCode { + box-sizing: content-box; + font-size: 14px !important; + border-radius: 4px !important; + border: 0 !important; + padding-left: 14px !important; + width: 116px !important; + font-weight: 500; + color: #fff !important; + background-color: rgba(255, 255, 255, .05) +} + +.aigc-login .aigc-login__container .pass-text-input-smsVerifyCode::placeholder { + color: rgba(255, 255, 255, .5) !important +} + +.aigc-login .aigc-login__container .pass-text-input-smsPhone { + box-sizing: content-box; + margin-top: 0 !important; + font-size: 14px !important; + border-radius: 4px !important; + border: 0 !important; + padding-left: 14px !important; + width: 240px !important; + font-weight: 500; + color: #fff !important; + background-color: rgba(255, 255, 255, .05) +} + +.aigc-login .aigc-login__container .pass-text-input-smsPhone::placeholder { + color: rgba(255, 255, 255, .5) !important +} + +.aigc-login .aigc-login__container .pass-form-item-userName { + margin-bottom: 8px +} + +.aigc-login .aigc-login__container .pass-text-input-userName { + box-sizing: content-box; + font-size: 14px !important; + border-radius: 4px !important; + border: 0 !important; + border-bottom: none !important; + padding-left: 14px !important; + width: 240px !important; + font-weight: 500; + color: #fff !important; + background-color: rgba(255, 255, 255, .05) +} + +.aigc-login .aigc-login__container .pass-text-input-userName::placeholder { + color: rgba(255, 255, 255, .5) !important +} + +.aigc-login .aigc-login__container .pass-text-input-password { + box-sizing: content-box; + border: 0 !important; + font-size: 14px !important; + border-radius: 4px !important; + padding-left: 14px !important; + width: 240px !important; + font-weight: 500; + background-color: rgba(255, 255, 255, .05) +} + +.aigc-login .aigc-login__container .pass-text-input-password::placeholder { + color: rgba(255, 255, 255, .5) !important +} + +.aigc-login .aigc-login__container .pass-item-timer { + border: 1px solid rgba(255, 255, 255, .1) !important; + border-radius: 44px !important; + height: 43px !important; + width: 115px !important; + color: #40fc43 !important; + background-color: rgba(255, 255, 255, 0) +} + +.aigc-login .aigc-login__container .pass-button-submit { + background: linear-gradient(to bottom right, rgb(229, 250, 87), rgb(64, 252, 67)) !important; + font-size: 16px !important; + width: 261px !important; + height: 43px !important; + line-height: 43px !important; + border-radius: 44px !important; + color: #000 !important +} + +.aigc-login .aigc-login__container .pass-fgtpwd { + position: absolute; + top: -12px; + right: -10px; + font-size: 13px !important; + width: 80px; + color: rgba(107, 150, 255, .7) +} + +.aigc-login .aigc-login__container .tang-pass-sms-agreement { + font-size: 13px !important; + margin-top: 10px !important +} + +.aigc-login .aigc-login__container .tang-pass-sms-agreement:hover { + opacity: 1 !important +} + +.aigc-login .aigc-login__container .tang-pass-sms-agreement a { + font-size: 13px !important; + color: rgba(107, 150, 255, .9) !important +} + +.aigc-login .aigc-login__container .tang-pass-sms-agreement a:hover { + opacity: .6 !important +} + +.aigc-login .aigc-login__container .pass-button-submit { + margin-top: 25px +} + +html[data-v-ada5c28e], +body[data-v-ada5c28e], +div[data-v-ada5c28e], +span[data-v-ada5c28e], +applet[data-v-ada5c28e], +object[data-v-ada5c28e], +iframe[data-v-ada5c28e], +h1[data-v-ada5c28e], +h2[data-v-ada5c28e], +h3[data-v-ada5c28e], +h4[data-v-ada5c28e], +h5[data-v-ada5c28e], +h6[data-v-ada5c28e], +p[data-v-ada5c28e], +blockquote[data-v-ada5c28e], +pre[data-v-ada5c28e], +a[data-v-ada5c28e], +abbr[data-v-ada5c28e], +acronym[data-v-ada5c28e], +address[data-v-ada5c28e], +big[data-v-ada5c28e], +cite[data-v-ada5c28e], +code[data-v-ada5c28e], +del[data-v-ada5c28e], +dfn[data-v-ada5c28e], +em[data-v-ada5c28e], +img[data-v-ada5c28e], +ins[data-v-ada5c28e], +kbd[data-v-ada5c28e], +q[data-v-ada5c28e], +s[data-v-ada5c28e], +samp[data-v-ada5c28e], +small[data-v-ada5c28e], +strike[data-v-ada5c28e], +strong[data-v-ada5c28e], +sub[data-v-ada5c28e], +sup[data-v-ada5c28e], +tt[data-v-ada5c28e], +var[data-v-ada5c28e], +b[data-v-ada5c28e], +u[data-v-ada5c28e], +i[data-v-ada5c28e], +center[data-v-ada5c28e], +dl[data-v-ada5c28e], +dt[data-v-ada5c28e], +dd[data-v-ada5c28e], +ol[data-v-ada5c28e], +ul[data-v-ada5c28e], +li[data-v-ada5c28e], +fieldset[data-v-ada5c28e], +form[data-v-ada5c28e], +label[data-v-ada5c28e], +legend[data-v-ada5c28e], +table[data-v-ada5c28e], +caption[data-v-ada5c28e], +tbody[data-v-ada5c28e], +tfoot[data-v-ada5c28e], +thead[data-v-ada5c28e], +tr[data-v-ada5c28e], +th[data-v-ada5c28e], +td[data-v-ada5c28e], +article[data-v-ada5c28e], +aside[data-v-ada5c28e], +canvas[data-v-ada5c28e], +details[data-v-ada5c28e], +embed[data-v-ada5c28e], +figure[data-v-ada5c28e], +figcaption[data-v-ada5c28e], +footer[data-v-ada5c28e], +header[data-v-ada5c28e], +hgroup[data-v-ada5c28e], +menu[data-v-ada5c28e], +nav[data-v-ada5c28e], +output[data-v-ada5c28e], +ruby[data-v-ada5c28e], +section[data-v-ada5c28e], +summary[data-v-ada5c28e], +time[data-v-ada5c28e], +mark[data-v-ada5c28e], +audio[data-v-ada5c28e], +video[data-v-ada5c28e], +textarea[data-v-ada5c28e] { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline +} + +article[data-v-ada5c28e], +aside[data-v-ada5c28e], +details[data-v-ada5c28e], +figcaption[data-v-ada5c28e], +figure[data-v-ada5c28e], +footer[data-v-ada5c28e], +header[data-v-ada5c28e], +hgroup[data-v-ada5c28e], +menu[data-v-ada5c28e], +nav[data-v-ada5c28e], +section[data-v-ada5c28e] { + display: block +} + +body[data-v-ada5c28e] { + line-height: 1; + margin: 0; + font-family: PingFang SC, PingFangSC-Regular, SFUIText, Helvetica Neue, Helvetica, Arial, sans-serif +} + +ol[data-v-ada5c28e], +ul[data-v-ada5c28e] { + list-style: none +} + +blockquote[data-v-ada5c28e], +q[data-v-ada5c28e] { + quotes: none +} + +blockquote[data-v-ada5c28e]:before, +blockquote[data-v-ada5c28e]:after, +q[data-v-ada5c28e]:before, +q[data-v-ada5c28e]:after { + content: ""; + content: none +} + +table[data-v-ada5c28e] { + border-collapse: collapse; + border-spacing: 0 +} + +.cursor-p[data-v-ada5c28e] { + cursor: pointer +} + +.aigc-tab[data-v-ada5c28e] { + background: rgba(255, 255, 255, .05); + width: fit-content; + box-sizing: border-box; + height: 44px; + display: flex; + align-items: center; + justify-content: flex-start; + margin-left: 8px; + margin-bottom: 4px; + border-radius: 24px; + position: relative +} + +.aigc-tab .aigc-tab__active[data-v-ada5c28e] { + position: absolute; + width: 138px; + height: 100%; + background-color: rgba(255, 255, 255, .15); + border-radius: 24px; + transform: translate(var(--688ac256)); + transition: all .3s +} + +.aigc-tab .aigc-tab__item[data-v-ada5c28e] { + display: flex; + align-items: center; + justify-content: center; + width: 138px; + height: 100%; + color: #fff; + cursor: pointer; + font-size: 16px; + opacity: .8 +} + +.aigc-tab .aigc-tab__item.active[data-v-ada5c28e], +.aigc-tab .aigc-tab__item[data-v-ada5c28e]:hover { + font-weight: 600; + opacity: 1 +} + +.aigc-tab .aigc-tab__item--icon[data-v-ada5c28e] { + width: 24px; + height: 24px +} + +.aigc-tab .aigc-tab__item span[data-v-ada5c28e] { + padding-left: 2px +} + +html, +body, +div, +span, +applet, +object, +iframe, +h1, +h2, +h3, +h4, +h5, +h6, +p, +blockquote, +pre, +a, +abbr, +acronym, +address, +big, +cite, +code, +del, +dfn, +em, +img, +ins, +kbd, +q, +s, +samp, +small, +strike, +strong, +sub, +sup, +tt, +var, +b, +u, +i, +center, +dl, +dt, +dd, +ol, +ul, +li, +fieldset, +form, +label, +legend, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td, +article, +aside, +canvas, +details, +embed, +figure, +figcaption, +footer, +header, +hgroup, +menu, +nav, +output, +ruby, +section, +summary, +time, +mark, +audio, +video, +textarea { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline +} + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +menu, +nav, +section { + display: block +} + +body { + line-height: 1; + margin: 0; + font-family: PingFang SC, PingFangSC-Regular, SFUIText, Helvetica Neue, Helvetica, Arial, sans-serif +} + +ol, +ul { + list-style: none +} + +blockquote, +q { + quotes: none +} + +blockquote:before, +blockquote:after, +q:before, +q:after { + content: ""; + content: none +} + +table { + border-collapse: collapse; + border-spacing: 0 +} + +.cursor-p { + cursor: pointer +} + +.aigc-layout { + position: absolute; + bottom: 0; + left: 0; + right: 0; + top: 0; + overflow: scroll; + transition: all .4s cubic-bezier(.175, .885, .32, 1.275); + background: linear-gradient(to bottom right, rgb(8, 13, 27), rgb(7, 18, 38), rgb(29, 38, 57), rgb(61, 61, 38)) +} + +.aigc-layout.gradient { + animation: gradientAnimation 3s infinite alternate +} + +@keyframes gradientAnimation { + 0% { + background: linear-gradient(to bottom right, rgb(8, 13, 27), rgb(7, 18, 38), rgb(29, 38, 57), rgb(61, 61, 38)) + } + + 25% { + background: linear-gradient(to bottom right, rgb(8, 13, 27), rgb(8, 18, 38), rgb(30, 39, 57), rgb(62, 62, 38)) + } + + 50% { + background: linear-gradient(to bottom right, rgb(8, 13, 27), rgb(9, 18, 38), rgb(31, 40, 57), rgb(13, 63, 38)) + } + + 75% { + background: linear-gradient(to bottom right, rgb(8, 13, 27), rgb(10, 18, 38), rgb(32, 41, 57), rgb(94, 64, 38)) + } + + to { + background: linear-gradient(to bottom right, rgb(8, 13, 27), rgb(7, 18, 38), rgb(29, 38, 57), rgb(101, 61, 38)) + } +} + +html[data-v-e4fb7b31], +body[data-v-e4fb7b31], +div[data-v-e4fb7b31], +span[data-v-e4fb7b31], +applet[data-v-e4fb7b31], +object[data-v-e4fb7b31], +iframe[data-v-e4fb7b31], +h1[data-v-e4fb7b31], +h2[data-v-e4fb7b31], +h3[data-v-e4fb7b31], +h4[data-v-e4fb7b31], +h5[data-v-e4fb7b31], +h6[data-v-e4fb7b31], +p[data-v-e4fb7b31], +blockquote[data-v-e4fb7b31], +pre[data-v-e4fb7b31], +a[data-v-e4fb7b31], +abbr[data-v-e4fb7b31], +acronym[data-v-e4fb7b31], +address[data-v-e4fb7b31], +big[data-v-e4fb7b31], +cite[data-v-e4fb7b31], +code[data-v-e4fb7b31], +del[data-v-e4fb7b31], +dfn[data-v-e4fb7b31], +em[data-v-e4fb7b31], +img[data-v-e4fb7b31], +ins[data-v-e4fb7b31], +kbd[data-v-e4fb7b31], +q[data-v-e4fb7b31], +s[data-v-e4fb7b31], +samp[data-v-e4fb7b31], +small[data-v-e4fb7b31], +strike[data-v-e4fb7b31], +strong[data-v-e4fb7b31], +sub[data-v-e4fb7b31], +sup[data-v-e4fb7b31], +tt[data-v-e4fb7b31], +var[data-v-e4fb7b31], +b[data-v-e4fb7b31], +u[data-v-e4fb7b31], +i[data-v-e4fb7b31], +center[data-v-e4fb7b31], +dl[data-v-e4fb7b31], +dt[data-v-e4fb7b31], +dd[data-v-e4fb7b31], +ol[data-v-e4fb7b31], +ul[data-v-e4fb7b31], +li[data-v-e4fb7b31], +fieldset[data-v-e4fb7b31], +form[data-v-e4fb7b31], +label[data-v-e4fb7b31], +legend[data-v-e4fb7b31], +table[data-v-e4fb7b31], +caption[data-v-e4fb7b31], +tbody[data-v-e4fb7b31], +tfoot[data-v-e4fb7b31], +thead[data-v-e4fb7b31], +tr[data-v-e4fb7b31], +th[data-v-e4fb7b31], +td[data-v-e4fb7b31], +article[data-v-e4fb7b31], +aside[data-v-e4fb7b31], +canvas[data-v-e4fb7b31], +details[data-v-e4fb7b31], +embed[data-v-e4fb7b31], +figure[data-v-e4fb7b31], +figcaption[data-v-e4fb7b31], +footer[data-v-e4fb7b31], +header[data-v-e4fb7b31], +hgroup[data-v-e4fb7b31], +menu[data-v-e4fb7b31], +nav[data-v-e4fb7b31], +output[data-v-e4fb7b31], +ruby[data-v-e4fb7b31], +section[data-v-e4fb7b31], +summary[data-v-e4fb7b31], +time[data-v-e4fb7b31], +mark[data-v-e4fb7b31], +audio[data-v-e4fb7b31], +video[data-v-e4fb7b31], +textarea[data-v-e4fb7b31] { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline +} + +article[data-v-e4fb7b31], +aside[data-v-e4fb7b31], +details[data-v-e4fb7b31], +figcaption[data-v-e4fb7b31], +figure[data-v-e4fb7b31], +footer[data-v-e4fb7b31], +header[data-v-e4fb7b31], +hgroup[data-v-e4fb7b31], +menu[data-v-e4fb7b31], +nav[data-v-e4fb7b31], +section[data-v-e4fb7b31] { + display: block +} + +body[data-v-e4fb7b31] { + line-height: 1; + margin: 0; + font-family: PingFang SC, PingFangSC-Regular, SFUIText, Helvetica Neue, Helvetica, Arial, sans-serif +} + +ol[data-v-e4fb7b31], +ul[data-v-e4fb7b31] { + list-style: none +} + +blockquote[data-v-e4fb7b31], +q[data-v-e4fb7b31] { + quotes: none +} + +blockquote[data-v-e4fb7b31]:before, +blockquote[data-v-e4fb7b31]:after, +q[data-v-e4fb7b31]:before, +q[data-v-e4fb7b31]:after { + content: ""; + content: none +} + +table[data-v-e4fb7b31] { + border-collapse: collapse; + border-spacing: 0 +} + +.cursor-p[data-v-e4fb7b31] { + cursor: pointer +} + +.aigc-loading[data-v-e4fb7b31] { + width: 100%; + height: 100% +} + +.aigc-loading .aigc-loading__mask[data-v-e4fb7b31] { + width: 100%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + flex-wrap: wrap; + flex-direction: column +} + +.aigc-loading .aigc-loading__count[data-v-e4fb7b31] { + width: 100%; + margin-top: 5px; + text-align: center; + font-size: 14px; + line-height: 1.4; + color: rgba(255, 255, 255, .8) +} + +.aigc-loading .aigc-loading__describe[data-v-e4fb7b31] { + width: 100%; + margin-top: 2px; + text-align: center; + font-size: 12px; + line-height: 1.4; + color: rgba(255, 255, 255, .8) +} + +html[data-v-fe9e9986], +body[data-v-fe9e9986], +div[data-v-fe9e9986], +span[data-v-fe9e9986], +applet[data-v-fe9e9986], +object[data-v-fe9e9986], +iframe[data-v-fe9e9986], +h1[data-v-fe9e9986], +h2[data-v-fe9e9986], +h3[data-v-fe9e9986], +h4[data-v-fe9e9986], +h5[data-v-fe9e9986], +h6[data-v-fe9e9986], +p[data-v-fe9e9986], +blockquote[data-v-fe9e9986], +pre[data-v-fe9e9986], +a[data-v-fe9e9986], +abbr[data-v-fe9e9986], +acronym[data-v-fe9e9986], +address[data-v-fe9e9986], +big[data-v-fe9e9986], +cite[data-v-fe9e9986], +code[data-v-fe9e9986], +del[data-v-fe9e9986], +dfn[data-v-fe9e9986], +em[data-v-fe9e9986], +img[data-v-fe9e9986], +ins[data-v-fe9e9986], +kbd[data-v-fe9e9986], +q[data-v-fe9e9986], +s[data-v-fe9e9986], +samp[data-v-fe9e9986], +small[data-v-fe9e9986], +strike[data-v-fe9e9986], +strong[data-v-fe9e9986], +sub[data-v-fe9e9986], +sup[data-v-fe9e9986], +tt[data-v-fe9e9986], +var[data-v-fe9e9986], +b[data-v-fe9e9986], +u[data-v-fe9e9986], +i[data-v-fe9e9986], +center[data-v-fe9e9986], +dl[data-v-fe9e9986], +dt[data-v-fe9e9986], +dd[data-v-fe9e9986], +ol[data-v-fe9e9986], +ul[data-v-fe9e9986], +li[data-v-fe9e9986], +fieldset[data-v-fe9e9986], +form[data-v-fe9e9986], +label[data-v-fe9e9986], +legend[data-v-fe9e9986], +table[data-v-fe9e9986], +caption[data-v-fe9e9986], +tbody[data-v-fe9e9986], +tfoot[data-v-fe9e9986], +thead[data-v-fe9e9986], +tr[data-v-fe9e9986], +th[data-v-fe9e9986], +td[data-v-fe9e9986], +article[data-v-fe9e9986], +aside[data-v-fe9e9986], +canvas[data-v-fe9e9986], +details[data-v-fe9e9986], +embed[data-v-fe9e9986], +figure[data-v-fe9e9986], +figcaption[data-v-fe9e9986], +footer[data-v-fe9e9986], +header[data-v-fe9e9986], +hgroup[data-v-fe9e9986], +menu[data-v-fe9e9986], +nav[data-v-fe9e9986], +output[data-v-fe9e9986], +ruby[data-v-fe9e9986], +section[data-v-fe9e9986], +summary[data-v-fe9e9986], +time[data-v-fe9e9986], +mark[data-v-fe9e9986], +audio[data-v-fe9e9986], +video[data-v-fe9e9986], +textarea[data-v-fe9e9986] { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline +} + +article[data-v-fe9e9986], +aside[data-v-fe9e9986], +details[data-v-fe9e9986], +figcaption[data-v-fe9e9986], +figure[data-v-fe9e9986], +footer[data-v-fe9e9986], +header[data-v-fe9e9986], +hgroup[data-v-fe9e9986], +menu[data-v-fe9e9986], +nav[data-v-fe9e9986], +section[data-v-fe9e9986] { + display: block +} + +body[data-v-fe9e9986] { + line-height: 1; + margin: 0; + font-family: PingFang SC, PingFangSC-Regular, SFUIText, Helvetica Neue, Helvetica, Arial, sans-serif +} + +ol[data-v-fe9e9986], +ul[data-v-fe9e9986] { + list-style: none +} + +blockquote[data-v-fe9e9986], +q[data-v-fe9e9986] { + quotes: none +} + +blockquote[data-v-fe9e9986]:before, +blockquote[data-v-fe9e9986]:after, +q[data-v-fe9e9986]:before, +q[data-v-fe9e9986]:after { + content: ""; + content: none +} + +table[data-v-fe9e9986] { + border-collapse: collapse; + border-spacing: 0 +} + +.cursor-p[data-v-fe9e9986] { + cursor: pointer +} + +.aigc-img-preview[data-v-fe9e9986] { + position: fixed; + z-index: 10001; + left: 0; + right: 0; + bottom: 0; + top: 0; + background-color: rgba(0, 0, 0, .8); + color: #fff +} + +.aigc-img-preview .aigc-img-preview__slider-box[data-v-fe9e9986] { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + display: flex; + justify-content: center; + align-items: center +} + +.aigc-img-preview .aigc-img-preview__slider-box--img[data-v-fe9e9986] { + max-width: 100%; + height: 100%; + vertical-align: middle; + transition: all .5s linear; + display: none +} + +.aigc-img-preview .aigc-img-preview__slider-box--img.active[data-v-fe9e9986] { + display: inline +} + +.aigc-img-preview .aigc-img-preview__close[data-v-fe9e9986] { + position: absolute; + top: 10px; + right: 24px; + width: 36px; + cursor: pointer; + z-index: 5 +} + +.aigc-img-preview .aigc-img-preview__slider-left[data-v-fe9e9986] { + position: absolute; + left: 30px; + top: 50%; + cursor: pointer; + transform: translateY(-50%); + width: 32px +} + +.aigc-img-preview .aigc-img-preview__slider-left.disable[data-v-fe9e9986] { + opacity: .8 +} + +.aigc-img-preview .aigc-img-preview__slider-right[data-v-fe9e9986] { + position: absolute; + right: 30px; + top: 50%; + cursor: pointer; + width: 32px; + transform: translateY(-50%) +} + +.aigc-img-preview .aigc-img-preview__slider-right.disable[data-v-fe9e9986] { + opacity: .8 +} + +.aigc-img-preview .aigc-img-preview__footer[data-v-fe9e9986] { + width: 100%; + display: flex; + position: absolute; + height: 90px; + bottom: 0; + align-items: center; + justify-content: center; + background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgb(0, 0, 0)); + z-index: 110 +} + +.aigc-img-preview .aigc-img-preview__footer--scale[data-v-fe9e9986] { + display: flex; + align-items: center; + justify-content: center; + font-size: 12px; + width: 132px; + height: 32px; + background-color: rgba(255, 255, 255, .2); + border-radius: 10px +} + +.aigc-img-preview .aigc-img-preview__footer--reset[data-v-fe9e9986] { + cursor: pointer +} + +.aigc-img-preview .aigc-img-preview__footer--drop[data-v-fe9e9986] { + margin: 0 8px; + width: 32px; + cursor: pointer +} + +.aigc-img-preview .aigc-img-preview__footer--rotate[data-v-fe9e9986] { + cursor: pointer; + width: 32px +} + +.aigc-img-preview .aigc-img-preview__footer--add[data-v-fe9e9986] { + width: 16px; + margin: 0 8px 0 20px; + cursor: pointer +} + +.aigc-img-preview .aigc-img-preview__footer--add.disable[data-v-fe9e9986] { + opacity: .8 +} + +.aigc-img-preview .aigc-img-preview__footer--reduce[data-v-fe9e9986] { + width: 16px; + cursor: pointer +} + +.aigc-img-preview .aigc-img-preview__footer--reduce.disable[data-v-fe9e9986] { + opacity: .8 +} + +html[data-v-e19f253b], +body[data-v-e19f253b], +div[data-v-e19f253b], +span[data-v-e19f253b], +applet[data-v-e19f253b], +object[data-v-e19f253b], +iframe[data-v-e19f253b], +h1[data-v-e19f253b], +h2[data-v-e19f253b], +h3[data-v-e19f253b], +h4[data-v-e19f253b], +h5[data-v-e19f253b], +h6[data-v-e19f253b], +p[data-v-e19f253b], +blockquote[data-v-e19f253b], +pre[data-v-e19f253b], +a[data-v-e19f253b], +abbr[data-v-e19f253b], +acronym[data-v-e19f253b], +address[data-v-e19f253b], +big[data-v-e19f253b], +cite[data-v-e19f253b], +code[data-v-e19f253b], +del[data-v-e19f253b], +dfn[data-v-e19f253b], +em[data-v-e19f253b], +img[data-v-e19f253b], +ins[data-v-e19f253b], +kbd[data-v-e19f253b], +q[data-v-e19f253b], +s[data-v-e19f253b], +samp[data-v-e19f253b], +small[data-v-e19f253b], +strike[data-v-e19f253b], +strong[data-v-e19f253b], +sub[data-v-e19f253b], +sup[data-v-e19f253b], +tt[data-v-e19f253b], +var[data-v-e19f253b], +b[data-v-e19f253b], +u[data-v-e19f253b], +i[data-v-e19f253b], +center[data-v-e19f253b], +dl[data-v-e19f253b], +dt[data-v-e19f253b], +dd[data-v-e19f253b], +ol[data-v-e19f253b], +ul[data-v-e19f253b], +li[data-v-e19f253b], +fieldset[data-v-e19f253b], +form[data-v-e19f253b], +label[data-v-e19f253b], +legend[data-v-e19f253b], +table[data-v-e19f253b], +caption[data-v-e19f253b], +tbody[data-v-e19f253b], +tfoot[data-v-e19f253b], +thead[data-v-e19f253b], +tr[data-v-e19f253b], +th[data-v-e19f253b], +td[data-v-e19f253b], +article[data-v-e19f253b], +aside[data-v-e19f253b], +canvas[data-v-e19f253b], +details[data-v-e19f253b], +embed[data-v-e19f253b], +figure[data-v-e19f253b], +figcaption[data-v-e19f253b], +footer[data-v-e19f253b], +header[data-v-e19f253b], +hgroup[data-v-e19f253b], +menu[data-v-e19f253b], +nav[data-v-e19f253b], +output[data-v-e19f253b], +ruby[data-v-e19f253b], +section[data-v-e19f253b], +summary[data-v-e19f253b], +time[data-v-e19f253b], +mark[data-v-e19f253b], +audio[data-v-e19f253b], +video[data-v-e19f253b], +textarea[data-v-e19f253b] { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline +} + +article[data-v-e19f253b], +aside[data-v-e19f253b], +details[data-v-e19f253b], +figcaption[data-v-e19f253b], +figure[data-v-e19f253b], +footer[data-v-e19f253b], +header[data-v-e19f253b], +hgroup[data-v-e19f253b], +menu[data-v-e19f253b], +nav[data-v-e19f253b], +section[data-v-e19f253b] { + display: block +} + +body[data-v-e19f253b] { + line-height: 1; + margin: 0; + font-family: PingFang SC, PingFangSC-Regular, SFUIText, Helvetica Neue, Helvetica, Arial, sans-serif +} + +ol[data-v-e19f253b], +ul[data-v-e19f253b] { + list-style: none +} + +blockquote[data-v-e19f253b], +q[data-v-e19f253b] { + quotes: none +} + +blockquote[data-v-e19f253b]:before, +blockquote[data-v-e19f253b]:after, +q[data-v-e19f253b]:before, +q[data-v-e19f253b]:after { + content: ""; + content: none +} + +table[data-v-e19f253b] { + border-collapse: collapse; + border-spacing: 0 +} + +.cursor-p[data-v-e19f253b] { + cursor: pointer +} + +.aigc-preview[data-v-e19f253b] { + width: 100%; + height: 100%; + display: flex; + border-radius: 24px; + padding: 20px 16px; + box-sizing: border-box +} + +.aigc-preview .aigc-preview__risk-img[data-v-e19f253b] { + display: flex; + justify-content: center; + align-items: center; + flex-grow: 1 +} + +.aigc-preview .aigc-preview__risk-img--item[data-v-e19f253b] { + width: 169px +} + +.aigc-preview .aigc-preview__img[data-v-e19f253b] { + position: relative; + flex-grow: 1; + background-position: center; + background-size: contain; + background-repeat: no-repeat; + cursor: pointer; + margin: 0 16px; + display: flex; + justify-content: center; + align-items: end +} + +.aigc-preview .aigc-preview__icons[data-v-e19f253b] { + width: 36px; + display: flex; + flex-direction: column +} + +.aigc-preview .aigc-preview__icon-box[data-v-e19f253b] { + margin-bottom: 8px +} + +.aigc-preview .aigc-preview__icon[data-v-e19f253b] { + display: block; + width: 36px; + height: 36px; + border-radius: 50%; + cursor: pointer; + opacity: .8 +} + +.aigc-preview .aigc-preview__icon[data-v-e19f253b]:hover { + opacity: 1 +} + +.aigc-preview .aigc-preview__icon[data-v-e19f253b]:nth-child(2) { + margin: 8px 0 +} + +.aigc-preview .aigc-preview__thumbs[data-v-e19f253b] { + width: 50px; + height: 100%; + overflow-y: auto; + display: flex; + flex-direction: column +} + +.aigc-preview .aigc-preview__thumbs li[data-v-e19f253b] { + margin-bottom: 6px +} + +.aigc-preview .aigc-preview__thumb-box[data-v-e19f253b] { + position: relative; + border-radius: 10px; + overflow: hidden; + width: 50px; + height: 50px +} + +.aigc-preview .aigc-preview__loading[data-v-e19f253b] { + width: 100%; + height: 100%; + flex-shrink: 0; + border-radius: 10px; + object-fit: contain; + cursor: pointer; + background-color: rgba(255, 255, 255, .05) +} + +.aigc-preview .aigc-preview__thumb[data-v-e19f253b] { + width: 50px; + height: 50px; + box-sizing: border-box; + flex-shrink: 0; + border-radius: 10px; + object-fit: contain; + cursor: pointer; + background-color: rgba(255, 255, 255, .05) +} + +.aigc-preview .aigc-preview__thumb--active[data-v-e19f253b] { + border: 1px solid #40fc43 +} + +.aigc-preview .aigc-preview__tag[data-v-e19f253b] { + position: absolute; + top: 0; + right: 0; + width: 28px; + height: 16px; + line-height: 16px; + text-align: center; + background-color: rgba(0, 0, 0, .6); + color: #40fc43; + font-size: 10px; + font-weight: 400; + border-radius: 0 8px +} + +.aigc-preview .aigc-preview__tag.cur-tag[data-v-e19f253b] { + width: 36px; + height: 20px; + line-height: 20px; + font-size: 12px; + border-radius: 0 0 0 10px +} + +.aigc-preview .aigc-preview__border[data-v-e19f253b] { + display: flex; + justify-content: center; + align-items: center; + height: 40px; + width: 120px; + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAAB4CAYAAADfRGj6AAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAymSURBVHgB7d3rcxtnFcfxIyex2+bWNg1t09AmvdFSYAaYYYYZYMob4B8GhuEVDLyCFnqZAun9kqRt4jb3OHZicX56zuOsNytpJa20K/v7mXmyti6rlez8cnL22d2e7QH9fn/NF4/7OOrjhI+1+PqI7o7v1+LrXp1VxrI34v5e6evic8r3W8X3Va9V9XXdbR21nePWVXzcqMfX3b6qz3na7Rz2+Y5T3oZxr29W/TOa5L3U+VnWeR/l26seW/6ZmY3f7qp1l2+b9POd5Heszjrr3J9f75aPLR93fWz6uBrfa3m11+tt2ZKrE1ad44H8tKUgfsZSMCuI83vZjHE9Rr7tjjWrKgCG/UUe9gs87i9p1fqH/YVswrh/TJp+jUnXX/UZFO+bdnvm8X7rBlf5OWbNbk85fMu3TbvOnk0X7HXXV8cjPg4VxvHSOhXgCut1S4F92ZbMUgS0B/KqL172cdZSIOdq+IaPiz4ux9fr/kO4bgD2Jc8KhbaGwvoJHw/7OBZ3q6JWVnxpKStuWcd1NqALoXzGhypmbavC91Mf53186R9w01UxgD3Gs0TVtf7H/VQsD1sq8FRZf24dDuvOBXS0L77n4zkfCumLMc5RHQOYlWeMqmsFtf5HrgpbOaig/twzZt06pDMBHcH8Ux+nLPWMz/n42D+wiwYAc+C5o/aHglqBrbC+Zil3vrAOaD2gI5hftzTrQn3kt328T/sCwCJ5Fp221FZ9yMdtSznUalC3FtClivmCjzeolgG0LYL6JUsVtXrT77TV+lh4QPub15S41y0Fsyrmf/qbP2cA0CER1C9aCmpNTFBFfdsWaKEB7W/4h774SbzuOz7epZUBoMs8txTSmrSg3FJ/+kNbkIUEdFTNv7Y0XU7tjL8wIwPAsvAMUxWtoNb//FVF/2MR1fTcA7pQNYuC+RMDgCXkeaajl1+wdOTiB55nn9oczS2g40ATBbMCWlXzX6maASy7qKZ/4OMxH596rv3P5mQuAR0tjd9YOiz7TX8DbxoA7CGec8/7QmPD0mSHDWtY4wHtG61QVjirgv4zU+cA7FWedyd98Zql83y80XRINxrQvrHa0/krS0cC/t439oYBwB7muacDW3RMx0Ef73nuXbKGNBbQvpGa2P1LH99aqpwJZwD7QoS09rmpP/1eU52DRgK6EM7f+PiDb9ymAcA+4jmoClohrX1wCukvbUYzB3SE8y8sVc6EM4B9K0L6x5ZOafrfWUN6xWbgG/OspXCmcgaw73kG6vJb//Jx08ernpFP2AymDuiYSqdwVq/5j4QzAOwKaR338Upk5VSmCuh4wd9Zus4f4QwABRHS71qafvda7ESc2LQV9G8tzXP+E7M1AOBBMSf6LR8HLIX0QZvQxAHtL/IzS3sp/0Y4A8BwEdLvWdpp+JxNaKKA9nD+vi9e8fGWv/BnBgAYybPyiqWLXZ+Kky3VVjugo+/8Ix9f+Qv+2wAAtcRZ7676+O4k/ehJKmidX0M7A/9uAIBJ5StHvVT3CbUC2hNflbN6KG/RdwaAyUU/+n0fx+KarGONDehobbzq48NFXuoFAPaauPisetK1Wh11KmhVz30fbxsAYFYfxPKFcQ8cGdCe8E/64qyP/9DaAIDZxYWydZWpo56xx0Y9dlwF/XMfN3yF7xgAoCk6HamC+vSoBw0N6LicyyM+CGcAaJAXvfd88YWlHYZDq+hRFbQu9nrTV/SRAQAaFVde0dzo54c9pjKgC9UzOwYBYH7O+1gdVkUPq6BfttR7/tgAAHPhGXvNUi/6VNX9DwS0J/l3fPGopVPlAQDmS1dd0YyOo+U7qipoTaujegaAxbjsQ+ePfuDqK7sC2hNch3Of8fG1AQDmLmZ0KKSPewYfKN5XrqBPWjpq8JwBABZFF91WOO+qossBfcbS1LorBgBYiDhSW9cw3DWbYyego72h9KZ6BoDFU0AfKbY5ihX0yVheMgDAoq3H8kS+oRjQmodHewMAWuDZqwuiaE70TpujGNBqb1A9A0B7dOj3znmiBwHtPQ+Fsy4Jft4AAG3RzsIDcaGUnQpaRw5qet1lAwC0RQGtLB5U0TmgVUFf9R7IlgEAWhEHragPvauCVlP6pgEA2nbLx5q+WPFexyFLpxalvQEA7btt6RSkB1RBH7fU87hqAIC2abrdto+HckDLLQMAtE0VtIrmQwpoTa/re3OagAaAlsVkjZ0KWjsIaW8AQHfo/NAruYJmeh0AdIf60IMWx2p8AwDoBhXNBxXQOrXdXQMAdIoC+mFjBgcAdImOKBz0oPsxAADdsBPQAIDu6ecKGgDQLX0qaADoKAW0ptgdMABAVww6Gwpozbc7ZACArtABhJvM4gCA7lE239MfOnPSQwYA6Apl87b+2LB0sAoAoBt2KmjtJDxoAICu0H7BOwrofJlv2hwA0DLP4sE5+i1aHPns/UcNANC2HNCDWRzX4xsqaABo32osN1d6vZ5ONaodhUcMANC2NR93PZu386HeqqIfNQBA23Rk9+AiKjmgv/WxFs1pAEALPIOVyZrBoX2DOwF9I5ZU0QDQHrU3tE9wcJWrQUB7r+NK3EBAA0B7dNDgtmey9gta8XSj6kOfMABAWzSDYyN/Uwzoy5b60Ey3A4AF8+xV71k7CCsD+itLvY8nDQCwaLn/fCffsBPQMR9avejjBgBYtMM+7ngW38s3lC95te7jmJfahDQALEi0N/KpN3aUA/prS7M52FkIAIvziJXaG7IroKPNoSr6JAetAMDCaPbG7WJ7Q6qu6q0qWnsSTxoAYK5i5twD7Q2zioD2BL/qC41TBgCYN52oTidH2izfsTLkCZ/7WPVkP2YAgLkoVM+3qu6vDGhP8muWJkufNgDAvGjn4D3P3NtVd66MeOKHlqbc0YsGgIZF9az9fTeHPWZoQEcVrXHaV3TAAABNytXzxrAHjKqg5QtL5yZ9ygAAjfCiV+Hcs3SSuqFGBnRU0VrBk77CNQMAzCROyq/2hg7r3rIRxlXQ8lEszxoAYFb5qMFb4x44NqA94XXo4XkfRz35OaE/AEwpOhGDcz7rorDjHl+nglZI61SkanecodUBAJMrtDaGTqsrqxXQ4WNLZflzBgCY1OFYXq/7hNoBHYchXvBxxP8leNoAALXEnGedgK5WayObpIJWSF+ydDKlp/0FjxgAYKQ417NawxuxT6+2iQI6XLR05MtZf+FVAwBUir5znrWxMenzezaFCOYX49sPqs7CBAD7WYRz7jvf8Jzs24SmqaBzP1o7DXUI+FkOBQeA+zwTVfzOFM4yVUBLTBP5zNK0kRcIaQB4IJw3pg1nmTqgJU7ur3NHK6SfJ6QB7GcRzvk8GxvjDuUeZ6oedMVGPe6LZyw1wT8qX1cLAPa6UjjfmTWczRoKaPGNe8zSCf4H/Wl2HALYLwpHCWrZSDhLYwEtcYksVdKqoD8hpAHsdYVwzpXzXWtIowEtMSn7bKz7gm9s7cMaAWCZxH63fH6iiY4SrKPxgJYIaZ2zQ/OlL8URiACwZ0TOaQwOQplltsYwcwnozN+ArsSi3rTOe3qhqb4MALQldgaqalZrQ+2MrXmEs8w1oCV2HurCsyr9v46rtADA0vE80wmPDsW3W032m6vMPaAl/ivwrKU3dsXHOtU0gGURVbNatlqqWt6cV9VctJCAzvxNPmGp5aE39q2/wXUDgI6KYFbVnA/CuzvvqrlooQEtUU2f8KEpeaqi12l7AOiamKGhcFZOqkW7tYiquWjhAZ35m3/YF9qJqMAmqAF0QsxrVjBrqWM67jU9fa6u1gI6i4NbVFHrA1FQf0NQA1ikaGXkYM4V8922gjlrPaCzCOrjlhrx6vHobHlXOBoRwLxEtZxHDuZ7bQdz1pmAzqL1cdSHLqml7VNVrbPm3SasAcyqUC3nUBYF8nZXgjnrXEBnMd9QYX0klmrO68PTQS+65NZG1z5MAN0TgVwO5b7dz5TtRe/8q6uzAV0UYa2TkRy2+2eMElXUqrA34uuFToEB0C2FMJYcxnkojHMo97saykVLEdBlcQlz9arz8mDpIQpr7X3NP4wc2lU/kF7pvv6Q28vPafKHO+tr9Gd47qh19iq+r/P5VK1jkudNsl1W2rZZtnHcY2c1ajtn+TzK6qxv2Puu2r5ptmnan3P5M8q3lfVK968MWddSBXLZUgZ0WTT6V2Po60Ox1DzGPNF82F+OXauqeMyoX9xxv4R1g7Nf8Zhh25krgVHhWde0n8m4x5jV/0xszOPGfWa9IbePuy3f3hvzeqP+QTAbH/5V6xx2/6h1NhHgxdfZtsmLgPJ2ltcx6e/gNK9d9dzi17lKtmUM5LL/A6hzSCBNl6CiAAAAAElFTkSuQmCC) center/contain no-repeat +} + +.aigc-preview .aigc-preview__btn-loading[data-v-e19f253b] { + width: 24px; + height: 24px; + transform: scale(.6) +} + +.aigc-preview .aigc-preview__btn-loading[data-v-e19f253b] .aigc-loading__mask { + backdrop-filter: none !important +} + +.aigc-preview .aigc-preview__btn[data-v-e19f253b] { + height: 40px; + width: 120px; + color: #40fc43; + margin-bottom: 12px; + background-color: rgba(8, 13, 27, .6); + border-radius: 24px; + backdrop-filter: blur(10px); + -webkit-backdrop-filter: blur(10px); + font-size: 13px +} + +.aigc-preview .aigc-preview__btn .aigc-preview__btnIcon[data-v-e19f253b] { + width: 24px; + height: 24px; + margin-right: 4px +} + +.aigc-preview .aigc-preview__disabled[data-v-e19f253b] { + cursor: not-allowed; + background-color: rgba(8, 13, 27, .4) +} + +.thumb-risk[data-v-e19f253b] { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + backdrop-filter: blur(30px); + -webkit-backdrop-filter: blur(30px); + display: flex; + align-items: center; + justify-content: center; + pointer-events: none +} + +.thumb-risk-icon[data-v-e19f253b] { + display: block; + width: 24px; + height: 24px +} + +html[data-v-51fd3d7a], +body[data-v-51fd3d7a], +div[data-v-51fd3d7a], +span[data-v-51fd3d7a], +applet[data-v-51fd3d7a], +object[data-v-51fd3d7a], +iframe[data-v-51fd3d7a], +h1[data-v-51fd3d7a], +h2[data-v-51fd3d7a], +h3[data-v-51fd3d7a], +h4[data-v-51fd3d7a], +h5[data-v-51fd3d7a], +h6[data-v-51fd3d7a], +p[data-v-51fd3d7a], +blockquote[data-v-51fd3d7a], +pre[data-v-51fd3d7a], +a[data-v-51fd3d7a], +abbr[data-v-51fd3d7a], +acronym[data-v-51fd3d7a], +address[data-v-51fd3d7a], +big[data-v-51fd3d7a], +cite[data-v-51fd3d7a], +code[data-v-51fd3d7a], +del[data-v-51fd3d7a], +dfn[data-v-51fd3d7a], +em[data-v-51fd3d7a], +img[data-v-51fd3d7a], +ins[data-v-51fd3d7a], +kbd[data-v-51fd3d7a], +q[data-v-51fd3d7a], +s[data-v-51fd3d7a], +samp[data-v-51fd3d7a], +small[data-v-51fd3d7a], +strike[data-v-51fd3d7a], +strong[data-v-51fd3d7a], +sub[data-v-51fd3d7a], +sup[data-v-51fd3d7a], +tt[data-v-51fd3d7a], +var[data-v-51fd3d7a], +b[data-v-51fd3d7a], +u[data-v-51fd3d7a], +i[data-v-51fd3d7a], +center[data-v-51fd3d7a], +dl[data-v-51fd3d7a], +dt[data-v-51fd3d7a], +dd[data-v-51fd3d7a], +ol[data-v-51fd3d7a], +ul[data-v-51fd3d7a], +li[data-v-51fd3d7a], +fieldset[data-v-51fd3d7a], +form[data-v-51fd3d7a], +label[data-v-51fd3d7a], +legend[data-v-51fd3d7a], +table[data-v-51fd3d7a], +caption[data-v-51fd3d7a], +tbody[data-v-51fd3d7a], +tfoot[data-v-51fd3d7a], +thead[data-v-51fd3d7a], +tr[data-v-51fd3d7a], +th[data-v-51fd3d7a], +td[data-v-51fd3d7a], +article[data-v-51fd3d7a], +aside[data-v-51fd3d7a], +canvas[data-v-51fd3d7a], +details[data-v-51fd3d7a], +embed[data-v-51fd3d7a], +figure[data-v-51fd3d7a], +figcaption[data-v-51fd3d7a], +footer[data-v-51fd3d7a], +header[data-v-51fd3d7a], +hgroup[data-v-51fd3d7a], +menu[data-v-51fd3d7a], +nav[data-v-51fd3d7a], +output[data-v-51fd3d7a], +ruby[data-v-51fd3d7a], +section[data-v-51fd3d7a], +summary[data-v-51fd3d7a], +time[data-v-51fd3d7a], +mark[data-v-51fd3d7a], +audio[data-v-51fd3d7a], +video[data-v-51fd3d7a], +textarea[data-v-51fd3d7a] { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline +} + +article[data-v-51fd3d7a], +aside[data-v-51fd3d7a], +details[data-v-51fd3d7a], +figcaption[data-v-51fd3d7a], +figure[data-v-51fd3d7a], +footer[data-v-51fd3d7a], +header[data-v-51fd3d7a], +hgroup[data-v-51fd3d7a], +menu[data-v-51fd3d7a], +nav[data-v-51fd3d7a], +section[data-v-51fd3d7a] { + display: block +} + +body[data-v-51fd3d7a] { + line-height: 1; + margin: 0; + font-family: PingFang SC, PingFangSC-Regular, SFUIText, Helvetica Neue, Helvetica, Arial, sans-serif +} + +ol[data-v-51fd3d7a], +ul[data-v-51fd3d7a] { + list-style: none +} + +blockquote[data-v-51fd3d7a], +q[data-v-51fd3d7a] { + quotes: none +} + +blockquote[data-v-51fd3d7a]:before, +blockquote[data-v-51fd3d7a]:after, +q[data-v-51fd3d7a]:before, +q[data-v-51fd3d7a]:after { + content: ""; + content: none +} + +table[data-v-51fd3d7a] { + border-collapse: collapse; + border-spacing: 0 +} + +.cursor-p[data-v-51fd3d7a] { + cursor: pointer +} + +.modal[data-v-51fd3d7a] { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + background-color: rgba(0, 0, 0, .8); + z-index: 1000 +} + +.content-wrap[data-v-51fd3d7a] { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: fit-content; + height: fit-content; + display: flex; + flex-direction: column; + box-sizing: border-box; + border-radius: 24px; + border: 1px solid rgba(255, 255, 255, .05); + background-color: rgba(51, 51, 51, .85); + backdrop-filter: blur(20px); + -webkit-backdrop-filter: blur(20px) +} + +.cross-icon[data-v-51fd3d7a] { + width: 24px; + height: 24px; + position: absolute; + top: 16px; + right: 16px; + cursor: pointer +} + +.bottom-box[data-v-51fd3d7a] { + display: flex; + width: fit-content; + margin: 0 auto 40px; + align-items: center +} + +.bottom-box .btn[data-v-51fd3d7a] { + width: 120px; + height: 40px; + box-sizing: border-box; + font-size: 13px; + display: flex; + align-items: center; + justify-content: center; + border-radius: 34px; + cursor: pointer +} + +.cancel-btn[data-v-51fd3d7a] { + color: rgba(255, 255, 255, .6); + border: rgba(255, 255, 255, .1) solid 1px; + margin-right: 16px; + cursor: pointer +} + +.confirm-btn[data-v-51fd3d7a] { + color: #000; + font-weight: 900; + background: #fff +} + +html[data-v-23e1e235], +body[data-v-23e1e235], +div[data-v-23e1e235], +span[data-v-23e1e235], +applet[data-v-23e1e235], +object[data-v-23e1e235], +iframe[data-v-23e1e235], +h1[data-v-23e1e235], +h2[data-v-23e1e235], +h3[data-v-23e1e235], +h4[data-v-23e1e235], +h5[data-v-23e1e235], +h6[data-v-23e1e235], +p[data-v-23e1e235], +blockquote[data-v-23e1e235], +pre[data-v-23e1e235], +a[data-v-23e1e235], +abbr[data-v-23e1e235], +acronym[data-v-23e1e235], +address[data-v-23e1e235], +big[data-v-23e1e235], +cite[data-v-23e1e235], +code[data-v-23e1e235], +del[data-v-23e1e235], +dfn[data-v-23e1e235], +em[data-v-23e1e235], +img[data-v-23e1e235], +ins[data-v-23e1e235], +kbd[data-v-23e1e235], +q[data-v-23e1e235], +s[data-v-23e1e235], +samp[data-v-23e1e235], +small[data-v-23e1e235], +strike[data-v-23e1e235], +strong[data-v-23e1e235], +sub[data-v-23e1e235], +sup[data-v-23e1e235], +tt[data-v-23e1e235], +var[data-v-23e1e235], +b[data-v-23e1e235], +u[data-v-23e1e235], +i[data-v-23e1e235], +center[data-v-23e1e235], +dl[data-v-23e1e235], +dt[data-v-23e1e235], +dd[data-v-23e1e235], +ol[data-v-23e1e235], +ul[data-v-23e1e235], +li[data-v-23e1e235], +fieldset[data-v-23e1e235], +form[data-v-23e1e235], +label[data-v-23e1e235], +legend[data-v-23e1e235], +table[data-v-23e1e235], +caption[data-v-23e1e235], +tbody[data-v-23e1e235], +tfoot[data-v-23e1e235], +thead[data-v-23e1e235], +tr[data-v-23e1e235], +th[data-v-23e1e235], +td[data-v-23e1e235], +article[data-v-23e1e235], +aside[data-v-23e1e235], +canvas[data-v-23e1e235], +details[data-v-23e1e235], +embed[data-v-23e1e235], +figure[data-v-23e1e235], +figcaption[data-v-23e1e235], +footer[data-v-23e1e235], +header[data-v-23e1e235], +hgroup[data-v-23e1e235], +menu[data-v-23e1e235], +nav[data-v-23e1e235], +output[data-v-23e1e235], +ruby[data-v-23e1e235], +section[data-v-23e1e235], +summary[data-v-23e1e235], +time[data-v-23e1e235], +mark[data-v-23e1e235], +audio[data-v-23e1e235], +video[data-v-23e1e235], +textarea[data-v-23e1e235] { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline +} + +article[data-v-23e1e235], +aside[data-v-23e1e235], +details[data-v-23e1e235], +figcaption[data-v-23e1e235], +figure[data-v-23e1e235], +footer[data-v-23e1e235], +header[data-v-23e1e235], +hgroup[data-v-23e1e235], +menu[data-v-23e1e235], +nav[data-v-23e1e235], +section[data-v-23e1e235] { + display: block +} + +body[data-v-23e1e235] { + line-height: 1; + margin: 0; + font-family: PingFang SC, PingFangSC-Regular, SFUIText, Helvetica Neue, Helvetica, Arial, sans-serif +} + +ol[data-v-23e1e235], +ul[data-v-23e1e235] { + list-style: none +} + +blockquote[data-v-23e1e235], +q[data-v-23e1e235] { + quotes: none +} + +blockquote[data-v-23e1e235]:before, +blockquote[data-v-23e1e235]:after, +q[data-v-23e1e235]:before, +q[data-v-23e1e235]:after { + content: ""; + content: none +} + +table[data-v-23e1e235] { + border-collapse: collapse; + border-spacing: 0 +} + +.cursor-p[data-v-23e1e235] { + cursor: pointer +} + +.aigc-upload[data-v-23e1e235] { + position: relative; + height: 100% +} + +.aigc-upload .aigc-upload__mask-drop[data-v-23e1e235] { + position: absolute; + left: 0; + right: 0; + bottom: 0; + top: 0; + z-index: 888; + border-radius: 24px; + background: rgba(255, 255, 255, .05); + pointer-events: none +} + +[data-theme=dark] .aigc-upload .aigc-upload__mask-drop[data-v-23e1e235] { + background: rgba(255, 255, 255, .2) +} + +.aigc-upload .aigc-upload__loading-pre[data-v-23e1e235] { + margin: 0 auto; + max-width: 420px; + height: 100% +} + +.aigc-upload .aigc-upload__ant-loading[data-v-23e1e235] { + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%) +} + +.aigc-upload .aigc-upload__ant-upload[data-v-23e1e235] { + width: 100%; + height: 100%; + display: block; + border: 0; + cursor: pointer +} + +.aigc-upload .aigc-upload__ant-upload[data-v-23e1e235] .ant-upload-drag { + border: 0 +} + +.aigc-upload .aigc-upload__ant-upload[data-v-23e1e235] .ant-upload-btn { + flex-direction: column; + display: flex; + align-items: center; + justify-content: center; + flex-wrap: wrap +} + +.aigc-upload .aigc-upload__ant-upload .aigc-upload__icon-coll[data-v-23e1e235] { + width: 100%; + display: flex; + align-items: center; + justify-content: center; + margin-bottom: -20px; + pointer-events: none +} + +.aigc-upload .aigc-upload__ant-upload .aigc-upload__icon-coll .width-height[data-v-23e1e235], +.aigc-upload .aigc-upload__ant-upload .aigc-upload__icon-coll .aigc-upload__icon-coll--right[data-v-23e1e235], +.aigc-upload .aigc-upload__ant-upload .aigc-upload__icon-coll .aigc-upload__icon-coll--midd[data-v-23e1e235], +.aigc-upload .aigc-upload__ant-upload .aigc-upload__icon-coll .aigc-upload__icon-coll--left[data-v-23e1e235] { + position: relative; + width: 164px; + height: 164px; + transform-origin: bottom left; + transition: all .5s cubic-bezier(.175, .885, .32, 1.275); + pointer-events: none +} + +.aigc-upload .aigc-upload__ant-upload .aigc-upload__icon-coll--left[data-v-23e1e235] { + right: -112px; + top: 5px +} + +.aigc-upload .aigc-upload__ant-upload .aigc-upload__icon-coll--midd[data-v-23e1e235] { + z-index: 1 +} + +.aigc-upload .aigc-upload__ant-upload .aigc-upload__icon-coll--right[data-v-23e1e235] { + left: -112px; + top: 5px +} + +.aigc-upload .aigc-upload__ant-upload .aigc-upload__icon-coll--guide-txt[data-v-23e1e235] { + width: 100%; + font-size: 16px; + margin-bottom: 8px; + pointer-events: none +} + +[data-theme=dark] .aigc-upload .aigc-upload__ant-upload .aigc-upload__icon-coll--guide-txt[data-v-23e1e235] { + color: rgba(255, 255, 255, .8) +} + +.aigc-upload .aigc-upload__ant-upload .aigc-upload__icon-coll--limit-txt[data-v-23e1e235] { + width: 100%; + font-size: 12px; + margin-bottom: 30px; + pointer-events: none +} + +[data-theme=dark] .aigc-upload .aigc-upload__ant-upload .aigc-upload__icon-coll--limit-txt[data-v-23e1e235] { + color: rgba(255, 255, 255, .6) +} + +.aigc-upload .aigc-upload__ant-upload .aigc-upload__icon-coll--guide-btn[data-v-23e1e235] { + display: inline-block; + padding: 12px 51px; + border-radius: 50px; + font-size: 16px; + border: 1px solid rgba(255, 255, 255, .1); + transition: all .3s +} + +[data-theme=dark] .aigc-upload .aigc-upload__ant-upload .aigc-upload__icon-coll--guide-btn[data-v-23e1e235] { + color: #fff +} + +.aigc-upload .aigc-upload__ant-upload .aigc-upload__icon-coll--guide-btn[data-v-23e1e235]:hover { + border: 1px solid rgb(255, 255, 255) +} + +.aigc-upload:hover .aigc-upload__icon-coll--left[data-v-23e1e235] { + transform: scale(1.05) rotate(-10deg) translate(0) translateZ(0) +} + +.aigc-upload:hover .aigc-upload__icon-coll--midd[data-v-23e1e235] { + transform: scale(1.05) rotate(0) translateY(-15px) translateZ(0) +} + +.aigc-upload:hover .aigc-upload__icon-coll--right[data-v-23e1e235] { + transform: scale(1.05) rotate(3deg) translate(10px, -18px) translateZ(0) +} + +.title[data-v-23e1e235] { + width: 260px; + box-sizing: border-box; + padding: 16px 0 0 16px; + color: #fff; + line-height: 1.3; + font-size: 16px; + margin: 30px 54px 0; + font-weight: 900; + text-align: center +} + +.desc[data-v-23e1e235] { + padding: 14px 34px 0; + width: 360px; + line-height: 1.2; + font-size: 14px; + margin-bottom: 24px; + text-align: center; + color: rgba(255, 255, 255, .8) +} + +.example-image-box[data-v-23e1e235] { + position: absolute +} + +.example-image[data-v-23e1e235] { + object-fit: cover; + position: relative; + box-sizing: border-box; + border-radius: 24px; + width: 218px; + height: 330px; + animation: dragUpload-23e1e235 1s 2; + animation-delay: .4s +} + +@keyframes dragUpload-23e1e235 { + 0% { + transform: translate(0) + } + + 50% { + transform: translate(-50px) + } + + to { + transform: translate(0) + } +} + +.example-image-desc[data-v-23e1e235] { + position: relative; + color: rgba(255, 255, 255, .8); + width: 212px; + font-family: PingFang SC; + font-weight: 400; + font-size: 14px; + line-height: 20px; + margin-top: 8px +} + +.hide-example[data-v-23e1e235] { + opacity: 0 +} + +html[data-v-bd96a8b0], +body[data-v-bd96a8b0], +div[data-v-bd96a8b0], +span[data-v-bd96a8b0], +applet[data-v-bd96a8b0], +object[data-v-bd96a8b0], +iframe[data-v-bd96a8b0], +h1[data-v-bd96a8b0], +h2[data-v-bd96a8b0], +h3[data-v-bd96a8b0], +h4[data-v-bd96a8b0], +h5[data-v-bd96a8b0], +h6[data-v-bd96a8b0], +p[data-v-bd96a8b0], +blockquote[data-v-bd96a8b0], +pre[data-v-bd96a8b0], +a[data-v-bd96a8b0], +abbr[data-v-bd96a8b0], +acronym[data-v-bd96a8b0], +address[data-v-bd96a8b0], +big[data-v-bd96a8b0], +cite[data-v-bd96a8b0], +code[data-v-bd96a8b0], +del[data-v-bd96a8b0], +dfn[data-v-bd96a8b0], +em[data-v-bd96a8b0], +img[data-v-bd96a8b0], +ins[data-v-bd96a8b0], +kbd[data-v-bd96a8b0], +q[data-v-bd96a8b0], +s[data-v-bd96a8b0], +samp[data-v-bd96a8b0], +small[data-v-bd96a8b0], +strike[data-v-bd96a8b0], +strong[data-v-bd96a8b0], +sub[data-v-bd96a8b0], +sup[data-v-bd96a8b0], +tt[data-v-bd96a8b0], +var[data-v-bd96a8b0], +b[data-v-bd96a8b0], +u[data-v-bd96a8b0], +i[data-v-bd96a8b0], +center[data-v-bd96a8b0], +dl[data-v-bd96a8b0], +dt[data-v-bd96a8b0], +dd[data-v-bd96a8b0], +ol[data-v-bd96a8b0], +ul[data-v-bd96a8b0], +li[data-v-bd96a8b0], +fieldset[data-v-bd96a8b0], +form[data-v-bd96a8b0], +label[data-v-bd96a8b0], +legend[data-v-bd96a8b0], +table[data-v-bd96a8b0], +caption[data-v-bd96a8b0], +tbody[data-v-bd96a8b0], +tfoot[data-v-bd96a8b0], +thead[data-v-bd96a8b0], +tr[data-v-bd96a8b0], +th[data-v-bd96a8b0], +td[data-v-bd96a8b0], +article[data-v-bd96a8b0], +aside[data-v-bd96a8b0], +canvas[data-v-bd96a8b0], +details[data-v-bd96a8b0], +embed[data-v-bd96a8b0], +figure[data-v-bd96a8b0], +figcaption[data-v-bd96a8b0], +footer[data-v-bd96a8b0], +header[data-v-bd96a8b0], +hgroup[data-v-bd96a8b0], +menu[data-v-bd96a8b0], +nav[data-v-bd96a8b0], +output[data-v-bd96a8b0], +ruby[data-v-bd96a8b0], +section[data-v-bd96a8b0], +summary[data-v-bd96a8b0], +time[data-v-bd96a8b0], +mark[data-v-bd96a8b0], +audio[data-v-bd96a8b0], +video[data-v-bd96a8b0], +textarea[data-v-bd96a8b0] { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline +} + +article[data-v-bd96a8b0], +aside[data-v-bd96a8b0], +details[data-v-bd96a8b0], +figcaption[data-v-bd96a8b0], +figure[data-v-bd96a8b0], +footer[data-v-bd96a8b0], +header[data-v-bd96a8b0], +hgroup[data-v-bd96a8b0], +menu[data-v-bd96a8b0], +nav[data-v-bd96a8b0], +section[data-v-bd96a8b0] { + display: block +} + +body[data-v-bd96a8b0] { + line-height: 1; + margin: 0; + font-family: PingFang SC, PingFangSC-Regular, SFUIText, Helvetica Neue, Helvetica, Arial, sans-serif +} + +ol[data-v-bd96a8b0], +ul[data-v-bd96a8b0] { + list-style: none +} + +blockquote[data-v-bd96a8b0], +q[data-v-bd96a8b0] { + quotes: none +} + +blockquote[data-v-bd96a8b0]:before, +blockquote[data-v-bd96a8b0]:after, +q[data-v-bd96a8b0]:before, +q[data-v-bd96a8b0]:after { + content: ""; + content: none +} + +table[data-v-bd96a8b0] { + border-collapse: collapse; + border-spacing: 0 +} + +.cursor-p[data-v-bd96a8b0] { + cursor: pointer +} + +.aigc-fusion[data-v-bd96a8b0] { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + background-color: rgba(0, 0, 0, .8); + z-index: 1000 +} + +.aigc-fusion .aigc-fusion__popup[data-v-bd96a8b0] { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 884px; + height: 634px; + display: flex; + flex-direction: column; + padding: 16px; + box-sizing: border-box; + border-radius: 24px; + background-color: rgba(51, 51, 51, .85); + backdrop-filter: blur(20px) +} + +.aigc-fusion .aigc-fusion__title-wrapper[data-v-bd96a8b0] { + display: flex; + align-items: center; + margin-bottom: 4px +} + +.aigc-fusion .aigc-fusion__title-wrapper--text[data-v-bd96a8b0] { + color: rgba(255, 255, 255, .8); + font-size: 18px; + font-weight: 900 +} + +.aigc-fusion .aigc-fusion__title-wrapper--notice[data-v-bd96a8b0] { + margin: 0 4px 0 auto; + color: rgba(255, 255, 255, .4); + font-size: 12px; + font-weight: 400 +} + +.aigc-fusion .aigc-fusion__title-wrapper--close[data-v-bd96a8b0] { + width: 24px; + height: 24px; + cursor: pointer +} + +.aigc-fusion .aigc-fusion__tips-text[data-v-bd96a8b0] { + color: rgba(255, 255, 255, .8); + font-size: 14px; + font-weight: 900; + margin-bottom: 8px +} + +.aigc-fusion .aigc-fusion__control-wrapper[data-v-bd96a8b0] { + flex: 1; + display: flex; + border-radius: 24px +} + +.aigc-fusion .aigc-fusion__control-wrapper--img-wrapper[data-v-bd96a8b0] { + flex: 3; + display: flex; + flex-direction: column; + border-radius: 24px +} + +.aigc-fusion .aigc-fusion__control-wrapper--img-container[data-v-bd96a8b0] { + position: relative; + flex: 1; + display: flex; + justify-content: center; + background-color: rgba(255, 255, 255, .05); + overflow: hidden; + border-radius: 24px; + margin-bottom: 16px +} + +.aigc-fusion .aigc-fusion__control-wrapper--loading[data-v-bd96a8b0] { + padding: 50px 20px; + position: absolute; + left: 50%; + top: 50%; + color: rgba(255, 255, 255, .4); + transform: translate(-50%, -50%) +} + +.aigc-fusion .aigc-fusion__control-wrapper--img[data-v-bd96a8b0] { + width: 0 +} + +.aigc-fusion .aigc-fusion__control-wrapper--tools[data-v-bd96a8b0] { + display: flex; + align-self: center +} + +.aigc-fusion .aigc-fusion__control-wrapper--tools-container[data-v-bd96a8b0] { + width: 138px; + height: 32px; + border-radius: 10px; + background-color: rgba(255, 255, 255, .1); + display: flex; + align-items: center; + padding: 0 12px; + box-sizing: border-box; + margin-right: 8px +} + +.aigc-fusion .aigc-fusion__control-wrapper--tools-recover[data-v-bd96a8b0] { + color: rgba(255, 255, 255, .8); + font-size: 13px; + font-weight: 400; + cursor: pointer +} + +.aigc-fusion .aigc-fusion__control-wrapper--tools-icon[data-v-bd96a8b0] { + width: 16px; + height: 16px; + cursor: pointer; + opacity: .8 +} + +.aigc-fusion .aigc-fusion__control-wrapper--tools-icon[data-v-bd96a8b0]:hover { + opacity: 1 +} + +.aigc-fusion .aigc-fusion__control-wrapper--tools-icon[data-v-bd96a8b0]:nth-child(2) { + margin: 0 8px 0 22px +} + +.aigc-fusion .aigc-fusion__control-wrapper--tools-move[data-v-bd96a8b0] { + width: 32px; + height: 32px; + cursor: pointer; + opacity: .8 +} + +.aigc-fusion .aigc-fusion__control-wrapper--tools-move[data-v-bd96a8b0]:hover { + opacity: 1 +} + +.aigc-fusion .aigc-fusion__control-wrapper--side[data-v-bd96a8b0] { + flex: 2; + margin-left: 4px +} + +.aigc-fusion .aigc-fusion__control-wrapper--side-panel[data-v-bd96a8b0] { + width: 360px; + min-height: 84px; + padding: 16px; + box-sizing: border-box; + border-radius: 24px; + background-color: rgba(255, 255, 255, .05) +} + +.aigc-fusion .aigc-fusion__control-wrapper--side-panel.first-panel[data-v-bd96a8b0] { + margin-bottom: 4px +} + +.aigc-fusion .aigc-fusion__control-wrapper--side-wrapper[data-v-bd96a8b0] { + display: flex; + align-items: center +} + +.aigc-fusion .aigc-fusion__control-wrapper--side-button[data-v-bd96a8b0] { + width: 80px; + height: 32px; + border-radius: 34px; + background-color: rgba(255, 255, 255, .05); + color: #fff; + font-size: 12px; + font-weight: 400; + border: none; + outline: none; + cursor: pointer +} + +.aigc-fusion .aigc-fusion__control-wrapper--side-button.gap[data-v-bd96a8b0] { + margin: 0 auto 0 8px +} + +.aigc-fusion .aigc-fusion__control-wrapper--side-button.pen[data-v-bd96a8b0] { + margin: 0 8px 0 auto +} + +.aigc-fusion .aigc-fusion__control-wrapper--side-button.active[data-v-bd96a8b0] { + background-color: rgba(255, 255, 255, .15); + font-weight: 900; + color: rgba(255, 255, 255, .8) +} + +.aigc-fusion .aigc-fusion__control-wrapper--side-button.disabled[data-v-bd96a8b0] { + color: rgba(255, 255, 255, .3); + cursor: no-drop +} + +.aigc-fusion .aigc-fusion__control-wrapper--side-icon[data-v-bd96a8b0] { + width: 32px; + height: 32px; + cursor: pointer; + opacity: .8 +} + +.aigc-fusion .aigc-fusion__control-wrapper--side-icon[data-v-bd96a8b0]:hover { + opacity: 1 +} + +.aigc-fusion .aigc-fusion__control-wrapper--side-icon[data-v-bd96a8b0]:nth-child(4) { + margin: 0 8px +} + +.aigc-fusion .aigc-fusion__control-wrapper--side-text[data-v-bd96a8b0] { + color: rgba(255, 255, 255, .4); + font-size: 12px; + font-weight: 400; + line-height: 1.4; + margin-top: 8px; + padding-left: 4px +} + +.aigc-fusion .aigc-fusion__control-wrapper--side-title[data-v-bd96a8b0] { + color: rgba(255, 255, 255, .8); + font-size: 16px; + font-weight: 900 +} + +.aigc-fusion .aigc-fusion__control-wrapper--side-adjust[data-v-bd96a8b0] { + display: flex; + align-items: center; + justify-content: space-between; + margin: 16px 0 8px +} + +.aigc-fusion .aigc-fusion__control-wrapper--side-label[data-v-bd96a8b0] { + color: rgba(255, 255, 255, .8); + font-size: 14px; + font-weight: 400 +} + +.aigc-fusion .aigc-fusion__control-wrapper--side-value[data-v-bd96a8b0] { + width: 48px; + height: 32px; + line-height: 32px; + border-radius: 8px; + background-color: rgba(255, 255, 255, .05); + color: rgba(255, 255, 255, .8); + text-align: center; + font-size: 13px; + font-weight: 400 +} + +.aigc-fusion .aigc-fusion__control-wrapper--side-range[data-v-bd96a8b0]:focus-within .ant-slider-track { + background-color: #40fc43 +} + +.aigc-fusion .aigc-fusion__control-wrapper--side-range.ant-slider-horizontal[data-v-bd96a8b0], +.aigc-fusion .aigc-fusion__control-wrapper--side-range.ant-slider-horizontal .ant-slider-track[data-v-bd96a8b0] { + height: 6px +} + +.aigc-fusion .aigc-fusion__control-wrapper--side-range[data-v-bd96a8b0] .ant-slider-rail { + background-color: rgba(255, 255, 255, .05) +} + +.aigc-fusion .aigc-fusion__control-wrapper--side-range[data-v-bd96a8b0] .ant-slider-track { + background-color: rgba(255, 255, 255, .8) +} + +.aigc-fusion .aigc-fusion__control-wrapper--side-range[data-v-bd96a8b0] .ant-slider-handle { + top: -4px; + width: 14px; + height: 14px +} + +.aigc-fusion .aigc-fusion__control-wrapper--side-range[data-v-bd96a8b0] .ant-slider-handle:before { + width: 14px; + height: 14px +} + +.aigc-fusion .aigc-fusion__control-wrapper--side-range[data-v-bd96a8b0] .ant-slider-handle:after { + width: 14px; + height: 14px; + box-shadow: 0 0 0 1px rgba(255, 255, 255, .8); + background: rgb(51, 51, 51); + transform: translate(25%) +} + +.aigc-fusion .aigc-fusion__control-btn[data-v-bd96a8b0] { + position: absolute; + right: 16px; + bottom: 16px; + width: 160px; + height: 48px; + border-radius: 35px; + background-image: linear-gradient(135deg, #e5fa57 0%, #40fc43 100%); + color: #000; + font-size: 14px; + font-weight: 900; + font-family: PingFang SC; + line-height: 20px; + display: flex; + align-items: center; + justify-content: center; + border: none; + cursor: pointer +} + +.aigc-fusion .aigc-fusion__control-btn .mask-disable[data-v-bd96a8b0] { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + border-radius: 35px; + background-color: rgba(255, 255, 255, .6) +} + +.aigc-fusion .aigc-fusion__control-btn .icon[data-v-bd96a8b0] { + width: 16px; + margin-right: 2px +} + +.aigc-fusion .aigc-fusion__control-btn .txt[data-v-bd96a8b0] { + z-index: 2 +} + +.disabled[data-v-bd96a8b0] { + opacity: .5 !important +} + +.not-allowed[data-v-bd96a8b0] { + cursor: not-allowed !important +} + +html[data-v-ae8b2cf0], +body[data-v-ae8b2cf0], +div[data-v-ae8b2cf0], +span[data-v-ae8b2cf0], +applet[data-v-ae8b2cf0], +object[data-v-ae8b2cf0], +iframe[data-v-ae8b2cf0], +h1[data-v-ae8b2cf0], +h2[data-v-ae8b2cf0], +h3[data-v-ae8b2cf0], +h4[data-v-ae8b2cf0], +h5[data-v-ae8b2cf0], +h6[data-v-ae8b2cf0], +p[data-v-ae8b2cf0], +blockquote[data-v-ae8b2cf0], +pre[data-v-ae8b2cf0], +a[data-v-ae8b2cf0], +abbr[data-v-ae8b2cf0], +acronym[data-v-ae8b2cf0], +address[data-v-ae8b2cf0], +big[data-v-ae8b2cf0], +cite[data-v-ae8b2cf0], +code[data-v-ae8b2cf0], +del[data-v-ae8b2cf0], +dfn[data-v-ae8b2cf0], +em[data-v-ae8b2cf0], +img[data-v-ae8b2cf0], +ins[data-v-ae8b2cf0], +kbd[data-v-ae8b2cf0], +q[data-v-ae8b2cf0], +s[data-v-ae8b2cf0], +samp[data-v-ae8b2cf0], +small[data-v-ae8b2cf0], +strike[data-v-ae8b2cf0], +strong[data-v-ae8b2cf0], +sub[data-v-ae8b2cf0], +sup[data-v-ae8b2cf0], +tt[data-v-ae8b2cf0], +var[data-v-ae8b2cf0], +b[data-v-ae8b2cf0], +u[data-v-ae8b2cf0], +i[data-v-ae8b2cf0], +center[data-v-ae8b2cf0], +dl[data-v-ae8b2cf0], +dt[data-v-ae8b2cf0], +dd[data-v-ae8b2cf0], +ol[data-v-ae8b2cf0], +ul[data-v-ae8b2cf0], +li[data-v-ae8b2cf0], +fieldset[data-v-ae8b2cf0], +form[data-v-ae8b2cf0], +label[data-v-ae8b2cf0], +legend[data-v-ae8b2cf0], +table[data-v-ae8b2cf0], +caption[data-v-ae8b2cf0], +tbody[data-v-ae8b2cf0], +tfoot[data-v-ae8b2cf0], +thead[data-v-ae8b2cf0], +tr[data-v-ae8b2cf0], +th[data-v-ae8b2cf0], +td[data-v-ae8b2cf0], +article[data-v-ae8b2cf0], +aside[data-v-ae8b2cf0], +canvas[data-v-ae8b2cf0], +details[data-v-ae8b2cf0], +embed[data-v-ae8b2cf0], +figure[data-v-ae8b2cf0], +figcaption[data-v-ae8b2cf0], +footer[data-v-ae8b2cf0], +header[data-v-ae8b2cf0], +hgroup[data-v-ae8b2cf0], +menu[data-v-ae8b2cf0], +nav[data-v-ae8b2cf0], +output[data-v-ae8b2cf0], +ruby[data-v-ae8b2cf0], +section[data-v-ae8b2cf0], +summary[data-v-ae8b2cf0], +time[data-v-ae8b2cf0], +mark[data-v-ae8b2cf0], +audio[data-v-ae8b2cf0], +video[data-v-ae8b2cf0], +textarea[data-v-ae8b2cf0] { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline +} + +article[data-v-ae8b2cf0], +aside[data-v-ae8b2cf0], +details[data-v-ae8b2cf0], +figcaption[data-v-ae8b2cf0], +figure[data-v-ae8b2cf0], +footer[data-v-ae8b2cf0], +header[data-v-ae8b2cf0], +hgroup[data-v-ae8b2cf0], +menu[data-v-ae8b2cf0], +nav[data-v-ae8b2cf0], +section[data-v-ae8b2cf0] { + display: block +} + +body[data-v-ae8b2cf0] { + line-height: 1; + margin: 0; + font-family: PingFang SC, PingFangSC-Regular, SFUIText, Helvetica Neue, Helvetica, Arial, sans-serif +} + +ol[data-v-ae8b2cf0], +ul[data-v-ae8b2cf0] { + list-style: none +} + +blockquote[data-v-ae8b2cf0], +q[data-v-ae8b2cf0] { + quotes: none +} + +blockquote[data-v-ae8b2cf0]:before, +blockquote[data-v-ae8b2cf0]:after, +q[data-v-ae8b2cf0]:before, +q[data-v-ae8b2cf0]:after { + content: ""; + content: none +} + +table[data-v-ae8b2cf0] { + border-collapse: collapse; + border-spacing: 0 +} + +.cursor-p[data-v-ae8b2cf0] { + cursor: pointer +} + +.item-box[data-v-ae8b2cf0] { + width: 177px; + height: 177px; + display: flex; + align-items: center; + justify-content: center; + border-radius: 17px; + position: relative; + overflow: hidden; + box-sizing: border-box +} + +.active-item[data-v-ae8b2cf0] { + border: #40fc43 solid 2px +} + +.cover-img[data-v-ae8b2cf0] { + width: 100%; + height: 100%; + transition: all .2s linear; + object-position: center center; + object-fit: cover; + cursor: pointer +} + +.delete-icon[data-v-ae8b2cf0] { + display: none; + width: 32px; + height: 32px; + position: absolute; + top: 8px; + right: 8px; + cursor: pointer +} + +.bottom[data-v-ae8b2cf0] { + width: 100%; + height: 40px; + position: absolute; + bottom: 0; + display: flex; + align-items: center; + justify-content: center; + background: rgba(0, 0, 0, .5); + border-bottom-right-radius: 17px; + border-bottom-left-radius: 17px; + overflow: hidden; + backdrop-filter: blur(10px); + -webkit-backdrop-filter: blur(10px) +} + +.bottom .title[data-v-ae8b2cf0] { + color: rgba(255, 255, 255, .8); + font-weight: 300; + font-size: 14px; + max-width: 80%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis +} + +.bottom .edit-icon[data-v-ae8b2cf0] { + margin-left: 4px; + width: 16px; + height: 16px; + cursor: pointer +} + +.item-box:hover .cover-img[data-v-ae8b2cf0] { + transform: scale(1.2) +} + +.item-box:hover .delete-icon[data-v-ae8b2cf0] { + display: block +} + +html[data-v-4e123c96], +body[data-v-4e123c96], +div[data-v-4e123c96], +span[data-v-4e123c96], +applet[data-v-4e123c96], +object[data-v-4e123c96], +iframe[data-v-4e123c96], +h1[data-v-4e123c96], +h2[data-v-4e123c96], +h3[data-v-4e123c96], +h4[data-v-4e123c96], +h5[data-v-4e123c96], +h6[data-v-4e123c96], +p[data-v-4e123c96], +blockquote[data-v-4e123c96], +pre[data-v-4e123c96], +a[data-v-4e123c96], +abbr[data-v-4e123c96], +acronym[data-v-4e123c96], +address[data-v-4e123c96], +big[data-v-4e123c96], +cite[data-v-4e123c96], +code[data-v-4e123c96], +del[data-v-4e123c96], +dfn[data-v-4e123c96], +em[data-v-4e123c96], +img[data-v-4e123c96], +ins[data-v-4e123c96], +kbd[data-v-4e123c96], +q[data-v-4e123c96], +s[data-v-4e123c96], +samp[data-v-4e123c96], +small[data-v-4e123c96], +strike[data-v-4e123c96], +strong[data-v-4e123c96], +sub[data-v-4e123c96], +sup[data-v-4e123c96], +tt[data-v-4e123c96], +var[data-v-4e123c96], +b[data-v-4e123c96], +u[data-v-4e123c96], +i[data-v-4e123c96], +center[data-v-4e123c96], +dl[data-v-4e123c96], +dt[data-v-4e123c96], +dd[data-v-4e123c96], +ol[data-v-4e123c96], +ul[data-v-4e123c96], +li[data-v-4e123c96], +fieldset[data-v-4e123c96], +form[data-v-4e123c96], +label[data-v-4e123c96], +legend[data-v-4e123c96], +table[data-v-4e123c96], +caption[data-v-4e123c96], +tbody[data-v-4e123c96], +tfoot[data-v-4e123c96], +thead[data-v-4e123c96], +tr[data-v-4e123c96], +th[data-v-4e123c96], +td[data-v-4e123c96], +article[data-v-4e123c96], +aside[data-v-4e123c96], +canvas[data-v-4e123c96], +details[data-v-4e123c96], +embed[data-v-4e123c96], +figure[data-v-4e123c96], +figcaption[data-v-4e123c96], +footer[data-v-4e123c96], +header[data-v-4e123c96], +hgroup[data-v-4e123c96], +menu[data-v-4e123c96], +nav[data-v-4e123c96], +output[data-v-4e123c96], +ruby[data-v-4e123c96], +section[data-v-4e123c96], +summary[data-v-4e123c96], +time[data-v-4e123c96], +mark[data-v-4e123c96], +audio[data-v-4e123c96], +video[data-v-4e123c96], +textarea[data-v-4e123c96] { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline +} + +article[data-v-4e123c96], +aside[data-v-4e123c96], +details[data-v-4e123c96], +figcaption[data-v-4e123c96], +figure[data-v-4e123c96], +footer[data-v-4e123c96], +header[data-v-4e123c96], +hgroup[data-v-4e123c96], +menu[data-v-4e123c96], +nav[data-v-4e123c96], +section[data-v-4e123c96] { + display: block +} + +body[data-v-4e123c96] { + line-height: 1; + margin: 0; + font-family: PingFang SC, PingFangSC-Regular, SFUIText, Helvetica Neue, Helvetica, Arial, sans-serif +} + +ol[data-v-4e123c96], +ul[data-v-4e123c96] { + list-style: none +} + +blockquote[data-v-4e123c96], +q[data-v-4e123c96] { + quotes: none +} + +blockquote[data-v-4e123c96]:before, +blockquote[data-v-4e123c96]:after, +q[data-v-4e123c96]:before, +q[data-v-4e123c96]:after { + content: ""; + content: none +} + +table[data-v-4e123c96] { + border-collapse: collapse; + border-spacing: 0 +} + +.cursor-p[data-v-4e123c96] { + cursor: pointer +} + +.title[data-v-4e123c96] { + width: 366px; + box-sizing: border-box; + padding: 16px 0 0 16px; + color: rgba(255, 255, 255, .8); + font-size: 18px; + font-weight: 900 +} + +.modal-note[data-v-4e123c96] { + width: 334px; + font-size: 13px; + margin: 8px auto 0; + line-height: 1.4; + font-weight: 300 +} + +[data-theme=dark] .modal-note[data-v-4e123c96] { + color: rgba(255, 255, 255, .8) +} + +.cover-box[data-v-4e123c96] { + width: 200px; + height: 200px; + border-radius: 17px; + position: relative; + overflow: hidden; + box-sizing: border-box; + margin: 20px auto 12px +} + +[data-theme=dark] .cover-box[data-v-4e123c96] { + background: rgba(255, 255, 255, .1) +} + +.place-icon[data-v-4e123c96] { + width: 24px; + height: 24px; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%) translateY(-50%) +} + +.cover-img[data-v-4e123c96] { + width: 100%; + height: 100%; + object-position: center top; + object-fit: cover; + border-radius: 17px +} + +.change-tip[data-v-4e123c96] { + position: absolute; + bottom: 12px; + left: 50%; + transform: translate(-50%); + width: 176px; + height: 40px; + line-height: 38px; + text-align: center; + color: rgba(255, 255, 255, .8); + font-size: 13px; + border-radius: 53px; + border: 1px solid rgba(255, 255, 255, .6); + background: rgba(0, 0, 0, .7) +} + +.change-tip[data-v-4e123c96] .ant-upload-drag { + border: 0 +} + +.change-tip[data-v-4e123c96] .ant-upload-btn { + flex-direction: column; + display: flex; + align-items: center; + justify-content: center; + flex-wrap: wrap +} + +.create-tip[data-v-4e123c96], +.create-tip[data-v-4e123c96] .ant-upload-drag { + background: transparent +} + +.name-box[data-v-4e123c96] { + margin: 0 0 40px 16px; + display: flex; + align-items: center; + position: relative +} + +.form-title[data-v-4e123c96] { + color: #fff; + font-size: 14px; + line-height: 22px; + margin-right: 16px +} + +.input-name[data-v-4e123c96]:hover, +.input-name[data-v-4e123c96]:focus-within { + border: 1px solid rgba(255, 255, 255, .5) !important +} + +.input-name[data-v-4e123c96] ::placeholder { + color: rgba(255, 255, 255, .5) +} + +.input-name[data-v-4e123c96] { + width: 290px; + height: 32px; + box-sizing: border-box; + background: rgba(255, 255, 255, .05); + padding-left: 12px +} + +.input-name[data-v-4e123c96] .ant-input { + background: none; + color: rgba(255, 255, 255, .5); + font-size: 12px; + caret-color: #40fc43 +} + +.input-name[data-v-4e123c96] .ant-input-show-count-suffix { + color: rgba(255, 255, 255, .5); + font-size: 12px; + margin-right: 8px +} + +.input-name[data-v-4e123c96] .ant-input-affix-wrapper-status-error { + border: 1px solid #f11 +} + +.input-name.error-input[data-v-4e123c96] { + border: 1px solid #f11 !important +} + +.error-tip[data-v-4e123c96] { + color: #f11; + font-size: 12px; + position: absolute; + left: 44px; + bottom: -18px +} + +html[data-v-1fcd0d95], +body[data-v-1fcd0d95], +div[data-v-1fcd0d95], +span[data-v-1fcd0d95], +applet[data-v-1fcd0d95], +object[data-v-1fcd0d95], +iframe[data-v-1fcd0d95], +h1[data-v-1fcd0d95], +h2[data-v-1fcd0d95], +h3[data-v-1fcd0d95], +h4[data-v-1fcd0d95], +h5[data-v-1fcd0d95], +h6[data-v-1fcd0d95], +p[data-v-1fcd0d95], +blockquote[data-v-1fcd0d95], +pre[data-v-1fcd0d95], +a[data-v-1fcd0d95], +abbr[data-v-1fcd0d95], +acronym[data-v-1fcd0d95], +address[data-v-1fcd0d95], +big[data-v-1fcd0d95], +cite[data-v-1fcd0d95], +code[data-v-1fcd0d95], +del[data-v-1fcd0d95], +dfn[data-v-1fcd0d95], +em[data-v-1fcd0d95], +img[data-v-1fcd0d95], +ins[data-v-1fcd0d95], +kbd[data-v-1fcd0d95], +q[data-v-1fcd0d95], +s[data-v-1fcd0d95], +samp[data-v-1fcd0d95], +small[data-v-1fcd0d95], +strike[data-v-1fcd0d95], +strong[data-v-1fcd0d95], +sub[data-v-1fcd0d95], +sup[data-v-1fcd0d95], +tt[data-v-1fcd0d95], +var[data-v-1fcd0d95], +b[data-v-1fcd0d95], +u[data-v-1fcd0d95], +i[data-v-1fcd0d95], +center[data-v-1fcd0d95], +dl[data-v-1fcd0d95], +dt[data-v-1fcd0d95], +dd[data-v-1fcd0d95], +ol[data-v-1fcd0d95], +ul[data-v-1fcd0d95], +li[data-v-1fcd0d95], +fieldset[data-v-1fcd0d95], +form[data-v-1fcd0d95], +label[data-v-1fcd0d95], +legend[data-v-1fcd0d95], +table[data-v-1fcd0d95], +caption[data-v-1fcd0d95], +tbody[data-v-1fcd0d95], +tfoot[data-v-1fcd0d95], +thead[data-v-1fcd0d95], +tr[data-v-1fcd0d95], +th[data-v-1fcd0d95], +td[data-v-1fcd0d95], +article[data-v-1fcd0d95], +aside[data-v-1fcd0d95], +canvas[data-v-1fcd0d95], +details[data-v-1fcd0d95], +embed[data-v-1fcd0d95], +figure[data-v-1fcd0d95], +figcaption[data-v-1fcd0d95], +footer[data-v-1fcd0d95], +header[data-v-1fcd0d95], +hgroup[data-v-1fcd0d95], +menu[data-v-1fcd0d95], +nav[data-v-1fcd0d95], +output[data-v-1fcd0d95], +ruby[data-v-1fcd0d95], +section[data-v-1fcd0d95], +summary[data-v-1fcd0d95], +time[data-v-1fcd0d95], +mark[data-v-1fcd0d95], +audio[data-v-1fcd0d95], +video[data-v-1fcd0d95], +textarea[data-v-1fcd0d95] { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline +} + +article[data-v-1fcd0d95], +aside[data-v-1fcd0d95], +details[data-v-1fcd0d95], +figcaption[data-v-1fcd0d95], +figure[data-v-1fcd0d95], +footer[data-v-1fcd0d95], +header[data-v-1fcd0d95], +hgroup[data-v-1fcd0d95], +menu[data-v-1fcd0d95], +nav[data-v-1fcd0d95], +section[data-v-1fcd0d95] { + display: block +} + +body[data-v-1fcd0d95] { + line-height: 1; + margin: 0; + font-family: PingFang SC, PingFangSC-Regular, SFUIText, Helvetica Neue, Helvetica, Arial, sans-serif +} + +ol[data-v-1fcd0d95], +ul[data-v-1fcd0d95] { + list-style: none +} + +blockquote[data-v-1fcd0d95], +q[data-v-1fcd0d95] { + quotes: none +} + +blockquote[data-v-1fcd0d95]:before, +blockquote[data-v-1fcd0d95]:after, +q[data-v-1fcd0d95]:before, +q[data-v-1fcd0d95]:after { + content: ""; + content: none +} + +table[data-v-1fcd0d95] { + border-collapse: collapse; + border-spacing: 0 +} + +.cursor-p[data-v-1fcd0d95] { + cursor: pointer +} + +.icon-img[data-v-1fcd0d95] { + cursor: pointer; + width: 16px; + height: 16px; + margin-left: 2px; + z-index: 1 +} + +.pop-card[data-v-1fcd0d95] { + background-color: rgba(0, 0, 0, 0); + --antd-arrow-background-color: rgba(255, 255, 255, .15) +} + +html[data-v-d0c3a6f0], +body[data-v-d0c3a6f0], +div[data-v-d0c3a6f0], +span[data-v-d0c3a6f0], +applet[data-v-d0c3a6f0], +object[data-v-d0c3a6f0], +iframe[data-v-d0c3a6f0], +h1[data-v-d0c3a6f0], +h2[data-v-d0c3a6f0], +h3[data-v-d0c3a6f0], +h4[data-v-d0c3a6f0], +h5[data-v-d0c3a6f0], +h6[data-v-d0c3a6f0], +p[data-v-d0c3a6f0], +blockquote[data-v-d0c3a6f0], +pre[data-v-d0c3a6f0], +a[data-v-d0c3a6f0], +abbr[data-v-d0c3a6f0], +acronym[data-v-d0c3a6f0], +address[data-v-d0c3a6f0], +big[data-v-d0c3a6f0], +cite[data-v-d0c3a6f0], +code[data-v-d0c3a6f0], +del[data-v-d0c3a6f0], +dfn[data-v-d0c3a6f0], +em[data-v-d0c3a6f0], +img[data-v-d0c3a6f0], +ins[data-v-d0c3a6f0], +kbd[data-v-d0c3a6f0], +q[data-v-d0c3a6f0], +s[data-v-d0c3a6f0], +samp[data-v-d0c3a6f0], +small[data-v-d0c3a6f0], +strike[data-v-d0c3a6f0], +strong[data-v-d0c3a6f0], +sub[data-v-d0c3a6f0], +sup[data-v-d0c3a6f0], +tt[data-v-d0c3a6f0], +var[data-v-d0c3a6f0], +b[data-v-d0c3a6f0], +u[data-v-d0c3a6f0], +i[data-v-d0c3a6f0], +center[data-v-d0c3a6f0], +dl[data-v-d0c3a6f0], +dt[data-v-d0c3a6f0], +dd[data-v-d0c3a6f0], +ol[data-v-d0c3a6f0], +ul[data-v-d0c3a6f0], +li[data-v-d0c3a6f0], +fieldset[data-v-d0c3a6f0], +form[data-v-d0c3a6f0], +label[data-v-d0c3a6f0], +legend[data-v-d0c3a6f0], +table[data-v-d0c3a6f0], +caption[data-v-d0c3a6f0], +tbody[data-v-d0c3a6f0], +tfoot[data-v-d0c3a6f0], +thead[data-v-d0c3a6f0], +tr[data-v-d0c3a6f0], +th[data-v-d0c3a6f0], +td[data-v-d0c3a6f0], +article[data-v-d0c3a6f0], +aside[data-v-d0c3a6f0], +canvas[data-v-d0c3a6f0], +details[data-v-d0c3a6f0], +embed[data-v-d0c3a6f0], +figure[data-v-d0c3a6f0], +figcaption[data-v-d0c3a6f0], +footer[data-v-d0c3a6f0], +header[data-v-d0c3a6f0], +hgroup[data-v-d0c3a6f0], +menu[data-v-d0c3a6f0], +nav[data-v-d0c3a6f0], +output[data-v-d0c3a6f0], +ruby[data-v-d0c3a6f0], +section[data-v-d0c3a6f0], +summary[data-v-d0c3a6f0], +time[data-v-d0c3a6f0], +mark[data-v-d0c3a6f0], +audio[data-v-d0c3a6f0], +video[data-v-d0c3a6f0], +textarea[data-v-d0c3a6f0] { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline +} + +article[data-v-d0c3a6f0], +aside[data-v-d0c3a6f0], +details[data-v-d0c3a6f0], +figcaption[data-v-d0c3a6f0], +figure[data-v-d0c3a6f0], +footer[data-v-d0c3a6f0], +header[data-v-d0c3a6f0], +hgroup[data-v-d0c3a6f0], +menu[data-v-d0c3a6f0], +nav[data-v-d0c3a6f0], +section[data-v-d0c3a6f0] { + display: block +} + +body[data-v-d0c3a6f0] { + line-height: 1; + margin: 0; + font-family: PingFang SC, PingFangSC-Regular, SFUIText, Helvetica Neue, Helvetica, Arial, sans-serif +} + +ol[data-v-d0c3a6f0], +ul[data-v-d0c3a6f0] { + list-style: none +} + +blockquote[data-v-d0c3a6f0], +q[data-v-d0c3a6f0] { + quotes: none +} + +blockquote[data-v-d0c3a6f0]:before, +blockquote[data-v-d0c3a6f0]:after, +q[data-v-d0c3a6f0]:before, +q[data-v-d0c3a6f0]:after { + content: ""; + content: none +} + +table[data-v-d0c3a6f0] { + border-collapse: collapse; + border-spacing: 0 +} + +.cursor-p[data-v-d0c3a6f0] { + cursor: pointer +} + +.aigc-control-box[data-v-d0c3a6f0] { + position: relative; + height: 240px; + flex-basis: calc(20% - 8px); + min-width: 266px; + border-radius: 17px; + color: #40fc43 +} + +[data-theme=dark] .aigc-control-box[data-v-d0c3a6f0] { + background: rgba(255, 255, 255, .05) +} + +.aigc-control-box .aigc-control-box__top[data-v-d0c3a6f0] { + width: calc(100% - 32px); + margin: 20px 16px 0; + display: flex +} + +.aigc-control-box .aigc-control-box__top .aigc-control-box__title[data-v-d0c3a6f0] { + font-size: 14px; + font-weight: 900 +} + +[data-theme=dark] .aigc-control-box .aigc-control-box__top .aigc-control-box__title[data-v-d0c3a6f0] { + color: rgba(255, 255, 255, .8) +} + +.aigc-control-box .aigc-control-box__top .aigc-control-box__tip-icon[data-v-d0c3a6f0] { + margin-left: 2px +} + +.aigc-control-box .aigc-control-box__top .aigc-control-box__switch[data-v-d0c3a6f0] { + margin: 0 0 0 auto; + width: 40px; + height: 20px; + background-color: rgba(255, 255, 255, .15) +} + +.aigc-control-box .aigc-control-box__top[data-v-d0c3a6f0] .ant-switch.ant-switch-checked { + background: rgba(64, 252, 67, .5) +} + +.aigc-control-box .aigc-control-box__top[data-v-d0c3a6f0] .ant-switch-handle:before { + opacity: .75; + transform: translateY(-1px) +} + +.aigc-control-box .aigc-control-box__content[data-v-d0c3a6f0] { + position: relative; + width: 90%; + height: 119px; + margin: 8px auto 0; + display: flex; + align-items: center; + border-radius: 9px; + border: .5px solid rgba(255, 255, 255, .1) +} + +.aigc-control-box .aigc-control-box__mask-drop[data-v-d0c3a6f0] { + position: absolute; + left: 0; + right: 0; + bottom: 0; + top: 0; + z-index: 888; + border-radius: 24px; + pointer-events: none +} + +[data-theme=dark] .aigc-control-box .aigc-control-box__mask-drop[data-v-d0c3a6f0] { + background: rgba(255, 255, 255, .2) +} + +.aigc-control-box .aigc-control-box__ant-upload[data-v-d0c3a6f0] { + width: 100%; + height: 100% +} + +.aigc-control-box .aigc-control-box__ant-upload[data-v-d0c3a6f0] .ant-upload { + padding: 0 +} + +.aigc-control-box .aigc-control-box__ant-upload[data-v-d0c3a6f0] .ant-upload-drag { + border: 0 +} + +.aigc-control-box .aigc-control-box__ant-upload[data-v-d0c3a6f0] .ant-upload-btn { + flex-direction: column; + display: flex; + align-items: center; + justify-content: center; + flex-wrap: wrap +} + +.aigc-control-box .aigc-control-box__empty[data-v-d0c3a6f0] { + width: fit-content; + margin: 0 auto; + text-align: center; + font-size: 13px +} + +[data-theme=dark] .aigc-control-box .aigc-control-box__empty[data-v-d0c3a6f0] { + color: rgba(255, 255, 255, .5) +} + +.aigc-control-box .aigc-control-box__empty-icon[data-v-d0c3a6f0] { + width: 24px; + height: 24px; + pointer-events: none +} + +.aigc-control-box .aigc-control-box__empty-text[data-v-d0c3a6f0] { + margin-top: 4px; + pointer-events: none +} + +.aigc-control-box .aigc-control-box__bottom[data-v-d0c3a6f0] { + width: 90%; + margin: 8px auto 0 +} + +.aigc-control-box .aigc-control-box__info[data-v-d0c3a6f0] { + display: flex; + justify-content: space-between; + align-items: center; + font-size: 14px +} + +[data-theme=dark] .aigc-control-box .aigc-control-box__info[data-v-d0c3a6f0] { + color: rgba(255, 255, 255, .8) +} + +.aigc-control-box--inputshort[data-v-d0c3a6f0] { + margin-bottom: 8px; + width: 48px; + height: 32px; + border-radius: 8px; + background: rgba(255, 255, 255, .05); + color: rgba(255, 255, 255, .8) +} + +.aigc-control-box--inputshort[data-v-d0c3a6f0] .ant-input-number-handler-wrap { + visibility: hidden +} + +.aigc-control-box--inputshort[data-v-d0c3a6f0] .ant-input-number-input { + padding: 0; + text-align: center +} + +.aigc-control-box .aigc-control-box__up-box[data-v-d0c3a6f0] { + width: 100%; + height: 100%; + display: flex; + align-items: center; + justify-content: center; + pointer-events: none +} + +.aigc-control-box .aigc-control-box__loading-pre[data-v-d0c3a6f0] { + margin: 0 auto; + width: 80%; + height: 100% +} + +.aigc-control-box .aigc-control-box__picture[data-v-d0c3a6f0] { + width: 100%; + height: 100%; + pointer-events: none +} + +.aigc-control-box .aigc-control-box__slider[data-v-d0c3a6f0] { + width: 100%; + height: 4px; + margin-top: 8px +} + +.aigc-control-box .aigc-control-box__slider[data-v-d0c3a6f0] .ant-slider-track { + top: 4px; + background-color: rgba(255, 255, 255, .5) +} + +.aigc-control-box .aigc-control-box__slider[data-v-d0c3a6f0] .ant-slider-track:after { + box-shadow: none +} + +.aigc-control-box .aigc-control-box__slider[data-v-d0c3a6f0] .ant-slider-step { + background-color: rgba(255, 255, 255, .05) +} + +.aigc-control-box .aigc-control-box__slider[data-v-d0c3a6f0] .ant-slider-handle { + width: 16px; + height: 16px +} + +.aigc-control-box .aigc-control-box__slider[data-v-d0c3a6f0] .ant-slider-handle:after { + box-shadow: 0 0 0 1px rgba(255, 255, 255, .8); + background: rgb(51, 51, 51); + transform: translate(25%) +} + +.aigc-control-box .aigc-control-box__slider[data-v-d0c3a6f0] .ant-slider-handle:hover:after { + box-shadow: 0 0 0 1px #fff +} + +.aigc-control-box .aigc-control-box__slider[data-v-d0c3a6f0]:focus-within .ant-slider-track { + top: 4px; + background-color: #40fc43 +} + +.risk-default-img[data-v-d0c3a6f0] { + width: 169px +} + +html[data-v-622eff0c], +body[data-v-622eff0c], +div[data-v-622eff0c], +span[data-v-622eff0c], +applet[data-v-622eff0c], +object[data-v-622eff0c], +iframe[data-v-622eff0c], +h1[data-v-622eff0c], +h2[data-v-622eff0c], +h3[data-v-622eff0c], +h4[data-v-622eff0c], +h5[data-v-622eff0c], +h6[data-v-622eff0c], +p[data-v-622eff0c], +blockquote[data-v-622eff0c], +pre[data-v-622eff0c], +a[data-v-622eff0c], +abbr[data-v-622eff0c], +acronym[data-v-622eff0c], +address[data-v-622eff0c], +big[data-v-622eff0c], +cite[data-v-622eff0c], +code[data-v-622eff0c], +del[data-v-622eff0c], +dfn[data-v-622eff0c], +em[data-v-622eff0c], +img[data-v-622eff0c], +ins[data-v-622eff0c], +kbd[data-v-622eff0c], +q[data-v-622eff0c], +s[data-v-622eff0c], +samp[data-v-622eff0c], +small[data-v-622eff0c], +strike[data-v-622eff0c], +strong[data-v-622eff0c], +sub[data-v-622eff0c], +sup[data-v-622eff0c], +tt[data-v-622eff0c], +var[data-v-622eff0c], +b[data-v-622eff0c], +u[data-v-622eff0c], +i[data-v-622eff0c], +center[data-v-622eff0c], +dl[data-v-622eff0c], +dt[data-v-622eff0c], +dd[data-v-622eff0c], +ol[data-v-622eff0c], +ul[data-v-622eff0c], +li[data-v-622eff0c], +fieldset[data-v-622eff0c], +form[data-v-622eff0c], +label[data-v-622eff0c], +legend[data-v-622eff0c], +table[data-v-622eff0c], +caption[data-v-622eff0c], +tbody[data-v-622eff0c], +tfoot[data-v-622eff0c], +thead[data-v-622eff0c], +tr[data-v-622eff0c], +th[data-v-622eff0c], +td[data-v-622eff0c], +article[data-v-622eff0c], +aside[data-v-622eff0c], +canvas[data-v-622eff0c], +details[data-v-622eff0c], +embed[data-v-622eff0c], +figure[data-v-622eff0c], +figcaption[data-v-622eff0c], +footer[data-v-622eff0c], +header[data-v-622eff0c], +hgroup[data-v-622eff0c], +menu[data-v-622eff0c], +nav[data-v-622eff0c], +output[data-v-622eff0c], +ruby[data-v-622eff0c], +section[data-v-622eff0c], +summary[data-v-622eff0c], +time[data-v-622eff0c], +mark[data-v-622eff0c], +audio[data-v-622eff0c], +video[data-v-622eff0c], +textarea[data-v-622eff0c] { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline +} + +article[data-v-622eff0c], +aside[data-v-622eff0c], +details[data-v-622eff0c], +figcaption[data-v-622eff0c], +figure[data-v-622eff0c], +footer[data-v-622eff0c], +header[data-v-622eff0c], +hgroup[data-v-622eff0c], +menu[data-v-622eff0c], +nav[data-v-622eff0c], +section[data-v-622eff0c] { + display: block +} + +body[data-v-622eff0c] { + line-height: 1; + margin: 0; + font-family: PingFang SC, PingFangSC-Regular, SFUIText, Helvetica Neue, Helvetica, Arial, sans-serif +} + +ol[data-v-622eff0c], +ul[data-v-622eff0c] { + list-style: none +} + +blockquote[data-v-622eff0c], +q[data-v-622eff0c] { + quotes: none +} + +blockquote[data-v-622eff0c]:before, +blockquote[data-v-622eff0c]:after, +q[data-v-622eff0c]:before, +q[data-v-622eff0c]:after { + content: ""; + content: none +} + +table[data-v-622eff0c] { + border-collapse: collapse; + border-spacing: 0 +} + +.cursor-p[data-v-622eff0c] { + cursor: pointer +} + +.aigc-container[data-v-622eff0c] { + font-family: PingFang SC; + height: 100%; + overflow: auto +} + +.aigc-container .aigc-container__header[data-v-622eff0c] { + margin: 19px 0 0 16px; + color: #d0d1d4; + display: flex; + font-size: 16px; + font-weight: 300 +} + +.aigc-container .aigc-container__tab[data-v-622eff0c] { + cursor: pointer; + height: 26px; + width: fit-content; + position: relative +} + +.aigc-container .aigc-container__tab[data-v-622eff0c]:hover { + color: #fff +} + +.aigc-container .aigc-container__tab[data-v-622eff0c]:nth-child(1) { + margin-right: 32px +} + +.aigc-container .aigc-container__tab.active-tab[data-v-622eff0c] { + font-weight: 400; + color: #40fc43 +} + +.aigc-container .aigc-container__smile-icon[data-v-622eff0c] { + position: absolute; + width: 19px; + height: 5px; + bottom: 0; + left: 50%; + transform: translate(-50%) +} + +.aigc-container .aigc-container__star-icon[data-v-622eff0c] { + position: absolute; + width: 20px; + height: 20px; + right: -20px; + top: -4px +} + +.aigc-container .aigc-container__tabs-box[data-v-622eff0c] { + display: flex; + margin: 8px 16px 0; + align-items: center +} + +.aigc-container .aigc-container__sub-tab[data-v-622eff0c] { + width: 80px; + height: 32px; + border-radius: 34px; + background: rgba(255, 255, 255, .05); + font-size: 12px; + color: #fff; + font-weight: 300; + opacity: .8; + text-align: center; + line-height: 32px; + cursor: pointer +} + +.aigc-container .aigc-container__sub-tab[data-v-622eff0c]:hover { + color: #fff; + background: rgba(255, 255, 255, .15) +} + +.aigc-container .aigc-container__sub-tab[data-v-622eff0c]:nth-child(1) { + margin-right: 8px +} + +.aigc-container .aigc-container__sub-tab[data-v-622eff0c]:nth-child(2) { + margin-right: auto +} + +.aigc-container .aigc-container__sub-tab.active-sub-tab[data-v-622eff0c] { + background: rgba(255, 255, 255, .15); + font-weight: 900; + opacity: .8 +} + +.aigc-container .aigc-container__formula[data-v-622eff0c] { + overflow: auto; + height: calc(100% - 45px) +} + +.aigc-container .aigc-container__recomm-fml[data-v-622eff0c] { + display: flex; + flex-wrap: wrap; + margin: 16px 0 0 8px; + overflow-y: auto; + height: calc(100% - 56px) +} + +.aigc-container .aigc-container__my-fml[data-v-622eff0c] { + display: flex; + flex-wrap: wrap; + margin: 16px 0 0 8px; + overflow-y: auto; + height: 217px +} + +.aigc-container .aigc-container__empty-fml[data-v-622eff0c] { + width: fit-content; + margin: 30px auto 0 +} + +.aigc-container .aigc-container__empty-icon[data-v-622eff0c] { + width: 74px; + height: 74px; + display: block; + margin: 0 auto +} + +.aigc-container .aigc-container__empty-text[data-v-622eff0c] { + text-align: center; + margin-top: 12px; + color: rgba(255, 255, 255, .6); + font-weight: 300; + font-size: 11px +} + +.aigc-container .aigc-container__fml-item[data-v-622eff0c] { + margin-right: 8px; + margin-bottom: 7px +} + +.aigc-container .aigc-container__fml-item[data-v-622eff0c]:nth-last-child(1) { + margin-bottom: 20px +} + +.aigc-container .aigc-container__control-list[data-v-622eff0c] { + width: 100%; + box-sizing: border-box; + display: flex; + flex-wrap: wrap; + margin: 16px 0; + padding: 0 18px +} + +.aigc-container .aigc-container__control-item[data-v-622eff0c] { + width: 266px; + margin-right: 8px; + margin-bottom: 7px +} + +.modal-title[data-v-622eff0c] { + width: fit-content; + margin-top: 40px; + width: 366px; + text-align: center; + font-size: 18px; + line-height: 1.5; + font-weight: 900; + display: flex; + align-items: center; + justify-content: center +} + +[data-theme=dark] .modal-title[data-v-622eff0c] { + color: rgba(255, 255, 255, .8) +} + +.modal-title .name[data-v-622eff0c] { + max-width: 200px; + display: block; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis +} + +.modal-sub-title[data-v-622eff0c] { + width: fit-content; + margin: 4px auto 34px; + font-size: 14px; + font-weight: 300; + line-height: 1.2 +} + +[data-theme=dark] .modal-sub-title[data-v-622eff0c] { + color: rgba(255, 255, 255, .8) +} + +html[data-v-6b683fca], +body[data-v-6b683fca], +div[data-v-6b683fca], +span[data-v-6b683fca], +applet[data-v-6b683fca], +object[data-v-6b683fca], +iframe[data-v-6b683fca], +h1[data-v-6b683fca], +h2[data-v-6b683fca], +h3[data-v-6b683fca], +h4[data-v-6b683fca], +h5[data-v-6b683fca], +h6[data-v-6b683fca], +p[data-v-6b683fca], +blockquote[data-v-6b683fca], +pre[data-v-6b683fca], +a[data-v-6b683fca], +abbr[data-v-6b683fca], +acronym[data-v-6b683fca], +address[data-v-6b683fca], +big[data-v-6b683fca], +cite[data-v-6b683fca], +code[data-v-6b683fca], +del[data-v-6b683fca], +dfn[data-v-6b683fca], +em[data-v-6b683fca], +img[data-v-6b683fca], +ins[data-v-6b683fca], +kbd[data-v-6b683fca], +q[data-v-6b683fca], +s[data-v-6b683fca], +samp[data-v-6b683fca], +small[data-v-6b683fca], +strike[data-v-6b683fca], +strong[data-v-6b683fca], +sub[data-v-6b683fca], +sup[data-v-6b683fca], +tt[data-v-6b683fca], +var[data-v-6b683fca], +b[data-v-6b683fca], +u[data-v-6b683fca], +i[data-v-6b683fca], +center[data-v-6b683fca], +dl[data-v-6b683fca], +dt[data-v-6b683fca], +dd[data-v-6b683fca], +ol[data-v-6b683fca], +ul[data-v-6b683fca], +li[data-v-6b683fca], +fieldset[data-v-6b683fca], +form[data-v-6b683fca], +label[data-v-6b683fca], +legend[data-v-6b683fca], +table[data-v-6b683fca], +caption[data-v-6b683fca], +tbody[data-v-6b683fca], +tfoot[data-v-6b683fca], +thead[data-v-6b683fca], +tr[data-v-6b683fca], +th[data-v-6b683fca], +td[data-v-6b683fca], +article[data-v-6b683fca], +aside[data-v-6b683fca], +canvas[data-v-6b683fca], +details[data-v-6b683fca], +embed[data-v-6b683fca], +figure[data-v-6b683fca], +figcaption[data-v-6b683fca], +footer[data-v-6b683fca], +header[data-v-6b683fca], +hgroup[data-v-6b683fca], +menu[data-v-6b683fca], +nav[data-v-6b683fca], +output[data-v-6b683fca], +ruby[data-v-6b683fca], +section[data-v-6b683fca], +summary[data-v-6b683fca], +time[data-v-6b683fca], +mark[data-v-6b683fca], +audio[data-v-6b683fca], +video[data-v-6b683fca], +textarea[data-v-6b683fca] { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline +} + +article[data-v-6b683fca], +aside[data-v-6b683fca], +details[data-v-6b683fca], +figcaption[data-v-6b683fca], +figure[data-v-6b683fca], +footer[data-v-6b683fca], +header[data-v-6b683fca], +hgroup[data-v-6b683fca], +menu[data-v-6b683fca], +nav[data-v-6b683fca], +section[data-v-6b683fca] { + display: block +} + +body[data-v-6b683fca] { + line-height: 1; + margin: 0; + font-family: PingFang SC, PingFangSC-Regular, SFUIText, Helvetica Neue, Helvetica, Arial, sans-serif +} + +ol[data-v-6b683fca], +ul[data-v-6b683fca] { + list-style: none +} + +blockquote[data-v-6b683fca], +q[data-v-6b683fca] { + quotes: none +} + +blockquote[data-v-6b683fca]:before, +blockquote[data-v-6b683fca]:after, +q[data-v-6b683fca]:before, +q[data-v-6b683fca]:after { + content: ""; + content: none +} + +table[data-v-6b683fca] { + border-collapse: collapse; + border-spacing: 0 +} + +.cursor-p[data-v-6b683fca] { + cursor: pointer +} + +.aigc-promptPop[data-v-6b683fca] { + position: absolute; + box-sizing: border-box; + border-radius: 24px; + color: #fff; + z-index: 9999; + width: 400px; + height: 370px; + right: 290px; + top: 200px; + border: .5px solid rgba(255, 255, 255, .4); + background: rgba(8, 13, 27, .4); + backdrop-filter: blur(20px); + padding: 16px 16px 0; + font-family: PingFang SC; + overflow-x: hidden +} + +.aigc-promptPop .aigc-promptPop__head[data-v-6b683fca] { + color: rgba(255, 255, 255, .8); + font-size: 16px; + font-style: normal; + font-weight: 500; + line-height: normal; + display: flex; + justify-content: space-between; + align-items: center +} + +.aigc-promptPop .aigc-promptPop__head--icon[data-v-6b683fca] { + width: 24px; + height: 24px; + cursor: pointer +} + +.aigc-promptPop .aigc-promptPop__body[data-v-6b683fca] { + height: 328px; + overflow-y: scroll +} + +.aigc-promptPop .aigc-promptPop__box[data-v-6b683fca] { + margin-top: 17px +} + +.aigc-promptPop .aigc-promptPop__box--title[data-v-6b683fca] { + font-size: 14px; + font-weight: 500 +} + +.aigc-promptPop .aigc-promptPop__box--content[data-v-6b683fca] { + padding-top: 12px; + display: flex; + flex-wrap: wrap; + align-content: flex-start; + align-items: center; + font-size: 13px +} + +.aigc-promptPop .aigc-promptPop__box--content .text[data-v-6b683fca] { + background-color: rgba(255, 255, 255, .1); + width: fit-content; + padding: 7px 10px; + border-radius: 4px; + margin-right: 8px; + margin-bottom: 8px; + line-height: 14px; + word-break: break-all; + border: 1px solid transparent; + cursor: pointer; + font-weight: 400; + opacity: .8 +} + +.aigc-promptPop .aigc-promptPop__box--content .text.selected[data-v-6b683fca] { + border: 1px solid #40fc43; + opacity: 1 +} + +html, +body, +div, +span, +applet, +object, +iframe, +h1, +h2, +h3, +h4, +h5, +h6, +p, +blockquote, +pre, +a, +abbr, +acronym, +address, +big, +cite, +code, +del, +dfn, +em, +img, +ins, +kbd, +q, +s, +samp, +small, +strike, +strong, +sub, +sup, +tt, +var, +b, +u, +i, +center, +dl, +dt, +dd, +ol, +ul, +li, +fieldset, +form, +label, +legend, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td, +article, +aside, +canvas, +details, +embed, +figure, +figcaption, +footer, +header, +hgroup, +menu, +nav, +output, +ruby, +section, +summary, +time, +mark, +audio, +video, +textarea { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline +} + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +menu, +nav, +section { + display: block +} + +body { + line-height: 1; + margin: 0; + font-family: PingFang SC, PingFangSC-Regular, SFUIText, Helvetica Neue, Helvetica, Arial, sans-serif +} + +ol, +ul { + list-style: none +} + +blockquote, +q { + quotes: none +} + +blockquote:before, +blockquote:after, +q:before, +q:after { + content: ""; + content: none +} + +table { + border-collapse: collapse; + border-spacing: 0 +} + +.cursor-p { + cursor: pointer +} + +.aigc-prompt .aigc-prompt__head { + display: flex; + justify-content: space-between; + font-size: 14px; + margin-bottom: 8px; + margin-top: 16px +} + +.aigc-prompt .aigc-prompt__head--text { + display: flex; + align-items: center +} + +.aigc-prompt .aigc-prompt__head--clear { + cursor: pointer; + font-weight: 400; + font-size: 12px; + width: 44px; + height: 26px; + line-height: 26px; + text-align: center; + border-radius: 82px; + border: 1px solid rgba(255, 255, 255, .1019607843); + color: rgba(255, 255, 255, .54) +} + +.aigc-prompt .aigc-prompt__head--clear:hover { + border-color: rgba(255, 255, 255, .29) +} + +.aigc-prompt .input-box { + flex-grow: 1; + padding: 0; + min-width: 40px; + position: relative; + display: inline-block +} + +.aigc-prompt .input-box span { + display: inline-block; + height: 100%; + visibility: hidden +} + +.aigc-prompt .input-box input { + padding-left: 0; + padding-right: 0; + color: #fff; + display: inline-block; + position: absolute; + width: 100%; + height: 40px; + background: transparent; + min-width: 40px; + border: none; + left: 0; + top: -12px +} + +.aigc-prompt .aigc-prompt__base--textarea { + font-weight: lighter; + position: relative; + padding: 0 8px 12px; + background-color: rgba(255, 255, 255, .05); + color: rgba(255, 255, 255, .8); + border-radius: 9px; + font-size: 13px; + height: 200px; + border: 1px solid transparent +} + +.aigc-prompt .aigc-prompt__base--textarea:hover { + border-color: rgba(255, 255, 255, .4) +} + +.aigc-prompt .aigc-prompt__base--textarea.verify { + border-color: #fff; + background-color: rgba(255, 255, 255, .1) +} + +.aigc-prompt .aigc-prompt__base--textarea .textarea { + height: 170px; + padding-top: 12px; + display: flex; + flex-wrap: wrap; + align-content: flex-start; + overflow-y: scroll; + overflow-x: hidden; + outline: 0; + caret-color: #40fc43; + line-height: 34px +} + +.aigc-prompt .aigc-prompt__base--textarea .textarea:after { + content: attr(placeholder); + color: rgba(255, 255, 255, .5); + line-height: 24px +} + +.aigc-prompt .aigc-prompt__base--textarea .notice-tag { + font-weight: 400; + background-color: rgba(255, 255, 255, .1); + width: fit-content; + min-height: 32px; + padding: 9px 6px 9px 10px; + border-radius: 8px; + margin-right: 8px; + margin-bottom: 8px; + line-height: 14px; + word-break: break-all +} + +.aigc-prompt .aigc-prompt__base--textarea .notice-tag :deep(span) { + display: flex; + align-items: center +} + +.aigc-prompt .aigc-prompt__base--textarea .notice-tag__delete { + margin-left: 3px; + width: 16px; + height: 16px; + z-index: 1 +} + +.aigc-prompt .aigc-prompt__base--textarea .notice-tag .notice-tips { + font-size: 13px; + position: relative; + display: flex; + align-items: center +} + +.aigc-prompt .aigc-prompt__base--textarea .notice-tag .notice-tips .notice-weight { + line-height: 12px; + font-size: 12px; + border-radius: 10px; + background: #3d413f; + padding: 2px 5px; + min-width: 16px; + min-height: 16px; + text-align: center; + border: .5px solid rgba(255, 255, 255, .4); + position: absolute; + top: -18px; + left: -10px; + color: #40fc43 +} + +.aigc-prompt .aigc-prompt__base--textarea .notice-tag .popover-container { + position: relative; + width: calc(100% + 16px); + height: calc(100% + 18px); + top: -24px; + left: -10px; + opacity: 0 +} + +.aigc-prompt .aigc-prompt__base--textarea .bottom { + display: flex; + align-items: center; + justify-content: space-evenly; + height: 24px; + width: 72px; + font-size: 12px; + font-family: PingFang SC; + font-weight: 400; + margin-bottom: 5px; + cursor: pointer; + border: .5px solid rgba(255, 255, 255, .1019607843); + border-radius: 5px; + background-color: #373a3b; + padding: 5px +} + +.aigc-prompt .aigc-prompt__base--textarea .bottom .bottom_icon { + width: 12px; + height: 16px +} + +.aigc-prompt .aigc-prompt__base--textarea .bottom:hover { + border-color: rgba(255, 255, 255, .29) +} + +html[data-v-fea6429a], +body[data-v-fea6429a], +div[data-v-fea6429a], +span[data-v-fea6429a], +applet[data-v-fea6429a], +object[data-v-fea6429a], +iframe[data-v-fea6429a], +h1[data-v-fea6429a], +h2[data-v-fea6429a], +h3[data-v-fea6429a], +h4[data-v-fea6429a], +h5[data-v-fea6429a], +h6[data-v-fea6429a], +p[data-v-fea6429a], +blockquote[data-v-fea6429a], +pre[data-v-fea6429a], +a[data-v-fea6429a], +abbr[data-v-fea6429a], +acronym[data-v-fea6429a], +address[data-v-fea6429a], +big[data-v-fea6429a], +cite[data-v-fea6429a], +code[data-v-fea6429a], +del[data-v-fea6429a], +dfn[data-v-fea6429a], +em[data-v-fea6429a], +img[data-v-fea6429a], +ins[data-v-fea6429a], +kbd[data-v-fea6429a], +q[data-v-fea6429a], +s[data-v-fea6429a], +samp[data-v-fea6429a], +small[data-v-fea6429a], +strike[data-v-fea6429a], +strong[data-v-fea6429a], +sub[data-v-fea6429a], +sup[data-v-fea6429a], +tt[data-v-fea6429a], +var[data-v-fea6429a], +b[data-v-fea6429a], +u[data-v-fea6429a], +i[data-v-fea6429a], +center[data-v-fea6429a], +dl[data-v-fea6429a], +dt[data-v-fea6429a], +dd[data-v-fea6429a], +ol[data-v-fea6429a], +ul[data-v-fea6429a], +li[data-v-fea6429a], +fieldset[data-v-fea6429a], +form[data-v-fea6429a], +label[data-v-fea6429a], +legend[data-v-fea6429a], +table[data-v-fea6429a], +caption[data-v-fea6429a], +tbody[data-v-fea6429a], +tfoot[data-v-fea6429a], +thead[data-v-fea6429a], +tr[data-v-fea6429a], +th[data-v-fea6429a], +td[data-v-fea6429a], +article[data-v-fea6429a], +aside[data-v-fea6429a], +canvas[data-v-fea6429a], +details[data-v-fea6429a], +embed[data-v-fea6429a], +figure[data-v-fea6429a], +figcaption[data-v-fea6429a], +footer[data-v-fea6429a], +header[data-v-fea6429a], +hgroup[data-v-fea6429a], +menu[data-v-fea6429a], +nav[data-v-fea6429a], +output[data-v-fea6429a], +ruby[data-v-fea6429a], +section[data-v-fea6429a], +summary[data-v-fea6429a], +time[data-v-fea6429a], +mark[data-v-fea6429a], +audio[data-v-fea6429a], +video[data-v-fea6429a], +textarea[data-v-fea6429a] { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline +} + +article[data-v-fea6429a], +aside[data-v-fea6429a], +details[data-v-fea6429a], +figcaption[data-v-fea6429a], +figure[data-v-fea6429a], +footer[data-v-fea6429a], +header[data-v-fea6429a], +hgroup[data-v-fea6429a], +menu[data-v-fea6429a], +nav[data-v-fea6429a], +section[data-v-fea6429a] { + display: block +} + +body[data-v-fea6429a] { + line-height: 1; + margin: 0; + font-family: PingFang SC, PingFangSC-Regular, SFUIText, Helvetica Neue, Helvetica, Arial, sans-serif +} + +ol[data-v-fea6429a], +ul[data-v-fea6429a] { + list-style: none +} + +blockquote[data-v-fea6429a], +q[data-v-fea6429a] { + quotes: none +} + +blockquote[data-v-fea6429a]:before, +blockquote[data-v-fea6429a]:after, +q[data-v-fea6429a]:before, +q[data-v-fea6429a]:after { + content: ""; + content: none +} + +table[data-v-fea6429a] { + border-collapse: collapse; + border-spacing: 0 +} + +.cursor-p[data-v-fea6429a] { + cursor: pointer +} + +.aigc-advanced[data-v-fea6429a] { + margin-top: 4px; + padding: 20px 16px; + color: rgba(255, 255, 255, .8); + background-color: rgba(255, 255, 255, .05); + border-radius: 24px; + font-size: 13px; + font-weight: lighter +} + +.aigc-advanced .aigc-advanced__midexpend[data-v-fea6429a] { + color: rgba(255, 255, 255, .8); + font-size: 14px; + font-weight: lighter +} + +.aigc-advanced .aigc-advanced__midexpend--process[data-v-fea6429a] { + margin-top: 8px; + display: flex; + justify-content: space-between; + align-items: center +} + +.aigc-advanced .aigc-advanced__midexpend--input-trans[data-v-fea6429a] { + width: 200px; + height: 32px; + border-radius: 8px; + background: transparent; + color: rgba(255, 255, 255, .8) +} + +.aigc-advanced .aigc-advanced__midexpend--input[data-v-fea6429a] { + width: 196px; + height: 32px; + border-radius: 8px; + background: rgba(255, 255, 255, .05); + color: rgba(255, 255, 255, .8) +} + +.aigc-advanced .aigc-advanced__midexpend--input[data-v-fea6429a] .ant-input-number-handler-wrap { + visibility: hidden +} + +.aigc-advanced .aigc-advanced__midexpend--inputshort[data-v-fea6429a] { + margin-bottom: 8px; + width: 48px; + height: 32px; + border-radius: 8px; + background: rgba(255, 255, 255, .05); + color: rgba(255, 255, 255, .8) +} + +.aigc-advanced .aigc-advanced__midexpend--inputshort[data-v-fea6429a] .ant-input-number-handler-wrap { + visibility: hidden +} + +.aigc-advanced .aigc-advanced__midexpend--inputshort[data-v-fea6429a] .ant-input-number-input { + padding: 0; + text-align: center +} + +.aigc-advanced .aigc-advanced__midexpend--slider[data-v-fea6429a] { + width: 100%; + height: 16px; + margin-top: 8px +} + +.aigc-advanced .aigc-advanced__midexpend--slider[data-v-fea6429a] .ant-slider-track { + top: 4px; + background-color: rgba(255, 255, 255, .5) +} + +.aigc-advanced .aigc-advanced__midexpend--slider[data-v-fea6429a] .ant-slider-track:after { + box-shadow: none +} + +.aigc-advanced .aigc-advanced__midexpend--slider[data-v-fea6429a] .ant-slider-step { + background-color: rgba(255, 255, 255, .05) +} + +.aigc-advanced .aigc-advanced__midexpend--slider[data-v-fea6429a] .ant-slider-handle { + width: 16px; + height: 16px +} + +.aigc-advanced .aigc-advanced__midexpend--slider[data-v-fea6429a] .ant-slider-handle:after { + box-shadow: 0 0 0 1px rgba(255, 255, 255, .8); + background: rgb(51, 51, 51) +} + +.aigc-advanced .aigc-advanced__midexpend--slider[data-v-fea6429a] .ant-slider-handle:hover:after { + box-shadow: 0 0 0 1px #fff +} + +.aigc-advanced .aigc-advanced__midexpend--slider[data-v-fea6429a]:focus-within .ant-slider-track { + background-color: #40fc43 +} + +.aigc-advanced .aigc-advanced__midexpend--select[data-v-fea6429a] { + width: 196px +} + +.aigc-advanced .aigc-advanced__midexpend--select[data-v-fea6429a] .ant-select-selector { + margin-top: 8px; + background-color: rgba(255, 255, 255, .05); + border-color: transparent; + color: rgba(255, 255, 255, .8); + border-radius: 9px +} + +.aigc-advanced .aigc-advanced__mid[data-v-fea6429a] { + margin-top: 4px; + padding: 20px 16px; + color: rgba(255, 255, 255, .8); + background-color: rgba(255, 255, 255, .05); + border-radius: 24px; + font-size: 13px; + width: 100% +} + +.aigc-advanced .aigc-advanced__mid--text[data-v-fea6429a] { + font-size: 14px; + display: flex; + justify-content: space-between; + cursor: pointer +} + +.aigc-advanced .aigc-advanced__mid--img[data-v-fea6429a] { + width: 16px; + height: 16px +} + +.aigc-advanced .aigc-advanced__mid--imgactive[data-v-fea6429a] { + width: 16px; + height: 16px; + transform: rotate(180deg) +} + +html[data-v-d25ec045], +body[data-v-d25ec045], +div[data-v-d25ec045], +span[data-v-d25ec045], +applet[data-v-d25ec045], +object[data-v-d25ec045], +iframe[data-v-d25ec045], +h1[data-v-d25ec045], +h2[data-v-d25ec045], +h3[data-v-d25ec045], +h4[data-v-d25ec045], +h5[data-v-d25ec045], +h6[data-v-d25ec045], +p[data-v-d25ec045], +blockquote[data-v-d25ec045], +pre[data-v-d25ec045], +a[data-v-d25ec045], +abbr[data-v-d25ec045], +acronym[data-v-d25ec045], +address[data-v-d25ec045], +big[data-v-d25ec045], +cite[data-v-d25ec045], +code[data-v-d25ec045], +del[data-v-d25ec045], +dfn[data-v-d25ec045], +em[data-v-d25ec045], +img[data-v-d25ec045], +ins[data-v-d25ec045], +kbd[data-v-d25ec045], +q[data-v-d25ec045], +s[data-v-d25ec045], +samp[data-v-d25ec045], +small[data-v-d25ec045], +strike[data-v-d25ec045], +strong[data-v-d25ec045], +sub[data-v-d25ec045], +sup[data-v-d25ec045], +tt[data-v-d25ec045], +var[data-v-d25ec045], +b[data-v-d25ec045], +u[data-v-d25ec045], +i[data-v-d25ec045], +center[data-v-d25ec045], +dl[data-v-d25ec045], +dt[data-v-d25ec045], +dd[data-v-d25ec045], +ol[data-v-d25ec045], +ul[data-v-d25ec045], +li[data-v-d25ec045], +fieldset[data-v-d25ec045], +form[data-v-d25ec045], +label[data-v-d25ec045], +legend[data-v-d25ec045], +table[data-v-d25ec045], +caption[data-v-d25ec045], +tbody[data-v-d25ec045], +tfoot[data-v-d25ec045], +thead[data-v-d25ec045], +tr[data-v-d25ec045], +th[data-v-d25ec045], +td[data-v-d25ec045], +article[data-v-d25ec045], +aside[data-v-d25ec045], +canvas[data-v-d25ec045], +details[data-v-d25ec045], +embed[data-v-d25ec045], +figure[data-v-d25ec045], +figcaption[data-v-d25ec045], +footer[data-v-d25ec045], +header[data-v-d25ec045], +hgroup[data-v-d25ec045], +menu[data-v-d25ec045], +nav[data-v-d25ec045], +output[data-v-d25ec045], +ruby[data-v-d25ec045], +section[data-v-d25ec045], +summary[data-v-d25ec045], +time[data-v-d25ec045], +mark[data-v-d25ec045], +audio[data-v-d25ec045], +video[data-v-d25ec045], +textarea[data-v-d25ec045] { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline +} + +article[data-v-d25ec045], +aside[data-v-d25ec045], +details[data-v-d25ec045], +figcaption[data-v-d25ec045], +figure[data-v-d25ec045], +footer[data-v-d25ec045], +header[data-v-d25ec045], +hgroup[data-v-d25ec045], +menu[data-v-d25ec045], +nav[data-v-d25ec045], +section[data-v-d25ec045] { + display: block +} + +body[data-v-d25ec045] { + line-height: 1; + margin: 0; + font-family: PingFang SC, PingFangSC-Regular, SFUIText, Helvetica Neue, Helvetica, Arial, sans-serif +} + +ol[data-v-d25ec045], +ul[data-v-d25ec045] { + list-style: none +} + +blockquote[data-v-d25ec045], +q[data-v-d25ec045] { + quotes: none +} + +blockquote[data-v-d25ec045]:before, +blockquote[data-v-d25ec045]:after, +q[data-v-d25ec045]:before, +q[data-v-d25ec045]:after { + content: ""; + content: none +} + +table[data-v-d25ec045] { + border-collapse: collapse; + border-spacing: 0 +} + +.cursor-p[data-v-d25ec045] { + cursor: pointer +} + +.aigc-top[data-v-d25ec045] { + padding: 4px 16px 20px; + color: rgba(255, 255, 255, .8); + background-color: rgba(255, 255, 255, .05); + border-radius: 24px; + font-size: 13px +} + +.aigc-top[data-v-d25ec045] .ant-input-number-handler-wrap { + display: none +} + +.aigc-top[data-v-d25ec045] .ant-input-number-input { + padding: 0; + text-align: center +} + +.aigc-top[data-v-d25ec045] .ant-input-number { + box-sizing: border-box; + width: 48px; + height: 32px; + background: rgba(255, 255, 255, .05); + border-radius: 9px; + border: none; + color: rgba(255, 255, 255, .8) +} + +.aigc-top[data-v-d25ec045] .ant-input-number-input { + color: rgba(255, 255, 255, .8); + font-size: 14px +} + +.aigc-top .aigc-top__base--item[data-v-d25ec045] { + display: flex; + justify-content: space-between; + align-items: center +} + +.aigc-top .aigc-top__base--item-addbox[data-v-d25ec045] { + width: 80px; + height: 80px; + margin-right: 8px; + margin-bottom: 8px; + border-radius: 10px; + position: relative; + overflow: hidden; + box-sizing: border-box +} + +.aigc-top .aigc-top__base--item-addbox .cover-img[data-v-d25ec045] { + width: 24px; + height: 24px; + position: absolute; + top: 4px; + right: 4px; + opacity: .8 +} + +.aigc-top .aigc-top__base--item-addbox .cover-img[data-v-d25ec045]:hover { + opacity: 1 +} + +.aigc-top .aigc-top__base--item-right[data-v-d25ec045] { + width: 180px +} + +.aigc-top .aigc-top__base--item-right .input[data-v-d25ec045] { + display: flex; + justify-content: space-between; + align-items: center; + color: rgba(255, 255, 255, .8); + font-size: 14px +} + +.aigc-top .aigc-top__base--item-right[data-v-d25ec045] .ant-input-number-handler-wrap { + background-color: linear-gradient(0deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .1)), linear-gradient(0deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .05)) +} + +.aigc-top .aigc-top__base--slider[data-v-d25ec045] { + margin: 8px auto 0; + width: 100% +} + +.aigc-top .aigc-top__base--slider.ant-slider-horizontal[data-v-d25ec045], +.aigc-top .aigc-top__base--slider.ant-slider-horizontal .ant-slider-track[data-v-d25ec045] { + height: 6px +} + +.aigc-top .aigc-top__base--slider[data-v-d25ec045] .ant-slider-rail { + background-color: rgba(255, 255, 255, .05) +} + +.aigc-top .aigc-top__base--slider[data-v-d25ec045] .ant-slider-track { + background-color: rgba(255, 255, 255, .8) +} + +.aigc-top .aigc-top__base--slider[data-v-d25ec045] .ant-slider-handle { + top: -4px; + width: 14px; + height: 14px +} + +.aigc-top .aigc-top__base--slider[data-v-d25ec045] .ant-slider-handle:before { + width: 14px; + height: 14px +} + +.aigc-top .aigc-top__base--slider[data-v-d25ec045] .ant-slider-handle:after { + width: 14px; + height: 14px; + box-shadow: 0 0 0 1px rgba(255, 255, 255, .8); + background: rgb(51, 51, 51) +} + +.aigc-top .aigc-top__base--slider[data-v-d25ec045]:focus-within .ant-slider-track { + background-color: #40fc43 +} + +.aigc-top .aigc-top__base--add-img[data-v-d25ec045] { + width: 80px +} + +.aigc-top .aigc-top__base--item-bottom[data-v-d25ec045] { + border-bottom-right-radius: 10px; + border-bottom-left-radius: 10px; + width: 80px; + height: 20px; + position: absolute; + bottom: 0; + display: flex; + align-items: center; + justify-content: center; + background: rgba(0, 0, 0, .5); + backdrop-filter: blur(10px); + -webkit-backdrop-filter: blur(10px) +} + +.aigc-top .aigc-top__base--item-title[data-v-d25ec045] { + text-align: center; + color: rgba(255, 255, 255, .8); + font-weight: 300; + font-size: 12px; + width: 50px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis +} + +.aigc-top .aigc-top__base--text[data-v-d25ec045] { + display: flex; + justify-content: space-between; + font-size: 14px; + margin-bottom: 8px; + margin-top: 16px; + cursor: pointer +} + +.aigc-top .aigc-top__base--expend[data-v-d25ec045] { + width: 16px; + height: 16px; + transform: rotate(180deg) +} + +.aigc-top .aigc-top__base--unexpend[data-v-d25ec045] { + width: 16px; + height: 16px; + cursor: pointer +} + +.aigc-top .aigc-top__base--selectname[data-v-d25ec045] { + width: 140px; + font-size: 14px; + line-height: 20px; + text-align: right; + color: #40fc43; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + cursor: pointer +} + +.aigc-top .aigc-top__base--icon[data-v-d25ec045] { + margin-left: 4px; + width: 16px; + height: 16px +} + +.aigc-top .aigc-top__base--addbtn[data-v-d25ec045] { + width: 100%; + height: 40px; + line-height: 40px; + border: 1px solid rgba(255, 255, 255, .1); + text-align: center; + border-radius: 48px; + cursor: pointer +} + +.aigc-top .aigc-top__base--addbtn[data-v-d25ec045]:hover { + border-color: rgba(255, 255, 255, .4) +} + +.aigc-top .aigc-top__base--select[data-v-d25ec045] .ant-select-selector { + background-color: rgba(255, 255, 255, .05); + border-color: transparent; + color: rgba(255, 255, 255, .8); + border-radius: 9px +} + +.aigc-top .aigc-top__base--select[data-v-d25ec045] .ant-select:not(.ant-select-disabled):hover .ant-select-selector { + border-color: rgba(255, 255, 255, .5) +} + +.aigc-top .aigc-top__base--select[data-v-d25ec045] .ant-select-focused .ant-select-selector { + border-color: rgba(255, 255, 255, .5) +} + +.aigc-top .aigc-top__modalBox[data-v-d25ec045] .content-wrap { + padding-top: 16px +} + +.aigc-top .aigc-top__modal[data-v-d25ec045] { + width: 933px; + z-index: 10001 +} + +.aigc-top .aigc-top__modal--title[data-v-d25ec045] { + margin: 20px 16px; + font-size: 18px +} + +.aigc-top .aigc-top__modal--icon[data-v-d25ec045] { + width: 24px; + height: 24px; + position: absolute; + top: 16px; + right: 16px +} + +.aigc-top .aigc-top__modal--item[data-v-d25ec045] { + border-radius: 24px; + height: 430px; + overflow-y: scroll; + overflow-x: hidden; + display: flex; + flex-wrap: wrap; + margin: 0 auto 0 3px +} + +.aigc-top .aigc-top__modal--item-img[data-v-d25ec045] { + width: 100%; + transition: all .2s linear +} + +.aigc-top .aigc-top__modal--item-box[data-v-d25ec045] { + width: 177px; + height: 177px; + margin: 0 4px 8px; + border-radius: 17px; + position: relative; + overflow: hidden; + box-sizing: border-box +} + +.aigc-top .aigc-top__modal--item-box:hover .cover-img[data-v-d25ec045] { + transform: scale(1.2) +} + +.aigc-top .aigc-top__modal--item-bottom[data-v-d25ec045] { + border-bottom-left-radius: 17px; + border-bottom-right-radius: 17px; + width: 177px; + height: 40px; + position: absolute; + bottom: 0; + display: flex; + align-items: center; + justify-content: center; + background: rgba(0, 0, 0, .5); + backdrop-filter: blur(10px); + -webkit-backdrop-filter: blur(10px); + z-index: 1 +} + +.aigc-top .aigc-top__modal--item-title[data-v-d25ec045] { + text-align: center; + color: rgba(255, 255, 255, .8); + font-weight: 300; + font-size: 14px; + width: 70px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + z-index: 111 +} + +html[data-v-fd3b7334], +body[data-v-fd3b7334], +div[data-v-fd3b7334], +span[data-v-fd3b7334], +applet[data-v-fd3b7334], +object[data-v-fd3b7334], +iframe[data-v-fd3b7334], +h1[data-v-fd3b7334], +h2[data-v-fd3b7334], +h3[data-v-fd3b7334], +h4[data-v-fd3b7334], +h5[data-v-fd3b7334], +h6[data-v-fd3b7334], +p[data-v-fd3b7334], +blockquote[data-v-fd3b7334], +pre[data-v-fd3b7334], +a[data-v-fd3b7334], +abbr[data-v-fd3b7334], +acronym[data-v-fd3b7334], +address[data-v-fd3b7334], +big[data-v-fd3b7334], +cite[data-v-fd3b7334], +code[data-v-fd3b7334], +del[data-v-fd3b7334], +dfn[data-v-fd3b7334], +em[data-v-fd3b7334], +img[data-v-fd3b7334], +ins[data-v-fd3b7334], +kbd[data-v-fd3b7334], +q[data-v-fd3b7334], +s[data-v-fd3b7334], +samp[data-v-fd3b7334], +small[data-v-fd3b7334], +strike[data-v-fd3b7334], +strong[data-v-fd3b7334], +sub[data-v-fd3b7334], +sup[data-v-fd3b7334], +tt[data-v-fd3b7334], +var[data-v-fd3b7334], +b[data-v-fd3b7334], +u[data-v-fd3b7334], +i[data-v-fd3b7334], +center[data-v-fd3b7334], +dl[data-v-fd3b7334], +dt[data-v-fd3b7334], +dd[data-v-fd3b7334], +ol[data-v-fd3b7334], +ul[data-v-fd3b7334], +li[data-v-fd3b7334], +fieldset[data-v-fd3b7334], +form[data-v-fd3b7334], +label[data-v-fd3b7334], +legend[data-v-fd3b7334], +table[data-v-fd3b7334], +caption[data-v-fd3b7334], +tbody[data-v-fd3b7334], +tfoot[data-v-fd3b7334], +thead[data-v-fd3b7334], +tr[data-v-fd3b7334], +th[data-v-fd3b7334], +td[data-v-fd3b7334], +article[data-v-fd3b7334], +aside[data-v-fd3b7334], +canvas[data-v-fd3b7334], +details[data-v-fd3b7334], +embed[data-v-fd3b7334], +figure[data-v-fd3b7334], +figcaption[data-v-fd3b7334], +footer[data-v-fd3b7334], +header[data-v-fd3b7334], +hgroup[data-v-fd3b7334], +menu[data-v-fd3b7334], +nav[data-v-fd3b7334], +output[data-v-fd3b7334], +ruby[data-v-fd3b7334], +section[data-v-fd3b7334], +summary[data-v-fd3b7334], +time[data-v-fd3b7334], +mark[data-v-fd3b7334], +audio[data-v-fd3b7334], +video[data-v-fd3b7334], +textarea[data-v-fd3b7334] { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline +} + +article[data-v-fd3b7334], +aside[data-v-fd3b7334], +details[data-v-fd3b7334], +figcaption[data-v-fd3b7334], +figure[data-v-fd3b7334], +footer[data-v-fd3b7334], +header[data-v-fd3b7334], +hgroup[data-v-fd3b7334], +menu[data-v-fd3b7334], +nav[data-v-fd3b7334], +section[data-v-fd3b7334] { + display: block +} + +body[data-v-fd3b7334] { + line-height: 1; + margin: 0; + font-family: PingFang SC, PingFangSC-Regular, SFUIText, Helvetica Neue, Helvetica, Arial, sans-serif +} + +ol[data-v-fd3b7334], +ul[data-v-fd3b7334] { + list-style: none +} + +blockquote[data-v-fd3b7334], +q[data-v-fd3b7334] { + quotes: none +} + +blockquote[data-v-fd3b7334]:before, +blockquote[data-v-fd3b7334]:after, +q[data-v-fd3b7334]:before, +q[data-v-fd3b7334]:after { + content: ""; + content: none +} + +table[data-v-fd3b7334] { + border-collapse: collapse; + border-spacing: 0 +} + +.cursor-p[data-v-fd3b7334] { + cursor: pointer +} + +.aigc-make .size-tips[data-v-fd3b7334] { + margin-left: 5px; + color: rgba(255, 255, 255, .4); + font-weight: 400 +} + +.aigc-make .aigc-make__bottomexpend[data-v-fd3b7334] { + color: rgba(255, 255, 255, .8); + font-size: 14px; + font-weight: lighter +} + +.aigc-make .aigc-make__bottomexpend--select[data-v-fd3b7334] { + width: 224px +} + +.aigc-make .aigc-make__bottomexpend--select[data-v-fd3b7334] .ant-select-selector { + background-color: rgba(255, 255, 255, .05); + border-color: transparent; + color: rgba(255, 255, 255, .8); + border-radius: 9px +} + +.aigc-make .aigc-make__bottomexpend--text[data-v-fd3b7334] { + display: flex; + justify-content: space-between; + align-items: center; + margin-top: 12px; + cursor: pointer +} + +.aigc-make .aigc-make__bottomexpend[data-v-fd3b7334] .ant-select-disabled { + opacity: .6 +} + +.aigc-make .aigc-make__bottomexpend[data-v-fd3b7334] .ant-input-number { + width: 224px; + height: 32px; + border-color: transparent; + background: rgba(255, 255, 255, .05) +} + +.aigc-make .aigc-make__bottom[data-v-fd3b7334] { + margin-top: 4px; + padding: 20px 16px; + color: rgba(255, 255, 255, .8); + background-color: rgba(255, 255, 255, .05); + border-radius: 24px; + font-size: 13px; + width: 100% +} + +.aigc-make .aigc-make__bottom--text[data-v-fd3b7334] { + font-size: 14px; + display: flex; + justify-content: space-between; + cursor: pointer +} + +.aigc-make .aigc-make__bottom--img[data-v-fd3b7334] { + width: 16px; + height: 16px +} + +.aigc-make .aigc-make__bottom--imgactive[data-v-fd3b7334] { + width: 16px; + height: 16px; + transform: rotate(180deg) +} + +html[data-v-fe0dcf7c], +body[data-v-fe0dcf7c], +div[data-v-fe0dcf7c], +span[data-v-fe0dcf7c], +applet[data-v-fe0dcf7c], +object[data-v-fe0dcf7c], +iframe[data-v-fe0dcf7c], +h1[data-v-fe0dcf7c], +h2[data-v-fe0dcf7c], +h3[data-v-fe0dcf7c], +h4[data-v-fe0dcf7c], +h5[data-v-fe0dcf7c], +h6[data-v-fe0dcf7c], +p[data-v-fe0dcf7c], +blockquote[data-v-fe0dcf7c], +pre[data-v-fe0dcf7c], +a[data-v-fe0dcf7c], +abbr[data-v-fe0dcf7c], +acronym[data-v-fe0dcf7c], +address[data-v-fe0dcf7c], +big[data-v-fe0dcf7c], +cite[data-v-fe0dcf7c], +code[data-v-fe0dcf7c], +del[data-v-fe0dcf7c], +dfn[data-v-fe0dcf7c], +em[data-v-fe0dcf7c], +img[data-v-fe0dcf7c], +ins[data-v-fe0dcf7c], +kbd[data-v-fe0dcf7c], +q[data-v-fe0dcf7c], +s[data-v-fe0dcf7c], +samp[data-v-fe0dcf7c], +small[data-v-fe0dcf7c], +strike[data-v-fe0dcf7c], +strong[data-v-fe0dcf7c], +sub[data-v-fe0dcf7c], +sup[data-v-fe0dcf7c], +tt[data-v-fe0dcf7c], +var[data-v-fe0dcf7c], +b[data-v-fe0dcf7c], +u[data-v-fe0dcf7c], +i[data-v-fe0dcf7c], +center[data-v-fe0dcf7c], +dl[data-v-fe0dcf7c], +dt[data-v-fe0dcf7c], +dd[data-v-fe0dcf7c], +ol[data-v-fe0dcf7c], +ul[data-v-fe0dcf7c], +li[data-v-fe0dcf7c], +fieldset[data-v-fe0dcf7c], +form[data-v-fe0dcf7c], +label[data-v-fe0dcf7c], +legend[data-v-fe0dcf7c], +table[data-v-fe0dcf7c], +caption[data-v-fe0dcf7c], +tbody[data-v-fe0dcf7c], +tfoot[data-v-fe0dcf7c], +thead[data-v-fe0dcf7c], +tr[data-v-fe0dcf7c], +th[data-v-fe0dcf7c], +td[data-v-fe0dcf7c], +article[data-v-fe0dcf7c], +aside[data-v-fe0dcf7c], +canvas[data-v-fe0dcf7c], +details[data-v-fe0dcf7c], +embed[data-v-fe0dcf7c], +figure[data-v-fe0dcf7c], +figcaption[data-v-fe0dcf7c], +footer[data-v-fe0dcf7c], +header[data-v-fe0dcf7c], +hgroup[data-v-fe0dcf7c], +menu[data-v-fe0dcf7c], +nav[data-v-fe0dcf7c], +output[data-v-fe0dcf7c], +ruby[data-v-fe0dcf7c], +section[data-v-fe0dcf7c], +summary[data-v-fe0dcf7c], +time[data-v-fe0dcf7c], +mark[data-v-fe0dcf7c], +audio[data-v-fe0dcf7c], +video[data-v-fe0dcf7c], +textarea[data-v-fe0dcf7c] { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline +} + +article[data-v-fe0dcf7c], +aside[data-v-fe0dcf7c], +details[data-v-fe0dcf7c], +figcaption[data-v-fe0dcf7c], +figure[data-v-fe0dcf7c], +footer[data-v-fe0dcf7c], +header[data-v-fe0dcf7c], +hgroup[data-v-fe0dcf7c], +menu[data-v-fe0dcf7c], +nav[data-v-fe0dcf7c], +section[data-v-fe0dcf7c] { + display: block +} + +body[data-v-fe0dcf7c] { + line-height: 1; + margin: 0; + font-family: PingFang SC, PingFangSC-Regular, SFUIText, Helvetica Neue, Helvetica, Arial, sans-serif +} + +ol[data-v-fe0dcf7c], +ul[data-v-fe0dcf7c] { + list-style: none +} + +blockquote[data-v-fe0dcf7c], +q[data-v-fe0dcf7c] { + quotes: none +} + +blockquote[data-v-fe0dcf7c]:before, +blockquote[data-v-fe0dcf7c]:after, +q[data-v-fe0dcf7c]:before, +q[data-v-fe0dcf7c]:after { + content: ""; + content: none +} + +table[data-v-fe0dcf7c] { + border-collapse: collapse; + border-spacing: 0 +} + +.cursor-p[data-v-fe0dcf7c] { + cursor: pointer +} + +.aigc-layright[data-v-fe0dcf7c] { + height: 100%; + overflow: auto +} + +.aigc-layright .aigc-layright__bottom[data-v-fe0dcf7c] { + margin-bottom: 88px +} + +.aigc-layright[data-v-fe0dcf7c] ::-webkit-input-placeholder { + color: rgba(255, 255, 255, .5) !important +} + +.aigc-layright[data-v-fe0dcf7c] ::-moz-placeholder { + color: rgba(255, 255, 255, .5) !important +} + +.aigc-layright[data-v-fe0dcf7c] :-moz-placeholder { + color: rgba(255, 255, 255, .5) !important +} + +.aigc-layright .ant-select-search__field__placeholder[data-v-fe0dcf7c] { + color: rgba(255, 255, 255, .5) !important +} + +.aigc-layright input[data-v-fe0dcf7c]:-ms-input-placeholder { + color: rgba(255, 255, 255, .5) !important +} + +.aigc-layright textarea[data-v-fe0dcf7c]:-ms-input-placeholder { + color: rgba(255, 255, 255, .5) !important +} + +html[data-v-e648248b], +body[data-v-e648248b], +div[data-v-e648248b], +span[data-v-e648248b], +applet[data-v-e648248b], +object[data-v-e648248b], +iframe[data-v-e648248b], +h1[data-v-e648248b], +h2[data-v-e648248b], +h3[data-v-e648248b], +h4[data-v-e648248b], +h5[data-v-e648248b], +h6[data-v-e648248b], +p[data-v-e648248b], +blockquote[data-v-e648248b], +pre[data-v-e648248b], +a[data-v-e648248b], +abbr[data-v-e648248b], +acronym[data-v-e648248b], +address[data-v-e648248b], +big[data-v-e648248b], +cite[data-v-e648248b], +code[data-v-e648248b], +del[data-v-e648248b], +dfn[data-v-e648248b], +em[data-v-e648248b], +img[data-v-e648248b], +ins[data-v-e648248b], +kbd[data-v-e648248b], +q[data-v-e648248b], +s[data-v-e648248b], +samp[data-v-e648248b], +small[data-v-e648248b], +strike[data-v-e648248b], +strong[data-v-e648248b], +sub[data-v-e648248b], +sup[data-v-e648248b], +tt[data-v-e648248b], +var[data-v-e648248b], +b[data-v-e648248b], +u[data-v-e648248b], +i[data-v-e648248b], +center[data-v-e648248b], +dl[data-v-e648248b], +dt[data-v-e648248b], +dd[data-v-e648248b], +ol[data-v-e648248b], +ul[data-v-e648248b], +li[data-v-e648248b], +fieldset[data-v-e648248b], +form[data-v-e648248b], +label[data-v-e648248b], +legend[data-v-e648248b], +table[data-v-e648248b], +caption[data-v-e648248b], +tbody[data-v-e648248b], +tfoot[data-v-e648248b], +thead[data-v-e648248b], +tr[data-v-e648248b], +th[data-v-e648248b], +td[data-v-e648248b], +article[data-v-e648248b], +aside[data-v-e648248b], +canvas[data-v-e648248b], +details[data-v-e648248b], +embed[data-v-e648248b], +figure[data-v-e648248b], +figcaption[data-v-e648248b], +footer[data-v-e648248b], +header[data-v-e648248b], +hgroup[data-v-e648248b], +menu[data-v-e648248b], +nav[data-v-e648248b], +output[data-v-e648248b], +ruby[data-v-e648248b], +section[data-v-e648248b], +summary[data-v-e648248b], +time[data-v-e648248b], +mark[data-v-e648248b], +audio[data-v-e648248b], +video[data-v-e648248b], +textarea[data-v-e648248b] { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline +} + +article[data-v-e648248b], +aside[data-v-e648248b], +details[data-v-e648248b], +figcaption[data-v-e648248b], +figure[data-v-e648248b], +footer[data-v-e648248b], +header[data-v-e648248b], +hgroup[data-v-e648248b], +menu[data-v-e648248b], +nav[data-v-e648248b], +section[data-v-e648248b] { + display: block +} + +body[data-v-e648248b] { + line-height: 1; + margin: 0; + font-family: PingFang SC, PingFangSC-Regular, SFUIText, Helvetica Neue, Helvetica, Arial, sans-serif +} + +ol[data-v-e648248b], +ul[data-v-e648248b] { + list-style: none +} + +blockquote[data-v-e648248b], +q[data-v-e648248b] { + quotes: none +} + +blockquote[data-v-e648248b]:before, +blockquote[data-v-e648248b]:after, +q[data-v-e648248b]:before, +q[data-v-e648248b]:after { + content: ""; + content: none +} + +table[data-v-e648248b] { + border-collapse: collapse; + border-spacing: 0 +} + +.cursor-p[data-v-e648248b] { + cursor: pointer +} + +.guide-modal[data-v-e648248b] { + position: fixed; + z-index: 999; + left: 0; + right: 0; + top: 0; + bottom: 0; + background-color: rgba(0, 0, 0, .8); + overflow: hidden; + transition: .5s ease +} + +.guide-box[data-v-e648248b] { + position: absolute; + transition: .5s ease; + padding: 16px 16px 4px; + box-sizing: border-box; + border-radius: 24px; + background: #27292c; + border: 1px solid transparent; + background-clip: padding-box, border-box; + background-origin: padding-box, border-box; + background-image: linear-gradient(to right, #27292c, #27292c), linear-gradient(335deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .4)); + color: #fff; + height: fit-content; + z-index: 9999 +} + +.guide-box-title[data-v-e648248b] { + color: rgba(255, 255, 255, .8); + font-family: PingFang SC; + font-size: 14px; + font-style: normal; + font-weight: 900; + line-height: 20px; + margin-bottom: 8px +} + +.guide-box-des[data-v-e648248b] { + margin-bottom: 16px +} + +.guide-box-des p[data-v-e648248b] { + color: rgba(255, 255, 255, .8); + font-family: PingFang SC; + font-size: 12px; + font-style: normal; + font-weight: 400; + white-space: pre-line; + line-height: 20px +} + +.guide-box-des video[data-v-e648248b] { + margin-top: 6px +} + +.guide-box-des img[data-v-e648248b] { + margin-top: 11px; + width: 228px; + height: 121px +} + +.guide-box-footer[data-v-e648248b] { + display: flex; + justify-content: space-between; + gap: 4px +} + +.guide-box-arrow[data-v-e648248b] { + width: 9px; + height: 9px; + position: relative; + background-color: #27292c; + transform: rotate(-135deg); + border-radius: 1px +} + +.guide-box-footer-btn[data-v-e648248b] { + width: 100%; + height: 40px !important; + text-align: center; + border-radius: 24px; + color: #000; + text-shadow: none; + font-size: 13px; + font-family: PingFang SC; + border: none +} + +.close-btn[data-v-e648248b] { + background-color: #fff; + padding: 11px 23px; + color: #000; + font-weight: 900 +} + +.close-btn[data-v-e648248b]:hover { + background-color: rgba(255, 255, 255, .8) +} + +html[data-v-f7539aca], +body[data-v-f7539aca], +div[data-v-f7539aca], +span[data-v-f7539aca], +applet[data-v-f7539aca], +object[data-v-f7539aca], +iframe[data-v-f7539aca], +h1[data-v-f7539aca], +h2[data-v-f7539aca], +h3[data-v-f7539aca], +h4[data-v-f7539aca], +h5[data-v-f7539aca], +h6[data-v-f7539aca], +p[data-v-f7539aca], +blockquote[data-v-f7539aca], +pre[data-v-f7539aca], +a[data-v-f7539aca], +abbr[data-v-f7539aca], +acronym[data-v-f7539aca], +address[data-v-f7539aca], +big[data-v-f7539aca], +cite[data-v-f7539aca], +code[data-v-f7539aca], +del[data-v-f7539aca], +dfn[data-v-f7539aca], +em[data-v-f7539aca], +img[data-v-f7539aca], +ins[data-v-f7539aca], +kbd[data-v-f7539aca], +q[data-v-f7539aca], +s[data-v-f7539aca], +samp[data-v-f7539aca], +small[data-v-f7539aca], +strike[data-v-f7539aca], +strong[data-v-f7539aca], +sub[data-v-f7539aca], +sup[data-v-f7539aca], +tt[data-v-f7539aca], +var[data-v-f7539aca], +b[data-v-f7539aca], +u[data-v-f7539aca], +i[data-v-f7539aca], +center[data-v-f7539aca], +dl[data-v-f7539aca], +dt[data-v-f7539aca], +dd[data-v-f7539aca], +ol[data-v-f7539aca], +ul[data-v-f7539aca], +li[data-v-f7539aca], +fieldset[data-v-f7539aca], +form[data-v-f7539aca], +label[data-v-f7539aca], +legend[data-v-f7539aca], +table[data-v-f7539aca], +caption[data-v-f7539aca], +tbody[data-v-f7539aca], +tfoot[data-v-f7539aca], +thead[data-v-f7539aca], +tr[data-v-f7539aca], +th[data-v-f7539aca], +td[data-v-f7539aca], +article[data-v-f7539aca], +aside[data-v-f7539aca], +canvas[data-v-f7539aca], +details[data-v-f7539aca], +embed[data-v-f7539aca], +figure[data-v-f7539aca], +figcaption[data-v-f7539aca], +footer[data-v-f7539aca], +header[data-v-f7539aca], +hgroup[data-v-f7539aca], +menu[data-v-f7539aca], +nav[data-v-f7539aca], +output[data-v-f7539aca], +ruby[data-v-f7539aca], +section[data-v-f7539aca], +summary[data-v-f7539aca], +time[data-v-f7539aca], +mark[data-v-f7539aca], +audio[data-v-f7539aca], +video[data-v-f7539aca], +textarea[data-v-f7539aca] { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline +} + +article[data-v-f7539aca], +aside[data-v-f7539aca], +details[data-v-f7539aca], +figcaption[data-v-f7539aca], +figure[data-v-f7539aca], +footer[data-v-f7539aca], +header[data-v-f7539aca], +hgroup[data-v-f7539aca], +menu[data-v-f7539aca], +nav[data-v-f7539aca], +section[data-v-f7539aca] { + display: block +} + +body[data-v-f7539aca] { + line-height: 1; + margin: 0; + font-family: PingFang SC, PingFangSC-Regular, SFUIText, Helvetica Neue, Helvetica, Arial, sans-serif +} + +ol[data-v-f7539aca], +ul[data-v-f7539aca] { + list-style: none +} + +blockquote[data-v-f7539aca], +q[data-v-f7539aca] { + quotes: none +} + +blockquote[data-v-f7539aca]:before, +blockquote[data-v-f7539aca]:after, +q[data-v-f7539aca]:before, +q[data-v-f7539aca]:after { + content: ""; + content: none +} + +table[data-v-f7539aca] { + border-collapse: collapse; + border-spacing: 0 +} + +.cursor-p[data-v-f7539aca] { + cursor: pointer +} + +.repaint-mode[data-v-f7539aca] { + width: 360px; + min-height: 84px; + padding: 16px; + box-sizing: border-box; + border-radius: 24px; + background-color: rgba(255, 255, 255, .05); + line-height: 1.4 +} + +[data-theme=dark] .repaint-mode[data-v-f7539aca] { + color: rgba(255, 255, 255, .8) +} + +.repaint-mode[data-v-f7539aca]:nth-child(1) { + margin-bottom: 4px +} + +.title[data-v-f7539aca] { + font-size: 16px; + font-weight: 500; + margin-top: 9px +} + +.tab-list[data-v-f7539aca] { + display: flex; + justify-content: space-between; + margin-top: 6px +} + +.tab-item[data-v-f7539aca] { + box-sizing: border-box; + width: 162px; + height: 74px; + border: .5px solid transparent; + border-radius: 9px; + text-align: center; + position: relative; + cursor: pointer +} + +[data-theme=dark] .tab-item[data-v-f7539aca] { + background: rgba(255, 255, 255, .05) +} + +.tab-title[data-v-f7539aca] { + font-size: 14px; + margin-top: 16px +} + +.tab-desc[data-v-f7539aca] { + font-size: 12px; + margin-top: 4px; + font-weight: 300 +} + +[data-theme=dark] .tab-desc[data-v-f7539aca] { + color: rgba(255, 255, 255, .4) +} + +.check-icon[data-v-f7539aca] { + width: 18px; + position: absolute; + bottom: 0; + right: 0; + display: none +} + +.active-tab[data-v-f7539aca] { + border: .5px solid rgb(64, 252, 67) +} + +.active-tab .tab-title[data-v-f7539aca] { + font-weight: 500 +} + +.active-tab .check-icon[data-v-f7539aca] { + display: block +} + +html[data-v-d1097eb1], +body[data-v-d1097eb1], +div[data-v-d1097eb1], +span[data-v-d1097eb1], +applet[data-v-d1097eb1], +object[data-v-d1097eb1], +iframe[data-v-d1097eb1], +h1[data-v-d1097eb1], +h2[data-v-d1097eb1], +h3[data-v-d1097eb1], +h4[data-v-d1097eb1], +h5[data-v-d1097eb1], +h6[data-v-d1097eb1], +p[data-v-d1097eb1], +blockquote[data-v-d1097eb1], +pre[data-v-d1097eb1], +a[data-v-d1097eb1], +abbr[data-v-d1097eb1], +acronym[data-v-d1097eb1], +address[data-v-d1097eb1], +big[data-v-d1097eb1], +cite[data-v-d1097eb1], +code[data-v-d1097eb1], +del[data-v-d1097eb1], +dfn[data-v-d1097eb1], +em[data-v-d1097eb1], +img[data-v-d1097eb1], +ins[data-v-d1097eb1], +kbd[data-v-d1097eb1], +q[data-v-d1097eb1], +s[data-v-d1097eb1], +samp[data-v-d1097eb1], +small[data-v-d1097eb1], +strike[data-v-d1097eb1], +strong[data-v-d1097eb1], +sub[data-v-d1097eb1], +sup[data-v-d1097eb1], +tt[data-v-d1097eb1], +var[data-v-d1097eb1], +b[data-v-d1097eb1], +u[data-v-d1097eb1], +i[data-v-d1097eb1], +center[data-v-d1097eb1], +dl[data-v-d1097eb1], +dt[data-v-d1097eb1], +dd[data-v-d1097eb1], +ol[data-v-d1097eb1], +ul[data-v-d1097eb1], +li[data-v-d1097eb1], +fieldset[data-v-d1097eb1], +form[data-v-d1097eb1], +label[data-v-d1097eb1], +legend[data-v-d1097eb1], +table[data-v-d1097eb1], +caption[data-v-d1097eb1], +tbody[data-v-d1097eb1], +tfoot[data-v-d1097eb1], +thead[data-v-d1097eb1], +tr[data-v-d1097eb1], +th[data-v-d1097eb1], +td[data-v-d1097eb1], +article[data-v-d1097eb1], +aside[data-v-d1097eb1], +canvas[data-v-d1097eb1], +details[data-v-d1097eb1], +embed[data-v-d1097eb1], +figure[data-v-d1097eb1], +figcaption[data-v-d1097eb1], +footer[data-v-d1097eb1], +header[data-v-d1097eb1], +hgroup[data-v-d1097eb1], +menu[data-v-d1097eb1], +nav[data-v-d1097eb1], +output[data-v-d1097eb1], +ruby[data-v-d1097eb1], +section[data-v-d1097eb1], +summary[data-v-d1097eb1], +time[data-v-d1097eb1], +mark[data-v-d1097eb1], +audio[data-v-d1097eb1], +video[data-v-d1097eb1], +textarea[data-v-d1097eb1] { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline +} + +article[data-v-d1097eb1], +aside[data-v-d1097eb1], +details[data-v-d1097eb1], +figcaption[data-v-d1097eb1], +figure[data-v-d1097eb1], +footer[data-v-d1097eb1], +header[data-v-d1097eb1], +hgroup[data-v-d1097eb1], +menu[data-v-d1097eb1], +nav[data-v-d1097eb1], +section[data-v-d1097eb1] { + display: block +} + +body[data-v-d1097eb1] { + line-height: 1; + margin: 0; + font-family: PingFang SC, PingFangSC-Regular, SFUIText, Helvetica Neue, Helvetica, Arial, sans-serif +} + +ol[data-v-d1097eb1], +ul[data-v-d1097eb1] { + list-style: none +} + +blockquote[data-v-d1097eb1], +q[data-v-d1097eb1] { + quotes: none +} + +blockquote[data-v-d1097eb1]:before, +blockquote[data-v-d1097eb1]:after, +q[data-v-d1097eb1]:before, +q[data-v-d1097eb1]:after { + content: ""; + content: none +} + +table[data-v-d1097eb1] { + border-collapse: collapse; + border-spacing: 0 +} + +.cursor-p[data-v-d1097eb1] { + cursor: pointer +} + +.aigc-main[data-v-d1097eb1] { + position: relative; + height: calc(100% - 100px); + min-width: 1200px; + min-height: 646px; + overflow: auto +} + +.aigc-main .aigc-main__left-content[data-v-d1097eb1] { + position: absolute; + right: 300px; + height: 100%; + top: 0; + left: 0; + padding: 0 4px +} + +.aigc-main .aigc-main__left-content--top-wrap[data-v-d1097eb1] { + width: 100%; + height: calc(100% - 366px); + margin-bottom: 4px; + display: flex +} + +.aigc-main .aigc-main__left-content--top-left[data-v-d1097eb1] { + position: relative; + flex: 1; + margin-right: 4px; + border-radius: 24px; + border: 1px solid transparent +} + +[data-theme=dark] .aigc-main .aigc-main__left-content--top-left[data-v-d1097eb1] { + background: rgba(255, 255, 255, .05) +} + +.aigc-main .aigc-main__left-content--top-left.verify[data-v-d1097eb1] { + border-color: #fff; + background-color: rgba(255, 255, 255, .1) +} + +.aigc-main .aigc-main__left-content--top-right[data-v-d1097eb1] { + position: relative; + flex: 1; + border-radius: 24px +} + +[data-theme=dark] .aigc-main .aigc-main__left-content--top-right[data-v-d1097eb1] { + background: rgba(255, 255, 255, .05) +} + +.aigc-main .aigc-main__left-content--nodata[data-v-d1097eb1] { + display: flex; + width: 100%; + height: 100%; + align-items: center; + justify-content: center; + font-size: 14px; + color: rgba(255, 255, 255, .4) +} + +.aigc-main .aigc-main__left-content--disable[data-v-d1097eb1] { + padding: 50px 20px; + position: absolute; + left: 50%; + top: 50%; + color: rgba(255, 255, 255, .4); + transform: translate(-50%, -50%) +} + +.aigc-main .aigc-main__left-content--bottom-wrap[data-v-d1097eb1] { + width: 100%; + height: 360px; + overflow: auto; + border-radius: 24px 24px 0 0; + padding-top: 1px +} + +[data-theme=dark] .aigc-main .aigc-main__left-content--bottom-wrap[data-v-d1097eb1] { + background: rgba(255, 255, 255, .05) +} + +.aigc-main .aigc-main__right-params[data-v-d1097eb1] { + position: absolute; + box-sizing: border-box; + width: 300px; + overflow-y: scroll; + top: 0; + right: 0; + height: 100%; + overflow: hidden; + border-radius: 24px +} + +.aigc-main .aigc-main__btn-box[data-v-d1097eb1] { + position: absolute; + bottom: 0; + right: 0; + width: 100%; + height: 88px; + padding: 20px 16px; + z-index: 1; + display: flex; + justify-content: right; + backdrop-filter: blur(10px); + -webkit-backdrop-filter: blur(10px); + background: linear-gradient(180deg, rgba(70, 71, 50, 0) 0%, #464732 100%) +} + +.aigc-main .aigc-main__btn-box .common-icon[data-v-d1097eb1], +.aigc-main .aigc-main__btn-box .aigc-main__btn-box--resetall[data-v-d1097eb1], +.aigc-main .aigc-main__btn-box .aigc-main__btn-box--save[data-v-d1097eb1] { + width: 24px; + height: 24px; + display: block; + padding: 12px; + border-radius: 50%; + box-sizing: content-box; + cursor: pointer; + border: 1px solid rgba(255, 255, 255, .1); + margin-right: 6px +} + +.aigc-main .aigc-main__btn-box--merge[data-v-d1097eb1] { + position: relative; + background: linear-gradient(to bottom right, rgb(229, 250, 87), rgb(64, 252, 67)); + font-size: 16px; + font-weight: 900; + text-align: center; + line-height: 19.6px; + border-radius: 48px; + color: #000; + cursor: pointer +} + +.aigc-main .aigc-main__btn-box--merge .text[data-v-d1097eb1] { + width: 160px; + height: 48px; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + position: relative; + z-index: 1 +} + +.aigc-main .aigc-main__btn-box--merge .text .upper[data-v-d1097eb1] { + display: flex; + align-items: center; + font-size: 14px +} + +.aigc-main .aigc-main__btn-box--merge .text .icon[data-v-d1097eb1] { + width: 16px; + margin-right: 2px +} + +.aigc-main .aigc-main__btn-box--merge.loading[data-v-d1097eb1] { + background-color: rgba(255, 255, 255, .6) +} + +.aigc-main .aigc-main__btn-box--merge.loading .mask-loading[data-v-d1097eb1] { + position: absolute; + left: 0; + bottom: 0; + right: 0; + top: 0; + background-color: rgba(255, 255, 255, .6); + border-radius: 48px +} + +.aigc-main .aigc-main__btn-box--merge.disable[data-v-d1097eb1] { + opacity: .6 !important +} + +.aigc-main .aigc-main__btn-box--merge .free[data-v-d1097eb1] { + line-height: 14px; + font-weight: 400; + font-size: 10px; + color: #000 +} + +.title[data-v-d1097eb1] { + width: 260px; + box-sizing: border-box; + padding: 16px 0 0 16px; + color: #fff; + line-height: 1.3; + font-size: 16px; + margin: 40px 54px 0; + font-weight: 900; + text-align: center +} + +.desc[data-v-d1097eb1] { + line-height: 1.2; + font-size: 14px; + margin-bottom: 24px; + text-align: center; + color: rgba(255, 255, 255, .8) +} \ No newline at end of file diff --git a/js/static/js/app.js b/js/static/js/app.js new file mode 100644 index 0000000..82e88f3 --- /dev/null +++ b/js/static/js/app.js @@ -0,0 +1,67 @@ + + +Date.prototype.format = function (format) { + var args = { + "M+": this.getMonth() + 1, + "d+": this.getDate(), + "h+": this.getHours(), + "m+": this.getMinutes(), + "s+": this.getSeconds(), + "q+": Math.floor((this.getMonth() + 3) / 3), //quarter + "S": this.getMilliseconds() + }; + if (/(y+)/.test(format)) + format = format.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)); + for (var i in args) { + var n = args[i]; + if (new RegExp("(" + i + ")").test(format)) + format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? n : ("00" + n).substr(("" + n).length)); + } + return format; +}; + + +//生成指定长度的随机数字字符 +function randomString(length) { + const str = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + let result = ''; + for(let i = 0; i 0 && i[i.length - 1]) || 6 !== o[ + 0] && 2 !== o[0])) { + s = 0; + continue + } + if (3 === o[0] && (!i || o[1] > i[0] && o[1] < i[3])) { + s.label = o[1]; + break + } + if (6 === o[0] && s.label < i[1]) { + s.label = i[1], i = o; + break + } + if (i && s.label < i[2]) { + s.label = i[2], s.ops.push(o); + break + } + i[2] && s.ops.pop(), s.trys.pop(); + continue + } + o = t.call(e, s) + } catch (e) { + o = [6, e], n = 0 + } finally { + r = i = 0 + } + if (5 & o[0]) throw o[1]; + return { + value: o[0] ? o[1] : void 0, + done: !0 + } + }([o, a]) + } + } + } + + function s(e) { + return i(this, void 0, void 0, (function() { + var t, r; + return o(this, (function(n) { + switch (n.label) { + case 0: + return t = { + offerToReceiveAudio: !0, + offerToReceiveVideo: !0 + }, [4, e.createOffer(t)]; + case 1: + return (r = n.sent()).sdp ? [2, -1 !== r.sdp.toLowerCase() + .indexOf("h264") + ] : [2, !1] + } + })) + })) + } + + function a() { + return i(this, void 0, void 0, (function() { + var e, t, r, n, i, a; + return o(this, (function(o) { + switch (o.label) { + case 0: + return (e = !!window.RTCPeerConnection) ? [4, s(t = + new RTCPeerConnection)] : [2, { + peerConnection: !1, + H264: !1, + getStats: !1 + }]; + case 1: + return r = o.sent(), n = !!t.getStats, t.close(), [4, s(i = + new RTCPeerConnection)]; + case 2: + return a = o.sent(), i.close(), [2, { + peerConnection: e, + H264: r || a, + getStats: n + }] + } + })) + })) + } + var c = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : + "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; + + function d(e) { + var t = { + exports: {} + }; + return e(t, t.exports), t.exports + /*! + * UAParser.js v0.7.23 + * Lightweight JavaScript-based User-Agent string parser + * https://github.com/faisalman/ua-parser-js + * + * Copyright © 2012-2019 Faisal Salman + * Licensed under MIT License + */ + } + var p = (new(d((function(e, t) { + ! function(r, n) { + var i = "function", + o = "object", + s = "model", + a = "name", + c = "type", + d = "vendor", + p = "version", + l = "architecture", + u = "console", + f = "mobile", + h = "tablet", + m = "smarttv", + v = "wearable", + g = { + extend: function(e, t) { + var r = {}; + for (var n in e) t[n] && t[n].length % 2 == 0 ? r[n] = t[n] + .concat(e[n]) : r[n] = e[n]; + return r + }, + has: function(e, t) { + return "string" == typeof e && -1 !== t.toLowerCase().indexOf(e + .toLowerCase()) + }, + lowerize: function(e) { + return e.toLowerCase() + }, + major: function(e) { + return "string" == typeof e ? e.replace(/[^\d\.]/g, "").split( + ".")[0] : n + }, + trim: function(e) { + return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "") + } + }, + y = { + rgx: function(e, t) { + for (var r, s, a, c, d, p, l = 0; l < t.length && !d;) { + var u = t[l], + f = t[l + 1]; + for (r = s = 0; r < u.length && !d;) + if (d = u[r++].exec(e)) + for (a = 0; a < f.length; a++) p = d[++s], typeof( + c = f[a]) === o && c.length > 0 ? 2 == c + .length ? typeof c[1] == i ? this[c[0]] = c[1] + .call(this, p) : this[c[0]] = c[1] : 3 == c + .length ? typeof c[1] !== i || c[1].exec && c[1] + .test ? this[c[0]] = p ? p.replace(c[1], c[2]) : + n : this[c[0]] = p ? c[1].call(this, p, c[2]) : + n : 4 == c.length && (this[c[0]] = p ? c[3] + .call(this, p.replace(c[1], c[2])) : n) : + this[c] = p || n; + l += 2 + } + }, + str: function(e, t) { + for (var r in t) + if (typeof t[r] === o && t[r].length > 0) { + for (var i = 0; i < t[r].length; i++) + if (g.has(t[r][i], e)) return "?" === r ? n : r + } else if (g.has(t[r], e)) return "?" === r ? n : r; + return e + } + }, + w = { + browser: { + oldsafari: { + version: { + "1.0": "/8", + 1.2: "/1", + 1.3: "/3", + "2.0": "/412", + "2.0.2": "/416", + "2.0.3": "/417", + "2.0.4": "/419", + "?": "/" + } + } + }, + device: { + amazon: { + model: { + "Fire Phone": ["SD", "KF"] + } + }, + sprint: { + model: { + "Evo Shift 4G": "7373KT" + }, + vendor: { + HTC: "APA", + Sprint: "Sprint" + } + } + }, + os: { + windows: { + version: { + ME: "4.90", + "NT 3.11": "NT3.51", + "NT 4.0": "NT4.0", + 2e3: "NT 5.0", + XP: ["NT 5.1", "NT 5.2"], + Vista: "NT 6.0", + 7: "NT 6.1", + 8: "NT 6.2", + 8.1: "NT 6.3", + 10: ["NT 6.4", "NT 10.0"], + RT: "ARM" + } + } + } + }, + T = { + browser: [ + [/(opera\smini)\/([\w\.-]+)/i, + /(opera\s[mobiletab]{3,6}).+version\/([\w\.-]+)/i, + /(opera).+version\/([\w\.]+)/i, /(opera)[\/\s]+([\w\.]+)/i + ], + [a, p], + [/(opios)[\/\s]+([\w\.]+)/i], + [ + [a, "Opera Mini"], p + ], + [/\s(opr)\/([\w\.]+)/i], + [ + [a, "Opera"], p + ], + [/(kindle)\/([\w\.]+)/i, + /(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i, + /(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i, + /(bidubrowser|baidubrowser)[\/\s]?([\w\.]+)/i, + /(?:ms|\()(ie)\s([\w\.]+)/i, /(rekonq)\/([\w\.]*)/i, + /(chromium|flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i + ], + [a, p], + [/(konqueror)\/([\w\.]+)/i], + [ + [a, "Konqueror"], p + ], + [/(trident).+rv[:\s]([\w\.]{1,9}).+like\sgecko/i], + [ + [a, "IE"], p + ], + [/(edge|edgios|edga|edg)\/((\d+)?[\w\.]+)/i], + [ + [a, "Edge"], p + ], + [/(yabrowser)\/([\w\.]+)/i], + [ + [a, "Yandex"], p + ], + [/(Avast)\/([\w\.]+)/i], + [ + [a, "Avast Secure Browser"], p + ], + [/(AVG)\/([\w\.]+)/i], + [ + [a, "AVG Secure Browser"], p + ], + [/(puffin)\/([\w\.]+)/i], + [ + [a, "Puffin"], p + ], + [/(focus)\/([\w\.]+)/i], + [ + [a, "Firefox Focus"], p + ], + [/(opt)\/([\w\.]+)/i], + [ + [a, "Opera Touch"], p + ], + [/((?:[\s\/])uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i], + [ + [a, "UCBrowser"], p + ], + [/(comodo_dragon)\/([\w\.]+)/i], + [ + [a, /_/g, " "], p + ], + [/(windowswechat qbcore)\/([\w\.]+)/i], + [ + [a, "WeChat(Win) Desktop"], p + ], + [/(micromessenger)\/([\w\.]+)/i], + [ + [a, "WeChat"], p + ], + [/(brave)\/([\w\.]+)/i], + [ + [a, "Brave"], p + ], + [/(whale)\/([\w\.]+)/i], + [ + [a, "Whale"], p + ], + [/(qqbrowserlite)\/([\w\.]+)/i], + [a, p], + [/(QQ)\/([\d\.]+)/i], + [a, p], + [/m?(qqbrowser)[\/\s]?([\w\.]+)/i], + [a, p], + [/(baiduboxapp)[\/\s]?([\w\.]+)/i], + [a, p], + [/(2345Explorer)[\/\s]?([\w\.]+)/i], + [a, p], + [/(MetaSr)[\/\s]?([\w\.]+)/i], + [a], + [/(LBBROWSER)/i], + [a], + [/xiaomi\/miuibrowser\/([\w\.]+)/i], + [p, [a, "MIUI Browser"]], + [/;fbav\/([\w\.]+);/i], + [p, [a, "Facebook"]], + [/FBAN\/FBIOS|FB_IAB\/FB4A/i], + [ + [a, "Facebook"] + ], + [/safari\s(line)\/([\w\.]+)/i, + /android.+(line)\/([\w\.]+)\/iab/i + ], + [a, p], + [/headlesschrome(?:\/([\w\.]+)|\s)/i], + [p, [a, "Chrome Headless"]], + [/\swv\).+(chrome)\/([\w\.]+)/i], + [ + [a, /(.+)/, "$1 WebView"], p + ], + [/((?:oculus|samsung)browser)\/([\w\.]+)/i], + [ + [a, /(.+(?:g|us))(.+)/, "$1 $2"], p + ], + [/android.+version\/([\w\.]+)\s+(?:mobile\s?safari|safari)*/i], + [p, [a, "Android Browser"]], + [/(sailfishbrowser)\/([\w\.]+)/i], + [ + [a, "Sailfish Browser"], p + ], + [ + /(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i], + [a, p], + [/(dolfin)\/([\w\.]+)/i], + [ + [a, "Dolphin"], p + ], + [/(qihu|qhbrowser|qihoobrowser|360browser)/i], + [ + [a, "360 Browser"] + ], + [/((?:android.+)crmo|crios)\/([\w\.]+)/i], + [ + [a, "Chrome"], p + ], + [/(coast)\/([\w\.]+)/i], + [ + [a, "Opera Coast"], p + ], + [/fxios\/([\w\.-]+)/i], + [p, [a, "Firefox"]], + [/version\/([\w\.]+)\s.*mobile\/\w+\s(safari)/i], + [p, [a, "Mobile Safari"]], + [/version\/([\w\.]+)\s.*(mobile\s?safari|safari)/i], + [p, a], + [ + /webkit.+?(gsa)\/([\w\.]+)\s.*(mobile\s?safari|safari)(\/[\w\.]+)/i], + [ + [a, "GSA"], p + ], + [/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i], + [a, [p, y.str, w.browser.oldsafari.version]], + [/(webkit|khtml)\/([\w\.]+)/i], + [a, p], + [/(navigator|netscape)\/([\w\.-]+)/i], + [ + [a, "Netscape"], p + ], + [/(swiftfox)/i, + /(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i, + /(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i, + /(firefox)\/([\w\.]+)\s[\w\s\-]+\/[\w\.]+$/i, + /(mozilla)\/([\w\.]+)\s.+rv\:.+gecko\/\d+/i, + /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i, + /(links)\s\(([\w\.]+)/i, /(gobrowser)\/?([\w\.]*)/i, + /(ice\s?browser)\/v?([\w\._]+)/i, /(mosaic)[\/\s]([\w\.]+)/i + ], + [a, p] + ], + cpu: [ + [/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i], + [ + [l, "amd64"] + ], + [/(ia32(?=;))/i], + [ + [l, g.lowerize] + ], + [/((?:i[346]|x)86)[;\)]/i], + [ + [l, "ia32"] + ], + [/windows\s(ce|mobile);\sppc;/i], + [ + [l, "arm"] + ], + [/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i], + [ + [l, /ower/, "", g.lowerize] + ], + [/(sun4\w)[;\)]/i], + [ + [l, "sparc"] + ], + [ + /((?:avr32|ia64(?=;))|68k(?=\))|arm(?:64|(?=v\d+[;l]))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?(?=;)|pa-risc)/i], + [ + [l, g.lowerize] + ] + ], + device: [ + [/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i], + [s, d, [c, h]], + [/applecoremedia\/[\w\.]+ \((ipad)/], + [s, [d, "Apple"], + [c, h] + ], + [/(apple\s{0,1}tv)/i], + [ + [s, "Apple TV"], + [d, "Apple"], + [c, m] + ], + [/(archos)\s(gamepad2?)/i, /(hp).+(touchpad)/i, + /(hp).+(tablet)/i, /(kindle)\/([\w\.]+)/i, + /\s(nook)[\w\s]+build\/(\w+)/i, + /(dell)\s(strea[kpr\s\d]*[\dko])/i + ], + [d, s, [c, h]], + [/(kf[A-z]+)(\sbuild\/|\)).+silk\//i], + [s, [d, "Amazon"], + [c, h] + ], + [/(sd|kf)[0349hijorstuw]+(\sbuild\/|\)).+silk\//i], + [ + [s, y.str, w.device.amazon.model], + [d, "Amazon"], + [c, f] + ], + [/android.+aft([bms])\sbuild/i], + [s, [d, "Amazon"], + [c, m] + ], + [/\((ip[honed|\s\w*]+);.+(apple)/i], + [s, d, [c, f]], + [/\((ip[honed|\s\w*]+);/i], + [s, [d, "Apple"], + [c, f] + ], + [/(blackberry)[\s-]?(\w+)/i, + /(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i, + /(hp)\s([\w\s]+\w)/i, /(asus)-?(\w+)/i + ], + [d, s, [c, f]], + [/\(bb10;\s(\w+)/i], + [s, [d, "BlackBerry"], + [c, f] + ], + [ + /android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i], + [s, [d, "Asus"], + [c, h] + ], + [/(sony)\s(tablet\s[ps])\sbuild\//i, + /(sony)?(?:sgp.+)\sbuild\//i + ], + [ + [d, "Sony"], + [s, "Xperia Tablet"], + [c, h] + ], + [ + /android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i], + [s, [d, "Sony"], + [c, f] + ], + [/\s(ouya)\s/i, /(nintendo)\s([wids3u]+)/i], + [d, s, [c, u]], + [/android.+;\s(shield)\sbuild/i], + [s, [d, "Nvidia"], + [c, u] + ], + [/(playstation\s[34portablevi]+)/i], + [s, [d, "Sony"], + [c, u] + ], + [/(sprint\s(\w+))/i], + [ + [d, y.str, w.device.sprint.vendor], + [s, y.str, w.device.sprint.model], + [c, f] + ], + [/(htc)[;_\s-]{1,2}([\w\s]+(?=\)|\sbuild)|\w+)/i, + /(zte)-(\w*)/i, + /(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i + ], + [d, [s, /_/g, " "], + [c, f] + ], + [/(nexus\s9)/i], + [s, [d, "HTC"], + [c, h] + ], + [/d\/huawei([\w\s-]+)[;\)]/i, + /android.+\s(nexus\s6p|vog-[at]?l\d\d|ane-[at]?l[x\d]\d|eml-a?l\d\da?|lya-[at]?l\d[\dc]|clt-a?l\d\di?)/i + ], + [s, [d, "Huawei"], + [c, f] + ], + [/android.+(bah2?-a?[lw]\d{2})/i], + [s, [d, "Huawei"], + [c, h] + ], + [/(microsoft);\s(lumia[\s\w]+)/i], + [d, s, [c, f]], + [/[\s\(;](xbox(?:\sone)?)[\s\);]/i], + [s, [d, "Microsoft"], + [c, u] + ], + [/(kin\.[onetw]{3})/i], + [ + [s, /\./g, " "], + [d, "Microsoft"], + [c, f] + ], + [/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)[\w\s]+build\//i, + /mot[\s-]?(\w*)/i, /(XT\d{3,4}) build\//i, /(nexus\s6)/i + ], + [s, [d, "Motorola"], + [c, f] + ], + [/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i], + [s, [d, "Motorola"], + [c, h] + ], + [/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i], + [ + [d, g.trim], + [s, g.trim], + [c, m] + ], + [/hbbtv.+maple;(\d+)/i], + [ + [s, /^/, "SmartTV"], + [d, "Samsung"], + [c, m] + ], + [/\(dtv[\);].+(aquos)/i], + [s, [d, "Sharp"], + [c, m] + ], + [/android.+((sch-i[89]0\d|shw-m380s|SM-P605|SM-P610|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i, + /((SM-T\w+))/i + ], + [ + [d, "Samsung"], s, [c, h] + ], + [/smart-tv.+(samsung)/i], + [d, [c, m], s], + [/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i, + /(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i, /sec-((sgh\w+))/i + ], + [ + [d, "Samsung"], s, [c, f] + ], + [/sie-(\w*)/i], + [s, [d, "Siemens"], + [c, f] + ], + [/(maemo|nokia).*(n900|lumia\s\d+)/i, + /(nokia)[\s_-]?([\w-]*)/i], + [ + [d, "Nokia"], s, [c, f] + ], + [/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i], + [s, [d, "Acer"], + [c, h] + ], + [/android.+([vl]k\-?\d{3})\s+build/i], + [s, [d, "LG"], + [c, h] + ], + [/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i], + [ + [d, "LG"], s, [c, h] + ], + [/linux;\snetcast.+smarttv/i, /lg\snetcast\.tv-201\d/i], + [ + [d, "LG"], s, [c, m] + ], + [/(nexus\s[45])/i, /lg[e;\s\/-]+(\w*)/i, + /android.+lg(\-?[\d\w]+)\s+build/i + ], + [s, [d, "LG"], + [c, f] + ], + [/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i], + [d, s, [c, h]], + [/android.+(ideatab[a-z0-9\-\s]+)/i], + [s, [d, "Lenovo"], + [c, h] + ], + [/(lenovo)[_\s-]?([\w-]+)/i], + [d, s, [c, f]], + [/linux;.+((jolla));/i], + [d, s, [c, f]], + [/((pebble))app\/[\d\.]+\s/i], + [d, s, [c, v]], + [/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i], + [d, s, [c, f]], + [/crkey/i], + [ + [s, "Chromecast"], + [d, "Google"], + [c, m] + ], + [/android.+;\s(glass)\s\d/i], + [s, [d, "Google"], + [c, v] + ], + [/android.+;\s(pixel c)[\s)]/i], + [s, [d, "Google"], + [c, h] + ], + [/android.+;\s(pixel( [2-9]a?)?( xl)?)[\s)]/i], + [s, [d, "Google"], + [c, f] + ], + [/android.+;\s(\w+)\s+build\/hm\1/i, + /android.+(hm[\s\-_]?note?[\s_]?(?:\d\w)?)\sbuild/i, + /android.+(redmi[\s\-_]?(?:note|k)?(?:[\s_]?[\w\s]+))(?:\sbuild|\))/i, + /android.+(mi[\s\-_]?(?:a\d|one|one[\s_]plus|note lte)?[\s_]?(?:\d?\w?)[\s_]?(?:plus)?)\sbuild/i + ], + [ + [s, /_/g, " "], + [d, "Xiaomi"], + [c, f] + ], + [ + /android.+(mi[\s\-_]?(?:pad)(?:[\s_]?[\w\s]+))(?:\sbuild|\))/i], + [ + [s, /_/g, " "], + [d, "Xiaomi"], + [c, h] + ], + [/android.+;\s(m[1-5]\snote)\sbuild/i], + [s, [d, "Meizu"], + [c, f] + ], + [/(mz)-([\w-]{2,})/i], + [ + [d, "Meizu"], s, [c, f] + ], + [/android.+a000(1)\s+build/i, + /android.+oneplus\s(a\d{4})[\s)]/i], + [s, [d, "OnePlus"], + [c, f] + ], + [/android.+[;\/]\s*(RCT[\d\w]+)\s+build/i], + [s, [d, "RCA"], + [c, h] + ], + [/android.+[;\/\s](Venue[\d\s]{2,7})\s+build/i], + [s, [d, "Dell"], + [c, h] + ], + [/android.+[;\/]\s*(Q[T|M][\d\w]+)\s+build/i], + [s, [d, "Verizon"], + [c, h] + ], + [ + /android.+[;\/]\s+(Barnes[&\s]+Noble\s+|BN[RT])(V?.*)\s+build/i], + [ + [d, "Barnes & Noble"], s, [c, h] + ], + [/android.+[;\/]\s+(TM\d{3}.*\b)\s+build/i], + [s, [d, "NuVision"], + [c, h] + ], + [/android.+;\s(k88)\sbuild/i], + [s, [d, "ZTE"], + [c, h] + ], + [/android.+[;\/]\s*(gen\d{3})\s+build.*49h/i], + [s, [d, "Swiss"], + [c, f] + ], + [/android.+[;\/]\s*(zur\d{3})\s+build/i], + [s, [d, "Swiss"], + [c, h] + ], + [/android.+[;\/]\s*((Zeki)?TB.*\b)\s+build/i], + [s, [d, "Zeki"], + [c, h] + ], + [/(android).+[;\/]\s+([YR]\d{2})\s+build/i, + /android.+[;\/]\s+(Dragon[\-\s]+Touch\s+|DT)(\w{5})\sbuild/i + ], + [ + [d, "Dragon Touch"], s, [c, h] + ], + [/android.+[;\/]\s*(NS-?\w{0,9})\sbuild/i], + [s, [d, "Insignia"], + [c, h] + ], + [/android.+[;\/]\s*((NX|Next)-?\w{0,9})\s+build/i], + [s, [d, "NextBook"], + [c, h] + ], + [ + /android.+[;\/]\s*(Xtreme\_)?(V(1[045]|2[015]|30|40|60|7[05]|90))\s+build/i], + [ + [d, "Voice"], s, [c, f] + ], + [/android.+[;\/]\s*(LVTEL\-)?(V1[12])\s+build/i], + [ + [d, "LvTel"], s, [c, f] + ], + [/android.+;\s(PH-1)\s/i], + [s, [d, "Essential"], + [c, f] + ], + [/android.+[;\/]\s*(V(100MD|700NA|7011|917G).*\b)\s+build/i], + [s, [d, "Envizen"], + [c, h] + ], + [/android.+[;\/]\s*(Le[\s\-]+Pan)[\s\-]+(\w{1,9})\s+build/i], + [d, s, [c, h]], + [/android.+[;\/]\s*(Trio[\s\w\-\.]+)\s+build/i], + [s, [d, "MachSpeed"], + [c, h] + ], + [/android.+[;\/]\s*(Trinity)[\-\s]*(T\d{3})\s+build/i], + [d, s, [c, h]], + [/android.+[;\/]\s*TU_(1491)\s+build/i], + [s, [d, "Rotor"], + [c, h] + ], + [/android.+(Gigaset)[\s\-]+(Q\w{1,9})\s+build/i], + [d, s, [c, h]], + [ + /android .+?; ([^;]+?)(?: build|\) applewebkit).+? mobile safari/i], + [s, [c, f]], + [ + /android .+?;\s([^;]+?)(?: build|\) applewebkit).+?(?! mobile) safari/i], + [s, [c, h]], + [/\s(tablet|tab)[;\/]/i, /\s(mobile)(?:[;\/]|\ssafari)/i], + [ + [c, g.lowerize], d, s + ], + [/[\s\/\(](smart-?tv)[;\)]/i], + [ + [c, m] + ], + [/(android[\w\.\s\-]{0,9});.+build/i], + [s, [d, "Generic"]] + ], + engine: [ + [/windows.+\sedge\/([\w\.]+)/i], + [p, [a, "EdgeHTML"]], + [/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i], + [p, [a, "Blink"]], + [/(presto)\/([\w\.]+)/i, + /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i, + /(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i, + /(icab)[\/\s]([23]\.[\d\.]+)/i + ], + [a, p], + [/rv\:([\w\.]{1,9}).+(gecko)/i], + [p, a] + ], + os: [ + [/microsoft\s(windows)\s(vista|xp)/i], + [a, p], + [/(windows)\snt\s6\.2;\s(arm)/i, + /(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i, + /(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i + ], + [a, [p, y.str, w.os.windows.version]], + [/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i], + [ + [a, "Windows"], + [p, y.str, w.os.windows.version] + ], + [/\((bb)(10);/i], + [ + [a, "BlackBerry"], p + ], + [/(blackberry)\w*\/?([\w\.]*)/i, + /(tizen|kaios)[\/\s]([\w\.]+)/i, + /(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i + ], + [a, p], + [/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]*)/i], + [ + [a, "Symbian"], p + ], + [/\((series40);/i], + [a], + [/mozilla.+\(mobile;.+gecko.+firefox/i], + [ + [a, "Firefox OS"], p + ], + [/crkey\/([\d\.]+)/i], + [p, [a, "Chromecast"]], + [/(nintendo|playstation)\s([wids34portablevu]+)/i, + /(mint)[\/\s\(]?(\w*)/i, /(mageia|vectorlinux)[;\s]/i, + /(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|(?=\s)arch|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus)[\/\s-]?(?!chrom)([\w\.-]*)/i, + /(hurd|linux)\s?([\w\.]*)/i, /(gnu)\s?([\w\.]*)/i + ], + [a, p], + [/(cros)\s[\w]+\s([\w\.]+\w)/i], + [ + [a, "Chromium OS"], p + ], + [/(sunos)\s?([\w\.\d]*)/i], + [ + [a, "Solaris"], p + ], + [/\s([frentopc-]{0,4}bsd|dragonfly)\s?([\w\.]*)/i], + [a, p], + [/(haiku)\s(\w+)/i], + [a, p], + [/cfnetwork\/.+darwin/i, + /ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i + ], + [ + [p, /_/g, "."], + [a, "iOS"] + ], + [/(mac\sos\sx)\s?([\w\s\.]*)/i, + /(macintosh|mac(?=_powerpc)\s)/i], + [ + [a, "Mac OS"], + [p, /_/g, "."] + ], + [/((?:open)?solaris)[\/\s-]?([\w\.]*)/i, + /(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i, + /(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i, + /(unix)\s?([\w\.]*)/i + ], + [a, p] + ] + }, + C = function(e, t) { + if ("object" == typeof e && (t = e, e = n), !(this instanceof C)) + return new C(e, t).getResult(); + var i = e || (r && r.navigator && r.navigator.userAgent ? r.navigator + .userAgent : ""), + o = t ? g.extend(T, t) : T; + return this.getBrowser = function() { + var e = { + name: n, + version: n + }; + return y.rgx.call(e, i, o.browser), e.major = g.major(e + .version), e + }, this.getCPU = function() { + var e = { + architecture: n + }; + return y.rgx.call(e, i, o.cpu), e + }, this.getDevice = function() { + var e = { + vendor: n, + model: n, + type: n + }; + return y.rgx.call(e, i, o.device), e + }, this.getEngine = function() { + var e = { + name: n, + version: n + }; + return y.rgx.call(e, i, o.engine), e + }, this.getOS = function() { + var e = { + name: n, + version: n + }; + return y.rgx.call(e, i, o.os), e + }, this.getResult = function() { + return { + ua: this.getUA(), + browser: this.getBrowser(), + engine: this.getEngine(), + os: this.getOS(), + device: this.getDevice(), + cpu: this.getCPU() + } + }, this.getUA = function() { + return i + }, this.setUA = function(e) { + return i = e, this + }, this + }; + C.VERSION = "0.7.23", C.BROWSER = { + NAME: a, + MAJOR: "major", + VERSION: p + }, C.CPU = { + ARCHITECTURE: l + }, C.DEVICE = { + MODEL: s, + VENDOR: d, + TYPE: c, + CONSOLE: u, + MOBILE: f, + SMARTTV: m, + TABLET: h, + WEARABLE: v, + EMBEDDED: "embedded" + }, C.ENGINE = { + NAME: a, + VERSION: p + }, C.OS = { + NAME: a, + VERSION: p + }, e.exports && (t = e.exports = C), t.UAParser = C; + var S = r && (r.jQuery || r.Zepto); + if (S && !S.ua) { + var b = new C; + S.ua = b.getResult(), S.ua.get = function() { + return b.getUA() + }, S.ua.set = function(e) { + b.setUA(e); + var t = b.getResult(); + for (var r in t) S.ua[r] = t[r] + } + } + }("object" == typeof window ? window : c) + })).UAParser)).getResult(), + l = { + osName: p.os.name || "", + osVersion: p.os.version || "", + browserName: p.browser.name || "", + browserVersion: p.browser.version || "" + }; + + function u(e, t) { + return i(this, void 0, void 0, (function() { + var r, n, i, s, a, c; + return o(this, (function(o) { + switch (o.label) { + case 0: + r = { + method: "POST", + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify(t) + }, "AbortController" in window && (n = new AbortController, + setTimeout((function() { + return n.abort() + }), b), r.signal = n.signal), o.label = 1; + case 1: + return o.trys.push([1, 3, , 4]), [4, fetch(e, r)]; + case 2: + return i = o.sent(), [3, 4]; + case 3: + throw s = o.sent(), c = void 0, c = "AbortError" === s.name ? + "pullStreamRequest, error: " + b / 1e3 + "s timeout" : + "pullStreamRequest, error: " + s.message, _(c), new T(c); + case 4: + if (200 !== i.status) throw c = + "pullStreamRequest, statusCode error: statusCode: " + i + .status + ", statusText: " + i.statusText, _(c), new T( + c); + o.label = 5; + case 5: + return o.trys.push([5, 7, , 8]), [4, i.json()]; + case 6: + return a = o.sent(), [3, 8]; + case 7: + throw o.sent(), c = "parse response as json error: " + i.text(), + O(c), new T(c); + case 8: + if ([400, 500].includes(a.code)) throw O(a.msg), new T(a.msg); + if (403 === a.code) throw x(a.msg), new T(a.msg); + if (404 === a.code) throw D(a.msg), new T(a.msg); + if (![0, 200].includes(a.code)) throw new T( + "unexpected code: " + a.code + ", msg: " + a.msg); + return [2, a] + } + })) + })) + } + + function f() { + var e = new Date; + + function t(e) { + var t = e.toString(); + return t.length < 2 ? "0" + t : t + } + return "[" + t(e.getHours()) + ":" + t(e.getMinutes()) + ":" + t(e.getSeconds()) + "." + e + .getMilliseconds() + "]" + } + var h = new(function() { + function e(e) { + this.level = e + } + return e.prototype.setLevel = function(e) { + this.level = e + }, e.prototype.log = function(e) { + if ("log" === this.level) { + var t = f(), + r = t + " %cLOG-QNRTPLAYER"; + console.info(r, "color: #66ccff; font-weight: bold;", e); + var n = { + time: t, + level: "log", + msg: e, + id: v(8) + }; + k(n) + } + }, e.prototype.debug = function(e) { + if ("log" === this.level || "debug" === this.level) { + var t = f(), + r = t + " %cDEBUG-QNRTPLAYER"; + console.info(r, "color: #A28148; font-weight: bold;", e); + var n = { + time: t, + level: "debug", + msg: e, + id: v(8) + }; + k(n) + } + }, e.prototype.warning = function(e) { + if ("disable" !== this.level) { + var t = f(), + r = t + " %cWARNING-QNRTPLAYER"; + console.warn(r, "color: #E44F44; font-weight: bold;", e); + var n = { + time: t, + level: "warning", + msg: e, + id: v(8) + }; + k(n) + } + }, e + }())("log"); + + function m(e) { + return ("0" + e.toString(16)).substr(-2) + } + + function v(e) { + void 0 === e && (e = 5); + var t = new Uint8Array((e || 40) / 2); + return window.crypto.getRandomValues(t), Array.from(t, m).join("") + } + + function g(e, t) { + void 0 === t && (t = !1); + try { + return t ? JSON.stringify(e, null, 2) : JSON.stringify(e) + } catch (e) { + return h.warning("json stringify error: " + g(e)), "stringify error" + } + } + + function y(e, t) { + var r = Math.pow(10, t); + return Math.round(e * r) / r + } + var w, T = function(e) { + function t(t) { + var r = e.call(this, t) || this; + return r.msg = t, h.warning("SDK Error: " + t), r + } + return r(t, e), t + }(Error), + C = { + className: "qn-rtplayer-media", + width: "100%", + height: "100%", + objectFit: "contain", + volumn: .6, + controls: !1, + playsinline: !0 + }, + S = { + audioBitrate: 0, + videoBitrate: 0, + frameWidth: 0, + frameHeight: 0, + frameRate: 0 + }; + ! function(e) { + e[e.STATE_IDLE = 0] = "STATE_IDLE", e[e.STATE_INIT = 1] = "STATE_INIT", e[e.STATE_READY = 2] = + "STATE_READY", e[e.STATE_PLAYING = 3] = "STATE_PLAYING", e[e.STATE_STOP = 4] = "STATE_STOP", e[e + .STATE_ERROR = 5] = "STATE_ERROR" + }(w || (w = {})); + var b = 8e3, + R = "1.0.3", + E = d((function(e) { + ! function(t) { + function r() {} + var n = r.prototype, + i = t.EventEmitter; + + function o(e, t) { + for (var r = e.length; r--;) + if (e[r].listener === t) return r; + return -1 + } + + function s(e) { + return function() { + return this[e].apply(this, arguments) + } + } + + function a(e) { + return "function" == typeof e || e instanceof RegExp || !(!e || "object" != + typeof e) && a(e.listener) + } + n.getListeners = function(e) { + var t, r, n = this._getEvents(); + if (e instanceof RegExp) + for (r in t = {}, n) n.hasOwnProperty(r) && e.test(r) && (t[r] = n[r]); + else t = n[e] || (n[e] = []); + return t + }, n.flattenListeners = function(e) { + var t, r = []; + for (t = 0; t < e.length; t += 1) r.push(e[t].listener); + return r + }, n.getListenersAsObject = function(e) { + var t, r = this.getListeners(e); + return r instanceof Array && ((t = {})[e] = r), t || r + }, n.addListener = function(e, t) { + if (!a(t)) throw new TypeError("listener must be a function"); + var r, n = this.getListenersAsObject(e), + i = "object" == typeof t; + for (r in n) n.hasOwnProperty(r) && -1 === o(n[r], t) && n[r].push(i ? t : { + listener: t, + once: !1 + }); + return this + }, n.on = s("addListener"), n.addOnceListener = function(e, t) { + return this.addListener(e, { + listener: t, + once: !0 + }) + }, n.once = s("addOnceListener"), n.defineEvent = function(e) { + return this.getListeners(e), this + }, n.defineEvents = function(e) { + for (var t = 0; t < e.length; t += 1) this.defineEvent(e[t]); + return this + }, n.removeListener = function(e, t) { + var r, n, i = this.getListenersAsObject(e); + for (n in i) i.hasOwnProperty(n) && -1 !== (r = o(i[n], t)) && i[n].splice(r, + 1); + return this + }, n.off = s("removeListener"), n.addListeners = function(e, t) { + return this.manipulateListeners(!1, e, t) + }, n.removeListeners = function(e, t) { + return this.manipulateListeners(!0, e, t) + }, n.manipulateListeners = function(e, t, r) { + var n, i, o = e ? this.removeListener : this.addListener, + s = e ? this.removeListeners : this.addListeners; + if ("object" != typeof t || t instanceof RegExp) + for (n = r.length; n--;) o.call(this, t, r[n]); + else + for (n in t) t.hasOwnProperty(n) && (i = t[n]) && ("function" == typeof i ? + o.call(this, n, i) : s.call(this, n, i)); + return this + }, n.removeEvent = function(e) { + var t, r = typeof e, + n = this._getEvents(); + if ("string" === r) delete n[e]; + else if (e instanceof RegExp) + for (t in n) n.hasOwnProperty(t) && e.test(t) && delete n[t]; + else delete this._events; + return this + }, n.removeAllListeners = s("removeEvent"), n.emitEvent = function(e, t) { + var r, n, i, o, s = this.getListenersAsObject(e); + for (o in s) + if (s.hasOwnProperty(o)) + for (r = s[o].slice(0), i = 0; i < r.length; i++) !0 === (n = r[i]) + .once && this.removeListener(e, n.listener), n.listener.apply(this, + t || []) === this._getOnceReturnValue() && this.removeListener( + e, n.listener); + return this + }, n.trigger = s("emitEvent"), n.emit = function(e) { + var t = Array.prototype.slice.call(arguments, 1); + return this.emitEvent(e, t) + }, n.setOnceReturnValue = function(e) { + return this._onceReturnValue = e, this + }, n._getOnceReturnValue = function() { + return !this.hasOwnProperty("_onceReturnValue") || this._onceReturnValue + }, n._getEvents = function() { + return this._events || (this._events = {}) + }, r.noConflict = function() { + return t.EventEmitter = i, r + }, e.exports ? e.exports = r : t.EventEmitter = r + }("undefined" != typeof window ? window : c || {}) + })), + P = new E, + k = function(e) { + P.emit("log", e) + }, + _ = function(e) { + var t = { + code: 20001, + errorType: "networkError", + msg: e + }; + P.emit("error", t) + }, + x = function(e) { + var t = { + code: 20002, + errorType: "authFailed", + msg: e + }; + P.emit("error", t) + }, + D = function(e) { + var t = { + code: 20003, + errorType: "playStreamNotExist", + msg: e + }; + P.emit("error", t) + }, + O = function(e) { + var t = { + code: 20004, + errorType: "playRequestFailed", + msg: e + }; + P.emit("error", t) + }, + I = function(e) { + var t = { + code: 20005, + errorType: "descriptionError", + msg: e + }; + P.emit("error", t) + }, + M = function(e) { + var t = { + code: 30001, + errorType: "rtcNotSupport", + msg: e + }; + P.emit("error", t) + }; + let L = !0, + A = !0; + + function j(e, t, r) { + const n = e.match(t); + return n && n.length >= r && parseInt(n[r], 10) + } + + function N(e, t, r) { + if (!e.RTCPeerConnection) return; + const n = e.RTCPeerConnection.prototype, + i = n.addEventListener; + n.addEventListener = function(e, n) { + if (e !== t) return i.apply(this, arguments); + const o = e => { + const t = r(e); + t && (n.handleEvent ? n.handleEvent(t) : n(t)) + }; + return this._eventMap = this._eventMap || {}, this._eventMap[t] || (this._eventMap[t] = + new Map), this._eventMap[t].set(n, o), i.apply(this, [e, o]) + }; + const o = n.removeEventListener; + n.removeEventListener = function(e, r) { + if (e !== t || !this._eventMap || !this._eventMap[t]) return o.apply(this, arguments); + if (!this._eventMap[t].has(r)) return o.apply(this, arguments); + const n = this._eventMap[t].get(r); + return this._eventMap[t].delete(r), 0 === this._eventMap[t].size && delete this._eventMap[t], + 0 === Object.keys(this._eventMap).length && delete this._eventMap, o.apply(this, [e, n]) + }, Object.defineProperty(n, "on" + t, { + get() { + return this["_on" + t] + }, + set(e) { + this["_on" + t] && (this.removeEventListener(t, this["_on" + t]), delete this[ + "_on" + t]), e && this.addEventListener(t, this["_on" + t] = e) + }, + enumerable: !0, + configurable: !0 + }) + } + + function z(e) { + return "boolean" != typeof e ? new Error("Argument type: " + typeof e + ". Please use a boolean.") : ( + L = e, e ? "adapter.js logging disabled" : "adapter.js logging enabled") + } + + function G(e) { + return "boolean" != typeof e ? new Error("Argument type: " + typeof e + ". Please use a boolean.") : ( + A = !e, "adapter.js deprecation warnings " + (e ? "disabled" : "enabled")) + } + + function F() { + if ("object" == typeof window) { + if (L) return; + "undefined" != typeof console && "function" == typeof console.log && console.log.apply(console, + arguments) + } + } + + function U(e, t) { + A && console.warn(e + " is deprecated, please use " + t + " instead.") + } + + function V(e) { + const t = { + browser: null, + version: null + }; + if (void 0 === e || !e.navigator) return t.browser = "Not a browser.", t; + const { + navigator: r + } = e; + if (r.mozGetUserMedia) t.browser = "firefox", t.version = j(r.userAgent, /Firefox\/(\d+)\./, 1); + else if (r.webkitGetUserMedia || !1 === e.isSecureContext && e.webkitRTCPeerConnection && !e + .RTCIceGatherer) t.browser = "chrome", t.version = j(r.userAgent, /Chrom(e|ium)\/(\d+)\./, 2); + else if (r.mediaDevices && r.userAgent.match(/Edge\/(\d+).(\d+)$/)) t.browser = "edge", t.version = j(r + .userAgent, /Edge\/(\d+).(\d+)$/, 2); + else { + if (!e.RTCPeerConnection || !r.userAgent.match(/AppleWebKit\/(\d+)\./)) return t.browser = + "Not a supported browser.", t; + t.browser = "safari", t.version = j(r.userAgent, /AppleWebKit\/(\d+)\./, 1), t.supportsUnifiedPlan = + e.RTCRtpTransceiver && "currentDirection" in e.RTCRtpTransceiver.prototype + } + return t + } + + function B(e) { + return "[object Object]" === Object.prototype.toString.call(e) + } + + function J(e) { + return B(e) ? Object.keys(e).reduce((function(t, r) { + const n = B(e[r]), + i = n ? J(e[r]) : e[r], + o = n && !Object.keys(i).length; + return void 0 === i || o ? t : Object.assign(t, { + [r]: i + }) + }), {}) : e + } + + function q(e, t, r) { + t && !r.has(t.id) && (r.set(t.id, t), Object.keys(t).forEach((n => { + n.endsWith("Id") ? q(e, e.get(t[n]), r) : n.endsWith("Ids") && t[n].forEach((t => { + q(e, e.get(t), r) + })) + }))) + } + + function W(e, t, r) { + const n = r ? "outbound-rtp" : "inbound-rtp", + i = new Map; + if (null === t) return i; + const o = []; + return e.forEach((e => { + "track" === e.type && e.trackIdentifier === t.id && o.push(e) + })), o.forEach((t => { + e.forEach((r => { + r.type === n && r.trackId === t.id && q(e, r, i) + })) + })), i + } + const H = F; + + function Y(e) { + const t = e && e.navigator; + if (!t.mediaDevices) return; + const r = V(e), + n = function(e) { + if ("object" != typeof e || e.mandatory || e.optional) return e; + const t = {}; + return Object.keys(e).forEach((r => { + if ("require" === r || "advanced" === r || "mediaSource" === r) return; + const n = "object" == typeof e[r] ? e[r] : { + ideal: e[r] + }; + void 0 !== n.exact && "number" == typeof n.exact && (n.min = n.max = n.exact); + const i = function(e, t) { + return e ? e + t.charAt(0).toUpperCase() + t.slice(1) : "deviceId" === + t ? "sourceId" : t + }; + if (void 0 !== n.ideal) { + t.optional = t.optional || []; + let e = {}; + "number" == typeof n.ideal ? (e[i("min", r)] = n.ideal, t.optional.push(e), + e = {}, e[i("max", r)] = n.ideal, t.optional.push(e)) : (e[i("", + r)] = n.ideal, t.optional.push(e)) + } + void 0 !== n.exact && "number" != typeof n.exact ? (t.mandatory = t.mandatory || + {}, t.mandatory[i("", r)] = n.exact) : ["min", "max"].forEach((e => { + void 0 !== n[e] && (t.mandatory = t.mandatory || {}, t + .mandatory[i(e, r)] = n[e]) + })) + })), e.advanced && (t.optional = (t.optional || []).concat(e.advanced)), t + }, + i = function(e, i) { + if (r.version >= 61) return i(e); + if ((e = JSON.parse(JSON.stringify(e))) && "object" == typeof e.audio) { + const t = function(e, t, r) { + t in e && !(r in e) && (e[r] = e[t], delete e[t]) + }; + t((e = JSON.parse(JSON.stringify(e))).audio, "autoGainControl", "googAutoGainControl"), t(e + .audio, "noiseSuppression", "googNoiseSuppression"), e.audio = n(e.audio) + } + if (e && "object" == typeof e.video) { + let o = e.video.facingMode; + o = o && ("object" == typeof o ? o : { + ideal: o + }); + const s = r.version < 66; + if (o && ("user" === o.exact || "environment" === o.exact || "user" === o.ideal || + "environment" === o.ideal) && (!t.mediaDevices.getSupportedConstraints || !t + .mediaDevices.getSupportedConstraints().facingMode || s)) { + let r; + if (delete e.video.facingMode, "environment" === o.exact || "environment" === o.ideal ? + r = ["back", "rear"] : "user" !== o.exact && "user" !== o.ideal || (r = ["front"]), + r) return t.mediaDevices.enumerateDevices().then((t => { + let s = (t = t.filter((e => "videoinput" === e.kind))).find((e => r + .some((t => e.label.toLowerCase().includes(t))))); + return !s && t.length && r.includes("back") && (s = t[t.length - + 1]), s && (e.video.deviceId = o.exact ? { + exact: s.deviceId + } : { + ideal: s.deviceId + }), e.video = n(e.video), H("chrome: " + JSON.stringify(e)), i( + e) + })) + } + e.video = n(e.video) + } + return H("chrome: " + JSON.stringify(e)), i(e) + }, + o = function(e) { + return r.version >= 64 ? e : { + name: { + PermissionDeniedError: "NotAllowedError", + PermissionDismissedError: "NotAllowedError", + InvalidStateError: "NotAllowedError", + DevicesNotFoundError: "NotFoundError", + ConstraintNotSatisfiedError: "OverconstrainedError", + TrackStartError: "NotReadableError", + MediaDeviceFailedDueToShutdown: "NotAllowedError", + MediaDeviceKillSwitchOn: "NotAllowedError", + TabCaptureError: "AbortError", + ScreenCaptureError: "AbortError", + DeviceCaptureError: "AbortError" + } [e.name] || e.name, + message: e.message, + constraint: e.constraint || e.constraintName, + toString() { + return this.name + (this.message && ": ") + this.message + } + } + }; + if (t.getUserMedia = function(e, r, n) { + i(e, (e => { + t.webkitGetUserMedia(e, r, (e => { + n && n(o(e)) + })) + })) + }.bind(t), t.mediaDevices.getUserMedia) { + const e = t.mediaDevices.getUserMedia.bind(t.mediaDevices); + t.mediaDevices.getUserMedia = function(t) { + return i(t, (t => e(t).then((e => { + if (t.audio && !e.getAudioTracks().length || t.video && !e + .getVideoTracks().length) throw e.getTracks().forEach((e => { + e.stop() + })), new DOMException("", "NotFoundError"); + return e + }), (e => Promise.reject(o(e)))))) + } + } + } + + function K(e) { + e.MediaStream = e.MediaStream || e.webkitMediaStream + } + + function Q(e) { + if ("object" == typeof e && e.RTCPeerConnection && !("ontrack" in e.RTCPeerConnection.prototype)) { + Object.defineProperty(e.RTCPeerConnection.prototype, "ontrack", { + get() { + return this._ontrack + }, + set(e) { + this._ontrack && this.removeEventListener("track", this._ontrack), this + .addEventListener("track", this._ontrack = e) + }, + enumerable: !0, + configurable: !0 + }); + const t = e.RTCPeerConnection.prototype.setRemoteDescription; + e.RTCPeerConnection.prototype.setRemoteDescription = function() { + return this._ontrackpoly || (this._ontrackpoly = t => { + t.stream.addEventListener("addtrack", (r => { + let n; + n = e.RTCPeerConnection.prototype.getReceivers ? this + .getReceivers().find((e => e.track && e.track.id === r.track + .id)) : { + track: r.track + }; + const i = new Event("track"); + i.track = r.track, i.receiver = n, i.transceiver = { + receiver: n + }, i.streams = [t.stream], this.dispatchEvent(i) + })), t.stream.getTracks().forEach((r => { + let n; + n = e.RTCPeerConnection.prototype.getReceivers ? this + .getReceivers().find((e => e.track && e.track.id === r + .id)) : { + track: r + }; + const i = new Event("track"); + i.track = r, i.receiver = n, i.transceiver = { + receiver: n + }, i.streams = [t.stream], this.dispatchEvent(i) + })) + }, this.addEventListener("addstream", this._ontrackpoly)), t.apply(this, arguments) + } + } else N(e, "track", (e => (e.transceiver || Object.defineProperty(e, "transceiver", { + value: { + receiver: e.receiver + } + }), e))) + } + + function $(e) { + if ("object" == typeof e && e.RTCPeerConnection && !("getSenders" in e.RTCPeerConnection.prototype) && + "createDTMFSender" in e.RTCPeerConnection.prototype) { + const t = function(e, t) { + return { + track: t, + get dtmf() { + return void 0 === this._dtmf && ("audio" === t.kind ? this._dtmf = e + .createDTMFSender(t) : this._dtmf = null), this._dtmf + }, + _pc: e + } + }; + if (!e.RTCPeerConnection.prototype.getSenders) { + e.RTCPeerConnection.prototype.getSenders = function() { + return this._senders = this._senders || [], this._senders.slice() + }; + const r = e.RTCPeerConnection.prototype.addTrack; + e.RTCPeerConnection.prototype.addTrack = function(e, n) { + let i = r.apply(this, arguments); + return i || (i = t(this, e), this._senders.push(i)), i + }; + const n = e.RTCPeerConnection.prototype.removeTrack; + e.RTCPeerConnection.prototype.removeTrack = function(e) { + n.apply(this, arguments); + const t = this._senders.indexOf(e); - 1 !== t && this._senders.splice(t, 1) + } + } + const r = e.RTCPeerConnection.prototype.addStream; + e.RTCPeerConnection.prototype.addStream = function(e) { + this._senders = this._senders || [], r.apply(this, [e]), e.getTracks().forEach((e => { + this._senders.push(t(this, e)) + })) + }; + const n = e.RTCPeerConnection.prototype.removeStream; + e.RTCPeerConnection.prototype.removeStream = function(e) { + this._senders = this._senders || [], n.apply(this, [e]), e.getTracks().forEach((e => { + const t = this._senders.find((t => t.track === e)); + t && this._senders.splice(this._senders.indexOf(t), 1) + })) + } + } else if ("object" == typeof e && e.RTCPeerConnection && "getSenders" in e.RTCPeerConnection + .prototype && "createDTMFSender" in e.RTCPeerConnection.prototype && e.RTCRtpSender && !("dtmf" in e + .RTCRtpSender.prototype)) { + const t = e.RTCPeerConnection.prototype.getSenders; + e.RTCPeerConnection.prototype.getSenders = function() { + const e = t.apply(this, []); + return e.forEach((e => e._pc = this)), e + }, Object.defineProperty(e.RTCRtpSender.prototype, "dtmf", { + get() { + return void 0 === this._dtmf && ("audio" === this.track.kind ? this._dtmf = this + ._pc.createDTMFSender(this.track) : this._dtmf = null), this._dtmf + } + }) + } + } + + function X(e) { + if (!e.RTCPeerConnection) return; + const t = e.RTCPeerConnection.prototype.getStats; + e.RTCPeerConnection.prototype.getStats = function() { + const [e, r, n] = arguments; + if (arguments.length > 0 && "function" == typeof e) return t.apply(this, arguments); + if (0 === t.length && (0 === arguments.length || "function" != typeof e)) return t.apply(this, + []); + const i = function(e) { + const t = {}; + return e.result().forEach((e => { + const r = { + id: e.id, + timestamp: e.timestamp, + type: { + localcandidate: "local-candidate", + remotecandidate: "remote-candidate" + } [e.type] || e.type + }; + e.names().forEach((t => { + r[t] = e.stat(t) + })), t[r.id] = r + })), t + }, + o = function(e) { + return new Map(Object.keys(e).map((t => [t, e[t]]))) + }; + if (arguments.length >= 2) { + const n = function(e) { + r(o(i(e))) + }; + return t.apply(this, [n, e]) + } + return new Promise(((e, r) => { + t.apply(this, [function(t) { + e(o(i(t))) + }, r]) + })).then(r, n) + } + } + + function Z(e) { + if (!("object" == typeof e && e.RTCPeerConnection && e.RTCRtpSender && e.RTCRtpReceiver)) return; + if (!("getStats" in e.RTCRtpSender.prototype)) { + const t = e.RTCPeerConnection.prototype.getSenders; + t && (e.RTCPeerConnection.prototype.getSenders = function() { + const e = t.apply(this, []); + return e.forEach((e => e._pc = this)), e + }); + const r = e.RTCPeerConnection.prototype.addTrack; + r && (e.RTCPeerConnection.prototype.addTrack = function() { + const e = r.apply(this, arguments); + return e._pc = this, e + }), e.RTCRtpSender.prototype.getStats = function() { + const e = this; + return this._pc.getStats().then((t => W(t, e.track, !0))) + } + } + if (!("getStats" in e.RTCRtpReceiver.prototype)) { + const t = e.RTCPeerConnection.prototype.getReceivers; + t && (e.RTCPeerConnection.prototype.getReceivers = function() { + const e = t.apply(this, []); + return e.forEach((e => e._pc = this)), e + }), N(e, "track", (e => (e.receiver._pc = e.srcElement, e))), e.RTCRtpReceiver.prototype + .getStats = function() { + const e = this; + return this._pc.getStats().then((t => W(t, e.track, !1))) + } + } + if (!("getStats" in e.RTCRtpSender.prototype) || !("getStats" in e.RTCRtpReceiver.prototype)) return; + const t = e.RTCPeerConnection.prototype.getStats; + e.RTCPeerConnection.prototype.getStats = function() { + if (arguments.length > 0 && arguments[0] instanceof e.MediaStreamTrack) { + const e = arguments[0]; + let t, r, n; + return this.getSenders().forEach((r => { + r.track === e && (t ? n = !0 : t = r) + })), this.getReceivers().forEach((t => (t.track === e && (r ? n = !0 : r = t), t + .track === e))), n || t && r ? Promise.reject(new DOMException( + "There are more than one sender or receiver for the track.", + "InvalidAccessError")) : t ? t.getStats() : r ? r.getStats() : Promise.reject( + new DOMException("There is no sender or receiver for the track.", + "InvalidAccessError")) + } + return t.apply(this, arguments) + } + } + + function ee(e) { + e.RTCPeerConnection.prototype.getLocalStreams = function() { + return this._shimmedLocalStreams = this._shimmedLocalStreams || {}, Object.keys(this + ._shimmedLocalStreams).map((e => this._shimmedLocalStreams[e][0])) + }; + const t = e.RTCPeerConnection.prototype.addTrack; + e.RTCPeerConnection.prototype.addTrack = function(e, r) { + if (!r) return t.apply(this, arguments); + this._shimmedLocalStreams = this._shimmedLocalStreams || {}; + const n = t.apply(this, arguments); + return this._shimmedLocalStreams[r.id] ? -1 === this._shimmedLocalStreams[r.id].indexOf(n) && + this._shimmedLocalStreams[r.id].push(n) : this._shimmedLocalStreams[r.id] = [r, n], n + }; + const r = e.RTCPeerConnection.prototype.addStream; + e.RTCPeerConnection.prototype.addStream = function(e) { + this._shimmedLocalStreams = this._shimmedLocalStreams || {}, e.getTracks().forEach((e => { + if (this.getSenders().find((t => t.track === e))) throw new DOMException( + "Track already exists.", "InvalidAccessError") + })); + const t = this.getSenders(); + r.apply(this, arguments); + const n = this.getSenders().filter((e => -1 === t.indexOf(e))); + this._shimmedLocalStreams[e.id] = [e].concat(n) + }; + const n = e.RTCPeerConnection.prototype.removeStream; + e.RTCPeerConnection.prototype.removeStream = function(e) { + return this._shimmedLocalStreams = this._shimmedLocalStreams || {}, delete this + ._shimmedLocalStreams[e.id], n.apply(this, arguments) + }; + const i = e.RTCPeerConnection.prototype.removeTrack; + e.RTCPeerConnection.prototype.removeTrack = function(e) { + return this._shimmedLocalStreams = this._shimmedLocalStreams || {}, e && Object.keys(this + ._shimmedLocalStreams).forEach((t => { + const r = this._shimmedLocalStreams[t].indexOf(e); - 1 !== r && this + ._shimmedLocalStreams[t].splice(r, 1), 1 === this._shimmedLocalStreams[t] + .length && delete this._shimmedLocalStreams[t] + })), i.apply(this, arguments) + } + } + + function te(e) { + if (!e.RTCPeerConnection) return; + const t = V(e); + if (e.RTCPeerConnection.prototype.addTrack && t.version >= 65) return ee(e); + const r = e.RTCPeerConnection.prototype.getLocalStreams; + e.RTCPeerConnection.prototype.getLocalStreams = function() { + const e = r.apply(this); + return this._reverseStreams = this._reverseStreams || {}, e.map((e => this._reverseStreams[e + .id])) + }; + const n = e.RTCPeerConnection.prototype.addStream; + e.RTCPeerConnection.prototype.addStream = function(t) { + if (this._streams = this._streams || {}, this._reverseStreams = this._reverseStreams || {}, t + .getTracks().forEach((e => { + if (this.getSenders().find((t => t.track === e))) throw new DOMException( + "Track already exists.", "InvalidAccessError") + })), !this._reverseStreams[t.id]) { + const r = new e.MediaStream(t.getTracks()); + this._streams[t.id] = r, this._reverseStreams[r.id] = t, t = r + } + n.apply(this, [t]) + }; + const i = e.RTCPeerConnection.prototype.removeStream; + + function o(e, t) { + let r = t.sdp; + return Object.keys(e._reverseStreams || []).forEach((t => { + const n = e._reverseStreams[t], + i = e._streams[n.id]; + r = r.replace(new RegExp(i.id, "g"), n.id) + })), new RTCSessionDescription({ + type: t.type, + sdp: r + }) + } + + function s(e, t) { + let r = t.sdp; + return Object.keys(e._reverseStreams || []).forEach((t => { + const n = e._reverseStreams[t], + i = e._streams[n.id]; + r = r.replace(new RegExp(n.id, "g"), i.id) + })), new RTCSessionDescription({ + type: t.type, + sdp: r + }) + } + e.RTCPeerConnection.prototype.removeStream = function(e) { + this._streams = this._streams || {}, this._reverseStreams = this._reverseStreams || {}, i.apply( + this, [this._streams[e.id] || e]), delete this._reverseStreams[this._streams[e.id] ? + this._streams[e.id].id : e.id], delete this._streams[e.id] + }, e.RTCPeerConnection.prototype.addTrack = function(t, r) { + if ("closed" === this.signalingState) throw new DOMException( + "The RTCPeerConnection's signalingState is 'closed'.", "InvalidStateError"); + const n = [].slice.call(arguments, 1); + if (1 !== n.length || !n[0].getTracks().find((e => e === t))) throw new DOMException( + "The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.", + "NotSupportedError"); + const i = this.getSenders().find((e => e.track === t)); + if (i) throw new DOMException("Track already exists.", "InvalidAccessError"); + this._streams = this._streams || {}, this._reverseStreams = this._reverseStreams || {}; + const o = this._streams[r.id]; + if (o) o.addTrack(t), Promise.resolve().then((() => { + this.dispatchEvent(new Event("negotiationneeded")) + })); + else { + const n = new e.MediaStream([t]); + this._streams[r.id] = n, this._reverseStreams[n.id] = r, this.addStream(n) + } + return this.getSenders().find((e => e.track === t)) + }, ["createOffer", "createAnswer"].forEach((function(t) { + const r = e.RTCPeerConnection.prototype[t], + n = { + [t]() { + const e = arguments; + return arguments.length && "function" == typeof arguments[0] ? r.apply(this, + [t => { + const r = o(this, t); + e[0].apply(null, [r]) + }, t => { + e[1] && e[1].apply(null, t) + }, arguments[2]]) : r.apply(this, arguments).then((e => o(this, e))) + } + }; + e.RTCPeerConnection.prototype[t] = n[t] + })); + const a = e.RTCPeerConnection.prototype.setLocalDescription; + e.RTCPeerConnection.prototype.setLocalDescription = function() { + return arguments.length && arguments[0].type ? (arguments[0] = s(this, arguments[0]), a.apply( + this, arguments)) : a.apply(this, arguments) + }; + const c = Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype, "localDescription"); + Object.defineProperty(e.RTCPeerConnection.prototype, "localDescription", { + get() { + const e = c.get.apply(this); + return "" === e.type ? e : o(this, e) + } + }), e.RTCPeerConnection.prototype.removeTrack = function(e) { + if ("closed" === this.signalingState) throw new DOMException( + "The RTCPeerConnection's signalingState is 'closed'.", "InvalidStateError"); + if (!e._pc) throw new DOMException( + "Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.", + "TypeError"); + if (!(e._pc === this)) throw new DOMException("Sender was not created by this connection.", + "InvalidAccessError"); + let t; + this._streams = this._streams || {}, Object.keys(this._streams).forEach((r => { + this._streams[r].getTracks().find((t => e.track === t)) && (t = this._streams[ + r]) + })), t && (1 === t.getTracks().length ? this.removeStream(this._reverseStreams[t.id]) : t + .removeTrack(e.track), this.dispatchEvent(new Event("negotiationneeded"))) + } + } + + function re(e) { + const t = V(e); + if (!e.RTCPeerConnection && e.webkitRTCPeerConnection && (e.RTCPeerConnection = e + .webkitRTCPeerConnection), !e.RTCPeerConnection) return; + const r = 0 === e.RTCPeerConnection.prototype.addIceCandidate.length; + t.version < 53 && ["setLocalDescription", "setRemoteDescription", "addIceCandidate"].forEach((function( + t) { + const r = e.RTCPeerConnection.prototype[t], + n = { + [t]() { + return arguments[0] = new("addIceCandidate" === t ? e.RTCIceCandidate : e + .RTCSessionDescription)(arguments[0]), r.apply(this, arguments) + } + }; + e.RTCPeerConnection.prototype[t] = n[t] + })); + const n = e.RTCPeerConnection.prototype.addIceCandidate; + e.RTCPeerConnection.prototype.addIceCandidate = function() { + return r || arguments[0] ? t.version < 78 && arguments[0] && "" === arguments[0].candidate ? + Promise.resolve() : n.apply(this, arguments) : (arguments[1] && arguments[1].apply(null), + Promise.resolve()) + } + } + + function ne(e) { + const t = V(e); + N(e, "negotiationneeded", (e => { + const r = e.target; + if (!(t.version < 72 || r.getConfiguration && "plan-b" === r.getConfiguration() + .sdpSemantics) || "stable" === r.signalingState) return e + })) + } + var ie = Object.freeze({ + __proto__: null, + shimMediaStream: K, + shimOnTrack: Q, + shimGetSendersWithDtmf: $, + shimGetStats: X, + shimSenderReceiverGetStats: Z, + shimAddTrackRemoveTrackWithNative: ee, + shimAddTrackRemoveTrack: te, + shimPeerConnection: re, + fixNegotiationNeeded: ne, + shimGetUserMedia: Y, + shimGetDisplayMedia: function(e, t) { + e.navigator.mediaDevices && "getDisplayMedia" in e.navigator.mediaDevices || e.navigator + .mediaDevices && ("function" == typeof t ? e.navigator.mediaDevices + .getDisplayMedia = function(r) { + return t(r).then((t => { + const n = r.video && r.video.width, + i = r.video && r.video.height, + o = r.video && r.video.frameRate; + return r.video = { + mandatory: { + chromeMediaSource: "desktop", + chromeMediaSourceId: t, + maxFrameRate: o || 3 + } + }, n && (r.video.mandatory.maxWidth = n), i && (r.video + .mandatory.maxHeight = i), e.navigator.mediaDevices + .getUserMedia(r) + })) + } : console.error("shimGetDisplayMedia: getSourceId argument is not a function") + ) + } + }); + var oe = d((function(e) { + var t = { + generateIdentifier: function() { + return Math.random().toString(36).substr(2, 10) + } + }; + t.localCName = t.generateIdentifier(), t.splitLines = function(e) { + return e.trim().split("\n").map((function(e) { + return e.trim() + })) + }, t.splitSections = function(e) { + return e.split("\nm=").map((function(e, t) { + return (t > 0 ? "m=" + e : e).trim() + "\r\n" + })) + }, t.getDescription = function(e) { + var r = t.splitSections(e); + return r && r[0] + }, t.getMediaSections = function(e) { + var r = t.splitSections(e); + return r.shift(), r + }, t.matchPrefix = function(e, r) { + return t.splitLines(e).filter((function(e) { + return 0 === e.indexOf(r) + })) + }, t.parseCandidate = function(e) { + for (var t, r = { + foundation: (t = 0 === e.indexOf("a=candidate:") ? e.substring(12) + .split(" ") : e.substring(10).split(" "))[0], + component: parseInt(t[1], 10), + protocol: t[2].toLowerCase(), + priority: parseInt(t[3], 10), + ip: t[4], + address: t[4], + port: parseInt(t[5], 10), + type: t[7] + }, n = 8; n < t.length; n += 2) switch (t[n]) { + case "raddr": + r.relatedAddress = t[n + 1]; + break; + case "rport": + r.relatedPort = parseInt(t[n + 1], 10); + break; + case "tcptype": + r.tcpType = t[n + 1]; + break; + case "ufrag": + r.ufrag = t[n + 1], r.usernameFragment = t[n + 1]; + break; + default: + r[t[n]] = t[n + 1] + } + return r + }, t.writeCandidate = function(e) { + var t = []; + t.push(e.foundation), t.push(e.component), t.push(e.protocol.toUpperCase()), t.push( + e.priority), t.push(e.address || e.ip), t.push(e.port); + var r = e.type; + return t.push("typ"), t.push(r), "host" !== r && e.relatedAddress && e + .relatedPort && (t.push("raddr"), t.push(e.relatedAddress), t.push("rport"), t + .push(e.relatedPort)), e.tcpType && "tcp" === e.protocol.toLowerCase() && (t + .push("tcptype"), t.push(e.tcpType)), (e.usernameFragment || e.ufrag) && (t + .push("ufrag"), t.push(e.usernameFragment || e.ufrag)), "candidate:" + t + .join(" ") + }, t.parseIceOptions = function(e) { + return e.substr(14).split(" ") + }, t.parseRtpMap = function(e) { + var t = e.substr(9).split(" "), + r = { + payloadType: parseInt(t.shift(), 10) + }; + return t = t[0].split("/"), r.name = t[0], r.clockRate = parseInt(t[1], 10), r + .channels = 3 === t.length ? parseInt(t[2], 10) : 1, r.numChannels = r.channels, + r + }, t.writeRtpMap = function(e) { + var t = e.payloadType; + void 0 !== e.preferredPayloadType && (t = e.preferredPayloadType); + var r = e.channels || e.numChannels || 1; + return "a=rtpmap:" + t + " " + e.name + "/" + e.clockRate + (1 !== r ? "/" + r : + "") + "\r\n" + }, t.parseExtmap = function(e) { + var t = e.substr(9).split(" "); + return { + id: parseInt(t[0], 10), + direction: t[0].indexOf("/") > 0 ? t[0].split("/")[1] : "sendrecv", + uri: t[1] + } + }, t.writeExtmap = function(e) { + return "a=extmap:" + (e.id || e.preferredId) + (e.direction && "sendrecv" !== e + .direction ? "/" + e.direction : "") + " " + e.uri + "\r\n" + }, t.parseFmtp = function(e) { + for (var t, r = {}, n = e.substr(e.indexOf(" ") + 1).split(";"), i = 0; i < n + .length; i++) r[(t = n[i].trim().split("="))[0].trim()] = t[1]; + return r + }, t.writeFmtp = function(e) { + var t = "", + r = e.payloadType; + if (void 0 !== e.preferredPayloadType && (r = e.preferredPayloadType), e + .parameters && Object.keys(e.parameters).length) { + var n = []; + Object.keys(e.parameters).forEach((function(t) { + e.parameters[t] ? n.push(t + "=" + e.parameters[t]) : n.push(t) + })), t += "a=fmtp:" + r + " " + n.join(";") + "\r\n" + } + return t + }, t.parseRtcpFb = function(e) { + var t = e.substr(e.indexOf(" ") + 1).split(" "); + return { + type: t.shift(), + parameter: t.join(" ") + } + }, t.writeRtcpFb = function(e) { + var t = "", + r = e.payloadType; + return void 0 !== e.preferredPayloadType && (r = e.preferredPayloadType), e + .rtcpFeedback && e.rtcpFeedback.length && e.rtcpFeedback.forEach((function(e) { + t += "a=rtcp-fb:" + r + " " + e.type + (e.parameter && e.parameter + .length ? " " + e.parameter : "") + "\r\n" + })), t + }, t.parseSsrcMedia = function(e) { + var t = e.indexOf(" "), + r = { + ssrc: parseInt(e.substr(7, t - 7), 10) + }, + n = e.indexOf(":", t); + return n > -1 ? (r.attribute = e.substr(t + 1, n - t - 1), r.value = e.substr(n + + 1)) : r.attribute = e.substr(t + 1), r + }, t.parseSsrcGroup = function(e) { + var t = e.substr(13).split(" "); + return { + semantics: t.shift(), + ssrcs: t.map((function(e) { + return parseInt(e, 10) + })) + } + }, t.getMid = function(e) { + var r = t.matchPrefix(e, "a=mid:")[0]; + if (r) return r.substr(6) + }, t.parseFingerprint = function(e) { + var t = e.substr(14).split(" "); + return { + algorithm: t[0].toLowerCase(), + value: t[1] + } + }, t.getDtlsParameters = function(e, r) { + return { + role: "auto", + fingerprints: t.matchPrefix(e + r, "a=fingerprint:").map(t.parseFingerprint) + } + }, t.writeDtlsParameters = function(e, t) { + var r = "a=setup:" + t + "\r\n"; + return e.fingerprints.forEach((function(e) { + r += "a=fingerprint:" + e.algorithm + " " + e.value + "\r\n" + })), r + }, t.parseCryptoLine = function(e) { + var t = e.substr(9).split(" "); + return { + tag: parseInt(t[0], 10), + cryptoSuite: t[1], + keyParams: t[2], + sessionParams: t.slice(3) + } + }, t.writeCryptoLine = function(e) { + return "a=crypto:" + e.tag + " " + e.cryptoSuite + " " + ("object" == typeof e + .keyParams ? t.writeCryptoKeyParams(e.keyParams) : e.keyParams) + (e + .sessionParams ? " " + e.sessionParams.join(" ") : "") + "\r\n" + }, t.parseCryptoKeyParams = function(e) { + if (0 !== e.indexOf("inline:")) return null; + var t = e.substr(7).split("|"); + return { + keyMethod: "inline", + keySalt: t[0], + lifeTime: t[1], + mkiValue: t[2] ? t[2].split(":")[0] : void 0, + mkiLength: t[2] ? t[2].split(":")[1] : void 0 + } + }, t.writeCryptoKeyParams = function(e) { + return e.keyMethod + ":" + e.keySalt + (e.lifeTime ? "|" + e.lifeTime : "") + (e + .mkiValue && e.mkiLength ? "|" + e.mkiValue + ":" + e.mkiLength : "") + }, t.getCryptoParameters = function(e, r) { + return t.matchPrefix(e + r, "a=crypto:").map(t.parseCryptoLine) + }, t.getIceParameters = function(e, r) { + var n = t.matchPrefix(e + r, "a=ice-ufrag:")[0], + i = t.matchPrefix(e + r, "a=ice-pwd:")[0]; + return n && i ? { + usernameFragment: n.substr(12), + password: i.substr(10) + } : null + }, t.writeIceParameters = function(e) { + return "a=ice-ufrag:" + e.usernameFragment + "\r\na=ice-pwd:" + e.password + "\r\n" + }, t.parseRtpParameters = function(e) { + for (var r = { + codecs: [], + headerExtensions: [], + fecMechanisms: [], + rtcp: [] + }, n = t.splitLines(e)[0].split(" "), i = 3; i < n.length; i++) { + var o = n[i], + s = t.matchPrefix(e, "a=rtpmap:" + o + " ")[0]; + if (s) { + var a = t.parseRtpMap(s), + c = t.matchPrefix(e, "a=fmtp:" + o + " "); + switch (a.parameters = c.length ? t.parseFmtp(c[0]) : {}, a.rtcpFeedback = t + .matchPrefix(e, "a=rtcp-fb:" + o + " ").map(t.parseRtcpFb), r.codecs + .push(a), a.name.toUpperCase()) { + case "RED": + case "ULPFEC": + r.fecMechanisms.push(a.name.toUpperCase()) + } + } + } + return t.matchPrefix(e, "a=extmap:").forEach((function(e) { + r.headerExtensions.push(t.parseExtmap(e)) + })), r + }, t.writeRtpDescription = function(e, r) { + var n = ""; + n += "m=" + e + " ", n += r.codecs.length > 0 ? "9" : "0", n += + " UDP/TLS/RTP/SAVPF ", n += r.codecs.map((function(e) { + return void 0 !== e.preferredPayloadType ? e.preferredPayloadType : + e.payloadType + })).join(" ") + "\r\n", n += "c=IN IP4 0.0.0.0\r\n", n += + "a=rtcp:9 IN IP4 0.0.0.0\r\n", r.codecs.forEach((function(e) { + n += t.writeRtpMap(e), n += t.writeFmtp(e), n += t.writeRtcpFb(e) + })); + var i = 0; + return r.codecs.forEach((function(e) { + e.maxptime > i && (i = e.maxptime) + })), i > 0 && (n += "a=maxptime:" + i + "\r\n"), n += "a=rtcp-mux\r\n", r + .headerExtensions && r.headerExtensions.forEach((function(e) { + n += t.writeExtmap(e) + })), n + }, t.parseRtpEncodingParameters = function(e) { + var r, n = [], + i = t.parseRtpParameters(e), + o = -1 !== i.fecMechanisms.indexOf("RED"), + s = -1 !== i.fecMechanisms.indexOf("ULPFEC"), + a = t.matchPrefix(e, "a=ssrc:").map((function(e) { + return t.parseSsrcMedia(e) + })).filter((function(e) { + return "cname" === e.attribute + })), + c = a.length > 0 && a[0].ssrc, + d = t.matchPrefix(e, "a=ssrc-group:FID").map((function(e) { + return e.substr(17).split(" ").map((function(e) { + return parseInt(e, 10) + })) + })); + d.length > 0 && d[0].length > 1 && d[0][0] === c && (r = d[0][1]), i.codecs.forEach( + (function(e) { + if ("RTX" === e.name.toUpperCase() && e.parameters.apt) { + var t = { + ssrc: c, + codecPayloadType: parseInt(e.parameters.apt, 10) + }; + c && r && (t.rtx = { + ssrc: r + }), n.push(t), o && ((t = JSON.parse(JSON.stringify(t))) + .fec = { + ssrc: c, + mechanism: s ? "red+ulpfec" : "red" + }, n.push(t)) + } + })), 0 === n.length && c && n.push({ + ssrc: c + }); + var p = t.matchPrefix(e, "b="); + return p.length && (p = 0 === p[0].indexOf("b=TIAS:") ? parseInt(p[0].substr(7), + 10) : 0 === p[0].indexOf("b=AS:") ? 1e3 * parseInt(p[0].substr(5), 10) * + .95 - 16e3 : void 0, n.forEach((function(e) { + e.maxBitrate = p + }))), n + }, t.parseRtcpParameters = function(e) { + var r = {}, + n = t.matchPrefix(e, "a=ssrc:").map((function(e) { + return t.parseSsrcMedia(e) + })).filter((function(e) { + return "cname" === e.attribute + }))[0]; + n && (r.cname = n.value, r.ssrc = n.ssrc); + var i = t.matchPrefix(e, "a=rtcp-rsize"); + r.reducedSize = i.length > 0, r.compound = 0 === i.length; + var o = t.matchPrefix(e, "a=rtcp-mux"); + return r.mux = o.length > 0, r + }, t.parseMsid = function(e) { + var r, n = t.matchPrefix(e, "a=msid:"); + if (1 === n.length) return { + stream: (r = n[0].substr(7).split(" "))[0], + track: r[1] + }; + var i = t.matchPrefix(e, "a=ssrc:").map((function(e) { + return t.parseSsrcMedia(e) + })).filter((function(e) { + return "msid" === e.attribute + })); + return i.length > 0 ? { + stream: (r = i[0].value.split(" "))[0], + track: r[1] + } : void 0 + }, t.parseSctpDescription = function(e) { + var r, n = t.parseMLine(e), + i = t.matchPrefix(e, "a=max-message-size:"); + i.length > 0 && (r = parseInt(i[0].substr(19), 10)), isNaN(r) && (r = 65536); + var o = t.matchPrefix(e, "a=sctp-port:"); + if (o.length > 0) return { + port: parseInt(o[0].substr(12), 10), + protocol: n.fmt, + maxMessageSize: r + }; + if (t.matchPrefix(e, "a=sctpmap:").length > 0) { + var s = t.matchPrefix(e, "a=sctpmap:")[0].substr(10).split(" "); + return { + port: parseInt(s[0], 10), + protocol: s[1], + maxMessageSize: r + } + } + }, t.writeSctpDescription = function(e, t) { + var r = []; + return r = "DTLS/SCTP" !== e.protocol ? ["m=" + e.kind + " 9 " + e.protocol + " " + + t.protocol + "\r\n", "c=IN IP4 0.0.0.0\r\n", "a=sctp-port:" + t.port + + "\r\n" + ] : ["m=" + e.kind + " 9 " + e.protocol + " " + t.port + "\r\n", + "c=IN IP4 0.0.0.0\r\n", "a=sctpmap:" + t.port + " " + t.protocol + + " 65535\r\n" + ], void 0 !== t.maxMessageSize && r.push("a=max-message-size:" + t + .maxMessageSize + "\r\n"), r.join("") + }, t.generateSessionId = function() { + return Math.random().toString().substr(2, 21) + }, t.writeSessionBoilerplate = function(e, r, n) { + var i = void 0 !== r ? r : 2; + return "v=0\r\no=" + (n || "thisisadapterortc") + " " + (e || t + .generateSessionId()) + " " + i + " IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n" + }, t.writeMediaSection = function(e, r, n, i) { + var o = t.writeRtpDescription(e.kind, r); + if (o += t.writeIceParameters(e.iceGatherer.getLocalParameters()), o += t + .writeDtlsParameters(e.dtlsTransport.getLocalParameters(), "offer" === n ? + "actpass" : "active"), o += "a=mid:" + e.mid + "\r\n", e.direction ? o += + "a=" + e.direction + "\r\n" : e.rtpSender && e.rtpReceiver ? o += + "a=sendrecv\r\n" : e.rtpSender ? o += "a=sendonly\r\n" : e.rtpReceiver ? o += + "a=recvonly\r\n" : o += "a=inactive\r\n", e.rtpSender) { + var s = "msid:" + i.id + " " + e.rtpSender.track.id + "\r\n"; + o += "a=" + s, o += "a=ssrc:" + e.sendEncodingParameters[0].ssrc + " " + s, e + .sendEncodingParameters[0].rtx && (o += "a=ssrc:" + e + .sendEncodingParameters[0].rtx.ssrc + " " + s, o += + "a=ssrc-group:FID " + e.sendEncodingParameters[0].ssrc + " " + e + .sendEncodingParameters[0].rtx.ssrc + "\r\n") + } + return o += "a=ssrc:" + e.sendEncodingParameters[0].ssrc + " cname:" + t + .localCName + "\r\n", e.rtpSender && e.sendEncodingParameters[0].rtx && (o += + "a=ssrc:" + e.sendEncodingParameters[0].rtx.ssrc + " cname:" + t + .localCName + "\r\n"), o + }, t.getDirection = function(e, r) { + for (var n = t.splitLines(e), i = 0; i < n.length; i++) switch (n[i]) { + case "a=sendrecv": + case "a=sendonly": + case "a=recvonly": + case "a=inactive": + return n[i].substr(2) + } + return r ? t.getDirection(r) : "sendrecv" + }, t.getKind = function(e) { + return t.splitLines(e)[0].split(" ")[0].substr(2) + }, t.isRejected = function(e) { + return "0" === e.split(" ", 2)[1] + }, t.parseMLine = function(e) { + var r = t.splitLines(e)[0].substr(2).split(" "); + return { + kind: r[0], + port: parseInt(r[1], 10), + protocol: r[2], + fmt: r.slice(3).join(" ") + } + }, t.parseOLine = function(e) { + var r = t.matchPrefix(e, "o=")[0].substr(2).split(" "); + return { + username: r[0], + sessionId: r[1], + sessionVersion: parseInt(r[2], 10), + netType: r[3], + addressType: r[4], + address: r[5] + } + }, t.isValidSDP = function(e) { + if ("string" != typeof e || 0 === e.length) return !1; + for (var r = t.splitLines(e), n = 0; n < r.length; n++) + if (r[n].length < 2 || "=" !== r[n].charAt(1)) return !1; + return !0 + }, e.exports = t + })); + + function se(e, t, r, n, i) { + var o = oe.writeRtpDescription(e.kind, t); + if (o += oe.writeIceParameters(e.iceGatherer.getLocalParameters()), o += oe.writeDtlsParameters(e + .dtlsTransport.getLocalParameters(), "offer" === r ? "actpass" : i || "active"), o += "a=mid:" + + e.mid + "\r\n", e.rtpSender && e.rtpReceiver ? o += "a=sendrecv\r\n" : e.rtpSender ? o += + "a=sendonly\r\n" : e.rtpReceiver ? o += "a=recvonly\r\n" : o += "a=inactive\r\n", e.rtpSender) { + var s = e.rtpSender._initialTrackId || e.rtpSender.track.id; + e.rtpSender._initialTrackId = s; + var a = "msid:" + (n ? n.id : "-") + " " + s + "\r\n"; + o += "a=" + a, o += "a=ssrc:" + e.sendEncodingParameters[0].ssrc + " " + a, e + .sendEncodingParameters[0].rtx && (o += "a=ssrc:" + e.sendEncodingParameters[0].rtx.ssrc + " " + + a, o += "a=ssrc-group:FID " + e.sendEncodingParameters[0].ssrc + " " + e + .sendEncodingParameters[0].rtx.ssrc + "\r\n") + } + return o += "a=ssrc:" + e.sendEncodingParameters[0].ssrc + " cname:" + oe.localCName + "\r\n", e + .rtpSender && e.sendEncodingParameters[0].rtx && (o += "a=ssrc:" + e.sendEncodingParameters[0].rtx + .ssrc + " cname:" + oe.localCName + "\r\n"), o + } + + function ae(e, t) { + var r = { + codecs: [], + headerExtensions: [], + fecMechanisms: [] + }, + n = function(e, t) { + e = parseInt(e, 10); + for (var r = 0; r < t.length; r++) + if (t[r].payloadType === e || t[r].preferredPayloadType === e) return t[r] + }, + i = function(e, t, r, i) { + var o = n(e.parameters.apt, r), + s = n(t.parameters.apt, i); + return o && s && o.name.toLowerCase() === s.name.toLowerCase() + }; + return e.codecs.forEach((function(n) { + for (var o = 0; o < t.codecs.length; o++) { + var s = t.codecs[o]; + if (n.name.toLowerCase() === s.name.toLowerCase() && n.clockRate === s.clockRate) { + if ("rtx" === n.name.toLowerCase() && n.parameters && s.parameters.apt && !i(n, + s, e.codecs, t.codecs)) continue; + (s = JSON.parse(JSON.stringify(s))).numChannels = Math.min(n.numChannels, s + .numChannels), r.codecs.push(s), s.rtcpFeedback = s.rtcpFeedback.filter( + (function(e) { + for (var t = 0; t < n.rtcpFeedback.length; t++) + if (n.rtcpFeedback[t].type === e.type && n.rtcpFeedback[t] + .parameter === e.parameter) return !0; + return !1 + })); + break + } + } + })), e.headerExtensions.forEach((function(e) { + for (var n = 0; n < t.headerExtensions.length; n++) { + var i = t.headerExtensions[n]; + if (e.uri === i.uri) { + r.headerExtensions.push(i); + break + } + } + })), r + } + + function ce(e, t, r) { + return -1 !== { + offer: { + setLocalDescription: ["stable", "have-local-offer"], + setRemoteDescription: ["stable", "have-remote-offer"] + }, + answer: { + setLocalDescription: ["have-remote-offer", "have-local-pranswer"], + setRemoteDescription: ["have-local-offer", "have-remote-pranswer"] + } + } [t][e].indexOf(r) + } + + function de(e, t) { + var r = e.getRemoteCandidates().find((function(e) { + return t.foundation === e.foundation && t.ip === e.ip && t.port === e.port && t + .priority === e.priority && t.protocol === e.protocol && t.type === e.type + })); + return r || e.addRemoteCandidate(t), !r + } + + function pe(e, t) { + var r = new Error(t); + return r.name = e, r.code = { + NotSupportedError: 9, + InvalidStateError: 11, + InvalidAccessError: 15, + TypeError: void 0, + OperationError: void 0 + } [e], r + } + var le = function(e, t) { + function r(t, r) { + r.addTrack(t), r.dispatchEvent(new e.MediaStreamTrackEvent("addtrack", { + track: t + })) + } + + function n(t, r, n, i) { + var o = new Event("track"); + o.track = r, o.receiver = n, o.transceiver = { + receiver: n + }, o.streams = i, e.setTimeout((function() { + t._dispatchEvent("track", o) + })) + } + var i = function(r) { + var n = this, + i = document.createDocumentFragment(); + if (["addEventListener", "removeEventListener", "dispatchEvent"].forEach((function(e) { + n[e] = i[e].bind(i) + })), this.canTrickleIceCandidates = null, this.needNegotiation = !1, this + .localStreams = [], this.remoteStreams = [], this._localDescription = null, this + ._remoteDescription = null, this.signalingState = "stable", this.iceConnectionState = + "new", this.connectionState = "new", this.iceGatheringState = "new", r = JSON.parse(JSON + .stringify(r || {})), this.usingBundle = "max-bundle" === r.bundlePolicy, + "negotiate" === r.rtcpMuxPolicy) throw pe("NotSupportedError", + "rtcpMuxPolicy 'negotiate' is not supported"); + switch (r.rtcpMuxPolicy || (r.rtcpMuxPolicy = "require"), r.iceTransportPolicy) { + case "all": + case "relay": + break; + default: + r.iceTransportPolicy = "all" + } + switch (r.bundlePolicy) { + case "balanced": + case "max-compat": + case "max-bundle": + break; + default: + r.bundlePolicy = "balanced" + } + if (r.iceServers = function(e, t) { + var r = !1; + return (e = JSON.parse(JSON.stringify(e))).filter((function(e) { + if (e && (e.urls || e.url)) { + var n = e.urls || e.url; + e.url && !e.urls && console.warn( + "RTCIceServer.url is deprecated! Use urls instead."); + var i = "string" == typeof n; + return i && (n = [n]), n = n.filter((function(e) { + return 0 !== e.indexOf("turn:") || -1 === e + .indexOf("transport=udp") || -1 !== e + .indexOf("turn:[") || r ? 0 === e.indexOf( + "stun:") && t >= 14393 && -1 === e + .indexOf("?transport=udp") : (r = !0, !0) + })), delete e.url, e.urls = i ? n[0] : n, !!n.length + } + })) + }(r.iceServers || [], t), this._iceGatherers = [], r.iceCandidatePoolSize) + for (var o = r.iceCandidatePoolSize; o > 0; o--) this._iceGatherers.push(new e + .RTCIceGatherer({ + iceServers: r.iceServers, + gatherPolicy: r.iceTransportPolicy + })); + else r.iceCandidatePoolSize = 0; + this._config = r, this.transceivers = [], this._sdpSessionId = oe.generateSessionId(), this + ._sdpSessionVersion = 0, this._dtlsRole = void 0, this._isClosed = !1 + }; + Object.defineProperty(i.prototype, "localDescription", { + configurable: !0, + get: function() { + return this._localDescription + } + }), Object.defineProperty(i.prototype, "remoteDescription", { + configurable: !0, + get: function() { + return this._remoteDescription + } + }), i.prototype.onicecandidate = null, i.prototype.onaddstream = null, i.prototype.ontrack = + null, i.prototype.onremovestream = null, i.prototype.onsignalingstatechange = null, i.prototype + .oniceconnectionstatechange = null, i.prototype.onconnectionstatechange = null, i.prototype + .onicegatheringstatechange = null, i.prototype.onnegotiationneeded = null, i.prototype + .ondatachannel = null, i.prototype._dispatchEvent = function(e, t) { + this._isClosed || (this.dispatchEvent(t), "function" == typeof this["on" + e] && this["on" + + e](t)) + }, i.prototype._emitGatheringStateChange = function() { + var e = new Event("icegatheringstatechange"); + this._dispatchEvent("icegatheringstatechange", e) + }, i.prototype.getConfiguration = function() { + return this._config + }, i.prototype.getLocalStreams = function() { + return this.localStreams + }, i.prototype.getRemoteStreams = function() { + return this.remoteStreams + }, i.prototype._createTransceiver = function(e, t) { + var r = this.transceivers.length > 0, + n = { + track: null, + iceGatherer: null, + iceTransport: null, + dtlsTransport: null, + localCapabilities: null, + remoteCapabilities: null, + rtpSender: null, + rtpReceiver: null, + kind: e, + mid: null, + sendEncodingParameters: null, + recvEncodingParameters: null, + stream: null, + associatedRemoteMediaStreams: [], + wantReceive: !0 + }; + if (this.usingBundle && r) n.iceTransport = this.transceivers[0].iceTransport, n + .dtlsTransport = this.transceivers[0].dtlsTransport; + else { + var i = this._createIceAndDtlsTransports(); + n.iceTransport = i.iceTransport, n.dtlsTransport = i.dtlsTransport + } + return t || this.transceivers.push(n), n + }, i.prototype.addTrack = function(t, r) { + if (this._isClosed) throw pe("InvalidStateError", + "Attempted to call addTrack on a closed peerconnection."); + var n; + if (this.transceivers.find((function(e) { + return e.track === t + }))) throw pe("InvalidAccessError", "Track already exists."); + for (var i = 0; i < this.transceivers.length; i++) this.transceivers[i].track || this + .transceivers[i].kind !== t.kind || (n = this.transceivers[i]); + return n || (n = this._createTransceiver(t.kind)), this._maybeFireNegotiationNeeded(), - + 1 === this.localStreams.indexOf(r) && this.localStreams.push(r), n.track = t, n.stream = + r, n.rtpSender = new e.RTCRtpSender(t, n.dtlsTransport), n.rtpSender + }, i.prototype.addStream = function(e) { + var r = this; + if (t >= 15025) e.getTracks().forEach((function(t) { + r.addTrack(t, e) + })); + else { + var n = e.clone(); + e.getTracks().forEach((function(e, t) { + var r = n.getTracks()[t]; + e.addEventListener("enabled", (function(e) { + r.enabled = e.enabled + })) + })), n.getTracks().forEach((function(e) { + r.addTrack(e, n) + })) + } + }, i.prototype.removeTrack = function(t) { + if (this._isClosed) throw pe("InvalidStateError", + "Attempted to call removeTrack on a closed peerconnection."); + if (!(t instanceof e.RTCRtpSender)) throw new TypeError( + "Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender." + ); + var r = this.transceivers.find((function(e) { + return e.rtpSender === t + })); + if (!r) throw pe("InvalidAccessError", "Sender was not created by this connection."); + var n = r.stream; + r.rtpSender.stop(), r.rtpSender = null, r.track = null, r.stream = null, -1 === this + .transceivers.map((function(e) { + return e.stream + })).indexOf(n) && this.localStreams.indexOf(n) > -1 && this.localStreams.splice(this + .localStreams.indexOf(n), 1), this._maybeFireNegotiationNeeded() + }, i.prototype.removeStream = function(e) { + var t = this; + e.getTracks().forEach((function(e) { + var r = t.getSenders().find((function(t) { + return t.track === e + })); + r && t.removeTrack(r) + })) + }, i.prototype.getSenders = function() { + return this.transceivers.filter((function(e) { + return !!e.rtpSender + })).map((function(e) { + return e.rtpSender + })) + }, i.prototype.getReceivers = function() { + return this.transceivers.filter((function(e) { + return !!e.rtpReceiver + })).map((function(e) { + return e.rtpReceiver + })) + }, i.prototype._createIceGatherer = function(t, r) { + var n = this; + if (r && t > 0) return this.transceivers[0].iceGatherer; + if (this._iceGatherers.length) return this._iceGatherers.shift(); + var i = new e.RTCIceGatherer({ + iceServers: this._config.iceServers, + gatherPolicy: this._config.iceTransportPolicy + }); + return Object.defineProperty(i, "state", { + value: "new", + writable: !0 + }), this.transceivers[t].bufferedCandidateEvents = [], this.transceivers[t] + .bufferCandidates = function(e) { + var r = !e.candidate || 0 === Object.keys(e.candidate).length; + i.state = r ? "completed" : "gathering", null !== n.transceivers[t] + .bufferedCandidateEvents && n.transceivers[t].bufferedCandidateEvents.push(e) + }, i.addEventListener("localcandidate", this.transceivers[t].bufferCandidates), i + }, i.prototype._gather = function(t, r) { + var n = this, + i = this.transceivers[r].iceGatherer; + if (!i.onlocalcandidate) { + var o = this.transceivers[r].bufferedCandidateEvents; + this.transceivers[r].bufferedCandidateEvents = null, i.removeEventListener( + "localcandidate", this.transceivers[r].bufferCandidates), i.onlocalcandidate = + function(e) { + if (!(n.usingBundle && r > 0)) { + var o = new Event("icecandidate"); + o.candidate = { + sdpMid: t, + sdpMLineIndex: r + }; + var s = e.candidate, + a = !s || 0 === Object.keys(s).length; + if (a) "new" !== i.state && "gathering" !== i.state || (i.state = + "completed"); + else { + "new" === i.state && (i.state = "gathering"), s.component = 1, s.ufrag = + i.getLocalParameters().usernameFragment; + var c = oe.writeCandidate(s); + o.candidate = Object.assign(o.candidate, oe.parseCandidate(c)), o + .candidate.candidate = c, o.candidate.toJSON = function() { + return { + candidate: o.candidate.candidate, + sdpMid: o.candidate.sdpMid, + sdpMLineIndex: o.candidate.sdpMLineIndex, + usernameFragment: o.candidate.usernameFragment + } + } + } + var d = oe.getMediaSections(n._localDescription.sdp); + d[o.candidate.sdpMLineIndex] += a ? "a=end-of-candidates\r\n" : "a=" + o + .candidate.candidate + "\r\n", n._localDescription.sdp = oe + .getDescription(n._localDescription.sdp) + d.join(""); + var p = n.transceivers.every((function(e) { + return e.iceGatherer && "completed" === e.iceGatherer.state + })); + "gathering" !== n.iceGatheringState && (n.iceGatheringState = "gathering", n + ._emitGatheringStateChange()), a || n._dispatchEvent("icecandidate", + o), p && (n._dispatchEvent("icecandidate", new Event( + "icecandidate")), n.iceGatheringState = "complete", n + ._emitGatheringStateChange()) + } + }, e.setTimeout((function() { + o.forEach((function(e) { + i.onlocalcandidate(e) + })) + }), 0) + } + }, i.prototype._createIceAndDtlsTransports = function() { + var t = this, + r = new e.RTCIceTransport(null); + r.onicestatechange = function() { + t._updateIceConnectionState(), t._updateConnectionState() + }; + var n = new e.RTCDtlsTransport(r); + return n.ondtlsstatechange = function() { + t._updateConnectionState() + }, n.onerror = function() { + Object.defineProperty(n, "state", { + value: "failed", + writable: !0 + }), t._updateConnectionState() + }, { + iceTransport: r, + dtlsTransport: n + } + }, i.prototype._disposeIceAndDtlsTransports = function(e) { + var t = this.transceivers[e].iceGatherer; + t && (delete t.onlocalcandidate, delete this.transceivers[e].iceGatherer); + var r = this.transceivers[e].iceTransport; + r && (delete r.onicestatechange, delete this.transceivers[e].iceTransport); + var n = this.transceivers[e].dtlsTransport; + n && (delete n.ondtlsstatechange, delete n.onerror, delete this.transceivers[e] + .dtlsTransport) + }, i.prototype._transceive = function(e, r, n) { + var i = ae(e.localCapabilities, e.remoteCapabilities); + r && e.rtpSender && (i.encodings = e.sendEncodingParameters, i.rtcp = { + cname: oe.localCName, + compound: e.rtcpParameters.compound + }, e.recvEncodingParameters.length && (i.rtcp.ssrc = e.recvEncodingParameters[0] + .ssrc), e.rtpSender.send(i)), n && e.rtpReceiver && i.codecs.length > 0 && ( + "video" === e.kind && e.recvEncodingParameters && t < 15019 && e + .recvEncodingParameters.forEach((function(e) { + delete e.rtx + })), e.recvEncodingParameters.length ? i.encodings = e.recvEncodingParameters : i + .encodings = [{}], i.rtcp = { + compound: e.rtcpParameters.compound + }, e.rtcpParameters.cname && (i.rtcp.cname = e.rtcpParameters.cname), e + .sendEncodingParameters.length && (i.rtcp.ssrc = e.sendEncodingParameters[0].ssrc), + e.rtpReceiver.receive(i)) + }, i.prototype.setLocalDescription = function(e) { + var t, r, n = this; + if (-1 === ["offer", "answer"].indexOf(e.type)) return Promise.reject(pe("TypeError", + 'Unsupported type "' + e.type + '"')); + if (!ce("setLocalDescription", e.type, n.signalingState) || n._isClosed) return Promise + .reject(pe("InvalidStateError", "Can not set local " + e.type + " in state " + n + .signalingState)); + if ("offer" === e.type) t = oe.splitSections(e.sdp), r = t.shift(), t.forEach((function(e, + t) { + var r = oe.parseRtpParameters(e); + n.transceivers[t].localCapabilities = r + })), n.transceivers.forEach((function(e, t) { + n._gather(e.mid, t) + })); + else if ("answer" === e.type) { + t = oe.splitSections(n._remoteDescription.sdp), r = t.shift(); + var i = oe.matchPrefix(r, "a=ice-lite").length > 0; + t.forEach((function(e, t) { + var o = n.transceivers[t], + s = o.iceGatherer, + a = o.iceTransport, + c = o.dtlsTransport, + d = o.localCapabilities, + p = o.remoteCapabilities; + if (!(oe.isRejected(e) && 0 === oe.matchPrefix(e, "a=bundle-only") + .length) && !o.rejected) { + var l = oe.getIceParameters(e, r), + u = oe.getDtlsParameters(e, r); + i && (u.role = "server"), n.usingBundle && 0 !== t || (n._gather(o + .mid, t), "new" === a.state && a.start(s, l, i ? + "controlling" : "controlled"), "new" === c.state && c + .start(u)); + var f = ae(d, p); + n._transceive(o, f.codecs.length > 0, !1) + } + })) + } + return n._localDescription = { + type: e.type, + sdp: e.sdp + }, "offer" === e.type ? n._updateSignalingState("have-local-offer") : n + ._updateSignalingState("stable"), Promise.resolve() + }, i.prototype.setRemoteDescription = function(i) { + var o = this; + if (-1 === ["offer", "answer"].indexOf(i.type)) return Promise.reject(pe("TypeError", + 'Unsupported type "' + i.type + '"')); + if (!ce("setRemoteDescription", i.type, o.signalingState) || o._isClosed) return Promise + .reject(pe("InvalidStateError", "Can not set remote " + i.type + " in state " + o + .signalingState)); + var s = {}; + o.remoteStreams.forEach((function(e) { + s[e.id] = e + })); + var a = [], + c = oe.splitSections(i.sdp), + d = c.shift(), + p = oe.matchPrefix(d, "a=ice-lite").length > 0, + l = oe.matchPrefix(d, "a=group:BUNDLE ").length > 0; + o.usingBundle = l; + var u = oe.matchPrefix(d, "a=ice-options:")[0]; + return o.canTrickleIceCandidates = !!u && u.substr(14).split(" ").indexOf("trickle") >= 0, c + .forEach((function(n, c) { + var u = oe.splitLines(n), + f = oe.getKind(n), + h = oe.isRejected(n) && 0 === oe.matchPrefix(n, "a=bundle-only").length, + m = u[0].substr(2).split(" ")[2], + v = oe.getDirection(n, d), + g = oe.parseMsid(n), + y = oe.getMid(n) || oe.generateIdentifier(); + if (h || "application" === f && ("DTLS/SCTP" === m || "UDP/DTLS/SCTP" === + m)) o.transceivers[c] = { + mid: y, + kind: f, + protocol: m, + rejected: !0 + }; + else { + var w, T, C, S, b, R, E, P, k; + !h && o.transceivers[c] && o.transceivers[c].rejected && (o + .transceivers[c] = o._createTransceiver(f, !0)); + var _, x, D = oe.parseRtpParameters(n); + h || (_ = oe.getIceParameters(n, d), (x = oe.getDtlsParameters(n, d)) + .role = "client"), E = oe.parseRtpEncodingParameters(n); + var O = oe.parseRtcpParameters(n), + I = oe.matchPrefix(n, "a=end-of-candidates", d).length > 0, + M = oe.matchPrefix(n, "a=candidate:").map((function(e) { + return oe.parseCandidate(e) + })).filter((function(e) { + return 1 === e.component + })); + if (("offer" === i.type || "answer" === i.type) && !h && l && c > 0 && o + .transceivers[c] && (o._disposeIceAndDtlsTransports(c), o + .transceivers[c].iceGatherer = o.transceivers[0].iceGatherer, o + .transceivers[c].iceTransport = o.transceivers[0].iceTransport, + o.transceivers[c].dtlsTransport = o.transceivers[0] + .dtlsTransport, o.transceivers[c].rtpSender && o.transceivers[c] + .rtpSender.setTransport(o.transceivers[0].dtlsTransport), o + .transceivers[c].rtpReceiver && o.transceivers[c].rtpReceiver + .setTransport(o.transceivers[0].dtlsTransport)), "offer" !== i + .type || h) { + if ("answer" === i.type && !h) { + T = (w = o.transceivers[c]).iceGatherer, C = w.iceTransport, S = + w.dtlsTransport, b = w.rtpReceiver, R = w + .sendEncodingParameters, P = w.localCapabilities, o + .transceivers[c].recvEncodingParameters = E, o.transceivers[ + c].remoteCapabilities = D, o.transceivers[c] + .rtcpParameters = O, M.length && "new" === C.state && (!p && + !I || l && 0 !== c ? M.forEach((function(e) { + de(w.iceTransport, e) + })) : C.setRemoteCandidates(M)), l && 0 !== c || ( + "new" === C.state && C.start(T, _, "controlling"), + "new" === S.state && S.start(x)), !ae(w + .localCapabilities, w.remoteCapabilities).codecs.filter( + (function(e) { + return "rtx" === e.name.toLowerCase() + })).length && w.sendEncodingParameters[0].rtx && + delete w.sendEncodingParameters[0].rtx, o._transceive(w, + "sendrecv" === v || "recvonly" === v, "sendrecv" === + v || "sendonly" === v), !b || "sendrecv" !== v && + "sendonly" !== v ? delete w.rtpReceiver : (k = b.track, g ? + (s[g.stream] || (s[g.stream] = new e.MediaStream), r(k, + s[g.stream]), a.push([k, b, s[g.stream]])) : (s + .default || (s.default = new e.MediaStream), r(k, s + .default), a.push([k, b, s.default]))) + } + } else { + (w = o.transceivers[c] || o._createTransceiver(f)).mid = y, w + .iceGatherer || (w.iceGatherer = o._createIceGatherer(c, l)), M + .length && "new" === w.iceTransport.state && (!I || l && 0 !== + c ? M.forEach((function(e) { + de(w.iceTransport, e) + })) : w.iceTransport.setRemoteCandidates(M)), P = e + .RTCRtpReceiver.getCapabilities(f), t < 15019 && (P.codecs = P + .codecs.filter((function(e) { + return "rtx" !== e.name + }))), R = w.sendEncodingParameters || [{ + ssrc: 1001 * (2 * c + 2) + }]; + var L, A = !1; + if ("sendrecv" === v || "sendonly" === v) { + if (A = !w.rtpReceiver, b = w.rtpReceiver || new e + .RTCRtpReceiver(w.dtlsTransport, f), A) k = b.track, g && + "-" === g.stream || (g ? (s[g.stream] || (s[g.stream] = + new e.MediaStream, Object.defineProperty(s[g + .stream], "id", { + get: function() { + return g.stream + } + })), Object.defineProperty(k, "id", { + get: function() { + return g.track + } + }), L = s[g.stream]) : (s.default || (s.default = new e + .MediaStream), L = s.default)), L && (r(k, L), w + .associatedRemoteMediaStreams.push(L)), a.push([k, b, + L]) + } else w.rtpReceiver && w.rtpReceiver.track && (w + .associatedRemoteMediaStreams.forEach((function(t) { + var r = t.getTracks().find((function(e) { + return e.id === w.rtpReceiver + .track.id + })); + r && function(t, r) { + r.removeTrack(t), r.dispatchEvent(new e + .MediaStreamTrackEvent( + "removetrack", { + track: t + })) + }(r, t) + })), w.associatedRemoteMediaStreams = []); + w.localCapabilities = P, w.remoteCapabilities = D, w.rtpReceiver = + b, w.rtcpParameters = O, w.sendEncodingParameters = R, w + .recvEncodingParameters = E, o._transceive(o.transceivers[c], ! + 1, A) + } + } + })), void 0 === o._dtlsRole && (o._dtlsRole = "offer" === i.type ? "active" : + "passive"), o._remoteDescription = { + type: i.type, + sdp: i.sdp + }, "offer" === i.type ? o._updateSignalingState("have-remote-offer") : o + ._updateSignalingState("stable"), Object.keys(s).forEach((function(t) { + var r = s[t]; + if (r.getTracks().length) { + if (-1 === o.remoteStreams.indexOf(r)) { + o.remoteStreams.push(r); + var i = new Event("addstream"); + i.stream = r, e.setTimeout((function() { + o._dispatchEvent("addstream", i) + })) + } + a.forEach((function(e) { + var t = e[0], + i = e[1]; + r.id === e[2].id && n(o, t, i, [r]) + })) + } + })), a.forEach((function(e) { + e[2] || n(o, e[0], e[1], []) + })), e.setTimeout((function() { + o && o.transceivers && o.transceivers.forEach((function(e) { + e.iceTransport && "new" === e.iceTransport.state && e + .iceTransport.getRemoteCandidates().length > 0 && ( + console.warn( + "Timeout for addRemoteCandidate. Consider sending an end-of-candidates notification" + ), e.iceTransport.addRemoteCandidate({})) + })) + }), 4e3), Promise.resolve() + }, i.prototype.close = function() { + this.transceivers.forEach((function(e) { + e.iceTransport && e.iceTransport.stop(), e.dtlsTransport && e.dtlsTransport + .stop(), e.rtpSender && e.rtpSender.stop(), e.rtpReceiver && e + .rtpReceiver.stop() + })), this._isClosed = !0, this._updateSignalingState("closed") + }, i.prototype._updateSignalingState = function(e) { + this.signalingState = e; + var t = new Event("signalingstatechange"); + this._dispatchEvent("signalingstatechange", t) + }, i.prototype._maybeFireNegotiationNeeded = function() { + var t = this; + "stable" === this.signalingState && !0 !== this.needNegotiation && (this.needNegotiation = ! + 0, e.setTimeout((function() { + if (t.needNegotiation) { + t.needNegotiation = !1; + var e = new Event("negotiationneeded"); + t._dispatchEvent("negotiationneeded", e) + } + }), 0)) + }, i.prototype._updateIceConnectionState = function() { + var e, t = { + new: 0, + closed: 0, + checking: 0, + connected: 0, + completed: 0, + disconnected: 0, + failed: 0 + }; + if (this.transceivers.forEach((function(e) { + e.iceTransport && !e.rejected && t[e.iceTransport.state]++ + })), e = "new", t.failed > 0 ? e = "failed" : t.checking > 0 ? e = "checking" : t + .disconnected > 0 ? e = "disconnected" : t.new > 0 ? e = "new" : t.connected > 0 ? e = + "connected" : t.completed > 0 && (e = "completed"), e !== this.iceConnectionState) { + this.iceConnectionState = e; + var r = new Event("iceconnectionstatechange"); + this._dispatchEvent("iceconnectionstatechange", r) + } + }, i.prototype._updateConnectionState = function() { + var e, t = { + new: 0, + closed: 0, + connecting: 0, + connected: 0, + completed: 0, + disconnected: 0, + failed: 0 + }; + if (this.transceivers.forEach((function(e) { + e.iceTransport && e.dtlsTransport && !e.rejected && (t[e.iceTransport + .state]++, t[e.dtlsTransport.state]++) + })), t.connected += t.completed, e = "new", t.failed > 0 ? e = "failed" : t.connecting > + 0 ? e = "connecting" : t.disconnected > 0 ? e = "disconnected" : t.new > 0 ? e = "new" : + t.connected > 0 && (e = "connected"), e !== this.connectionState) { + this.connectionState = e; + var r = new Event("connectionstatechange"); + this._dispatchEvent("connectionstatechange", r) + } + }, i.prototype.createOffer = function() { + var r = this; + if (r._isClosed) return Promise.reject(pe("InvalidStateError", + "Can not call createOffer after close")); + var n = r.transceivers.filter((function(e) { + return "audio" === e.kind + })).length, + i = r.transceivers.filter((function(e) { + return "video" === e.kind + })).length, + o = arguments[0]; + if (o) { + if (o.mandatory || o.optional) throw new TypeError( + "Legacy mandatory/optional constraints not supported."); + void 0 !== o.offerToReceiveAudio && (n = !0 === o.offerToReceiveAudio ? 1 : !1 === o + .offerToReceiveAudio ? 0 : o.offerToReceiveAudio), void 0 !== o + .offerToReceiveVideo && (i = !0 === o.offerToReceiveVideo ? 1 : !1 === o + .offerToReceiveVideo ? 0 : o.offerToReceiveVideo) + } + for (r.transceivers.forEach((function(e) { + "audio" === e.kind ? --n < 0 && (e.wantReceive = !1) : "video" === e.kind && + --i < 0 && (e.wantReceive = !1) + })); n > 0 || i > 0;) n > 0 && (r._createTransceiver("audio"), n--), i > 0 && (r + ._createTransceiver("video"), i--); + var s = oe.writeSessionBoilerplate(r._sdpSessionId, r._sdpSessionVersion++); + r.transceivers.forEach((function(n, i) { + var o = n.track, + s = n.kind, + a = n.mid || oe.generateIdentifier(); + n.mid = a, n.iceGatherer || (n.iceGatherer = r._createIceGatherer(i, r + .usingBundle)); + var c = e.RTCRtpSender.getCapabilities(s); + t < 15019 && (c.codecs = c.codecs.filter((function(e) { + return "rtx" !== e.name + }))), c.codecs.forEach((function(e) { + "H264" === e.name && void 0 === e.parameters[ + "level-asymmetry-allowed"] && (e.parameters[ + "level-asymmetry-allowed"] = "1"), n + .remoteCapabilities && n.remoteCapabilities.codecs && n + .remoteCapabilities.codecs.forEach((function(t) { + e.name.toLowerCase() === t.name + .toLowerCase() && e.clockRate === t + .clockRate && (e.preferredPayloadType = + t.payloadType) + })) + })), c.headerExtensions.forEach((function(e) { + (n.remoteCapabilities && n.remoteCapabilities + .headerExtensions || []).forEach((function(t) { + e.uri === t.uri && (e.id = t.id) + })) + })); + var d = n.sendEncodingParameters || [{ + ssrc: 1001 * (2 * i + 1) + }]; + o && t >= 15019 && "video" === s && !d[0].rtx && (d[0].rtx = { + ssrc: d[0].ssrc + 1 + }), n.wantReceive && (n.rtpReceiver = new e.RTCRtpReceiver(n + .dtlsTransport, s)), n.localCapabilities = c, n + .sendEncodingParameters = d + })), "max-compat" !== r._config.bundlePolicy && (s += "a=group:BUNDLE " + r.transceivers + .map((function(e) { + return e.mid + })).join(" ") + "\r\n"), s += "a=ice-options:trickle\r\n", r.transceivers.forEach(( + function(e, t) { + s += se(e, e.localCapabilities, "offer", e.stream, r._dtlsRole), s += + "a=rtcp-rsize\r\n", !e.iceGatherer || "new" === r.iceGatheringState || + 0 !== t && r.usingBundle || (e.iceGatherer.getLocalCandidates().forEach( + (function(e) { + e.component = 1, s += "a=" + oe.writeCandidate(e) + + "\r\n" + })), "completed" === e.iceGatherer.state && (s += + "a=end-of-candidates\r\n")) + })); + var a = new e.RTCSessionDescription({ + type: "offer", + sdp: s + }); + return Promise.resolve(a) + }, i.prototype.createAnswer = function() { + var r = this; + if (r._isClosed) return Promise.reject(pe("InvalidStateError", + "Can not call createAnswer after close")); + if ("have-remote-offer" !== r.signalingState && "have-local-pranswer" !== r.signalingState) + return Promise.reject(pe("InvalidStateError", + "Can not call createAnswer in signalingState " + r.signalingState)); + var n = oe.writeSessionBoilerplate(r._sdpSessionId, r._sdpSessionVersion++); + r.usingBundle && (n += "a=group:BUNDLE " + r.transceivers.map((function(e) { + return e.mid + })).join(" ") + "\r\n"), n += "a=ice-options:trickle\r\n"; + var i = oe.getMediaSections(r._remoteDescription.sdp).length; + r.transceivers.forEach((function(e, o) { + if (!(o + 1 > i)) { + if (e.rejected) return "application" === e.kind ? "DTLS/SCTP" === e + .protocol ? n += "m=application 0 DTLS/SCTP 5000\r\n" : n += + "m=application 0 " + e.protocol + " webrtc-datachannel\r\n" : + "audio" === e.kind ? n += + "m=audio 0 UDP/TLS/RTP/SAVPF 0\r\na=rtpmap:0 PCMU/8000\r\n" : + "video" === e.kind && (n += + "m=video 0 UDP/TLS/RTP/SAVPF 120\r\na=rtpmap:120 VP8/90000\r\n" + ), void(n += "c=IN IP4 0.0.0.0\r\na=inactive\r\na=mid:" + e + .mid + "\r\n"); + var s; + if (e.stream) "audio" === e.kind ? s = e.stream.getAudioTracks()[0] : + "video" === e.kind && (s = e.stream.getVideoTracks()[0]), s && t >= + 15019 && "video" === e.kind && !e.sendEncodingParameters[0].rtx && ( + e.sendEncodingParameters[0].rtx = { + ssrc: e.sendEncodingParameters[0].ssrc + 1 + }); + var a = ae(e.localCapabilities, e.remoteCapabilities); + !a.codecs.filter((function(e) { + return "rtx" === e.name.toLowerCase() + })).length && e.sendEncodingParameters[0].rtx && delete e + .sendEncodingParameters[0].rtx, n += se(e, a, "answer", e.stream, r + ._dtlsRole), e.rtcpParameters && e.rtcpParameters.reducedSize && + (n += "a=rtcp-rsize\r\n") + } + })); + var o = new e.RTCSessionDescription({ + type: "answer", + sdp: n + }); + return Promise.resolve(o) + }, i.prototype.addIceCandidate = function(e) { + var t, r = this; + return e && void 0 === e.sdpMLineIndex && !e.sdpMid ? Promise.reject(new TypeError( + "sdpMLineIndex or sdpMid required")) : new Promise((function(n, i) { + if (!r._remoteDescription) return i(pe("InvalidStateError", + "Can not add ICE candidate without a remote description")); + if (e && "" !== e.candidate) { + var o = e.sdpMLineIndex; + if (e.sdpMid) + for (var s = 0; s < r.transceivers.length; s++) + if (r.transceivers[s].mid === e.sdpMid) { + o = s; + break + } var a = r.transceivers[o]; + if (!a) return i(pe("OperationError", "Can not add ICE candidate")); + if (a.rejected) return n(); + var c = Object.keys(e.candidate).length > 0 ? oe.parseCandidate(e + .candidate) : {}; + if ("tcp" === c.protocol && (0 === c.port || 9 === c.port)) return n(); + if (c.component && 1 !== c.component) return n(); + if ((0 === o || o > 0 && a.iceTransport !== r.transceivers[0] + .iceTransport) && !de(a.iceTransport, c)) return i(pe( + "OperationError", "Can not add ICE candidate")); + var d = e.candidate.trim(); + 0 === d.indexOf("a=") && (d = d.substr(2)), (t = oe.getMediaSections(r + ._remoteDescription.sdp))[o] += "a=" + (c.type ? d : + "end-of-candidates") + "\r\n", r._remoteDescription.sdp = oe + .getDescription(r._remoteDescription.sdp) + t.join("") + } else + for (var p = 0; p < r.transceivers.length && (r.transceivers[p] + .rejected || (r.transceivers[p].iceTransport + .addRemoteCandidate({}), (t = oe.getMediaSections(r + ._remoteDescription.sdp))[p] += + "a=end-of-candidates\r\n", r._remoteDescription.sdp = oe + .getDescription(r._remoteDescription.sdp) + t.join(""), !r + .usingBundle)); p++); + n() + })) + }, i.prototype.getStats = function(t) { + if (t && t instanceof e.MediaStreamTrack) { + var r = null; + if (this.transceivers.forEach((function(e) { + e.rtpSender && e.rtpSender.track === t ? r = e.rtpSender : e + .rtpReceiver && e.rtpReceiver.track === t && (r = e.rtpReceiver) + })), !r) throw pe("InvalidAccessError", "Invalid selector."); + return r.getStats() + } + var n = []; + return this.transceivers.forEach((function(e) { + ["rtpSender", "rtpReceiver", "iceGatherer", "iceTransport", "dtlsTransport"] + .forEach((function(t) { + e[t] && n.push(e[t].getStats()) + })) + })), Promise.all(n).then((function(e) { + var t = new Map; + return e.forEach((function(e) { + e.forEach((function(e) { + t.set(e.id, e) + })) + })), t + })) + }; + ["RTCRtpSender", "RTCRtpReceiver", "RTCIceGatherer", "RTCIceTransport", "RTCDtlsTransport"].forEach( + (function(t) { + var r = e[t]; + if (r && r.prototype && r.prototype.getStats) { + var n = r.prototype.getStats; + r.prototype.getStats = function() { + return n.apply(this).then((function(e) { + var t = new Map; + return Object.keys(e).forEach((function(r) { + var n; + e[r].type = { + inboundrtp: "inbound-rtp", + outboundrtp: "outbound-rtp", + candidatepair: "candidate-pair", + localcandidate: "local-candidate", + remotecandidate: "remote-candidate" + } [(n = e[r]).type] || n.type, t + .set(r, e[r]) + })), t + })) + } + } + })); + var o = ["createOffer", "createAnswer"]; + return o.forEach((function(e) { + var t = i.prototype[e]; + i.prototype[e] = function() { + var e = arguments; + return "function" == typeof e[0] || "function" == typeof e[1] ? t.apply( + this, [arguments[2]]).then((function(t) { + "function" == typeof e[0] && e[0].apply(null, [t]) + }), (function(t) { + "function" == typeof e[1] && e[1].apply(null, [t]) + })) : t.apply(this, arguments) + } + })), (o = ["setLocalDescription", "setRemoteDescription", "addIceCandidate"]).forEach((function( + e) { + var t = i.prototype[e]; + i.prototype[e] = function() { + var e = arguments; + return "function" == typeof e[1] || "function" == typeof e[2] ? t.apply( + this, arguments).then((function() { + "function" == typeof e[1] && e[1].apply(null) + }), (function(t) { + "function" == typeof e[2] && e[2].apply(null, [t]) + })) : t.apply(this, arguments) + } + })), ["getStats"].forEach((function(e) { + var t = i.prototype[e]; + i.prototype[e] = function() { + var e = arguments; + return "function" == typeof e[1] ? t.apply(this, arguments).then(( + function() { + "function" == typeof e[1] && e[1].apply(null) + })) : t.apply(this, arguments) + } + })), i + }; + + function ue(e) { + const t = e && e.navigator, + r = t.mediaDevices.getUserMedia.bind(t.mediaDevices); + t.mediaDevices.getUserMedia = function(e) { + return r(e).catch((e => Promise.reject(function(e) { + return { + name: { + PermissionDeniedError: "NotAllowedError" + } [e.name] || e.name, + message: e.message, + constraint: e.constraint, + toString() { + return this.name + } + } + }(e)))) + } + } + + function fe(e) { + "getDisplayMedia" in e.navigator && e.navigator.mediaDevices && (e.navigator.mediaDevices && + "getDisplayMedia" in e.navigator.mediaDevices || (e.navigator.mediaDevices.getDisplayMedia = e + .navigator.getDisplayMedia.bind(e.navigator))) + } + + function he(e) { + const t = V(e); + if (e.RTCIceGatherer && (e.RTCIceCandidate || (e.RTCIceCandidate = function(e) { + return e + }), e.RTCSessionDescription || (e.RTCSessionDescription = function(e) { + return e + }), t.version < 15025)) { + const t = Object.getOwnPropertyDescriptor(e.MediaStreamTrack.prototype, "enabled"); + Object.defineProperty(e.MediaStreamTrack.prototype, "enabled", { + set(e) { + t.set.call(this, e); + const r = new Event("enabled"); + r.enabled = e, this.dispatchEvent(r) + } + }) + } + e.RTCRtpSender && !("dtmf" in e.RTCRtpSender.prototype) && Object.defineProperty(e.RTCRtpSender + .prototype, "dtmf", { + get() { + return void 0 === this._dtmf && ("audio" === this.track.kind ? this._dtmf = new e + .RTCDtmfSender(this) : "video" === this.track.kind && (this._dtmf = null)), + this._dtmf + } + }), e.RTCDtmfSender && !e.RTCDTMFSender && (e.RTCDTMFSender = e.RTCDtmfSender); + const r = le(e, t.version); + e.RTCPeerConnection = function(e) { + return e && e.iceServers && (e.iceServers = function(e, t) { + let r = !1; + return (e = JSON.parse(JSON.stringify(e))).filter((e => { + if (e && (e.urls || e.url)) { + let t = e.urls || e.url; + e.url && !e.urls && U("RTCIceServer.url", "RTCIceServer.urls"); + const n = "string" == typeof t; + return n && (t = [t]), t = t.filter((e => { + if (0 === e.indexOf("stun:")) return !1; + const t = e.startsWith("turn") && !e.startsWith( + "turn:[") && e.includes("transport=udp"); + return t && !r ? (r = !0, !0) : t && !r + })), delete e.url, e.urls = n ? t[0] : t, !!t.length + } + })) + }(e.iceServers, t.version), F("ICE servers after filtering:", e.iceServers)), new r(e) + }, e.RTCPeerConnection.prototype = r.prototype + } + + function me(e) { + e.RTCRtpSender && !("replaceTrack" in e.RTCRtpSender.prototype) && (e.RTCRtpSender.prototype + .replaceTrack = e.RTCRtpSender.prototype.setTrack) + } + var ve = Object.freeze({ + __proto__: null, + shimPeerConnection: he, + shimReplaceTrack: me, + shimGetUserMedia: ue, + shimGetDisplayMedia: fe + }); + + function ge(e) { + const t = V(e), + r = e && e.navigator, + n = e && e.MediaStreamTrack; + if (r.getUserMedia = function(e, t, n) { + U("navigator.getUserMedia", "navigator.mediaDevices.getUserMedia"), r.mediaDevices.getUserMedia( + e).then(t, n) + }, !(t.version > 55 && "autoGainControl" in r.mediaDevices.getSupportedConstraints())) { + const e = function(e, t, r) { + t in e && !(r in e) && (e[r] = e[t], delete e[t]) + }, + t = r.mediaDevices.getUserMedia.bind(r.mediaDevices); + if (r.mediaDevices.getUserMedia = function(r) { + return "object" == typeof r && "object" == typeof r.audio && (r = JSON.parse(JSON.stringify( + r)), e(r.audio, "autoGainControl", "mozAutoGainControl"), e(r.audio, + "noiseSuppression", "mozNoiseSuppression")), t(r) + }, n && n.prototype.getSettings) { + const t = n.prototype.getSettings; + n.prototype.getSettings = function() { + const r = t.apply(this, arguments); + return e(r, "mozAutoGainControl", "autoGainControl"), e(r, "mozNoiseSuppression", + "noiseSuppression"), r + } + } + if (n && n.prototype.applyConstraints) { + const t = n.prototype.applyConstraints; + n.prototype.applyConstraints = function(r) { + return "audio" === this.kind && "object" == typeof r && (r = JSON.parse(JSON.stringify( + r)), e(r, "autoGainControl", "mozAutoGainControl"), e(r, "noiseSuppression", + "mozNoiseSuppression")), t.apply(this, [r]) + } + } + } + } + + function ye(e) { + "object" == typeof e && e.RTCTrackEvent && "receiver" in e.RTCTrackEvent.prototype && !("transceiver" in + e.RTCTrackEvent.prototype) && Object.defineProperty(e.RTCTrackEvent.prototype, "transceiver", { + get() { + return { + receiver: this.receiver + } + } + }) + } + + function we(e) { + const t = V(e); + if ("object" != typeof e || !e.RTCPeerConnection && !e.mozRTCPeerConnection) return; + if (!e.RTCPeerConnection && e.mozRTCPeerConnection && (e.RTCPeerConnection = e.mozRTCPeerConnection), t + .version < 53 && ["setLocalDescription", "setRemoteDescription", "addIceCandidate"].forEach(( + function(t) { + const r = e.RTCPeerConnection.prototype[t], + n = { + [t]() { + return arguments[0] = new("addIceCandidate" === t ? e.RTCIceCandidate : e + .RTCSessionDescription)(arguments[0]), r.apply(this, arguments) + } + }; + e.RTCPeerConnection.prototype[t] = n[t] + })), t.version < 68) { + const t = e.RTCPeerConnection.prototype.addIceCandidate; + e.RTCPeerConnection.prototype.addIceCandidate = function() { + return arguments[0] ? arguments[0] && "" === arguments[0].candidate ? Promise.resolve() : t + .apply(this, arguments) : (arguments[1] && arguments[1].apply(null), Promise.resolve()) + } + } + const r = { + inboundrtp: "inbound-rtp", + outboundrtp: "outbound-rtp", + candidatepair: "candidate-pair", + localcandidate: "local-candidate", + remotecandidate: "remote-candidate" + }, + n = e.RTCPeerConnection.prototype.getStats; + e.RTCPeerConnection.prototype.getStats = function() { + const [e, i, o] = arguments; + return n.apply(this, [e || null]).then((e => { + if (t.version < 53 && !i) try { + e.forEach((e => { + e.type = r[e.type] || e.type + })) + } catch (t) { + if ("TypeError" !== t.name) throw t; + e.forEach(((t, n) => { + e.set(n, Object.assign({}, t, { + type: r[t.type] || t.type + })) + })) + } + return e + })).then(i, o) + } + } + + function Te(e) { + if ("object" != typeof e || !e.RTCPeerConnection || !e.RTCRtpSender) return; + if (e.RTCRtpSender && "getStats" in e.RTCRtpSender.prototype) return; + const t = e.RTCPeerConnection.prototype.getSenders; + t && (e.RTCPeerConnection.prototype.getSenders = function() { + const e = t.apply(this, []); + return e.forEach((e => e._pc = this)), e + }); + const r = e.RTCPeerConnection.prototype.addTrack; + r && (e.RTCPeerConnection.prototype.addTrack = function() { + const e = r.apply(this, arguments); + return e._pc = this, e + }), e.RTCRtpSender.prototype.getStats = function() { + return this.track ? this._pc.getStats(this.track) : Promise.resolve(new Map) + } + } + + function Ce(e) { + if ("object" != typeof e || !e.RTCPeerConnection || !e.RTCRtpSender) return; + if (e.RTCRtpSender && "getStats" in e.RTCRtpReceiver.prototype) return; + const t = e.RTCPeerConnection.prototype.getReceivers; + t && (e.RTCPeerConnection.prototype.getReceivers = function() { + const e = t.apply(this, []); + return e.forEach((e => e._pc = this)), e + }), N(e, "track", (e => (e.receiver._pc = e.srcElement, e))), e.RTCRtpReceiver.prototype.getStats = + function() { + return this._pc.getStats(this.track) + } + } + + function Se(e) { + e.RTCPeerConnection && !("removeStream" in e.RTCPeerConnection.prototype) && (e.RTCPeerConnection + .prototype.removeStream = function(e) { + U("removeStream", "removeTrack"), this.getSenders().forEach((t => { + t.track && e.getTracks().includes(t.track) && this.removeTrack(t) + })) + }) + } + + function be(e) { + e.DataChannel && !e.RTCDataChannel && (e.RTCDataChannel = e.DataChannel) + } + + function Re(e) { + if ("object" != typeof e || !e.RTCPeerConnection) return; + const t = e.RTCPeerConnection.prototype.addTransceiver; + t && (e.RTCPeerConnection.prototype.addTransceiver = function() { + this.setParametersPromises = []; + const e = arguments[1], + r = e && "sendEncodings" in e; + r && e.sendEncodings.forEach((e => { + if ("rid" in e) { + if (!/^[a-z0-9]{0,16}$/i.test(e.rid)) throw new TypeError( + "Invalid RID value provided.") + } + if ("scaleResolutionDownBy" in e && !(parseFloat(e.scaleResolutionDownBy) >= + 1)) throw new RangeError("scale_resolution_down_by must be >= 1.0"); + if ("maxFramerate" in e && !(parseFloat(e.maxFramerate) >= 0)) + throw new RangeError("max_framerate must be >= 0.0") + })); + const n = t.apply(this, arguments); + if (r) { + const { + sender: t + } = n, r = t.getParameters(); + (!("encodings" in r) || 1 === r.encodings.length && 0 === Object.keys(r.encodings[0]) + .length) && (r.encodings = e.sendEncodings, t.sendEncodings = e.sendEncodings, this + .setParametersPromises.push(t.setParameters(r).then((() => { + delete t.sendEncodings + })).catch((() => { + delete t.sendEncodings + })))) + } + return n + }) + } + + function Ee(e) { + if ("object" != typeof e || !e.RTCRtpSender) return; + const t = e.RTCRtpSender.prototype.getParameters; + t && (e.RTCRtpSender.prototype.getParameters = function() { + const e = t.apply(this, arguments); + return "encodings" in e || (e.encodings = [].concat(this.sendEncodings || [{}])), e + }) + } + + function Pe(e) { + if ("object" != typeof e || !e.RTCPeerConnection) return; + const t = e.RTCPeerConnection.prototype.createOffer; + e.RTCPeerConnection.prototype.createOffer = function() { + return this.setParametersPromises && this.setParametersPromises.length ? Promise.all(this + .setParametersPromises).then((() => t.apply(this, arguments))).finally((() => { + this.setParametersPromises = [] + })) : t.apply(this, arguments) + } + } + + function ke(e) { + if ("object" != typeof e || !e.RTCPeerConnection) return; + const t = e.RTCPeerConnection.prototype.createAnswer; + e.RTCPeerConnection.prototype.createAnswer = function() { + return this.setParametersPromises && this.setParametersPromises.length ? Promise.all(this + .setParametersPromises).then((() => t.apply(this, arguments))).finally((() => { + this.setParametersPromises = [] + })) : t.apply(this, arguments) + } + } + var _e = Object.freeze({ + __proto__: null, + shimOnTrack: ye, + shimPeerConnection: we, + shimSenderGetStats: Te, + shimReceiverGetStats: Ce, + shimRemoveStream: Se, + shimRTCDataChannel: be, + shimAddTransceiver: Re, + shimGetParameters: Ee, + shimCreateOffer: Pe, + shimCreateAnswer: ke, + shimGetUserMedia: ge, + shimGetDisplayMedia: function(e, t) { + e.navigator.mediaDevices && "getDisplayMedia" in e.navigator.mediaDevices || e.navigator + .mediaDevices && (e.navigator.mediaDevices.getDisplayMedia = function(r) { + if (!r || !r.video) { + const e = new DOMException( + "getDisplayMedia without video constraints is undefined"); + return e.name = "NotFoundError", e.code = 8, Promise.reject(e) + } + return !0 === r.video ? r.video = { + mediaSource: t + } : r.video.mediaSource = t, e.navigator.mediaDevices.getUserMedia(r) + }) + } + }); + + function xe(e) { + if ("object" == typeof e && e.RTCPeerConnection) { + if ("getLocalStreams" in e.RTCPeerConnection.prototype || (e.RTCPeerConnection.prototype + .getLocalStreams = function() { + return this._localStreams || (this._localStreams = []), this._localStreams + }), !("addStream" in e.RTCPeerConnection.prototype)) { + const t = e.RTCPeerConnection.prototype.addTrack; + e.RTCPeerConnection.prototype.addStream = function(e) { + this._localStreams || (this._localStreams = []), this._localStreams.includes(e) || this + ._localStreams.push(e), e.getAudioTracks().forEach((r => t.call(this, r, e))), e + .getVideoTracks().forEach((r => t.call(this, r, e))) + }, e.RTCPeerConnection.prototype.addTrack = function(e, ...r) { + return r && r.forEach((e => { + this._localStreams ? this._localStreams.includes(e) || this + ._localStreams.push(e) : this._localStreams = [e] + })), t.apply(this, arguments) + } + } + "removeStream" in e.RTCPeerConnection.prototype || (e.RTCPeerConnection.prototype.removeStream = + function(e) { + this._localStreams || (this._localStreams = []); + const t = this._localStreams.indexOf(e); + if (-1 === t) return; + this._localStreams.splice(t, 1); + const r = e.getTracks(); + this.getSenders().forEach((e => { + r.includes(e.track) && this.removeTrack(e) + })) + }) + } + } + + function De(e) { + if ("object" == typeof e && e.RTCPeerConnection && ("getRemoteStreams" in e.RTCPeerConnection + .prototype || (e.RTCPeerConnection.prototype.getRemoteStreams = function() { + return this._remoteStreams ? this._remoteStreams : [] + }), !("onaddstream" in e.RTCPeerConnection.prototype))) { + Object.defineProperty(e.RTCPeerConnection.prototype, "onaddstream", { + get() { + return this._onaddstream + }, + set(e) { + this._onaddstream && (this.removeEventListener("addstream", this._onaddstream), + this.removeEventListener("track", this._onaddstreampoly)), this + .addEventListener("addstream", this._onaddstream = e), this + .addEventListener("track", this._onaddstreampoly = e => { + e.streams.forEach((e => { + if (this._remoteStreams || (this + ._remoteStreams = []), this._remoteStreams + .includes(e)) return; + this._remoteStreams.push(e); + const t = new Event("addstream"); + t.stream = e, this.dispatchEvent(t) + })) + }) + } + }); + const t = e.RTCPeerConnection.prototype.setRemoteDescription; + e.RTCPeerConnection.prototype.setRemoteDescription = function() { + const e = this; + return this._onaddstreampoly || this.addEventListener("track", this._onaddstreampoly = + function(t) { + t.streams.forEach((t => { + if (e._remoteStreams || (e._remoteStreams = []), e + ._remoteStreams.indexOf(t) >= 0) return; + e._remoteStreams.push(t); + const r = new Event("addstream"); + r.stream = t, e.dispatchEvent(r) + })) + }), t.apply(e, arguments) + } + } + } + + function Oe(e) { + if ("object" != typeof e || !e.RTCPeerConnection) return; + const t = e.RTCPeerConnection.prototype, + r = t.createOffer, + n = t.createAnswer, + i = t.setLocalDescription, + o = t.setRemoteDescription, + s = t.addIceCandidate; + t.createOffer = function(e, t) { + const n = arguments.length >= 2 ? arguments[2] : arguments[0], + i = r.apply(this, [n]); + return t ? (i.then(e, t), Promise.resolve()) : i + }, t.createAnswer = function(e, t) { + const r = arguments.length >= 2 ? arguments[2] : arguments[0], + i = n.apply(this, [r]); + return t ? (i.then(e, t), Promise.resolve()) : i + }; + let a = function(e, t, r) { + const n = i.apply(this, [e]); + return r ? (n.then(t, r), Promise.resolve()) : n + }; + t.setLocalDescription = a, a = function(e, t, r) { + const n = o.apply(this, [e]); + return r ? (n.then(t, r), Promise.resolve()) : n + }, t.setRemoteDescription = a, a = function(e, t, r) { + const n = s.apply(this, [e]); + return r ? (n.then(t, r), Promise.resolve()) : n + }, t.addIceCandidate = a + } + + function Ie(e) { + const t = e && e.navigator; + if (t.mediaDevices && t.mediaDevices.getUserMedia) { + const e = t.mediaDevices, + r = e.getUserMedia.bind(e); + t.mediaDevices.getUserMedia = e => r(Me(e)) + }!t.getUserMedia && t.mediaDevices && t.mediaDevices.getUserMedia && (t.getUserMedia = function(e, r, + n) { + t.mediaDevices.getUserMedia(e).then(r, n) + }.bind(t)) + } + + function Me(e) { + return e && void 0 !== e.video ? Object.assign({}, e, { + video: J(e.video) + }) : e + } + + function Le(e) { + if (!e.RTCPeerConnection) return; + const t = e.RTCPeerConnection; + e.RTCPeerConnection = function(e, r) { + if (e && e.iceServers) { + const t = []; + for (let r = 0; r < e.iceServers.length; r++) { + let n = e.iceServers[r]; + !n.hasOwnProperty("urls") && n.hasOwnProperty("url") ? (U("RTCIceServer.url", + "RTCIceServer.urls"), n = JSON.parse(JSON.stringify(n)), n.urls = n.url, + delete n.url, t.push(n)) : t.push(e.iceServers[r]) + } + e.iceServers = t + } + return new t(e, r) + }, e.RTCPeerConnection.prototype = t.prototype, "generateCertificate" in t && Object.defineProperty( + e.RTCPeerConnection, "generateCertificate", { + get: () => t.generateCertificate + }) + } + + function Ae(e) { + "object" == typeof e && e.RTCTrackEvent && "receiver" in e.RTCTrackEvent.prototype && !("transceiver" in + e.RTCTrackEvent.prototype) && Object.defineProperty(e.RTCTrackEvent.prototype, "transceiver", { + get() { + return { + receiver: this.receiver + } + } + }) + } + + function je(e) { + const t = e.RTCPeerConnection.prototype.createOffer; + e.RTCPeerConnection.prototype.createOffer = function(e) { + if (e) { + void 0 !== e.offerToReceiveAudio && (e.offerToReceiveAudio = !!e.offerToReceiveAudio); + const t = this.getTransceivers().find((e => "audio" === e.receiver.track.kind)); + !1 === e.offerToReceiveAudio && t ? "sendrecv" === t.direction ? t.setDirection ? t + .setDirection("sendonly") : t.direction = "sendonly" : "recvonly" === t.direction && (t + .setDirection ? t.setDirection("inactive") : t.direction = "inactive") : !0 !== e + .offerToReceiveAudio || t || this.addTransceiver("audio"), void 0 !== e + .offerToReceiveVideo && (e.offerToReceiveVideo = !!e.offerToReceiveVideo); + const r = this.getTransceivers().find((e => "video" === e.receiver.track.kind)); + !1 === e.offerToReceiveVideo && r ? "sendrecv" === r.direction ? r.setDirection ? r + .setDirection("sendonly") : r.direction = "sendonly" : "recvonly" === r.direction && (r + .setDirection ? r.setDirection("inactive") : r.direction = "inactive") : !0 !== e + .offerToReceiveVideo || r || this.addTransceiver("video") + } + return t.apply(this, arguments) + } + } + + function Ne(e) { + "object" != typeof e || e.AudioContext || (e.AudioContext = e.webkitAudioContext) + } + var ze = Object.freeze({ + __proto__: null, + shimLocalStreamsAPI: xe, + shimRemoteStreamsAPI: De, + shimCallbacksAPI: Oe, + shimGetUserMedia: Ie, + shimConstraints: Me, + shimRTCIceServerUrls: Le, + shimTrackEventTransceiver: Ae, + shimCreateOfferLegacy: je, + shimAudioContext: Ne + }); + + function Ge(e) { + if (!e.RTCIceCandidate || e.RTCIceCandidate && "foundation" in e.RTCIceCandidate.prototype) return; + const t = e.RTCIceCandidate; + e.RTCIceCandidate = function(e) { + if ("object" == typeof e && e.candidate && 0 === e.candidate.indexOf("a=") && ((e = JSON.parse( + JSON.stringify(e))).candidate = e.candidate.substr(2)), e.candidate && e.candidate + .length) { + const r = new t(e), + n = oe.parseCandidate(e.candidate), + i = Object.assign(r, n); + return i.toJSON = function() { + return { + candidate: i.candidate, + sdpMid: i.sdpMid, + sdpMLineIndex: i.sdpMLineIndex, + usernameFragment: i.usernameFragment + } + }, i + } + return new t(e) + }, e.RTCIceCandidate.prototype = t.prototype, N(e, "icecandidate", (t => (t.candidate && Object + .defineProperty(t, "candidate", { + value: new e.RTCIceCandidate(t.candidate), + writable: "false" + }), t))) + } + + function Fe(e) { + if (!e.RTCPeerConnection) return; + const t = V(e); + "sctp" in e.RTCPeerConnection.prototype || Object.defineProperty(e.RTCPeerConnection.prototype, + "sctp", { + get() { + return void 0 === this._sctp ? null : this._sctp + } + }); + const r = function(e) { + if (!e || !e.sdp) return !1; + const t = oe.splitSections(e.sdp); + return t.shift(), t.some((e => { + const t = oe.parseMLine(e); + return t && "application" === t.kind && -1 !== t.protocol.indexOf("SCTP") + })) + }, + n = function(e) { + const t = e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/); + if (null === t || t.length < 2) return -1; + const r = parseInt(t[1], 10); + return r != r ? -1 : r + }, + i = function(e) { + let r = 65536; + return "firefox" === t.browser && (r = t.version < 57 ? -1 === e ? 16384 : 2147483637 : t + .version < 60 ? 57 === t.version ? 65535 : 65536 : 2147483637), r + }, + o = function(e, r) { + let n = 65536; + "firefox" === t.browser && 57 === t.version && (n = 65535); + const i = oe.matchPrefix(e.sdp, "a=max-message-size:"); + return i.length > 0 ? n = parseInt(i[0].substr(19), 10) : "firefox" === t.browser && -1 !== r && + (n = 2147483637), n + }, + s = e.RTCPeerConnection.prototype.setRemoteDescription; + e.RTCPeerConnection.prototype.setRemoteDescription = function() { + if (this._sctp = null, "chrome" === t.browser && t.version >= 76) { + const { + sdpSemantics: e + } = this.getConfiguration(); + "plan-b" === e && Object.defineProperty(this, "sctp", { + get() { + return void 0 === this._sctp ? null : this._sctp + }, + enumerable: !0, + configurable: !0 + }) + } + if (r(arguments[0])) { + const e = n(arguments[0]), + t = i(e), + r = o(arguments[0], e); + let s; + s = 0 === t && 0 === r ? Number.POSITIVE_INFINITY : 0 === t || 0 === r ? Math.max(t, r) : + Math.min(t, r); + const a = {}; + Object.defineProperty(a, "maxMessageSize", { + get: () => s + }), this._sctp = a + } + return s.apply(this, arguments) + } + } + + function Ue(e) { + if (!e.RTCPeerConnection || !("createDataChannel" in e.RTCPeerConnection.prototype)) return; + + function t(e, t) { + const r = e.send; + e.send = function() { + const n = arguments[0], + i = n.length || n.size || n.byteLength; + if ("open" === e.readyState && t.sctp && i > t.sctp.maxMessageSize) throw new TypeError( + "Message too large (can send a maximum of " + t.sctp.maxMessageSize + " bytes)"); + return r.apply(e, arguments) + } + } + const r = e.RTCPeerConnection.prototype.createDataChannel; + e.RTCPeerConnection.prototype.createDataChannel = function() { + const e = r.apply(this, arguments); + return t(e, this), e + }, N(e, "datachannel", (e => (t(e.channel, e.target), e))) + } + + function Ve(e) { + if (!e.RTCPeerConnection || "connectionState" in e.RTCPeerConnection.prototype) return; + const t = e.RTCPeerConnection.prototype; + Object.defineProperty(t, "connectionState", { + get() { + return { + completed: "connected", + checking: "connecting" + } [this.iceConnectionState] || this.iceConnectionState + }, + enumerable: !0, + configurable: !0 + }), Object.defineProperty(t, "onconnectionstatechange", { + get() { + return this._onconnectionstatechange || null + }, + set(e) { + this._onconnectionstatechange && (this.removeEventListener("connectionstatechange", + this._onconnectionstatechange), delete this._onconnectionstatechange), e && + this.addEventListener("connectionstatechange", this._onconnectionstatechange = + e) + }, + enumerable: !0, + configurable: !0 + }), ["setLocalDescription", "setRemoteDescription"].forEach((e => { + const r = t[e]; + t[e] = function() { + return this._connectionstatechangepoly || (this._connectionstatechangepoly = + e => { + const t = e.target; + if (t._lastConnectionState !== t.connectionState) { + t._lastConnectionState = t.connectionState; + const r = new Event("connectionstatechange", e); + t.dispatchEvent(r) + } + return e + }, this.addEventListener("iceconnectionstatechange", this + ._connectionstatechangepoly)), r.apply(this, arguments) + } + })) + } + + function Be(e) { + if (!e.RTCPeerConnection) return; + const t = V(e); + if ("chrome" === t.browser && t.version >= 71) return; + if ("safari" === t.browser && t.version >= 605) return; + const r = e.RTCPeerConnection.prototype.setRemoteDescription; + e.RTCPeerConnection.prototype.setRemoteDescription = function(e) { + return e && e.sdp && -1 !== e.sdp.indexOf("\na=extmap-allow-mixed") && (e.sdp = e.sdp.split( + "\n").filter((e => "a=extmap-allow-mixed" !== e.trim())).join("\n")), r.apply(this, + arguments) + } + } + var Je = Object.freeze({ + __proto__: null, + shimRTCIceCandidate: Ge, + shimMaxMessageSize: Fe, + shimSendThrowTypeError: Ue, + shimConnectionState: Ve, + removeAllowExtmapMixed: Be + }); + const qe = function({ + window: e + } = {}, t = { + shimChrome: !0, + shimFirefox: !0, + shimEdge: !0, + shimSafari: !0 + }) { + const r = F, + n = V(e), + i = { + browserDetails: n, + commonShim: Je, + extractVersion: j, + disableLog: z, + disableWarnings: G + }; + switch (n.browser) { + case "chrome": + if (!ie || !re || !t.shimChrome) return r( + "Chrome shim is not included in this adapter release."), i; + if (null === n.version) return r("Chrome shim can not determine version, not shimming."), i; + r("adapter.js shimming chrome."), i.browserShim = ie, Y(e), K(e), re(e), Q(e), te(e), $(e), + X(e), Z(e), ne(e), Ge(e), Ve(e), Fe(e), Ue(e), Be(e); + break; + case "firefox": + if (!_e || !we || !t.shimFirefox) return r( + "Firefox shim is not included in this adapter release."), i; + r("adapter.js shimming firefox."), i.browserShim = _e, ge(e), we(e), ye(e), Se(e), Te(e), + Ce(e), be(e), Re(e), Ee(e), Pe(e), ke(e), Ge(e), Ve(e), Fe(e), Ue(e); + break; + case "edge": + if (!ve || !he || !t.shimEdge) return r( + "MS edge shim is not included in this adapter release."), i; + r("adapter.js shimming edge."), i.browserShim = ve, ue(e), fe(e), he(e), me(e), Fe(e), Ue( + e); + break; + case "safari": + if (!ze || !t.shimSafari) return r("Safari shim is not included in this adapter release."), + i; + r("adapter.js shimming safari."), i.browserShim = ze, Le(e), je(e), Oe(e), xe(e), De(e), Ae( + e), Ie(e), Ne(e), Ge(e), Fe(e), Ue(e), Be(e); + break; + default: + r("Unsupported browser!") + } + return i + }({ + window: "undefined" == typeof window ? void 0 : window + }); + qe.browserDetails.browser, qe.browserDetails.version, qe.browserDetails.supportsUnifiedPlan; + var We = function() { + function e() { + this.statsIntervalTime = 1e3, this.statsReportSleepTime = 2e3 + } + return e.prototype.initPc = function() { + this.release(); + var e = new RTCPeerConnection; + e.onnegotiationneeded = function() { + h.log("pc.onnegotiationneeded") + }, e.onicecandidate = function(e) { + h.log("pc.onicecandidate: " + g(e.candidate)) + }, e.oniceconnectionstatechange = function() { + h.log("pc.oniceconnectionstatechange: " + e.iceConnectionState) + }, e.onicegatheringstatechange = function() { + h.log("pc.onicegatheringstatechange : " + e.iceGatheringState) + }, e.onsignalingstatechange = function() { + h.log("pc.onsignalingstatechange: " + e.signalingState) + }, this.pc = e + }, e.prototype.pullStream = function(e) { + var t = this; + return this.initPc(), new Promise((function(r, s) { + return i(t, void 0, void 0, (function() { + var t, i, a, c, d, p, f, m = this; + return o(this, (function(o) { + switch (o.label) { + case 0: + return o.trys.push([0, 5, , 6]), t = + new MediaStream, this.pc + .onconnectionstatechange = + function() { + switch (h.log( + "pc.onconnectionstatechange: " + + m.pc.connectionState + ), m.pc + .connectionState) { + case "connected": + m.initStats(), r(t); + break; + case "disconnected": + e = { + code: 20006, + errorType: "connectFailed", + msg: "pc connection disconnected" + }, P.emit( + "error", e); + case "failed": + case "closed": + s(new T("peerconnection connect error: " + + m.pc + .connectionState + )) + } + var e + }, this.pc.ontrack = function( + e) { + h.log("peerConnection.ontrack, kind: " + + e.track.kind + + " + ', id: " + e + .track.id), + "audio" === e.track + .kind && (m.audioTrack = + e.track), + "video" === e.track + .kind && (m.videoTrack = + e.track), t + .addTrack(e.track) + }, i = g(n(n({}, l), { + SDK_VERSION: R + })), [4, this.createOffer()]; + case 1: + return a = o.sent(), h.log( + "local offer: \n" + a.sdp), + a = this.mungSDP(a), [4, this + .setLocal(a) + ]; + case 2: + if (o.sent(), !(c = + /[a-zA-Z0-9]{3,7}:\/\/([^/]+)\// + .exec(e))) throw new T( + "streamurl is not valid: " + + e); + return [4, u(location.protocol + + "//" + c[1] + + "/rtc/v1/play", { + streamurl: e, + clientip: i, + sdp: a.sdp + })]; + case 3: + return d = o.sent(), h.log( + "remote answer, \n" + d.sdp + ), this.sessionId = d + .sessionid, p = + new RTCSessionDescription({ + type: "answer", + sdp: d.sdp + }), [4, this.setRemote(p)]; + case 4: + return o.sent(), [3, 6]; + case 5: + return f = o.sent(), s( + f instanceof Error ? new T(f + .message) : new T( + String(f))), [3, 6]; + case 6: + return [2] + } + })) + })) + })) + }, e.prototype.getSessionId = function() { + return this.sessionId + }, e.prototype.initStats = function() { + var e = this; + this.statsIntervalId && clearInterval(this.statsIntervalId), this.statsIntervalId = + setInterval((function() { + var t, r; + e.pc.getStats().then((function(e) { + t = e + })).then((function() { + return new Promise((function(t) { + setTimeout(t, e.statsReportSleepTime) + })) + })).then((function() { + return e.pc.getStats() + })).then((function(n) { + r = n; + var i, o = e.processStats(t, r); + i = o, P.emit("stats", i), h.log("stats: " + g(o)) + })).catch((function(e) { + h.debug("getStats error: " + e.toString()) + })) + }), this.statsIntervalTime) + }, e.prototype.release = function() { + this.pc && this.pc.close(), this.statsIntervalId && clearInterval(this.statsIntervalId) + }, e.prototype.processStats = function(e, t) { + var r = this, + n = S; + return t.forEach((function(t) { + if ("inbound-rtp" === t.type && !0 !== t.isRemote) { + if ("audio" === t.mediaType || t.id.toLocaleLowerCase().includes( + "audio")) { + if (!(i = e.get(t.id))) return; + n.audioBitrate = y(8 * (t.bytesReceived - i.bytesReceived) / 1e3 / ( + r.statsReportSleepTime / 1e3), 2) + } + if ("video" === t.mediaType || t.id.toLocaleLowerCase().includes( + "video")) { + var i; + if (!(i = e.get(t.id))) return; + if (n.videoBitrate = y(8 * (t.bytesReceived - i.bytesReceived) / + 1e3 / (r.statsReportSleepTime / 1e3), 2), t.frameWidth) n + .frameWidth = t.frameWidth, n.frameHeight = t.frameHeight; + else if (r.videoTrack) { + var o = r.videoTrack.getSettings(); + n.frameWidth = o.width || 0, n.frameHeight = o.height || 0 + } + if (t.framesPerSecond) n.frameRate = t.framesPerSecond; + else if (t.framesDecoded && i.framesDecoded) { + var s = t.framesDecoded - i.framesDecoded, + a = Math.floor(s / (r.statsReportSleepTime / 1e3)); + n.frameRate = a + } + } + } + })), n + }, e.prototype.createOffer = function(e, t) { + return void 0 === e && (e = !0), void 0 === t && (t = !0), i(this, void 0, void 0, ( + function() { + return o(this, (function(r) { + switch (r.label) { + case 0: + return [4, this.pc.createOffer({ + offerToReceiveAudio: e, + offerToReceiveVideo: t + })]; + case 1: + return [2, r.sent()] + } + })) + })) + }, e.prototype.mungSDP = function(e) { + return e + }, e.prototype.setLocal = function(e) { + return i(this, void 0, void 0, (function() { + var t, r; + return o(this, (function(n) { + switch (n.label) { + case 0: + return n.trys.push([0, 2, , 3]), [4, this.pc + .setLocalDescription(e) + ]; + case 1: + return n.sent(), [3, 3]; + case 2: + throw t = n.sent(), r = "set local sdp error: \n" + + e.sdp + "\n" + g(t), I(r), new T(r); + case 3: + return [2] + } + })) + })) + }, e.prototype.setRemote = function(e) { + return i(this, void 0, void 0, (function() { + var t, r, n; + return o(this, (function(i) { + switch (i.label) { + case 0: + t = new RTCSessionDescription(e), i.label = 1; + case 1: + return i.trys.push([1, 3, , 4]), [4, this.pc + .setRemoteDescription(t) + ]; + case 2: + return i.sent(), [3, 4]; + case 3: + throw r = i.sent(), n = "set remote sdp error: \n" + + t.sdp + "\n" + g(r), I(n), new T(n); + case 4: + return [2] + } + })) + })) + }, e + }(), + He = function(e) { + function t() { + var t = e.call(this) || this; + return t.qnPC = new We, P.on("log", (function(e) { + t.emit("log", e) + })), P.on("stats", (function(e) { + t.emit("stats", e) + })), P.on("error", (function(e) { + t.setState(w.STATE_ERROR), t.stop(), t.emit("error", e) + })), P.on("playerStateChanged", (function(e) { + h.log("playerStateChanged: " + e), t.emit("playerStateChanged", e) + })), t.setState(w.STATE_IDLE), a().then((function(e) { + t.playerSupport = e, e.peerConnection || M("RTC not supported!"), e.H264 || M( + "H264 not supported!") + })), t + } + return r(t, e), t.prototype.setState = function(e) { + this.playerState !== e && (this.playerState = e, function(e) { + P.emit("playerStateChanged", e) + }(e)) + }, t.prototype.init = function(e) { + this.setState(w.STATE_INIT), this.config = n(n({}, C), e) + }, t.prototype.getConfig = function() { + if (!this.config) throw new T("config is not initilized, try init() first."); + return this.config + }, t.prototype.setConfig = function(e) { + if (!this.config) throw new T("config is not initilized, try init() first."); + if (!this.mediaElement) throw new T("media is not initialized, try play() first."); + void 0 !== e.className && (this.config.className = e.className, this.mediaElement + .className = this.config.className), void 0 !== e.controls && (this.config + .controls = e.controls, this.mediaElement.controls = this.config.controls), + void 0 !== e.width && (this.config.width = e.width, this.mediaElement.style.width = this + .config.width), void 0 !== e.height && (this.config.height = e.height, this + .mediaElement.style.height = this.config.height), void 0 !== e.objectFit && (this + .config.objectFit = e.objectFit, this.mediaElement.style.objectFit = this.config + .objectFit), void 0 !== e.playsinline && (this.config.playsinline = e.playsinline, + this.mediaElement.playsInline = this.config.playsinline, this.mediaElement + .setAttribute("webkit-playsinline", String(e.playsinline))), void 0 !== e.volumn && + (this.config.volumn = e.volumn, this.mediaElement.volume = this.config.volumn) + }, t.prototype.play = function(e, t) { + return i(this, void 0, void 0, (function() { + var r, n = this; + return o(this, (function(s) { + switch (s.label) { + case 0: + if (!this.config) throw new T( + "config is not initilized, try init() first." + ); + return this.url === e && this.container === t ? [ + 2] : (this.mediaElement || (this.mediaElement = + document.createElement("video"), this + .mediaElement.setAttribute( + "x5-video-player-type", "h5"), this + .setConfig(this.config)), this + .mediaStream && this.url && this.url === e ? + [3, 2] : (this.url = e, r = this, [4, this + .qnPC.pullStream(this.url) + ])); + case 1: + r.mediaStream = s.sent(), this.setState(w + .STATE_READY), this.mediaElement.srcObject = + this.mediaStream, s.label = 2; + case 2: + return this.mediaElement && this.container && this + .mediaElement.parentElement && this.mediaElement + .parentElement !== this.container && this + .mediaElement.parentElement.removeChild(this + .mediaElement), this.container && this + .container === t || (this.container = t, this + .container.appendChild(this.mediaElement)), + [2, new Promise((function(e, t) { + var r, s, a = setTimeout(( + function() { + n.playerState != + w + .STATE_IDLE && + n.resume() + .then(e) + .catch(t) + }), b); + n.mediaElement.addEventListener( + "loadedmetadata", ( + function() { + clearTimeout(a), + n + .playerState != + w + .STATE_IDLE && + n.resume() + .then(e) + .catch(t) + })), r = + function() { + return i(n, void 0, + void 0, ( + function() { + return o( + this, + (function( + e + ) { + return this + .playerState != + w + .STATE_IDLE ? + [2, this + .resume() + ] : + [ + 2] + }) + ) + })) + }, void 0 === s && (s = + 5e3), new Promise((function( + e, t) { + if ("WeixinJSBridge" in + window) + window + .WeixinJSBridge + .invoke( + "getNetworkType", {}, + (function() { + r().then( + e + ) + .catch( + t + ) + }), !1); + else { + var n = + setTimeout( + (function() { + r().then( + e + ) + .catch( + t + ) + }), + s); + document + .addEventListener( + "WeixinJSBridgeReady", + (function() { + clearTimeout + ( + n), + r() + .then( + e + ) + .catch( + t + ) + }), + !1) + } + })) + }))] + } + })) + })) + }, t.prototype.pause = function() { + if (!this.config) throw new T("config is not initilized, try init() first."); + if (!this.mediaElement) throw new T("media is not initialized, try play() first."); + this.mediaElement.pause() + }, t.prototype.resume = function() { + var e = this; + return new Promise((function(t, r) { + if (!e.config) throw new T("config is not initilized, try init() first."); + if (!e.mediaElement) throw new T( + "media is not initialized, try play() first."); + e.isPlaying() && t(); + try { + var n = e.mediaElement.play(); + n ? n.then((function() { + e.playerState !== w.STATE_STOP && e.setState(w + .STATE_PLAYING), t() + })).catch((function(e) { + if ("NotAllowedError" === e.name) { + var n = "play fail, " + e.name + ", " + e.message; + r(new T(n)) + } else t() + })) : (e.playerState !== w.STATE_STOP && e.setState(w + .STATE_PLAYING), t()) + } catch (e) { + var i = e instanceof Error ? "play error, " + e.name + ", " + e + .message : String(e); + r(new T(i)) + } + })) + }, t.prototype.hasAudio = function() { + if (!this.config) throw new T("config is not initilized, try init() first."); + if (!this.mediaElement) throw new T("media is not initialized, try play() first."); + return !!this.mediaStream && this.mediaStream.getAudioTracks().length > 0 + }, t.prototype.hasVideo = function() { + if (!this.config) throw new T("config is not initilized, try init() first."); + if (!this.mediaElement) throw new T("media is not initialized, try play() first."); + return !!this.mediaStream && this.mediaStream.getVideoTracks().length > 0 + }, t.prototype.setAudioVolume = function(e) { + if (!this.config) throw new T("config is not initilized, try init() first."); + if (!this.mediaElement) throw new T("media is not initialized, try play() first."); + this.mediaElement.volume = e + }, t.prototype.getAudioVolume = function() { + if (!this.config) throw new T("config is not initilized, try init() first."); + if (!this.mediaElement) throw new T("media is not initialized, try play() first."); + return this.mediaElement.volume + }, t.prototype.muteAudio = function() { + if (!this.config) throw new T("config is not initilized, try init() first."); + if (!this.mediaElement) throw new T("media is not initialized, try play() first."); + this.mediaElement.muted = !0 + }, t.prototype.unmuteAudio = function() { + if (!this.config) throw new T("config is not initilized, try init() first."); + if (!this.mediaElement) throw new T("media is not initialized, try play() first."); + this.mediaElement.muted = !1 + }, t.prototype.muteVideo = function() { + var e; + if (!this.config) throw new T("config is not initilized, try init() first."); + if (!this.mediaElement) throw new T("media is not initialized, try play() first."); + var t = null === (e = this.mediaStream) || void 0 === e ? void 0 : e.getAudioTracks(); + t && t.length > 0 ? this.mediaElement.srcObject = new MediaStream(t) : this.mediaElement + .srcObject = null, this.resume() + }, t.prototype.unmuteVideo = function() { + if (!this.config) throw new T("config is not initilized, try init() first."); + if (!this.mediaElement) throw new T("media is not initialized, try play() first."); + if (!this.mediaStream) throw new T("mediaStream is empty"); + this.mediaElement.srcObject = this.mediaStream, this.resume() + }, t.prototype.isPlaying = function() { + return !!this.mediaElement && !this.mediaElement.paused + }, t.prototype.stop = function() { + if (!this.config) throw new T("config is not initilized, try init() first."); + if (!this.mediaElement) throw new T("media is not initialized, try play() first."); + this.qnPC.release(), this.url = void 0, this.setState(w.STATE_STOP) + }, t.prototype.release = function() { + if (!this.config) throw new T("config is not initilized, try init() first."); + this.setState(w.STATE_IDLE), this.config = void 0, this.mediaElement && this.mediaElement + .parentElement && this.mediaElement.parentElement.removeChild(this.mediaElement), this + .qnPC.release(), this.url = void 0, this.mediaElement = void 0, this.container = void 0, + this.mediaStream = void 0 + }, t.prototype.getPlayerSupport = function() { + return this.playerSupport + }, t.prototype.getBrowserReport = function() { + return l + }, Object.defineProperty(t.prototype, "version", { + get: function() { + return R + }, + enumerable: !1, + configurable: !0 + }), t.setLogLevel = function(e) { + h.setLevel(e) + }, t + }(E); + e.QNRTPlayer = He, Object.defineProperty(e, "__esModule", { + value: !0 + }) +})); diff --git a/pages/app.html b/pages/app.html new file mode 100644 index 0000000..7a85bc1 --- /dev/null +++ b/pages/app.html @@ -0,0 +1,809 @@ + + + + + + + 欢迎{{openId}} + + + + + + + + + + +
+
+
+
降维AI|创作平台
+
+
+
+ 联系管理员
+
+
+
+
+
+
+ +
+
+
+ +
+
+
+
+ +
+
+

生成预览区

+
+ + +
+
+
+
+
+
+
历史记录
+
+
+ +
+
+
+
+
+
+
+
+
+
+ +
+ + + +
+
+ +
+
+
+
立即生成 +
+
+
+
+ +
+
+
+ + + + + \ No newline at end of file diff --git a/py/LamLoadPathImage.py b/py/LamLoadPathImage.py new file mode 100644 index 0000000..f6967a2 --- /dev/null +++ b/py/LamLoadPathImage.py @@ -0,0 +1,89 @@ +from PIL import Image, ImageFilter, ImageEnhance, ImageOps, ImageDraw, ImageChops, ImageFont +import folder_paths +import os +import numpy as np +import torch +import random +import requests +import io + +class LamLoadPathImage: + + def __init__(self): + self.input_dir = folder_paths.input_directory + + @classmethod + def INPUT_TYPES(cls): + return { + "required": { + "image_path": ("STRING", {"default": './ComfyUI/input/example.png', "multiline": False}), + "RGBA": (["false","true"],), + }, + "optional": { + "filename_text_extension": (["true", "false"],), + } + } + + RETURN_TYPES = ("IMAGE", "MASK", "STRING") + RETURN_NAMES = ("image", "mask", "filename_text") + FUNCTION = "load_image" + + CATEGORY = "lam" + + def load_image(self, image_path, RGBA='false', filename_text_extension="true"): + + RGBA = (RGBA == 'true') + + if image_path.startswith('http'): + from io import BytesIO + i = self.download_image(image_path) + else: + try: + i = Image.open(image_path) + except OSError: + print(f"The image `{image_path.strip()}` specified doesn't exist!") + i = Image.new(mode='RGB', size=(512, 512), color=(0, 0, 0)) + if not i: + return + + image = i + if not RGBA: + image = image.convert('RGB') + image = np.array(image).astype(np.float32) / 255.0 + image = torch.from_numpy(image)[None,] + + if 'A' in i.getbands(): + mask = np.array(i.getchannel('A')).astype(np.float32) / 255.0 + mask = 1. - torch.from_numpy(mask) + else: + mask = torch.zeros((64, 64), dtype=torch.float32, device="cpu") + + if filename_text_extension == "true": + filename = os.path.basename(image_path) + else: + filename = os.path.splitext(os.path.basename(image_path))[0] + + return (image, mask, filename) + + def download_image(self, url): + try: + response = requests.get(url) + response.raise_for_status() + img = Image.open(io.BytesIO(response.content)) + return img + except requests.exceptions.HTTPError as errh: + print(f"HTTP Error: ({url}): {errh}") + except requests.exceptions.ConnectionError as errc: + print(f"Connection Error: ({url}): {errc}") + except requests.exceptions.Timeout as errt: + print(f"Timeout Error: ({url}): {errt}") + except requests.exceptions.RequestException as err: + print(f"Request Exception: ({url}): {err}") + +NODE_CLASS_MAPPINGS = { + "LamLoadPathImage": LamLoadPathImage +} + +NODE_DISPLAY_NAME_MAPPINGS = { + "LamLoadPathImage": "加载网络图片或本地图片" +} \ No newline at end of file diff --git a/py/WeChatAuth.py b/py/WeChatAuth.py new file mode 100644 index 0000000..d758827 --- /dev/null +++ b/py/WeChatAuth.py @@ -0,0 +1,427 @@ +from server import PromptServer +from aiohttp import web +import os +import json +from .src.wechat.WechatAuthUtils import * +from .src.wechat.DataBaseUtil import DataBaseUtil +import xml.etree.ElementTree as ET +import time +import logging +import queue +import random +import types +import execution +import uuid +import folder_paths +def send_sync(self, event, data, sid=None): #继承父类的send_sync方法 + if sid and hasattr(self, "user_command") and sid in getattr(self,'user_command'): + if event == "executing" and data['node'] is None and data['prompt_id'] == self.user_command[sid]['prompt_id']: + history=self.prompt_queue.get_history(prompt_id=data['prompt_id'])[data['prompt_id']] + #print("历史记录======:",history) + if Config().wechat['isEnterprise'] and ('isWeb' not in self.user_command[sid] or self.user_command[sid]['isWeb']==False): + imagePaths=[] + videoPaths=[] + for node_id in history['outputs']: + node_output = history['outputs'][node_id] + if 'images' in node_output: + for image in node_output['images']: + basePath='' + if 'output' == image['type']: + basePath=folder_paths.get_output_directory() + elif 'temp' == image['type']: + basePath=folder_paths.get_temp_directory() + elif 'input' == image['type']: + basePath=folder_paths.get_input_directory() + + if image['subfolder']: + basePath=os.path.join(basePath,image['subfolder']) + + imagePaths.append(os.path.join(basePath,image['filename'])) + if 'gifs' in node_output: + for image in node_output['gifs']: + basePath='' + if 'output' in image['type']: + basePath=folder_paths.get_output_directory() + elif 'temp' in image['type']: + basePath=folder_paths.get_temp_directory() + elif 'input' in image['type']: + basePath=folder_paths.get_input_directory() + + if image['subfolder']: + basePath=os.path.join(basePath,image['subfolder']) + + if 'format' in image: + if image['format'].startswith('video'): + videoPaths.append(os.path.join(basePath,image['filename'])) + continue + + imagePaths.append(os.path.join(basePath,image['filename'])) + + logging.info("imagePaths: " + str(imagePaths)+" videoPaths: " + str(videoPaths)) + for imagePath in imagePaths: + mediaId=getMediaId(imagePath,'image') + sendServiceImageMessge(mediaId,sid) + for videoPath in videoPaths: + mediaId=getMediaId(videoPath,'video') + sendServiceVideoMessge(mediaId,'AI生成','AI生成视频',sid) + self.user_command[sid]['status']='wcomplete' + now = time.localtime() + end_time = time.strftime("%Y-%m-%d %H:%M:%S", now) + db=DataBaseUtil() + db.update_data('wcomplete', end_time, json.dumps(history['outputs']),data['prompt_id']) + db.close_con() + + self.loop.call_soon_threadsafe( + self.messages.put_nowait, (event, data, sid)) +def update_dict(dictionary, keys, value): + if len(keys) == 1: + dictionary[keys[0]] = value + else: + key = keys.pop(0) + if isinstance(dictionary[key], dict): + update_dict(dictionary[key], keys, value) + elif isinstance(dictionary[key], list): + for item in dictionary[key]: + update_dict(item, keys[:], value) + else: + raise ValueError("Invalid data structure") +def setPost(self,FromUserName): + params=self.user_command[FromUserName] + logging.info(str(params)) + basePath=folder_paths.folder_names_and_paths['custom_nodes'][0][0] + comand=Config().wechat['commands'][params['command']] + filePath = os.path.join(basePath,'ComfyUI_Lam','config','workflow',comand['filename']) + if os.path.exists(filePath)==False: + logging.warning("文件不存在:"+filePath) + return None + f = open(filePath,'r', encoding='utf-8') + json_data = json.load(f) + f.close() + for key in comand['params']: + keys=comand['params'][key]['keys'][:] + if key in params: + update_dict(json_data,keys,params[key]) + + json_data={"prompt":json_data,"client_id":params['openId']} + logging.info(json_data) + json_data = self.trigger_on_prompt(json_data) + if "number" in json_data: + number = float(json_data['number']) + else: + number = self.number + if "front" in json_data: + if json_data['front']: + number = -number + + self.number += 1 + + if "prompt" in json_data: + prompt = json_data["prompt"] + valid = execution.validate_prompt(prompt) + extra_data = {} + if "extra_data" in json_data: + extra_data = json_data["extra_data"] + + if "client_id" in json_data: + extra_data["client_id"] = json_data["client_id"] + if valid[0]: + prompt_id = str(uuid.uuid4()) + outputs_to_execute = valid[2] + self.prompt_queue.put((number, prompt_id, prompt, extra_data, outputs_to_execute)) + now = time.localtime() + start_time = time.strftime("%Y-%m-%d %H:%M:%S", now) + self.user_command[FromUserName]['status']='waiting' #prepare:准备 waiting:待执行 wcomplete完成 + self.user_command[FromUserName]['prompt_id']=prompt_id + db=DataBaseUtil() + db.insert_data( params['openId'], json.dumps(params), prompt_id,'waiting',start_time, '', '') + db.close_con() + return prompt_id + else: + logging.warning("invalid prompt: {}".format(valid[1])) + return None + +def getTaskRanking(self,FromUserName): + if 'prompt_id' not in self.user_command[FromUserName]: + return '您还没有排队,请先发送您的指令' + prompt_id=self.user_command[FromUserName]['prompt_id'] + current_queue = self.prompt_queue.get_current_queue() + print(current_queue) + for i in range(len(current_queue[0])): + if current_queue[0][i][1] == prompt_id: + return '您的任务正在执行。' + for i in range(len(current_queue[1])): + if current_queue[1][i][1] == prompt_id: + return '当前排队人数:'+str(len(current_queue[1]))+'人,您当前的位置在'+current_queue[1][i][0]+'号。' + return '您还没有排队,请先发送您的指令' + +@PromptServer.instance.routes.get("/wechatauth/getHistorys") +async def getHistorys(request): + if "openId" in request.rel_url.query: + openId=request.rel_url.query['openId'] + db=DataBaseUtil() + datas=db.get_many_data(openId) + db.close_con() + return web.Response(text=json.dumps(datas), content_type='application/json') + else: + return web.Response(status=404) + +@PromptServer.instance.routes.post("/wechatauth/addTask") +async def addTask(request): + post = await request.post() + print(post.keys()) + command = post.get("command") + if command == None: + msg = '指令不能为空!' + data={'msg':msg,'success':False} + return web.Response(text=json.dumps(data), content_type='application/json') + + openId = post.get("openId") + if openId == None: + msg = '用户编码不能为空!' + data={'msg':msg,'success':False} + return web.Response(text=json.dumps(data), content_type='application/json') + + if hasattr(PromptServer.instance,'user_command') and openId in PromptServer.instance.user_command and PromptServer.instance.user_command[openId]['status']=='waiting': + msg = '您已经在队列中,请勿重复提交!' + data={'msg':msg,'success':False} + return web.Response(text=json.dumps(data), content_type='application/json') + + adminNo=base64_decode(Config().wechat['adminNo']) + if adminNo!=openId: + db=DataBaseUtil() + data=db.get_user_frequency(openId) + if data[0]==None: + db.user_recharge(openId,Config().wechat['freeSize']) + data=db.get_user_frequency(openId) + countd=db.get_user_task_count(openId) + db.close_con() + if countd[0] >=data[0]: + msg='非常抱歉,您的免费使用次数已用完,如需继续使用,请扫描右上角二维码,联系管理员。' + data={'msg':msg,'success':False} + return web.Response(text=json.dumps(data), content_type='application/json') + + params=Config().wechat['commands'][command]['params'] + paramName='' + userData={'openId':openId,'command':command,'status':'prepare','isWeb':True} + for param in params: + val=post.get(param) + if params[param]['isRequired'] and val==None: + paramName= params[param]['zhName'] + break + if val: + userData[param]=val + + if paramName: + msg = '参数"'+paramName+'"不能为空!' + data={'msg':msg,'success':False} + return web.Response(text=json.dumps(data), content_type='application/json') + + if 'seed' in userData: + if userData['seed'].isdigit()==False or int(userData['seed'])==-1: + userData['seed']=''.join(random.sample('123456789012345678901234567890',14)) + + if hasattr(PromptServer.instance,"user_command")==False: + setattr(PromptServer.instance,"user_command",{}) + + PromptServer.instance.user_command[openId]=userData + resp=setPost(PromptServer.instance,openId) + if resp!=None: + data={'msg':'任务已加入队列请等待...','prompt_id':resp,'success':True} + return web.Response(text=json.dumps(data), content_type='application/json') + +@PromptServer.instance.routes.get("/wechatauth/getCommands") +async def getCommands(request): + commands=Config().wechat['commands'] + return web.Response(text=json.dumps(commands), content_type='application/json') + +@PromptServer.instance.routes.get("/wechatauth/app") +async def app(request): + if "openId" in request.rel_url.query: + openId=request.rel_url.query['openId'] + openId=base64_decode(openId) + basePath = folder_paths.folder_names_and_paths['custom_nodes'][0][0] + htmlPtah = os.path.join(basePath, 'ComfyUI_Lam', 'pages','app.html') + # 打开文件 + with open(htmlPtah, 'r', encoding='utf-8') as file: + # 读取文件内容 + html_content = file.read() + + html_content = html_content.replace('{{openId}}', openId) + return web.Response(text=html_content, content_type='text/html') + #return web.FileResponse(htmlPtah) + else: + return web.Response(status=404) + +@PromptServer.instance.routes.get("/wechatauth/handleMessage") +async def handleMessageGet(request): + if "echostr" in request.rel_url.query: + echostr=request.rel_url.query['echostr'] + return web.Response(text=echostr) + else: + return web.Response(text="121212") + +@PromptServer.instance.routes.post("/wechatauth/handleMessage") +async def handleMessagePost(request): + # 读取请求体数据 + body = await request.read() + # 将字节转换为字符串 + data_str = body.decode('utf-8') + data = ET.fromstring(data_str) + ToUserName = data.find('ToUserName').text + FromUserName = data.find('FromUserName').text + MsgType = data.find('MsgType').text + logging.info(data_str) + CreateTime = int(time.time()) + if hasattr(PromptServer.instance,"user_command")==False: + setattr(PromptServer.instance,"user_command",{}) + + #判断是否为准备状态 + isPrepare=FromUserName in PromptServer.instance.user_command and PromptServer.instance.user_command[FromUserName]['status']=='prepare' + isWaiting=FromUserName in PromptServer.instance.user_command and PromptServer.instance.user_command[FromUserName]['status']=='waiting' + # 如果发送的是消息请求, + if MsgType == 'text': #语音屏蔽or MsgType == 'voice' + try: + MsgId = data.find("MsgId").text + if MsgType == 'text': + Content = data.find('Content').text # 文本消息内容 + elif MsgType == 'voice': + Content = data.find('Recognition').text # 语音识别结果,UTF8编码 + # 调用回复函数判断接受的信息,然后返回对应的内容 + reply_content,otherName=receive_msg(Content,isPrepare,isWaiting) + logging.info("reply_content:"+reply_content+',otherName:'+str(otherName)) + if reply_content=='menu' and otherName: + if Config().wechat['isEnterprise']: + sendServiceMenuMessage('您可以执行以下操作:','欢迎再次光临',otherName, FromUserName) + else: + msgStr='您可以执行以下操作指令:\n ' + for i in range(len(otherName)): + msgStr+=otherName[i]['content']+'\n' + out = reply_text(FromUserName, ToUserName, CreateTime, msg) + return web.Response(text=out, content_type='application/xml') + + elif reply_content=='command' and otherName: + adminNo=base64_decode(Config().wechat['adminNo']) + msg='' + isAdopt=True + if adminNo!=FromUserName: + db=DataBaseUtil() + data=db.get_user_frequency(FromUserName) + if data[0]==None: + db.user_recharge(FromUserName,Config().wechat['freeSize']) + data=db.get_user_frequency(FromUserName) + countd=db.get_user_task_count(FromUserName) + db.close_con() + if countd[0] >=data[0]: + isAdopt=False + msg='非常抱歉,您的免费使用次数已用完,如需继续使用,请联系管理员。微信号:\n'+Config().wechat['adminWeChat'] + + if isAdopt: + #添加指令的代码 + PromptServer.instance.user_command[FromUserName]={'openId':FromUserName,'status':'prepare','command':otherName,'seed':''.join(random.sample('123456789012345678901234567890',14))} + msg,comlist=getCommandMsg(Config().wechat['commands'][otherName],Config().wechat['isEnterprise']) + if comlist: + sendServiceMenuMessage(msg,Config().wechat['commands'][otherName]['replyText'],comlist, FromUserName) + return web.Response(status=200) + out = reply_text(FromUserName, ToUserName, CreateTime, msg) + return web.Response(text=out, content_type='application/xml') + elif reply_content=='query' and otherName: + if otherName=='查询排队情况': + msg='' + if isWaiting: + msg=getTaskRanking(PromptServer.instance,FromUserName) + else: + msg='您还没有排队,请先发送您的指令' + + out = reply_text(FromUserName, ToUserName, CreateTime, msg) + return web.Response(text=out, content_type='application/xml') + elif otherName == '我的编号': + out = reply_text(FromUserName, ToUserName, CreateTime, base64_encode(FromUserName)) + return web.Response(text=out, content_type='application/xml') + elif reply_content=='ok': + if otherName and len(otherName)>0: + PromptServer.instance.user_command[FromUserName]['prompt']=PromptServer.instance.user_command[FromUserName]['prompt']+otherName if 'prompt' in PromptServer.instance.user_command[FromUserName] else otherName + params=Config().wechat['commands'][PromptServer.instance.user_command[FromUserName]['command']]['params'] + paramName='' + for param in params: + if params[param]['isRequired'] and param not in PromptServer.instance.user_command[FromUserName]: + paramName= params[param]['zhName'] + break + if paramName!='': + out = reply_text(FromUserName, ToUserName, CreateTime, '任务缺乏参数“'+paramName+'”请补充后再提交') + return web.Response(text=out, content_type='application/xml') + resp=setPost(PromptServer.instance,FromUserName) + if resp!=None: + serverAddress=Config().wechat['serverAddress']+'wechatauth/app?openId='+base64_encode(FromUserName) + imgUrl='http://mmbiz.qpic.cn/sz_mmbiz_jpg/EpicUicwgk0IGpbYZicuGSXUBaIFWbuDZmBbmDO9PleONOz3FJ3eANEmRicD0eR7mF6PCkxSPxVicbDclQldFKDlHRA/0' + out = reply_news(FromUserName, ToUserName, CreateTime, '任务加入队列提醒','任务已加入队列请等待。或可点击访问详情,使用更多功能!',imgUrl,serverAddress) + #out = reply_text(FromUserName, ToUserName, CreateTime, '任务已加入队列请等待,详情请访问:\n'+serverAddress) + return web.Response(text=out, content_type='application/xml') + elif reply_content=='recharge' and otherName: + adminNo=base64_decode(Config().wechat['adminNo']) + msg='' + if adminNo==FromUserName: + data=otherName.split('加') + openId=base64_decode(data[0]) + tount=int(data[1]) + if openId and tount>0: + db=DataBaseUtil() + fdata=db.get_user_frequency(openId) + if fdata[0] and fdata[0]>0: + db.user_recharge(openId,tount) + msg='次数加入成功' + else: + msg='用户不存在' + + db.close_con() + else: + msg='用户编码错误' + else: + msg='无效的指令' + out = reply_text(FromUserName, ToUserName, CreateTime, msg) + return web.Response(text=out, content_type='application/xml') + elif isPrepare: + msg='' + if reply_content and otherName!=None: + commandName=PromptServer.instance.user_command[FromUserName]['command'] + if reply_content in Config().wechat['commands'][commandName]['params']: + if 'options' in Config().wechat['commands'][commandName]['params'][reply_content]: + PromptServer.instance.user_command[FromUserName][reply_content]=Config().wechat['commands'][commandName]['params'][reply_content]['options'][otherName] + else: + PromptServer.instance.user_command[FromUserName][reply_content]=otherName + msg='已填选'+Config().wechat['commands'][commandName]['params'][reply_content]['zhName']+':'+otherName + else: + PromptServer.instance.user_command[FromUserName]['prompt']=PromptServer.instance.user_command[FromUserName]['prompt']+reply_content if 'prompt' in PromptServer.instance.user_command[FromUserName] else reply_content + msg='已填入提示词:'+reply_content + out = reply_text(FromUserName, ToUserName, CreateTime, msg) + return web.Response(text=out, content_type='application/xml') + else: + out = reply_text(FromUserName, ToUserName, CreateTime, reply_content) + logging.info(out) + return web.Response(text=out, content_type='application/xml') + except Exception as e: + logging.error('消息处理异常:'+str(e)) + elif MsgType == 'image': #图片 + if isPrepare: + PicUrl=data.find('PicUrl').text + PromptServer.instance.user_command[FromUserName]['image']=PicUrl + else: + out = reply_text(FromUserName, ToUserName, CreateTime, '请先选择指令') + return web.Response(text=out, content_type='application/xml') + elif MsgType == 'event': #事件 + try: + Event = data.find('Event').text + Event_key = data.find('EventKey').text + CreateTime = int(time.time()) + # 判断事件,并返回内容 + reply_content = receive_event(Event,Event_key) + if reply_content: + out = reply_text(FromUserName, ToUserName, CreateTime, reply_content) + return web.Response(text=out, content_type='application/xml') + except Exception as e: + logging.error('事件处理异常:'+str(e)) + return web.Response(status=200) + +PromptServer.instance.send_sync=types.MethodType(send_sync,PromptServer.instance) + +NODE_CLASS_MAPPINGS = {} +NODE_DISPLAY_NAME_MAPPINGS = {} diff --git a/py/openPoseEditorPlus.py b/py/openPoseEditorPlus.py index 3f9ec7d..68e1a35 100644 --- a/py/openPoseEditorPlus.py +++ b/py/openPoseEditorPlus.py @@ -24,8 +24,8 @@ if not os.path.exists(dir): # Directory node save settings CHUNK_SIZE = 1024 -dir_painter_node = os.path.dirname(__file__) -extension_path = os.path.join(os.path.abspath(dir_painter_node)) +basePath = folder_paths.folder_names_and_paths['custom_nodes'][0][0] +extension_path = os.path.join(basePath, 'ComfyUI_Lam', 'config') file_settings_path = os.path.join(extension_path,"settings_nodes.json") # Function create file json file @@ -379,9 +379,13 @@ class openPoseEditorPlus: image_path = folder_paths.get_annotated_filepath(image) - i = Image.open(image_path) - i = ImageOps.exif_transpose(i) - painterImage = i.convert("RGB") + if os.path.exists(image_path): + i = Image.open(image_path) + i = ImageOps.exif_transpose(i) + painterImage = i.convert("RGB") + else: + painterImage = np.zeros(shape=(height, width, 3), dtype=np.uint8) + painterImage = np.array(painterImage).astype(np.float32) / 255.0 painterImage = torch.from_numpy(painterImage)[None,] diff --git a/py/src/wechat/DataBaseUtil.py b/py/src/wechat/DataBaseUtil.py new file mode 100644 index 0000000..9769b4a --- /dev/null +++ b/py/src/wechat/DataBaseUtil.py @@ -0,0 +1,219 @@ +# -*- coding: utf-8 -*- +import sys +import os +import sqlite3 +import folder_paths +import time +class DataBaseUtil(): + """ + 简单sqlite数据库工具类 + 编写这个类主要是为了封装sqlite,继承此类复用方法 + """ + + def __init__(self, dbName="lamWeChat.db"): + """ + 初始化连接——使用完需关闭连接 + :param dbName: 连接库的名字,注意,以'.db'结尾 + """ + basePath = folder_paths.folder_names_and_paths['custom_nodes'][0][0] + self.db_path = os.path.join(basePath, 'ComfyUI_Lam', 'config', dbName) + isNew=os.path.exists(self.db_path) + # 连接数据库 + self._conn = sqlite3.connect(self.db_path) + # 创建游标 + self._cur = self._conn.cursor() + if isNew==False: + # 创建数据表 用户任务表 + users_tb_sql =''' + CREATE TABLE IF NOT EXISTS users ( + id INTEGER PRIMARY KEY, + openId TEXT NOT NULL, + command TEXT NOT NULL, + prompt_id TEXT NOT NULL, + status TEXT NOT NULL, + start_time TEXT NOT NULL, + end_time TEXT, + outputs TEXT + ) + ''' + self.create_tabel(users_tb_sql) + # 用户充值记录表 + user_recharge_sql =''' + CREATE TABLE IF NOT EXISTS user_recharge ( + id INTEGER PRIMARY KEY, + openId TEXT NOT NULL, + frequency INTEGER NOT NULL, + recharge_time TEXT NOT NULL + ) + ''' + self.create_tabel(user_recharge_sql) + + + + def close_con(self): + """关闭连接对象——主动调用 + :return: + """ + self._cur.close() + self._conn.close() + # 创建数据表 + def create_tabel(self, sql: str): + """ + 创建表 + :param sql: create sql语句 + :return: True表示创建表成功 + """ + try: + self._cur.execute(sql) + self._conn.commit() + print("[create table success]") + return True + except Exception as e: + print("[create table error]", e) + # 删除数据表 + def drop_table(self, sql: str): + """ + 删除表 + :param sql: drop sql语句 + :return: True表示删除成功 + """ + try: + self._cur.execute(sql) + self._conn.commit() + return True + except Exception as e: + print("[drop table error]", e) + return False + # 插入或更新表数据,一次插入或更新一条数据 + def operate_one(self, sql: str, value: tuple): + """ + 插入或更新单条表记录 + :param sql: insert语句或update语句 + :param value: 插入或更新的值,形如() + :return: True表示插入或更新成功 + """ + try: + self._cur.execute(sql, value) + self._conn.commit() + if 'INSERT' in sql.upper(): + print("[insert one record success]") + if 'UPDATE' in sql.upper(): + print("[update one record success]") + return True + except Exception as e: + print("[insert/update one record error]", e) + self._conn.rollback() + return False + # 插入或更新表数据,一次插入或更新多条数据 + def operate_many(self, sql: str, value: list): + """ + 插入或更新多条表记录 + :param sql: insert语句或update语句 + :param value: 插入或更新的字段的具体值,列表形式为list:[(),()] + :return: True表示插入或更新成功 + """ + try: + # 调用executemany()方法 + self._cur.executemany(sql, value) + self._conn.commit() + if 'INSERT' in sql.upper(): + print("[insert many records success]") + if 'UPDATE' in sql.upper(): + print("[update many records success]") + return True + except Exception as e: + print("[insert/update many records error]", e) + self._conn.rollback() + return False + # 删除表数据 + def delete_record(self, sql: str): + """ + 删除表记录 + :param sql: 删除记录SQL语句 + :return: True表示删除成功 + """ + try: + if 'DELETE' in sql.upper(): + self._cur.execute(sql) + self._conn.commit() + #print("[detele record success]") + return True + else: + print("[sql is not delete]") + return False + except Exception as e: + print("[detele record error]", e) + return False + # 查询一条数据 + def query_one(self, sql: str, params=None): + """ + 查询单条数据 + :param sql: select语句 + :param params: 查询参数,形如() + :return: 语句查询单条结果 + """ + try: + if params: + self._cur.execute(sql, params) + else: + self._cur.execute(sql) + # 调用fetchone()方法 + r = self._cur.fetchone() + #print("[select one record success]") + return r + except Exception as e: + print("[select one record error]", e) + # 查询多条数据 + def query_many(self, sql: str, params=None): + """ + 查询多条数据 + :param sql: select语句 + :param params: 查询参数,形如() + :return: 语句查询多条结果 + """ + try: + if params: + self._cur.execute(sql, params) + else: + self._cur.execute(sql) + # 调用fetchall()方法 + r = self._cur.fetchall() + #print("[select many records success]") + return r + except Exception as e: + print("[select many records error]", e) + def insert_data(self, openId, command, prompt_id,status,start_time, end_time, outputs): + self.operate_one("INSERT INTO users (openId, command,prompt_id,status, start_time, end_time, outputs) VALUES (?, ?,?, ?, ?, ?,?)", ( + openId, command, prompt_id,status,start_time, end_time, outputs)) + + def get_data(self, openId,prompt_id): + return self.query_one("SELECT * FROM users WHERE openId = ? and prompt_id=? ", (openId,prompt_id)) + + def update_data(self, status, end_time, outputs,prompt_id): + self.operate_one("UPDATE users SET status=?,end_time = ?, outputs = ? WHERE prompt_id = ?", + (status, end_time, outputs, prompt_id)) + + def get_many_data(self, openId): + return self.query_many("SELECT * FROM users WHERE openId=? ", (openId,)) + + def user_recharge(self,openId,frequency): + now = time.localtime() + recharge_time = time.strftime("%Y-%m-%d %H:%M:%S", now) + self.operate_one("INSERT INTO user_recharge (openId,frequency,recharge_time) VALUES (?, ?,?)", (openId, frequency, recharge_time)) + + def get_user_frequency(self,openId): + return self.query_one("SELECT sum(frequency) FROM user_recharge WHERE openId=? ", (openId,)) + + def get_user_task_count(self,openId): + return self.query_one("SELECT count(*) FROM users WHERE openId=? ", (openId,)) + + +#db=DataBaseUtil() +#db.delete_record('DELETE FROM users where command="图生视频"') +#data=db.get_user_task_count('oJNTS6vtlfGKyivfY6loLLScQ3FQ') +#data=db.get_data('oJNTS6vtlfGKyivfY6loLLScQ3FQ','02b73c61-6f18-4432-837a-dd64d9424ed7') +#print(data) + + + + diff --git a/py/src/wechat/WechatAuthUtils.py b/py/src/wechat/WechatAuthUtils.py new file mode 100644 index 0000000..939930c --- /dev/null +++ b/py/src/wechat/WechatAuthUtils.py @@ -0,0 +1,263 @@ +import requests +import hashlib +import io +import cv2 +import json +from .config import Config +import time +import logging +# APPID = 'wx1c2b19f7af1d6241' +# SECRET = '915d587b5ae4e148e100429e11ca4d60' +#APPID = 'wxa50ed345b253964d' +#SECRET = "327ac9ba06d214d2fcfe2e9ed0520684" +# APPID = 'wx2693b75459c2f339' +# SECRET = 'f5e8741764bbb0a8b8b2d7d26a17ea62' +import base64 + + +def base64_encode(text): + encoded_text = base64.b64encode(text.encode('utf-8')).decode('utf-8') + return encoded_text + + +def base64_decode(encoded_text): + decoded_text = base64.b64decode(encoded_text).decode('utf-8') + return decoded_text + + +"""这是一个处理客户发送信息的文件""" + + +def reply_text(FromUserName, ToUserName, CreateTime, Content): + """回复文本消息模板""" + textTpl = """ %s """ + out = textTpl % (FromUserName, ToUserName, CreateTime, 'text', Content) + return out + + +"""图片文消息""" + + +def reply_news(FromUserName, ToUserName, CreateTime, Title, Description, PicUrl, Url): + textTpl = """ + + + + %s + + 1 + + + <![CDATA[%s]]> + + + + + + + """ + out = textTpl % (FromUserName, ToUserName, CreateTime, + Title, Description, PicUrl, Url) + return out + + +def getCommandMsg(command, isEnterprise): + keyNames = ['image', 'seed', 'prompt', 'negative'] + if isEnterprise: + comList = [] + names = [] + otherParamsStr='' + index = 0 + for key in command['params']: + if key in keyNames: + continue + + requiredText='(必填)' if command['params'][key]['isRequired'] else '(选填)' + if 'options' in command['params'][key]: + names.append(command['params'][key]['zhName']+requiredText) + for option in command['params'][key]['options']: + comList.append({"id": index, "content": key+':'+option}) + index += 1 + else: + otherParamsStr+='\n参数“'+command['params'][key]['zhName']+requiredText+'”指令=》'+key+':'+str(command['params'][key]['default']) + + + if len(names) > 0 and len(comList) > 0: + return '您可以选择以下指令来选择('+','.join(names)+')'+otherParamsStr, comList + else: + if len(otherParamsStr)>0: + return '您可以输入以下指令:'+otherParamsStr+'\n'+command['replyText'], None + return command['replyText'], None + else: + names = [] + comList = [] + otherParamsStr='' + for key in command['params']: + if key in keyNames: + continue + + requiredText='(必填)' if command['params'][key]['isRequired'] else '(选填)' + if 'options' in command['params'][key]: + names.append(command['params'][key]['zhName']+requiredText) + for option in command['params'][key]['options']: + comList.append(key+':'+option) + else: + otherParamsStr+='\n参数“'+command['params'][key]['zhName']+requiredText+'”命令=》'+key+':'+str(command['params'][key]['default']) + return '您可以执行以下命令:\n'+'\n'.join(comList)+'\n,选择》'+','.join(names)+otherParamsStr+'\n'+command['replyText'], None + + +def receive_msg(msg, isPrepare=False, isWaiting=False): + # 这是一个将疑问改成成熟句子的函数,例如:你好吗 公众号回复:你好 + commands = Config().wechat['commands'] + isEnterprise = Config().wechat['isEnterprise'] + query_commands = Config().wechat['query_commands'] + if msg == u'帮助': + comList = [] + index = 0 + for key in commands: + comList.append({"id": index, "content": key}) + index += 1 + for key in query_commands: + comList.append({"id": index, "content": key}) + index += 1 + if isEnterprise == False: + comNames = [x['content'] for x in comList] + return '您可以执行以下操作:\n'+'\n'.join(comNames), None + return 'menu', comList + elif isWaiting == False and msg in commands: + return 'command', msg + elif msg in query_commands: + return 'query', msg + elif isPrepare: + if msg.find(':') != -1: + return tuple(msg.split(':')) + elif (msg.lower().endswith(u'ok') or msg.lower() == 'ok'): + return 'ok', msg[:-2] + else: + return msg, None + elif msg.find('加') != -1 and len(msg.split('加')) == 2: + return 'recharge', msg + elif isWaiting: + return '任务已加入队列请等待...', None + else: + return "您可以发送“帮助”查看使用说明", None + + +def receive_event(event, key): + # 如果是关注公众号事件 + if event == 'subscribe': + return "感谢关注!您可以发送“帮助”查看使用说明" + # 如果是点击菜单拉取消息事件 + elif event == 'CLICK': + # 接下来就是根据你点击不同的菜单拉去不同的消息啦 + # 我为了省事,不进行判断啦,如果需要判断请根据 key进行判断 + return "你点击了菜单"+key + # 如果是点击菜单跳转Url事件,不做任何处理因为微信客户端会自行处理 + elif event == 'VIEW': + return None + + +def getAccessToken(): + if Config().wechat['access_token_expires_at'] <= 0 or time.time() >= Config().wechat['access_token_expires_at']: + APPID = Config().wechat['appid'] + SECRET = Config().wechat['secret'] + token_url = f'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={APPID}&secret={SECRET}' + resResult = requests.get(token_url) + data = resResult.json() + if 'access_token' in data: + access_token = data['access_token'] + Config().wechat['access_token'] = access_token + Config().wechat['access_token_expires_at'] = time.time( + )+data['expires_in']-60 + Config().save_config() + return access_token + else: + logging.info(token_url) + logging.error('获取access_token失败'+str(data)) + + else: + return Config().wechat['access_token'] + + +def sendServiceImageMessge(media_id, touser): # 发送图片 + message = { + "touser": touser, + "msgtype": 'image', + "image": { + "media_id": media_id, + } + } + return sendServiceMessage(message) + + +def sendServiceVideoMessge(media_id, title, desc, touser): # 发送视频 + message = { + "touser": touser, + "msgtype": "video", + "video": { + "media_id": media_id, + "title": title, + "description": desc, + } + } + return sendServiceMessage(message) + + +# 发送菜单 menu_list = [{"id":"1","content":"菜单1"},{"id":"2","content":"菜单2"}] +def sendServiceMenuMessage(head_content, tail_content, menu_list, touser): + message = { + "touser": touser, + "msgtype": "msgmenu", + "msgmenu": { + "head_content": head_content, + "list": menu_list, + "tail_content": tail_content + } + } + return sendServiceMessage(message) + + +def sendServiceMessage(message): + access_token = getAccessToken() + url = f'https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token={access_token}' + data = json.dumps(message, ensure_ascii=False).encode('utf-8') + resResult = requests.post(url, data=data) + data = resResult.json() + if data['errcode'] == 0: + return True + else: + logging.error('发送消息失败'+str(data)) + return False + + +def sendServiceTyping(touser): # 下发正在输入状态 + accessToken = getAccessToken() + url = f'https://api.weixin.qq.com/cgi-bin/message/custom/typing?access_token={accessToken}' + message = {"touser": touser, "command": "Typing"} + data = json.dumps(message, ensure_ascii=False).encode('utf-8') + resResult = requests.post(url, data=data) + data = resResult.json() + if data['errcode'] == 0: + return True + else: + logging.error('正在输入状态失败'+str(data)) + return False + + +# 上传临时/永久素材 +# 媒体文件类型,分别有图片(image)、语音(voice)、视频(video)和缩略图(thumb) +def getMediaId(image_path, type, isTemporary=True): + access_token = getAccessToken() + if(isTemporary): + url = f"https://api.weixin.qq.com/cgi-bin/media/upload?access_token={access_token}&type={type}" + else: + url = f"https://api.weixin.qq.com/cgi-bin/material/add_material?access_token={access_token}&type={type}" + + files = {'media': open(image_path, 'rb')} + resResult = requests.post(url, files=files) + data = resResult.json() + if 'media_id' in data: + return data['media_id'] + else: + logging.error('素材上传失败'+str(data)) + return None diff --git a/py/src/wechat/config.py b/py/src/wechat/config.py new file mode 100644 index 0000000..2031fef --- /dev/null +++ b/py/src/wechat/config.py @@ -0,0 +1,65 @@ +# -*- coding: utf-8 -*- + +import os +import shutil +import functools +import yaml +import folder_paths + +def singleton(cls): + """ + 将一个类作为单例 + 来自 https://wiki.python.org/moin/PythonDecoratorLibrary#Singleton + """ + + cls.__new_original__ = cls.__new__ + + @functools.wraps(cls.__new__) + def singleton_new(cls, *args, **kw): + it = cls.__dict__.get('__it__') + if it is not None: + return it + + cls.__it__ = it = cls.__new_original__(cls, *args, **kw) + it.__init_original__(*args, **kw) + return it + + cls.__new__ = singleton_new + cls.__init_original__ = cls.__init__ + cls.__init__ = object.__init__ + + return cls + +@singleton +class Config(object): + def __init__(self) -> None: + basePath=folder_paths.folder_names_and_paths['custom_nodes'][0][0] + self.pwd = os.path.join(basePath,'ComfyUI_Lam','config') + self.reload() + + def _load_config(self) -> dict: + try: + with open(f"{self.pwd}/weChat.yaml", "rb") as fp: + yconfig = yaml.safe_load(fp) + except FileNotFoundError: + shutil.copyfile(f"{self.pwd}/weChat.yaml.template", f"{self.pwd}/weChat.yaml") + with open(f"{self.pwd}/weChat.yaml", "rb") as fp: + yconfig = yaml.safe_load(fp) + + return yconfig + + def save_config(self): + yconfig = self._load_config() + yconfig["wechat"] = self.wechat + with open(f"{self.pwd}/weChat.yaml", 'w', encoding='utf-8') as file: + yaml.dump(yconfig, file,sort_keys=False,default_flow_style=False,allow_unicode=True, encoding='utf-8') + + def reload(self) -> None: + yconfig = self._load_config() + self.wechat = yconfig.get("wechat", {}) + #self.comfyui = yconfig.get("comfyui", {}) + #self.EMAIL= yconfig.get("email", {}) + #self.OPENAI= yconfig.get("openai", {}) + #self.GLM4= yconfig.get("glm4", {}) + #self.COMFY_UI=yconfig.get("comfyUI", {}) +