<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8" />
	<link rel="icon" href="/favicon.ico" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />

	<% if(!htmlWebpackPlugin.vite){%>
	<!--发布时 公共库-->
	<link rel="stylesheet" href="${serverPath}/render/assets_platform/element-ui/index.css">
	<script src="${serverPath}/render/assets_platform/vue/vue.min.js"></script>
	<script src="${serverPath}/render/assets_platform/vuex/vuex.min.js"></script>
	<script src="${serverPath}/render/assets_platform/vue-router/vue-router.min.js"></script>
	<script src="${serverPath}/render/assets_platform/element-ui/index.js"></script>
	<script src="${serverPath}/render/assets_platform/vendor_dll/vendor.dll.js"></script>
    <script src="${serverPath}/render/assets_platform/eap/eap.umd.min.js"></script>
	  
	<script type="text/javascript">
		// Don't register the service worker
		// until the page has fully loaded
		// Is service worker available?
		if ('serviceWorker' in navigator) {
			// 在页面加载时检查是否已经注册了 Service Worker
			navigator.serviceWorker.getRegistrations().then(function (registrations){
				var len = registrations.length;
				if (len > 0) {
					console.log('Service Worker already registered');
				} else {
					// 如果没有注册，那么进行注册
					window.addEventListener('load', function(){
						navigator.serviceWorker.register('/assets_platform/workbox3/sw.js',{scope:'/'})
							.then(registration => {
								console.log('Service Worker registered: ', registration);
							})
							.catch(error => {
								console.error('Service Worker registration failed: ', error);
							});
					});
				}
			});
		}
	</script>
	<!-- <script src="${serverPath}/render/admin/eap5csxm/setting/desktop/appsetting.js" type="text/javascript"></script>  
	<script src="${serverPath}/render/admin/eap5csxm/setting/studio/appsetting.js" type="text/javascript"></script>   
	<script src="/${projectName}/setting/studio/appsetting.js" type="text/javascript"></script>-->
	<script>
		HIVUI_SETTING = eap.mergeConfig({
			url:"${serverPath}",
    		projectName: "${projectName}/${devGroup}",
			}, 
			window.HIVUI_SETTING || {})
	</script>
	<%}%>
	
	<% if(htmlWebpackPlugin.vite){%>
	<!--预览时 公共库-->

    <link rel="stylesheet" href="/assets_platform/element-ui/index.css">
	<script src="/assets_platform/vue/vue.min.js"></script>
    <script src="/assets_platform/vuex/vuex.min.js"></script>
    <script src="/assets_platform/eap/eap.umd.min.js"></script>
	<!-- <script src="/eap5csxm/setting/desktop/development.js" type="text/javascript"></script> -->
	<script>
		HIVUI_SETTING = eap.mergeConfig({
			url:"<%=VITE_APP_BASE_API%>",
    		projectName: "<%=VITE_APP_PN%>",
			}, 
			window.HIVUI_SETTING || {})
	</script>
	<script src="/<%=htmlWebpackPlugin.project%>/setting/studio/appsetting.js" type="text/javascript"></script>
	<%}%>
	
	</head>

<body>
<div id="app">
</div>
	<% if(htmlWebpackPlugin.vite==true){%>
	<script type="module" src="/<%=htmlWebpackPlugin.project%>/hivuiStudio/index.js"></script>
	<%}%>
</body>

</html>