@siemens/live-preview 51.5.0 → 51.7.0

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.
@@ -1,10 +1,10 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ChangeDetectorRef, ChangeDetectionStrategy, Component, InjectionToken, computed, signal, effect, Service, viewChild, output, input, NgZone, DestroyRef, Directive, ElementRef, untracked, Injectable, ViewContainerRef, Compiler, Injector, afterNextRender, ɵcompileComponent as _compileComponent, ɵresetCompiledComponents as _resetCompiledComponents, inputBinding, NgModule, ErrorHandler, createComponent, makeEnvironmentProviders } from '@angular/core';
2
+ import { inject, ChangeDetectorRef, ChangeDetectionStrategy, Component, InjectionToken, computed, signal, effect, Service, DOCUMENT, Injectable, viewChild, output, input, NgZone, DestroyRef, Directive, ElementRef, untracked, ViewContainerRef, Compiler, Injector, afterNextRender, ɵcompileComponent as _compileComponent, ɵresetCompiledComponents as _resetCompiledComponents, inputBinding, NgModule, ErrorHandler, createComponent, makeEnvironmentProviders, numberAttribute, ViewEncapsulation } from '@angular/core';
3
3
  import * as i1$1 from '@angular/router';
4
4
  import { ActivatedRoute, Router, RouterLink, RouterLinkActive, RouterModule, provideRouter, withDisabledInitialNavigation, withHashLocation } from '@angular/router';
5
5
  import * as i1 from '@angular/forms';
6
6
  import { FormsModule, UntypedFormControl, ReactiveFormsModule } from '@angular/forms';
7
- import { Title, ɵDomRendererFactory2 as _DomRendererFactory2, createApplication, REMOVE_STYLES_ON_COMPONENT_DESTROY } from '@angular/platform-browser';
7
+ import { DomSanitizer, Title, ɵDomRendererFactory2 as _DomRendererFactory2, createApplication, REMOVE_STYLES_ON_COMPONENT_DESTROY } from '@angular/platform-browser';
8
8
  import { throttleTime, timeout, retry, debounceTime, distinctUntilChanged } from 'rxjs/operators';
9
9
  import { KeyValuePipe, LocationStrategy, Location } from '@angular/common';
10
10
  import { httpResource, HttpClient } from '@angular/common/http';
@@ -60,10 +60,10 @@ class SiLivePreviewLocaleApi {
60
60
  * SPDX-License-Identifier: MIT
61
61
  */
62
62
  class LivePreviewStateService {
63
- router = inject(Router);
63
+ router = inject(Router, { optional: true });
64
64
  overviewExample = computed(() => {
65
- this.router.lastSuccessfulNavigation();
66
- const route = this.findOverviewRoute(this.router.routerState.root);
65
+ this.router?.lastSuccessfulNavigation();
66
+ const route = this.router && this.findOverviewRoute(this.router.routerState.root);
67
67
  return this.getOverviewExample(route?.snapshot.url ?? []);
68
68
  }, /* @ts-ignore */
69
69
  ...(ngDevMode ? [{ debugName: "overviewExample" }] : /* istanbul ignore next */ []));
@@ -241,11 +241,79 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
241
241
  type: Service
242
242
  }], ctorParameters: () => [] });
243
243
 
244
+ /**
245
+ * Copyright (c) Siemens 2016 - 2026
246
+ * SPDX-License-Identifier: MIT
247
+ */
248
+ class LivePreviewUrlService {
249
+ config = inject(SI_LIVE_PREVIEW_CONFIG);
250
+ state = inject(LivePreviewStateService);
251
+ document = inject(DOCUMENT);
252
+ // Keep resolution at runtime to avoid Vite rewriting '.' as a filesystem asset.
253
+ applicationUrl = new URL('.', new URL(import.meta.url));
254
+ origin = this.applicationUrl.origin;
255
+ iframeUrl = this.routeUrl('iframe', new URLSearchParams({ parentOrigin: this.document.location.origin }));
256
+ examplesBaseUrl = new URL(this.config.examplesBaseUrl, this.applicationUrl).href;
257
+ sourceUrl(path) {
258
+ return new URL(path, this.examplesBaseUrl).href;
259
+ }
260
+ viewerUrl(mode, options = {}) {
261
+ const parameters = new URLSearchParams({ theme: this.state.theme() });
262
+ if (this.state.isRTL()) {
263
+ parameters.set('isRTL', 'true');
264
+ }
265
+ const locale = this.state.locale();
266
+ if (locale) {
267
+ parameters.set('locale', locale);
268
+ }
269
+ const rootFontSize = this.state.rootFontSize();
270
+ if (rootFontSize) {
271
+ parameters.set('rfs', String(rootFontSize));
272
+ }
273
+ if (options.deviceMode) {
274
+ parameters.set('mode', options.deviceMode);
275
+ }
276
+ if (!options.skipTemplate) {
277
+ const framework = this.state.framework();
278
+ if (framework !== 'angular') {
279
+ parameters.set('t', this.state.activeWebComponentTemplate());
280
+ parameters.set('framework', framework);
281
+ }
282
+ else if (this.state.templateModified()) {
283
+ parameters.set('t', this.state.template());
284
+ }
285
+ }
286
+ const example = this.state.example();
287
+ if (example) {
288
+ parameters.set('e', example);
289
+ }
290
+ return this.routeUrl(`viewer/${mode}`, parameters);
291
+ }
292
+ issueUrl(template) {
293
+ const url = new URL(this.config.ticketBaseUrl, this.document.baseURI);
294
+ url.searchParams.set('issue[title]', `<${this.state.example()}>:`);
295
+ url.searchParams.set('issuable_template', template);
296
+ return url.href;
297
+ }
298
+ routeUrl(route, parameters = new URLSearchParams()) {
299
+ const url = new URL(this.applicationUrl);
300
+ url.hash = `/${route}${parameters.size ? '?' + parameters : ''}`;
301
+ return url.href;
302
+ }
303
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LivePreviewUrlService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
304
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LivePreviewUrlService, providedIn: 'root' });
305
+ }
306
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LivePreviewUrlService, decorators: [{
307
+ type: Injectable,
308
+ args: [{ providedIn: 'root' }]
309
+ }] });
310
+
244
311
  /**
245
312
  * Copyright (c) Siemens 2016 - 2026
246
313
  * SPDX-License-Identifier: MIT
247
314
  */
248
315
  class SiLivePreviewIframeModeComponent {
316
+ previewUrl = inject(DomSanitizer).bypassSecurityTrustResourceUrl(inject(LivePreviewUrlService).iframeUrl);
249
317
  previewIframe = viewChild.required('previewIframe', /* @ts-ignore */
250
318
  ...(ngDevMode ? [{ debugName: "previewIframe" }] : /* istanbul ignore next */ []));
251
319
  iframeChange = output();
@@ -256,11 +324,11 @@ class SiLivePreviewIframeModeComponent {
256
324
  this.iframeChange.emit(undefined);
257
325
  }
258
326
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewIframeModeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
259
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: SiLivePreviewIframeModeComponent, isStandalone: true, selector: "si-live-preview-iframe-mode", outputs: { iframeChange: "iframeChange" }, viewQueries: [{ propertyName: "previewIframe", first: true, predicate: ["previewIframe"], descendants: true, isSignal: true }], ngImport: i0, template: `<iframe #previewIframe src="#/iframe" title="Example view"></iframe>`, isInline: true, styles: [":host{display:block;flex:1;min-block-size:0}iframe{border:0;display:block;block-size:100%;inline-size:100%}\n"] });
327
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.8", type: SiLivePreviewIframeModeComponent, isStandalone: true, selector: "si-live-preview-iframe-mode", outputs: { iframeChange: "iframeChange" }, viewQueries: [{ propertyName: "previewIframe", first: true, predicate: ["previewIframe"], descendants: true, isSignal: true }], ngImport: i0, template: `<iframe #previewIframe title="Example view" [src]="previewUrl"></iframe>`, isInline: true, styles: [":host{display:block;flex:1;min-block-size:0}iframe{border:0;display:block;block-size:100%;inline-size:100%}\n"] });
260
328
  }
261
329
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewIframeModeComponent, decorators: [{
262
330
  type: Component,
263
- args: [{ selector: 'si-live-preview-iframe-mode', template: `<iframe #previewIframe src="#/iframe" title="Example view"></iframe>`, styles: [":host{display:block;flex:1;min-block-size:0}iframe{border:0;display:block;block-size:100%;inline-size:100%}\n"] }]
331
+ args: [{ selector: 'si-live-preview-iframe-mode', template: `<iframe #previewIframe title="Example view" [src]="previewUrl"></iframe>`, styles: [":host{display:block;flex:1;min-block-size:0}iframe{border:0;display:block;block-size:100%;inline-size:100%}\n"] }]
264
332
  }], propDecorators: { previewIframe: [{ type: i0.ViewChild, args: ['previewIframe', { isSignal: true }] }], iframeChange: [{ type: i0.Output, args: ["iframeChange"] }] } });
265
333
 
266
334
  /**
@@ -299,11 +367,11 @@ class SiLivePreviewQrComponent {
299
367
  }
300
368
  }
301
369
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewQrComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
302
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiLivePreviewQrComponent, isStandalone: true, selector: "si-live-preview-qr", inputs: { url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, urlShort: { classPropertyName: "urlShort", publicName: "urlShort", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, ngImport: i0, template: "<div class=\"qr\" [innerHTML]=\"qrImg()\"></div>\n@if (qrShort()) {\n <span>\n <b>Note</b>: not using template, too long for QR\n <span class=\"url-len\">({{ url()?.length }})</span>\n </span>\n}\n<hr />\n<a target=\"_blank\" [href]=\"url()\">Open in new tab</a>\n", styles: ["a{color:var(--si-sys-color-text-accent)}a:after{display:none}a:hover{color:var(--si-sys-color-text-accent-hover)}*:focus-visible{outline:var(--element-button-focus-width) solid var(--si-sys-color-effects-focus);outline-offset:var(--element-button-focus-overlay-width)}:host{position:absolute;z-index:1000;inset-block-start:100%;inset-inline-end:0;min-inline-size:150px;min-block-size:150px;padding:16px;margin-block-start:4px;border-radius:8px;box-shadow:0 0 8px #00000029,0 8px 8px #00000014;background:var(--si-sys-color-background-0)}.qr ::ng-deep img{max-inline-size:unset}hr{margin-block:12px;border:0;border-block-start:1px solid var(--si-sys-color-border-4)}.url-length{display:none}\n"], changeDetection: i0.ChangeDetectionStrategy.Eager });
370
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiLivePreviewQrComponent, isStandalone: true, selector: "si-live-preview-qr", inputs: { url: { classPropertyName: "url", publicName: "url", isSignal: true, isRequired: false, transformFunction: null }, urlShort: { classPropertyName: "urlShort", publicName: "urlShort", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, ngImport: i0, template: "<div class=\"qr\" [innerHTML]=\"qrImg()\"></div>\n@if (qrShort()) {\n <span>\n <b>Note</b>: not using template, too long for QR\n <span class=\"url-len\">({{ url()?.length }})</span>\n </span>\n}\n<hr />\n<a target=\"_blank\" [href]=\"url()\">Open in new tab</a>\n", styles: ["a{color:var(--si-sys-color-text-accent)}a:after{display:none}a:hover{color:var(--si-sys-color-text-accent-hover)}*:focus-visible{outline:var(--si-sys-sizing-focus-ring-width, 2px) solid var(--si-sys-color-effects-focus);outline-offset:var(--si-sys-sizing-focus-ring-offset, 1px)}:host{position:absolute;z-index:1000;inset-block-start:100%;inset-inline-end:0;min-inline-size:150px;min-block-size:150px;padding:16px;margin-block-start:4px;border-radius:8px;box-shadow:0 0 8px #00000029,0 8px 8px #00000014;background:var(--si-sys-color-background-0)}.qr ::ng-deep img{max-inline-size:unset}hr{margin-block:12px;border:0;border-block-start:1px solid var(--si-sys-color-border-4)}.url-length{display:none}\n"], changeDetection: i0.ChangeDetectionStrategy.Eager });
303
371
  }
304
372
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewQrComponent, decorators: [{
305
373
  type: Component,
306
- args: [{ selector: 'si-live-preview-qr', changeDetection: ChangeDetectionStrategy.Eager, template: "<div class=\"qr\" [innerHTML]=\"qrImg()\"></div>\n@if (qrShort()) {\n <span>\n <b>Note</b>: not using template, too long for QR\n <span class=\"url-len\">({{ url()?.length }})</span>\n </span>\n}\n<hr />\n<a target=\"_blank\" [href]=\"url()\">Open in new tab</a>\n", styles: ["a{color:var(--si-sys-color-text-accent)}a:after{display:none}a:hover{color:var(--si-sys-color-text-accent-hover)}*:focus-visible{outline:var(--element-button-focus-width) solid var(--si-sys-color-effects-focus);outline-offset:var(--element-button-focus-overlay-width)}:host{position:absolute;z-index:1000;inset-block-start:100%;inset-inline-end:0;min-inline-size:150px;min-block-size:150px;padding:16px;margin-block-start:4px;border-radius:8px;box-shadow:0 0 8px #00000029,0 8px 8px #00000014;background:var(--si-sys-color-background-0)}.qr ::ng-deep img{max-inline-size:unset}hr{margin-block:12px;border:0;border-block-start:1px solid var(--si-sys-color-border-4)}.url-length{display:none}\n"] }]
374
+ args: [{ selector: 'si-live-preview-qr', changeDetection: ChangeDetectionStrategy.Eager, template: "<div class=\"qr\" [innerHTML]=\"qrImg()\"></div>\n@if (qrShort()) {\n <span>\n <b>Note</b>: not using template, too long for QR\n <span class=\"url-len\">({{ url()?.length }})</span>\n </span>\n}\n<hr />\n<a target=\"_blank\" [href]=\"url()\">Open in new tab</a>\n", styles: ["a{color:var(--si-sys-color-text-accent)}a:after{display:none}a:hover{color:var(--si-sys-color-text-accent-hover)}*:focus-visible{outline:var(--si-sys-sizing-focus-ring-width, 2px) solid var(--si-sys-color-effects-focus);outline-offset:var(--si-sys-sizing-focus-ring-offset, 1px)}:host{position:absolute;z-index:1000;inset-block-start:100%;inset-inline-end:0;min-inline-size:150px;min-block-size:150px;padding:16px;margin-block-start:4px;border-radius:8px;box-shadow:0 0 8px #00000029,0 8px 8px #00000014;background:var(--si-sys-color-background-0)}.qr ::ng-deep img{max-inline-size:unset}hr{margin-block:12px;border:0;border-block-start:1px solid var(--si-sys-color-border-4)}.url-length{display:none}\n"] }]
307
375
  }], propDecorators: { url: [{ type: i0.Input, args: [{ isSignal: true, alias: "url", required: false }] }], urlShort: [{ type: i0.Input, args: [{ isSignal: true, alias: "urlShort", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
308
376
 
309
377
  const availableDevices = [
@@ -402,6 +470,8 @@ class SiLivePreviewMobileModeComponent {
402
470
  previewIframe = viewChild.required('previewIframe', /* @ts-ignore */
403
471
  ...(ngDevMode ? [{ debugName: "previewIframe" }] : /* istanbul ignore next */ []));
404
472
  config = inject(SI_LIVE_PREVIEW_CONFIG);
473
+ urls = inject(LivePreviewUrlService);
474
+ previewUrl = inject(DomSanitizer).bypassSecurityTrustResourceUrl(this.urls.iframeUrl);
405
475
  state = inject(LivePreviewStateService);
406
476
  iframeChange = output();
407
477
  switcherEnabled = this.config.themeSwitcher;
@@ -463,8 +533,8 @@ class SiLivePreviewMobileModeComponent {
463
533
  this.emitViewport();
464
534
  }
465
535
  openQrMenu() {
466
- this.plainUrl.set(this.createTemplateLink(false));
467
- this.plainUrlShort.set(this.createTemplateLink(true));
536
+ this.plainUrl.set(this.urls.viewerUrl('plain', { deviceMode: this.mode() }));
537
+ this.plainUrlShort.set(this.urls.viewerUrl('plain', { deviceMode: this.mode(), skipTemplate: true }));
468
538
  this.showQrMenu.set(true);
469
539
  }
470
540
  emitViewport() {
@@ -478,41 +548,12 @@ class SiLivePreviewMobileModeComponent {
478
548
  safeAreaRight: safeArea?.right
479
549
  });
480
550
  }
