(() => {
var exports = {};
exports.id = 888;
exports.ids = [888];
exports.modules = {

/***/ 2000:
/***/ ((module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(997);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6689);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _InterrogateCtx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(39);
/* harmony import */ var _pages_api_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8502);
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_pages_api_base__WEBPACK_IMPORTED_MODULE_3__]);
_pages_api_base__WEBPACK_IMPORTED_MODULE_3__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];




const InterrogateCtxProvider = (props)=>{
    const [results, setResults] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]);
    const [refreshCallbacks, setRefreshCallbacks] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]);
    const [needsRefreshing, setNeedsRefreshing] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
    const updateResultFactory = (taskId)=>(getUpdated)=>{
            setResults((oldResults)=>{
                const oldResult = oldResults.find((f)=>f.taskId == taskId);
                if (oldResult) {
                    return oldResults.filter((f)=>f !== oldResult).concat([
                        getUpdated(oldResult)
                    ]);
                }
                return oldResults;
            });
        };
    const remove = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)((taskId)=>{
        setResults((oldResults)=>oldResults.filter((f)=>f.taskId != taskId));
    }, []);
    const interrogate = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)((taskId, image)=>{
        const updateResult = updateResultFactory(taskId);
        setResults((oldResults)=>oldResults.filter((f)=>f.taskId != taskId).concat([
                {
                    taskId,
                    status: "pending",
                    caption: ""
                }
            ]));
        const params = {
            image: image,
            taskId: taskId
        };
        (0,_pages_api_base__WEBPACK_IMPORTED_MODULE_3__/* .getInterrogate */ .l2)(params).then((data)=>{
            if (data) {
                updateResult((oldResult)=>({
                        ...oldResult,
                        status: "success",
                        caption: data.caption
                    }));
                setNeedsRefreshing(true);
            } else {
                updateResult((oldResult)=>({
                        ...oldResult,
                        status: "failed"
                    }));
            }
        });
    }, []);
    (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{
        if (needsRefreshing) {
            refreshCallbacks.forEach((cb)=>cb());
            setNeedsRefreshing(false);
        }
    }, [
        needsRefreshing,
        refreshCallbacks
    ]);
    const interrogateManager = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(()=>({
            interrogate,
            remove,
            addRefreshCallback: (cb)=>{
                setRefreshCallbacks((oldCbs)=>[
                        ...oldCbs,
                        cb
                    ]);
            },
            removeRefreshCallback: (cb)=>{
                setRefreshCallbacks((oldCbs)=>oldCbs.filter((oldCb)=>oldCb !== cb));
            }
        }), [
        interrogate
    ]);
    return /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_InterrogateCtx__WEBPACK_IMPORTED_MODULE_2__/* .InterrogateResultsContext.Provider */ .lQ.Provider, {
        value: results,
        children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_InterrogateCtx__WEBPACK_IMPORTED_MODULE_2__/* .InterrogateContext.Provider */ .XP.Provider, {
            value: interrogateManager,
            children: props.children
        })
    });
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InterrogateCtxProvider);

__webpack_async_result__();
} catch(e) { __webpack_async_result__(e); } });

/***/ }),

/***/ 6115:
/***/ ((module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(997);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6689);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _createContext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2228);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4098);
/* harmony import */ var _pages_api_base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8502);
/* harmony import */ var _common_constans_international__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3413);
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_pages_api_base__WEBPACK_IMPORTED_MODULE_4__]);
_pages_api_base__WEBPACK_IMPORTED_MODULE_4__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];






