{"version":3,"sources":["webpack:///./src/views/plugin/pluginIframe.vue?66f6","webpack:///./src/views/plugin/pluginIframe.vue","webpack:///./src/views/plugin/pluginIframe.vue?54c9"],"names":["_hoisted_1","class","_hoisted_2","__name","__props","store","currentIframeUrl","router","currentRoute","value","query","currentIframeTitle","currentIframeShowClose","isFullScreen","getters","showHeader","handleBack","go","handleClose","replace","path","deviceStore","envStore","isCurrentDeviceOnline","_deviceStore$currentD","currentDeviceRef","runnerTaskRef","phase","unwatchDeviceOffline","async","document","title","untilDeviceReady","addListener","setIframeContentWindow","postDelegateReady","postDeviceOffline","proxyFetch","navigate","startsWith","iframe","getElementById","onload","contentWindow","console","log","isOnline","removeListener","_ctx","_cache","key","isUseIOSHeader","href","onClick","id","src","frameborder","name","__exports__"],"mappings":"kHAAA,W,2JCEA,MACMA,EAAa,CACjBC,MAAO,UAEHC,EAAa,CAAC,OAUQ,mCAAiB,CAC3CC,OAAQ,eACR,MAAMC,GACJ,MAAMC,EAAQ,iBACRC,EAAmB,sBAAS,IACzBC,EAAA,KAAOC,aAAaC,MAAMC,MAAMJ,kBAEnCK,EAAqB,sBAAS,IAC3BJ,EAAA,KAAOC,aAAaC,MAAMC,MAAMC,oBAEnCC,EAAyB,sBAAS,IAC4B,MAA3DL,EAAA,KAAOC,aAAaC,MAAMC,MAAME,wBAEnCC,EAAe,sBAAS,IACrBR,EAAMS,QAAQD,cAEjBE,EAAa,sBAAS,IACnBV,EAAMS,QAAQC,YAEjBC,EAAa,KACjBT,EAAA,KAAOU,IAAI,IAEPC,EAAc,KAClBX,EAAA,KAAOY,QAAQ,CACbC,KAAM,UACNV,MAAOH,EAAA,KAAOC,aAAaC,MAAMC,SAG/BW,EAAc,iBACdC,EAAW,iBACXC,EAAwB,sBAAS,KACrC,IAAIC,EACJ,MAAsK,wBAAnG,QAA1DA,EAAwBH,EAAYI,wBAAwD,IAA1BD,OAAmC,EAASA,EAAsBE,cAAcC,SAE7J,IAAIC,EAAuB,KA2C3B,OA1CA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B+C,YAAa,IACbC,KAAM,iBACL,KAAM,GAAIvD,S,iCChHnB,MAAMwD,EAA2B,IAAgB,EAAQ,CAAC,CAAC,YAAY,qBAExD,gB","file":"js/chunk-3eb50cba.js","sourcesContent":["/* unplugin-vue-components disabled */export * from \"-!../../../../../node_modules/.pnpm/unplugin@1.4.0/node_modules/unplugin/dist/webpack/loaders/transform.js?unpluginName=unplugin-vue-components!../../../../../node_modules/.pnpm/mini-css-extract-plugin@0.9.0_webpack@4.46.0/node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../../node_modules/.pnpm/css-loader@3.6.0_webpack@4.46.0/node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../../node_modules/.pnpm/vue-loader@16.8.3_@vue+compiler-sfc@3.3.4_vue@3.3.4_webpack@4.46.0/node_modules/vue-loader/dist/stylePostLoader.js!../../../../../node_modules/.pnpm/postcss-loader@3.0.0/node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../../node_modules/.pnpm/sass-loader@8.0.2_sass@1.65.1/node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../../node_modules/.pnpm/cache-loader@4.1.0_webpack@4.46.0/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/.pnpm/vue-loader@16.8.3_@vue+compiler-sfc@3.3.4_vue@3.3.4_webpack@4.46.0/node_modules/vue-loader/dist/index.js??ref--1-1!./pluginIframe.vue?vue&type=style&index=0&id=6003300d&lang=scss&scoped=true\"","import { defineComponent as _defineComponent } from 'vue';\nimport { unref as _unref, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\";\nconst _withScopeId = n => (_pushScopeId(\"data-v-6003300d\"), n = n(), _popScopeId(), n);\nconst _hoisted_1 = {\n class: \"iframe\"\n};\nconst _hoisted_2 = [\"src\"];\nimport { computed, onMounted, onBeforeUnmount, watch } from 'vue';\nimport { useStore } from 'vuex';\nimport { IconClose } from '@xunlei/thunder-icon-vue';\nimport router from '@remote/router';\nimport { useDeviceStore } from '@remote/store/device';\nimport { useRequestDelegate } from '@shared/composable/base';\nimport { KUAINIAO_ORIGIN } from '@shared/constants/URLs';\nimport { isAndroidNative } from '@xunlei/universal-native-api';\nimport { useEnvStore } from '@remote/store/env';\nexport default /*#__PURE__*/_defineComponent({\n __name: 'pluginIframe',\n setup(__props) {\n const store = useStore();\n const currentIframeUrl = computed(() => {\n return router.currentRoute.value.query.currentIframeUrl;\n });\n const currentIframeTitle = computed(() => {\n return router.currentRoute.value.query.currentIframeTitle;\n });\n const currentIframeShowClose = computed(() => {\n return router.currentRoute.value.query.currentIframeShowClose === '1';\n });\n const isFullScreen = computed(() => {\n return store.getters.isFullScreen;\n });\n const showHeader = computed(() => {\n return store.getters.showHeader;\n });\n const handleBack = () => {\n router.go(-1);\n };\n const handleClose = () => {\n router.replace({\n path: '/plugin',\n query: router.currentRoute.value.query\n });\n };\n const deviceStore = useDeviceStore();\n const envStore = useEnvStore();\n const isCurrentDeviceOnline = computed(() => {\n var _deviceStore$currentD;\n return ((_deviceStore$currentD = deviceStore.currentDeviceRef) === null || _deviceStore$currentD === void 0 ? void 0 : _deviceStore$currentD.runnerTaskRef.phase) === 'PHASE_TYPE_RUNNING';\n });\n let unwatchDeviceOffline = null;\n onMounted(async () => {\n document.title = currentIframeTitle.value || '更多';\n await deviceStore.untilDeviceReady();\n const {\n addListener,\n setIframeContentWindow,\n postDelegateReady,\n postDeviceOffline\n } = useRequestDelegate(deviceStore.currentDeviceRef.proxyFetch, {\n navigate: true\n });\n // 快鸟页面处理\n if (currentIframeUrl.value.startsWith(KUAINIAO_ORIGIN)) {\n const iframe = document.getElementById('plugin_loader');\n addListener();\n if (iframe) {\n iframe.onload = () => {\n if (iframe !== null && iframe !== void 0 && iframe.contentWindow) {\n setIframeContentWindow(iframe.contentWindow);\n postDelegateReady();\n console.log('DELEGATE_READY');\n }\n };\n }\n unwatchDeviceOffline = watch(isCurrentDeviceOnline, isOnline => {\n if (!isOnline) {\n postDeviceOffline();\n }\n });\n }\n });\n onBeforeUnmount(() => {\n const {\n removeListener\n } = useRequestDelegate(deviceStore.currentDeviceRef.proxyFetch, {\n navigate: true\n });\n removeListener();\n if (unwatchDeviceOffline && typeof unwatchDeviceOffline === 'function') {\n unwatchDeviceOffline();\n }\n });\n return (_ctx, _cache) => {\n return _openBlock(), _createElementBlock(\"div\", _hoisted_1, [currentIframeTitle.value && showHeader.value ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass([\"file-upload__header page-header\", {\n 'android-padding': _unref(isAndroidNative),\n 'ios-padding': _unref(envStore).isUseIOSHeader\n }])\n }, [_createElementVNode(\"a\", {\n href: \"javascript:;\",\n class: \"qh-icon-back\",\n title: \"返回\",\n onClick: handleBack\n }), _createElementVNode(\"h1\", null, _toDisplayString(currentIframeTitle.value), 1), currentIframeShowClose.value ? (_openBlock(), _createBlock(_unref(IconClose), {\n key: 0,\n onClick: handleClose\n })) : _createCommentVNode(\"\", true)], 2)) : _createCommentVNode(\"\", true), _createElementVNode(\"iframe\", {\n id: \"plugin_loader\",\n class: _normalizeClass([{\n 'show-full': !currentIframeTitle.value && isFullScreen.value,\n 'show-title-full': currentIframeTitle.value && isFullScreen.value,\n 'show-title': currentIframeTitle.value && !isFullScreen.value\n }, \"current-plugin-iframe\"]),\n src: currentIframeUrl.value,\n frameborder: \"0\",\n name: \"plugin_loader\"\n }, null, 10, _hoisted_2)]);\n };\n }\n});","/* unplugin-vue-components disabled */import script from \"./pluginIframe.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./pluginIframe.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./pluginIframe.vue?vue&type=style&index=0&id=6003300d&lang=scss&scoped=true\"\n\nimport exportComponent from \"/var/static/node_modules/.pnpm/vue-loader@16.8.3_@vue+compiler-sfc@3.3.4_vue@3.3.4_webpack@4.46.0/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6003300d\"]])\n\nexport default __exports__"],"sourceRoot":""}