481
- createTemplateLink(skipTemplate) {
482
- let url = `${window.location.protocol}//${window.location.host}`;
483
- url += window.location.pathname;
484
- url += '#/viewer/plain?';
485
- url += 'theme=' + this.state.theme();
486
- url += '&mode=' + this.mode();
487
- if (this.state.isRTL()) {
488
- url += '&isRTL=true';
489
- }
490
- const locale = this.state.locale();
491
- if (locale) {
492
- url += '&locale=' + locale;
493
- }
494
- if (this.state.rootFontSize()) {
495
- url += '&rfs=' + this.state.rootFontSize();
496
- }
497
- if (this.state.templateModified() && !skipTemplate) {
498
- url += '&t=' + this.encode(this.state.template());
499
- }
500
- const exampleUrl = this.state.example();
501
- if (exampleUrl) {
502
- url += '&e=' + this.encode(exampleUrl);
503
- }
504
- return url;
505
- }
506
- encode(value) {
507
- // Using `+` for spaces produces shorter QR code URLs than `%20`.
508
- return encodeURIComponent(value).replace(/%20/g, '+');
509
- }
510
551
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewMobileModeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
511
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiLivePreviewMobileModeComponent, isStandalone: true, selector: "si-live-preview-mobile-mode", outputs: { iframeChange: "iframeChange" }, viewQueries: [{ propertyName: "previewIframe", first: true, predicate: ["previewIframe"], descendants: true, isSignal: true }], ngImport: i0, template: "<section class=\"settings-selection\">\n <select\n class=\"device-selection\"\n aria-label=\"Select preview device\"\n [ngModel]=\"selectedDevice()\"\n (ngModelChange)=\"selectDevice($event)\"\n >\n @for (device of availableDevices; track device.id) {\n <option [ngValue]=\"device\">\n {{ device.name }}\n </option>\n }\n </select>\n <div class=\"toggle-wrapper\">\n @if (landscapeEnabled) {\n <button\n type=\"button\"\n title=\"Rotate phone\"\n aria-label=\"Rotate phone\"\n [disabled]=\"!state.supportsLandscape()\"\n (click)=\"toggleLandscape()\"\n >\n @if (!landscape()) {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M105.34,240.51c.27.27.56.53.85.77s.29.22.44.33.33.25.51.37l.52.32.48.28c.18.1.37.18.55.27l.52.24.54.19c.19.07.37.14.57.2a5.36,5.36,0,0,0,.54.14c.2,0,.39.11.6.15s.42.06.63.09l.53.08a11.63,11.63,0,0,0,2.36,0l.53-.08c.21,0,.43-.05.63-.09l.6-.15a5.36,5.36,0,0,0,.54-.14c.2-.06.38-.13.57-.2l.54-.19.52-.24c.18-.09.37-.17.55-.27l.48-.28.52-.32c.18-.12.34-.25.51-.37l.44-.33c.29-.24.58-.5.85-.77l0,0,41.87-41.88a12,12,0,1,0-17-17L125.8,203V131.5A21.52,21.52,0,0,1,147.3,110h58.62a12,12,0,0,0,0-24H147.3a45.55,45.55,0,0,0-45.5,45.5V203L80.41,181.64a12,12,0,0,0-17,17l41.87,41.88Z\"\n />\n <path d=\"M100.8,400a12,12,0,1,0,0,24h100a12,12,0,0,0,0-24Z\" />\n <path d=\"M336.11,348h-.22a16,16,0,0,0,0,32h.22a16,16,0,0,0,0-32Z\" />\n <path\n d=\"M407.43,88H264.57C242.2,88,224,107.38,224,131.2V380.8c0,23.82,18.2,43.2,40.57,43.2H407.43C429.8,424,448,404.62,448,380.8V131.2C448,107.38,429.8,88,407.43,88ZM424,380.8c0,10.59-7.43,19.2-16.57,19.2H264.57c-9.14,0-16.57-8.61-16.57-19.2V131.2c0-10.59,7.43-19.2,16.57-19.2H274a12,12,0,0,0,12,12H386a12,12,0,0,0,12-12h9.43c9.14,0,16.57,8.61,16.57,19.2Z\"\n />\n </svg>\n } @else {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M86,147.3v58.62a12,12,0,0,0,24,0V147.3a21.52,21.52,0,0,1,21.5-21.5H203l-21.39,21.39a12,12,0,0,0,17,17l41.88-41.87,0,0c.27-.27.53-.56.77-.85l.32-.43c.13-.17.26-.34.38-.52s.21-.34.31-.52.2-.32.29-.48.18-.36.26-.54.17-.35.25-.53.13-.35.19-.53.14-.38.2-.58a4.58,4.58,0,0,0,.14-.53c0-.2.11-.4.15-.61s.06-.41.09-.61.06-.36.08-.55a10.88,10.88,0,0,0,.06-1.14v-.08a10.88,10.88,0,0,0-.06-1.14c0-.19-.05-.37-.08-.55s-.05-.41-.09-.61-.1-.41-.15-.61a4.58,4.58,0,0,0-.14-.53c-.06-.2-.13-.39-.2-.58s-.12-.36-.19-.53-.16-.35-.25-.53-.16-.36-.26-.54-.19-.32-.29-.48-.2-.35-.31-.52-.25-.35-.38-.52l-.32-.43c-.24-.29-.5-.58-.77-.85l0,0L198.61,63.44a12,12,0,0,0-17,17L203,101.8H131.5A45.55,45.55,0,0,0,86,147.3Z\"\n />\n <path d=\"M412,88.8a12,12,0,0,0-12,12v100a12,12,0,0,0,24,0v-100A12,12,0,0,0,412,88.8Z\" />\n <path d=\"M362.11,320h-.22a16,16,0,0,0,0,32h.22a16,16,0,0,0,0-32Z\" />\n <path\n d=\"M380.8,224H131.2C107.38,224,88,242.2,88,264.57V407.43C88,429.8,107.38,448,131.2,448H380.8c23.82,0,43.2-18.2,43.2-40.57V264.57C424,242.2,404.62,224,380.8,224ZM400,407.43c0,9.14-8.61,16.57-19.2,16.57H131.2c-10.59,0-19.2-7.43-19.2-16.57V398a12,12,0,0,0,12-12V286a12,12,0,0,0-12-12v-9.43c0-9.14,8.61-16.57,19.2-16.57H380.8c10.59,0,19.2,7.43,19.2,16.57Z\"\n />\n </svg>\n }\n </button>\n }\n @if (switcherEnabled) {\n <button\n type=\"button\"\n title=\"Toggle theme\"\n aria-label=\"Toggle theme\"\n (click)=\"state.toggleTheme()\"\n >\n @if (state.theme() === 'dark') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M256,349.82A93.82,93.82,0,1,0,162.18,256,93.93,93.93,0,0,0,256,349.82Zm0-163.64A69.82,69.82,0,1,1,186.18,256,69.9,69.9,0,0,1,256,186.18Z\"\n />\n <path\n d=\"M256,120.73a12,12,0,0,0,12-12V76a12,12,0,0,0-24,0v32.73A12,12,0,0,0,256,120.73Z\"\n />\n <path d=\"M268,436V403.27a12,12,0,0,0-24,0V436a12,12,0,0,0,24,0Z\" />\n <path d=\"M143.44,160.41a12,12,0,1,0,17-17l-23.23-23.23a12,12,0,1,0-17,17Z\" />\n <path\n d=\"M351.59,351.59a12,12,0,0,0,0,17l23.23,23.23a12,12,0,0,0,17-17l-23.23-23.23A12,12,0,0,0,351.59,351.59Z\"\n />\n <path\n d=\"M120.73,256a12,12,0,0,0-12-12H76a12,12,0,0,0,0,24h32.73A12,12,0,0,0,120.73,256Z\"\n />\n <path d=\"M436,244H403.27a12,12,0,0,0,0,24H436a12,12,0,0,0,0-24Z\" />\n <path\n d=\"M137.18,391.79l23.23-23.23a12,12,0,1,0-17-17l-23.23,23.23a12,12,0,1,0,17,17Z\"\n />\n <path\n d=\"M360.07,163.93a12,12,0,0,0,8.49-3.52l23.23-23.23a12,12,0,1,0-17-17l-23.23,23.23a12,12,0,0,0,8.48,20.49Z\"\n />\n </svg>\n } @else {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M360.07,147.88a12,12,0,0,0,5.89-21.1,168.05,168.05,0,0,0-214.71,0C80,186,70.19,292.1,129.38,363.35a166.9,166.9,0,0,0,113.77,59.93q7.9.74,15.75.73A166.74,166.74,0,0,0,366,385.22a12,12,0,0,0-5.89-21.1,109.33,109.33,0,0,1,0-216.24ZM244.43,275.77A133.48,133.48,0,0,0,330,381.08,144.11,144.11,0,0,1,147.84,348C97.1,287,105.51,196,166.58,145.24A144.08,144.08,0,0,1,330,130.94C272,152.38,234.91,212.29,244.43,275.77Z\"\n />\n </svg>\n }\n </button>\n }\n <button\n type=\"button\"\n title=\"Show QR code\"\n aria-label=\"Show QR code\"\n class=\"qr-button\"\n (click)=\"openQrMenu()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M100 180a12 12 0 01-12-12v-56a24 24 0 0124-24h56a12 12 0 010 24h-56v56a12 12 0 01-12 12zM412 180a12 12 0 01-12-12v-56h-56a12 12 0 010-24h56a24 24 0 0124 24v56a12 12 0 01-12 12zM168 424h-56a24 24 0 01-24-24v-56a12 12 0 0124 0v56h56a12 12 0 010 24zM400 424h-56a12 12 0 010-24h56v-56a12 12 0 0124 0v56a24 24 0 01-24 24zM176.11 172.11h27.79v27.79h-27.79zM424 304H88a12 12 0 010-24h336a12 12 0 010 24z\"\n />\n <path\n d=\"M244.37 377.69H137.4V318h24v35.69h82.97v24zM374.36 193.69h-24V158h-49.87v-24h73.87v59.69z\"\n />\n <path\n d=\"M189.34 318h48.05v24h-48.05zM350.37 318v35.69H333.1V318h-67.54v24h43.54v11.69h-23.86v24h89.13V318h-24zM242 238H138V134h104zm-80-24h56v-56h-56zM261.33 134h24v44.54h-24zM350.36 225.06h24v44.54h-24zM301.77 169h30.29v24h-30.29zM328.18 267h-64v-64h64zm-40-24h16v-16h-16z\"\n />\n </svg>\n @if (showQrMenu()) {\n <si-live-preview-qr\n title=\"\"\n [url]=\"plainUrl()\"\n [urlShort]=\"plainUrlShort()\"\n (closed)=\"showQrMenu.set(false)\"\n />\n }\n </button>\n </div>\n</section>\n\n<div\n class=\"device\"\n [class.md]=\"mode() !== 'ios'\"\n [class.ios]=\"mode() === 'ios' && !showNotch()\"\n [class.ios-with-notch]=\"mode() === 'ios' && showNotch()\"\n [class.dark]=\"state.theme() === 'dark'\"\n [class.landscape]=\"landscape()\"\n>\n @if (mode() !== 'ios') {\n <div class=\"wrapper\">\n <svg class=\"md-bar\" viewBox=\"0 0 130 40.3\" [class.dark]=\"state.theme() === 'dark'\">\n <path\n d=\"m 16,4.2 h 64 c 8.8,0 16,7.2 16,16 0,8.8 -7.2,16 -16,16 H 16 C 7.2,36.2 0,29 0,20.2 0,11.4 7.2,4.2 16,4.2 Z\"\n />\n </svg>\n <svg class=\"md-bar\" viewBox=\"0 0 199.99999 40.3\" [class.dark]=\"state.theme() === 'dark'\">\n <path\n d=\"M 155,5.0124996 173.8,37.3125 c 0.8,1.3 2.7,1.3 3.5,0 L 196,5.0124996 c 0.8,-1.3 -0.2,-3 -1.7,-3 h -37.6 c -1.5,0 -2.5,1.7 -1.7,3 z\"\n />\n <circle r=\"20\" cy=\"20.15\" cx=\"111\" class=\"st0\" />\n <path\n d=\"m 25,1.1499996 h 30 c 2.2,0 4,1.8 4,4 V 35.15 c 0,2.2 -1.8,4 -4,4 H 25 c -2.2,0 -4,-1.8 -4,-4 V 5.1499996 c 0,-2.3 1.8,-4 4,-4 z\"\n />\n </svg>\n </div>\n } @else {\n @if (showNotch()) {\n <!-- iOS devices with notch -->\n <div class=\"notch\">\n <div class=\"camera\"></div>\n <div class=\"speaker\"></div>\n </div>\n <div class=\"sleep\"></div>\n <div class=\"volume\"></div>\n } @else {\n <!-- iOS devices without notch -->\n <div class=\"camera\"></div>\n <div class=\"speaker\"></div>\n <div class=\"sensor\"></div>\n <div class=\"sleep\"></div>\n <div class=\"volume\"></div>\n <div class=\"home\"></div>\n }\n }\n\n <div class=\"screen\">\n <iframe\n #previewIframe\n src=\"#/iframe\"\n title=\"Mobile example view\"\n [height]=\"currentIFrameHeight()\"\n [width]=\"currentIFrameWidth()\"\n ></iframe>\n </div>\n</div>\n", styles: ["*:focus-visible{outline:var(--element-button-focus-width) solid var(--si-sys-color-effects-focus);outline-offset:var(--element-button-focus-overlay-width)}:host{display:block}iframe{border:0;display:block}.settings-selection{display:flex;align-items:center;justify-content:space-between;margin-block:10px 20px;margin-inline:0}.settings-selection .toggle-wrapper{display:flex}.settings-selection .toggle-wrapper button{background:var(--si-sys-color-background-accent-secondary);display:flex;align-items:center;justify-content:center;block-size:40px;inline-size:40px;border:1px solid var(--si-sys-color-border-4);border-radius:50%;margin-inline-start:10px;position:relative}.settings-selection .toggle-wrapper button>svg{block-size:24px;fill:var(--si-sys-color-text-primary)}.settings-selection .toggle-wrapper button>svg:hover{fill:var(--si-sys-color-text-accent-hover)}.settings-selection .toggle-wrapper button:disabled>svg{fill:var(--si-sys-color-text-primary)}.device-selection{appearance:none;background-color:var(--si-sys-color-background-0);background-image:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M352.79 203.21a12.45 12.45 0 011.44 15.86l-1.44 1.72-88 88a12.45 12.45 0 01-15.86 1.44l-1.72-1.44-88-88a12.43 12.43 0 0115.86-19l1.72 1.44L256 282.42l79.21-79.21a12.45 12.45 0 0115.86-1.44z'/></svg>\");background-repeat:no-repeat;background-position:right 2px top 50%;color:var(--si-sys-color-text-primary);block-size:35px;min-inline-size:200px;border-radius:2px;border:1px solid var(--si-sys-color-border-4);padding:6px;margin-block:0;display:flex;flex:1}.device{position:relative;box-sizing:content-box}.device .screen{background:var(--si-sys-color-background-0);box-shadow:0 0 0 3px #111;border-radius:1px;block-size:100%;inline-size:100%;position:relative;overflow:hidden;display:block}.device.md{margin-top:20px;box-shadow:0 0 0 14px #090a0d,0 0 0 17px #9fa3a8,0 0 34px 17px #0003;overflow:hidden;border-radius:20px}.device.md .wrapper{margin:0 auto;position:absolute;top:0;left:0;right:0;z-index:4;display:flex;height:25px;justify-content:space-between}.device.md .wrapper .md-bar{fill:#090a0d;opacity:.2;padding:7px 11px}.device.md .wrapper .md-bar.dark{fill:#fff;opacity:.5}.device.ios-with-notch{padding:26px;background:#fdfdfd;box-shadow:inset 0 0 11px #000;border-radius:66px}.device.ios-with-notch:before{background:#000;border-radius:61px;height:calc(100% - 10px);width:calc(100% - 10px);position:absolute;top:5px;left:5px;content:\"\"}.device.ios-with-notch:after{background:#00000080;border-radius:2px;height:4px;width:130px;position:absolute;right:0;bottom:32px;left:0;content:\"\";margin:0 auto}.device.ios-with-notch.dark:after{background:#fff;opacity:.5}.device.ios-with-notch .screen{border-radius:40px}.device.ios-with-notch .volume,.device.ios-with-notch .volume:before,.device.ios-with-notch .volume:after,.device.ios-with-notch .sleep{background:#b5b5b5;width:3px;position:absolute}.device.ios-with-notch .volume{height:32px;top:116px;left:-3px}.device.ios-with-notch .volume:before{height:62px;top:62px;left:0;content:\"\"}.device.ios-with-notch .volume:after{height:62px;top:140px;left:0;content:\"\"}.device.ios-with-notch .sleep{height:96px;top:200px;right:-3px}.device.ios-with-notch .camera{background:#0d4d71;border-radius:100%;height:6px;width:6px;position:absolute;top:9px;left:154px}.device.ios-with-notch .speaker{background:#171818;border-radius:6px;height:6px;width:60px;position:absolute;top:9px;left:50%;margin-left:-30px}.device.ios-with-notch .notch{background:#000;border-bottom-left-radius:24px;border-bottom-right-radius:24px;height:30px;width:210px;position:absolute;top:26px;left:50%;margin-left:-105px;z-index:4}.device.ios-with-notch .notch:before,.device.ios-with-notch .notch:after{height:8px;width:8px;position:absolute;top:0;content:\"\"}.device.ios-with-notch .notch:after{background:radial-gradient(circle at bottom left,transparent 0,transparent 70%,#000 70%,#000 100%);left:-8px}.device.ios-with-notch .notch:before{background:radial-gradient(circle at bottom right,transparent 0,transparent 70%,#000 70%,#000 100%);right:-8px}.device.ios-with-notch.landscape .volume,.device.ios-with-notch.landscape .volume:before,.device.ios-with-notch.landscape .volume:after,.device.ios-with-notch.landscape .sleep{height:3px}.device.ios-with-notch.landscape .volume{width:32px;top:auto;left:116px;bottom:-3px}.device.ios-with-notch.landscape .volume:before{width:62px;top:0;left:62px}.device.ios-with-notch.landscape .volume:after{width:62px;top:0;left:140px}.device.ios-with-notch.landscape .sleep{width:96px;top:-3px;right:auto;left:200px}.device.ios-with-notch.landscape .camera{top:auto;bottom:154px;left:9px}.device.ios-with-notch.landscape .speaker{height:60px;width:6px;top:50%;left:9px;margin-top:-30px;margin-left:0}.device.ios-with-notch.landscape .notch{border-top-right-radius:24px;border-bottom-right-radius:24px;border-bottom-left-radius:0;height:210px;width:30px;top:50%;margin-top:-105px;margin-left:unset;left:unset}.device.ios-with-notch.landscape .notch:before,.device.ios-with-notch.landscape .notch:after{left:0}.device.ios-with-notch.landscape .notch:after{background:radial-gradient(circle at bottom right,transparent 0,transparent 70%,#000 70%,#000 100%);top:auto;bottom:-8px}.device.ios-with-notch.landscape .notch:before{background:radial-gradient(circle at top right,transparent 0,transparent 70%,#000 70%,#000 100%);top:-8px}.device.ios{background:#464646;box-shadow:inset 0 0 3px #000000b3;border-radius:56px;padding:105px 24px}.device.ios:before{background:#080808;border-radius:50px;height:calc(100% - 12px);width:calc(100% - 12px);position:absolute;top:6px;left:6px;content:\"\"}.device.ios .home{background:linear-gradient(135deg,#080808,#464646,#080808);border-radius:100%;height:68px;width:68px;position:absolute;bottom:22px;left:50%;margin-left:-34px}.device.ios .home:before{background:#080808;border-radius:100%;height:calc(100% - 8px);width:calc(100% - 8px);position:absolute;top:4px;left:4px;content:\"\"}.device.ios .sleep{background:#464646;border-radius:0 2px 2px 0;height:66px;width:4px;position:absolute;top:190px;right:-4px}.device.ios .volume{background:#464646;border-radius:2px 0 0 2px;height:66px;width:4px;position:absolute;top:188px;left:-4px}.device.ios .volume:before{background:inherit;border-radius:2px 0 0 2px;height:40px;width:2px;position:absolute;top:-78px;left:2px;content:\"\"}.device.ios .volume:after{background:inherit;border-radius:2px 0 0 2px;height:66px;width:4px;position:absolute;top:82px;left:0;content:\"\"}.device.ios .camera{background:#080808;border-radius:100%;height:12px;width:12px;position:absolute;top:24px;left:50%;margin-left:-6px}.device.ios .sensor{background:#3c3d3d;border-radius:100%;height:16px;width:16px;position:absolute;top:49px;left:134px}.device.ios .speaker{background:#292728;border-radius:6px;height:6px;width:70px;position:absolute;top:54px;left:50%;margin-left:-35px}.device.ios.landscape{padding:24px 105px}.device.ios.landscape .sleep{border-radius:2px 2px 0 0;height:4px;width:66px;top:unset;bottom:100%;left:190px}.device.ios.landscape .volume{border-radius:0 0 2px 2px;height:4px;width:66px;bottom:-4px;top:unset;right:calc(100% - 254px);left:unset}.device.ios.landscape .volume:before{border-radius:0 0 2px 2px;height:2px;width:40px;top:unset;bottom:2px;left:-78px;right:auto}.device.ios.landscape .volume:after{border-radius:0 0 2px 2px;height:4px;width:66px;top:unset;bottom:0;right:-82px;left:unset}.device.ios.landscape .home{top:50%;right:22px;left:unset;margin-top:-34px;margin-left:unset}.device.ios.landscape .sensor{top:134px;right:calc(100% - 65px);left:unset}.device.ios.landscape .speaker{height:70px;width:6px;top:50%;right:calc(100% - 60px);left:unset;margin-top:-35px;margin-left:unset}.device.ios.landscape .camera{top:50%;right:calc(100% - 32px);left:unset;margin-top:-6px;margin-left:unset}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple]):not([ngNoCva])[formControlName],select:not([multiple]):not([ngNoCva])[formControl],select:not([multiple]):not([ngNoCva])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SiLivePreviewQrComponent, selector: "si-live-preview-qr", inputs: ["url", "urlShort"], outputs: ["closed"] }] });
552
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiLivePreviewMobileModeComponent, isStandalone: true, selector: "si-live-preview-mobile-mode", outputs: { iframeChange: "iframeChange" }, viewQueries: [{ propertyName: "previewIframe", first: true, predicate: ["previewIframe"], descendants: true, isSignal: true }], ngImport: i0, template: "<section class=\"settings-selection\">\n <select\n class=\"device-selection\"\n aria-label=\"Select preview device\"\n [ngModel]=\"selectedDevice()\"\n (ngModelChange)=\"selectDevice($event)\"\n >\n @for (device of availableDevices; track device.id) {\n <option [ngValue]=\"device\">\n {{ device.name }}\n </option>\n }\n </select>\n <div class=\"toggle-wrapper\">\n @if (landscapeEnabled) {\n <button\n type=\"button\"\n title=\"Rotate phone\"\n aria-label=\"Rotate phone\"\n [disabled]=\"!state.supportsLandscape()\"\n (click)=\"toggleLandscape()\"\n >\n @if (!landscape()) {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M105.34,240.51c.27.27.56.53.85.77s.29.22.44.33.33.25.51.37l.52.32.48.28c.18.1.37.18.55.27l.52.24.54.19c.19.07.37.14.57.2a5.36,5.36,0,0,0,.54.14c.2,0,.39.11.6.15s.42.06.63.09l.53.08a11.63,11.63,0,0,0,2.36,0l.53-.08c.21,0,.43-.05.63-.09l.6-.15a5.36,5.36,0,0,0,.54-.14c.2-.06.38-.13.57-.2l.54-.19.52-.24c.18-.09.37-.17.55-.27l.48-.28.52-.32c.18-.12.34-.25.51-.37l.44-.33c.29-.24.58-.5.85-.77l0,0,41.87-41.88a12,12,0,1,0-17-17L125.8,203V131.5A21.52,21.52,0,0,1,147.3,110h58.62a12,12,0,0,0,0-24H147.3a45.55,45.55,0,0,0-45.5,45.5V203L80.41,181.64a12,12,0,0,0-17,17l41.87,41.88Z\"\n />\n <path d=\"M100.8,400a12,12,0,1,0,0,24h100a12,12,0,0,0,0-24Z\" />\n <path d=\"M336.11,348h-.22a16,16,0,0,0,0,32h.22a16,16,0,0,0,0-32Z\" />\n <path\n d=\"M407.43,88H264.57C242.2,88,224,107.38,224,131.2V380.8c0,23.82,18.2,43.2,40.57,43.2H407.43C429.8,424,448,404.62,448,380.8V131.2C448,107.38,429.8,88,407.43,88ZM424,380.8c0,10.59-7.43,19.2-16.57,19.2H264.57c-9.14,0-16.57-8.61-16.57-19.2V131.2c0-10.59,7.43-19.2,16.57-19.2H274a12,12,0,0,0,12,12H386a12,12,0,0,0,12-12h9.43c9.14,0,16.57,8.61,16.57,19.2Z\"\n />\n </svg>\n } @else {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M86,147.3v58.62a12,12,0,0,0,24,0V147.3a21.52,21.52,0,0,1,21.5-21.5H203l-21.39,21.39a12,12,0,0,0,17,17l41.88-41.87,0,0c.27-.27.53-.56.77-.85l.32-.43c.13-.17.26-.34.38-.52s.21-.34.31-.52.2-.32.29-.48.18-.36.26-.54.17-.35.25-.53.13-.35.19-.53.14-.38.2-.58a4.58,4.58,0,0,0,.14-.53c0-.2.11-.4.15-.61s.06-.41.09-.61.06-.36.08-.55a10.88,10.88,0,0,0,.06-1.14v-.08a10.88,10.88,0,0,0-.06-1.14c0-.19-.05-.37-.08-.55s-.05-.41-.09-.61-.1-.41-.15-.61a4.58,4.58,0,0,0-.14-.53c-.06-.2-.13-.39-.2-.58s-.12-.36-.19-.53-.16-.35-.25-.53-.16-.36-.26-.54-.19-.32-.29-.48-.2-.35-.31-.52-.25-.35-.38-.52l-.32-.43c-.24-.29-.5-.58-.77-.85l0,0L198.61,63.44a12,12,0,0,0-17,17L203,101.8H131.5A45.55,45.55,0,0,0,86,147.3Z\"\n />\n <path d=\"M412,88.8a12,12,0,0,0-12,12v100a12,12,0,0,0,24,0v-100A12,12,0,0,0,412,88.8Z\" />\n <path d=\"M362.11,320h-.22a16,16,0,0,0,0,32h.22a16,16,0,0,0,0-32Z\" />\n <path\n d=\"M380.8,224H131.2C107.38,224,88,242.2,88,264.57V407.43C88,429.8,107.38,448,131.2,448H380.8c23.82,0,43.2-18.2,43.2-40.57V264.57C424,242.2,404.62,224,380.8,224ZM400,407.43c0,9.14-8.61,16.57-19.2,16.57H131.2c-10.59,0-19.2-7.43-19.2-16.57V398a12,12,0,0,0,12-12V286a12,12,0,0,0-12-12v-9.43c0-9.14,8.61-16.57,19.2-16.57H380.8c10.59,0,19.2,7.43,19.2,16.57Z\"\n />\n </svg>\n }\n </button>\n }\n @if (switcherEnabled) {\n <button\n type=\"button\"\n title=\"Toggle theme\"\n aria-label=\"Toggle theme\"\n (click)=\"state.toggleTheme()\"\n >\n @if (state.theme() === 'dark') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M256,349.82A93.82,93.82,0,1,0,162.18,256,93.93,93.93,0,0,0,256,349.82Zm0-163.64A69.82,69.82,0,1,1,186.18,256,69.9,69.9,0,0,1,256,186.18Z\"\n />\n <path\n d=\"M256,120.73a12,12,0,0,0,12-12V76a12,12,0,0,0-24,0v32.73A12,12,0,0,0,256,120.73Z\"\n />\n <path d=\"M268,436V403.27a12,12,0,0,0-24,0V436a12,12,0,0,0,24,0Z\" />\n <path d=\"M143.44,160.41a12,12,0,1,0,17-17l-23.23-23.23a12,12,0,1,0-17,17Z\" />\n <path\n d=\"M351.59,351.59a12,12,0,0,0,0,17l23.23,23.23a12,12,0,0,0,17-17l-23.23-23.23A12,12,0,0,0,351.59,351.59Z\"\n />\n <path\n d=\"M120.73,256a12,12,0,0,0-12-12H76a12,12,0,0,0,0,24h32.73A12,12,0,0,0,120.73,256Z\"\n />\n <path d=\"M436,244H403.27a12,12,0,0,0,0,24H436a12,12,0,0,0,0-24Z\" />\n <path\n d=\"M137.18,391.79l23.23-23.23a12,12,0,1,0-17-17l-23.23,23.23a12,12,0,1,0,17,17Z\"\n />\n <path\n d=\"M360.07,163.93a12,12,0,0,0,8.49-3.52l23.23-23.23a12,12,0,1,0-17-17l-23.23,23.23a12,12,0,0,0,8.48,20.49Z\"\n />\n </svg>\n } @else {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M360.07,147.88a12,12,0,0,0,5.89-21.1,168.05,168.05,0,0,0-214.71,0C80,186,70.19,292.1,129.38,363.35a166.9,166.9,0,0,0,113.77,59.93q7.9.74,15.75.73A166.74,166.74,0,0,0,366,385.22a12,12,0,0,0-5.89-21.1,109.33,109.33,0,0,1,0-216.24ZM244.43,275.77A133.48,133.48,0,0,0,330,381.08,144.11,144.11,0,0,1,147.84,348C97.1,287,105.51,196,166.58,145.24A144.08,144.08,0,0,1,330,130.94C272,152.38,234.91,212.29,244.43,275.77Z\"\n />\n </svg>\n }\n </button>\n }\n <button\n type=\"button\"\n title=\"Show QR code\"\n aria-label=\"Show QR code\"\n class=\"qr-button\"\n (click)=\"openQrMenu()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M100 180a12 12 0 01-12-12v-56a24 24 0 0124-24h56a12 12 0 010 24h-56v56a12 12 0 01-12 12zM412 180a12 12 0 01-12-12v-56h-56a12 12 0 010-24h56a24 24 0 0124 24v56a12 12 0 01-12 12zM168 424h-56a24 24 0 01-24-24v-56a12 12 0 0124 0v56h56a12 12 0 010 24zM400 424h-56a12 12 0 010-24h56v-56a12 12 0 0124 0v56a24 24 0 01-24 24zM176.11 172.11h27.79v27.79h-27.79zM424 304H88a12 12 0 010-24h336a12 12 0 010 24z\"\n />\n <path\n d=\"M244.37 377.69H137.4V318h24v35.69h82.97v24zM374.36 193.69h-24V158h-49.87v-24h73.87v59.69z\"\n />\n <path\n d=\"M189.34 318h48.05v24h-48.05zM350.37 318v35.69H333.1V318h-67.54v24h43.54v11.69h-23.86v24h89.13V318h-24zM242 238H138V134h104zm-80-24h56v-56h-56zM261.33 134h24v44.54h-24zM350.36 225.06h24v44.54h-24zM301.77 169h30.29v24h-30.29zM328.18 267h-64v-64h64zm-40-24h16v-16h-16z\"\n />\n </svg>\n @if (showQrMenu()) {\n <si-live-preview-qr\n title=\"\"\n [url]=\"plainUrl()\"\n [urlShort]=\"plainUrlShort()\"\n (closed)=\"showQrMenu.set(false)\"\n />\n }\n </button>\n </div>\n</section>\n\n<div\n class=\"device\"\n [class.md]=\"mode() !== 'ios'\"\n [class.ios]=\"mode() === 'ios' && !showNotch()\"\n [class.ios-with-notch]=\"mode() === 'ios' && showNotch()\"\n [class.dark]=\"state.theme() === 'dark'\"\n [class.landscape]=\"landscape()\"\n>\n @if (mode() !== 'ios') {\n <div class=\"wrapper\">\n <svg class=\"md-bar\" viewBox=\"0 0 130 40.3\" [class.dark]=\"state.theme() === 'dark'\">\n <path\n d=\"m 16,4.2 h 64 c 8.8,0 16,7.2 16,16 0,8.8 -7.2,16 -16,16 H 16 C 7.2,36.2 0,29 0,20.2 0,11.4 7.2,4.2 16,4.2 Z\"\n />\n </svg>\n <svg class=\"md-bar\" viewBox=\"0 0 199.99999 40.3\" [class.dark]=\"state.theme() === 'dark'\">\n <path\n d=\"M 155,5.0124996 173.8,37.3125 c 0.8,1.3 2.7,1.3 3.5,0 L 196,5.0124996 c 0.8,-1.3 -0.2,-3 -1.7,-3 h -37.6 c -1.5,0 -2.5,1.7 -1.7,3 z\"\n />\n <circle r=\"20\" cy=\"20.15\" cx=\"111\" class=\"st0\" />\n <path\n d=\"m 25,1.1499996 h 30 c 2.2,0 4,1.8 4,4 V 35.15 c 0,2.2 -1.8,4 -4,4 H 25 c -2.2,0 -4,-1.8 -4,-4 V 5.1499996 c 0,-2.3 1.8,-4 4,-4 z\"\n />\n </svg>\n </div>\n } @else {\n @if (showNotch()) {\n <!-- iOS devices with notch -->\n <div class=\"notch\">\n <div class=\"camera\"></div>\n <div class=\"speaker\"></div>\n </div>\n <div class=\"sleep\"></div>\n <div class=\"volume\"></div>\n } @else {\n <!-- iOS devices without notch -->\n <div class=\"camera\"></div>\n <div class=\"speaker\"></div>\n <div class=\"sensor\"></div>\n <div class=\"sleep\"></div>\n <div class=\"volume\"></div>\n <div class=\"home\"></div>\n }\n }\n\n <div class=\"screen\">\n <iframe\n #previewIframe\n title=\"Mobile example view\"\n [src]=\"previewUrl\"\n [height]=\"currentIFrameHeight()\"\n [width]=\"currentIFrameWidth()\"\n ></iframe>\n </div>\n</div>\n", styles: ["*:focus-visible{outline:var(--si-sys-sizing-focus-ring-width, 2px) solid var(--si-sys-color-effects-focus);outline-offset:var(--si-sys-sizing-focus-ring-offset, 1px)}:host{display:block}iframe{border:0;display:block}.settings-selection{display:flex;align-items:center;justify-content:space-between;margin-block:10px 20px;margin-inline:0}.settings-selection .toggle-wrapper{display:flex}.settings-selection .toggle-wrapper button{background:var(--si-sys-color-background-accent-secondary);display:flex;align-items:center;justify-content:center;block-size:40px;inline-size:40px;border:1px solid var(--si-sys-color-border-4);border-radius:50%;margin-inline-start:10px;position:relative}.settings-selection .toggle-wrapper button>svg{block-size:24px;fill:var(--si-sys-color-text-primary)}.settings-selection .toggle-wrapper button>svg:hover{fill:var(--si-sys-color-text-accent-hover)}.settings-selection .toggle-wrapper button:disabled>svg{fill:var(--si-sys-color-text-primary)}.device-selection{appearance:none;background-color:var(--si-sys-color-background-0);background-image:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M352.79 203.21a12.45 12.45 0 011.44 15.86l-1.44 1.72-88 88a12.45 12.45 0 01-15.86 1.44l-1.72-1.44-88-88a12.43 12.43 0 0115.86-19l1.72 1.44L256 282.42l79.21-79.21a12.45 12.45 0 0115.86-1.44z'/></svg>\");background-repeat:no-repeat;background-position:right 2px top 50%;color:var(--si-sys-color-text-primary);block-size:35px;min-inline-size:200px;border-radius:2px;border:1px solid var(--si-sys-color-border-4);padding:6px;margin-block:0;display:flex;flex:1}.device{position:relative;box-sizing:content-box}.device .screen{background:var(--si-sys-color-background-0);box-shadow:0 0 0 3px #111;border-radius:1px;block-size:100%;inline-size:100%;position:relative;overflow:hidden;display:block}.device.md{margin-top:20px;box-shadow:0 0 0 14px #090a0d,0 0 0 17px #9fa3a8,0 0 34px 17px #0003;overflow:hidden;border-radius:20px}.device.md .wrapper{margin:0 auto;position:absolute;top:0;left:0;right:0;z-index:4;display:flex;height:25px;justify-content:space-between}.device.md .wrapper .md-bar{fill:#090a0d;opacity:.2;padding:7px 11px}.device.md .wrapper .md-bar.dark{fill:#fff;opacity:.5}.device.ios-with-notch{padding:26px;background:#fdfdfd;box-shadow:inset 0 0 11px #000;border-radius:66px}.device.ios-with-notch:before{background:#000;border-radius:61px;height:calc(100% - 10px);width:calc(100% - 10px);position:absolute;top:5px;left:5px;content:\"\"}.device.ios-with-notch:after{background:#00000080;border-radius:2px;height:4px;width:130px;position:absolute;right:0;bottom:32px;left:0;content:\"\";margin:0 auto}.device.ios-with-notch.dark:after{background:#fff;opacity:.5}.device.ios-with-notch .screen{border-radius:40px}.device.ios-with-notch .volume,.device.ios-with-notch .volume:before,.device.ios-with-notch .volume:after,.device.ios-with-notch .sleep{background:#b5b5b5;width:3px;position:absolute}.device.ios-with-notch .volume{height:32px;top:116px;left:-3px}.device.ios-with-notch .volume:before{height:62px;top:62px;left:0;content:\"\"}.device.ios-with-notch .volume:after{height:62px;top:140px;left:0;content:\"\"}.device.ios-with-notch .sleep{height:96px;top:200px;right:-3px}.device.ios-with-notch .camera{background:#0d4d71;border-radius:100%;height:6px;width:6px;position:absolute;top:9px;left:154px}.device.ios-with-notch .speaker{background:#171818;border-radius:6px;height:6px;width:60px;position:absolute;top:9px;left:50%;margin-left:-30px}.device.ios-with-notch .notch{background:#000;border-bottom-left-radius:24px;border-bottom-right-radius:24px;height:30px;width:210px;position:absolute;top:26px;left:50%;margin-left:-105px;z-index:4}.device.ios-with-notch .notch:before,.device.ios-with-notch .notch:after{height:8px;width:8px;position:absolute;top:0;content:\"\"}.device.ios-with-notch .notch:after{background:radial-gradient(circle at bottom left,transparent 0,transparent 70%,#000 70%,#000 100%);left:-8px}.device.ios-with-notch .notch:before{background:radial-gradient(circle at bottom right,transparent 0,transparent 70%,#000 70%,#000 100%);right:-8px}.device.ios-with-notch.landscape .volume,.device.ios-with-notch.landscape .volume:before,.device.ios-with-notch.landscape .volume:after,.device.ios-with-notch.landscape .sleep{height:3px}.device.ios-with-notch.landscape .volume{width:32px;top:auto;left:116px;bottom:-3px}.device.ios-with-notch.landscape .volume:before{width:62px;top:0;left:62px}.device.ios-with-notch.landscape .volume:after{width:62px;top:0;left:140px}.device.ios-with-notch.landscape .sleep{width:96px;top:-3px;right:auto;left:200px}.device.ios-with-notch.landscape .camera{top:auto;bottom:154px;left:9px}.device.ios-with-notch.landscape .speaker{height:60px;width:6px;top:50%;left:9px;margin-top:-30px;margin-left:0}.device.ios-with-notch.landscape .notch{border-top-right-radius:24px;border-bottom-right-radius:24px;border-bottom-left-radius:0;height:210px;width:30px;top:50%;margin-top:-105px;margin-left:unset;left:unset}.device.ios-with-notch.landscape .notch:before,.device.ios-with-notch.landscape .notch:after{left:0}.device.ios-with-notch.landscape .notch:after{background:radial-gradient(circle at bottom right,transparent 0,transparent 70%,#000 70%,#000 100%);top:auto;bottom:-8px}.device.ios-with-notch.landscape .notch:before{background:radial-gradient(circle at top right,transparent 0,transparent 70%,#000 70%,#000 100%);top:-8px}.device.ios{background:#464646;box-shadow:inset 0 0 3px #000000b3;border-radius:56px;padding:105px 24px}.device.ios:before{background:#080808;border-radius:50px;height:calc(100% - 12px);width:calc(100% - 12px);position:absolute;top:6px;left:6px;content:\"\"}.device.ios .home{background:linear-gradient(135deg,#080808,#464646,#080808);border-radius:100%;height:68px;width:68px;position:absolute;bottom:22px;left:50%;margin-left:-34px}.device.ios .home:before{background:#080808;border-radius:100%;height:calc(100% - 8px);width:calc(100% - 8px);position:absolute;top:4px;left:4px;content:\"\"}.device.ios .sleep{background:#464646;border-radius:0 2px 2px 0;height:66px;width:4px;position:absolute;top:190px;right:-4px}.device.ios .volume{background:#464646;border-radius:2px 0 0 2px;height:66px;width:4px;position:absolute;top:188px;left:-4px}.device.ios .volume:before{background:inherit;border-radius:2px 0 0 2px;height:40px;width:2px;position:absolute;top:-78px;left:2px;content:\"\"}.device.ios .volume:after{background:inherit;border-radius:2px 0 0 2px;height:66px;width:4px;position:absolute;top:82px;left:0;content:\"\"}.device.ios .camera{background:#080808;border-radius:100%;height:12px;width:12px;position:absolute;top:24px;left:50%;margin-left:-6px}.device.ios .sensor{background:#3c3d3d;border-radius:100%;height:16px;width:16px;position:absolute;top:49px;left:134px}.device.ios .speaker{background:#292728;border-radius:6px;height:6px;width:70px;position:absolute;top:54px;left:50%;margin-left:-35px}.device.ios.landscape{padding:24px 105px}.device.ios.landscape .sleep{border-radius:2px 2px 0 0;height:4px;width:66px;top:unset;bottom:100%;left:190px}.device.ios.landscape .volume{border-radius:0 0 2px 2px;height:4px;width:66px;bottom:-4px;top:unset;right:calc(100% - 254px);left:unset}.device.ios.landscape .volume:before{border-radius:0 0 2px 2px;height:2px;width:40px;top:unset;bottom:2px;left:-78px;right:auto}.device.ios.landscape .volume:after{border-radius:0 0 2px 2px;height:4px;width:66px;top:unset;bottom:0;right:-82px;left:unset}.device.ios.landscape .home{top:50%;right:22px;left:unset;margin-top:-34px;margin-left:unset}.device.ios.landscape .sensor{top:134px;right:calc(100% - 65px);left:unset}.device.ios.landscape .speaker{height:70px;width:6px;top:50%;right:calc(100% - 60px);left:unset;margin-top:-35px;margin-left:unset}.device.ios.landscape .camera{top:50%;right:calc(100% - 32px);left:unset;margin-top:-6px;margin-left:unset}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple]):not([ngNoCva])[formControlName],select:not([multiple]):not([ngNoCva])[formControl],select:not([multiple]):not([ngNoCva])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SiLivePreviewQrComponent, selector: "si-live-preview-qr", inputs: ["url", "urlShort"], outputs: ["closed"] }] });
512
553
  }
513
554
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewMobileModeComponent, decorators: [{
514
555
  type: Component,
515
- args: [{ selector: 'si-live-preview-mobile-mode', imports: [FormsModule, SiLivePreviewQrComponent], template: "<section class=\"settings-selection\">\n <select\n class=\"device-selection\"\n aria-label=\"Select preview device\"\n [ngModel]=\"selectedDevice()\"\n (ngModelChange)=\"selectDevice($event)\"\n >\n @for (device of availableDevices; track device.id) {\n <option [ngValue]=\"device\">\n {{ device.name }}\n </option>\n }\n </select>\n <div class=\"toggle-wrapper\">\n @if (landscapeEnabled) {\n <button\n type=\"button\"\n title=\"Rotate phone\"\n aria-label=\"Rotate phone\"\n [disabled]=\"!state.supportsLandscape()\"\n (click)=\"toggleLandscape()\"\n >\n @if (!landscape()) {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M105.34,240.51c.27.27.56.53.85.77s.29.22.44.33.33.25.51.37l.52.32.48.28c.18.1.37.18.55.27l.52.24.54.19c.19.07.37.14.57.2a5.36,5.36,0,0,0,.54.14c.2,0,.39.11.6.15s.42.06.63.09l.53.08a11.63,11.63,0,0,0,2.36,0l.53-.08c.21,0,.43-.05.63-.09l.6-.15a5.36,5.36,0,0,0,.54-.14c.2-.06.38-.13.57-.2l.54-.19.52-.24c.18-.09.37-.17.55-.27l.48-.28.52-.32c.18-.12.34-.25.51-.37l.44-.33c.29-.24.58-.5.85-.77l0,0,41.87-41.88a12,12,0,1,0-17-17L125.8,203V131.5A21.52,21.52,0,0,1,147.3,110h58.62a12,12,0,0,0,0-24H147.3a45.55,45.55,0,0,0-45.5,45.5V203L80.41,181.64a12,12,0,0,0-17,17l41.87,41.88Z\"\n />\n <path d=\"M100.8,400a12,12,0,1,0,0,24h100a12,12,0,0,0,0-24Z\" />\n <path d=\"M336.11,348h-.22a16,16,0,0,0,0,32h.22a16,16,0,0,0,0-32Z\" />\n <path\n d=\"M407.43,88H264.57C242.2,88,224,107.38,224,131.2V380.8c0,23.82,18.2,43.2,40.57,43.2H407.43C429.8,424,448,404.62,448,380.8V131.2C448,107.38,429.8,88,407.43,88ZM424,380.8c0,10.59-7.43,19.2-16.57,19.2H264.57c-9.14,0-16.57-8.61-16.57-19.2V131.2c0-10.59,7.43-19.2,16.57-19.2H274a12,12,0,0,0,12,12H386a12,12,0,0,0,12-12h9.43c9.14,0,16.57,8.61,16.57,19.2Z\"\n />\n </svg>\n } @else {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M86,147.3v58.62a12,12,0,0,0,24,0V147.3a21.52,21.52,0,0,1,21.5-21.5H203l-21.39,21.39a12,12,0,0,0,17,17l41.88-41.87,0,0c.27-.27.53-.56.77-.85l.32-.43c.13-.17.26-.34.38-.52s.21-.34.31-.52.2-.32.29-.48.18-.36.26-.54.17-.35.25-.53.13-.35.19-.53.14-.38.2-.58a4.58,4.58,0,0,0,.14-.53c0-.2.11-.4.15-.61s.06-.41.09-.61.06-.36.08-.55a10.88,10.88,0,0,0,.06-1.14v-.08a10.88,10.88,0,0,0-.06-1.14c0-.19-.05-.37-.08-.55s-.05-.41-.09-.61-.1-.41-.15-.61a4.58,4.58,0,0,0-.14-.53c-.06-.2-.13-.39-.2-.58s-.12-.36-.19-.53-.16-.35-.25-.53-.16-.36-.26-.54-.19-.32-.29-.48-.2-.35-.31-.52-.25-.35-.38-.52l-.32-.43c-.24-.29-.5-.58-.77-.85l0,0L198.61,63.44a12,12,0,0,0-17,17L203,101.8H131.5A45.55,45.55,0,0,0,86,147.3Z\"\n />\n <path d=\"M412,88.8a12,12,0,0,0-12,12v100a12,12,0,0,0,24,0v-100A12,12,0,0,0,412,88.8Z\" />\n <path d=\"M362.11,320h-.22a16,16,0,0,0,0,32h.22a16,16,0,0,0,0-32Z\" />\n <path\n d=\"M380.8,224H131.2C107.38,224,88,242.2,88,264.57V407.43C88,429.8,107.38,448,131.2,448H380.8c23.82,0,43.2-18.2,43.2-40.57V264.57C424,242.2,404.62,224,380.8,224ZM400,407.43c0,9.14-8.61,16.57-19.2,16.57H131.2c-10.59,0-19.2-7.43-19.2-16.57V398a12,12,0,0,0,12-12V286a12,12,0,0,0-12-12v-9.43c0-9.14,8.61-16.57,19.2-16.57H380.8c10.59,0,19.2,7.43,19.2,16.57Z\"\n />\n </svg>\n }\n </button>\n }\n @if (switcherEnabled) {\n <button\n type=\"button\"\n title=\"Toggle theme\"\n aria-label=\"Toggle theme\"\n (click)=\"state.toggleTheme()\"\n >\n @if (state.theme() === 'dark') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M256,349.82A93.82,93.82,0,1,0,162.18,256,93.93,93.93,0,0,0,256,349.82Zm0-163.64A69.82,69.82,0,1,1,186.18,256,69.9,69.9,0,0,1,256,186.18Z\"\n />\n <path\n d=\"M256,120.73a12,12,0,0,0,12-12V76a12,12,0,0,0-24,0v32.73A12,12,0,0,0,256,120.73Z\"\n />\n <path d=\"M268,436V403.27a12,12,0,0,0-24,0V436a12,12,0,0,0,24,0Z\" />\n <path d=\"M143.44,160.41a12,12,0,1,0,17-17l-23.23-23.23a12,12,0,1,0-17,17Z\" />\n <path\n d=\"M351.59,351.59a12,12,0,0,0,0,17l23.23,23.23a12,12,0,0,0,17-17l-23.23-23.23A12,12,0,0,0,351.59,351.59Z\"\n />\n <path\n d=\"M120.73,256a12,12,0,0,0-12-12H76a12,12,0,0,0,0,24h32.73A12,12,0,0,0,120.73,256Z\"\n />\n <path d=\"M436,244H403.27a12,12,0,0,0,0,24H436a12,12,0,0,0,0-24Z\" />\n <path\n d=\"M137.18,391.79l23.23-23.23a12,12,0,1,0-17-17l-23.23,23.23a12,12,0,1,0,17,17Z\"\n />\n <path\n d=\"M360.07,163.93a12,12,0,0,0,8.49-3.52l23.23-23.23a12,12,0,1,0-17-17l-23.23,23.23a12,12,0,0,0,8.48,20.49Z\"\n />\n </svg>\n } @else {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M360.07,147.88a12,12,0,0,0,5.89-21.1,168.05,168.05,0,0,0-214.71,0C80,186,70.19,292.1,129.38,363.35a166.9,166.9,0,0,0,113.77,59.93q7.9.74,15.75.73A166.74,166.74,0,0,0,366,385.22a12,12,0,0,0-5.89-21.1,109.33,109.33,0,0,1,0-216.24ZM244.43,275.77A133.48,133.48,0,0,0,330,381.08,144.11,144.11,0,0,1,147.84,348C97.1,287,105.51,196,166.58,145.24A144.08,144.08,0,0,1,330,130.94C272,152.38,234.91,212.29,244.43,275.77Z\"\n />\n </svg>\n }\n </button>\n }\n <button\n type=\"button\"\n title=\"Show QR code\"\n aria-label=\"Show QR code\"\n class=\"qr-button\"\n (click)=\"openQrMenu()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M100 180a12 12 0 01-12-12v-56a24 24 0 0124-24h56a12 12 0 010 24h-56v56a12 12 0 01-12 12zM412 180a12 12 0 01-12-12v-56h-56a12 12 0 010-24h56a24 24 0 0124 24v56a12 12 0 01-12 12zM168 424h-56a24 24 0 01-24-24v-56a12 12 0 0124 0v56h56a12 12 0 010 24zM400 424h-56a12 12 0 010-24h56v-56a12 12 0 0124 0v56a24 24 0 01-24 24zM176.11 172.11h27.79v27.79h-27.79zM424 304H88a12 12 0 010-24h336a12 12 0 010 24z\"\n />\n <path\n d=\"M244.37 377.69H137.4V318h24v35.69h82.97v24zM374.36 193.69h-24V158h-49.87v-24h73.87v59.69z\"\n />\n <path\n d=\"M189.34 318h48.05v24h-48.05zM350.37 318v35.69H333.1V318h-67.54v24h43.54v11.69h-23.86v24h89.13V318h-24zM242 238H138V134h104zm-80-24h56v-56h-56zM261.33 134h24v44.54h-24zM350.36 225.06h24v44.54h-24zM301.77 169h30.29v24h-30.29zM328.18 267h-64v-64h64zm-40-24h16v-16h-16z\"\n />\n </svg>\n @if (showQrMenu()) {\n <si-live-preview-qr\n title=\"\"\n [url]=\"plainUrl()\"\n [urlShort]=\"plainUrlShort()\"\n (closed)=\"showQrMenu.set(false)\"\n />\n }\n </button>\n </div>\n</section>\n\n<div\n class=\"device\"\n [class.md]=\"mode() !== 'ios'\"\n [class.ios]=\"mode() === 'ios' && !showNotch()\"\n [class.ios-with-notch]=\"mode() === 'ios' && showNotch()\"\n [class.dark]=\"state.theme() === 'dark'\"\n [class.landscape]=\"landscape()\"\n>\n @if (mode() !== 'ios') {\n <div class=\"wrapper\">\n <svg class=\"md-bar\" viewBox=\"0 0 130 40.3\" [class.dark]=\"state.theme() === 'dark'\">\n <path\n d=\"m 16,4.2 h 64 c 8.8,0 16,7.2 16,16 0,8.8 -7.2,16 -16,16 H 16 C 7.2,36.2 0,29 0,20.2 0,11.4 7.2,4.2 16,4.2 Z\"\n />\n </svg>\n <svg class=\"md-bar\" viewBox=\"0 0 199.99999 40.3\" [class.dark]=\"state.theme() === 'dark'\">\n <path\n d=\"M 155,5.0124996 173.8,37.3125 c 0.8,1.3 2.7,1.3 3.5,0 L 196,5.0124996 c 0.8,-1.3 -0.2,-3 -1.7,-3 h -37.6 c -1.5,0 -2.5,1.7 -1.7,3 z\"\n />\n <circle r=\"20\" cy=\"20.15\" cx=\"111\" class=\"st0\" />\n <path\n d=\"m 25,1.1499996 h 30 c 2.2,0 4,1.8 4,4 V 35.15 c 0,2.2 -1.8,4 -4,4 H 25 c -2.2,0 -4,-1.8 -4,-4 V 5.1499996 c 0,-2.3 1.8,-4 4,-4 z\"\n />\n </svg>\n </div>\n } @else {\n @if (showNotch()) {\n <!-- iOS devices with notch -->\n <div class=\"notch\">\n <div class=\"camera\"></div>\n <div class=\"speaker\"></div>\n </div>\n <div class=\"sleep\"></div>\n <div class=\"volume\"></div>\n } @else {\n <!-- iOS devices without notch -->\n <div class=\"camera\"></div>\n <div class=\"speaker\"></div>\n <div class=\"sensor\"></div>\n <div class=\"sleep\"></div>\n <div class=\"volume\"></div>\n <div class=\"home\"></div>\n }\n }\n\n <div class=\"screen\">\n <iframe\n #previewIframe\n src=\"#/iframe\"\n title=\"Mobile example view\"\n [height]=\"currentIFrameHeight()\"\n [width]=\"currentIFrameWidth()\"\n ></iframe>\n </div>\n</div>\n", styles: ["*:focus-visible{outline:var(--element-button-focus-width) solid var(--si-sys-color-effects-focus);outline-offset:var(--element-button-focus-overlay-width)}:host{display:block}iframe{border:0;display:block}.settings-selection{display:flex;align-items:center;justify-content:space-between;margin-block:10px 20px;margin-inline:0}.settings-selection .toggle-wrapper{display:flex}.settings-selection .toggle-wrapper button{background:var(--si-sys-color-background-accent-secondary);display:flex;align-items:center;justify-content:center;block-size:40px;inline-size:40px;border:1px solid var(--si-sys-color-border-4);border-radius:50%;margin-inline-start:10px;position:relative}.settings-selection .toggle-wrapper button>svg{block-size:24px;fill:var(--si-sys-color-text-primary)}.settings-selection .toggle-wrapper button>svg:hover{fill:var(--si-sys-color-text-accent-hover)}.settings-selection .toggle-wrapper button:disabled>svg{fill:var(--si-sys-color-text-primary)}.device-selection{appearance:none;background-color:var(--si-sys-color-background-0);background-image:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M352.79 203.21a12.45 12.45 0 011.44 15.86l-1.44 1.72-88 88a12.45 12.45 0 01-15.86 1.44l-1.72-1.44-88-88a12.43 12.43 0 0115.86-19l1.72 1.44L256 282.42l79.21-79.21a12.45 12.45 0 0115.86-1.44z'/></svg>\");background-repeat:no-repeat;background-position:right 2px top 50%;color:var(--si-sys-color-text-primary);block-size:35px;min-inline-size:200px;border-radius:2px;border:1px solid var(--si-sys-color-border-4);padding:6px;margin-block:0;display:flex;flex:1}.device{position:relative;box-sizing:content-box}.device .screen{background:var(--si-sys-color-background-0);box-shadow:0 0 0 3px #111;border-radius:1px;block-size:100%;inline-size:100%;position:relative;overflow:hidden;display:block}.device.md{margin-top:20px;box-shadow:0 0 0 14px #090a0d,0 0 0 17px #9fa3a8,0 0 34px 17px #0003;overflow:hidden;border-radius:20px}.device.md .wrapper{margin:0 auto;position:absolute;top:0;left:0;right:0;z-index:4;display:flex;height:25px;justify-content:space-between}.device.md .wrapper .md-bar{fill:#090a0d;opacity:.2;padding:7px 11px}.device.md .wrapper .md-bar.dark{fill:#fff;opacity:.5}.device.ios-with-notch{padding:26px;background:#fdfdfd;box-shadow:inset 0 0 11px #000;border-radius:66px}.device.ios-with-notch:before{background:#000;border-radius:61px;height:calc(100% - 10px);width:calc(100% - 10px);position:absolute;top:5px;left:5px;content:\"\"}.device.ios-with-notch:after{background:#00000080;border-radius:2px;height:4px;width:130px;position:absolute;right:0;bottom:32px;left:0;content:\"\";margin:0 auto}.device.ios-with-notch.dark:after{background:#fff;opacity:.5}.device.ios-with-notch .screen{border-radius:40px}.device.ios-with-notch .volume,.device.ios-with-notch .volume:before,.device.ios-with-notch .volume:after,.device.ios-with-notch .sleep{background:#b5b5b5;width:3px;position:absolute}.device.ios-with-notch .volume{height:32px;top:116px;left:-3px}.device.ios-with-notch .volume:before{height:62px;top:62px;left:0;content:\"\"}.device.ios-with-notch .volume:after{height:62px;top:140px;left:0;content:\"\"}.device.ios-with-notch .sleep{height:96px;top:200px;right:-3px}.device.ios-with-notch .camera{background:#0d4d71;border-radius:100%;height:6px;width:6px;position:absolute;top:9px;left:154px}.device.ios-with-notch .speaker{background:#171818;border-radius:6px;height:6px;width:60px;position:absolute;top:9px;left:50%;margin-left:-30px}.device.ios-with-notch .notch{background:#000;border-bottom-left-radius:24px;border-bottom-right-radius:24px;height:30px;width:210px;position:absolute;top:26px;left:50%;margin-left:-105px;z-index:4}.device.ios-with-notch .notch:before,.device.ios-with-notch .notch:after{height:8px;width:8px;position:absolute;top:0;content:\"\"}.device.ios-with-notch .notch:after{background:radial-gradient(circle at bottom left,transparent 0,transparent 70%,#000 70%,#000 100%);left:-8px}.device.ios-with-notch .notch:before{background:radial-gradient(circle at bottom right,transparent 0,transparent 70%,#000 70%,#000 100%);right:-8px}.device.ios-with-notch.landscape .volume,.device.ios-with-notch.landscape .volume:before,.device.ios-with-notch.landscape .volume:after,.device.ios-with-notch.landscape .sleep{height:3px}.device.ios-with-notch.landscape .volume{width:32px;top:auto;left:116px;bottom:-3px}.device.ios-with-notch.landscape .volume:before{width:62px;top:0;left:62px}.device.ios-with-notch.landscape .volume:after{width:62px;top:0;left:140px}.device.ios-with-notch.landscape .sleep{width:96px;top:-3px;right:auto;left:200px}.device.ios-with-notch.landscape .camera{top:auto;bottom:154px;left:9px}.device.ios-with-notch.landscape .speaker{height:60px;width:6px;top:50%;left:9px;margin-top:-30px;margin-left:0}.device.ios-with-notch.landscape .notch{border-top-right-radius:24px;border-bottom-right-radius:24px;border-bottom-left-radius:0;height:210px;width:30px;top:50%;margin-top:-105px;margin-left:unset;left:unset}.device.ios-with-notch.landscape .notch:before,.device.ios-with-notch.landscape .notch:after{left:0}.device.ios-with-notch.landscape .notch:after{background:radial-gradient(circle at bottom right,transparent 0,transparent 70%,#000 70%,#000 100%);top:auto;bottom:-8px}.device.ios-with-notch.landscape .notch:before{background:radial-gradient(circle at top right,transparent 0,transparent 70%,#000 70%,#000 100%);top:-8px}.device.ios{background:#464646;box-shadow:inset 0 0 3px #000000b3;border-radius:56px;padding:105px 24px}.device.ios:before{background:#080808;border-radius:50px;height:calc(100% - 12px);width:calc(100% - 12px);position:absolute;top:6px;left:6px;content:\"\"}.device.ios .home{background:linear-gradient(135deg,#080808,#464646,#080808);border-radius:100%;height:68px;width:68px;position:absolute;bottom:22px;left:50%;margin-left:-34px}.device.ios .home:before{background:#080808;border-radius:100%;height:calc(100% - 8px);width:calc(100% - 8px);position:absolute;top:4px;left:4px;content:\"\"}.device.ios .sleep{background:#464646;border-radius:0 2px 2px 0;height:66px;width:4px;position:absolute;top:190px;right:-4px}.device.ios .volume{background:#464646;border-radius:2px 0 0 2px;height:66px;width:4px;position:absolute;top:188px;left:-4px}.device.ios .volume:before{background:inherit;border-radius:2px 0 0 2px;height:40px;width:2px;position:absolute;top:-78px;left:2px;content:\"\"}.device.ios .volume:after{background:inherit;border-radius:2px 0 0 2px;height:66px;width:4px;position:absolute;top:82px;left:0;content:\"\"}.device.ios .camera{background:#080808;border-radius:100%;height:12px;width:12px;position:absolute;top:24px;left:50%;margin-left:-6px}.device.ios .sensor{background:#3c3d3d;border-radius:100%;height:16px;width:16px;position:absolute;top:49px;left:134px}.device.ios .speaker{background:#292728;border-radius:6px;height:6px;width:70px;position:absolute;top:54px;left:50%;margin-left:-35px}.device.ios.landscape{padding:24px 105px}.device.ios.landscape .sleep{border-radius:2px 2px 0 0;height:4px;width:66px;top:unset;bottom:100%;left:190px}.device.ios.landscape .volume{border-radius:0 0 2px 2px;height:4px;width:66px;bottom:-4px;top:unset;right:calc(100% - 254px);left:unset}.device.ios.landscape .volume:before{border-radius:0 0 2px 2px;height:2px;width:40px;top:unset;bottom:2px;left:-78px;right:auto}.device.ios.landscape .volume:after{border-radius:0 0 2px 2px;height:4px;width:66px;top:unset;bottom:0;right:-82px;left:unset}.device.ios.landscape .home{top:50%;right:22px;left:unset;margin-top:-34px;margin-left:unset}.device.ios.landscape .sensor{top:134px;right:calc(100% - 65px);left:unset}.device.ios.landscape .speaker{height:70px;width:6px;top:50%;right:calc(100% - 60px);left:unset;margin-top:-35px;margin-left:unset}.device.ios.landscape .camera{top:50%;right:calc(100% - 32px);left:unset;margin-top:-6px;margin-left:unset}\n"] }]
556
+ args: [{ selector: 'si-live-preview-mobile-mode', imports: [FormsModule, SiLivePreviewQrComponent], template: "<section class=\"settings-selection\">\n <select\n class=\"device-selection\"\n aria-label=\"Select preview device\"\n [ngModel]=\"selectedDevice()\"\n (ngModelChange)=\"selectDevice($event)\"\n >\n @for (device of availableDevices; track device.id) {\n <option [ngValue]=\"device\">\n {{ device.name }}\n </option>\n }\n </select>\n <div class=\"toggle-wrapper\">\n @if (landscapeEnabled) {\n <button\n type=\"button\"\n title=\"Rotate phone\"\n aria-label=\"Rotate phone\"\n [disabled]=\"!state.supportsLandscape()\"\n (click)=\"toggleLandscape()\"\n >\n @if (!landscape()) {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M105.34,240.51c.27.27.56.53.85.77s.29.22.44.33.33.25.51.37l.52.32.48.28c.18.1.37.18.55.27l.52.24.54.19c.19.07.37.14.57.2a5.36,5.36,0,0,0,.54.14c.2,0,.39.11.6.15s.42.06.63.09l.53.08a11.63,11.63,0,0,0,2.36,0l.53-.08c.21,0,.43-.05.63-.09l.6-.15a5.36,5.36,0,0,0,.54-.14c.2-.06.38-.13.57-.2l.54-.19.52-.24c.18-.09.37-.17.55-.27l.48-.28.52-.32c.18-.12.34-.25.51-.37l.44-.33c.29-.24.58-.5.85-.77l0,0,41.87-41.88a12,12,0,1,0-17-17L125.8,203V131.5A21.52,21.52,0,0,1,147.3,110h58.62a12,12,0,0,0,0-24H147.3a45.55,45.55,0,0,0-45.5,45.5V203L80.41,181.64a12,12,0,0,0-17,17l41.87,41.88Z\"\n />\n <path d=\"M100.8,400a12,12,0,1,0,0,24h100a12,12,0,0,0,0-24Z\" />\n <path d=\"M336.11,348h-.22a16,16,0,0,0,0,32h.22a16,16,0,0,0,0-32Z\" />\n <path\n d=\"M407.43,88H264.57C242.2,88,224,107.38,224,131.2V380.8c0,23.82,18.2,43.2,40.57,43.2H407.43C429.8,424,448,404.62,448,380.8V131.2C448,107.38,429.8,88,407.43,88ZM424,380.8c0,10.59-7.43,19.2-16.57,19.2H264.57c-9.14,0-16.57-8.61-16.57-19.2V131.2c0-10.59,7.43-19.2,16.57-19.2H274a12,12,0,0,0,12,12H386a12,12,0,0,0,12-12h9.43c9.14,0,16.57,8.61,16.57,19.2Z\"\n />\n </svg>\n } @else {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M86,147.3v58.62a12,12,0,0,0,24,0V147.3a21.52,21.52,0,0,1,21.5-21.5H203l-21.39,21.39a12,12,0,0,0,17,17l41.88-41.87,0,0c.27-.27.53-.56.77-.85l.32-.43c.13-.17.26-.34.38-.52s.21-.34.31-.52.2-.32.29-.48.18-.36.26-.54.17-.35.25-.53.13-.35.19-.53.14-.38.2-.58a4.58,4.58,0,0,0,.14-.53c0-.2.11-.4.15-.61s.06-.41.09-.61.06-.36.08-.55a10.88,10.88,0,0,0,.06-1.14v-.08a10.88,10.88,0,0,0-.06-1.14c0-.19-.05-.37-.08-.55s-.05-.41-.09-.61-.1-.41-.15-.61a4.58,4.58,0,0,0-.14-.53c-.06-.2-.13-.39-.2-.58s-.12-.36-.19-.53-.16-.35-.25-.53-.16-.36-.26-.54-.19-.32-.29-.48-.2-.35-.31-.52-.25-.35-.38-.52l-.32-.43c-.24-.29-.5-.58-.77-.85l0,0L198.61,63.44a12,12,0,0,0-17,17L203,101.8H131.5A45.55,45.55,0,0,0,86,147.3Z\"\n />\n <path d=\"M412,88.8a12,12,0,0,0-12,12v100a12,12,0,0,0,24,0v-100A12,12,0,0,0,412,88.8Z\" />\n <path d=\"M362.11,320h-.22a16,16,0,0,0,0,32h.22a16,16,0,0,0,0-32Z\" />\n <path\n d=\"M380.8,224H131.2C107.38,224,88,242.2,88,264.57V407.43C88,429.8,107.38,448,131.2,448H380.8c23.82,0,43.2-18.2,43.2-40.57V264.57C424,242.2,404.62,224,380.8,224ZM400,407.43c0,9.14-8.61,16.57-19.2,16.57H131.2c-10.59,0-19.2-7.43-19.2-16.57V398a12,12,0,0,0,12-12V286a12,12,0,0,0-12-12v-9.43c0-9.14,8.61-16.57,19.2-16.57H380.8c10.59,0,19.2,7.43,19.2,16.57Z\"\n />\n </svg>\n }\n </button>\n }\n @if (switcherEnabled) {\n <button\n type=\"button\"\n title=\"Toggle theme\"\n aria-label=\"Toggle theme\"\n (click)=\"state.toggleTheme()\"\n >\n @if (state.theme() === 'dark') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M256,349.82A93.82,93.82,0,1,0,162.18,256,93.93,93.93,0,0,0,256,349.82Zm0-163.64A69.82,69.82,0,1,1,186.18,256,69.9,69.9,0,0,1,256,186.18Z\"\n />\n <path\n d=\"M256,120.73a12,12,0,0,0,12-12V76a12,12,0,0,0-24,0v32.73A12,12,0,0,0,256,120.73Z\"\n />\n <path d=\"M268,436V403.27a12,12,0,0,0-24,0V436a12,12,0,0,0,24,0Z\" />\n <path d=\"M143.44,160.41a12,12,0,1,0,17-17l-23.23-23.23a12,12,0,1,0-17,17Z\" />\n <path\n d=\"M351.59,351.59a12,12,0,0,0,0,17l23.23,23.23a12,12,0,0,0,17-17l-23.23-23.23A12,12,0,0,0,351.59,351.59Z\"\n />\n <path\n d=\"M120.73,256a12,12,0,0,0-12-12H76a12,12,0,0,0,0,24h32.73A12,12,0,0,0,120.73,256Z\"\n />\n <path d=\"M436,244H403.27a12,12,0,0,0,0,24H436a12,12,0,0,0,0-24Z\" />\n <path\n d=\"M137.18,391.79l23.23-23.23a12,12,0,1,0-17-17l-23.23,23.23a12,12,0,1,0,17,17Z\"\n />\n <path\n d=\"M360.07,163.93a12,12,0,0,0,8.49-3.52l23.23-23.23a12,12,0,1,0-17-17l-23.23,23.23a12,12,0,0,0,8.48,20.49Z\"\n />\n </svg>\n } @else {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M360.07,147.88a12,12,0,0,0,5.89-21.1,168.05,168.05,0,0,0-214.71,0C80,186,70.19,292.1,129.38,363.35a166.9,166.9,0,0,0,113.77,59.93q7.9.74,15.75.73A166.74,166.74,0,0,0,366,385.22a12,12,0,0,0-5.89-21.1,109.33,109.33,0,0,1,0-216.24ZM244.43,275.77A133.48,133.48,0,0,0,330,381.08,144.11,144.11,0,0,1,147.84,348C97.1,287,105.51,196,166.58,145.24A144.08,144.08,0,0,1,330,130.94C272,152.38,234.91,212.29,244.43,275.77Z\"\n />\n </svg>\n }\n </button>\n }\n <button\n type=\"button\"\n title=\"Show QR code\"\n aria-label=\"Show QR code\"\n class=\"qr-button\"\n (click)=\"openQrMenu()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M100 180a12 12 0 01-12-12v-56a24 24 0 0124-24h56a12 12 0 010 24h-56v56a12 12 0 01-12 12zM412 180a12 12 0 01-12-12v-56h-56a12 12 0 010-24h56a24 24 0 0124 24v56a12 12 0 01-12 12zM168 424h-56a24 24 0 01-24-24v-56a12 12 0 0124 0v56h56a12 12 0 010 24zM400 424h-56a12 12 0 010-24h56v-56a12 12 0 0124 0v56a24 24 0 01-24 24zM176.11 172.11h27.79v27.79h-27.79zM424 304H88a12 12 0 010-24h336a12 12 0 010 24z\"\n />\n <path\n d=\"M244.37 377.69H137.4V318h24v35.69h82.97v24zM374.36 193.69h-24V158h-49.87v-24h73.87v59.69z\"\n />\n <path\n d=\"M189.34 318h48.05v24h-48.05zM350.37 318v35.69H333.1V318h-67.54v24h43.54v11.69h-23.86v24h89.13V318h-24zM242 238H138V134h104zm-80-24h56v-56h-56zM261.33 134h24v44.54h-24zM350.36 225.06h24v44.54h-24zM301.77 169h30.29v24h-30.29zM328.18 267h-64v-64h64zm-40-24h16v-16h-16z\"\n />\n </svg>\n @if (showQrMenu()) {\n <si-live-preview-qr\n title=\"\"\n [url]=\"plainUrl()\"\n [urlShort]=\"plainUrlShort()\"\n (closed)=\"showQrMenu.set(false)\"\n />\n }\n </button>\n </div>\n</section>\n\n<div\n class=\"device\"\n [class.md]=\"mode() !== 'ios'\"\n [class.ios]=\"mode() === 'ios' && !showNotch()\"\n [class.ios-with-notch]=\"mode() === 'ios' && showNotch()\"\n [class.dark]=\"state.theme() === 'dark'\"\n [class.landscape]=\"landscape()\"\n>\n @if (mode() !== 'ios') {\n <div class=\"wrapper\">\n <svg class=\"md-bar\" viewBox=\"0 0 130 40.3\" [class.dark]=\"state.theme() === 'dark'\">\n <path\n d=\"m 16,4.2 h 64 c 8.8,0 16,7.2 16,16 0,8.8 -7.2,16 -16,16 H 16 C 7.2,36.2 0,29 0,20.2 0,11.4 7.2,4.2 16,4.2 Z\"\n />\n </svg>\n <svg class=\"md-bar\" viewBox=\"0 0 199.99999 40.3\" [class.dark]=\"state.theme() === 'dark'\">\n <path\n d=\"M 155,5.0124996 173.8,37.3125 c 0.8,1.3 2.7,1.3 3.5,0 L 196,5.0124996 c 0.8,-1.3 -0.2,-3 -1.7,-3 h -37.6 c -1.5,0 -2.5,1.7 -1.7,3 z\"\n />\n <circle r=\"20\" cy=\"20.15\" cx=\"111\" class=\"st0\" />\n <path\n d=\"m 25,1.1499996 h 30 c 2.2,0 4,1.8 4,4 V 35.15 c 0,2.2 -1.8,4 -4,4 H 25 c -2.2,0 -4,-1.8 -4,-4 V 5.1499996 c 0,-2.3 1.8,-4 4,-4 z\"\n />\n </svg>\n </div>\n } @else {\n @if (showNotch()) {\n <!-- iOS devices with notch -->\n <div class=\"notch\">\n <div class=\"camera\"></div>\n <div class=\"speaker\"></div>\n </div>\n <div class=\"sleep\"></div>\n <div class=\"volume\"></div>\n } @else {\n <!-- iOS devices without notch -->\n <div class=\"camera\"></div>\n <div class=\"speaker\"></div>\n <div class=\"sensor\"></div>\n <div class=\"sleep\"></div>\n <div class=\"volume\"></div>\n <div class=\"home\"></div>\n }\n }\n\n <div class=\"screen\">\n <iframe\n #previewIframe\n title=\"Mobile example view\"\n [src]=\"previewUrl\"\n [height]=\"currentIFrameHeight()\"\n [width]=\"currentIFrameWidth()\"\n ></iframe>\n </div>\n</div>\n", styles: ["*:focus-visible{outline:var(--si-sys-sizing-focus-ring-width, 2px) solid var(--si-sys-color-effects-focus);outline-offset:var(--si-sys-sizing-focus-ring-offset, 1px)}:host{display:block}iframe{border:0;display:block}.settings-selection{display:flex;align-items:center;justify-content:space-between;margin-block:10px 20px;margin-inline:0}.settings-selection .toggle-wrapper{display:flex}.settings-selection .toggle-wrapper button{background:var(--si-sys-color-background-accent-secondary);display:flex;align-items:center;justify-content:center;block-size:40px;inline-size:40px;border:1px solid var(--si-sys-color-border-4);border-radius:50%;margin-inline-start:10px;position:relative}.settings-selection .toggle-wrapper button>svg{block-size:24px;fill:var(--si-sys-color-text-primary)}.settings-selection .toggle-wrapper button>svg:hover{fill:var(--si-sys-color-text-accent-hover)}.settings-selection .toggle-wrapper button:disabled>svg{fill:var(--si-sys-color-text-primary)}.device-selection{appearance:none;background-color:var(--si-sys-color-background-0);background-image:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M352.79 203.21a12.45 12.45 0 011.44 15.86l-1.44 1.72-88 88a12.45 12.45 0 01-15.86 1.44l-1.72-1.44-88-88a12.43 12.43 0 0115.86-19l1.72 1.44L256 282.42l79.21-79.21a12.45 12.45 0 0115.86-1.44z'/></svg>\");background-repeat:no-repeat;background-position:right 2px top 50%;color:var(--si-sys-color-text-primary);block-size:35px;min-inline-size:200px;border-radius:2px;border:1px solid var(--si-sys-color-border-4);padding:6px;margin-block:0;display:flex;flex:1}.device{position:relative;box-sizing:content-box}.device .screen{background:var(--si-sys-color-background-0);box-shadow:0 0 0 3px #111;border-radius:1px;block-size:100%;inline-size:100%;position:relative;overflow:hidden;display:block}.device.md{margin-top:20px;box-shadow:0 0 0 14px #090a0d,0 0 0 17px #9fa3a8,0 0 34px 17px #0003;overflow:hidden;border-radius:20px}.device.md .wrapper{margin:0 auto;position:absolute;top:0;left:0;right:0;z-index:4;display:flex;height:25px;justify-content:space-between}.device.md .wrapper .md-bar{fill:#090a0d;opacity:.2;padding:7px 11px}.device.md .wrapper .md-bar.dark{fill:#fff;opacity:.5}.device.ios-with-notch{padding:26px;background:#fdfdfd;box-shadow:inset 0 0 11px #000;border-radius:66px}.device.ios-with-notch:before{background:#000;border-radius:61px;height:calc(100% - 10px);width:calc(100% - 10px);position:absolute;top:5px;left:5px;content:\"\"}.device.ios-with-notch:after{background:#00000080;border-radius:2px;height:4px;width:130px;position:absolute;right:0;bottom:32px;left:0;content:\"\";margin:0 auto}.device.ios-with-notch.dark:after{background:#fff;opacity:.5}.device.ios-with-notch .screen{border-radius:40px}.device.ios-with-notch .volume,.device.ios-with-notch .volume:before,.device.ios-with-notch .volume:after,.device.ios-with-notch .sleep{background:#b5b5b5;width:3px;position:absolute}.device.ios-with-notch .volume{height:32px;top:116px;left:-3px}.device.ios-with-notch .volume:before{height:62px;top:62px;left:0;content:\"\"}.device.ios-with-notch .volume:after{height:62px;top:140px;left:0;content:\"\"}.device.ios-with-notch .sleep{height:96px;top:200px;right:-3px}.device.ios-with-notch .camera{background:#0d4d71;border-radius:100%;height:6px;width:6px;position:absolute;top:9px;left:154px}.device.ios-with-notch .speaker{background:#171818;border-radius:6px;height:6px;width:60px;position:absolute;top:9px;left:50%;margin-left:-30px}.device.ios-with-notch .notch{background:#000;border-bottom-left-radius:24px;border-bottom-right-radius:24px;height:30px;width:210px;position:absolute;top:26px;left:50%;margin-left:-105px;z-index:4}.device.ios-with-notch .notch:before,.device.ios-with-notch .notch:after{height:8px;width:8px;position:absolute;top:0;content:\"\"}.device.ios-with-notch .notch:after{background:radial-gradient(circle at bottom left,transparent 0,transparent 70%,#000 70%,#000 100%);left:-8px}.device.ios-with-notch .notch:before{background:radial-gradient(circle at bottom right,transparent 0,transparent 70%,#000 70%,#000 100%);right:-8px}.device.ios-with-notch.landscape .volume,.device.ios-with-notch.landscape .volume:before,.device.ios-with-notch.landscape .volume:after,.device.ios-with-notch.landscape .sleep{height:3px}.device.ios-with-notch.landscape .volume{width:32px;top:auto;left:116px;bottom:-3px}.device.ios-with-notch.landscape .volume:before{width:62px;top:0;left:62px}.device.ios-with-notch.landscape .volume:after{width:62px;top:0;left:140px}.device.ios-with-notch.landscape .sleep{width:96px;top:-3px;right:auto;left:200px}.device.ios-with-notch.landscape .camera{top:auto;bottom:154px;left:9px}.device.ios-with-notch.landscape .speaker{height:60px;width:6px;top:50%;left:9px;margin-top:-30px;margin-left:0}.device.ios-with-notch.landscape .notch{border-top-right-radius:24px;border-bottom-right-radius:24px;border-bottom-left-radius:0;height:210px;width:30px;top:50%;margin-top:-105px;margin-left:unset;left:unset}.device.ios-with-notch.landscape .notch:before,.device.ios-with-notch.landscape .notch:after{left:0}.device.ios-with-notch.landscape .notch:after{background:radial-gradient(circle at bottom right,transparent 0,transparent 70%,#000 70%,#000 100%);top:auto;bottom:-8px}.device.ios-with-notch.landscape .notch:before{background:radial-gradient(circle at top right,transparent 0,transparent 70%,#000 70%,#000 100%);top:-8px}.device.ios{background:#464646;box-shadow:inset 0 0 3px #000000b3;border-radius:56px;padding:105px 24px}.device.ios:before{background:#080808;border-radius:50px;height:calc(100% - 12px);width:calc(100% - 12px);position:absolute;top:6px;left:6px;content:\"\"}.device.ios .home{background:linear-gradient(135deg,#080808,#464646,#080808);border-radius:100%;height:68px;width:68px;position:absolute;bottom:22px;left:50%;margin-left:-34px}.device.ios .home:before{background:#080808;border-radius:100%;height:calc(100% - 8px);width:calc(100% - 8px);position:absolute;top:4px;left:4px;content:\"\"}.device.ios .sleep{background:#464646;border-radius:0 2px 2px 0;height:66px;width:4px;position:absolute;top:190px;right:-4px}.device.ios .volume{background:#464646;border-radius:2px 0 0 2px;height:66px;width:4px;position:absolute;top:188px;left:-4px}.device.ios .volume:before{background:inherit;border-radius:2px 0 0 2px;height:40px;width:2px;position:absolute;top:-78px;left:2px;content:\"\"}.device.ios .volume:after{background:inherit;border-radius:2px 0 0 2px;height:66px;width:4px;position:absolute;top:82px;left:0;content:\"\"}.device.ios .camera{background:#080808;border-radius:100%;height:12px;width:12px;position:absolute;top:24px;left:50%;margin-left:-6px}.device.ios .sensor{background:#3c3d3d;border-radius:100%;height:16px;width:16px;position:absolute;top:49px;left:134px}.device.ios .speaker{background:#292728;border-radius:6px;height:6px;width:70px;position:absolute;top:54px;left:50%;margin-left:-35px}.device.ios.landscape{padding:24px 105px}.device.ios.landscape .sleep{border-radius:2px 2px 0 0;height:4px;width:66px;top:unset;bottom:100%;left:190px}.device.ios.landscape .volume{border-radius:0 0 2px 2px;height:4px;width:66px;bottom:-4px;top:unset;right:calc(100% - 254px);left:unset}.device.ios.landscape .volume:before{border-radius:0 0 2px 2px;height:2px;width:40px;top:unset;bottom:2px;left:-78px;right:auto}.device.ios.landscape .volume:after{border-radius:0 0 2px 2px;height:4px;width:66px;top:unset;bottom:0;right:-82px;left:unset}.device.ios.landscape .home{top:50%;right:22px;left:unset;margin-top:-34px;margin-left:unset}.device.ios.landscape .sensor{top:134px;right:calc(100% - 65px);left:unset}.device.ios.landscape .speaker{height:70px;width:6px;top:50%;right:calc(100% - 60px);left:unset;margin-top:-35px;margin-left:unset}.device.ios.landscape .camera{top:50%;right:calc(100% - 32px);left:unset;margin-top:-6px;margin-left:unset}\n"] }]
516
557
  }], ctorParameters: () => [], propDecorators: { previewIframe: [{ type: i0.ViewChild, args: ['previewIframe', { isSignal: true }] }], iframeChange: [{ type: i0.Output, args: ["iframeChange"] }] } });