const AppContextProvider = (props)=>{
    const [inferResult, setInferResult] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]) // 执行结果查询
    ;
    const [inferStarList, setInferStarList] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]);
    const [newInferResult, setNewInferResult] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]);
    const [taskResult, setTaskResult] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)({});
    const [agentName, setAgentName] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(_common_constans_international__WEBPACK_IMPORTED_MODULE_5__/* .INIT_GOURP */ .dM);
    const [pageRefreshState, setPageRefreshState] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(0) // 去通知列表刷新的状态
    ;
    const [taskId, setTaskId] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);
    const [segementModal, setSegmentModal] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false) // 是否显示分割片的弹框
    ;
    const [requestLoading, setRequestLoading] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
    const [showEdit, setShowEdit] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
    const [userInfos, setUserInfos] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);
    const [hasTriggeredTaskDetail, setHasTriggeredTaskDetail] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
    const [powerBalanceAmount, setPowerBalance] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(0);
    const [needPower, setNeedPower] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(40);
    const [startTaskExecutions, setStartExecutions] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
    const [mainCutMask, setMainCutMask] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)("");
    const [batchTaskPowerDetail, setBatchTaskPowerDetail] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)({});
    // get task detail
    const taskDetail = async (executionId)=>{
        let data = {
            taskId
        };
        if (executionId) data = Object.assign(data, {
            executionId
        });
        const value = await (0,_pages_api_base__WEBPACK_IMPORTED_MODULE_4__/* .getTaskDetail */ .T8)(data);
        if (value?.maskType === "rgba" && value?.mask) {
            setMainCutMask(value.mask);
        }
        setTaskResult({
            ...value
        });
        setNeedPower(value?.power || 40);
        setBatchTaskPowerDetail(value?.powerDetail);
        setHasTriggeredTaskDetail(true);
        return value;
    };
    const samMask = async (mask)=>{
        if (!taskId) return;
        const data = {
            taskId,
            mask,
            maskType: mainCutMask === mask ? "rgba" : "rgb"
        };
        await (0,_pages_api_base__WEBPACK_IMPORTED_MODULE_4__/* .saveSAMMask */ .Z2)(data);
    };
    // modify task result
    const handleTaskResult = (key, value, trigger)=>{
        setHasTriggeredTaskDetail(trigger || false);
        setTaskResult((prevState)=>({
                ...prevState,
                [key]: value
            }));
    };
    const saveTaskDetail = async (params)=>{
        let data = {
            agentVersion: taskResult?.agentVersion,
            agentName,
            image: taskResult.image,
            showImage: taskResult?.showImage,
            taskId,
            paramType: taskResult.paramType,
            batchTask: taskResult?.batchTask || false
        };
        if (params) data = Object.assign(data, params);
        if (!taskResult.paramType) return;
        _constants__WEBPACK_IMPORTED_MODULE_3__/* .PARAMS */ .z[taskResult.paramType]?.forEach((item)=>{
            if (item === "denoiseType") {
                data = Object.assign(data, {
                    [item]: taskResult[item] || 14
                });
            } else {
                data = Object.assign(data, {
                    [item]: taskResult[item]
                });
            }
        });
        if (agentName == "replicate") {
            _constants__WEBPACK_IMPORTED_MODULE_3__/* .PARAMS.replicate.forEach */ .z.replicate.forEach((item)=>{
                data = Object.assign(data, {
                    [item]: taskResult[item]
                });
            });
        }
        const value = await (0,_pages_api_base__WEBPACK_IMPORTED_MODULE_4__/* .saveTask */ .F9)(data);
        if (value?.power) setNeedPower(value?.power);
        if (value?.powerDetail) setBatchTaskPowerDetail(value.powerDetail);
        return value;
    };
    (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{
        if (taskResult.taskId && !hasTriggeredTaskDetail) saveTaskDetail();
    }, [
        taskResult,
        hasTriggeredTaskDetail
    ]);
    const refreshPageList = ()=>{
        setPageRefreshState((value)=>{
            return value + 1;
        });
    };
    return /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_createContext__WEBPACK_IMPORTED_MODULE_2__/* ["default"].Provider */ .Z.Provider, {
        value: {
            inferResult: [
                inferResult,
                setInferResult
            ],
            inferStarList: [
                inferStarList,
                setInferStarList
            ],
            taskResult: [
                taskResult,
                setTaskResult
            ],
            agentName: [
                agentName,
                setAgentName
            ],
            pageRefreshState: [
                pageRefreshState
            ],
            refreshPageList,
            taskId: [
                taskId,
                setTaskId
            ],
            segementModal: [
                segementModal,
                setSegmentModal
            ],
            taskDetail,
            saveTaskDetail,
            handleTaskResult,
            samMask,
            mainCutMask: [
                mainCutMask,
                setMainCutMask
            ],
            newInferResult: [
                newInferResult,
                setNewInferResult
            ],
            requestLoading: [
                requestLoading,
                setRequestLoading
            ],
            showEdit: [
                showEdit,
                setShowEdit
            ],
            userInfos: [
                userInfos,
                setUserInfos
            ],
            powerBalanceAmount: [
                powerBalanceAmount,
                setPowerBalance
            ],
            needPower: [
                needPower,
                setNeedPower
            ],
            startTaskExecutions: [
                startTaskExecutions,
                setStartExecutions
            ],
            batchTaskPowerDetail: [
                batchTaskPowerDetail,
                setBatchTaskPowerDetail
            ]
        },
        children: props.children
    });
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AppContextProvider);

