@networkpro/web 1.12.9 → 1.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/CHANGELOG.md +65 -1
  2. package/README.md +26 -18
  3. package/cspell.json +1 -0
  4. package/eslint.config.mjs +48 -48
  5. package/netlify/edge-functions/csp-report.js +31 -31
  6. package/package.json +3 -3
  7. package/playwright.config.js +14 -14
  8. package/postcss.config.mjs +1 -1
  9. package/scripts/auditScripts.js +16 -16
  10. package/scripts/bundleCss.js +5 -5
  11. package/scripts/checkEnv.js +6 -6
  12. package/scripts/checkNode.js +10 -10
  13. package/scripts/checkVersions.js +6 -6
  14. package/scripts/flattenHeaders.js +13 -13
  15. package/scripts/generateTest.js +5 -5
  16. package/scripts/openReport.js +3 -3
  17. package/scripts/validateHeaders.js +13 -13
  18. package/src/app.html +0 -9
  19. package/src/hooks.client.ts +1 -1
  20. package/src/hooks.server.js +31 -32
  21. package/src/lib/components/Badges.svelte +10 -10
  22. package/src/lib/components/CodeBlock.svelte +1 -1
  23. package/src/lib/components/ContainerSection.svelte +1 -1
  24. package/src/lib/components/FullWidthSection.svelte +3 -3
  25. package/src/lib/components/LegalNav.svelte +7 -7
  26. package/src/lib/components/Logo.svelte +9 -9
  27. package/src/lib/components/MetaTags.svelte +4 -4
  28. package/src/lib/components/PWAInstallButton.svelte +4 -4
  29. package/src/lib/components/RedirectPage.svelte +4 -4
  30. package/src/lib/components/SocialMedia.svelte +16 -16
  31. package/src/lib/components/foss/FossItemContent.svelte +27 -58
  32. package/src/lib/components/foss/ObtainiumBlock.svelte +64 -0
  33. package/src/lib/components/layout/Footer.svelte +18 -18
  34. package/src/lib/components/layout/HeaderDefault.svelte +16 -16
  35. package/src/lib/components/layout/HeaderHome.svelte +14 -14
  36. package/src/lib/data/fossData.js +22 -10
  37. package/src/lib/images.js +34 -34
  38. package/src/lib/img/obtainium.png +0 -0
  39. package/src/lib/img/obtainium.webp +0 -0
  40. package/src/lib/index.js +15 -15
  41. package/src/lib/meta.js +29 -29
  42. package/src/lib/pages/AboutContent.svelte +24 -24
  43. package/src/lib/pages/FossContent.svelte +13 -13
  44. package/src/lib/pages/HomeContent.svelte +7 -7
  45. package/src/lib/pages/LicenseContent.svelte +39 -39
  46. package/src/lib/pages/PGPContent.svelte +23 -23
  47. package/src/lib/pages/PrivacyContent.svelte +39 -39
  48. package/src/lib/pages/PrivacyDashboard.svelte +12 -12
  49. package/src/lib/pages/TermsConditionsContent.svelte +29 -29
  50. package/src/lib/pages/TermsUseContent.svelte +26 -26
  51. package/src/lib/registerServiceWorker.js +25 -25
  52. package/src/lib/stores/posthog.js +13 -13
  53. package/src/lib/stores/trackingPreferences.js +19 -19
  54. package/src/lib/styles/css/default.css +30 -0
  55. package/src/lib/styles/global.min.css +1 -1
  56. package/src/lib/types/fossTypes.js +9 -2
  57. package/src/lib/unregisterServiceWorker.js +1 -1
  58. package/src/lib/utils/purify.js +4 -4
  59. package/src/lib/utils/utm.js +2 -2
  60. package/src/routes/+error.svelte +4 -4
  61. package/src/routes/+layout.js +6 -6
  62. package/src/routes/+layout.svelte +29 -29
  63. package/src/routes/+page.server.js +2 -2
  64. package/src/routes/+page.svelte +9 -9
  65. package/src/routes/about/+page.server.js +2 -2
  66. package/src/routes/about/+page.svelte +7 -7
  67. package/src/routes/api/mock-csp/+server.js +3 -3
  68. package/src/routes/consultation/+page.svelte +5 -5
  69. package/src/routes/contact/+page.svelte +5 -5
  70. package/src/routes/foss-spotlight/+page.server.js +2 -2
  71. package/src/routes/foss-spotlight/+page.svelte +7 -7
  72. package/src/routes/license/+page.server.js +2 -2
  73. package/src/routes/license/+page.svelte +7 -7
  74. package/src/routes/pgp/+page.server.js +2 -2
  75. package/src/routes/pgp/+page.svelte +7 -7
  76. package/src/routes/pgp/[key]/+server.js +9 -9
  77. package/src/routes/privacy/+page.server.js +2 -2
  78. package/src/routes/privacy/+page.svelte +7 -7
  79. package/src/routes/privacy-dashboard/+page.server.js +2 -2
  80. package/src/routes/privacy-dashboard/+page.svelte +8 -8
  81. package/src/routes/privacy-rights/+page.svelte +5 -5
  82. package/src/routes/status/+page.server.js +2 -2
  83. package/src/routes/terms-conditions/+page.server.js +2 -2
  84. package/src/routes/terms-conditions/+page.svelte +7 -7
  85. package/src/routes/terms-of-use/+page.server.js +2 -2
  86. package/src/routes/terms-of-use/+page.svelte +7 -7
  87. package/src/service-worker.js +86 -86
  88. package/static/bin/heliboard.json +8 -0
  89. package/static/disableSw.js +2 -2
  90. package/static/offline.html +7 -7
  91. package/stylelint.config.js +56 -56
  92. package/svelte.config.js +6 -6
  93. package/tests/e2e/app.spec.js +27 -27
  94. package/tests/e2e/mobile.spec.js +18 -18
  95. package/tests/e2e/shared/helpers.js +4 -4
  96. package/tests/internal/auditCoverage.test.js +24 -24
  97. package/tests/unit/checkEnv.test.js +10 -10
  98. package/tests/unit/checkVersions.test.js +4 -4
  99. package/tests/unit/csp-report.test.js +24 -24
  100. package/tests/unit/demo.test.js +3 -3
  101. package/tests/unit/lib/utils/purify.test.js +12 -12
  102. package/tests/unit/routes/page.svelte.test.js +10 -10
  103. package/tests/unit/unregisterServiceWorker.test.js +5 -5
  104. package/tests/unit/utm.test.js +13 -13
  105. package/vite.config.js +5 -5
  106. package/vitest-setup-client.js +4 -4
  107. package/vitest.config.client.js +15 -15
  108. package/vitest.config.server.js +13 -13