517
558
 
518
559
  /**
@@ -527,16 +568,18 @@ class SiLivePreviewIframeComponent {
527
568
  rendererInProgress = false;
528
569
  previewIframeRef = signal(undefined, /* @ts-ignore */
529
570
  ...(ngDevMode ? [{ debugName: "previewIframeRef" }] : /* istanbul ignore next */ []));
571
+ rendererReady = signal(false, /* @ts-ignore */
572
+ ...(ngDevMode ? [{ debugName: "rendererReady" }] : /* istanbul ignore next */ []));
530
573
  previewIframe = this.previewIframeRef.asReadonly();
531
574
  internalConfig = inject(SI_LIVE_PREVIEW_INTERNALS);
532
- config = inject(SI_LIVE_PREVIEW_CONFIG);
575
+ urls = inject(LivePreviewUrlService);
533
576
  ngZone = inject(NgZone);
534
577
  destroyRef = inject(DestroyRef);
535
578
  cdRef = inject(ChangeDetectorRef);
536
579
  isMobile = this.internalConfig.isMobile;
537
- ticketLinkBug = computed(() => `${this.config.ticketBaseUrl}?issue%5Btitle%5D=%3C${this.state.example()}%3E:&issuable_template=Bug`, /* @ts-ignore */
580
+ ticketLinkBug = computed(() => this.urls.issueUrl('Bug'), /* @ts-ignore */
538
581
  ...(ngDevMode ? [{ debugName: "ticketLinkBug" }] : /* istanbul ignore next */ []));
539
- ticketLinkFeature = computed(() => `${this.config.ticketBaseUrl}?issue%5Btitle%5D=%3C${this.state.example()}%3E:&issuable_template=Feature Request`, /* @ts-ignore */
582
+ ticketLinkFeature = computed(() => this.urls.issueUrl('Feature Request'), /* @ts-ignore */
540
583
  ...(ngDevMode ? [{ debugName: "ticketLinkFeature" }] : /* istanbul ignore next */ []));
541
584
  constructor() {
542
585
  effect(() => {
@@ -557,7 +600,7 @@ class SiLivePreviewIframeComponent {
557
600
  onMessage(event) {
558
601
  const previewWindow = this.previewIframe()?.nativeElement.contentWindow;
559
602
  if (!previewWindow ||
560
- event.origin !== window.location.origin ||
603
+ event.origin !== this.urls.origin ||
561
604
  event.source !== previewWindow ||
562
605
  event.data?.src !== 'renderer') {
563
606
  return;
@@ -567,6 +610,7 @@ class SiLivePreviewIframeComponent {
567
610
  onMessageInZone(event) {
568
611
  switch (event.data.type) {
569
612
  case 'ready':
613
+ this.rendererReady.set(true);
570
614
  this.sendMessage();
571
615
  break;
572
616
  case 'landscapeMode':
@@ -608,9 +652,13 @@ class SiLivePreviewIframeComponent {
608
652
  this.sendMessage();
609
653
  }
610
654
  setPreviewIframe(iframe) {
655
+ this.rendererReady.set(false);
611
656
  this.previewIframeRef.set(iframe);
612
657
  }
613
658
  sendMessage() {
659
+ if (!this.rendererReady()) {
660
+ return;
661
+ }
614
662
  const viewport = this.state.viewport();
615
663
  this.previewIframe()?.nativeElement.contentWindow.postMessage({
616
664
  src: 'editor',
@@ -629,7 +677,7 @@ class SiLivePreviewIframeComponent {
629
677
  safeAreaBottom: viewport.safeAreaBottom,
630
678
  safeAreaLeft: viewport.safeAreaLeft,
631
679
  safeAreaRight: viewport.safeAreaRight
632
- }, window.location.origin);
680
+ }, this.urls.origin);
633
681
  }
634
682
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewIframeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
635
683
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiLivePreviewIframeComponent, isStandalone: true, selector: "si-live-preview-iframe", inputs: { isFullscreen: { classPropertyName: "isFullscreen", publicName: "isFullscreen", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { templateFromComponent: "templateFromComponent" }, host: { properties: { "class.is-mobile": "isMobile" } }, ngImport: i0, template: "<section class=\"header-links\">\n <h1 class=\"example-text\">Example: {{ state.example() }}</h1>\n @if (!isMobile || !isFullscreen()) {\n <div class=\"ticket-links\">\n <a target=\"_blank\" [href]=\"ticketLinkBug()\">Report a bug</a> |\n <a target=\"_blank\" [href]=\"ticketLinkFeature()\">Request a feature</a>\n </div>\n }\n</section>\n\n@if (isMobile) {\n <si-live-preview-mobile-mode (iframeChange)=\"setPreviewIframe($event)\" />\n} @else {\n <si-live-preview-iframe-mode (iframeChange)=\"setPreviewIframe($event)\" />\n}\n", styles: ["a{color:var(--si-sys-color-text-accent)}a:after{display:none}a:hover{color:var(--si-sys-color-text-accent-hover)}:host{display:inline-flex;flex-direction:column}:host.is-mobile{margin-block-end:28px}:host:not(.is-mobile){flex:1}.header-links{block-size:32px;padding-block:9px;color:var(--si-sys-color-text-primary);font-size:11px;flex-shrink:0;display:flex;align-items:center}:host:not(.is-mobile) .header-links{padding-inline:10px}.header-links .ticket-links,.header-links .example-text{line-height:14px}.header-links .ticket-links{margin-inline-start:auto}.header-links .example-text{color:var(--si-sys-color-text-primary);display:inline;font-size:11px;font-weight:600;margin-block:0;margin-inline:0 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 0;inline-size:0}\n"], dependencies: [{ kind: "component", type: SiLivePreviewIframeModeComponent, selector: "si-live-preview-iframe-mode", outputs: ["iframeChange"] }, { kind: "component", type: SiLivePreviewMobileModeComponent, selector: "si-live-preview-mobile-mode", outputs: ["iframeChange"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
@@ -872,10 +920,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
872
920
  * SPDX-License-Identifier: MIT
873
921
  */
874
922
  class SiLivePreviewComponent {
923
+ initialTheme = input(/* @ts-ignore */
924
+ ...(ngDevMode ? [undefined, { debugName: "initialTheme" }] : /* istanbul ignore next */ []));
875
925
  config = inject(SI_LIVE_PREVIEW_CONFIG);
876
926
  internalConfig = inject(SI_LIVE_PREVIEW_INTERNALS);
877
927
  self = inject(ElementRef);
878
928
  http = inject(HttpClient);
929
+ urls = inject(LivePreviewUrlService);
879
930
  localeApi = inject(SiLivePreviewLocaleApi, { optional: true });
880
931
  state = inject(LivePreviewStateService);
881
932
  templateElem = viewChild.required('codeTemplate', /* @ts-ignore */
@@ -886,7 +937,7 @@ class SiLivePreviewComponent {
886
937
  ...(ngDevMode ? [{ debugName: "reactVueElem" }] : /* istanbul ignore next */ []));
887
938
  consoleElem = viewChild.required('consoleContainer', /* @ts-ignore */
888
939
  ...(ngDevMode ? [{ debugName: "consoleElem" }] : /* istanbul ignore next */ []));
889
- baseUrl = this.config.examplesBaseUrl;
940
+ baseUrl = this.urls.examplesBaseUrl;
890
941
  isFullscreen = signal(false, /* @ts-ignore */
891
942
  ...(ngDevMode ? [{ debugName: "isFullscreen" }] : /* istanbul ignore next */ []));
892
943
  isMobile = this.internalConfig.isMobile;
@@ -910,7 +961,6 @@ class SiLivePreviewComponent {
910
961
  showEditor = signal(!this.editorCollapsed(), /* @ts-ignore */
911
962
  ...(ngDevMode ? [{ debugName: "showEditor" }] : /* istanbul ignore next */ []));
912
963
  compileSubject = new Subject();
913
- templateModified = false;
914
964
  skipInitialLoad = false;
915
965
  flaskTemplate;
916
966
  flaskTypescript;
@@ -949,7 +999,6 @@ class SiLivePreviewComponent {
949
999
  this.state.templateReact() ||
950
1000
  this.state.templateVue() ||
951
1001
  this.state.templateJs());
952
- this.templateModified = !!this.state.template();
953
1002
  this.loadFromUrl(this.skipInitialLoad);
954
1003
  if (this.webcomponents) {
955
1004
  this.reactLoaded = false;
@@ -971,12 +1020,16 @@ class SiLivePreviewComponent {
971
1020
  });
972
1021
  }
973
1022
  ngOnInit() {
974
- this.state.theme.set(localStorage.getItem('si-live-preview-theme') === 'dark' ? 'dark' : 'light');
1023
+ this.state.theme.set(this.initialTheme() ??
1024
+ (localStorage.getItem('si-live-preview-theme') === 'dark' ? 'dark' : 'light'));
975
1025
  const rfs = localStorage.getItem('si-live-preview-rfs') ?? '';
976
1026
  this.state.rootFontSize.set(rfs === 'initial' ? rfs : rfs ? parseInt(rfs, 10) : 0);
977
1027
  }
978
1028
  ngAfterViewInit() {
1029
+ const root = this.self.nativeElement.getRootNode();
1030
+ const styleParent = root instanceof ShadowRoot ? root : undefined;
979
1031
  this.flaskTemplate = new CodeFlask(this.templateElem().nativeElement, {
1032
+ styleParent,
980
1033
  lineNumbers: true,
981
1034
  language: 'html',
982
1035
  defaultTheme: false,
@@ -985,6 +1038,7 @@ class SiLivePreviewComponent {
985
1038
  ariaLabelledby: 'templateEditorTab'
986
1039
  });
987
1040
  this.flaskTypescript = new CodeFlask(this.typescriptElem().nativeElement, {
1041
+ styleParent,
988
1042
  lineNumbers: true,
989
1043
  language: 'typescript',
990
1044
  readonly: true,
@@ -993,6 +1047,7 @@ class SiLivePreviewComponent {
993
1047
  ariaLabelledby: 'typescriptEditorTab'
994
1048
  });
995
1049
  this.flaskReactVue = new CodeFlask(this.reactVueElem().nativeElement, {
1050
+ styleParent,
996
1051
  lineNumbers: true,
997
1052
  language: 'typescript',
998
1053
  readonly: false,
@@ -1001,9 +1056,6 @@ class SiLivePreviewComponent {
1001
1056
  areaId: 'reactVueEditor'
1002
1057
  });
1003
1058
  this.flaskTemplate.onUpdate((code) => {
1004
- if (code !== this.state.template()) {
1005
- this.templateModified = true;
1006
- }
1007
1059
  this.compileSubject.next(code);
1008
1060
  });
1009
1061
  this.flaskReactVue.onUpdate((code) => {
@@ -1072,7 +1124,6 @@ class SiLivePreviewComponent {
1072
1124
  localStorage.setItem('si-live-preview-theme', this.state.theme());
1073
1125
  }
1074
1126
  updateTemplate(template) {
1075
- this.templateModified = false;
1076
1127
  this.state.template.set(template);
1077
1128
  if (this.flaskTemplate) {
1078
1129
  this.flaskTemplate.updateCode(this.state.template());
@@ -1124,10 +1175,11 @@ class SiLivePreviewComponent {
1124
1175
  }
1125
1176
  this.handleInProgressEvent(true);
1126
1177
  this.http
1127
- .get(this.baseUrl + example + '.html', { responseType: 'text' })
1178
+ .get(this.urls.sourceUrl(example + '.html'), { responseType: 'text' })
1128
1179
  .pipe(timeout(3000), retry(1))
1129
1180
  .subscribe({
1130
1181
  next: data => {
1182
+ this.state.originalTemplate.set(data);
1131
1183
  this.updateTemplate(data);
1132
1184
  setTimeout(() => {
1133
1185
  this.handleInProgressEvent(false);
@@ -1145,7 +1197,7 @@ class SiLivePreviewComponent {
1145
1197
  }
1146
1198
  this.handleInProgressEvent(true);
1147
1199
  this.http
1148
- .get(this.baseUrl + example + '.ts', { responseType: 'text' })
1200
+ .get(this.urls.sourceUrl(example + '.ts'), { responseType: 'text' })
1149
1201
  .pipe(timeout(3000), retry(1))
1150
1202
  .subscribe({
1151
1203
  next: data => {
@@ -1162,7 +1214,7 @@ class SiLivePreviewComponent {
1162
1214
  });
1163
1215
  }
1164
1216
  checkWebComponentsAvailable() {
1165
- const baseUrl = this.baseUrl;
1217
+ const baseUrl = this.config.examplesBaseUrl;
1166
1218
  const example = this.state.example() ?? '';
1167
1219
  if (this.webcomponentsList.includes(baseUrl + example + '-react')) {
1168
1220
  this.frameworks.set('React', 'react');
@@ -1224,10 +1276,9 @@ class SiLivePreviewComponent {
1224
1276
  }
1225
1277
  }
1226
1278
  this.handleInProgressEvent(true);
1227
- const baseUrl = this.baseUrl;
1228
1279
  const example = this.state.example() ?? '';
1229
1280
  this.http
1230
- .get(`${baseUrl}${example}-${framework}.${fileType}`, { responseType: 'text' })
1281
+ .get(this.urls.sourceUrl(`${example}-${framework}.${fileType}`), { responseType: 'text' })
1231
1282
  .subscribe({
1232
1283
  next: (res) => {
1233
1284
  if (framework === 'react') {
@@ -1300,7 +1351,7 @@ class SiLivePreviewComponent {
1300
1351
  }, 1500);
1301
1352
  }
1302
1353
  toggleFullscreen(exampleOnly = false) {
1303
- const fullscreenElement = document.fullscreenElement ?? document.webkitFullscreenElement;
1354
+ const fullscreenElement = this.getFullscreenElement();
1304
1355
  if (fullscreenElement) {
1305
1356
  const exitFunction = document.exitFullscreen ?? document.webkitExitFullscreen;
1306
1357
  if (exitFunction) {
@@ -1375,54 +1426,26 @@ class SiLivePreviewComponent {
1375
1426
  this.showCopiedLabel();
1376
1427
  }
1377
1428
  createLink() {
1378
- const url = this.createTemplateLink('editor');
1379
- this.clipboardCopy(url);
1429
+ this.clipboardCopy(this.urls.viewerUrl('editor'));
1380
1430
  }
1381
1431
  openTab() {
1382
- const url = this.createTemplateLink('viewer');
1383
- window.open(url, '_blank');
1384
- }
1385
- createTemplateLink(mode) {
1386
- const locale = this.state.locale();
1387
- let url = `${window.location.protocol}//${window.location.host}`;
1388
- url += window.location.pathname;
1389
- url += `#/viewer/${mode}?`;
1390
- url += 'theme=' + this.state.theme();
1391
- if (this.state.isRTL()) {
1392
- url += '&isRTL=true';
1393
- }
1394
- if (locale) {
1395
- url += '&locale=' + locale;
1396
- }
1397
- if (this.state.rootFontSize()) {
1398
- url += '&rfs=' + this.state.rootFontSize();
1399
- }
1400
- if (this.activeTab() === 'react') {
1401
- url += '&t=' + encodeURIComponent(this.state.templateReact()) + '&framework=react';
1402
- }
1403
- else if (this.activeTab() === 'vue') {
1404
- url += '&t=' + encodeURIComponent(this.state.templateVue()) + '&framework=vue';
1405
- }
1406
- else if (this.activeTab() === 'js') {
1407
- url += '&t=' + encodeURIComponent(this.state.templateJs()) + '&framework=js';
1408
- }
1409
- else if (this.templateModified) {
1410
- url += '&t=' + encodeURIComponent(this.state.template());
1411
- }
1412
- const example = this.state.example();
1413
- if (example) {
1414
- url += '&e=' + encodeURIComponent(example);
1415
- }
1416
- return url;
1432
+ window.open(this.urls.viewerUrl('viewer'), '_blank');
1417
1433
  }
1418
1434
  onFullscreenChange() {
1419
- this.isFullscreen.set(!!document.fullscreenElement || !!document.webkitFullscreenElement);
1435
+ const fullscreenElement = this.getFullscreenElement();
1436
+ this.isFullscreen.set(!!fullscreenElement && this.self.nativeElement.contains(fullscreenElement));
1420
1437
  if (!this.isFullscreen()) {
1421
1438
  this.exampleFullscreen.set(false);
1422
1439
  }
1423
1440
  }
1441
+ getFullscreenElement() {
1442
+ const root = this.self.nativeElement.getRootNode();
1443
+ return (root.fullscreenElement ??
1444
+ document.webkitFullscreenElement ??
1445
+ null);
1446
+ }
1424
1447
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1425
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiLivePreviewComponent, isStandalone: true, selector: "si-live-preview", host: { listeners: { "document:fullscreenchange": "onFullscreenChange()", "document:webkitfullscreenchange": "onFullscreenChange()" }, properties: { "class.editor-fullscreen": "isFullscreen()", "class.is-mobile": "isMobile" } }, viewQueries: [{ propertyName: "templateElem", first: true, predicate: ["codeTemplate"], descendants: true, isSignal: true }, { propertyName: "typescriptElem", first: true, predicate: ["codeTypescript"], descendants: true, isSignal: true }, { propertyName: "reactVueElem", first: true, predicate: ["codeReactVue"], descendants: true, isSignal: true }, { propertyName: "consoleElem", first: true, predicate: ["consoleContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "@let active = activeTab();\n<div class=\"example\" [class.fullscreen]=\"exampleFullscreen()\" [class.is-mobile]=\"isMobile\">\n <div class=\"preview-iframe\" [class.is-mobile]=\"isMobile\">\n <si-live-preview-iframe\n [isFullscreen]=\"isFullscreen()\"\n (templateFromComponent)=\"templateFromComponent($event)\"\n />\n @if (state.inProgress()) {\n <div class=\"progress-container\">\n <div class=\"progress-inner\">\n <div class=\"progress-dots\"></div>\n </div>\n </div>\n }\n @if (isFullscreen()) {\n <div class=\"buttons\">\n <button\n type=\"button\"\n class=\"btn-command fullscreen\"\n title=\"Close fullscreen\"\n aria-label=\"Close fullscreen\"\n (click)=\"toggleFullscreen(true)\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M273,256l87.52-87.51a12,12,0,0,0-17-17L256,239l-87.51-87.52a12,12,0,0,0-17,17L239,256l-87.52,87.51a12,12,0,0,0,17,17L256,273l87.51,87.52a12,12,0,0,0,17-17Z\"\n />\n </svg>\n </button>\n </div>\n }\n </div>\n</div>\n\n<div class=\"code\" [class.is-mobile]=\"isMobile\" [class.is-collapsed]=\"editorCollapsed()\">\n <div class=\"collapse-wrapper\">\n <div role=\"tablist\" class=\"nav lp-tabs\">\n @if (showEditor() && (active === 'template' || active === 'typescript')) {\n <button\n type=\"button\"\n role=\"tab\"\n class=\"tab-item tab-link focus-inside\"\n id=\"templateEditorTab\"\n [class.tab-active]=\"active === 'template'\"\n (click)=\"activateTab('template')\"\n >\n Template\n </button>\n <button\n type=\"button\"\n role=\"tab\"\n class=\"tab-item tab-link focus-inside\"\n id=\"typescriptEditorTab\"\n [class.tab-active]=\"active === 'typescript'\"\n (click)=\"activateTab('typescript')\"\n >\n Typescript\n </button>\n }\n </div>\n @if (!isMobile) {\n <div class=\"collapse-button\" [class.is-collapsed]=\"editorCollapsed()\">\n <button\n type=\"button\"\n [attr.title]=\"editorCollapsed() ? 'Show editor' : 'Hide editor'\"\n [attr.aria-label]=\"editorCollapsed() ? 'Show editor' : 'Hide editor'\"\n (click)=\"toggleCollapse()\"\n >\n <svg class=\"collapse-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n class=\"cls-1\"\n d=\"M248.93,277.23l-1.72-1.44-110-110a12.43,12.43,0,0,1,15.86-19l1.72,1.44L256,249.41l101.21-101.2a12.45,12.45,0,0,1,15.86-1.44l1.72,1.44a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72-110,110A12.45,12.45,0,0,1,248.93,277.23Z\"\n />\n <path\n class=\"cls-1\"\n d=\"M248.93,365.23l-1.72-1.44-88-88a12.43,12.43,0,0,1,15.86-19l1.72,1.44L256,337.41l79.21-79.2a12.45,12.45,0,0,1,15.86-1.44l1.72,1.44a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72-88,88A12.45,12.45,0,0,1,248.93,365.23Z\"\n />\n </svg>\n </button>\n </div>\n }\n </div>\n\n @if (allowFullscreen && !isFullscreen()) {\n <div class=\"buttons\">\n @if (webcomponents && showEditor() && frameworks.size > 1) {\n <select\n aria-label=\"Select framework\"\n class=\"btn-command locale-selection\"\n [ngModel]=\"state.framework()\"\n (ngModelChange)=\"changeFramework($event)\"\n >\n @for (aFramework of frameworks | keyvalue; track $index) {\n <option [value]=\"aFramework.value\" [selected]=\"state.framework() === aFramework.value\">\n {{ aFramework.key }}\n </option>\n }\n </select>\n }\n @if (rootFontSizes.length) {\n <select\n name=\"selectRfs\"\n aria-label=\"Root font size\"\n title=\"Root font size\"\n class=\"btn-command rfs-selection\"\n [ngModel]=\"state.rootFontSize()\"\n (ngModelChange)=\"rfsSelectionChanges($event)\"\n >\n <option value=\"0\">none</option>\n <option value=\"initial\">initial</option>\n @for (rfs of rootFontSizes; track rfs) {\n <option [value]=\"rfs\">{{ rfs }}px</option>\n }\n </select>\n }\n @if (!!localeApi && showEditor()) {\n <select\n name=\"selectLocale\"\n aria-label=\"Select locale\"\n title=\"Locale\"\n class=\"btn-command locale-selection\"\n (change)=\"localeSelectionChanged($event.target)\"\n >\n @for (aLocale of availableLocales; track $index) {\n <option [value]=\"aLocale\" [selected]=\"state.locale() === aLocale\">\n {{ aLocale }}\n </option>\n }\n </select>\n }\n @if (rtlSwitcher) {\n <button\n type=\"button\"\n class=\"btn-command rtl-selection\"\n [title]=\"state.isRTL() ? 'Right-to-left layout' : 'Left-to-right layout'\"\n [attr.aria-label]=\"state.isRTL() ? 'Right-to-left layout' : 'Left-to-right layout'\"\n (click)=\"toggleRTL()\"\n >\n {{ state.isRTL() ? 'RTL' : 'LTR' }}\n </button>\n }\n @if (\n !isMobile &&\n !showEditor() &&\n (state.renderingError() || (state.logMessages().length && state.newMessages()))\n ) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Show console\"\n aria-label=\"Show console\"\n [class.alert]=\"state.renderingError()\"\n [class.info]=\"state.logMessages().length\"\n (click)=\"toggleCollapse()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M255.84,296a12,12,0,0,1-12-12V124a12,12,0,1,1,24,0V284A12,12,0,0,1,255.84,296Z\"\n />\n <path d=\"M256.12,387.81h-.24a16,16,0,0,1,0-32h.24a16,16,0,0,1,0,32Z\" />\n </svg>\n </button>\n }\n @if (switcherEnabled && !isMobile) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Toggle theme\"\n aria-label=\"Toggle theme\"\n (click)=\"toggleTheme()\"\n >\n @if (state.theme() === 'dark') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M256,349.82A93.82,93.82,0,1,0,162.18,256,93.93,93.93,0,0,0,256,349.82Zm0-163.64A69.82,69.82,0,1,1,186.18,256,69.9,69.9,0,0,1,256,186.18Z\"\n />\n <path\n d=\"M256,120.73a12,12,0,0,0,12-12V76a12,12,0,0,0-24,0v32.73A12,12,0,0,0,256,120.73Z\"\n />\n <path d=\"M268,436V403.27a12,12,0,0,0-24,0V436a12,12,0,0,0,24,0Z\" />\n <path d=\"M143.44,160.41a12,12,0,1,0,17-17l-23.23-23.23a12,12,0,1,0-17,17Z\" />\n <path\n d=\"M351.59,351.59a12,12,0,0,0,0,17l23.23,23.23a12,12,0,0,0,17-17l-23.23-23.23A12,12,0,0,0,351.59,351.59Z\"\n />\n <path\n d=\"M120.73,256a12,12,0,0,0-12-12H76a12,12,0,0,0,0,24h32.73A12,12,0,0,0,120.73,256Z\"\n />\n <path d=\"M436,244H403.27a12,12,0,0,0,0,24H436a12,12,0,0,0,0-24Z\" />\n <path\n d=\"M137.18,391.79l23.23-23.23a12,12,0,1,0-17-17l-23.23,23.23a12,12,0,1,0,17,17Z\"\n />\n <path\n d=\"M360.07,163.93a12,12,0,0,0,8.49-3.52l23.23-23.23a12,12,0,1,0-17-17l-23.23,23.23a12,12,0,0,0,8.48,20.49Z\"\n />\n </svg>\n } @else {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M360.07,147.88a12,12,0,0,0,5.89-21.1,168.05,168.05,0,0,0-214.71,0C80,186,70.19,292.1,129.38,363.35a166.9,166.9,0,0,0,113.77,59.93q7.9.74,15.75.73A166.74,166.74,0,0,0,366,385.22a12,12,0,0,0-5.89-21.1,109.33,109.33,0,0,1,0-216.24ZM244.43,275.77A133.48,133.48,0,0,0,330,381.08,144.11,144.11,0,0,1,147.84,348C97.1,287,105.51,196,166.58,145.24A144.08,144.08,0,0,1,330,130.94C272,152.38,234.91,212.29,244.43,275.77Z\"\n />\n </svg>\n }\n </button>\n }\n @if (!isMobile && showEditor()) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Example fullscreen\"\n aria-label=\"Example fullscreen\"\n (click)=\"toggleFullscreen(true)\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M406,112H106a42,42,0,0,0-42,42V358a42,42,0,0,0,42,42H406a42,42,0,0,0,42-42V154A42,42,0,0,0,406,112Zm18,246a18,18,0,0,1-18,18H106a18,18,0,0,1-18-18V154a18,18,0,0,1,18-18H406a18,18,0,0,1,18,18Z\"\n />\n </svg>\n </button>\n }\n @if (showEditor()) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Editor + Example fullscreen\"\n aria-label=\"Editor + Example fullscreen\"\n (click)=\"toggleFullscreen()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M406,112H106a42,42,0,0,0-42,42V358a42,42,0,0,0,42,42H406a42,42,0,0,0,42-42V154A42,42,0,0,0,406,112Zm18,42V313.44H199.35V136H406A18,18,0,0,1,424,154ZM88,358V154a18,18,0,0,1,18-18h69.35V376H106A18,18,0,0,1,88,358Zm318,18H199.35V337.44H424V358A18,18,0,0,1,406,376Z\"\n />\n </svg>\n </button>\n }\n <button\n siStackblitz\n class=\"btn-command\"\n type=\"button\"\n [baseUrl]=\"baseUrl\"\n [framework]=\"state.framework()\"\n [example]=\"state.example()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M182.32 480.02c-3.65 0-7.34-1.01-10.68-3.09-8.61-5.36-11.86-15.98-7.72-25.24s65.44-146.6 65.44-146.6c.58-1.29.19-2.34-.23-3-.42-.65-1.23-1.43-2.64-1.43h-54.96c-13.79 0-25.98-7.76-31.83-20.24s-4-26.82 4.83-37.41L314.3 39.26c6.5-7.79 17.46-9.55 26.06-4.19 8.61 5.36 11.85 15.98 7.72 25.24l-65.44 146.6c-.58 1.29-.19 2.34.23 3 .42.65 1.23 1.43 2.64 1.43h54.96c13.79 0 25.98 7.76 31.83 20.24s4 26.82-4.83 37.41L197.69 472.73c-3.97 4.77-9.62 7.28-15.38 7.28Zm101.45-354.13L169.1 263.49c-.85 1.02-1 2.15-.43 3.35.56 1.2 1.52 1.81 2.85 1.81h54.96c11.96 0 22.98 5.99 29.49 16.02s7.48 22.54 2.61 33.46l-30.35 67.98 114.67-137.6c.85-1.02 1-2.15.43-3.35s-1.52-1.81-2.85-1.81h-54.96c-11.96 0-22.98-5.99-29.49-16.02s-7.48-22.54-2.61-33.46l30.35-67.99Z\"\n />\n </svg>\n </button>\n </div>\n }\n <div class=\"tab-content\" [class.is-mobile]=\"isMobile\">\n <fieldset\n class=\"tab-pane\"\n [class.tab-active]=\"active === 'template'\"\n [class.is-mobile]=\"isMobile\"\n [disabled]=\"editorCollapsed()\"\n >\n <div class=\"buttons\" [class.show-copied]=\"showCopied()\">\n @if (!isMobile) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Open in new tab\"\n aria-label=\"Open in new tab\"\n (click)=\"openTab()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M344.94 150.78l46.12 38L345 226.94v-25.38l-24.19.19c-19.93.16-43.45 1.35-66.84 9a132.91 132.91 0 00-20.6 8.6c1.13-1.56 2.32-3.11 3.57-4.63 13.37-16.27 39-36.14 85.18-38.4l22.83-1.11v-24.43M329.09 109a8.33 8.33 0 00-3.48.77 8.14 8.14 0 00-4.67 7.38v35.15c-54.9 2.69-86 27-102.55 47.14-21.1 25.69-28.56 55.84-28.51 75.48a8.1 8.1 0 006 7.83 7.68 7.68 0 002.1.28 8.13 8.13 0 007.1-4.13c12.67-22.33 31.08-37.18 56.29-45.38 19.82-6.45 40.3-7.62 59.61-7.78v34.91a8 8 0 004.66 7.37 7.84 7.84 0 003.46.79 8.26 8.26 0 005.16-1.85l86.92-72a8.06 8.06 0 002.93-6.26 8.17 8.17 0 00-3-6.25l-86.9-71.66a8.11 8.11 0 00-5.15-1.84z\"\n />\n <path\n d=\"M397.23 399.39H114.94a26.89 26.89 0 01-26.86-26.86V204.26a26.89 26.89 0 0126.86-26.86h70.49a12 12 0 010 24h-70.49a2.9 2.9 0 00-2.86 2.86v168.27a2.9 2.9 0 002.86 2.86h282.29a2.9 2.9 0 002.85-2.86V253.67a12 12 0 0124 0v118.86a26.88 26.88 0 01-26.85 26.86z\"\n />\n </svg>\n </button>\n }\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy template as URL\"\n aria-label=\"Copy template as URL\"\n (click)=\"createLink()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M333.56,88.16a90,90,0,0,0-62.83,25.39l-.13.12-27,26.82a12,12,0,0,0,16.92,17l26.92-26.76a66.44,66.44,0,0,1,94,93.94l-47,47a67.6,67.6,0,0,1-7.19,6.23,66.44,66.44,0,0,1-93-13.41A12,12,0,0,0,215,278.88a89.88,89.88,0,0,0,59.52,35.34,91.93,91.93,0,0,0,13.1.94,89.77,89.77,0,0,0,54-18,90.87,90.87,0,0,0,9.79-8.48l47.07-47.07.14-.15A90.44,90.44,0,0,0,333.56,88.16Z\"\n />\n <path\n d=\"M251.28,354.51l-26.75,26.75a66.44,66.44,0,0,1-93.95-93.95l47-47a68.76,68.76,0,0,1,7.19-6.23,66.53,66.53,0,0,1,93,13.41A12,12,0,0,0,297,233.12a90.5,90.5,0,0,0-136.39-9.77l-47.06,47.07-.15.15A90.44,90.44,0,0,0,241.28,398.45a.93.93,0,0,0,.14-.14l26.83-26.83a12,12,0,0,0-17-17Z\"\n />\n </svg>\n </button>\n }\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy template\"\n aria-label=\"Copy template\"\n (click)=\"copyTemplate()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M380.8,197.2H240.4a43.25,43.25,0,0,0-43.2,43.2V380.8A43.25,43.25,0,0,0,240.4,424H380.8A43.25,43.25,0,0,0,424,380.8V240.4A43.25,43.25,0,0,0,380.8,197.2ZM400,380.8A19.22,19.22,0,0,1,380.8,400H240.4a19.22,19.22,0,0,1-19.2-19.2V240.4a19.22,19.22,0,0,1,19.2-19.2H380.8A19.22,19.22,0,0,1,400,240.4Z\"\n />\n <path\n d=\"M146.8,290.8H131.2A19.22,19.22,0,0,1,112,271.6V131.2A19.22,19.22,0,0,1,131.2,112H271.6a19.22,19.22,0,0,1,19.2,19.2v15.6a12,12,0,0,0,24,0V131.2A43.25,43.25,0,0,0,271.6,88H131.2A43.25,43.25,0,0,0,88,131.2V271.6a43.25,43.25,0,0,0,43.2,43.2h15.6a12,12,0,0,0,0-24Z\"\n />\n </svg>\n </button>\n }\n <div class=\"copied\" role=\"tooltip\">copied</div>\n </div>\n <div #codeTemplate class=\"codeflask-editor\"></div>\n </fieldset>\n <fieldset\n class=\"tab-pane\"\n [class.tab-active]=\"active === 'typescript'\"\n [class.is-mobile]=\"isMobile\"\n [disabled]=\"editorCollapsed()\"\n >\n <div class=\"buttons\" [class.show-copied]=\"showCopied()\">\n <span class=\"readonly-label\">read-only</span>\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy code\"\n aria-label=\"Copy code\"\n (click)=\"copyCode()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M380.8,197.2H240.4a43.25,43.25,0,0,0-43.2,43.2V380.8A43.25,43.25,0,0,0,240.4,424H380.8A43.25,43.25,0,0,0,424,380.8V240.4A43.25,43.25,0,0,0,380.8,197.2ZM400,380.8A19.22,19.22,0,0,1,380.8,400H240.4a19.22,19.22,0,0,1-19.2-19.2V240.4a19.22,19.22,0,0,1,19.2-19.2H380.8A19.22,19.22,0,0,1,400,240.4Z\"\n />\n <path\n d=\"M146.8,290.8H131.2A19.22,19.22,0,0,1,112,271.6V131.2A19.22,19.22,0,0,1,131.2,112H271.6a19.22,19.22,0,0,1,19.2,19.2v15.6a12,12,0,0,0,24,0V131.2A43.25,43.25,0,0,0,271.6,88H131.2A43.25,43.25,0,0,0,88,131.2V271.6a43.25,43.25,0,0,0,43.2,43.2h15.6a12,12,0,0,0,0-24Z\"\n />\n </svg>\n </button>\n }\n <div class=\"copied\" role=\"tooltip\">copied</div>\n </div>\n <fieldset #codeTypescript class=\"codeflask-editor readonly\"></fieldset>\n </fieldset>\n <fieldset\n class=\"tab-pane\"\n [class.tab-active]=\"active === 'react' || active === 'vue' || active === 'js'\"\n [class.is-mobile]=\"isMobile\"\n [disabled]=\"editorCollapsed()\"\n >\n <div class=\"buttons\" [class.show-copied]=\"showCopied()\">\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy template as URL\"\n aria-label=\"Copy template as URL\"\n (click)=\"createLink()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M333.56,88.16a90,90,0,0,0-62.83,25.39l-.13.12-27,26.82a12,12,0,0,0,16.92,17l26.92-26.76a66.44,66.44,0,0,1,94,93.94l-47,47a67.6,67.6,0,0,1-7.19,6.23,66.44,66.44,0,0,1-93-13.41A12,12,0,0,0,215,278.88a89.88,89.88,0,0,0,59.52,35.34,91.93,91.93,0,0,0,13.1.94,89.77,89.77,0,0,0,54-18,90.87,90.87,0,0,0,9.79-8.48l47.07-47.07.14-.15A90.44,90.44,0,0,0,333.56,88.16Z\"\n />\n <path\n d=\"M251.28,354.51l-26.75,26.75a66.44,66.44,0,0,1-93.95-93.95l47-47a68.76,68.76,0,0,1,7.19-6.23,66.53,66.53,0,0,1,93,13.41A12,12,0,0,0,297,233.12a90.5,90.5,0,0,0-136.39-9.77l-47.06,47.07-.15.15A90.44,90.44,0,0,0,241.28,398.45a.93.93,0,0,0,.14-.14l26.83-26.83a12,12,0,0,0-17-17Z\"\n />\n </svg>\n </button>\n }\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy code\"\n aria-label=\"Copy code\"\n (click)=\"copyCode()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M380.8,197.2H240.4a43.25,43.25,0,0,0-43.2,43.2V380.8A43.25,43.25,0,0,0,240.4,424H380.8A43.25,43.25,0,0,0,424,380.8V240.4A43.25,43.25,0,0,0,380.8,197.2ZM400,380.8A19.22,19.22,0,0,1,380.8,400H240.4a19.22,19.22,0,0,1-19.2-19.2V240.4a19.22,19.22,0,0,1,19.2-19.2H380.8A19.22,19.22,0,0,1,400,240.4Z\"\n />\n <path\n d=\"M146.8,290.8H131.2A19.22,19.22,0,0,1,112,271.6V131.2A19.22,19.22,0,0,1,131.2,112H271.6a19.22,19.22,0,0,1,19.2,19.2v15.6a12,12,0,0,0,24,0V131.2A43.25,43.25,0,0,0,271.6,88H131.2A43.25,43.25,0,0,0,88,131.2V271.6a43.25,43.25,0,0,0,43.2,43.2h15.6a12,12,0,0,0,0-24Z\"\n />\n </svg>\n </button>\n }\n <div class=\"copied\" role=\"tooltip\">copied</div>\n </div>\n <label for=\"reactVueEditor\">React and Vue code editor</label>\n <fieldset #codeReactVue class=\"codeflask-editor\"></fieldset>\n </fieldset>\n <div class=\"console\" [hidden]=\"!state.renderingError() && !state.logMessages().length\">\n <div class=\"buttons\">\n @if (state.logMessages().length) {\n <button\n type=\"button\"\n class=\"btn-command btn-clear\"\n title=\"Clear log\"\n aria-label=\"Clear log\"\n (click)=\"logClear()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M400,144H328V132a44.05,44.05,0,0,0-44-44H228a44.05,44.05,0,0,0-44,44v12H112a12,12,0,0,0,0,24h20V380a44.05,44.05,0,0,0,44,44H336a44.05,44.05,0,0,0,44-44V168h20a12,12,0,0,0,0-24ZM208,132a20,20,0,0,1,20-20h56a20,20,0,0,1,20,20v12H208ZM356,380a20,20,0,0,1-20,20H176a20,20,0,0,1-20-20V168H356Z\"\n />\n <path d=\"M224,344a12,12,0,0,0,12-12V236a12,12,0,0,0-24,0v96A12,12,0,0,0,224,344Z\" />\n <path d=\"M288,344a12,12,0,0,0,12-12V236a12,12,0,0,0-24,0v96A12,12,0,0,0,288,344Z\" />\n </svg>\n </button>\n }\n </div>\n <div #consoleContainer class=\"scroller\">\n @if (state.renderingError()) {\n <pre class=\"alert-danger\"><code class=\"bg-none\">{{ renderingErrorMessage() }}</code></pre>\n }\n @if (!state.renderingError() && state.logMessages().length) {\n <ul>\n @for (msg of state.logMessages(); track $index) {\n <li>{{ msg }}</li>\n }\n </ul>\n }\n </div>\n </div>\n </div>\n</div>\n", styles: [".lp-tabs{display:flex;flex-wrap:wrap;padding-inline-start:0;margin:0;list-style:none;background:none;inline-size:inherit;font-weight:700}.lp-tabs .tab-item:focus-visible{outline-offset:calc(-1 * var(--element-button-focus-width))}.lp-tabs .tab-item.tab-active.tab-link{color:var(--si-sys-color-text-accent);border-block-end-color:var(--si-sys-color-text-accent)!important}.lp-tabs .tab-item.tab-active.tab-link:hover{color:var(--si-sys-color-text-accent-hover)}.lp-tabs .tab-item.tab-link{font:inherit;background:none;min-inline-size:150px;display:block;padding-block:8px;padding-inline:15px;cursor:pointer;text-align:start;line-height:20px;color:var(--si-sys-color-text-primary);border:0;border-block-end:4px solid transparent}.lp-tabs .tab-item.tab-link:hover{text-decoration:none;color:var(--si-sys-color-text-accent-hover);border-block-end-color:var(--si-sys-color-border-4)}*:focus-visible{outline:var(--element-button-focus-width) solid var(--si-sys-color-effects-focus);outline-offset:var(--element-button-focus-overlay-width)}:host{flex:1 1 auto;display:flex;flex-direction:column;overflow:hidden}:host.is-mobile{flex-direction:row}:host.editor-fullscreen{inline-size:100%}:host.editor-fullscreen ::ng-deep .ticket-links{position:absolute;inset-inline-end:48px;inset-block-start:13px}[hidden]{display:none!important}.example{flex:1 1 auto;background:var(--si-sys-color-background-0);margin:0;position:relative;display:flex;flex-direction:column}.example.is-mobile{order:2;flex:unset}.example.fullscreen{padding:0;block-size:100%;inline-size:100%}.example.fullscreen:after{content:unset}.example .btn-command{padding-block:4px;padding-inline:10px}.example .buttons{inset-inline-end:0}.preview-iframe{display:flex;flex:1}.preview-iframe.is-mobile{flex:1 0 0;min-block-size:0;overflow-y:auto;overflow-x:hidden;padding-block:0;padding-inline:30px;flex-direction:column}.collapse-wrapper{display:flex;min-block-size:40px}.lp-tabs{justify-content:flex-start;inline-size:100%;border-block-end:0}.collapse-button{display:flex;justify-content:flex-start;align-items:center;inline-size:100%}.collapse-button button{background-color:transparent;border:0;padding:6px;margin-inline-start:-16px;block-size:34px}.collapse-button button>svg{block-size:20px;fill:var(--si-sys-color-text-primary)}.collapse-button button:hover,.collapse-button button:focus,.collapse-button button:active{color:var(--si-sys-color-text-accent-hover)}.collapse-button button:hover>svg,.collapse-button button:focus>svg,.collapse-button button:active>svg{fill:currentColor}.code{position:relative;background-color:var(--si-sys-color-background-0);max-block-size:414px;transition:max-block-size .5s}.code.is-collapsed{max-block-size:41px;overflow:hidden;background-color:var(--si-sys-color-background-0);border-block-start:1px solid var(--si-sys-color-border-4)}.code.is-collapsed .collapse-icon{transform:rotate(180deg)}.code .console{block-size:68px;position:relative;border-block-start:1px solid var(--si-sys-color-border-4);color:var(--si-sys-color-text-primary)}.code .console .scroller{block-size:100%;overflow:auto;position:absolute;inset:0}.code .console pre{block-size:100%;border:0;margin:0;overflow:auto}.code .console pre.alert-danger{color:var(--si-sys-color-text-on-danger);background-color:var(--si-sys-color-background-danger)}.code .console code.bg-none{background:none}.code .console ul{list-style:none;margin:0;padding:5px;font-family:Menlo,Ubuntu Mono,Liberation Mono,Consolas,Courier,monospace}.code .console .btn-clear:hover{color:var(--si-sys-color-text-on-danger)}.code.is-mobile{order:1;flex:1;display:flex;flex-direction:column;max-block-size:unset;transition:unset}.code.is-mobile .console{border-inline-end:1px solid var(--si-sys-color-border-4)}pre{border-radius:0}.tab-content{display:flex;flex-direction:column}.tab-content.is-mobile{border-inline-end:1px solid var(--si-sys-color-border-4);flex:1}.tab-content:not(.is-mobile){block-size:305px}.tab-pane{flex:1;display:none;position:relative}.tab-pane.tab-active{display:flex;flex-direction:column}fieldset{padding:0;margin:0;border:0}.buttons{position:absolute;z-index:100;inset-inline-end:16px;display:flex;align-items:center;inset-block-start:0;block-size:40px}.is-mobile .buttons{inset-inline-end:0}.btn-command{background-color:transparent;border:0;color:var(--si-sys-color-text-primary);padding:8px;font-size:20px;line-height:1;block-size:34px}.btn-command>svg{block-size:20px;fill:currentColor;vertical-align:unset!important}.btn-command:hover,.btn-command:focus,.btn-command:active{color:var(--si-sys-color-text-accent-hover)}.btn-command.fullscreen{font-size:30px;padding:4px}.btn-command.alert svg,.btn-command.info svg{border-radius:50%;fill:currentColor}.btn-command.alert svg{background-color:var(--si-sys-color-background-danger);color:var(--si-sys-color-text-on-danger)}.btn-command.info svg{background-color:var(--si-sys-color-background-accent-secondary);color:var(--si-sys-color-text-accent)}.rtl-selection,.rfs-selection,.locale-selection{font-size:14px}.copied,.readonly-label{font-size:12px;padding-block:2px;padding-inline:5px;border-radius:3px}.copied{display:none;color:var(--si-sys-color-background-0);background:var(--si-sys-color-text-primary);margin-inline-end:10px;margin-block-start:12px}.show-copied .copied{display:block!important}.readonly-label{color:var(--si-sys-color-text-primary);border:1px solid var(--si-sys-color-text-primary)}.show-copied>*{display:none}.codeflask-editor{flex:1;position:relative;border-block-start:1px solid var(--si-sys-color-border-4)}.codeflask-editor ::ng-deep textarea{box-shadow:none}.progress-container{position:absolute;inset:0;pointer-events:none}.progress-container,.progress-container .progress-inner{display:flex;justify-content:center;align-items:center}.progress-container .progress-inner{inline-size:64px;block-size:40px;background:#fffc;border:1px solid #ddd;border-radius:12px}.progress-dots:before,.progress-dots:after,.progress-dots{inline-size:10px;block-size:10px;border-radius:50%;background-color:#ddd;animation:dot-flashing .6s infinite linear alternate}.progress-dots{position:relative;animation-delay:.3s}.progress-dots:before,.progress-dots:after{content:\"\";display:inline-block;position:absolute;inset-block-start:0}.progress-dots:before{inset-inline-start:-15px;animation-delay:0s}.progress-dots:after{inset-inline-start:15px;animation-delay:.6s}@keyframes dot-flashing{0%{background-color:#333}50%,to{background-color:#ddd}}\n", ":host ::ng-deep .readonly .codeflask{background-color:var(--si-sys-color-background-1)}:host ::ng-deep .codeflask{background-color:var(--si-sys-color-background-1)}:host ::ng-deep .codeflask pre,:host ::ng-deep .codeflask code{color:var(--si-sys-color-code-1);background:none;border:0;border-radius:0;text-align:start;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;tab-size:2;hyphens:none}:host ::ng-deep .codeflask code{padding:0}:host ::ng-deep .codeflask .codeflask__flatten,:host ::ng-deep .codeflask .codeflask__code{font-family:Menlo,Ubuntu Mono,Liberation Mono,Consolas,Courier,monospace;line-height:20px}:host ::ng-deep .codeflask .codeflask__flatten{min-inline-size:calc(100% - 40px);inline-size:auto}:host ::ng-deep .codeflask .codeflask__pre{z-index:0}:host ::ng-deep .codeflask .codeflask__textarea{z-index:1;color:transparent;caret-color:var(--si-sys-color-code-1)}:host ::ng-deep .codeflask.codeflask--has-line-numbers:before{background:var(--element-base-4)}:host ::ng-deep .codeflask__lines{color:var(--element-text-disabled)}:host ::ng-deep .namespace{opacity:.7}:host ::ng-deep .token.comment,:host ::ng-deep .token.prolog,:host ::ng-deep .token.doctype,:host ::ng-deep .token.cdata{color:var(--si-sys-color-code-8);font-style:italic}:host ::ng-deep .token.punctuation{color:var(--si-sys-color-code-9)}:host ::ng-deep .token.keyword,:host ::ng-deep .token.operator,:host ::ng-deep .token.boolean,:host ::ng-deep .token.symbol{color:var(--si-sys-color-code-2)}:host ::ng-deep .token.constant{color:var(--si-sys-color-code-3)}:host ::ng-deep .token.builtin{color:var(--si-sys-color-code-5)}:host ::ng-deep .token.property{color:var(--si-sys-color-code-4)}:host ::ng-deep .token.tag,:host ::ng-deep .token.selector{color:var(--si-sys-color-code-10)}:host ::ng-deep .token.number{color:var(--si-sys-color-code-7)}:host ::ng-deep .token.attr-name{color:var(--si-sys-color-code-3)}:host ::ng-deep .token.attr-value{color:var(--si-sys-color-code-6)}:host ::ng-deep .token.string,:host ::ng-deep .token.char{color:var(--si-sys-color-code-6)}:host ::ng-deep .token.function{color:var(--si-sys-color-code-5)}:host ::ng-deep .token.class-name{color:var(--si-sys-color-code-11)}:host ::ng-deep .token.important,:host ::ng-deep .token.variable{color:var(--si-sys-color-code-4)}:host ::ng-deep .token.regex{color:var(--si-sys-color-code-6)}:host ::ng-deep .token.important,:host ::ng-deep .token.bold{font-weight:600}:host ::ng-deep .token.italic{font-style:italic}:host ::ng-deep .token.entity{cursor:help}:host ::ng-deep .token.inserted{color:var(--si-sys-color-code-12)}:host ::ng-deep .token.deleted{color:var(--si-sys-color-code-11)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple]):not([ngNoCva])[formControlName],select:not([multiple]):not([ngNoCva])[formControl],select:not([multiple]):not([ngNoCva])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SiLivePreviewIframeComponent, selector: "si-live-preview-iframe", inputs: ["isFullscreen"], outputs: ["templateFromComponent"] }, { kind: "directive", type: SiStackblitzButtonDirective, selector: "button[siStackblitz]", inputs: ["framework", "baseUrl", "example"] }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
1448
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiLivePreviewComponent, isStandalone: true, selector: "si-live-preview", inputs: { initialTheme: { classPropertyName: "initialTheme", publicName: "initialTheme", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "document:fullscreenchange": "onFullscreenChange()", "document:webkitfullscreenchange": "onFullscreenChange()" }, properties: { "class.editor-fullscreen": "isFullscreen()", "class.is-mobile": "isMobile" } }, viewQueries: [{ propertyName: "templateElem", first: true, predicate: ["codeTemplate"], descendants: true, isSignal: true }, { propertyName: "typescriptElem", first: true, predicate: ["codeTypescript"], descendants: true, isSignal: true }, { propertyName: "reactVueElem", first: true, predicate: ["codeReactVue"], descendants: true, isSignal: true }, { propertyName: "consoleElem", first: true, predicate: ["consoleContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "@let active = activeTab();\n<div class=\"example\" [class.fullscreen]=\"exampleFullscreen()\" [class.is-mobile]=\"isMobile\">\n <div class=\"preview-iframe\" [class.is-mobile]=\"isMobile\">\n <si-live-preview-iframe\n [isFullscreen]=\"isFullscreen()\"\n (templateFromComponent)=\"templateFromComponent($event)\"\n />\n @if (state.inProgress()) {\n <div class=\"progress-container\">\n <div class=\"progress-inner\">\n <div class=\"progress-dots\"></div>\n </div>\n </div>\n }\n @if (isFullscreen()) {\n <div class=\"buttons\">\n <button\n type=\"button\"\n class=\"btn-command fullscreen\"\n title=\"Close fullscreen\"\n aria-label=\"Close fullscreen\"\n (click)=\"toggleFullscreen(true)\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M273,256l87.52-87.51a12,12,0,0,0-17-17L256,239l-87.51-87.52a12,12,0,0,0-17,17L239,256l-87.52,87.51a12,12,0,0,0,17,17L256,273l87.51,87.52a12,12,0,0,0,17-17Z\"\n />\n </svg>\n </button>\n </div>\n }\n </div>\n</div>\n\n<div class=\"code\" [class.is-mobile]=\"isMobile\" [class.is-collapsed]=\"editorCollapsed()\">\n <div class=\"collapse-wrapper\">\n <div role=\"tablist\" class=\"nav lp-tabs\">\n @if (showEditor() && (active === 'template' || active === 'typescript')) {\n <button\n type=\"button\"\n role=\"tab\"\n class=\"tab-item tab-link focus-inside\"\n id=\"templateEditorTab\"\n [class.tab-active]=\"active === 'template'\"\n (click)=\"activateTab('template')\"\n >\n Template\n </button>\n <button\n type=\"button\"\n role=\"tab\"\n class=\"tab-item tab-link focus-inside\"\n id=\"typescriptEditorTab\"\n [class.tab-active]=\"active === 'typescript'\"\n (click)=\"activateTab('typescript')\"\n >\n Typescript\n </button>\n }\n </div>\n @if (!isMobile) {\n <div class=\"collapse-button\" [class.is-collapsed]=\"editorCollapsed()\">\n <button\n type=\"button\"\n [attr.title]=\"editorCollapsed() ? 'Show editor' : 'Hide editor'\"\n [attr.aria-label]=\"editorCollapsed() ? 'Show editor' : 'Hide editor'\"\n (click)=\"toggleCollapse()\"\n >\n <svg class=\"collapse-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n class=\"cls-1\"\n d=\"M248.93,277.23l-1.72-1.44-110-110a12.43,12.43,0,0,1,15.86-19l1.72,1.44L256,249.41l101.21-101.2a12.45,12.45,0,0,1,15.86-1.44l1.72,1.44a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72-110,110A12.45,12.45,0,0,1,248.93,277.23Z\"\n />\n <path\n class=\"cls-1\"\n d=\"M248.93,365.23l-1.72-1.44-88-88a12.43,12.43,0,0,1,15.86-19l1.72,1.44L256,337.41l79.21-79.2a12.45,12.45,0,0,1,15.86-1.44l1.72,1.44a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72-88,88A12.45,12.45,0,0,1,248.93,365.23Z\"\n />\n </svg>\n </button>\n </div>\n }\n </div>\n\n @if (allowFullscreen && !isFullscreen()) {\n <div class=\"buttons\">\n @if (webcomponents && showEditor() && frameworks.size > 1) {\n <select\n aria-label=\"Select framework\"\n class=\"btn-command locale-selection\"\n [ngModel]=\"state.framework()\"\n (ngModelChange)=\"changeFramework($event)\"\n >\n @for (aFramework of frameworks | keyvalue; track $index) {\n <option [value]=\"aFramework.value\" [selected]=\"state.framework() === aFramework.value\">\n {{ aFramework.key }}\n </option>\n }\n </select>\n }\n @if (rootFontSizes.length) {\n <select\n name=\"selectRfs\"\n aria-label=\"Root font size\"\n title=\"Root font size\"\n class=\"btn-command rfs-selection\"\n [ngModel]=\"state.rootFontSize()\"\n (ngModelChange)=\"rfsSelectionChanges($event)\"\n >\n <option value=\"0\">none</option>\n <option value=\"initial\">initial</option>\n @for (rfs of rootFontSizes; track rfs) {\n <option [value]=\"rfs\">{{ rfs }}px</option>\n }\n </select>\n }\n @if (!!localeApi && showEditor()) {\n <select\n name=\"selectLocale\"\n aria-label=\"Select locale\"\n title=\"Locale\"\n class=\"btn-command locale-selection\"\n (change)=\"localeSelectionChanged($event.target)\"\n >\n @for (aLocale of availableLocales; track $index) {\n <option [value]=\"aLocale\" [selected]=\"state.locale() === aLocale\">\n {{ aLocale }}\n </option>\n }\n </select>\n }\n @if (rtlSwitcher) {\n <button\n type=\"button\"\n class=\"btn-command rtl-selection\"\n [title]=\"state.isRTL() ? 'Right-to-left layout' : 'Left-to-right layout'\"\n [attr.aria-label]=\"\n state.isRTL() ? 'RTL (right-to-left layout)' : 'LTR (left-to-right layout)'\n \"\n (click)=\"toggleRTL()\"\n >\n {{ state.isRTL() ? 'RTL' : 'LTR' }}\n </button>\n }\n @if (\n !isMobile &&\n !showEditor() &&\n (state.renderingError() || (state.logMessages().length && state.newMessages()))\n ) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Show console\"\n aria-label=\"Show console\"\n [class.alert]=\"state.renderingError()\"\n [class.info]=\"state.logMessages().length\"\n (click)=\"toggleCollapse()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M255.84,296a12,12,0,0,1-12-12V124a12,12,0,1,1,24,0V284A12,12,0,0,1,255.84,296Z\"\n />\n <path d=\"M256.12,387.81h-.24a16,16,0,0,1,0-32h.24a16,16,0,0,1,0,32Z\" />\n </svg>\n </button>\n }\n @if (switcherEnabled && !isMobile) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Toggle theme\"\n aria-label=\"Toggle theme\"\n (click)=\"toggleTheme()\"\n >\n @if (state.theme() === 'dark') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M256,349.82A93.82,93.82,0,1,0,162.18,256,93.93,93.93,0,0,0,256,349.82Zm0-163.64A69.82,69.82,0,1,1,186.18,256,69.9,69.9,0,0,1,256,186.18Z\"\n />\n <path\n d=\"M256,120.73a12,12,0,0,0,12-12V76a12,12,0,0,0-24,0v32.73A12,12,0,0,0,256,120.73Z\"\n />\n <path d=\"M268,436V403.27a12,12,0,0,0-24,0V436a12,12,0,0,0,24,0Z\" />\n <path d=\"M143.44,160.41a12,12,0,1,0,17-17l-23.23-23.23a12,12,0,1,0-17,17Z\" />\n <path\n d=\"M351.59,351.59a12,12,0,0,0,0,17l23.23,23.23a12,12,0,0,0,17-17l-23.23-23.23A12,12,0,0,0,351.59,351.59Z\"\n />\n <path\n d=\"M120.73,256a12,12,0,0,0-12-12H76a12,12,0,0,0,0,24h32.73A12,12,0,0,0,120.73,256Z\"\n />\n <path d=\"M436,244H403.27a12,12,0,0,0,0,24H436a12,12,0,0,0,0-24Z\" />\n <path\n d=\"M137.18,391.79l23.23-23.23a12,12,0,1,0-17-17l-23.23,23.23a12,12,0,1,0,17,17Z\"\n />\n <path\n d=\"M360.07,163.93a12,12,0,0,0,8.49-3.52l23.23-23.23a12,12,0,1,0-17-17l-23.23,23.23a12,12,0,0,0,8.48,20.49Z\"\n />\n </svg>\n } @else {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M360.07,147.88a12,12,0,0,0,5.89-21.1,168.05,168.05,0,0,0-214.71,0C80,186,70.19,292.1,129.38,363.35a166.9,166.9,0,0,0,113.77,59.93q7.9.74,15.75.73A166.74,166.74,0,0,0,366,385.22a12,12,0,0,0-5.89-21.1,109.33,109.33,0,0,1,0-216.24ZM244.43,275.77A133.48,133.48,0,0,0,330,381.08,144.11,144.11,0,0,1,147.84,348C97.1,287,105.51,196,166.58,145.24A144.08,144.08,0,0,1,330,130.94C272,152.38,234.91,212.29,244.43,275.77Z\"\n />\n </svg>\n }\n </button>\n }\n @if (!isMobile && showEditor()) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Example fullscreen\"\n aria-label=\"Example fullscreen\"\n (click)=\"toggleFullscreen(true)\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M406,112H106a42,42,0,0,0-42,42V358a42,42,0,0,0,42,42H406a42,42,0,0,0,42-42V154A42,42,0,0,0,406,112Zm18,246a18,18,0,0,1-18,18H106a18,18,0,0,1-18-18V154a18,18,0,0,1,18-18H406a18,18,0,0,1,18,18Z\"\n />\n </svg>\n </button>\n }\n @if (showEditor()) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Editor + Example fullscreen\"\n aria-label=\"Editor + Example fullscreen\"\n (click)=\"toggleFullscreen()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M406,112H106a42,42,0,0,0-42,42V358a42,42,0,0,0,42,42H406a42,42,0,0,0,42-42V154A42,42,0,0,0,406,112Zm18,42V313.44H199.35V136H406A18,18,0,0,1,424,154ZM88,358V154a18,18,0,0,1,18-18h69.35V376H106A18,18,0,0,1,88,358Zm318,18H199.35V337.44H424V358A18,18,0,0,1,406,376Z\"\n />\n </svg>\n </button>\n }\n <button\n siStackblitz\n class=\"btn-command\"\n type=\"button\"\n [baseUrl]=\"baseUrl\"\n [framework]=\"state.framework()\"\n [example]=\"state.example()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M182.32 480.02c-3.65 0-7.34-1.01-10.68-3.09-8.61-5.36-11.86-15.98-7.72-25.24s65.44-146.6 65.44-146.6c.58-1.29.19-2.34-.23-3-.42-.65-1.23-1.43-2.64-1.43h-54.96c-13.79 0-25.98-7.76-31.83-20.24s-4-26.82 4.83-37.41L314.3 39.26c6.5-7.79 17.46-9.55 26.06-4.19 8.61 5.36 11.85 15.98 7.72 25.24l-65.44 146.6c-.58 1.29-.19 2.34.23 3 .42.65 1.23 1.43 2.64 1.43h54.96c13.79 0 25.98 7.76 31.83 20.24s4 26.82-4.83 37.41L197.69 472.73c-3.97 4.77-9.62 7.28-15.38 7.28Zm101.45-354.13L169.1 263.49c-.85 1.02-1 2.15-.43 3.35.56 1.2 1.52 1.81 2.85 1.81h54.96c11.96 0 22.98 5.99 29.49 16.02s7.48 22.54 2.61 33.46l-30.35 67.98 114.67-137.6c.85-1.02 1-2.15.43-3.35s-1.52-1.81-2.85-1.81h-54.96c-11.96 0-22.98-5.99-29.49-16.02s-7.48-22.54-2.61-33.46l30.35-67.99Z\"\n />\n </svg>\n </button>\n </div>\n }\n <div class=\"tab-content\" [class.is-mobile]=\"isMobile\">\n <fieldset\n class=\"tab-pane\"\n [class.tab-active]=\"active === 'template'\"\n [class.is-mobile]=\"isMobile\"\n [disabled]=\"editorCollapsed()\"\n >\n <div class=\"buttons\" [class.show-copied]=\"showCopied()\">\n @if (!isMobile) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Open in new tab\"\n aria-label=\"Open in new tab\"\n (click)=\"openTab()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M344.94 150.78l46.12 38L345 226.94v-25.38l-24.19.19c-19.93.16-43.45 1.35-66.84 9a132.91 132.91 0 00-20.6 8.6c1.13-1.56 2.32-3.11 3.57-4.63 13.37-16.27 39-36.14 85.18-38.4l22.83-1.11v-24.43M329.09 109a8.33 8.33 0 00-3.48.77 8.14 8.14 0 00-4.67 7.38v35.15c-54.9 2.69-86 27-102.55 47.14-21.1 25.69-28.56 55.84-28.51 75.48a8.1 8.1 0 006 7.83 7.68 7.68 0 002.1.28 8.13 8.13 0 007.1-4.13c12.67-22.33 31.08-37.18 56.29-45.38 19.82-6.45 40.3-7.62 59.61-7.78v34.91a8 8 0 004.66 7.37 7.84 7.84 0 003.46.79 8.26 8.26 0 005.16-1.85l86.92-72a8.06 8.06 0 002.93-6.26 8.17 8.17 0 00-3-6.25l-86.9-71.66a8.11 8.11 0 00-5.15-1.84z\"\n />\n <path\n d=\"M397.23 399.39H114.94a26.89 26.89 0 01-26.86-26.86V204.26a26.89 26.89 0 0126.86-26.86h70.49a12 12 0 010 24h-70.49a2.9 2.9 0 00-2.86 2.86v168.27a2.9 2.9 0 002.86 2.86h282.29a2.9 2.9 0 002.85-2.86V253.67a12 12 0 0124 0v118.86a26.88 26.88 0 01-26.85 26.86z\"\n />\n </svg>\n </button>\n }\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy template as URL\"\n aria-label=\"Copy template as URL\"\n (click)=\"createLink()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M333.56,88.16a90,90,0,0,0-62.83,25.39l-.13.12-27,26.82a12,12,0,0,0,16.92,17l26.92-26.76a66.44,66.44,0,0,1,94,93.94l-47,47a67.6,67.6,0,0,1-7.19,6.23,66.44,66.44,0,0,1-93-13.41A12,12,0,0,0,215,278.88a89.88,89.88,0,0,0,59.52,35.34,91.93,91.93,0,0,0,13.1.94,89.77,89.77,0,0,0,54-18,90.87,90.87,0,0,0,9.79-8.48l47.07-47.07.14-.15A90.44,90.44,0,0,0,333.56,88.16Z\"\n />\n <path\n d=\"M251.28,354.51l-26.75,26.75a66.44,66.44,0,0,1-93.95-93.95l47-47a68.76,68.76,0,0,1,7.19-6.23,66.53,66.53,0,0,1,93,13.41A12,12,0,0,0,297,233.12a90.5,90.5,0,0,0-136.39-9.77l-47.06,47.07-.15.15A90.44,90.44,0,0,0,241.28,398.45a.93.93,0,0,0,.14-.14l26.83-26.83a12,12,0,0,0-17-17Z\"\n />\n </svg>\n </button>\n }\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy template\"\n aria-label=\"Copy template\"\n (click)=\"copyTemplate()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M380.8,197.2H240.4a43.25,43.25,0,0,0-43.2,43.2V380.8A43.25,43.25,0,0,0,240.4,424H380.8A43.25,43.25,0,0,0,424,380.8V240.4A43.25,43.25,0,0,0,380.8,197.2ZM400,380.8A19.22,19.22,0,0,1,380.8,400H240.4a19.22,19.22,0,0,1-19.2-19.2V240.4a19.22,19.22,0,0,1,19.2-19.2H380.8A19.22,19.22,0,0,1,400,240.4Z\"\n />\n <path\n d=\"M146.8,290.8H131.2A19.22,19.22,0,0,1,112,271.6V131.2A19.22,19.22,0,0,1,131.2,112H271.6a19.22,19.22,0,0,1,19.2,19.2v15.6a12,12,0,0,0,24,0V131.2A43.25,43.25,0,0,0,271.6,88H131.2A43.25,43.25,0,0,0,88,131.2V271.6a43.25,43.25,0,0,0,43.2,43.2h15.6a12,12,0,0,0,0-24Z\"\n />\n </svg>\n </button>\n }\n <div class=\"copied\" role=\"tooltip\">copied</div>\n </div>\n <div #codeTemplate class=\"codeflask-editor\"></div>\n </fieldset>\n <fieldset\n class=\"tab-pane\"\n [class.tab-active]=\"active === 'typescript'\"\n [class.is-mobile]=\"isMobile\"\n [disabled]=\"editorCollapsed()\"\n >\n <div class=\"buttons\" [class.show-copied]=\"showCopied()\">\n <span class=\"readonly-label\">read-only</span>\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy code\"\n aria-label=\"Copy code\"\n (click)=\"copyCode()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M380.8,197.2H240.4a43.25,43.25,0,0,0-43.2,43.2V380.8A43.25,43.25,0,0,0,240.4,424H380.8A43.25,43.25,0,0,0,424,380.8V240.4A43.25,43.25,0,0,0,380.8,197.2ZM400,380.8A19.22,19.22,0,0,1,380.8,400H240.4a19.22,19.22,0,0,1-19.2-19.2V240.4a19.22,19.22,0,0,1,19.2-19.2H380.8A19.22,19.22,0,0,1,400,240.4Z\"\n />\n <path\n d=\"M146.8,290.8H131.2A19.22,19.22,0,0,1,112,271.6V131.2A19.22,19.22,0,0,1,131.2,112H271.6a19.22,19.22,0,0,1,19.2,19.2v15.6a12,12,0,0,0,24,0V131.2A43.25,43.25,0,0,0,271.6,88H131.2A43.25,43.25,0,0,0,88,131.2V271.6a43.25,43.25,0,0,0,43.2,43.2h15.6a12,12,0,0,0,0-24Z\"\n />\n </svg>\n </button>\n }\n <div class=\"copied\" role=\"tooltip\">copied</div>\n </div>\n <fieldset #codeTypescript class=\"codeflask-editor readonly\"></fieldset>\n </fieldset>\n <fieldset\n class=\"tab-pane\"\n [class.tab-active]=\"active === 'react' || active === 'vue' || active === 'js'\"\n [class.is-mobile]=\"isMobile\"\n [disabled]=\"editorCollapsed()\"\n >\n <div class=\"buttons\" [class.show-copied]=\"showCopied()\">\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy template as URL\"\n aria-label=\"Copy template as URL\"\n (click)=\"createLink()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M333.56,88.16a90,90,0,0,0-62.83,25.39l-.13.12-27,26.82a12,12,0,0,0,16.92,17l26.92-26.76a66.44,66.44,0,0,1,94,93.94l-47,47a67.6,67.6,0,0,1-7.19,6.23,66.44,66.44,0,0,1-93-13.41A12,12,0,0,0,215,278.88a89.88,89.88,0,0,0,59.52,35.34,91.93,91.93,0,0,0,13.1.94,89.77,89.77,0,0,0,54-18,90.87,90.87,0,0,0,9.79-8.48l47.07-47.07.14-.15A90.44,90.44,0,0,0,333.56,88.16Z\"\n />\n <path\n d=\"M251.28,354.51l-26.75,26.75a66.44,66.44,0,0,1-93.95-93.95l47-47a68.76,68.76,0,0,1,7.19-6.23,66.53,66.53,0,0,1,93,13.41A12,12,0,0,0,297,233.12a90.5,90.5,0,0,0-136.39-9.77l-47.06,47.07-.15.15A90.44,90.44,0,0,0,241.28,398.45a.93.93,0,0,0,.14-.14l26.83-26.83a12,12,0,0,0-17-17Z\"\n />\n </svg>\n </button>\n }\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy code\"\n aria-label=\"Copy code\"\n (click)=\"copyCode()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M380.8,197.2H240.4a43.25,43.25,0,0,0-43.2,43.2V380.8A43.25,43.25,0,0,0,240.4,424H380.8A43.25,43.25,0,0,0,424,380.8V240.4A43.25,43.25,0,0,0,380.8,197.2ZM400,380.8A19.22,19.22,0,0,1,380.8,400H240.4a19.22,19.22,0,0,1-19.2-19.2V240.4a19.22,19.22,0,0,1,19.2-19.2H380.8A19.22,19.22,0,0,1,400,240.4Z\"\n />\n <path\n d=\"M146.8,290.8H131.2A19.22,19.22,0,0,1,112,271.6V131.2A19.22,19.22,0,0,1,131.2,112H271.6a19.22,19.22,0,0,1,19.2,19.2v15.6a12,12,0,0,0,24,0V131.2A43.25,43.25,0,0,0,271.6,88H131.2A43.25,43.25,0,0,0,88,131.2V271.6a43.25,43.25,0,0,0,43.2,43.2h15.6a12,12,0,0,0,0-24Z\"\n />\n </svg>\n </button>\n }\n <div class=\"copied\" role=\"tooltip\">copied</div>\n </div>\n <label for=\"reactVueEditor\">React and Vue code editor</label>\n <fieldset #codeReactVue class=\"codeflask-editor\"></fieldset>\n </fieldset>\n <div class=\"console\" [hidden]=\"!state.renderingError() && !state.logMessages().length\">\n <div class=\"buttons\">\n @if (state.logMessages().length) {\n <button\n type=\"button\"\n class=\"btn-command btn-clear\"\n title=\"Clear log\"\n aria-label=\"Clear log\"\n [class.on-danger]=\"state.renderingError()\"\n (click)=\"logClear()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M400,144H328V132a44.05,44.05,0,0,0-44-44H228a44.05,44.05,0,0,0-44,44v12H112a12,12,0,0,0,0,24h20V380a44.05,44.05,0,0,0,44,44H336a44.05,44.05,0,0,0,44-44V168h20a12,12,0,0,0,0-24ZM208,132a20,20,0,0,1,20-20h56a20,20,0,0,1,20,20v12H208ZM356,380a20,20,0,0,1-20,20H176a20,20,0,0,1-20-20V168H356Z\"\n />\n <path d=\"M224,344a12,12,0,0,0,12-12V236a12,12,0,0,0-24,0v96A12,12,0,0,0,224,344Z\" />\n <path d=\"M288,344a12,12,0,0,0,12-12V236a12,12,0,0,0-24,0v96A12,12,0,0,0,288,344Z\" />\n </svg>\n </button>\n }\n </div>\n <div #consoleContainer class=\"scroller\">\n @if (state.renderingError()) {\n <pre class=\"alert-danger\"><code class=\"bg-none\">{{ renderingErrorMessage() }}</code></pre>\n }\n @if (!state.renderingError() && state.logMessages().length) {\n <ul>\n @for (msg of state.logMessages(); track $index) {\n <li>{{ msg }}</li>\n }\n </ul>\n }\n </div>\n </div>\n </div>\n</div>\n", styles: [".lp-tabs{display:flex;flex-wrap:wrap;padding-inline-start:0;margin:0;list-style:none;background:none;inline-size:inherit;font-weight:700}.lp-tabs .tab-item:focus-visible{outline-offset:calc(-1 * var(--si-sys-sizing-focus-ring-width, 2px))}.lp-tabs .tab-item.tab-active.tab-link{color:var(--si-sys-color-text-accent);border-block-end-color:var(--si-sys-color-text-accent)!important}.lp-tabs .tab-item.tab-active.tab-link:hover{color:var(--si-sys-color-text-accent-hover)}.lp-tabs .tab-item.tab-link{font:inherit;background:none;min-inline-size:150px;display:block;padding-block:8px;padding-inline:15px;cursor:pointer;text-align:start;line-height:20px;color:var(--si-sys-color-text-primary);border:0;border-block-end:4px solid transparent}.lp-tabs .tab-item.tab-link:hover{text-decoration:none;color:var(--si-sys-color-text-accent-hover);border-block-end-color:var(--si-sys-color-border-4)}*:focus-visible{outline:var(--si-sys-sizing-focus-ring-width, 2px) solid var(--si-sys-color-effects-focus);outline-offset:var(--si-sys-sizing-focus-ring-offset, 1px)}:host{flex:1 1 auto;display:flex;flex-direction:column;overflow:hidden}:host.is-mobile{flex-direction:row}:host.editor-fullscreen{inline-size:100%}:host.editor-fullscreen ::ng-deep .ticket-links{position:absolute;inset-inline-end:48px;inset-block-start:13px}[hidden]{display:none!important}.example{flex:1 1 auto;background:var(--si-sys-color-background-0);margin:0;position:relative;display:flex;flex-direction:column}.example.is-mobile{order:2;flex:unset}.example.fullscreen{padding:0;block-size:100%;inline-size:100%}.example.fullscreen:after{content:unset}.example .btn-command{padding-block:4px;padding-inline:10px}.example .buttons{inset-inline-end:0}.preview-iframe{display:flex;flex:1}.preview-iframe.is-mobile{flex:1 0 0;min-block-size:0;overflow-y:auto;overflow-x:hidden;padding-block:0;padding-inline:30px;flex-direction:column}.collapse-wrapper{display:flex;min-block-size:40px}.lp-tabs{justify-content:flex-start;inline-size:100%;border-block-end:0}.collapse-button{display:flex;justify-content:flex-start;align-items:center;inline-size:100%}.collapse-button button{background-color:transparent;border:0;padding:6px;margin-inline-start:-16px;block-size:34px}.collapse-button button>svg{block-size:20px;fill:var(--si-sys-color-text-primary)}.collapse-button button:hover,.collapse-button button:focus,.collapse-button button:active{color:var(--si-sys-color-text-accent-hover)}.collapse-button button:hover>svg,.collapse-button button:focus>svg,.collapse-button button:active>svg{fill:currentColor}.code{position:relative;background-color:var(--si-sys-color-background-0);max-block-size:414px;transition:max-block-size .5s}.code:not(.is-mobile){border-block-start:1px solid var(--si-sys-color-border-4)}.code.is-collapsed{max-block-size:41px;overflow:hidden;background-color:var(--si-sys-color-background-0)}.code.is-collapsed .collapse-icon{transform:rotate(180deg)}.code .console{block-size:68px;position:relative;border-block-start:1px solid var(--si-sys-color-border-4);color:var(--si-sys-color-text-primary)}.code .console .scroller{block-size:100%;overflow:auto;position:absolute;inset:0}.code .console pre{block-size:100%;border:0;margin:0;overflow:auto}.code .console pre.alert-danger{color:var(--si-sys-color-text-on-danger);background-color:var(--si-sys-color-background-danger)}.code .console code.bg-none{background:none}.code .console ul{list-style:none;margin:0;padding:5px;font-family:Menlo,Ubuntu Mono,Liberation Mono,Consolas,Courier,monospace}.code .console .btn-clear.on-danger,.code .console .btn-clear.on-danger:hover,.code .console .btn-clear.on-danger:focus,.code .console .btn-clear.on-danger:active{color:var(--si-sys-color-text-on-danger)}.code.is-mobile{order:1;flex:1;display:flex;flex-direction:column;max-block-size:unset;transition:unset}.code.is-mobile .console{border-inline-end:1px solid var(--si-sys-color-border-4)}pre{border-radius:0}.tab-content{display:flex;flex-direction:column}.tab-content.is-mobile{border-inline-end:1px solid var(--si-sys-color-border-4);flex:1}.tab-content:not(.is-mobile){block-size:305px}.tab-pane{flex:1;display:none;position:relative}.tab-pane.tab-active{display:flex;flex-direction:column}fieldset{padding:0;margin:0;border:0}.buttons{position:absolute;z-index:2;inset-inline-end:16px;display:flex;align-items:center;inset-block-start:0;block-size:40px}.is-mobile .buttons{inset-inline-end:0}.btn-command{background-color:transparent;border:0;color:var(--si-sys-color-text-primary);padding:8px;font-size:20px;line-height:1;block-size:34px}.btn-command>svg{block-size:20px;fill:currentColor;vertical-align:unset!important}.btn-command:hover,.btn-command:focus,.btn-command:active{color:var(--si-sys-color-text-accent-hover)}.btn-command.fullscreen{font-size:30px;padding:4px}.btn-command.alert svg,.btn-command.info svg{border-radius:50%;fill:currentColor}.btn-command.alert svg{background-color:var(--si-sys-color-background-danger);color:var(--si-sys-color-text-on-danger)}.btn-command.info svg{background-color:var(--si-sys-color-background-accent-secondary);color:var(--si-sys-color-text-accent)}.rtl-selection,.rfs-selection,.locale-selection{font-size:14px}.copied,.readonly-label{font-size:12px;padding-block:2px;padding-inline:5px;border-radius:3px}.copied{display:none;color:var(--si-sys-color-background-0);background:var(--si-sys-color-text-primary);margin-inline-end:10px;margin-block-start:12px}.show-copied .copied{display:block!important}.readonly-label{color:var(--si-sys-color-text-primary);border:1px solid var(--si-sys-color-text-primary)}.show-copied>*{display:none}.codeflask-editor{flex:1;position:relative;border-block-start:1px solid var(--si-sys-color-border-4)}.codeflask-editor ::ng-deep textarea{box-shadow:none}:host(.embedded:not(.editor-fullscreen):not(.is-mobile)) .example{flex:0 0 var(--preview-height, 204px);min-block-size:0;overflow:hidden}.progress-container{position:absolute;inset:0;pointer-events:none}.progress-container,.progress-container .progress-inner{display:flex;justify-content:center;align-items:center}.progress-container .progress-inner{inline-size:64px;block-size:40px;background:#fffc;border:1px solid #ddd;border-radius:12px}.progress-dots:before,.progress-dots:after,.progress-dots{inline-size:10px;block-size:10px;border-radius:50%;background-color:#ddd;animation:dot-flashing .6s infinite linear alternate}.progress-dots{position:relative;animation-delay:.3s}.progress-dots:before,.progress-dots:after{content:\"\";display:inline-block;position:absolute;inset-block-start:0}.progress-dots:before{inset-inline-start:-15px;animation-delay:0s}.progress-dots:after{inset-inline-start:15px;animation-delay:.6s}@keyframes dot-flashing{0%{background-color:#333}50%,to{background-color:#ddd}}\n", ":host ::ng-deep .readonly .codeflask{background-color:var(--si-sys-color-background-1)}:host ::ng-deep .codeflask{background-color:var(--si-sys-color-background-1)}:host ::ng-deep .codeflask pre,:host ::ng-deep .codeflask code{color:var(--si-sys-color-code-1);background:none;border:0;border-radius:0;text-align:start;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;tab-size:2;hyphens:none}:host ::ng-deep .codeflask code{padding:0}:host ::ng-deep .codeflask .codeflask__flatten,:host ::ng-deep .codeflask .codeflask__code{font-family:Menlo,Ubuntu Mono,Liberation Mono,Consolas,Courier,monospace;line-height:20px}:host ::ng-deep .codeflask .codeflask__flatten{min-inline-size:calc(100% - 40px);inline-size:auto}:host ::ng-deep .codeflask .codeflask__pre{z-index:0}:host ::ng-deep .codeflask .codeflask__textarea{z-index:1;color:transparent;caret-color:var(--si-sys-color-code-1)}:host ::ng-deep .codeflask.codeflask--has-line-numbers:before{background:var(--si-sys-color-background-0)}:host ::ng-deep .codeflask__lines{color:var(--si-sys-color-text-disabled)}:host ::ng-deep .namespace{opacity:.7}:host ::ng-deep .token.comment,:host ::ng-deep .token.prolog,:host ::ng-deep .token.doctype,:host ::ng-deep .token.cdata{color:var(--si-sys-color-code-8);font-style:italic}:host ::ng-deep .token.punctuation{color:var(--si-sys-color-code-9)}:host ::ng-deep .token.keyword,:host ::ng-deep .token.operator,:host ::ng-deep .token.boolean,:host ::ng-deep .token.symbol{color:var(--si-sys-color-code-2)}:host ::ng-deep .token.constant{color:var(--si-sys-color-code-3)}:host ::ng-deep .token.builtin{color:var(--si-sys-color-code-5)}:host ::ng-deep .token.property{color:var(--si-sys-color-code-4)}:host ::ng-deep .token.tag,:host ::ng-deep .token.selector{color:var(--si-sys-color-code-10)}:host ::ng-deep .token.number{color:var(--si-sys-color-code-7)}:host ::ng-deep .token.attr-name{color:var(--si-sys-color-code-3)}:host ::ng-deep .token.attr-value{color:var(--si-sys-color-code-6)}:host ::ng-deep .token.string,:host ::ng-deep .token.char{color:var(--si-sys-color-code-6)}:host ::ng-deep .token.function{color:var(--si-sys-color-code-5)}:host ::ng-deep .token.class-name{color:var(--si-sys-color-code-11)}:host ::ng-deep .token.important,:host ::ng-deep .token.variable{color:var(--si-sys-color-code-4)}:host ::ng-deep .token.regex{color:var(--si-sys-color-code-6)}:host ::ng-deep .token.important,:host ::ng-deep .token.bold{font-weight:600}:host ::ng-deep .token.italic{font-style:italic}:host ::ng-deep .token.entity{cursor:help}:host ::ng-deep .token.inserted{color:var(--si-sys-color-code-12)}:host ::ng-deep .token.deleted{color:var(--si-sys-color-code-11)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple]):not([ngNoCva])[formControlName],select:not([multiple]):not([ngNoCva])[formControl],select:not([multiple]):not([ngNoCva])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SiLivePreviewIframeComponent, selector: "si-live-preview-iframe", inputs: ["isFullscreen"], outputs: ["templateFromComponent"] }, { kind: "directive", type: SiStackblitzButtonDirective, selector: "button[siStackblitz]", inputs: ["framework", "baseUrl", "example"] }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
1426
1449
  }
1427
1450
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiLivePreviewComponent, decorators: [{
1428
1451
  type: Component,
@@ -1431,8 +1454,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
1431
1454
  '[class.is-mobile]': 'isMobile',
1432
1455
  '(document:fullscreenchange)': 'onFullscreenChange()',
1433
1456
  '(document:webkitfullscreenchange)': 'onFullscreenChange()'
1434
- }, template: "@let active = activeTab();\n<div class=\"example\" [class.fullscreen]=\"exampleFullscreen()\" [class.is-mobile]=\"isMobile\">\n <div class=\"preview-iframe\" [class.is-mobile]=\"isMobile\">\n <si-live-preview-iframe\n [isFullscreen]=\"isFullscreen()\"\n (templateFromComponent)=\"templateFromComponent($event)\"\n />\n @if (state.inProgress()) {\n <div class=\"progress-container\">\n <div class=\"progress-inner\">\n <div class=\"progress-dots\"></div>\n </div>\n </div>\n }\n @if (isFullscreen()) {\n <div class=\"buttons\">\n <button\n type=\"button\"\n class=\"btn-command fullscreen\"\n title=\"Close fullscreen\"\n aria-label=\"Close fullscreen\"\n (click)=\"toggleFullscreen(true)\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M273,256l87.52-87.51a12,12,0,0,0-17-17L256,239l-87.51-87.52a12,12,0,0,0-17,17L239,256l-87.52,87.51a12,12,0,0,0,17,17L256,273l87.51,87.52a12,12,0,0,0,17-17Z\"\n />\n </svg>\n </button>\n </div>\n }\n </div>\n</div>\n\n<div class=\"code\" [class.is-mobile]=\"isMobile\" [class.is-collapsed]=\"editorCollapsed()\">\n <div class=\"collapse-wrapper\">\n <div role=\"tablist\" class=\"nav lp-tabs\">\n @if (showEditor() && (active === 'template' || active === 'typescript')) {\n <button\n type=\"button\"\n role=\"tab\"\n class=\"tab-item tab-link focus-inside\"\n id=\"templateEditorTab\"\n [class.tab-active]=\"active === 'template'\"\n (click)=\"activateTab('template')\"\n >\n Template\n </button>\n <button\n type=\"button\"\n role=\"tab\"\n class=\"tab-item tab-link focus-inside\"\n id=\"typescriptEditorTab\"\n [class.tab-active]=\"active === 'typescript'\"\n (click)=\"activateTab('typescript')\"\n >\n Typescript\n </button>\n }\n </div>\n @if (!isMobile) {\n <div class=\"collapse-button\" [class.is-collapsed]=\"editorCollapsed()\">\n <button\n type=\"button\"\n [attr.title]=\"editorCollapsed() ? 'Show editor' : 'Hide editor'\"\n [attr.aria-label]=\"editorCollapsed() ? 'Show editor' : 'Hide editor'\"\n (click)=\"toggleCollapse()\"\n >\n <svg class=\"collapse-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n class=\"cls-1\"\n d=\"M248.93,277.23l-1.72-1.44-110-110a12.43,12.43,0,0,1,15.86-19l1.72,1.44L256,249.41l101.21-101.2a12.45,12.45,0,0,1,15.86-1.44l1.72,1.44a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72-110,110A12.45,12.45,0,0,1,248.93,277.23Z\"\n />\n <path\n class=\"cls-1\"\n d=\"M248.93,365.23l-1.72-1.44-88-88a12.43,12.43,0,0,1,15.86-19l1.72,1.44L256,337.41l79.21-79.2a12.45,12.45,0,0,1,15.86-1.44l1.72,1.44a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72-88,88A12.45,12.45,0,0,1,248.93,365.23Z\"\n />\n </svg>\n </button>\n </div>\n }\n </div>\n\n @if (allowFullscreen && !isFullscreen()) {\n <div class=\"buttons\">\n @if (webcomponents && showEditor() && frameworks.size > 1) {\n <select\n aria-label=\"Select framework\"\n class=\"btn-command locale-selection\"\n [ngModel]=\"state.framework()\"\n (ngModelChange)=\"changeFramework($event)\"\n >\n @for (aFramework of frameworks | keyvalue; track $index) {\n <option [value]=\"aFramework.value\" [selected]=\"state.framework() === aFramework.value\">\n {{ aFramework.key }}\n </option>\n }\n </select>\n }\n @if (rootFontSizes.length) {\n <select\n name=\"selectRfs\"\n aria-label=\"Root font size\"\n title=\"Root font size\"\n class=\"btn-command rfs-selection\"\n [ngModel]=\"state.rootFontSize()\"\n (ngModelChange)=\"rfsSelectionChanges($event)\"\n >\n <option value=\"0\">none</option>\n <option value=\"initial\">initial</option>\n @for (rfs of rootFontSizes; track rfs) {\n <option [value]=\"rfs\">{{ rfs }}px</option>\n }\n </select>\n }\n @if (!!localeApi && showEditor()) {\n <select\n name=\"selectLocale\"\n aria-label=\"Select locale\"\n title=\"Locale\"\n class=\"btn-command locale-selection\"\n (change)=\"localeSelectionChanged($event.target)\"\n >\n @for (aLocale of availableLocales; track $index) {\n <option [value]=\"aLocale\" [selected]=\"state.locale() === aLocale\">\n {{ aLocale }}\n </option>\n }\n </select>\n }\n @if (rtlSwitcher) {\n <button\n type=\"button\"\n class=\"btn-command rtl-selection\"\n [title]=\"state.isRTL() ? 'Right-to-left layout' : 'Left-to-right layout'\"\n [attr.aria-label]=\"state.isRTL() ? 'Right-to-left layout' : 'Left-to-right layout'\"\n (click)=\"toggleRTL()\"\n >\n {{ state.isRTL() ? 'RTL' : 'LTR' }}\n </button>\n }\n @if (\n !isMobile &&\n !showEditor() &&\n (state.renderingError() || (state.logMessages().length && state.newMessages()))\n ) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Show console\"\n aria-label=\"Show console\"\n [class.alert]=\"state.renderingError()\"\n [class.info]=\"state.logMessages().length\"\n (click)=\"toggleCollapse()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M255.84,296a12,12,0,0,1-12-12V124a12,12,0,1,1,24,0V284A12,12,0,0,1,255.84,296Z\"\n />\n <path d=\"M256.12,387.81h-.24a16,16,0,0,1,0-32h.24a16,16,0,0,1,0,32Z\" />\n </svg>\n </button>\n }\n @if (switcherEnabled && !isMobile) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Toggle theme\"\n aria-label=\"Toggle theme\"\n (click)=\"toggleTheme()\"\n >\n @if (state.theme() === 'dark') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M256,349.82A93.82,93.82,0,1,0,162.18,256,93.93,93.93,0,0,0,256,349.82Zm0-163.64A69.82,69.82,0,1,1,186.18,256,69.9,69.9,0,0,1,256,186.18Z\"\n />\n <path\n d=\"M256,120.73a12,12,0,0,0,12-12V76a12,12,0,0,0-24,0v32.73A12,12,0,0,0,256,120.73Z\"\n />\n <path d=\"M268,436V403.27a12,12,0,0,0-24,0V436a12,12,0,0,0,24,0Z\" />\n <path d=\"M143.44,160.41a12,12,0,1,0,17-17l-23.23-23.23a12,12,0,1,0-17,17Z\" />\n <path\n d=\"M351.59,351.59a12,12,0,0,0,0,17l23.23,23.23a12,12,0,0,0,17-17l-23.23-23.23A12,12,0,0,0,351.59,351.59Z\"\n />\n <path\n d=\"M120.73,256a12,12,0,0,0-12-12H76a12,12,0,0,0,0,24h32.73A12,12,0,0,0,120.73,256Z\"\n />\n <path d=\"M436,244H403.27a12,12,0,0,0,0,24H436a12,12,0,0,0,0-24Z\" />\n <path\n d=\"M137.18,391.79l23.23-23.23a12,12,0,1,0-17-17l-23.23,23.23a12,12,0,1,0,17,17Z\"\n />\n <path\n d=\"M360.07,163.93a12,12,0,0,0,8.49-3.52l23.23-23.23a12,12,0,1,0-17-17l-23.23,23.23a12,12,0,0,0,8.48,20.49Z\"\n />\n </svg>\n } @else {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M360.07,147.88a12,12,0,0,0,5.89-21.1,168.05,168.05,0,0,0-214.71,0C80,186,70.19,292.1,129.38,363.35a166.9,166.9,0,0,0,113.77,59.93q7.9.74,15.75.73A166.74,166.74,0,0,0,366,385.22a12,12,0,0,0-5.89-21.1,109.33,109.33,0,0,1,0-216.24ZM244.43,275.77A133.48,133.48,0,0,0,330,381.08,144.11,144.11,0,0,1,147.84,348C97.1,287,105.51,196,166.58,145.24A144.08,144.08,0,0,1,330,130.94C272,152.38,234.91,212.29,244.43,275.77Z\"\n />\n </svg>\n }\n </button>\n }\n @if (!isMobile && showEditor()) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Example fullscreen\"\n aria-label=\"Example fullscreen\"\n (click)=\"toggleFullscreen(true)\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M406,112H106a42,42,0,0,0-42,42V358a42,42,0,0,0,42,42H406a42,42,0,0,0,42-42V154A42,42,0,0,0,406,112Zm18,246a18,18,0,0,1-18,18H106a18,18,0,0,1-18-18V154a18,18,0,0,1,18-18H406a18,18,0,0,1,18,18Z\"\n />\n </svg>\n </button>\n }\n @if (showEditor()) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Editor + Example fullscreen\"\n aria-label=\"Editor + Example fullscreen\"\n (click)=\"toggleFullscreen()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M406,112H106a42,42,0,0,0-42,42V358a42,42,0,0,0,42,42H406a42,42,0,0,0,42-42V154A42,42,0,0,0,406,112Zm18,42V313.44H199.35V136H406A18,18,0,0,1,424,154ZM88,358V154a18,18,0,0,1,18-18h69.35V376H106A18,18,0,0,1,88,358Zm318,18H199.35V337.44H424V358A18,18,0,0,1,406,376Z\"\n />\n </svg>\n </button>\n }\n <button\n siStackblitz\n class=\"btn-command\"\n type=\"button\"\n [baseUrl]=\"baseUrl\"\n [framework]=\"state.framework()\"\n [example]=\"state.example()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M182.32 480.02c-3.65 0-7.34-1.01-10.68-3.09-8.61-5.36-11.86-15.98-7.72-25.24s65.44-146.6 65.44-146.6c.58-1.29.19-2.34-.23-3-.42-.65-1.23-1.43-2.64-1.43h-54.96c-13.79 0-25.98-7.76-31.83-20.24s-4-26.82 4.83-37.41L314.3 39.26c6.5-7.79 17.46-9.55 26.06-4.19 8.61 5.36 11.85 15.98 7.72 25.24l-65.44 146.6c-.58 1.29-.19 2.34.23 3 .42.65 1.23 1.43 2.64 1.43h54.96c13.79 0 25.98 7.76 31.83 20.24s4 26.82-4.83 37.41L197.69 472.73c-3.97 4.77-9.62 7.28-15.38 7.28Zm101.45-354.13L169.1 263.49c-.85 1.02-1 2.15-.43 3.35.56 1.2 1.52 1.81 2.85 1.81h54.96c11.96 0 22.98 5.99 29.49 16.02s7.48 22.54 2.61 33.46l-30.35 67.98 114.67-137.6c.85-1.02 1-2.15.43-3.35s-1.52-1.81-2.85-1.81h-54.96c-11.96 0-22.98-5.99-29.49-16.02s-7.48-22.54-2.61-33.46l30.35-67.99Z\"\n />\n </svg>\n </button>\n </div>\n }\n <div class=\"tab-content\" [class.is-mobile]=\"isMobile\">\n <fieldset\n class=\"tab-pane\"\n [class.tab-active]=\"active === 'template'\"\n [class.is-mobile]=\"isMobile\"\n [disabled]=\"editorCollapsed()\"\n >\n <div class=\"buttons\" [class.show-copied]=\"showCopied()\">\n @if (!isMobile) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Open in new tab\"\n aria-label=\"Open in new tab\"\n (click)=\"openTab()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M344.94 150.78l46.12 38L345 226.94v-25.38l-24.19.19c-19.93.16-43.45 1.35-66.84 9a132.91 132.91 0 00-20.6 8.6c1.13-1.56 2.32-3.11 3.57-4.63 13.37-16.27 39-36.14 85.18-38.4l22.83-1.11v-24.43M329.09 109a8.33 8.33 0 00-3.48.77 8.14 8.14 0 00-4.67 7.38v35.15c-54.9 2.69-86 27-102.55 47.14-21.1 25.69-28.56 55.84-28.51 75.48a8.1 8.1 0 006 7.83 7.68 7.68 0 002.1.28 8.13 8.13 0 007.1-4.13c12.67-22.33 31.08-37.18 56.29-45.38 19.82-6.45 40.3-7.62 59.61-7.78v34.91a8 8 0 004.66 7.37 7.84 7.84 0 003.46.79 8.26 8.26 0 005.16-1.85l86.92-72a8.06 8.06 0 002.93-6.26 8.17 8.17 0 00-3-6.25l-86.9-71.66a8.11 8.11 0 00-5.15-1.84z\"\n />\n <path\n d=\"M397.23 399.39H114.94a26.89 26.89 0 01-26.86-26.86V204.26a26.89 26.89 0 0126.86-26.86h70.49a12 12 0 010 24h-70.49a2.9 2.9 0 00-2.86 2.86v168.27a2.9 2.9 0 002.86 2.86h282.29a2.9 2.9 0 002.85-2.86V253.67a12 12 0 0124 0v118.86a26.88 26.88 0 01-26.85 26.86z\"\n />\n </svg>\n </button>\n }\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy template as URL\"\n aria-label=\"Copy template as URL\"\n (click)=\"createLink()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M333.56,88.16a90,90,0,0,0-62.83,25.39l-.13.12-27,26.82a12,12,0,0,0,16.92,17l26.92-26.76a66.44,66.44,0,0,1,94,93.94l-47,47a67.6,67.6,0,0,1-7.19,6.23,66.44,66.44,0,0,1-93-13.41A12,12,0,0,0,215,278.88a89.88,89.88,0,0,0,59.52,35.34,91.93,91.93,0,0,0,13.1.94,89.77,89.77,0,0,0,54-18,90.87,90.87,0,0,0,9.79-8.48l47.07-47.07.14-.15A90.44,90.44,0,0,0,333.56,88.16Z\"\n />\n <path\n d=\"M251.28,354.51l-26.75,26.75a66.44,66.44,0,0,1-93.95-93.95l47-47a68.76,68.76,0,0,1,7.19-6.23,66.53,66.53,0,0,1,93,13.41A12,12,0,0,0,297,233.12a90.5,90.5,0,0,0-136.39-9.77l-47.06,47.07-.15.15A90.44,90.44,0,0,0,241.28,398.45a.93.93,0,0,0,.14-.14l26.83-26.83a12,12,0,0,0-17-17Z\"\n />\n </svg>\n </button>\n }\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy template\"\n aria-label=\"Copy template\"\n (click)=\"copyTemplate()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M380.8,197.2H240.4a43.25,43.25,0,0,0-43.2,43.2V380.8A43.25,43.25,0,0,0,240.4,424H380.8A43.25,43.25,0,0,0,424,380.8V240.4A43.25,43.25,0,0,0,380.8,197.2ZM400,380.8A19.22,19.22,0,0,1,380.8,400H240.4a19.22,19.22,0,0,1-19.2-19.2V240.4a19.22,19.22,0,0,1,19.2-19.2H380.8A19.22,19.22,0,0,1,400,240.4Z\"\n />\n <path\n d=\"M146.8,290.8H131.2A19.22,19.22,0,0,1,112,271.6V131.2A19.22,19.22,0,0,1,131.2,112H271.6a19.22,19.22,0,0,1,19.2,19.2v15.6a12,12,0,0,0,24,0V131.2A43.25,43.25,0,0,0,271.6,88H131.2A43.25,43.25,0,0,0,88,131.2V271.6a43.25,43.25,0,0,0,43.2,43.2h15.6a12,12,0,0,0,0-24Z\"\n />\n </svg>\n </button>\n }\n <div class=\"copied\" role=\"tooltip\">copied</div>\n </div>\n <div #codeTemplate class=\"codeflask-editor\"></div>\n </fieldset>\n <fieldset\n class=\"tab-pane\"\n [class.tab-active]=\"active === 'typescript'\"\n [class.is-mobile]=\"isMobile\"\n [disabled]=\"editorCollapsed()\"\n >\n <div class=\"buttons\" [class.show-copied]=\"showCopied()\">\n <span class=\"readonly-label\">read-only</span>\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy code\"\n aria-label=\"Copy code\"\n (click)=\"copyCode()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M380.8,197.2H240.4a43.25,43.25,0,0,0-43.2,43.2V380.8A43.25,43.25,0,0,0,240.4,424H380.8A43.25,43.25,0,0,0,424,380.8V240.4A43.25,43.25,0,0,0,380.8,197.2ZM400,380.8A19.22,19.22,0,0,1,380.8,400H240.4a19.22,19.22,0,0,1-19.2-19.2V240.4a19.22,19.22,0,0,1,19.2-19.2H380.8A19.22,19.22,0,0,1,400,240.4Z\"\n />\n <path\n d=\"M146.8,290.8H131.2A19.22,19.22,0,0,1,112,271.6V131.2A19.22,19.22,0,0,1,131.2,112H271.6a19.22,19.22,0,0,1,19.2,19.2v15.6a12,12,0,0,0,24,0V131.2A43.25,43.25,0,0,0,271.6,88H131.2A43.25,43.25,0,0,0,88,131.2V271.6a43.25,43.25,0,0,0,43.2,43.2h15.6a12,12,0,0,0,0-24Z\"\n />\n </svg>\n </button>\n }\n <div class=\"copied\" role=\"tooltip\">copied</div>\n </div>\n <fieldset #codeTypescript class=\"codeflask-editor readonly\"></fieldset>\n </fieldset>\n <fieldset\n class=\"tab-pane\"\n [class.tab-active]=\"active === 'react' || active === 'vue' || active === 'js'\"\n [class.is-mobile]=\"isMobile\"\n [disabled]=\"editorCollapsed()\"\n >\n <div class=\"buttons\" [class.show-copied]=\"showCopied()\">\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy template as URL\"\n aria-label=\"Copy template as URL\"\n (click)=\"createLink()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M333.56,88.16a90,90,0,0,0-62.83,25.39l-.13.12-27,26.82a12,12,0,0,0,16.92,17l26.92-26.76a66.44,66.44,0,0,1,94,93.94l-47,47a67.6,67.6,0,0,1-7.19,6.23,66.44,66.44,0,0,1-93-13.41A12,12,0,0,0,215,278.88a89.88,89.88,0,0,0,59.52,35.34,91.93,91.93,0,0,0,13.1.94,89.77,89.77,0,0,0,54-18,90.87,90.87,0,0,0,9.79-8.48l47.07-47.07.14-.15A90.44,90.44,0,0,0,333.56,88.16Z\"\n />\n <path\n d=\"M251.28,354.51l-26.75,26.75a66.44,66.44,0,0,1-93.95-93.95l47-47a68.76,68.76,0,0,1,7.19-6.23,66.53,66.53,0,0,1,93,13.41A12,12,0,0,0,297,233.12a90.5,90.5,0,0,0-136.39-9.77l-47.06,47.07-.15.15A90.44,90.44,0,0,0,241.28,398.45a.93.93,0,0,0,.14-.14l26.83-26.83a12,12,0,0,0-17-17Z\"\n />\n </svg>\n </button>\n }\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy code\"\n aria-label=\"Copy code\"\n (click)=\"copyCode()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M380.8,197.2H240.4a43.25,43.25,0,0,0-43.2,43.2V380.8A43.25,43.25,0,0,0,240.4,424H380.8A43.25,43.25,0,0,0,424,380.8V240.4A43.25,43.25,0,0,0,380.8,197.2ZM400,380.8A19.22,19.22,0,0,1,380.8,400H240.4a19.22,19.22,0,0,1-19.2-19.2V240.4a19.22,19.22,0,0,1,19.2-19.2H380.8A19.22,19.22,0,0,1,400,240.4Z\"\n />\n <path\n d=\"M146.8,290.8H131.2A19.22,19.22,0,0,1,112,271.6V131.2A19.22,19.22,0,0,1,131.2,112H271.6a19.22,19.22,0,0,1,19.2,19.2v15.6a12,12,0,0,0,24,0V131.2A43.25,43.25,0,0,0,271.6,88H131.2A43.25,43.25,0,0,0,88,131.2V271.6a43.25,43.25,0,0,0,43.2,43.2h15.6a12,12,0,0,0,0-24Z\"\n />\n </svg>\n </button>\n }\n <div class=\"copied\" role=\"tooltip\">copied</div>\n </div>\n <label for=\"reactVueEditor\">React and Vue code editor</label>\n <fieldset #codeReactVue class=\"codeflask-editor\"></fieldset>\n </fieldset>\n <div class=\"console\" [hidden]=\"!state.renderingError() && !state.logMessages().length\">\n <div class=\"buttons\">\n @if (state.logMessages().length) {\n <button\n type=\"button\"\n class=\"btn-command btn-clear\"\n title=\"Clear log\"\n aria-label=\"Clear log\"\n (click)=\"logClear()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M400,144H328V132a44.05,44.05,0,0,0-44-44H228a44.05,44.05,0,0,0-44,44v12H112a12,12,0,0,0,0,24h20V380a44.05,44.05,0,0,0,44,44H336a44.05,44.05,0,0,0,44-44V168h20a12,12,0,0,0,0-24ZM208,132a20,20,0,0,1,20-20h56a20,20,0,0,1,20,20v12H208ZM356,380a20,20,0,0,1-20,20H176a20,20,0,0,1-20-20V168H356Z\"\n />\n <path d=\"M224,344a12,12,0,0,0,12-12V236a12,12,0,0,0-24,0v96A12,12,0,0,0,224,344Z\" />\n <path d=\"M288,344a12,12,0,0,0,12-12V236a12,12,0,0,0-24,0v96A12,12,0,0,0,288,344Z\" />\n </svg>\n </button>\n }\n </div>\n <div #consoleContainer class=\"scroller\">\n @if (state.renderingError()) {\n <pre class=\"alert-danger\"><code class=\"bg-none\">{{ renderingErrorMessage() }}</code></pre>\n }\n @if (!state.renderingError() && state.logMessages().length) {\n <ul>\n @for (msg of state.logMessages(); track $index) {\n <li>{{ msg }}</li>\n }\n </ul>\n }\n </div>\n </div>\n </div>\n</div>\n", styles: [".lp-tabs{display:flex;flex-wrap:wrap;padding-inline-start:0;margin:0;list-style:none;background:none;inline-size:inherit;font-weight:700}.lp-tabs .tab-item:focus-visible{outline-offset:calc(-1 * var(--element-button-focus-width))}.lp-tabs .tab-item.tab-active.tab-link{color:var(--si-sys-color-text-accent);border-block-end-color:var(--si-sys-color-text-accent)!important}.lp-tabs .tab-item.tab-active.tab-link:hover{color:var(--si-sys-color-text-accent-hover)}.lp-tabs .tab-item.tab-link{font:inherit;background:none;min-inline-size:150px;display:block;padding-block:8px;padding-inline:15px;cursor:pointer;text-align:start;line-height:20px;color:var(--si-sys-color-text-primary);border:0;border-block-end:4px solid transparent}.lp-tabs .tab-item.tab-link:hover{text-decoration:none;color:var(--si-sys-color-text-accent-hover);border-block-end-color:var(--si-sys-color-border-4)}*:focus-visible{outline:var(--element-button-focus-width) solid var(--si-sys-color-effects-focus);outline-offset:var(--element-button-focus-overlay-width)}:host{flex:1 1 auto;display:flex;flex-direction:column;overflow:hidden}:host.is-mobile{flex-direction:row}:host.editor-fullscreen{inline-size:100%}:host.editor-fullscreen ::ng-deep .ticket-links{position:absolute;inset-inline-end:48px;inset-block-start:13px}[hidden]{display:none!important}.example{flex:1 1 auto;background:var(--si-sys-color-background-0);margin:0;position:relative;display:flex;flex-direction:column}.example.is-mobile{order:2;flex:unset}.example.fullscreen{padding:0;block-size:100%;inline-size:100%}.example.fullscreen:after{content:unset}.example .btn-command{padding-block:4px;padding-inline:10px}.example .buttons{inset-inline-end:0}.preview-iframe{display:flex;flex:1}.preview-iframe.is-mobile{flex:1 0 0;min-block-size:0;overflow-y:auto;overflow-x:hidden;padding-block:0;padding-inline:30px;flex-direction:column}.collapse-wrapper{display:flex;min-block-size:40px}.lp-tabs{justify-content:flex-start;inline-size:100%;border-block-end:0}.collapse-button{display:flex;justify-content:flex-start;align-items:center;inline-size:100%}.collapse-button button{background-color:transparent;border:0;padding:6px;margin-inline-start:-16px;block-size:34px}.collapse-button button>svg{block-size:20px;fill:var(--si-sys-color-text-primary)}.collapse-button button:hover,.collapse-button button:focus,.collapse-button button:active{color:var(--si-sys-color-text-accent-hover)}.collapse-button button:hover>svg,.collapse-button button:focus>svg,.collapse-button button:active>svg{fill:currentColor}.code{position:relative;background-color:var(--si-sys-color-background-0);max-block-size:414px;transition:max-block-size .5s}.code.is-collapsed{max-block-size:41px;overflow:hidden;background-color:var(--si-sys-color-background-0);border-block-start:1px solid var(--si-sys-color-border-4)}.code.is-collapsed .collapse-icon{transform:rotate(180deg)}.code .console{block-size:68px;position:relative;border-block-start:1px solid var(--si-sys-color-border-4);color:var(--si-sys-color-text-primary)}.code .console .scroller{block-size:100%;overflow:auto;position:absolute;inset:0}.code .console pre{block-size:100%;border:0;margin:0;overflow:auto}.code .console pre.alert-danger{color:var(--si-sys-color-text-on-danger);background-color:var(--si-sys-color-background-danger)}.code .console code.bg-none{background:none}.code .console ul{list-style:none;margin:0;padding:5px;font-family:Menlo,Ubuntu Mono,Liberation Mono,Consolas,Courier,monospace}.code .console .btn-clear:hover{color:var(--si-sys-color-text-on-danger)}.code.is-mobile{order:1;flex:1;display:flex;flex-direction:column;max-block-size:unset;transition:unset}.code.is-mobile .console{border-inline-end:1px solid var(--si-sys-color-border-4)}pre{border-radius:0}.tab-content{display:flex;flex-direction:column}.tab-content.is-mobile{border-inline-end:1px solid var(--si-sys-color-border-4);flex:1}.tab-content:not(.is-mobile){block-size:305px}.tab-pane{flex:1;display:none;position:relative}.tab-pane.tab-active{display:flex;flex-direction:column}fieldset{padding:0;margin:0;border:0}.buttons{position:absolute;z-index:100;inset-inline-end:16px;display:flex;align-items:center;inset-block-start:0;block-size:40px}.is-mobile .buttons{inset-inline-end:0}.btn-command{background-color:transparent;border:0;color:var(--si-sys-color-text-primary);padding:8px;font-size:20px;line-height:1;block-size:34px}.btn-command>svg{block-size:20px;fill:currentColor;vertical-align:unset!important}.btn-command:hover,.btn-command:focus,.btn-command:active{color:var(--si-sys-color-text-accent-hover)}.btn-command.fullscreen{font-size:30px;padding:4px}.btn-command.alert svg,.btn-command.info svg{border-radius:50%;fill:currentColor}.btn-command.alert svg{background-color:var(--si-sys-color-background-danger);color:var(--si-sys-color-text-on-danger)}.btn-command.info svg{background-color:var(--si-sys-color-background-accent-secondary);color:var(--si-sys-color-text-accent)}.rtl-selection,.rfs-selection,.locale-selection{font-size:14px}.copied,.readonly-label{font-size:12px;padding-block:2px;padding-inline:5px;border-radius:3px}.copied{display:none;color:var(--si-sys-color-background-0);background:var(--si-sys-color-text-primary);margin-inline-end:10px;margin-block-start:12px}.show-copied .copied{display:block!important}.readonly-label{color:var(--si-sys-color-text-primary);border:1px solid var(--si-sys-color-text-primary)}.show-copied>*{display:none}.codeflask-editor{flex:1;position:relative;border-block-start:1px solid var(--si-sys-color-border-4)}.codeflask-editor ::ng-deep textarea{box-shadow:none}.progress-container{position:absolute;inset:0;pointer-events:none}.progress-container,.progress-container .progress-inner{display:flex;justify-content:center;align-items:center}.progress-container .progress-inner{inline-size:64px;block-size:40px;background:#fffc;border:1px solid #ddd;border-radius:12px}.progress-dots:before,.progress-dots:after,.progress-dots{inline-size:10px;block-size:10px;border-radius:50%;background-color:#ddd;animation:dot-flashing .6s infinite linear alternate}.progress-dots{position:relative;animation-delay:.3s}.progress-dots:before,.progress-dots:after{content:\"\";display:inline-block;position:absolute;inset-block-start:0}.progress-dots:before{inset-inline-start:-15px;animation-delay:0s}.progress-dots:after{inset-inline-start:15px;animation-delay:.6s}@keyframes dot-flashing{0%{background-color:#333}50%,to{background-color:#ddd}}\n", ":host ::ng-deep .readonly .codeflask{background-color:var(--si-sys-color-background-1)}:host ::ng-deep .codeflask{background-color:var(--si-sys-color-background-1)}:host ::ng-deep .codeflask pre,:host ::ng-deep .codeflask code{color:var(--si-sys-color-code-1);background:none;border:0;border-radius:0;text-align:start;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;tab-size:2;hyphens:none}:host ::ng-deep .codeflask code{padding:0}:host ::ng-deep .codeflask .codeflask__flatten,:host ::ng-deep .codeflask .codeflask__code{font-family:Menlo,Ubuntu Mono,Liberation Mono,Consolas,Courier,monospace;line-height:20px}:host ::ng-deep .codeflask .codeflask__flatten{min-inline-size:calc(100% - 40px);inline-size:auto}:host ::ng-deep .codeflask .codeflask__pre{z-index:0}:host ::ng-deep .codeflask .codeflask__textarea{z-index:1;color:transparent;caret-color:var(--si-sys-color-code-1)}:host ::ng-deep .codeflask.codeflask--has-line-numbers:before{background:var(--element-base-4)}:host ::ng-deep .codeflask__lines{color:var(--element-text-disabled)}:host ::ng-deep .namespace{opacity:.7}:host ::ng-deep .token.comment,:host ::ng-deep .token.prolog,:host ::ng-deep .token.doctype,:host ::ng-deep .token.cdata{color:var(--si-sys-color-code-8);font-style:italic}:host ::ng-deep .token.punctuation{color:var(--si-sys-color-code-9)}:host ::ng-deep .token.keyword,:host ::ng-deep .token.operator,:host ::ng-deep .token.boolean,:host ::ng-deep .token.symbol{color:var(--si-sys-color-code-2)}:host ::ng-deep .token.constant{color:var(--si-sys-color-code-3)}:host ::ng-deep .token.builtin{color:var(--si-sys-color-code-5)}:host ::ng-deep .token.property{color:var(--si-sys-color-code-4)}:host ::ng-deep .token.tag,:host ::ng-deep .token.selector{color:var(--si-sys-color-code-10)}:host ::ng-deep .token.number{color:var(--si-sys-color-code-7)}:host ::ng-deep .token.attr-name{color:var(--si-sys-color-code-3)}:host ::ng-deep .token.attr-value{color:var(--si-sys-color-code-6)}:host ::ng-deep .token.string,:host ::ng-deep .token.char{color:var(--si-sys-color-code-6)}:host ::ng-deep .token.function{color:var(--si-sys-color-code-5)}:host ::ng-deep .token.class-name{color:var(--si-sys-color-code-11)}:host ::ng-deep .token.important,:host ::ng-deep .token.variable{color:var(--si-sys-color-code-4)}:host ::ng-deep .token.regex{color:var(--si-sys-color-code-6)}:host ::ng-deep .token.important,:host ::ng-deep .token.bold{font-weight:600}:host ::ng-deep .token.italic{font-style:italic}:host ::ng-deep .token.entity{cursor:help}:host ::ng-deep .token.inserted{color:var(--si-sys-color-code-12)}:host ::ng-deep .token.deleted{color:var(--si-sys-color-code-11)}\n"] }]
1435
- }], ctorParameters: () => [], propDecorators: { templateElem: [{ type: i0.ViewChild, args: ['codeTemplate', { isSignal: true }] }], typescriptElem: [{ type: i0.ViewChild, args: ['codeTypescript', { isSignal: true }] }], reactVueElem: [{ type: i0.ViewChild, args: ['codeReactVue', { isSignal: true }] }], consoleElem: [{ type: i0.ViewChild, args: ['consoleContainer', { isSignal: true }] }] } });
1457
+ }, template: "@let active = activeTab();\n<div class=\"example\" [class.fullscreen]=\"exampleFullscreen()\" [class.is-mobile]=\"isMobile\">\n <div class=\"preview-iframe\" [class.is-mobile]=\"isMobile\">\n <si-live-preview-iframe\n [isFullscreen]=\"isFullscreen()\"\n (templateFromComponent)=\"templateFromComponent($event)\"\n />\n @if (state.inProgress()) {\n <div class=\"progress-container\">\n <div class=\"progress-inner\">\n <div class=\"progress-dots\"></div>\n </div>\n </div>\n }\n @if (isFullscreen()) {\n <div class=\"buttons\">\n <button\n type=\"button\"\n class=\"btn-command fullscreen\"\n title=\"Close fullscreen\"\n aria-label=\"Close fullscreen\"\n (click)=\"toggleFullscreen(true)\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M273,256l87.52-87.51a12,12,0,0,0-17-17L256,239l-87.51-87.52a12,12,0,0,0-17,17L239,256l-87.52,87.51a12,12,0,0,0,17,17L256,273l87.51,87.52a12,12,0,0,0,17-17Z\"\n />\n </svg>\n </button>\n </div>\n }\n </div>\n</div>\n\n<div class=\"code\" [class.is-mobile]=\"isMobile\" [class.is-collapsed]=\"editorCollapsed()\">\n <div class=\"collapse-wrapper\">\n <div role=\"tablist\" class=\"nav lp-tabs\">\n @if (showEditor() && (active === 'template' || active === 'typescript')) {\n <button\n type=\"button\"\n role=\"tab\"\n class=\"tab-item tab-link focus-inside\"\n id=\"templateEditorTab\"\n [class.tab-active]=\"active === 'template'\"\n (click)=\"activateTab('template')\"\n >\n Template\n </button>\n <button\n type=\"button\"\n role=\"tab\"\n class=\"tab-item tab-link focus-inside\"\n id=\"typescriptEditorTab\"\n [class.tab-active]=\"active === 'typescript'\"\n (click)=\"activateTab('typescript')\"\n >\n Typescript\n </button>\n }\n </div>\n @if (!isMobile) {\n <div class=\"collapse-button\" [class.is-collapsed]=\"editorCollapsed()\">\n <button\n type=\"button\"\n [attr.title]=\"editorCollapsed() ? 'Show editor' : 'Hide editor'\"\n [attr.aria-label]=\"editorCollapsed() ? 'Show editor' : 'Hide editor'\"\n (click)=\"toggleCollapse()\"\n >\n <svg class=\"collapse-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n class=\"cls-1\"\n d=\"M248.93,277.23l-1.72-1.44-110-110a12.43,12.43,0,0,1,15.86-19l1.72,1.44L256,249.41l101.21-101.2a12.45,12.45,0,0,1,15.86-1.44l1.72,1.44a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72-110,110A12.45,12.45,0,0,1,248.93,277.23Z\"\n />\n <path\n class=\"cls-1\"\n d=\"M248.93,365.23l-1.72-1.44-88-88a12.43,12.43,0,0,1,15.86-19l1.72,1.44L256,337.41l79.21-79.2a12.45,12.45,0,0,1,15.86-1.44l1.72,1.44a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72-88,88A12.45,12.45,0,0,1,248.93,365.23Z\"\n />\n </svg>\n </button>\n </div>\n }\n </div>\n\n @if (allowFullscreen && !isFullscreen()) {\n <div class=\"buttons\">\n @if (webcomponents && showEditor() && frameworks.size > 1) {\n <select\n aria-label=\"Select framework\"\n class=\"btn-command locale-selection\"\n [ngModel]=\"state.framework()\"\n (ngModelChange)=\"changeFramework($event)\"\n >\n @for (aFramework of frameworks | keyvalue; track $index) {\n <option [value]=\"aFramework.value\" [selected]=\"state.framework() === aFramework.value\">\n {{ aFramework.key }}\n </option>\n }\n </select>\n }\n @if (rootFontSizes.length) {\n <select\n name=\"selectRfs\"\n aria-label=\"Root font size\"\n title=\"Root font size\"\n class=\"btn-command rfs-selection\"\n [ngModel]=\"state.rootFontSize()\"\n (ngModelChange)=\"rfsSelectionChanges($event)\"\n >\n <option value=\"0\">none</option>\n <option value=\"initial\">initial</option>\n @for (rfs of rootFontSizes; track rfs) {\n <option [value]=\"rfs\">{{ rfs }}px</option>\n }\n </select>\n }\n @if (!!localeApi && showEditor()) {\n <select\n name=\"selectLocale\"\n aria-label=\"Select locale\"\n title=\"Locale\"\n class=\"btn-command locale-selection\"\n (change)=\"localeSelectionChanged($event.target)\"\n >\n @for (aLocale of availableLocales; track $index) {\n <option [value]=\"aLocale\" [selected]=\"state.locale() === aLocale\">\n {{ aLocale }}\n </option>\n }\n </select>\n }\n @if (rtlSwitcher) {\n <button\n type=\"button\"\n class=\"btn-command rtl-selection\"\n [title]=\"state.isRTL() ? 'Right-to-left layout' : 'Left-to-right layout'\"\n [attr.aria-label]=\"\n state.isRTL() ? 'RTL (right-to-left layout)' : 'LTR (left-to-right layout)'\n \"\n (click)=\"toggleRTL()\"\n >\n {{ state.isRTL() ? 'RTL' : 'LTR' }}\n </button>\n }\n @if (\n !isMobile &&\n !showEditor() &&\n (state.renderingError() || (state.logMessages().length && state.newMessages()))\n ) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Show console\"\n aria-label=\"Show console\"\n [class.alert]=\"state.renderingError()\"\n [class.info]=\"state.logMessages().length\"\n (click)=\"toggleCollapse()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M255.84,296a12,12,0,0,1-12-12V124a12,12,0,1,1,24,0V284A12,12,0,0,1,255.84,296Z\"\n />\n <path d=\"M256.12,387.81h-.24a16,16,0,0,1,0-32h.24a16,16,0,0,1,0,32Z\" />\n </svg>\n </button>\n }\n @if (switcherEnabled && !isMobile) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Toggle theme\"\n aria-label=\"Toggle theme\"\n (click)=\"toggleTheme()\"\n >\n @if (state.theme() === 'dark') {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M256,349.82A93.82,93.82,0,1,0,162.18,256,93.93,93.93,0,0,0,256,349.82Zm0-163.64A69.82,69.82,0,1,1,186.18,256,69.9,69.9,0,0,1,256,186.18Z\"\n />\n <path\n d=\"M256,120.73a12,12,0,0,0,12-12V76a12,12,0,0,0-24,0v32.73A12,12,0,0,0,256,120.73Z\"\n />\n <path d=\"M268,436V403.27a12,12,0,0,0-24,0V436a12,12,0,0,0,24,0Z\" />\n <path d=\"M143.44,160.41a12,12,0,1,0,17-17l-23.23-23.23a12,12,0,1,0-17,17Z\" />\n <path\n d=\"M351.59,351.59a12,12,0,0,0,0,17l23.23,23.23a12,12,0,0,0,17-17l-23.23-23.23A12,12,0,0,0,351.59,351.59Z\"\n />\n <path\n d=\"M120.73,256a12,12,0,0,0-12-12H76a12,12,0,0,0,0,24h32.73A12,12,0,0,0,120.73,256Z\"\n />\n <path d=\"M436,244H403.27a12,12,0,0,0,0,24H436a12,12,0,0,0,0-24Z\" />\n <path\n d=\"M137.18,391.79l23.23-23.23a12,12,0,1,0-17-17l-23.23,23.23a12,12,0,1,0,17,17Z\"\n />\n <path\n d=\"M360.07,163.93a12,12,0,0,0,8.49-3.52l23.23-23.23a12,12,0,1,0-17-17l-23.23,23.23a12,12,0,0,0,8.48,20.49Z\"\n />\n </svg>\n } @else {\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M360.07,147.88a12,12,0,0,0,5.89-21.1,168.05,168.05,0,0,0-214.71,0C80,186,70.19,292.1,129.38,363.35a166.9,166.9,0,0,0,113.77,59.93q7.9.74,15.75.73A166.74,166.74,0,0,0,366,385.22a12,12,0,0,0-5.89-21.1,109.33,109.33,0,0,1,0-216.24ZM244.43,275.77A133.48,133.48,0,0,0,330,381.08,144.11,144.11,0,0,1,147.84,348C97.1,287,105.51,196,166.58,145.24A144.08,144.08,0,0,1,330,130.94C272,152.38,234.91,212.29,244.43,275.77Z\"\n />\n </svg>\n }\n </button>\n }\n @if (!isMobile && showEditor()) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Example fullscreen\"\n aria-label=\"Example fullscreen\"\n (click)=\"toggleFullscreen(true)\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M406,112H106a42,42,0,0,0-42,42V358a42,42,0,0,0,42,42H406a42,42,0,0,0,42-42V154A42,42,0,0,0,406,112Zm18,246a18,18,0,0,1-18,18H106a18,18,0,0,1-18-18V154a18,18,0,0,1,18-18H406a18,18,0,0,1,18,18Z\"\n />\n </svg>\n </button>\n }\n @if (showEditor()) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Editor + Example fullscreen\"\n aria-label=\"Editor + Example fullscreen\"\n (click)=\"toggleFullscreen()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M406,112H106a42,42,0,0,0-42,42V358a42,42,0,0,0,42,42H406a42,42,0,0,0,42-42V154A42,42,0,0,0,406,112Zm18,42V313.44H199.35V136H406A18,18,0,0,1,424,154ZM88,358V154a18,18,0,0,1,18-18h69.35V376H106A18,18,0,0,1,88,358Zm318,18H199.35V337.44H424V358A18,18,0,0,1,406,376Z\"\n />\n </svg>\n </button>\n }\n <button\n siStackblitz\n class=\"btn-command\"\n type=\"button\"\n [baseUrl]=\"baseUrl\"\n [framework]=\"state.framework()\"\n [example]=\"state.example()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M182.32 480.02c-3.65 0-7.34-1.01-10.68-3.09-8.61-5.36-11.86-15.98-7.72-25.24s65.44-146.6 65.44-146.6c.58-1.29.19-2.34-.23-3-.42-.65-1.23-1.43-2.64-1.43h-54.96c-13.79 0-25.98-7.76-31.83-20.24s-4-26.82 4.83-37.41L314.3 39.26c6.5-7.79 17.46-9.55 26.06-4.19 8.61 5.36 11.85 15.98 7.72 25.24l-65.44 146.6c-.58 1.29-.19 2.34.23 3 .42.65 1.23 1.43 2.64 1.43h54.96c13.79 0 25.98 7.76 31.83 20.24s4 26.82-4.83 37.41L197.69 472.73c-3.97 4.77-9.62 7.28-15.38 7.28Zm101.45-354.13L169.1 263.49c-.85 1.02-1 2.15-.43 3.35.56 1.2 1.52 1.81 2.85 1.81h54.96c11.96 0 22.98 5.99 29.49 16.02s7.48 22.54 2.61 33.46l-30.35 67.98 114.67-137.6c.85-1.02 1-2.15.43-3.35s-1.52-1.81-2.85-1.81h-54.96c-11.96 0-22.98-5.99-29.49-16.02s-7.48-22.54-2.61-33.46l30.35-67.99Z\"\n />\n </svg>\n </button>\n </div>\n }\n <div class=\"tab-content\" [class.is-mobile]=\"isMobile\">\n <fieldset\n class=\"tab-pane\"\n [class.tab-active]=\"active === 'template'\"\n [class.is-mobile]=\"isMobile\"\n [disabled]=\"editorCollapsed()\"\n >\n <div class=\"buttons\" [class.show-copied]=\"showCopied()\">\n @if (!isMobile) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Open in new tab\"\n aria-label=\"Open in new tab\"\n (click)=\"openTab()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M344.94 150.78l46.12 38L345 226.94v-25.38l-24.19.19c-19.93.16-43.45 1.35-66.84 9a132.91 132.91 0 00-20.6 8.6c1.13-1.56 2.32-3.11 3.57-4.63 13.37-16.27 39-36.14 85.18-38.4l22.83-1.11v-24.43M329.09 109a8.33 8.33 0 00-3.48.77 8.14 8.14 0 00-4.67 7.38v35.15c-54.9 2.69-86 27-102.55 47.14-21.1 25.69-28.56 55.84-28.51 75.48a8.1 8.1 0 006 7.83 7.68 7.68 0 002.1.28 8.13 8.13 0 007.1-4.13c12.67-22.33 31.08-37.18 56.29-45.38 19.82-6.45 40.3-7.62 59.61-7.78v34.91a8 8 0 004.66 7.37 7.84 7.84 0 003.46.79 8.26 8.26 0 005.16-1.85l86.92-72a8.06 8.06 0 002.93-6.26 8.17 8.17 0 00-3-6.25l-86.9-71.66a8.11 8.11 0 00-5.15-1.84z\"\n />\n <path\n d=\"M397.23 399.39H114.94a26.89 26.89 0 01-26.86-26.86V204.26a26.89 26.89 0 0126.86-26.86h70.49a12 12 0 010 24h-70.49a2.9 2.9 0 00-2.86 2.86v168.27a2.9 2.9 0 002.86 2.86h282.29a2.9 2.9 0 002.85-2.86V253.67a12 12 0 0124 0v118.86a26.88 26.88 0 01-26.85 26.86z\"\n />\n </svg>\n </button>\n }\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy template as URL\"\n aria-label=\"Copy template as URL\"\n (click)=\"createLink()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M333.56,88.16a90,90,0,0,0-62.83,25.39l-.13.12-27,26.82a12,12,0,0,0,16.92,17l26.92-26.76a66.44,66.44,0,0,1,94,93.94l-47,47a67.6,67.6,0,0,1-7.19,6.23,66.44,66.44,0,0,1-93-13.41A12,12,0,0,0,215,278.88a89.88,89.88,0,0,0,59.52,35.34,91.93,91.93,0,0,0,13.1.94,89.77,89.77,0,0,0,54-18,90.87,90.87,0,0,0,9.79-8.48l47.07-47.07.14-.15A90.44,90.44,0,0,0,333.56,88.16Z\"\n />\n <path\n d=\"M251.28,354.51l-26.75,26.75a66.44,66.44,0,0,1-93.95-93.95l47-47a68.76,68.76,0,0,1,7.19-6.23,66.53,66.53,0,0,1,93,13.41A12,12,0,0,0,297,233.12a90.5,90.5,0,0,0-136.39-9.77l-47.06,47.07-.15.15A90.44,90.44,0,0,0,241.28,398.45a.93.93,0,0,0,.14-.14l26.83-26.83a12,12,0,0,0-17-17Z\"\n />\n </svg>\n </button>\n }\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy template\"\n aria-label=\"Copy template\"\n (click)=\"copyTemplate()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M380.8,197.2H240.4a43.25,43.25,0,0,0-43.2,43.2V380.8A43.25,43.25,0,0,0,240.4,424H380.8A43.25,43.25,0,0,0,424,380.8V240.4A43.25,43.25,0,0,0,380.8,197.2ZM400,380.8A19.22,19.22,0,0,1,380.8,400H240.4a19.22,19.22,0,0,1-19.2-19.2V240.4a19.22,19.22,0,0,1,19.2-19.2H380.8A19.22,19.22,0,0,1,400,240.4Z\"\n />\n <path\n d=\"M146.8,290.8H131.2A19.22,19.22,0,0,1,112,271.6V131.2A19.22,19.22,0,0,1,131.2,112H271.6a19.22,19.22,0,0,1,19.2,19.2v15.6a12,12,0,0,0,24,0V131.2A43.25,43.25,0,0,0,271.6,88H131.2A43.25,43.25,0,0,0,88,131.2V271.6a43.25,43.25,0,0,0,43.2,43.2h15.6a12,12,0,0,0,0-24Z\"\n />\n </svg>\n </button>\n }\n <div class=\"copied\" role=\"tooltip\">copied</div>\n </div>\n <div #codeTemplate class=\"codeflask-editor\"></div>\n </fieldset>\n <fieldset\n class=\"tab-pane\"\n [class.tab-active]=\"active === 'typescript'\"\n [class.is-mobile]=\"isMobile\"\n [disabled]=\"editorCollapsed()\"\n >\n <div class=\"buttons\" [class.show-copied]=\"showCopied()\">\n <span class=\"readonly-label\">read-only</span>\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy code\"\n aria-label=\"Copy code\"\n (click)=\"copyCode()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M380.8,197.2H240.4a43.25,43.25,0,0,0-43.2,43.2V380.8A43.25,43.25,0,0,0,240.4,424H380.8A43.25,43.25,0,0,0,424,380.8V240.4A43.25,43.25,0,0,0,380.8,197.2ZM400,380.8A19.22,19.22,0,0,1,380.8,400H240.4a19.22,19.22,0,0,1-19.2-19.2V240.4a19.22,19.22,0,0,1,19.2-19.2H380.8A19.22,19.22,0,0,1,400,240.4Z\"\n />\n <path\n d=\"M146.8,290.8H131.2A19.22,19.22,0,0,1,112,271.6V131.2A19.22,19.22,0,0,1,131.2,112H271.6a19.22,19.22,0,0,1,19.2,19.2v15.6a12,12,0,0,0,24,0V131.2A43.25,43.25,0,0,0,271.6,88H131.2A43.25,43.25,0,0,0,88,131.2V271.6a43.25,43.25,0,0,0,43.2,43.2h15.6a12,12,0,0,0,0-24Z\"\n />\n </svg>\n </button>\n }\n <div class=\"copied\" role=\"tooltip\">copied</div>\n </div>\n <fieldset #codeTypescript class=\"codeflask-editor readonly\"></fieldset>\n </fieldset>\n <fieldset\n class=\"tab-pane\"\n [class.tab-active]=\"active === 'react' || active === 'vue' || active === 'js'\"\n [class.is-mobile]=\"isMobile\"\n [disabled]=\"editorCollapsed()\"\n >\n <div class=\"buttons\" [class.show-copied]=\"showCopied()\">\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy template as URL\"\n aria-label=\"Copy template as URL\"\n (click)=\"createLink()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M333.56,88.16a90,90,0,0,0-62.83,25.39l-.13.12-27,26.82a12,12,0,0,0,16.92,17l26.92-26.76a66.44,66.44,0,0,1,94,93.94l-47,47a67.6,67.6,0,0,1-7.19,6.23,66.44,66.44,0,0,1-93-13.41A12,12,0,0,0,215,278.88a89.88,89.88,0,0,0,59.52,35.34,91.93,91.93,0,0,0,13.1.94,89.77,89.77,0,0,0,54-18,90.87,90.87,0,0,0,9.79-8.48l47.07-47.07.14-.15A90.44,90.44,0,0,0,333.56,88.16Z\"\n />\n <path\n d=\"M251.28,354.51l-26.75,26.75a66.44,66.44,0,0,1-93.95-93.95l47-47a68.76,68.76,0,0,1,7.19-6.23,66.53,66.53,0,0,1,93,13.41A12,12,0,0,0,297,233.12a90.5,90.5,0,0,0-136.39-9.77l-47.06,47.07-.15.15A90.44,90.44,0,0,0,241.28,398.45a.93.93,0,0,0,.14-.14l26.83-26.83a12,12,0,0,0-17-17Z\"\n />\n </svg>\n </button>\n }\n @if (allowCopy) {\n <button\n type=\"button\"\n class=\"btn-command\"\n title=\"Copy code\"\n aria-label=\"Copy code\"\n (click)=\"copyCode()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M380.8,197.2H240.4a43.25,43.25,0,0,0-43.2,43.2V380.8A43.25,43.25,0,0,0,240.4,424H380.8A43.25,43.25,0,0,0,424,380.8V240.4A43.25,43.25,0,0,0,380.8,197.2ZM400,380.8A19.22,19.22,0,0,1,380.8,400H240.4a19.22,19.22,0,0,1-19.2-19.2V240.4a19.22,19.22,0,0,1,19.2-19.2H380.8A19.22,19.22,0,0,1,400,240.4Z\"\n />\n <path\n d=\"M146.8,290.8H131.2A19.22,19.22,0,0,1,112,271.6V131.2A19.22,19.22,0,0,1,131.2,112H271.6a19.22,19.22,0,0,1,19.2,19.2v15.6a12,12,0,0,0,24,0V131.2A43.25,43.25,0,0,0,271.6,88H131.2A43.25,43.25,0,0,0,88,131.2V271.6a43.25,43.25,0,0,0,43.2,43.2h15.6a12,12,0,0,0,0-24Z\"\n />\n </svg>\n </button>\n }\n <div class=\"copied\" role=\"tooltip\">copied</div>\n </div>\n <label for=\"reactVueEditor\">React and Vue code editor</label>\n <fieldset #codeReactVue class=\"codeflask-editor\"></fieldset>\n </fieldset>\n <div class=\"console\" [hidden]=\"!state.renderingError() && !state.logMessages().length\">\n <div class=\"buttons\">\n @if (state.logMessages().length) {\n <button\n type=\"button\"\n class=\"btn-command btn-clear\"\n title=\"Clear log\"\n aria-label=\"Clear log\"\n [class.on-danger]=\"state.renderingError()\"\n (click)=\"logClear()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M400,144H328V132a44.05,44.05,0,0,0-44-44H228a44.05,44.05,0,0,0-44,44v12H112a12,12,0,0,0,0,24h20V380a44.05,44.05,0,0,0,44,44H336a44.05,44.05,0,0,0,44-44V168h20a12,12,0,0,0,0-24ZM208,132a20,20,0,0,1,20-20h56a20,20,0,0,1,20,20v12H208ZM356,380a20,20,0,0,1-20,20H176a20,20,0,0,1-20-20V168H356Z\"\n />\n <path d=\"M224,344a12,12,0,0,0,12-12V236a12,12,0,0,0-24,0v96A12,12,0,0,0,224,344Z\" />\n <path d=\"M288,344a12,12,0,0,0,12-12V236a12,12,0,0,0-24,0v96A12,12,0,0,0,288,344Z\" />\n </svg>\n </button>\n }\n </div>\n <div #consoleContainer class=\"scroller\">\n @if (state.renderingError()) {\n <pre class=\"alert-danger\"><code class=\"bg-none\">{{ renderingErrorMessage() }}</code></pre>\n }\n @if (!state.renderingError() && state.logMessages().length) {\n <ul>\n @for (msg of state.logMessages(); track $index) {\n <li>{{ msg }}</li>\n }\n </ul>\n }\n </div>\n </div>\n </div>\n</div>\n", styles: [".lp-tabs{display:flex;flex-wrap:wrap;padding-inline-start:0;margin:0;list-style:none;background:none;inline-size:inherit;font-weight:700}.lp-tabs .tab-item:focus-visible{outline-offset:calc(-1 * var(--si-sys-sizing-focus-ring-width, 2px))}.lp-tabs .tab-item.tab-active.tab-link{color:var(--si-sys-color-text-accent);border-block-end-color:var(--si-sys-color-text-accent)!important}.lp-tabs .tab-item.tab-active.tab-link:hover{color:var(--si-sys-color-text-accent-hover)}.lp-tabs .tab-item.tab-link{font:inherit;background:none;min-inline-size:150px;display:block;padding-block:8px;padding-inline:15px;cursor:pointer;text-align:start;line-height:20px;color:var(--si-sys-color-text-primary);border:0;border-block-end:4px solid transparent}.lp-tabs .tab-item.tab-link:hover{text-decoration:none;color:var(--si-sys-color-text-accent-hover);border-block-end-color:var(--si-sys-color-border-4)}*:focus-visible{outline:var(--si-sys-sizing-focus-ring-width, 2px) solid var(--si-sys-color-effects-focus);outline-offset:var(--si-sys-sizing-focus-ring-offset, 1px)}:host{flex:1 1 auto;display:flex;flex-direction:column;overflow:hidden}:host.is-mobile{flex-direction:row}:host.editor-fullscreen{inline-size:100%}:host.editor-fullscreen ::ng-deep .ticket-links{position:absolute;inset-inline-end:48px;inset-block-start:13px}[hidden]{display:none!important}.example{flex:1 1 auto;background:var(--si-sys-color-background-0);margin:0;position:relative;display:flex;flex-direction:column}.example.is-mobile{order:2;flex:unset}.example.fullscreen{padding:0;block-size:100%;inline-size:100%}.example.fullscreen:after{content:unset}.example .btn-command{padding-block:4px;padding-inline:10px}.example .buttons{inset-inline-end:0}.preview-iframe{display:flex;flex:1}.preview-iframe.is-mobile{flex:1 0 0;min-block-size:0;overflow-y:auto;overflow-x:hidden;padding-block:0;padding-inline:30px;flex-direction:column}.collapse-wrapper{display:flex;min-block-size:40px}.lp-tabs{justify-content:flex-start;inline-size:100%;border-block-end:0}.collapse-button{display:flex;justify-content:flex-start;align-items:center;inline-size:100%}.collapse-button button{background-color:transparent;border:0;padding:6px;margin-inline-start:-16px;block-size:34px}.collapse-button button>svg{block-size:20px;fill:var(--si-sys-color-text-primary)}.collapse-button button:hover,.collapse-button button:focus,.collapse-button button:active{color:var(--si-sys-color-text-accent-hover)}.collapse-button button:hover>svg,.collapse-button button:focus>svg,.collapse-button button:active>svg{fill:currentColor}.code{position:relative;background-color:var(--si-sys-color-background-0);max-block-size:414px;transition:max-block-size .5s}.code:not(.is-mobile){border-block-start:1px solid var(--si-sys-color-border-4)}.code.is-collapsed{max-block-size:41px;overflow:hidden;background-color:var(--si-sys-color-background-0)}.code.is-collapsed .collapse-icon{transform:rotate(180deg)}.code .console{block-size:68px;position:relative;border-block-start:1px solid var(--si-sys-color-border-4);color:var(--si-sys-color-text-primary)}.code .console .scroller{block-size:100%;overflow:auto;position:absolute;inset:0}.code .console pre{block-size:100%;border:0;margin:0;overflow:auto}.code .console pre.alert-danger{color:var(--si-sys-color-text-on-danger);background-color:var(--si-sys-color-background-danger)}.code .console code.bg-none{background:none}.code .console ul{list-style:none;margin:0;padding:5px;font-family:Menlo,Ubuntu Mono,Liberation Mono,Consolas,Courier,monospace}.code .console .btn-clear.on-danger,.code .console .btn-clear.on-danger:hover,.code .console .btn-clear.on-danger:focus,.code .console .btn-clear.on-danger:active{color:var(--si-sys-color-text-on-danger)}.code.is-mobile{order:1;flex:1;display:flex;flex-direction:column;max-block-size:unset;transition:unset}.code.is-mobile .console{border-inline-end:1px solid var(--si-sys-color-border-4)}pre{border-radius:0}.tab-content{display:flex;flex-direction:column}.tab-content.is-mobile{border-inline-end:1px solid var(--si-sys-color-border-4);flex:1}.tab-content:not(.is-mobile){block-size:305px}.tab-pane{flex:1;display:none;position:relative}.tab-pane.tab-active{display:flex;flex-direction:column}fieldset{padding:0;margin:0;border:0}.buttons{position:absolute;z-index:2;inset-inline-end:16px;display:flex;align-items:center;inset-block-start:0;block-size:40px}.is-mobile .buttons{inset-inline-end:0}.btn-command{background-color:transparent;border:0;color:var(--si-sys-color-text-primary);padding:8px;font-size:20px;line-height:1;block-size:34px}.btn-command>svg{block-size:20px;fill:currentColor;vertical-align:unset!important}.btn-command:hover,.btn-command:focus,.btn-command:active{color:var(--si-sys-color-text-accent-hover)}.btn-command.fullscreen{font-size:30px;padding:4px}.btn-command.alert svg,.btn-command.info svg{border-radius:50%;fill:currentColor}.btn-command.alert svg{background-color:var(--si-sys-color-background-danger);color:var(--si-sys-color-text-on-danger)}.btn-command.info svg{background-color:var(--si-sys-color-background-accent-secondary);color:var(--si-sys-color-text-accent)}.rtl-selection,.rfs-selection,.locale-selection{font-size:14px}.copied,.readonly-label{font-size:12px;padding-block:2px;padding-inline:5px;border-radius:3px}.copied{display:none;color:var(--si-sys-color-background-0);background:var(--si-sys-color-text-primary);margin-inline-end:10px;margin-block-start:12px}.show-copied .copied{display:block!important}.readonly-label{color:var(--si-sys-color-text-primary);border:1px solid var(--si-sys-color-text-primary)}.show-copied>*{display:none}.codeflask-editor{flex:1;position:relative;border-block-start:1px solid var(--si-sys-color-border-4)}.codeflask-editor ::ng-deep textarea{box-shadow:none}:host(.embedded:not(.editor-fullscreen):not(.is-mobile)) .example{flex:0 0 var(--preview-height, 204px);min-block-size:0;overflow:hidden}.progress-container{position:absolute;inset:0;pointer-events:none}.progress-container,.progress-container .progress-inner{display:flex;justify-content:center;align-items:center}.progress-container .progress-inner{inline-size:64px;block-size:40px;background:#fffc;border:1px solid #ddd;border-radius:12px}.progress-dots:before,.progress-dots:after,.progress-dots{inline-size:10px;block-size:10px;border-radius:50%;background-color:#ddd;animation:dot-flashing .6s infinite linear alternate}.progress-dots{position:relative;animation-delay:.3s}.progress-dots:before,.progress-dots:after{content:\"\";display:inline-block;position:absolute;inset-block-start:0}.progress-dots:before{inset-inline-start:-15px;animation-delay:0s}.progress-dots:after{inset-inline-start:15px;animation-delay:.6s}@keyframes dot-flashing{0%{background-color:#333}50%,to{background-color:#ddd}}\n", ":host ::ng-deep .readonly .codeflask{background-color:var(--si-sys-color-background-1)}:host ::ng-deep .codeflask{background-color:var(--si-sys-color-background-1)}:host ::ng-deep .codeflask pre,:host ::ng-deep .codeflask code{color:var(--si-sys-color-code-1);background:none;border:0;border-radius:0;text-align:start;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;tab-size:2;hyphens:none}:host ::ng-deep .codeflask code{padding:0}:host ::ng-deep .codeflask .codeflask__flatten,:host ::ng-deep .codeflask .codeflask__code{font-family:Menlo,Ubuntu Mono,Liberation Mono,Consolas,Courier,monospace;line-height:20px}:host ::ng-deep .codeflask .codeflask__flatten{min-inline-size:calc(100% - 40px);inline-size:auto}:host ::ng-deep .codeflask .codeflask__pre{z-index:0}:host ::ng-deep .codeflask .codeflask__textarea{z-index:1;color:transparent;caret-color:var(--si-sys-color-code-1)}:host ::ng-deep .codeflask.codeflask--has-line-numbers:before{background:var(--si-sys-color-background-0)}:host ::ng-deep .codeflask__lines{color:var(--si-sys-color-text-disabled)}:host ::ng-deep .namespace{opacity:.7}:host ::ng-deep .token.comment,:host ::ng-deep .token.prolog,:host ::ng-deep .token.doctype,:host ::ng-deep .token.cdata{color:var(--si-sys-color-code-8);font-style:italic}:host ::ng-deep .token.punctuation{color:var(--si-sys-color-code-9)}:host ::ng-deep .token.keyword,:host ::ng-deep .token.operator,:host ::ng-deep .token.boolean,:host ::ng-deep .token.symbol{color:var(--si-sys-color-code-2)}:host ::ng-deep .token.constant{color:var(--si-sys-color-code-3)}:host ::ng-deep .token.builtin{color:var(--si-sys-color-code-5)}:host ::ng-deep .token.property{color:var(--si-sys-color-code-4)}:host ::ng-deep .token.tag,:host ::ng-deep .token.selector{color:var(--si-sys-color-code-10)}:host ::ng-deep .token.number{color:var(--si-sys-color-code-7)}:host ::ng-deep .token.attr-name{color:var(--si-sys-color-code-3)}:host ::ng-deep .token.attr-value{color:var(--si-sys-color-code-6)}:host ::ng-deep .token.string,:host ::ng-deep .token.char{color:var(--si-sys-color-code-6)}:host ::ng-deep .token.function{color:var(--si-sys-color-code-5)}:host ::ng-deep .token.class-name{color:var(--si-sys-color-code-11)}:host ::ng-deep .token.important,:host ::ng-deep .token.variable{color:var(--si-sys-color-code-4)}:host ::ng-deep .token.regex{color:var(--si-sys-color-code-6)}:host ::ng-deep .token.important,:host ::ng-deep .token.bold{font-weight:600}:host ::ng-deep .token.italic{font-style:italic}:host ::ng-deep .token.entity{cursor:help}:host ::ng-deep .token.inserted{color:var(--si-sys-color-code-12)}:host ::ng-deep .token.deleted{color:var(--si-sys-color-code-11)}\n"] }]
1458
+ }], ctorParameters: () => [], propDecorators: { initialTheme: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialTheme", required: false }] }], templateElem: [{ type: i0.ViewChild, args: ['codeTemplate', { isSignal: true }] }], typescriptElem: [{ type: i0.ViewChild, args: ['codeTypescript', { isSignal: true }] }], reactVueElem: [{ type: i0.ViewChild, args: ['codeReactVue', { isSignal: true }] }], consoleElem: [{ type: i0.ViewChild, args: ['consoleContainer', { isSignal: true }] }] } });
1459
+
1460
+ var siLivePreview_component = /*#__PURE__*/Object.freeze({
1461
+ __proto__: null,
1462
+ SiLivePreviewComponent: SiLivePreviewComponent
1463
+ });
1436
1464
 
1437
1465
  /**
1438
1466
  * Copyright (c) Siemens 2016 - 2026
@@ -1522,11 +1550,11 @@ class SiExampleOverviewComponent {
1522
1550
  this.searchControl.reset();
1523
1551
  }
1524
1552
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiExampleOverviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1525
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiExampleOverviewComponent, isStandalone: true, selector: "si-example-overview", ngImport: i0, template: "<nav class=\"component-list\" aria-label=\"Live preview\" [class.is-collapsed]=\"isCollapsed\">\n <div class=\"component-list-header\">\n @if (showContent) {\n <span>Examples</span>\n }\n <button\n type=\"button\"\n class=\"collapse-button\"\n [attr.title]=\"isCollapsed ? 'Expand' : 'Collapse'\"\n [attr.aria-label]=\"isCollapsed ? 'Expand' : 'Collapse'\"\n (click)=\"toggleCollapse()\"\n >\n <svg class=\"collapse-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M234.77,248.93l1.44-1.72,110-110a12.43,12.43,0,0,1,19,15.86l-1.44,1.72L262.59,256l101.2,101.21a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72a12.45,12.45,0,0,1-15.86,1.44l-1.72-1.44-110-110A12.45,12.45,0,0,1,234.77,248.93Z\"\n />\n <path\n d=\"M146.77,248.93l1.44-1.72,88-88a12.43,12.43,0,0,1,19,15.86l-1.44,1.72L174.59,256l79.2,79.21a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72a12.45,12.45,0,0,1-15.86,1.44l-1.72-1.44-88-88A12.45,12.45,0,0,1,146.77,248.93Z\"\n />\n </svg>\n </button>\n </div>\n @if (showContent) {\n <div class=\"search-bar\" role=\"search\" aria-label=\"Live preview\">\n <svg class=\"search-bar-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M420.49,403.51l-76.88-76.87A139.39,139.39,0,0,0,377,236c0-77.2-62.8-140-140-140S97,158.8,97,236s62.8,140,140,140a139.33,139.33,0,0,0,89.55-32.48l77,77a12,12,0,0,0,17-17ZM121,236A116,116,0,1,1,237,352,116.13,116.13,0,0,1,121,236Z\"\n />\n </svg>\n <input\n type=\"text\"\n placeholder=\"Filter examples\"\n autocorrect=\"off\"\n autocapitalize=\"none\"\n [formControl]=\"searchControl\"\n />\n @if (searchControl.value) {\n <button\n type=\"button\"\n class=\"cancel-button\"\n aria-label=\"clear search\"\n (click)=\"resetSearchBar()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M273,256l87.52-87.51a12,12,0,0,0-17-17L256,239l-87.51-87.52a12,12,0,0,0-17,17L239,256l-87.52,87.51a12,12,0,0,0,17,17L256,273l87.51,87.52a12,12,0,0,0,17-17Z\"\n />\n </svg>\n </button>\n }\n </div>\n }\n @if (showContent) {\n <div class=\"available-examples\">\n <ul>\n @for (item of tree; track $index) {\n <li [style.--level]=\"item.level\">\n @if (item.link) {\n <a\n routerLinkActive=\"example-active\"\n queryParamsHandling=\"merge\"\n [routerLink]=\"'/overview/' + item.link\"\n >\n {{ item.label }}\n </a>\n } @else {\n {{ item.label }}\n }\n </li>\n }\n </ul>\n </div>\n }\n @if (!showContent && isCollapsed) {\n <div class=\"component-list-text\">\n <span>Examples</span>\n </div>\n }\n</nav>\n<main aria-label=\"Live preview\">\n <si-live-preview />\n</main>\n", styles: ["a{color:var(--si-sys-color-text-accent)}a:after{display:none}a:hover{color:var(--si-sys-color-text-accent-hover)}*:focus-visible{outline:var(--element-button-focus-width) solid var(--si-sys-color-effects-focus);outline-offset:var(--element-button-focus-overlay-width)}:host{display:flex;flex-direction:row;background-color:var(--si-sys-color-background-0)}.component-list{border-inline-end:1px solid var(--si-sys-color-border-4);display:flex;flex:0 0 auto;inline-size:400px;flex-direction:column;transition:inline-size .5s;color:var(--si-sys-color-text-primary)}.component-list.is-collapsed{inline-size:40px;overflow:hidden;background-color:var(--si-sys-color-background-0)}.component-list.is-collapsed .component-list-text{transform:rotate(-90deg);margin-block:auto 2em;word-wrap:normal}.component-list.is-collapsed .collapse-icon{transform:rotate(180deg)}.component-list .component-list-header{display:flex;flex-direction:column;justify-content:center;padding-block:10px;padding-inline:8px;background-color:var(--si-sys-color-background-0);position:relative;block-size:36px}.component-list .component-list-header .collapse-button{background-color:transparent;border:0;padding:4px;position:absolute;inset-inline-end:2px;inset-block-start:4px;inline-size:32px;block-size:32px;cursor:pointer;color:var(--si-sys-color-text-primary)}.component-list .component-list-header .collapse-button>svg{block-size:20px;fill:currentColor}.component-list .component-list-header .collapse-button:hover{color:var(--si-sys-color-text-accent-hover)}.component-list .search-bar{display:flex;margin-block:10px;margin-inline:8px;position:relative;block-size:38px}.component-list .search-bar input{flex:1;padding-block:8px;padding-inline:28px 12px;border:1px solid var(--si-sys-color-border-4);font-size:14px;background:var(--si-sys-color-background-0);color:var(--si-sys-color-text-primary)}.component-list .search-bar .search-bar-icon{position:absolute;inset-block-start:8px;inset-inline-start:6px;fill:var(--si-sys-color-text-primary);block-size:20px}.component-list .search-bar .cancel-button{background-color:transparent;border:0;font-size:20px;line-height:20px;padding:0;pointer-events:auto;position:absolute;inset-inline-end:8px;inset-block-start:8px}.component-list .search-bar .cancel-button>svg{block-size:20px;fill:var(--si-sys-color-text-primary)}.component-list .available-examples{flex:1 1 0;min-block-size:0;overflow-y:auto;padding-block-start:10px;border-block-start:1px solid var(--si-sys-color-border-4)}.component-list .available-examples ul{margin-block:0 16px;margin-inline:0;padding-inline-start:16px;list-style:none}.component-list .available-examples li{margin-inline-start:calc(var(--level) * 16px);padding-block:4px}.example-active{font-weight:600}a{text-decoration:none}main{flex:1 1 auto;display:flex;overflow:hidden}@media(prefers-color-scheme:dark){si-example-overview{color-scheme:dark}}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: SiLivePreviewComponent, selector: "si-live-preview" }], changeDetection: i0.ChangeDetectionStrategy.Eager });
1553
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiExampleOverviewComponent, isStandalone: true, selector: "si-example-overview", ngImport: i0, template: "<nav class=\"component-list\" aria-label=\"Live preview\" [class.is-collapsed]=\"isCollapsed\">\n <div class=\"component-list-header\">\n @if (showContent) {\n <span>Examples</span>\n }\n <button\n type=\"button\"\n class=\"collapse-button\"\n [attr.title]=\"isCollapsed ? 'Expand' : 'Collapse'\"\n [attr.aria-label]=\"isCollapsed ? 'Expand' : 'Collapse'\"\n (click)=\"toggleCollapse()\"\n >\n <svg class=\"collapse-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M234.77,248.93l1.44-1.72,110-110a12.43,12.43,0,0,1,19,15.86l-1.44,1.72L262.59,256l101.2,101.21a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72a12.45,12.45,0,0,1-15.86,1.44l-1.72-1.44-110-110A12.45,12.45,0,0,1,234.77,248.93Z\"\n />\n <path\n d=\"M146.77,248.93l1.44-1.72,88-88a12.43,12.43,0,0,1,19,15.86l-1.44,1.72L174.59,256l79.2,79.21a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72a12.45,12.45,0,0,1-15.86,1.44l-1.72-1.44-88-88A12.45,12.45,0,0,1,146.77,248.93Z\"\n />\n </svg>\n </button>\n </div>\n @if (showContent) {\n <div class=\"search-bar\" role=\"search\" aria-label=\"Live preview\">\n <svg class=\"search-bar-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M420.49,403.51l-76.88-76.87A139.39,139.39,0,0,0,377,236c0-77.2-62.8-140-140-140S97,158.8,97,236s62.8,140,140,140a139.33,139.33,0,0,0,89.55-32.48l77,77a12,12,0,0,0,17-17ZM121,236A116,116,0,1,1,237,352,116.13,116.13,0,0,1,121,236Z\"\n />\n </svg>\n <input\n type=\"text\"\n placeholder=\"Filter examples\"\n autocorrect=\"off\"\n autocapitalize=\"none\"\n [formControl]=\"searchControl\"\n />\n @if (searchControl.value) {\n <button\n type=\"button\"\n class=\"cancel-button\"\n aria-label=\"clear search\"\n (click)=\"resetSearchBar()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M273,256l87.52-87.51a12,12,0,0,0-17-17L256,239l-87.51-87.52a12,12,0,0,0-17,17L239,256l-87.52,87.51a12,12,0,0,0,17,17L256,273l87.51,87.52a12,12,0,0,0,17-17Z\"\n />\n </svg>\n </button>\n }\n </div>\n }\n @if (showContent) {\n <div class=\"available-examples\">\n <ul>\n @for (item of tree; track $index) {\n <li [style.--level]=\"item.level\">\n @if (item.link) {\n <a\n routerLinkActive=\"example-active\"\n queryParamsHandling=\"merge\"\n [routerLink]=\"'/overview/' + item.link\"\n >\n {{ item.label }}\n </a>\n } @else {\n {{ item.label }}\n }\n </li>\n }\n </ul>\n </div>\n }\n @if (!showContent && isCollapsed) {\n <div class=\"component-list-text\">\n <span>Examples</span>\n </div>\n }\n</nav>\n<main aria-label=\"Live preview\">\n <si-live-preview />\n</main>\n", styles: ["a{color:var(--si-sys-color-text-accent)}a:after{display:none}a:hover{color:var(--si-sys-color-text-accent-hover)}*:focus-visible{outline:var(--si-sys-sizing-focus-ring-width, 2px) solid var(--si-sys-color-effects-focus);outline-offset:var(--si-sys-sizing-focus-ring-offset, 1px)}:host{display:flex;flex-direction:row;background-color:var(--si-sys-color-background-0)}.component-list{border-inline-end:1px solid var(--si-sys-color-border-4);display:flex;flex:0 0 auto;inline-size:400px;flex-direction:column;transition:inline-size .5s;color:var(--si-sys-color-text-primary)}.component-list.is-collapsed{inline-size:40px;overflow:hidden;background-color:var(--si-sys-color-background-0)}.component-list.is-collapsed .component-list-text{transform:rotate(-90deg);margin-block:auto 2em;word-wrap:normal}.component-list.is-collapsed .collapse-icon{transform:rotate(180deg)}.component-list .component-list-header{display:flex;flex-direction:column;justify-content:center;padding-block:10px;padding-inline:8px;background-color:var(--si-sys-color-background-0);position:relative;block-size:36px}.component-list .component-list-header .collapse-button{background-color:transparent;border:0;padding:4px;position:absolute;inset-inline-end:2px;inset-block-start:4px;inline-size:32px;block-size:32px;cursor:pointer;color:var(--si-sys-color-text-primary)}.component-list .component-list-header .collapse-button>svg{block-size:20px;fill:currentColor}.component-list .component-list-header .collapse-button:hover{color:var(--si-sys-color-text-accent-hover)}.component-list .search-bar{display:flex;margin-block:10px;margin-inline:8px;position:relative;block-size:38px}.component-list .search-bar input{flex:1;padding-block:8px;padding-inline:28px 12px;border:1px solid var(--si-sys-color-border-4);font-size:14px;background:var(--si-sys-color-background-0);color:var(--si-sys-color-text-primary)}.component-list .search-bar .search-bar-icon{position:absolute;inset-block-start:8px;inset-inline-start:6px;fill:var(--si-sys-color-text-primary);block-size:20px}.component-list .search-bar .cancel-button{background-color:transparent;border:0;font-size:20px;line-height:20px;padding:0;pointer-events:auto;position:absolute;inset-inline-end:8px;inset-block-start:8px}.component-list .search-bar .cancel-button>svg{block-size:20px;fill:var(--si-sys-color-text-primary)}.component-list .available-examples{flex:1 1 0;min-block-size:0;overflow-y:auto;padding-block-start:10px;border-block-start:1px solid var(--si-sys-color-border-4)}.component-list .available-examples ul{margin-block:0 16px;margin-inline:0;padding-inline-start:16px;list-style:none}.component-list .available-examples li{margin-inline-start:calc(var(--level) * 16px);padding-block:4px}.example-active{font-weight:600}a{text-decoration:none}main{flex:1 1 auto;display:flex;overflow:hidden}@media(prefers-color-scheme:dark){si-example-overview{color-scheme:dark}}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: SiLivePreviewComponent, selector: "si-live-preview", inputs: ["initialTheme"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
1526
1554
  }
1527
1555
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiExampleOverviewComponent, decorators: [{
1528
1556
  type: Component,
1529
- args: [{ selector: 'si-example-overview', imports: [ReactiveFormsModule, RouterLink, RouterLinkActive, SiLivePreviewComponent], changeDetection: ChangeDetectionStrategy.Eager, template: "<nav class=\"component-list\" aria-label=\"Live preview\" [class.is-collapsed]=\"isCollapsed\">\n <div class=\"component-list-header\">\n @if (showContent) {\n <span>Examples</span>\n }\n <button\n type=\"button\"\n class=\"collapse-button\"\n [attr.title]=\"isCollapsed ? 'Expand' : 'Collapse'\"\n [attr.aria-label]=\"isCollapsed ? 'Expand' : 'Collapse'\"\n (click)=\"toggleCollapse()\"\n >\n <svg class=\"collapse-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M234.77,248.93l1.44-1.72,110-110a12.43,12.43,0,0,1,19,15.86l-1.44,1.72L262.59,256l101.2,101.21a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72a12.45,12.45,0,0,1-15.86,1.44l-1.72-1.44-110-110A12.45,12.45,0,0,1,234.77,248.93Z\"\n />\n <path\n d=\"M146.77,248.93l1.44-1.72,88-88a12.43,12.43,0,0,1,19,15.86l-1.44,1.72L174.59,256l79.2,79.21a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72a12.45,12.45,0,0,1-15.86,1.44l-1.72-1.44-88-88A12.45,12.45,0,0,1,146.77,248.93Z\"\n />\n </svg>\n </button>\n </div>\n @if (showContent) {\n <div class=\"search-bar\" role=\"search\" aria-label=\"Live preview\">\n <svg class=\"search-bar-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M420.49,403.51l-76.88-76.87A139.39,139.39,0,0,0,377,236c0-77.2-62.8-140-140-140S97,158.8,97,236s62.8,140,140,140a139.33,139.33,0,0,0,89.55-32.48l77,77a12,12,0,0,0,17-17ZM121,236A116,116,0,1,1,237,352,116.13,116.13,0,0,1,121,236Z\"\n />\n </svg>\n <input\n type=\"text\"\n placeholder=\"Filter examples\"\n autocorrect=\"off\"\n autocapitalize=\"none\"\n [formControl]=\"searchControl\"\n />\n @if (searchControl.value) {\n <button\n type=\"button\"\n class=\"cancel-button\"\n aria-label=\"clear search\"\n (click)=\"resetSearchBar()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M273,256l87.52-87.51a12,12,0,0,0-17-17L256,239l-87.51-87.52a12,12,0,0,0-17,17L239,256l-87.52,87.51a12,12,0,0,0,17,17L256,273l87.51,87.52a12,12,0,0,0,17-17Z\"\n />\n </svg>\n </button>\n }\n </div>\n }\n @if (showContent) {\n <div class=\"available-examples\">\n <ul>\n @for (item of tree; track $index) {\n <li [style.--level]=\"item.level\">\n @if (item.link) {\n <a\n routerLinkActive=\"example-active\"\n queryParamsHandling=\"merge\"\n [routerLink]=\"'/overview/' + item.link\"\n >\n {{ item.label }}\n </a>\n } @else {\n {{ item.label }}\n }\n </li>\n }\n </ul>\n </div>\n }\n @if (!showContent && isCollapsed) {\n <div class=\"component-list-text\">\n <span>Examples</span>\n </div>\n }\n</nav>\n<main aria-label=\"Live preview\">\n <si-live-preview />\n</main>\n", styles: ["a{color:var(--si-sys-color-text-accent)}a:after{display:none}a:hover{color:var(--si-sys-color-text-accent-hover)}*:focus-visible{outline:var(--element-button-focus-width) solid var(--si-sys-color-effects-focus);outline-offset:var(--element-button-focus-overlay-width)}:host{display:flex;flex-direction:row;background-color:var(--si-sys-color-background-0)}.component-list{border-inline-end:1px solid var(--si-sys-color-border-4);display:flex;flex:0 0 auto;inline-size:400px;flex-direction:column;transition:inline-size .5s;color:var(--si-sys-color-text-primary)}.component-list.is-collapsed{inline-size:40px;overflow:hidden;background-color:var(--si-sys-color-background-0)}.component-list.is-collapsed .component-list-text{transform:rotate(-90deg);margin-block:auto 2em;word-wrap:normal}.component-list.is-collapsed .collapse-icon{transform:rotate(180deg)}.component-list .component-list-header{display:flex;flex-direction:column;justify-content:center;padding-block:10px;padding-inline:8px;background-color:var(--si-sys-color-background-0);position:relative;block-size:36px}.component-list .component-list-header .collapse-button{background-color:transparent;border:0;padding:4px;position:absolute;inset-inline-end:2px;inset-block-start:4px;inline-size:32px;block-size:32px;cursor:pointer;color:var(--si-sys-color-text-primary)}.component-list .component-list-header .collapse-button>svg{block-size:20px;fill:currentColor}.component-list .component-list-header .collapse-button:hover{color:var(--si-sys-color-text-accent-hover)}.component-list .search-bar{display:flex;margin-block:10px;margin-inline:8px;position:relative;block-size:38px}.component-list .search-bar input{flex:1;padding-block:8px;padding-inline:28px 12px;border:1px solid var(--si-sys-color-border-4);font-size:14px;background:var(--si-sys-color-background-0);color:var(--si-sys-color-text-primary)}.component-list .search-bar .search-bar-icon{position:absolute;inset-block-start:8px;inset-inline-start:6px;fill:var(--si-sys-color-text-primary);block-size:20px}.component-list .search-bar .cancel-button{background-color:transparent;border:0;font-size:20px;line-height:20px;padding:0;pointer-events:auto;position:absolute;inset-inline-end:8px;inset-block-start:8px}.component-list .search-bar .cancel-button>svg{block-size:20px;fill:var(--si-sys-color-text-primary)}.component-list .available-examples{flex:1 1 0;min-block-size:0;overflow-y:auto;padding-block-start:10px;border-block-start:1px solid var(--si-sys-color-border-4)}.component-list .available-examples ul{margin-block:0 16px;margin-inline:0;padding-inline-start:16px;list-style:none}.component-list .available-examples li{margin-inline-start:calc(var(--level) * 16px);padding-block:4px}.example-active{font-weight:600}a{text-decoration:none}main{flex:1 1 auto;display:flex;overflow:hidden}@media(prefers-color-scheme:dark){si-example-overview{color-scheme:dark}}\n"] }]
1557
+ args: [{ selector: 'si-example-overview', imports: [ReactiveFormsModule, RouterLink, RouterLinkActive, SiLivePreviewComponent], changeDetection: ChangeDetectionStrategy.Eager, template: "<nav class=\"component-list\" aria-label=\"Live preview\" [class.is-collapsed]=\"isCollapsed\">\n <div class=\"component-list-header\">\n @if (showContent) {\n <span>Examples</span>\n }\n <button\n type=\"button\"\n class=\"collapse-button\"\n [attr.title]=\"isCollapsed ? 'Expand' : 'Collapse'\"\n [attr.aria-label]=\"isCollapsed ? 'Expand' : 'Collapse'\"\n (click)=\"toggleCollapse()\"\n >\n <svg class=\"collapse-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M234.77,248.93l1.44-1.72,110-110a12.43,12.43,0,0,1,19,15.86l-1.44,1.72L262.59,256l101.2,101.21a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72a12.45,12.45,0,0,1-15.86,1.44l-1.72-1.44-110-110A12.45,12.45,0,0,1,234.77,248.93Z\"\n />\n <path\n d=\"M146.77,248.93l1.44-1.72,88-88a12.43,12.43,0,0,1,19,15.86l-1.44,1.72L174.59,256l79.2,79.21a12.45,12.45,0,0,1,1.44,15.86l-1.44,1.72a12.45,12.45,0,0,1-15.86,1.44l-1.72-1.44-88-88A12.45,12.45,0,0,1,146.77,248.93Z\"\n />\n </svg>\n </button>\n </div>\n @if (showContent) {\n <div class=\"search-bar\" role=\"search\" aria-label=\"Live preview\">\n <svg class=\"search-bar-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M420.49,403.51l-76.88-76.87A139.39,139.39,0,0,0,377,236c0-77.2-62.8-140-140-140S97,158.8,97,236s62.8,140,140,140a139.33,139.33,0,0,0,89.55-32.48l77,77a12,12,0,0,0,17-17ZM121,236A116,116,0,1,1,237,352,116.13,116.13,0,0,1,121,236Z\"\n />\n </svg>\n <input\n type=\"text\"\n placeholder=\"Filter examples\"\n autocorrect=\"off\"\n autocapitalize=\"none\"\n [formControl]=\"searchControl\"\n />\n @if (searchControl.value) {\n <button\n type=\"button\"\n class=\"cancel-button\"\n aria-label=\"clear search\"\n (click)=\"resetSearchBar()\"\n >\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M273,256l87.52-87.51a12,12,0,0,0-17-17L256,239l-87.51-87.52a12,12,0,0,0-17,17L239,256l-87.52,87.51a12,12,0,0,0,17,17L256,273l87.51,87.52a12,12,0,0,0,17-17Z\"\n />\n </svg>\n </button>\n }\n </div>\n }\n @if (showContent) {\n <div class=\"available-examples\">\n <ul>\n @for (item of tree; track $index) {\n <li [style.--level]=\"item.level\">\n @if (item.link) {\n <a\n routerLinkActive=\"example-active\"\n queryParamsHandling=\"merge\"\n [routerLink]=\"'/overview/' + item.link\"\n >\n {{ item.label }}\n </a>\n } @else {\n {{ item.label }}\n }\n </li>\n }\n </ul>\n </div>\n }\n @if (!showContent && isCollapsed) {\n <div class=\"component-list-text\">\n <span>Examples</span>\n </div>\n }\n</nav>\n<main aria-label=\"Live preview\">\n <si-live-preview />\n</main>\n", styles: ["a{color:var(--si-sys-color-text-accent)}a:after{display:none}a:hover{color:var(--si-sys-color-text-accent-hover)}*:focus-visible{outline:var(--si-sys-sizing-focus-ring-width, 2px) solid var(--si-sys-color-effects-focus);outline-offset:var(--si-sys-sizing-focus-ring-offset, 1px)}:host{display:flex;flex-direction:row;background-color:var(--si-sys-color-background-0)}.component-list{border-inline-end:1px solid var(--si-sys-color-border-4);display:flex;flex:0 0 auto;inline-size:400px;flex-direction:column;transition:inline-size .5s;color:var(--si-sys-color-text-primary)}.component-list.is-collapsed{inline-size:40px;overflow:hidden;background-color:var(--si-sys-color-background-0)}.component-list.is-collapsed .component-list-text{transform:rotate(-90deg);margin-block:auto 2em;word-wrap:normal}.component-list.is-collapsed .collapse-icon{transform:rotate(180deg)}.component-list .component-list-header{display:flex;flex-direction:column;justify-content:center;padding-block:10px;padding-inline:8px;background-color:var(--si-sys-color-background-0);position:relative;block-size:36px}.component-list .component-list-header .collapse-button{background-color:transparent;border:0;padding:4px;position:absolute;inset-inline-end:2px;inset-block-start:4px;inline-size:32px;block-size:32px;cursor:pointer;color:var(--si-sys-color-text-primary)}.component-list .component-list-header .collapse-button>svg{block-size:20px;fill:currentColor}.component-list .component-list-header .collapse-button:hover{color:var(--si-sys-color-text-accent-hover)}.component-list .search-bar{display:flex;margin-block:10px;margin-inline:8px;position:relative;block-size:38px}.component-list .search-bar input{flex:1;padding-block:8px;padding-inline:28px 12px;border:1px solid var(--si-sys-color-border-4);font-size:14px;background:var(--si-sys-color-background-0);color:var(--si-sys-color-text-primary)}.component-list .search-bar .search-bar-icon{position:absolute;inset-block-start:8px;inset-inline-start:6px;fill:var(--si-sys-color-text-primary);block-size:20px}.component-list .search-bar .cancel-button{background-color:transparent;border:0;font-size:20px;line-height:20px;padding:0;pointer-events:auto;position:absolute;inset-inline-end:8px;inset-block-start:8px}.component-list .search-bar .cancel-button>svg{block-size:20px;fill:var(--si-sys-color-text-primary)}.component-list .available-examples{flex:1 1 0;min-block-size:0;overflow-y:auto;padding-block-start:10px;border-block-start:1px solid var(--si-sys-color-border-4)}.component-list .available-examples ul{margin-block:0 16px;margin-inline:0;padding-inline-start:16px;list-style:none}.component-list .available-examples li{margin-inline-start:calc(var(--level) * 16px);padding-block:4px}.example-active{font-weight:600}a{text-decoration:none}main{flex:1 1 auto;display:flex;overflow:hidden}@media(prefers-color-scheme:dark){si-example-overview{color-scheme:dark}}\n"] }]
1530
1558
  }] });
1531
1559
 
1532
1560
  const setDeviceMode = (mode) => {
@@ -2066,7 +2094,7 @@ class SiExampleViewerComponent {
2066
2094
  handled = true;
2067
2095
  }
2068
2096
  if (params.rfs) {
2069
- setRootFontSize(parseInt(params.rfs, 10));
2097
+ setRootFontSize(params.rfs === 'initial' ? params.rfs : parseInt(params.rfs, 10));
2070
2098
  }
2071
2099
  if (params.isRTL) {
2072
2100
  this.setRTL(params.isRTL);
@@ -2123,14 +2151,14 @@ class SiExampleViewerComponent {
2123
2151
  this.state.example.set(this.tabs()[index].base + example);
2124
2152
  }
2125
2153
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiExampleViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2126
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiExampleViewerComponent, isStandalone: true, selector: "si-example-viewer", host: { properties: { "class.has-tabs": "hasTabs()", "class.has-tabs-mobile": "hasTabsMobile()" } }, viewQueries: [{ propertyName: "renderer", first: true, predicate: ["renderer"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"wrapper\">\n @if (!state.example() && !state.template()) {\n <p class=\"text-information\" style=\"margin: 1em\">\n No example specified. Head to\n <strong><a href=\"#/overview\">/overview</a></strong>\n for a list of them.\n </p>\n }\n @if (\n (state.template() || state.templateReact() || state.templateVue() || state.templateJs()) &&\n mode() === 'editor'\n ) {\n <p class=\"text-information\" style=\"margin: 1em\">\n This is an adopted example built from the URL. Head to\n <strong><a href=\"#/overview\">/overview</a></strong> for a list of examples.\n </p>\n }\n @if (tabs().length > 1) {\n <div class=\"tab-wrapper\">\n <div role=\"tablist\" class=\"nav lp-tabs\">\n @for (tab of tabs(); track $index) {\n <button\n type=\"button\"\n role=\"tab\"\n class=\"tab-item tab-link focus-inside\"\n [class.tab-active]=\"activeTabIndex() === $index\"\n (click)=\"activateTab($index)\"\n (keydown.enter)=\"activateTab($index)\"\n >\n {{ tab.heading }}\n </button>\n }\n </div>\n </div>\n }\n</div>\n\n@if (mode() !== 'editor') {\n <si-live-preview-renderer #renderer />\n} @else {\n <si-live-preview />\n}\n", styles: [".lp-tabs{display:flex;flex-wrap:wrap;padding-inline-start:0;margin:0;list-style:none;background:none;inline-size:inherit;font-weight:700}.lp-tabs .tab-item:focus-visible{outline-offset:calc(-1 * var(--element-button-focus-width))}.lp-tabs .tab-item.tab-active.tab-link{color:var(--si-sys-color-text-accent);border-block-end-color:var(--si-sys-color-text-accent)!important}.lp-tabs .tab-item.tab-active.tab-link:hover{color:var(--si-sys-color-text-accent-hover)}.lp-tabs .tab-item.tab-link{font:inherit;background:none;min-inline-size:150px;display:block;padding-block:8px;padding-inline:15px;cursor:pointer;text-align:start;line-height:20px;color:var(--si-sys-color-text-primary);border:0;border-block-end:4px solid transparent}.lp-tabs .tab-item.tab-link:hover{text-decoration:none;color:var(--si-sys-color-text-accent-hover);border-block-end-color:var(--si-sys-color-border-4)}*:focus-visible{outline:var(--element-button-focus-width) solid var(--si-sys-color-effects-focus);outline-offset:var(--element-button-focus-overlay-width)}.wrapper{background-color:var(--si-sys-color-background-0);color:var(--si-sys-color-text-primary)}.wrapper.has-tabs .tab-wrapper,.wrapper.has-tabs-mobile{background-color:var(--si-sys-color-background-0)}.tab-wrapper{margin-block-end:10px;border-block-end:1px solid var(--si-sys-color-border-4)}si-live-preview-renderer{flex:1;transform:translate(0)}\n"], dependencies: [{ kind: "component", type: SiLivePreviewComponent, selector: "si-live-preview" }, { kind: "component", type: SiLivePreviewRendererComponent, selector: "si-live-preview-renderer", outputs: ["templateFromComponent", "logClear", "logMessage", "logRenderingError", "inProgress", "supportsLandscapeMode"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
2154
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiExampleViewerComponent, isStandalone: true, selector: "si-example-viewer", host: { properties: { "class.has-tabs": "hasTabs()", "class.has-tabs-mobile": "hasTabsMobile()" } }, viewQueries: [{ propertyName: "renderer", first: true, predicate: ["renderer"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"wrapper\">\n @if (!state.example() && !state.template()) {\n <p class=\"text-information\" style=\"margin: 1em\">\n No example specified. Head to\n <strong><a href=\"#/overview\">/overview</a></strong>\n for a list of them.\n </p>\n }\n @if (\n (state.template() || state.templateReact() || state.templateVue() || state.templateJs()) &&\n mode() === 'editor'\n ) {\n <p class=\"text-information\" style=\"margin: 1em\">\n This is an adopted example built from the URL. Head to\n <strong><a href=\"#/overview\">/overview</a></strong> for a list of examples.\n </p>\n }\n @if (tabs().length > 1) {\n <div class=\"tab-wrapper\">\n <div role=\"tablist\" class=\"nav lp-tabs\">\n @for (tab of tabs(); track $index) {\n <button\n type=\"button\"\n role=\"tab\"\n class=\"tab-item tab-link focus-inside\"\n [class.tab-active]=\"activeTabIndex() === $index\"\n (click)=\"activateTab($index)\"\n (keydown.enter)=\"activateTab($index)\"\n >\n {{ tab.heading }}\n </button>\n }\n </div>\n </div>\n }\n</div>\n\n@if (mode() !== 'editor') {\n <si-live-preview-renderer #renderer />\n} @else {\n <si-live-preview />\n}\n", styles: [".lp-tabs{display:flex;flex-wrap:wrap;padding-inline-start:0;margin:0;list-style:none;background:none;inline-size:inherit;font-weight:700}.lp-tabs .tab-item:focus-visible{outline-offset:calc(-1 * var(--si-sys-sizing-focus-ring-width, 2px))}.lp-tabs .tab-item.tab-active.tab-link{color:var(--si-sys-color-text-accent);border-block-end-color:var(--si-sys-color-text-accent)!important}.lp-tabs .tab-item.tab-active.tab-link:hover{color:var(--si-sys-color-text-accent-hover)}.lp-tabs .tab-item.tab-link{font:inherit;background:none;min-inline-size:150px;display:block;padding-block:8px;padding-inline:15px;cursor:pointer;text-align:start;line-height:20px;color:var(--si-sys-color-text-primary);border:0;border-block-end:4px solid transparent}.lp-tabs .tab-item.tab-link:hover{text-decoration:none;color:var(--si-sys-color-text-accent-hover);border-block-end-color:var(--si-sys-color-border-4)}*:focus-visible{outline:var(--si-sys-sizing-focus-ring-width, 2px) solid var(--si-sys-color-effects-focus);outline-offset:var(--si-sys-sizing-focus-ring-offset, 1px)}.wrapper{background-color:var(--si-sys-color-background-0);color:var(--si-sys-color-text-primary)}.wrapper.has-tabs .tab-wrapper,.wrapper.has-tabs-mobile{background-color:var(--si-sys-color-background-0)}.tab-wrapper{margin-block-end:10px;border-block-end:1px solid var(--si-sys-color-border-4)}si-live-preview-renderer{flex:1;transform:translate(0)}\n"], dependencies: [{ kind: "component", type: SiLivePreviewComponent, selector: "si-live-preview", inputs: ["initialTheme"] }, { kind: "component", type: SiLivePreviewRendererComponent, selector: "si-live-preview-renderer", outputs: ["templateFromComponent", "logClear", "logMessage", "logRenderingError", "inProgress", "supportsLandscapeMode"] }], changeDetection: i0.ChangeDetectionStrategy.Eager });
2127
2155
  }
2128
2156
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiExampleViewerComponent, decorators: [{
2129
2157
  type: Component,
2130
2158
  args: [{ selector: 'si-example-viewer', imports: [SiLivePreviewComponent, SiLivePreviewRendererComponent], changeDetection: ChangeDetectionStrategy.Eager, host: {
2131
2159
  '[class.has-tabs]': 'hasTabs()',
2132
2160
  '[class.has-tabs-mobile]': 'hasTabsMobile()'
2133
- }, template: "<div class=\"wrapper\">\n @if (!state.example() && !state.template()) {\n <p class=\"text-information\" style=\"margin: 1em\">\n No example specified. Head to\n <strong><a href=\"#/overview\">/overview</a></strong>\n for a list of them.\n </p>\n }\n @if (\n (state.template() || state.templateReact() || state.templateVue() || state.templateJs()) &&\n mode() === 'editor'\n ) {\n <p class=\"text-information\" style=\"margin: 1em\">\n This is an adopted example built from the URL. Head to\n <strong><a href=\"#/overview\">/overview</a></strong> for a list of examples.\n </p>\n }\n @if (tabs().length > 1) {\n <div class=\"tab-wrapper\">\n <div role=\"tablist\" class=\"nav lp-tabs\">\n @for (tab of tabs(); track $index) {\n <button\n type=\"button\"\n role=\"tab\"\n class=\"tab-item tab-link focus-inside\"\n [class.tab-active]=\"activeTabIndex() === $index\"\n (click)=\"activateTab($index)\"\n (keydown.enter)=\"activateTab($index)\"\n >\n {{ tab.heading }}\n </button>\n }\n </div>\n </div>\n }\n</div>\n\n@if (mode() !== 'editor') {\n <si-live-preview-renderer #renderer />\n} @else {\n <si-live-preview />\n}\n", styles: [".lp-tabs{display:flex;flex-wrap:wrap;padding-inline-start:0;margin:0;list-style:none;background:none;inline-size:inherit;font-weight:700}.lp-tabs .tab-item:focus-visible{outline-offset:calc(-1 * var(--element-button-focus-width))}.lp-tabs .tab-item.tab-active.tab-link{color:var(--si-sys-color-text-accent);border-block-end-color:var(--si-sys-color-text-accent)!important}.lp-tabs .tab-item.tab-active.tab-link:hover{color:var(--si-sys-color-text-accent-hover)}.lp-tabs .tab-item.tab-link{font:inherit;background:none;min-inline-size:150px;display:block;padding-block:8px;padding-inline:15px;cursor:pointer;text-align:start;line-height:20px;color:var(--si-sys-color-text-primary);border:0;border-block-end:4px solid transparent}.lp-tabs .tab-item.tab-link:hover{text-decoration:none;color:var(--si-sys-color-text-accent-hover);border-block-end-color:var(--si-sys-color-border-4)}*:focus-visible{outline:var(--element-button-focus-width) solid var(--si-sys-color-effects-focus);outline-offset:var(--element-button-focus-overlay-width)}.wrapper{background-color:var(--si-sys-color-background-0);color:var(--si-sys-color-text-primary)}.wrapper.has-tabs .tab-wrapper,.wrapper.has-tabs-mobile{background-color:var(--si-sys-color-background-0)}.tab-wrapper{margin-block-end:10px;border-block-end:1px solid var(--si-sys-color-border-4)}si-live-preview-renderer{flex:1;transform:translate(0)}\n"] }]
2161
+ }, template: "<div class=\"wrapper\">\n @if (!state.example() && !state.template()) {\n <p class=\"text-information\" style=\"margin: 1em\">\n No example specified. Head to\n <strong><a href=\"#/overview\">/overview</a></strong>\n for a list of them.\n </p>\n }\n @if (\n (state.template() || state.templateReact() || state.templateVue() || state.templateJs()) &&\n mode() === 'editor'\n ) {\n <p class=\"text-information\" style=\"margin: 1em\">\n This is an adopted example built from the URL. Head to\n <strong><a href=\"#/overview\">/overview</a></strong> for a list of examples.\n </p>\n }\n @if (tabs().length > 1) {\n <div class=\"tab-wrapper\">\n <div role=\"tablist\" class=\"nav lp-tabs\">\n @for (tab of tabs(); track $index) {\n <button\n type=\"button\"\n role=\"tab\"\n class=\"tab-item tab-link focus-inside\"\n [class.tab-active]=\"activeTabIndex() === $index\"\n (click)=\"activateTab($index)\"\n (keydown.enter)=\"activateTab($index)\"\n >\n {{ tab.heading }}\n </button>\n }\n </div>\n </div>\n }\n</div>\n\n@if (mode() !== 'editor') {\n <si-live-preview-renderer #renderer />\n} @else {\n <si-live-preview />\n}\n", styles: [".lp-tabs{display:flex;flex-wrap:wrap;padding-inline-start:0;margin:0;list-style:none;background:none;inline-size:inherit;font-weight:700}.lp-tabs .tab-item:focus-visible{outline-offset:calc(-1 * var(--si-sys-sizing-focus-ring-width, 2px))}.lp-tabs .tab-item.tab-active.tab-link{color:var(--si-sys-color-text-accent);border-block-end-color:var(--si-sys-color-text-accent)!important}.lp-tabs .tab-item.tab-active.tab-link:hover{color:var(--si-sys-color-text-accent-hover)}.lp-tabs .tab-item.tab-link{font:inherit;background:none;min-inline-size:150px;display:block;padding-block:8px;padding-inline:15px;cursor:pointer;text-align:start;line-height:20px;color:var(--si-sys-color-text-primary);border:0;border-block-end:4px solid transparent}.lp-tabs .tab-item.tab-link:hover{text-decoration:none;color:var(--si-sys-color-text-accent-hover);border-block-end-color:var(--si-sys-color-border-4)}*:focus-visible{outline:var(--si-sys-sizing-focus-ring-width, 2px) solid var(--si-sys-color-effects-focus);outline-offset:var(--si-sys-sizing-focus-ring-offset, 1px)}.wrapper{background-color:var(--si-sys-color-background-0);color:var(--si-sys-color-text-primary)}.wrapper.has-tabs .tab-wrapper,.wrapper.has-tabs-mobile{background-color:var(--si-sys-color-background-0)}.tab-wrapper{margin-block-end:10px;border-block-end:1px solid var(--si-sys-color-border-4)}si-live-preview-renderer{flex:1;transform:translate(0)}\n"] }]
2134
2162
  }], ctorParameters: () => [], propDecorators: { renderer: [{ type: i0.ViewChild, args: ['renderer', { isSignal: true }] }] } });
2135
2163
 
2136
2164
  /**
@@ -2165,6 +2193,7 @@ class SiLivePreviewWrapperComponent {
2165
2193
  optional: true
2166
2194
  });
2167
2195
  cdRef = inject(ChangeDetectorRef);
2196
+ parentOrigin = this.resolveParentOrigin();
2168
2197
  isMobile = false;
2169
2198
  initialUrl;
2170
2199
  constructor() {
@@ -2199,8 +2228,9 @@ class SiLivePreviewWrapperComponent {
2199
2228
  }));
2200
2229
  }
2201
2230
  onMessage(event) {
2202
- // Render requests can contain executable templates, so the sender must be the same-origin editor.
2203
- if (event.origin !== window.location.origin ||
2231
+ // Render requests contain executable templates. Only trust the embedding editor, with
2232
+ // a loopback-only exception for documentation development on a separate local port.
2233
+ if (event.origin !== this.parentOrigin ||
2204
2234
  event.source !== window.parent ||
2205
2235
  event.data?.src !== 'editor') {
2206
2236
  return;
@@ -2241,7 +2271,7 @@ class SiLivePreviewWrapperComponent {
2241
2271
  loadVue: this.state.loadVue(),
2242
2272
  config: this.config
2243
2273
  }, {
2244
- inProgress: this.sendMessage
2274
+ inProgress: (type, message) => this.sendMessage(type, message)
2245
2275
  });
2246
2276
  }
2247
2277
  else {
@@ -2261,7 +2291,25 @@ class SiLivePreviewWrapperComponent {
2261
2291
  }
2262
2292
  }
2263
2293
  sendMessage(type, message) {
2264
- window.parent.postMessage({ src: 'renderer', type, message }, window.location.origin);
2294
+ window.parent.postMessage({ src: 'renderer', type, message }, this.parentOrigin);
2295
+ }
2296
+ resolveParentOrigin() {
2297
+ const location = window.location;
2298
+ // Keep the editor origin across locale-triggered reloads, which replace the referrer.
2299
+ const parameters = new URLSearchParams(location.hash.split('?')[1]);
2300
+ const source = parameters.get('parentOrigin') ?? document.referrer;
2301
+ if (!source || !URL.canParse(source)) {
2302
+ return location.origin;
2303
+ }
2304
+ const parent = new URL(source);
2305
+ const isLoopback = (hostname) => hostname === 'localhost' || hostname === '[::1]' || /^127(?:\.\d{1,3}){3}$/.test(hostname);
2306
+ return parent.origin === location.origin ||
2307
+ (parent.protocol === 'http:' &&
2308
+ location.protocol === 'http:' &&
2309
+ isLoopback(parent.hostname) &&
2310
+ isLoopback(location.hostname))
2311
+ ? parent.origin
2312
+ : location.origin;
2265
2313
  }
2266
2314
  setTheme(theme) {
2267
2315
  this.state.theme.set(theme);
@@ -2495,6 +2543,102 @@ const provideLivePreview = (config, isMobile = false) => {
2495
2543
  ]);
2496
2544
  };
2497
2545
 
2546
+ /**
2547
+ * Copyright (c) Siemens 2016 - 2026
2548
+ * SPDX-License-Identifier: MIT
2549
+ */
2550
+ /**
2551
+ * Documentation component shared with the optional elements entry point.
2552
+ * @internal
2553
+ */
2554
+ class SiDocsComponentComponent {
2555
+ example = input('', /* @ts-ignore */
2556
+ ...(ngDevMode ? [{ debugName: "example" }] : /* istanbul ignore next */ []));
2557
+ base = input('', /* @ts-ignore */
2558
+ ...(ngDevMode ? [{ debugName: "base" }] : /* istanbul ignore next */ []));
2559
+ height = input(204, { ...(ngDevMode ? { debugName: "height" } : /* istanbul ignore next */ {}), transform: numberAttribute });
2560
+ theme = input(/* @ts-ignore */
2561
+ ...(ngDevMode ? [undefined, { debugName: "theme" }] : /* istanbul ignore next */ []));
2562
+ state = inject(LivePreviewStateService);
2563
+ document = inject(DOCUMENT);
2564
+ host = inject(ElementRef).nativeElement;
2565
+ documentTheme = signal(this.readDocumentTheme(), /* @ts-ignore */
2566
+ ...(ngDevMode ? [{ debugName: "documentTheme" }] : /* istanbul ignore next */ []));
2567
+ childExamples = signal([], /* @ts-ignore */
2568
+ ...(ngDevMode ? [{ debugName: "childExamples" }] : /* istanbul ignore next */ []));
2569
+ previewTheme = computed(() => this.theme() ?? this.documentTheme(), /* @ts-ignore */
2570
+ ...(ngDevMode ? [{ debugName: "previewTheme" }] : /* istanbul ignore next */ []));
2571
+ activeTabIndex = signal(0, /* @ts-ignore */
2572
+ ...(ngDevMode ? [{ debugName: "activeTabIndex" }] : /* istanbul ignore next */ []));
2573
+ previewHeight = computed(() => {
2574
+ const height = this.height();
2575
+ return Number.isFinite(height) && height >= 0 ? height : 204;
2576
+ }, /* @ts-ignore */
2577
+ ...(ngDevMode ? [{ debugName: "previewHeight" }] : /* istanbul ignore next */ []));
2578
+ tabs = computed(() => [
2579
+ ...(this.example() ? [{ example: this.example(), heading: '' }] : []),
2580
+ ...this.childExamples()
2581
+ ], /* @ts-ignore */
2582
+ ...(ngDevMode ? [{ debugName: "tabs" }] : /* istanbul ignore next */ []));
2583
+ constructor() {
2584
+ const readTabs = () => {
2585
+ this.childExamples.set(Array.from(this.host.querySelectorAll(':scope > si-docs-tab[example]'), tab => ({
2586
+ example: tab.getAttribute('example') ?? '',
2587
+ heading: tab.getAttribute('heading') ?? ''
2588
+ })));
2589
+ };
2590
+ readTabs();
2591
+ const observer = new MutationObserver(readTabs);
2592
+ observer.observe(this.host, {
2593
+ childList: true,
2594
+ subtree: true,
2595
+ attributes: true,
2596
+ attributeFilter: ['example', 'heading']
2597
+ });
2598
+ const themeObserver = new MutationObserver(() => this.documentTheme.set(this.readDocumentTheme()));
2599
+ themeObserver.observe(this.document.body, {
2600
+ attributes: true,
2601
+ attributeFilter: ['data-md-color-scheme']
2602
+ });
2603
+ inject(DestroyRef).onDestroy(() => {
2604
+ observer.disconnect();
2605
+ themeObserver.disconnect();
2606
+ });
2607
+ effect(() => {
2608
+ this.tabs();
2609
+ this.activeTabIndex.set(0);
2610
+ });
2611
+ effect(() => {
2612
+ const tab = this.tabs()[this.activeTabIndex()];
2613
+ const base = this.base().replace(/\/$/, '');
2614
+ this.state.clearTemplates();
2615
+ this.state.example.set(tab ? `${base ? base + '/' : ''}${tab.example}` : '');
2616
+ });
2617
+ effect(() => {
2618
+ this.state.theme.set(this.previewTheme());
2619
+ });
2620
+ }
2621
+ readDocumentTheme() {
2622
+ return this.document.body.getAttribute('data-md-color-scheme') === 'dark' ? 'dark' : 'light';
2623
+ }
2624
+ activateTab(index, focus = false) {
2625
+ this.activeTabIndex.set(index);
2626
+ if (focus) {
2627
+ this.host.shadowRoot?.querySelector(`#example-tab-${index}`)?.focus();
2628
+ }
2629
+ }
2630
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SiDocsComponentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2631
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SiDocsComponentComponent, isStandalone: true, selector: "si-docs-component", inputs: { example: { classPropertyName: "example", publicName: "example", isSignal: true, isRequired: false, transformFunction: null }, base: { classPropertyName: "base", publicName: "base", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, theme: { classPropertyName: "theme", publicName: "theme", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.--preview-height": "previewHeight() + \"px\"" } }, providers: [LivePreviewStateService, LivePreviewUrlService], ngImport: i0, template: "<slot hidden></slot>\n@defer (on viewport) {\n @if (tabs().length > 1) {\n <div role=\"tablist\" class=\"lp-tabs\" aria-label=\"Examples\">\n @for (tab of tabs(); track $index) {\n <button\n type=\"button\"\n role=\"tab\"\n class=\"tab-item tab-link\"\n aria-controls=\"example-panel\"\n [id]=\"'example-tab-' + $index\"\n [class.tab-active]=\"activeTabIndex() === $index\"\n [attr.aria-selected]=\"activeTabIndex() === $index\"\n [tabIndex]=\"activeTabIndex() === $index ? 0 : -1\"\n (click)=\"activateTab($index)\"\n (keydown.arrowRight)=\"activateTab(($index + 1) % $count, true); $event.preventDefault()\"\n (keydown.arrowLeft)=\"\n activateTab(($index + $count - 1) % $count, true); $event.preventDefault()\n \"\n (keydown.home)=\"activateTab(0, true); $event.preventDefault()\"\n (keydown.end)=\"activateTab($count - 1, true); $event.preventDefault()\"\n >\n {{ tab.heading || tab.example }}\n </button>\n }\n </div>\n }\n <div\n id=\"example-panel\"\n class=\"preview\"\n [attr.role]=\"tabs().length > 1 ? 'tabpanel' : null\"\n [attr.aria-labelledby]=\"tabs().length > 1 ? 'example-tab-' + activeTabIndex() : null\"\n >\n <si-live-preview class=\"embedded\" [initialTheme]=\"previewTheme()\" />\n </div>\n} @placeholder {\n <div class=\"preview placeholder\" aria-hidden=\"true\"></div>\n}\n", styles: [".lp-tabs{display:flex;flex-wrap:wrap;padding-inline-start:0;margin:0;list-style:none;background:none;inline-size:inherit;font-weight:700}.lp-tabs .tab-item:focus-visible{outline-offset:calc(-1 * var(--si-sys-sizing-focus-ring-width, 2px))}.lp-tabs .tab-item.tab-active.tab-link{color:var(--si-sys-color-text-accent);border-block-end-color:var(--si-sys-color-text-accent)!important}.lp-tabs .tab-item.tab-active.tab-link:hover{color:var(--si-sys-color-text-accent-hover)}.lp-tabs .tab-item.tab-link{font:inherit;background:none;min-inline-size:150px;display:block;padding-block:8px;padding-inline:15px;cursor:pointer;text-align:start;line-height:20px;color:var(--si-sys-color-text-primary);border:0;border-block-end:4px solid transparent}.lp-tabs .tab-item.tab-link:hover{text-decoration:none;color:var(--si-sys-color-text-accent-hover);border-block-end-color:var(--si-sys-color-border-4)}:host{display:block;box-sizing:border-box;inline-size:100%;border:1px solid var(--si-sys-color-border-4);color:var(--si-sys-color-text-primary);background:var(--si-sys-color-background-0)}*,*:before,*:after{box-sizing:border-box}button,select,textarea{font:inherit}button{cursor:pointer}.preview{display:flex;flex-direction:column}.placeholder{block-size:var(--preview-height, 204px)}.lp-tabs{border-block-end:1px solid var(--si-sys-color-border-4)}\n"], encapsulation: i0.ViewEncapsulation.ShadowDom, deferBlockDependencies: [() => [/* @ts-ignore */
2632
+ Promise.resolve().then(function () { return siLivePreview_component; }).then(m => m.SiLivePreviewComponent)]] });
2633
+ }
2634
+ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "22.0.8", ngImport: i0, type: SiDocsComponentComponent, resolveDeferredDeps: () => [/* @ts-ignore */
2635
+ Promise.resolve().then(function () { return siLivePreview_component; }).then(m => m.SiLivePreviewComponent)], resolveMetadata: SiLivePreviewComponent => ({ decorators: [{
2636
+ type: Component,
2637
+ args: [{ selector: 'si-docs-component', imports: [SiLivePreviewComponent], providers: [LivePreviewStateService, LivePreviewUrlService], encapsulation: ViewEncapsulation.ShadowDom, host: {
2638
+ '[style.--preview-height]': 'previewHeight() + "px"'
2639
+ }, template: "<slot hidden></slot>\n@defer (on viewport) {\n @if (tabs().length > 1) {\n <div role=\"tablist\" class=\"lp-tabs\" aria-label=\"Examples\">\n @for (tab of tabs(); track $index) {\n <button\n type=\"button\"\n role=\"tab\"\n class=\"tab-item tab-link\"\n aria-controls=\"example-panel\"\n [id]=\"'example-tab-' + $index\"\n [class.tab-active]=\"activeTabIndex() === $index\"\n [attr.aria-selected]=\"activeTabIndex() === $index\"\n [tabIndex]=\"activeTabIndex() === $index ? 0 : -1\"\n (click)=\"activateTab($index)\"\n (keydown.arrowRight)=\"activateTab(($index + 1) % $count, true); $event.preventDefault()\"\n (keydown.arrowLeft)=\"\n activateTab(($index + $count - 1) % $count, true); $event.preventDefault()\n \"\n (keydown.home)=\"activateTab(0, true); $event.preventDefault()\"\n (keydown.end)=\"activateTab($count - 1, true); $event.preventDefault()\"\n >\n {{ tab.heading || tab.example }}\n </button>\n }\n </div>\n }\n <div\n id=\"example-panel\"\n class=\"preview\"\n [attr.role]=\"tabs().length > 1 ? 'tabpanel' : null\"\n [attr.aria-labelledby]=\"tabs().length > 1 ? 'example-tab-' + activeTabIndex() : null\"\n >\n <si-live-preview class=\"embedded\" [initialTheme]=\"previewTheme()\" />\n </div>\n} @placeholder {\n <div class=\"preview placeholder\" aria-hidden=\"true\"></div>\n}\n", styles: [".lp-tabs{display:flex;flex-wrap:wrap;padding-inline-start:0;margin:0;list-style:none;background:none;inline-size:inherit;font-weight:700}.lp-tabs .tab-item:focus-visible{outline-offset:calc(-1 * var(--si-sys-sizing-focus-ring-width, 2px))}.lp-tabs .tab-item.tab-active.tab-link{color:var(--si-sys-color-text-accent);border-block-end-color:var(--si-sys-color-text-accent)!important}.lp-tabs .tab-item.tab-active.tab-link:hover{color:var(--si-sys-color-text-accent-hover)}.lp-tabs .tab-item.tab-link{font:inherit;background:none;min-inline-size:150px;display:block;padding-block:8px;padding-inline:15px;cursor:pointer;text-align:start;line-height:20px;color:var(--si-sys-color-text-primary);border:0;border-block-end:4px solid transparent}.lp-tabs .tab-item.tab-link:hover{text-decoration:none;color:var(--si-sys-color-text-accent-hover);border-block-end-color:var(--si-sys-color-border-4)}:host{display:block;box-sizing:border-box;inline-size:100%;border:1px solid var(--si-sys-color-border-4);color:var(--si-sys-color-text-primary);background:var(--si-sys-color-background-0)}*,*:before,*:after{box-sizing:border-box}button,select,textarea{font:inherit}button{cursor:pointer}.preview{display:flex;flex-direction:column}.placeholder{block-size:var(--preview-height, 204px)}.lp-tabs{border-block-end:1px solid var(--si-sys-color-border-4)}\n"] }]
2640
+ }], ctorParameters: () => [], propDecorators: { example: [{ type: i0.Input, args: [{ isSignal: true, alias: "example", required: false }] }], base: [{ type: i0.Input, args: [{ isSignal: true, alias: "base", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], theme: [{ type: i0.Input, args: [{ isSignal: true, alias: "theme", required: false }] }] } }) });
2641
+
2498
2642
  /**
2499
2643
  * Copyright (c) Siemens 2016 - 2026
2500
2644
  * SPDX-License-Identifier: MIT
@@ -2533,5 +2677,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
2533
2677
  * Generated bundle index. Do not edit.
2534
2678
  */
2535
2679
 
2536
- export { LOG_EVENT, LandscapeSupportService, SI_LIVE_PREVIEW_CONFIG, SI_LIVE_PREVIEW_EXAMPLE_ROUTES, SI_LIVE_PREVIEW_INTERNALS, SI_STACKBLITZ_CONFIG, SiDummyComponent, SiLivePreviewApplicationRuntimeComponent, SiLivePreviewLocaleApi, SiLivePreviewModule, SiLivePreviewRoutingModule, SiLivePreviewRuntimeComponent, SiLivePreviewThemeApi, SiLivePreviewWebComponentService, SiLivePreviewModule as SimplLivePreviewModule, SiLivePreviewRoutingModule as SimplLivePreviewRoutingModule, angularTemplateProject, livePreviewRoutes, provideExampleRoutes, provideLivePreview, provideStackblitzConfig };
2680
+ export { LOG_EVENT, LandscapeSupportService, SI_LIVE_PREVIEW_CONFIG, SI_LIVE_PREVIEW_EXAMPLE_ROUTES, SI_LIVE_PREVIEW_INTERNALS, SI_STACKBLITZ_CONFIG, SiDocsComponentComponent, SiDummyComponent, SiLivePreviewApplicationRuntimeComponent, SiLivePreviewLocaleApi, SiLivePreviewModule, SiLivePreviewRoutingModule, SiLivePreviewRuntimeComponent, SiLivePreviewThemeApi, SiLivePreviewWebComponentService, SiLivePreviewModule as SimplLivePreviewModule, SiLivePreviewRoutingModule as SimplLivePreviewRoutingModule, angularTemplateProject, livePreviewRoutes, provideExampleRoutes, provideLivePreview, provideStackblitzConfig };
2537
2681
  //# sourceMappingURL=siemens-live-preview.mjs.map