__webpack_async_result__();
} catch(e) { __webpack_async_result__(e); } });

/***/ }),

/***/ 7406:
/***/ ((module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(997);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6689);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _UploadCtx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7038);
/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9648);
/* harmony import */ var _common_constans_international__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3413);
/* harmony import */ var _components_Toast__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(9204);
/* harmony import */ var _pages_api_base__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8502);
/* harmony import */ var next_i18next__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1377);
/* harmony import */ var next_i18next__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(next_i18next__WEBPACK_IMPORTED_MODULE_6__);
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([axios__WEBPACK_IMPORTED_MODULE_3__, _pages_api_base__WEBPACK_IMPORTED_MODULE_5__]);
([axios__WEBPACK_IMPORTED_MODULE_3__, _pages_api_base__WEBPACK_IMPORTED_MODULE_5__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);








const UploadCtxProvider = (props)=>{
    const { t  } = (0,next_i18next__WEBPACK_IMPORTED_MODULE_6__.useTranslation)("studio");
    const [files, setFiles] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]);
    const [refreshCallbacks, setRefreshCallbacks] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]);
    const [needsRefreshing, setNeedsRefreshing] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);
    const updateFileFactory = (taskId, type, uniqueKey)=>(getUpdated)=>{
            setFiles((oldFiles)=>{
                const oldFile = oldFiles.find((f)=>f.taskId == taskId && f.type == type && f.uniqueKey == uniqueKey);
                if (oldFile) {
                    return oldFiles.filter((f)=>f !== oldFile).concat([
                        getUpdated(oldFile)
                    ]);
                }
                return oldFiles;
            });
        };
    const remove = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)((type, taskId, uniqueKey)=>{
        setFiles((oldFiles)=>oldFiles.filter((f)=>f.taskId != taskId || f.type != type || f.uniqueKey != uniqueKey));
    }, []);
    const upload = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)((type, file, taskId, taskName, uniqueKey)=>{
        const updateFile = updateFileFactory(taskId, type, uniqueKey ?? "");
        const data = new FormData();
        data.append("image", file);
        setFiles((oldFiles)=>oldFiles.filter((f)=>f.taskId != taskId || f.type != type || f.uniqueKey != uniqueKey).concat([
                {
                    taskId,
                    type,
                    uniqueKey: uniqueKey ?? "",
                    name: file.name,
                    startTime: Date.now(),
                    status: "pending",
                    loaded: 0,
                    total: file.size,
                    image: ""
                }
            ]));
        if (type === "controller") {
            axios__WEBPACK_IMPORTED_MODULE_3__["default"].post(_common_constans_international__WEBPACK_IMPORTED_MODULE_4__/* .BASE_URL */ ._n + "/v1/asset/upload/image", data, {
                onUploadProgress: (e)=>{
                    updateFile((oldFile)=>({
                            ...oldFile,
                            loaded: e.loaded,
                            total: e.total ?? 0
                        }));
                }
            }).then((res)=>{
                const { image  } = res.data.data;
                updateFile((oldFile)=>({
                        ...oldFile,
                        status: "success",
                        image
                    }));
                setNeedsRefreshing(true);
            }).catch((e)=>{
                console.error(`error: ${e}`);
                (0,_components_Toast__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z)({
                    message: t("toast.taskPicUploadFail", {
                        taskName
                    }),
                    duration: 3000
                });
                updateFile((oldFile)=>({
                        ...oldFile,
                        status: "failed"
                    }));
            });
        } else if (type === "main") {
            axios__WEBPACK_IMPORTED_MODULE_3__["default"].post(_common_constans_international__WEBPACK_IMPORTED_MODULE_4__/* .BASE_URL */ ._n + "/v1/asset/upload/image", data, {
                onUploadProgress: (e)=>{
                    updateFile((oldFile)=>({
                            ...oldFile,
                            loaded: e.loaded,
                            total: e.total ?? 0
                        }));
                }
            }).then((res)=>{
                const { image  } = res.data.data;
                const data = {
                    taskId
                };
                return Promise.all([
                    Promise.resolve(image),
                    (0,_pages_api_base__WEBPACK_IMPORTED_MODULE_5__/* .getTaskDetail */ .T8)(data)
                ]);
            }).then((res)=>{
                const image = res[0];
                let data = {
                    ...res[1]
                };
                data = Object.assign(data, {
                    image,
                    showImage: "",
                    mask: ""
                });
                return Promise.all([
                    Promise.resolve(image),
                    (0,_pages_api_base__WEBPACK_IMPORTED_MODULE_5__/* .saveTask */ .F9)(data)
                ]);
            }).then((res)=>{
                const image = res[0];
                const { showImage  } = res[1];
                updateFile((oldFile)=>({
                        ...oldFile,
                        status: "success",
                        image,
                        showImage
                    }));
                setNeedsRefreshing(true);
            }).catch((e)=>{
                console.error(`error: ${e}`);
                (0,_components_Toast__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z)({
                    message: t("toast.taskPicUploadFail", {
                        taskName
                    }),
                    duration: 3000
                });
                updateFile((oldFile)=>({
                        ...oldFile,
                        status: "failed"
                    }));
            });
        } else {
            axios__WEBPACK_IMPORTED_MODULE_3__["default"].post(_common_constans_international__WEBPACK_IMPORTED_MODULE_4__/* .BASE_URL */ ._n + `/v1/asset/upload/mask?taskId=${taskId}`, data, {
                onUploadProgress: (e)=>{
                    updateFile((oldFile)=>({
                            ...oldFile,
                            loaded: e.loaded,
                            total: e.total ?? 0
                        }));
                }
            }).then((res)=>{
                const { mask  } = res.data.data;
                const data = {
                    taskId
                };
                return Promise.all([
                    Promise.resolve(mask),
                    (0,_pages_api_base__WEBPACK_IMPORTED_MODULE_5__/* .getTaskDetail */ .T8)(data)
                ]);
            }).then((res)=>{
                const mask = res[0];
                let data = {
                    ...res[1]
                };
                data = Object.assign(data, {
                    mask
                });
                return Promise.all([
                    Promise.resolve(mask),
                    (0,_pages_api_base__WEBPACK_IMPORTED_MODULE_5__/* .saveTask */ .F9)(data)
                ]);
            }).then((res)=>{
                const mask = res[0];
                updateFile((oldFile)=>({
                        ...oldFile,
                        status: "success",
                        image: mask
                    }));
                setNeedsRefreshing(true);
            }).catch((e)=>{
                console.error(`error: ${e}`);
                (0,_components_Toast__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z)({
                    message: t("toast.taskPicUploadFail", {
                        taskName
                    }),
                    duration: 3000
                });
                updateFile((oldFile)=>({
                        ...oldFile,
                        status: "failed"
                    }));
            });
        }
    }, []);
    (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{
        if (needsRefreshing) {
            refreshCallbacks.forEach((cb)=>cb());
            setNeedsRefreshing(false);
        }
    }, [
        needsRefreshing,
        refreshCallbacks
    ]);
    const uploadManager = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(()=>({
            upload,
            remove,
            addRefreshCallback: (cb)=>{
                setRefreshCallbacks((oldCbs)=>[
                        ...oldCbs,
                        cb
                    ]);
            },
            removeRefreshCallback: (cb)=>{
                setRefreshCallbacks((oldCbs)=>oldCbs.filter((oldCb)=>oldCb !== cb));
            }
        }), [
        upload,
        remove
    ]);
    return /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_UploadCtx__WEBPACK_IMPORTED_MODULE_2__/* .UploadFilesContext.Provider */ .ql.Provider, {
        value: files,
        children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_UploadCtx__WEBPACK_IMPORTED_MODULE_2__/* .UploadContext.Provider */ .cP.Provider, {
            value: uploadManager,
            children: props.children
        })
    });
};
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (UploadCtxProvider);

