!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["style/custom-navbar-integrated-dark-mode"]=t():e["style/custom-navbar-integrated-dark-mode"]=t()}(globalThis,(()=>(()=>{var e,t,n={500:(e,t,n)=>{var r=n(904),o=n(955)(r);o.push([e.id,".navbar-integrated-dark-mode {\n display: flex;\n}\n.navbar-integrated-dark-mode svg {\n height: 18px;\n width: 18px;\n fill: currentColor;\n}","",{version:3,sources:["webpack://./registry/lib/plugins/style/custom-navbar-integrated-dark-mode/NavbarIntegratedDarkMode.vue"],names:[],mappings:"AAAA;EACE,aAAa;AACf;AACA;EACE,YAAY;EACZ,WAAW;EACX,kBAAkB;AACpB",sourcesContent:[".navbar-integrated-dark-mode {\n display: flex;\n}\n.navbar-integrated-dark-mode svg {\n height: 18px;\n width: 18px;\n fill: currentColor;\n}"],sourceRoot:""}]),e.exports=o},955:e=>{"use strict"; // eslint-disable-next-line func-names e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")}, // eslint-disable-next-line func-names t.i=function(e,n,r){"string"==typeof e&&( // eslint-disable-next-line no-param-reassign e=[[null,e,""]]);var o={};if(r)for(var a=0;a{"use strict";function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var r,o,a=[],i=!0,s=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(s)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{"use strict";var r,o=function(){return void 0===r&&( // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 // @see https://github.com/webpack-contrib/style-loader/issues/177 r=Boolean(window&&document&&document.all&&!window.atob)),r},a=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),i=[];function s(e){for(var t=-1,n=0;n{"use strict";n.r(t),n.d(t,{default:()=>p});var r=function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"navbar-integrated-dark-mode",attrs:{title:n.dark?"关闭深色模式":"开启深色模式"}},[n.dark?t("svg",{staticStyle:{width:"18px"},attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 47.96 47.96"}},[t("path",{attrs:{d:"M24,12A12,12,0,1,0,36,24,12,12,0,0,0,24,12Zm0,20a8,8,0,1,1,8-8A8,8,0,0,1,24,32Z"}}),e._v(" "),t("path",{attrs:{d:"M24,9a2,2,0,0,0,2-2V4a2,2,0,0,0-4,0V7A2,2,0,0,0,24,9Z"}}),e._v(" "),t("path",{attrs:{d:"M36,14a2,2,0,0,0,1.42-.59l2.12-2.12a2,2,0,1,0-2.83-2.83l-2.12,2.12A2,2,0,0,0,36,14Z"}}),e._v(" "),t("path",{attrs:{d:"M44,22H41a2,2,0,0,0,0,4h3a2,2,0,1,0,0-4Z"}}),e._v(" "),t("path",{attrs:{d:"M37.4,34.61a2,2,0,1,0-2.83,2.82l2.12,2.13a2,2,0,0,0,2.83-2.83Z"}}),e._v(" "),t("path",{attrs:{d:"M24,39a2,2,0,0,0-2,2v3a2,2,0,0,0,4,0V41A2,2,0,0,0,24,39Z"}}),e._v(" "),t("path",{attrs:{d:"M10.53,34.61,8.41,36.73a2,2,0,0,0,0,2.83,2,2,0,0,0,2.82,0l2.13-2.13a2,2,0,1,0-2.83-2.82Z"}}),e._v(" "),t("path",{attrs:{d:"M9,24a2,2,0,0,0-2-2H4a2,2,0,0,0,0,4H7A2,2,0,0,0,9,24Z"}}),e._v(" "),t("path",{attrs:{d:"M10.53,13.39a2,2,0,0,0,1.41.59,2,2,0,0,0,1.42-3.42L11.23,8.44a2,2,0,0,0-2.82,2.83Z"}})]):t("svg",{staticStyle:{width:"18px"},attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"}},[t("path",{attrs:{d:"M24.48,42.18A18.66,18.66,0,0,1,22.11,5,2,2,0,0,1,23.56,8.6,11.32,11.32,0,1,0,39.4,24.44,2,2,0,0,1,43,25.89,18.68,18.68,0,0,1,24.48,42.18ZM16.36,11.32A14.66,14.66,0,1,0,36.68,31.64,15.35,15.35,0,0,1,15,17.68,15.2,15.2,0,0,1,16.36,11.32Z"}})])])};r._withStripped=!0;const o=globalThis.Vue,a=coreApis.utils,i=(0,o.defineComponent)({__name:"NavbarIntegratedDarkMode",setup(e){const t=()=>"dark"===(0,a.getCookieValue)("theme_style"),n=(0,o.ref)(t()),r=e=>{e.changed.some((e=>"theme_style"===e.name))&&(n.value=t())};return cookieStore.addEventListener("change",r),(0,o.onBeforeUnmount)((()=>{cookieStore.removeEventListener("change",r)})),{__sfc:!0,isOfficialDarkModeEnabled:t,dark:n,cookieChangeHandler:r}}});var s=n(991),c=n.n(s),d=n(500),l=n.n(d),u={insert:"head",singleton:!1};c()(l(),u);l().locals;var f=function(e,t,n,r,o,a,i,s){var c,d="function"==typeof e?e.options:e;if(t&&(d.render=t,d.staticRenderFns=n,d._compiled=!0),r&&(d.functional=!0),a&&(d._scopeId="data-v-"+a),i?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(i)},d._ssrRegister=c):o&&(c=s?function(){o.call(this,(d.functional?this.parent:this).$root.$options.shadowRoot)}:o),c)if(d.functional){d._injectStyles=c;var l=d.render;d.render=function(e,t){return c.call(t),l(e,t)}}else{var u=d.beforeCreate;d.beforeCreate=u?[].concat(u,c):[c]}return{exports:e,options:d}}(i,r,[],!1,null,null,null);const p=f.exports},441:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=441,e.exports=t},202:e=>{"use strict";e.exports="为自定义顶栏添加一个深色模式开关, 方便快速切换深色模式. (请注意和夜间模式区分; 受限于 b 站深色模式实现, 这个开关无法实时切换, 会刷新页面)\n"}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={id:e,exports:{}};return n[e](a,a.exports,o),a.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var a=Object.create(null);o.r(a);var i={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&n;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>i[e]=()=>n[e]));return i.default=()=>n,o.d(a,i),a},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0;var a={};return(()=>{"use strict";o.d(a,{plugin:()=>e});const e={name:"customNavbar.items.integratedDarkMode",displayName:"自定义顶栏 - 深色模式开关",async setup(e){let{addData:t}=e;t("customNavbar.items",(e=>{e.push({name:"integratedDarkMode",displayName:"深色模式开关",content:()=>Promise.resolve().then(o.bind(o,314)),clickAction:async()=>{(e=>{cookieStore.set({name:"theme_style",value:e,path:"/",expires:Date.now()+31536e6,domain:"bilibili.com"})})("dark"===((await cookieStore.get("theme_style"))?.value??"light")?"light":"dark"),location.reload()}})}))},commitHash:"67ecd077be475ede303d3b326c5c7344a6ca3fa5",coreVersion:"2.11.5",description:(()=>{const e=o(441);return{...Object.fromEntries(e.keys().map((t=>[t.match(/index\.(.+)\.md$/)[1],e(t)]))),"zh-CN":()=>Promise.resolve().then(o.t.bind(o,202,17)).then((e=>e.default))}})()}})(),a=a.plugin})())); //# sourceMappingURL=https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/registry/dist/plugins/style/custom-navbar-integrated-dark-mode.js.map