@@ -9,13 +9,13 @@ This file is part of Network Pro.
9
9
  <!-- cspell:ignore tandc -->
10
10
 
11
11
  <script>
12
- import { base } from "$app/paths";
13
- import { CONSTANTS } from "$lib";
12
+ import { base } from '$app/paths';
13
+ import { CONSTANTS } from '$lib';
14
14
 
15
15
  // Log the base path to verify its value
16
16
  //console.log("Base path:", base);
17
17
 
18
- console.log(CONSTANTS.COMPANY_INFO.APP_NAME);
18
+ //console.log(CONSTANTS.COMPANY_INFO.APP_NAME);
19
19
 
20
20
  const { COMPANY_INFO, PAGE, NAV } = CONSTANTS;
21
21
 
@@ -29,7 +29,7 @@ This file is part of Network Pro.
29
29
  * Markdown version of the Terms and Conditions document
30
30
  * @type {string}
31
31
  */
32
- const tandcLink = "https://docs.netwk.pro/terms-conditions";
32
+ const tandcLink = 'https://docs.netwk.pro/terms-conditions';
33
33
 
34
34
  /**
35
35
  * Common constants used throughout the component
@@ -39,8 +39,8 @@ This file is part of Network Pro.
39
39
  * }}
40
40
  */
41
41
  const constants = {
42
- effectiveDate: "May 8, 2025",
43
- classSmall: "small-text",
42
+ effectiveDate: 'May 8, 2025',
43
+ classSmall: 'small-text',
44
44
  };
45
45
 
46
46
  /**
@@ -48,17 +48,17 @@ This file is part of Network Pro.
48
48
  * @type {Array<{id: string, text: string}>}
49
49
  */
50
50
  const tocLinks = [
51
- { id: "intro", text: "Introduction" },
52
- { id: "scope", text: "Scope of Services" },
53
- { id: "warranties", text: "Disclaimer of Warranties" },
54
- { id: "risk", text: "Assumption of Risk" },
55
- { id: "liability", text: "Limitation of Liability" },
56
- { id: "indemnify", text: "Indemnification" },
57
- { id: "client", text: "Client Responsibilities" },
58
- { id: "law", text: "Governing Law and Jurisdiction" },
59
- { id: "accept", text: "Acceptance of Terms" },
60
- { id: "exceptions", text: "Exceptions and Negotiations" },
61
- { id: "changes", text: "Changes to These Terms" },
51
+ { id: 'intro', text: 'Introduction' },
52
+ { id: 'scope', text: 'Scope of Services' },
53
+ { id: 'warranties', text: 'Disclaimer of Warranties' },
54
+ { id: 'risk', text: 'Assumption of Risk' },
55
+ { id: 'liability', text: 'Limitation of Liability' },
56
+ { id: 'indemnify', text: 'Indemnification' },
57
+ { id: 'client', text: 'Client Responsibilities' },
58
+ { id: 'law', text: 'Governing Law and Jurisdiction' },
59
+ { id: 'accept', text: 'Acceptance of Terms' },
60
+ { id: 'exceptions', text: 'Exceptions and Negotiations' },
61
+ { id: 'changes', text: 'Changes to These Terms' },
62
62
  ];