__webpack_async_result__();
} catch(e) { __webpack_async_result__(e); } });

/***/ }),

/***/ 9212:
/***/ ((module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(997);
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _styles_globals_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(108);
/* harmony import */ var _styles_globals_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_styles_globals_css__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _components_hooks_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6115);
/* harmony import */ var next_i18next__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1377);
/* harmony import */ var next_i18next__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_i18next__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2727);
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _components_hooks_upload_UploadCtxProvider__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7406);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5725);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(antd__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var react_ga4__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(5131);
/* harmony import */ var react_ga4__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react_ga4__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(6689);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(1853);
/* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var antd_locale_zh_CN__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(2771);
/* harmony import */ var antd_locale_zh_CN__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(antd_locale_zh_CN__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var antd_locale_en_US__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(9656);
/* harmony import */ var antd_locale_en_US__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(antd_locale_en_US__WEBPACK_IMPORTED_MODULE_11__);
/* harmony import */ var _components_Ground_InterrogateButton_hook_InterrogateCtxProvider__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(2000);
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_components_hooks_context__WEBPACK_IMPORTED_MODULE_2__, _components_hooks_upload_UploadCtxProvider__WEBPACK_IMPORTED_MODULE_5__, _components_Ground_InterrogateButton_hook_InterrogateCtxProvider__WEBPACK_IMPORTED_MODULE_12__]);
([_components_hooks_context__WEBPACK_IMPORTED_MODULE_2__, _components_hooks_upload_UploadCtxProvider__WEBPACK_IMPORTED_MODULE_5__, _components_Ground_InterrogateButton_hook_InterrogateCtxProvider__WEBPACK_IMPORTED_MODULE_12__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);













const GA_ID =  false ? 0 : "G-VV0L43VV4W";
react_ga4__WEBPACK_IMPORTED_MODULE_7___default().initialize(GA_ID);
function App({ Component , pageProps  }) {
    const router = (0,next_router__WEBPACK_IMPORTED_MODULE_9__.useRouter)();
    const isLocaleEn = (next_i18next__WEBPACK_IMPORTED_MODULE_3__.i18n?.language ?? "zh-CN") == "en-US";
    (0,react__WEBPACK_IMPORTED_MODULE_8__.useEffect)(()=>{
        react_ga4__WEBPACK_IMPORTED_MODULE_7___default().send({
            hitType: "pageview",
            page: router.pathname
        });
    }, [
        router.pathname
    ]);
    return /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_4__.StyleProvider, {
        hashPriority: "high",
        transformers: [
            _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_4__.legacyLogicalPropertiesTransformer
        ],
        children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(antd__WEBPACK_IMPORTED_MODULE_6__.ConfigProvider, {
            locale: isLocaleEn ? (antd_locale_en_US__WEBPACK_IMPORTED_MODULE_11___default()) : (antd_locale_zh_CN__WEBPACK_IMPORTED_MODULE_10___default()),
            theme: {
                token: {
                    colorPrimary: "#7530FE"
                }
            },
            children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_components_hooks_context__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, {
                children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_components_hooks_upload_UploadCtxProvider__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, {
                    children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(_components_Ground_InterrogateButton_hook_InterrogateCtxProvider__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z, {
                        children: /*#__PURE__*/ react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx(Component, {
                            ...pageProps
                        })
                    })
                })
            })
        })
    });
}
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,next_i18next__WEBPACK_IMPORTED_MODULE_3__.appWithTranslation)(App));

