v3-Xop4u8gK.mjs 811 B

12345678910111213141516171819202122
  1. import { hasInjectionContext, inject } from 'file:///Users/yuxin/local/code/ccdw-website/node_modules/.pnpm/vue@3.5.14_typescript@5.8.3/node_modules/vue/index.mjs';
  2. import { t as tryUseNuxtApp } from './server.mjs';
  3. import { u as useHead$1, h as headSymbol } from '../_/renderer.mjs';
  4. function injectHead(nuxtApp) {
  5. var _a;
  6. const nuxt = nuxtApp || tryUseNuxtApp();
  7. return ((_a = nuxt == null ? void 0 : nuxt.ssrContext) == null ? void 0 : _a.head) || (nuxt == null ? void 0 : nuxt.runWithContext(() => {
  8. if (hasInjectionContext()) {
  9. return inject(headSymbol);
  10. }
  11. }));
  12. }
  13. function useHead(input, options = {}) {
  14. const head = injectHead(options.nuxt);
  15. if (head) {
  16. return useHead$1(input, { head, ...options });
  17. }
  18. }
  19. export { useHead as u };
  20. //# sourceMappingURL=v3-Xop4u8gK.mjs.map