63
63
  </script>
64
64
 
@@ -90,7 +90,7 @@ This file is part of Network Pro.
90
90
  <h2>Table of Contents</h2>
91
91
  <ol>
92
92
  {#each tocLinks as link}
93
- <li><a href={"#" + link.id}>{link.text}</a></li>
93
+ <li><a href={'#' + link.id}>{link.text}</a></li>
94
94
  {/each}
95
95
  </ol>
96
96
  </nav>
@@ -123,7 +123,7 @@ This file is part of Network Pro.
123
123
  <section id={link.id}>
124
124
  <h2>{i + 1}. {link.text}</h2>
125
125
 
126
- {#if link.id === "intro"}
126
+ {#if link.id === 'intro'}
127
127
  <p>
128
128
  By engaging with the information security, network security,
129
129
  cybersecurity, and digital privacy consulting and implementation
@@ -135,7 +135,7 @@ This file is part of Network Pro.
135
135
  </strong>
136
136
  If you do not agree to these Terms, please do not engage our services.
137
137
  </p>
138
- {:else if link.id === "scope"}
138
+ {:else if link.id === 'scope'}
139
139
  <p>
140
140
  These Terms apply to all consulting and implementation services offered
141
141
  by the Company, including but not limited to assessment, planning, risk
@@ -147,7 +147,7 @@ This file is part of Network Pro.
147
147
  when applicable.
148
148
  </strong>
149
149
  </p>
150
- {:else if link.id === "warranties"}
150
+ {:else if link.id === 'warranties'}
151
151
  <p>
152
152
  All services are provided "as is" and "as available" without warranties
153
153
  of any kind, whether express, implied, statutory, or otherwise. The
@@ -157,7 +157,7 @@ This file is part of Network Pro.
157
157
  will detect or prevent all security threats or achieve legal or
158
158
  regulatory compliance unless specifically agreed in writing.
159
159
  </p>
160
- {:else if link.id === "risk"}
160
+ {:else if link.id === 'risk'}
161
161
  <p>
162
162
  Client acknowledges that cybersecurity and privacy-related services
163
163
  inherently involve risk. The Company does not guarantee uninterrupted
@@ -166,7 +166,7 @@ This file is part of Network Pro.
166
166
  our recommendations and agrees to maintain appropriate internal controls
167
167
  and backup protocols.
168
168
  </p>
169
- {:else if link.id === "liability"}
169
+ {:else if link.id === 'liability'}
170
170
  <p>
171
171
  To the maximum extent permitted by law, the Company shall not be liable
172
172
  for any indirect, incidental, consequential, special, or punitive
@@ -176,7 +176,7 @@ This file is part of Network Pro.
176
176
  such damages. Direct damages, if any, shall be limited to the amount
177
177
  paid by Client for the specific services giving rise to the claim.
178
178
  </p>
179
- {:else if link.id === "indemnify"}
179
+ {:else if link.id === 'indemnify'}
180
180
  <p>
181
181
  Client agrees to indemnify, defend, and hold harmless the Company, its
182
182
  officers, employees, contractors, and affiliates from and against any
@@ -185,7 +185,7 @@ This file is part of Network Pro.
185
185
  services, (ii) misconfiguration of systems by Client, or (iii)
186
186
  third-party claims related to services rendered under these Terms.
187
187
  </p>
188
- {:else if link.id === "client"}
188
+ {:else if link.id === 'client'}
189
189
  <p>
190
190
  <strong>
191
191
  Client shall provide valid, secure, and licensed infrastructure,
@@ -197,7 +197,7 @@ This file is part of Network Pro.
197
197
  with any regulatory frameworks (e.g., HIPAA, GDPR, PCI-DSS) is the sole responsibility
198
198
  of the Client unless explicitly agreed otherwise in a separate written agreement.
199
199
  </p>
200
- {:else if link.id === "law"}
200
+ {:else if link.id === 'law'}
201
201
  <p>
202
202
  These Terms shall be governed by and construed under the laws of the
203
203
  State of Arizona and applicable U.S. federal laws. Any disputes shall be
@@ -205,14 +205,14 @@ This file is part of Network Pro.
205
205
  County, Arizona, and both parties consent to such jurisdiction and
206
206
  venue.
207
207
  </p>
208
- {:else if link.id === "accept"}
208
+ {:else if link.id === 'accept'}
209
209
  <p>
210
210
  Engagement with the Company's services constitutes acceptance of these
211
211
  Terms. Continued use of services after any updates indicates continued
212
212
  acceptance. These Terms are effective unless and until terminated or
213
213
  modified in writing by mutual agreement.
214
214
  </p>
215
- {:else if link.id === "exceptions"}
215
+ {:else if link.id === 'exceptions'}
216
216
  <p>
217
217
  <strong>
218
218
  The Company is open to negotiating specific terms upon mutual
@@ -222,7 +222,7 @@ This file is part of Network Pro.
222
222
  parties. Flexibility may be offered provided such changes do not impose undue
223
223
  liability or regulatory obligations on the Company.
224
224
  </p>
225
- {:else if link.id === "changes"}
225
+ {:else if link.id === 'changes'}
226
226
  <p>
227
227
  The Company reserves the right to revise these Terms at any time.
228
228
  Updated versions will be posted on our website or delivered via direct
@@ -9,8 +9,8 @@ This file is part of Network Pro.
9
9
  <!-- cspell:ignore tandc -->
10
10
 
11
11
  <script>
12
- import { base } from "$app/paths";
13
- import { CONSTANTS } from "$lib";
12
+ import { base } from '$app/paths';
13
+ import { CONSTANTS } from '$lib';
14
14
 
15
15
  // Log the base path to verify its value
16
16
  //console.log("Base path:", base);
@@ -41,23 +41,23 @@ This file is part of Network Pro.
41
41
  * Markdown version of the Terms of Use document
42
42
  * @type {string}
43
43
  */
44
- const termsLink = "https://docs.netwk.pro/terms-use";
44
+ const termsLink = 'https://docs.netwk.pro/terms-use';
45
45
 
46
46
  /**
47
47
  * Table of Contents Links
48
48
  * @type {{ id: string, text: string }[]}
49
49
  */
50
50
  const tocLinks = [
51
- { id: "introduction", text: "Introduction" },
52
- { id: "platforms", text: "Platforms Covered" },
53
- { id: "acceptable-use", text: "Acceptable Use" },
54
- { id: "warranty", text: "Disclaimer of Warranties" },
55
- { id: "risk", text: "Assumption of Risk" },
56
- { id: "liability", text: "Limitation of Liability" },
57
- { id: "indemnification", text: "Indemnification" },
58
- { id: "jurisdiction", text: "Governing Law and Jurisdiction" },
59
- { id: "acceptance", text: "Acceptance of Terms" },
60
- { id: "changes", text: "Changes to This Policy" },
51
+ { id: 'introduction', text: 'Introduction' },
52
+ { id: 'platforms', text: 'Platforms Covered' },
53
+ { id: 'acceptable-use', text: 'Acceptable Use' },
54
+ { id: 'warranty', text: 'Disclaimer of Warranties' },
55
+ { id: 'risk', text: 'Assumption of Risk' },
56
+ { id: 'liability', text: 'Limitation of Liability' },
57
+ { id: 'indemnification', text: 'Indemnification' },
58
+ { id: 'jurisdiction', text: 'Governing Law and Jurisdiction' },
59
+ { id: 'acceptance', text: 'Acceptance of Terms' },
60
+ { id: 'changes', text: 'Changes to This Policy' },
61
61
  ];
62
62
 
63
63
  /**
@@ -65,8 +65,8 @@ This file is part of Network Pro.
65
65
  * @type {{ effectiveDate: string, classSmall: string }}
66
66
  */
67
67
  const constants = {
68
- effectiveDate: "May 21, 2025",
69
- classSmall: "small-text",
68
+ effectiveDate: 'May 21, 2025',
69
+ classSmall: 'small-text',
70
70
  };
71
71
  </script>
72
72
 
@@ -99,7 +99,7 @@ This file is part of Network Pro.
99
99
  <h3>Table of Contents</h3>
100
100
  <ol>
101
101
  {#each tocLinks as link}
102
- <li><a href={"#" + link.id}>{link.text}</a></li>
102
+ <li><a href={'#' + link.id}>{link.text}</a></li>
103
103
  {/each}
104
104
  </ol>
105
105
  </nav>
@@ -130,14 +130,14 @@ This file is part of Network Pro.
130
130
  <section id={link.id}>
131
131
  <h2>{i + 1}. {link.text}</h2>
132
132
 
133
- {#if link.id === "introduction"}
133
+ {#if link.id === 'introduction'}
134
134
  <p>
135
135
  Welcome! By accessing or using any of the platforms operated by {COMPANY_INFO.NAME}
136
136
  ("Company," "we," "us," or "our"), you agree to be bound by these Terms of
137
137
  Use ("Terms"). If you do not agree to these Terms, please refrain from using
138
138
  our services.
139
139
  </p>
140
- {:else if link.id === "platforms"}
140
+ {:else if link.id === 'platforms'}
141
141
  <p>
142
142
  These Terms of Use apply to all platforms associated with the Company,
143
143
  including but not limited to:
@@ -148,7 +148,7 @@ This file is part of Network Pro.
148
148
  platforms).
149
149
  </strong>
150
150
  </p>
151
- {:else if link.id === "acceptable-use"}
151
+ {:else if link.id === 'acceptable-use'}
152
152
  <p>
153
153
  You agree not to use our platforms or services to engage in conduct that
154
154
  is
@@ -164,7 +164,7 @@ This file is part of Network Pro.
164
164
  <li>Violating third-party rights or laws</li>
165
165
  <li>Interfering with platform functionality or availability</li>
166
166
  </ul>
167
- {:else if link.id === "warranty"}
167
+ {:else if link.id === 'warranty'}
168
168
  <p>
169
169
  Our platforms and services are provided "as is" and "as available,"
170
170
  without any express or implied warranties. We make no guarantees
@@ -172,7 +172,7 @@ This file is part of Network Pro.
172
172
  disclaimer does not apply to our consulting and implementation services,
173
173
  nor any payment portals or associated services.
174
174
  </p>
175
- {:else if link.id === "risk"}
175
+ {:else if link.id === 'risk'}
176
176
  <p>
177
177
  Your use of our platforms is at your own risk. We do not guarantee the
178
178
  security, integrity, or reliability of data stored on external or
@@ -180,7 +180,7 @@ This file is part of Network Pro.
180
180
  consulting and implementation services, nor any payment portals or
181
181
  associated services.
182
182
  </p>
183
- {:else if link.id === "liability"}
183
+ {:else if link.id === 'liability'}
184
184
  <p>
185
185
  To the fullest extent permitted by law, the Company, its affiliates,
186
186
  owners, operators, and contributors shall not be liable for any direct,
@@ -188,14 +188,14 @@ This file is part of Network Pro.
188
188
  not limited to data loss, loss of profits, or damages arising from
189
189
  reliance on or use of our platforms.
190
190
  </p>
191
- {:else if link.id === "indemnification"}
191
+ {:else if link.id === 'indemnification'}
192
192
  <p>
193
193
  You agree to indemnify, defend, and hold harmless the Company, its
194
194
  affiliates, owners, operators, and contributors from any claims,
195
195
  damages, liabilities, losses, or expenses (including legal fees) arising
196
196
  from or related to your use of our services.
197
197
  </p>
198
- {:else if link.id === "jurisdiction"}
198
+ {:else if link.id === 'jurisdiction'}
199
199
  <p>
200
200
  {COMPANY_INFO.NAME} is based in Maricopa County, Arizona. Any legal action
201
201
  or dispute arising from these Terms of Use shall be subject to the exclusive
@@ -204,13 +204,13 @@ This file is part of Network Pro.
204
204
  <strong>Arizona Revised Statutes (A.R.S.)</strong> and applicable
205
205
  provisions of the <strong>United States Code (U.S.C.)</strong>.
206
206
  </p>
207
- {:else if link.id === "acceptance"}
207
+ {:else if link.id === 'acceptance'}
208
208
  <p>
209
209
  By accessing or using our platforms, you acknowledge and agree to these
210
210
  Terms of Use. Continued use of our services constitutes ongoing
211
211
  acceptance of these Terms.
212
212
  </p>
213
- {:else if link.id === "changes"}
213
+ {:else if link.id === 'changes'}
214
214
  <p>
215
215
  We may update these Terms of Use periodically. Updates will be posted on
216
216
  this page with an updated effective date and will reflect any relevant
@@ -14,16 +14,16 @@ This file is part of Network Pro.
14
14
  * and PWA behavior.
15
15
  */
16
16
  export function registerServiceWorker() {
17
- const disableSW = window?.__DISABLE_SW__ || location.search.includes("nosw");
17
+ const disableSW = window?.__DISABLE_SW__ || location.search.includes('nosw');
18
18
 
19
19
  if (disableSW) {
20
- console.warn("⚠️ Service Worker registration disabled via diagnostic mode.");
20
+ console.warn('⚠️ Service Worker registration disabled via diagnostic mode.');
21
21
 
22
- if ("serviceWorker" in navigator) {
22
+ if ('serviceWorker' in navigator) {
23
23
  navigator.serviceWorker.getRegistrations().then((registrations) => {
24
24
  registrations.forEach((reg) =>
25
25
  reg.unregister().then((success) => {
26
- console.log("🧹 SW unregistered from registerServiceWorker.js:", success);
26
+ console.log('🧹 SW unregistered from registerServiceWorker.js:', success);
27
27
  })
28
28
  );
29
29
  });
@@ -32,51 +32,51 @@ export function registerServiceWorker() {
32
32
  return;
33
33
  }
34
34
 
35
- if ("serviceWorker" in navigator) {
36
- const isFirefox = navigator.userAgent.includes("Firefox");
35
+ if ('serviceWorker' in navigator) {
36
+ const isFirefox = navigator.userAgent.includes('Firefox');
37
37
  const isDevelopment =
38
- location.hostname === "localhost" || location.hostname === "127.0.0.1";
38
+ location.hostname === 'localhost' || location.hostname === '127.0.0.1';
39
39
 
40
40
  if (isFirefox && isDevelopment) {
41
- console.log("🛑 SW registration skipped in Firefox development mode");
41
+ console.log('🛑 SW registration skipped in Firefox development mode');
42
42
  return;
43
43
  }
44
44
 
45
- window.addEventListener("load", () => {
45
+ window.addEventListener('load', () => {
46
46
  navigator.serviceWorker
47
- .register("service-worker.js")
47
+ .register('service-worker.js')
48
48
  .then((registration) => {
49
- console.log("✅ Service Worker registered with scope:", registration.scope);
49
+ console.log('✅ Service Worker registered with scope:', registration.scope);
50
50
 
51
51
  // 🧼 Manual cleanup of unexpected caches
52
52
  caches.keys().then((keys) => {
53
53
  keys.forEach((key) => {
54
- if (!key.startsWith("cache-")) {
55
- console.log("🧹 Deleting unexpected cache:", key);
54
+ if (!key.startsWith('cache-')) {
55
+ console.log('🧹 Deleting unexpected cache:', key);
56
56
  caches.delete(key);
57
57
  }
58
58
  });
59
59
  });
60
60
 
61
- registration.addEventListener("updatefound", () => {
61
+ registration.addEventListener('updatefound', () => {
62
62
  const newWorker = registration.installing;
63
- console.log("[SW-CLIENT] New service worker installing...");
63
+ console.log('[SW-CLIENT] New service worker installing...');
64
64
 
65
65
  if (!newWorker) return;
66
66
 
67
67
  let updatePrompted = false;
68
68
 
69
- newWorker.addEventListener("statechange", () => {
70
- console.log("[SW-CLIENT] New worker state:", newWorker.state);
69
+ newWorker.addEventListener('statechange', () => {
70
+ console.log('[SW-CLIENT] New worker state:', newWorker.state);
71
71
 
72
72
  if (
73
- newWorker.state === "installed" &&
73
+ newWorker.state === 'installed' &&
74
74
  navigator.serviceWorker.controller &&
75
75
  !updatePrompted
76
76
  ) {
77
77
  updatePrompted = true;
78
- console.log("[SW-CLIENT] New SW installed. Prompting user to reload.");
79
- if (confirm("New content is available. Reload to update?")) {
78
+ console.log('[SW-CLIENT] New SW installed. Prompting user to reload.');
79
+ if (confirm('New content is available. Reload to update?')) {
80
80
  window.location.reload();
81
81
  }
82
82
  }
@@ -84,22 +84,22 @@ export function registerServiceWorker() {
84
84
  });
85
85
  })
86
86
  .catch((error) => {
87
- console.error("❌ Service Worker registration failed:", error);
87
+ console.error('❌ Service Worker registration failed:', error);
88
88
  });
89
89
 
90
90
  let refreshing = false;
91
- navigator.serviceWorker.addEventListener("controllerchange", () => {
92
- console.log("[SW-CLIENT] Controller changed.");
91
+ navigator.serviceWorker.addEventListener('controllerchange', () => {
92
+ console.log('[SW-CLIENT] Controller changed.');
93
93
  if (!refreshing) {
94
94
  refreshing = true;
95
95
  window.location.reload();
96
96
  }
97
97
  });
98
98
 
99
- window.addEventListener("beforeinstallprompt", (e) => {
99
+ window.addEventListener('beforeinstallprompt', (e) => {
100
100
  e.preventDefault();
101
101
  window.dispatchEvent(
102
- new CustomEvent("pwa-install-available", {
102
+ new CustomEvent('pwa-install-available', {
103
103
  detail: /** @type {BeforeInstallPromptEvent} */ (e),
104
104
  }),
105
105
  );
@@ -14,8 +14,8 @@ SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
14
14
  import {
15
15
  remindUserToReconsent,
16
16
  trackingPreferences,
17
- } from "$lib/stores/trackingPreferences.js";
18
- import { get, writable } from "svelte/store";
17
+ } from '$lib/stores/trackingPreferences.js';
18
+ import { get, writable } from 'svelte/store';
19
19
 
20
20
  /**
21
21
  * Tracks whether tracking is allowed based on cookies, DNT/GPC, and user preference.
@@ -41,7 +41,7 @@ let ph = null;
41
41
  * @returns {Promise<void>}
42
42
  */
43
43
  export async function initPostHog() {
44
- if (initialized || typeof window === "undefined") return;
44
+ if (initialized || typeof window === 'undefined') return;
45
45
  initialized = true;
46
46
 
47
47
  const { enabled } = get(trackingPreferences);
@@ -49,32 +49,32 @@ export async function initPostHog() {
49
49
  showReminder.set(get(remindUserToReconsent)); // ✅ use derived store instead
50
50
 
51
51
  if (!enabled) {
52
- console.log("[PostHog] Tracking is disabled — skipping init.");
52
+ console.log('[PostHog] Tracking is disabled — skipping init.');
53
53
  return;
54
54
  }
55
55
 
56
- const posthogModule = await import("posthog-js");
56
+ const posthogModule = await import('posthog-js');
57
57
  ph = posthogModule.default;
58
58
 
59
59
  // cspell:disable-next-line
60
- ph.init("phc_Qshfo6AXzh4pS7aPigfqyeo4qj1qlyh7gDuHDeVMSR0", {
61
- api_host: "https://us.i.posthog.com",
60
+ ph.init('phc_Qshfo6AXzh4pS7aPigfqyeo4qj1qlyh7gDuHDeVMSR0', {
61
+ api_host: 'https://us.i.posthog.com',
62
62
  autocapture: true,
63
63
  capture_pageview: false,
64
- person_profiles: "identified_only",
64
+ person_profiles: 'identified_only',
65
65
  loaded: (phInstance) => {
66
66
  if (!enabled) {
67
67
  console.log(
68
- "[PostHog] ⛔ User opted out — calling opt_out_capturing()",
68
+ '[PostHog] ⛔ User opted out — calling opt_out_capturing()',
69
69
  );
70
70
  phInstance.opt_out_capturing();
71
71
  } else {
72
- console.log("[PostHog] ✅ Tracking enabled");
72
+ console.log('[PostHog] ✅ Tracking enabled');
73
73
  }
74
74
  },
75
75
  });
76
76
 
77
- ph.capture("$pageview");
77
+ ph.capture('$pageview');
78
78
  }
79
79
 
80
80
  /**
@@ -105,8 +105,8 @@ export function identify(id, properties = {}) {
105
105
  * @returns {void}
106
106
  */
107
107
  export function _resetPostHog() {
108
- if (import.meta.env.MODE === "production") {
109
- console.warn("[PostHog] _resetPostHog() called in production — no-op");
108
+ if (import.meta.env.MODE === 'production') {
109
+ console.warn('[PostHog] _resetPostHog() called in production — no-op');
110
110
  return;
111
111
  }
112
112
 
@@ -19,8 +19,8 @@ This file is part of Network Pro.
19
19
  * @module src/lib/stores
20
20
  */
21
21
 
22
- import { browser } from "$app/environment";
23
- import { derived, writable } from "svelte/store";
22
+ import { browser } from '$app/environment';
23
+ import { derived, writable } from 'svelte/store';
24
24
 
25
25
  /**
26
26
  * @typedef {object} TrackingState
@@ -36,7 +36,7 @@ import { derived, writable } from "svelte/store";
36
36
  * @returns {string} Raw document.cookie or empty string (SSR-safe)
37
37
  */
38
38
  function readCookies() {
39
- return browser ? document.cookie || "" : "";
39
+ return browser ? document.cookie || '' : '';
40
40
  }
41
41
 
42
42
  /**
@@ -96,7 +96,7 @@ function removeConsentTimestamp() {
96
96
  function getPrivacySignals() {
97
97
  if (!browser) return { dnt: false, gpc: false };
98
98
 
99
- const dnt = navigator.doNotTrack === "1";
99
+ const dnt = navigator.doNotTrack === '1';
100
100
  // @ts-expect-error: Non-standard GPC property
101
101
  const gpc = navigator.globalPrivacyControl === true;
102
102
 
@@ -112,18 +112,18 @@ function getPrivacySignals() {
112
112
  * @returns {string}
113
113
  */
114
114
  function deriveStatus({ optedOut, optedIn, dnt, gpc }) {
115
- if (optedOut) return "🔒 Tracking disabled (manual opt-out)";
116
- if (optedIn) return "✅ Tracking enabled (manual opt-in)";
117
- if (dnt || gpc) return "🛑 Tracking disabled (via browser signal)";
118
- return "⚙️ Using default settings (tracking enabled)";
115
+ if (optedOut) return '🔒 Tracking disabled (manual opt-out)';
116
+ if (optedIn) return '✅ Tracking enabled (manual opt-in)';
117
+ if (dnt || gpc) return '🛑 Tracking disabled (via browser signal)';
118
+ return '⚙️ Using default settings (tracking enabled)';
119
119
  }
120
120
 
121
121
  /**
122
122
  * @returns {TrackingState}
123
123
  */
124
124
  function computePreferences() {
125
- const optedOut = cookieExists("disable_tracking");
126
- const optedIn = cookieExists("enable_tracking");
125
+ const optedOut = cookieExists('disable_tracking');
126
+ const optedIn = cookieExists('enable_tracking');
127
127
  const { dnt, gpc } = getPrivacySignals();
128
128
 
129
129
  const enabled = optedIn || (!optedOut && !dnt && !gpc);
@@ -143,7 +143,7 @@ export const trackingPreferences = writable(
143
143
  dnt: false,
144
144
  gpc: false,
145
145
  enabled: false,
146
- status: "⏳ Checking tracking preferences...",
146
+ status: '⏳ Checking tracking preferences...',
147
147
  },
148
148
  );
149
149
 
@@ -154,8 +154,8 @@ export const trackingPreferences = writable(
154
154
  function hasUserManuallySetTrackingPreference() {
155
155
  const cookies = readCookies();
156
156
  return (
157
- cookies.includes("enable_tracking=true") ||
158
- cookies.includes("disable_tracking=true")
157
+ cookies.includes('enable_tracking=true') ||
158
+ cookies.includes('disable_tracking=true')
159
159
  );
160
160
  }
161
161
 
@@ -193,8 +193,8 @@ export function refreshTrackingPreferences() {
193
193
  * @returns {void}
194
194
  */
195
195
  export function setOptIn() {
196
- setCookie("enable_tracking");
197
- removeCookie("disable_tracking");
196
+ setCookie('enable_tracking');
197
+ removeCookie('disable_tracking');
198
198
  setConsentTimestamp();
199
199
  refreshTrackingPreferences();
200
200
  }
@@ -204,8 +204,8 @@ export function setOptIn() {
204
204
  * @returns {void}
205
205
  */
206
206
  export function setOptOut() {
207
- setCookie("disable_tracking");
208
- removeCookie("enable_tracking");
207
+ setCookie('disable_tracking');
208
+ removeCookie('enable_tracking');
209
209
  setConsentTimestamp();
210
210
  refreshTrackingPreferences();
211
211
  }
@@ -215,8 +215,8 @@ export function setOptOut() {
215
215
  * @returns {void}
216
216
  */
217
217
  export function clearPrefs() {
218
- removeCookie("enable_tracking");
219
- removeCookie("disable_tracking");
218
+ removeCookie('enable_tracking');
219
+ removeCookie('disable_tracking');
220
220
  removeConsentTimestamp();
221
221
  refreshTrackingPreferences();
222
222
  }
@@ -540,3 +540,33 @@ footer .container {
540
540
  flex: 1;
541
541
  min-width: 150px;
542
542
  }
543
+
544
+ .obtainium-direct-label {
545
+ margin: .25rem 0 0.75rem 0;
546
+ font-weight: bold;
547
+ }
548
+
549
+ .obtainium-manual-label {
550
+ font-weight: bold;
551
+ margin-top: 0.75rem;
552
+ }
553
+
554
+ .obtainium-img {
555
+ width: 201px;
556
+ height: 60px;
557
+ margin-bottom: 0.25rem;
558
+ }
559
+
560
+ .obtainium-margin {
561
+ margin-left: 4px;
562
+ }
563
+
564
+ .obtainium-fa-down {
565
+ color: #FFC627;
566
+ margin-left: 4px;
567
+ }
568
+
569
+ .obtainium-icon {
570
+ width: 50px;
571
+ height: 50px;
572
+ }