__webpack_async_result__();
} catch(e) { __webpack_async_result__(e); } });

/***/ }),

/***/ 108:
/***/ (() => {



/***/ }),

/***/ 2727:
/***/ ((module) => {

"use strict";
module.exports = require("@ant-design/cssinjs");

/***/ }),

/***/ 5725:
/***/ ((module) => {

"use strict";
module.exports = require("antd");

/***/ }),

/***/ 9656:
/***/ ((module) => {

"use strict";
module.exports = require("antd/locale/en_US");

/***/ }),

/***/ 2771:
/***/ ((module) => {

"use strict";
module.exports = require("antd/locale/zh_CN");

/***/ }),

/***/ 1377:
/***/ ((module) => {

"use strict";
module.exports = require("next-i18next");

/***/ }),

/***/ 1853:
/***/ ((module) => {

"use strict";
module.exports = require("next/router");

/***/ }),

/***/ 6689:
/***/ ((module) => {

"use strict";
module.exports = require("react");

/***/ }),

/***/ 5131:
/***/ ((module) => {

"use strict";
module.exports = require("react-ga4");

/***/ }),

/***/ 997:
/***/ ((module) => {

"use strict";
module.exports = require("react/jsx-runtime");

/***/ }),

/***/ 9648:
/***/ ((module) => {

"use strict";
module.exports = import("axios");;

/***/ })

};
;

// load runtime
var __webpack_require__ = require("../webpack-runtime.js");
__webpack_require__.C(exports);
var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
var __webpack_exports__ = __webpack_require__.X(0, [751,425], () => (__webpack_exec__(9212)));
module.exports = __webpack_exports__;

})();