-
Notifications
You must be signed in to change notification settings - Fork 1
/
chunk-REECQM5Z.js
1 lines (1 loc) · 10.6 KB
/
chunk-REECQM5Z.js
1
import"./chunk-BK4G2FSM.js";import{a as q}from"./chunk-SKPJQXVT.js";import"./chunk-I3CRJTGO.js";import"./chunk-CU6SR552.js";import{a as F,b as A,c as R}from"./chunk-T7S57SFR.js";import"./chunk-UFY6AFO4.js";import{a as N}from"./chunk-LPWCL5EZ.js";import"./chunk-CFWAU22U.js";import"./chunk-MABOOWEJ.js";import"./chunk-RAJBATEM.js";import"./chunk-3EQGR4CQ.js";import{L as D}from"./chunk-KHILBKJ3.js";import"./chunk-3HNXQENV.js";import"./chunk-WXI33M2S.js";import{Cb as M,Db as P,Eb as r,Fb as d,Jb as O,Kb as w,Kc as S,La as x,Nb as y,Oc as I,Pb as p,Qc as j,Va as l,Xb as k,Yb as c,Zb as v,cc as T,ga as s,jc as z,ma as b,nb as g,sa as _,uc as E,vb as u,wa as h,xa as C,zb as f}from"./chunk-FNSPSJSE.js";var m={templates:[{path:"playground/0-minigame",label:"Minigame"},{path:"playground/1-signals",label:"Signals"},{path:"playground/2-control-flow",label:"Control flow"},{path:"playground/3-hello-world",label:"Hello world"}],defaultTemplate:{path:"playground/0-minigame",label:"Minigame"},starterTemplate:{path:"playground/3-hello-world",label:"Hello world"}};var $=(t,e)=>e.path;function H(t,e){t&1&&O(0)}function U(t,e){if(t&1&&g(0,H,1,0,"ng-container",6),t&2){let i=p();u("ngComponentOutlet",i.embeddedEditorComponent)}}function Y(t,e){if(t&1){let i=w();r(0,"li")(1,"button",8),y("click",function(){let a=h(i).$implicit,o=p(2);return C(o.changeTemplate(a))}),r(2,"span"),c(3),d()()()}if(t&2){let i=e.$implicit;l(3),v(i.label)}}function B(t,e){if(t&1&&(r(0,"ul",7),M(1,Y,4,1,"li",null,$),d()),t&2){let i=p();l(),P(i.templates)}}var st=(()=>{let e=class e{constructor(){this.changeDetectorRef=s(E),this.embeddedTutorialManager=s(N),this.environmentInjector=s(_),this.platformId=s(x),this.templates=m.templates,this.defaultTemplate=m.defaultTemplate,this.starterTemplate=m.starterTemplate,this.selectedTemplate=this.defaultTemplate}async ngAfterViewInit(){if(j(this.platformId)){let[n,a]=await Promise.all([import("./chunk-MRVJAKCO.js").then(o=>o.EmbeddedEditor),q(this.environmentInjector,()=>import("./chunk-MRVJAKCO.js").then(o=>o.NodeRuntimeSandbox))]);this.embeddedEditorComponent=n,this.changeDetectorRef.markForCheck(),await this.loadTemplate(this.defaultTemplate.path),await a.init()}}async newProject(){await this.loadTemplate(this.starterTemplate.path)}async changeTemplate(n){this.selectedTemplate=n,await this.loadTemplate(n.path)}async loadTemplate(n){await this.embeddedTutorialManager.fetchAndSetTutorialFiles(n)}};e.\u0275fac=function(a){return new(a||e)},e.\u0275cmp=b({type:e,selectors:[["adev-playground"]],standalone:!0,features:[T],decls:15,vars:3,consts:[["templatesMenu",""],[1,"adev-playground-header"],["tabindex","-1"],[1,"adev-template-select"],["for","playgroundTemplate"],[3,"cdkMenuTriggerFor"],[4,"ngComponentOutlet"],["cdkMenu","",1,"adev-template-dropdown"],["cdkMenuItem","","type","button",3,"click"]],template:function(a,o){if(a&1&&(r(0,"div",1)(1,"header")(2,"h1",2),c(3,"Angular \u6F14\u7EC3\u573A"),d()(),r(4,"div",3)(5,"label",4),c(6,"\u9009\u62E9\u6A21\u677F"),d(),r(7,"button",5)(8,"span"),c(9),d(),r(10,"docs-icon"),c(11,"expand_more"),d()()()(),g(12,U,1,1,"ng-container")(13,B,3,0,"ng-template",null,0,z)),a&2){let V=k(14);l(7),u("cdkMenuTriggerFor",V),l(2),v(o.selectedTemplate.label),l(3),f(o.embeddedEditorComponent?12:-1)}},dependencies:[I,S,D,R,A,F],styles:["[_nghost-%COMP%]{display:block;padding:var(--layout-padding);padding-block-end:100px;height:100vh;width:100%;box-sizing:border-box}[_nghost-%COMP%] header[_ngcontent-%COMP%]{display:flex;gap:1rem}[_nghost-%COMP%] header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin-block:0}.adev-playground-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:1rem;margin-block:1rem}.adev-template-select[_ngcontent-%COMP%]{margin-block-end:.5rem}.adev-template-select[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:var(--quaternary-contrast);font-size:.875rem;margin-block-end:.3rem;margin-inline-start:.45rem;display:block}.adev-template-select[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{font-size:.875rem;border:1px solid var(--senary-contrast);border-radius:.25rem;width:200px;display:flex;justify-content:space-between;align-items:center;padding-block:.5rem;font-weight:400;transition:border .3s ease}.adev-template-select[_ngcontent-%COMP%] button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--primary-contrast);transition:color .3s ease;margin-inline-start:.1rem}.adev-template-select[_ngcontent-%COMP%] button[_ngcontent-%COMP%] docs-icon[_ngcontent-%COMP%]{font-size:1.3rem;color:var(--quaternary-contrast);transition:color .3s ease}.adev-template-dropdown[_ngcontent-%COMP%]{border:1px solid var(--senary-contrast);border-radius:.25rem;padding:0;transform:translateY(-.7rem)}.adev-template-dropdown[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{list-style:none;width:198px;box-sizing:border-box}.adev-template-dropdown[_ngcontent-%COMP%] li[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background:var(--page-background);font-size:.875rem;width:100%;text-align:left;padding-block:.5rem;color:var(--quaternary-contrast);transition:color .3s ease,background .3s ease;font-weight:400}.adev-template-dropdown[_ngcontent-%COMP%] li[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{background:var(--senary-contrast);color:var(--primary-contrast)}",".adev-tutorial-nav-container[_ngcontent-%COMP%]{position:sticky;top:0;width:100%;background-color:var(--page-background);padding-block-start:var(--layout-padding);padding-block-end:calc(1.5rem + 50px);margin-block-end:1rem;border-block-end:1px solid var(--septenary-contrast);z-index:var(--z-index-nav);transition:background-color .3s ease;container:nav-container/inline-size}@media (max-width: 900px){.adev-tutorial-nav-container[_ngcontent-%COMP%]{top:60px}}@media (max-width: 700px){.adev-tutorial-nav-container[_ngcontent-%COMP%]{top:55px}}@container tutorial-content (max-width: 430px){.adev-tutorial-nav-container[_ngcontent-%COMP%]:has(.docs-reveal-answer-button){padding-block-end:calc(1.5rem + 85px)}}@container page-content (max-width: 430px){.adev-tutorial-nav-container[_ngcontent-%COMP%]:has(.docs-reveal-answer-button){padding-block-end:calc(1.5rem + 85px)}}.adev-tutorial-nav[_ngcontent-%COMP%]{position:absolute;display:flex;justify-content:space-between;align-items:center;gap:.5rem;width:100%;flex-wrap:wrap;z-index:var(--z-index-nav)}.adev-unfold-button[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center;padding-inline:0;border:none;background-color:transparent;cursor:pointer;flex:1;z-index:var(--z-index-nav)}.adev-unfold-button[_ngcontent-%COMP%] docs-icon[_ngcontent-%COMP%]{min-width:1.5rem;color:var(--quinary-contrast);transition:color .2s ease-in-out}.adev-nav-open[_ngcontent-%COMP%] .adev-unfold-button[_ngcontent-%COMP%] docs-icon[_ngcontent-%COMP%], .adev-unfold-button[_ngcontent-%COMP%]:hover docs-icon[_ngcontent-%COMP%]{color:var(--primary-contrast)}.adev-current-tutorial[_ngcontent-%COMP%]{text-align:left;letter-spacing:.00875rem}.adev-current-tutorial[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:first-child{margin-block-end:.2rem;color:var(--quaternary-contrast);display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.adev-current-tutorial[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--primary-contrast);font-weight:500;font-size:.875rem;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.adev-download-button[_ngcontent-%COMP%]{width:2.875rem;height:2.875rem;padding:0}@container nav-container (max-width: 430px){.adev-reveal-desktop-button[_ngcontent-%COMP%]{display:none}}.adev-reveal-mobile-button-container[_ngcontent-%COMP%]{display:flex}@container nav-container (max-width: 430px){.adev-reveal-mobile-button-container[_ngcontent-%COMP%]{width:100%;justify-content:end}}@container nav-container (min-width: 430px){.adev-reveal-mobile-button-container[_ngcontent-%COMP%]{display:none}}.docs-reveal-answer-button[_ngcontent-%COMP%]{height:2.875rem;width:120px}.adev-reset-answer-button[_ngcontent-%COMP%]{background:var(--senary-contrast);transition:opacity .3s ease,background .3s ease}.adev-reset-answer-button[_ngcontent-%COMP%]:hover{background:var(--quinary-contrast)}.adev-reset-answer-button[_ngcontent-%COMP%]:hover:after{opacity:0}.adev-reset-answer-button[_ngcontent-%COMP%]:hover:before{background:var(--octonary-contrast)}.adev-nav-arrows[_ngcontent-%COMP%]{display:flex;gap:.5rem;margin-left:auto}.adev-nav-arrows[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:2.875rem;height:2.875rem;display:flex;justify-content:center;align-items:center}.adev-nav-arrows[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{background:var(--quinary-contrast)}.adev-nav-arrows[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled docs-icon[_ngcontent-%COMP%]{color:var(--quinary-contrast)}.adev-nav-arrows[_ngcontent-%COMP%] button[_ngcontent-%COMP%] docs-icon[_ngcontent-%COMP%]{z-index:var(--z-index-icon);color:var(--primary-contrast)}",'.adev-tutorial-nav-list-dropdown[_ngcontent-%COMP%]{background-color:var(--page-background);border:1px solid var(--senary-contrast);border-radius:.25rem;z-index:var(--z-index-nav);margin-top:1rem;width:100%;box-shadow:10px 4px 40px #0000000d;display:flex;flex-direction:column}@container tutorial-content (max-width: 430px){.adev-tutorial-nav-list-dropdown[_ngcontent-%COMP%]{margin-top:0}}.adev-tutorial-nav-list-dropdown[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{padding-block-end:1rem}.adev-tutorial-nav-list-dropdown[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{position:sticky;display:flex;align-items:center;justify-content:flex-end;color:var(--gray-400);background-color:var(--page-background);border-block-start:1px solid var(--senary-contrast);border-radius:0 0 .25rem .25rem;text-align:right;padding:1rem;font-size:.875rem;transition:color .3s ease}.adev-tutorial-nav-list-dropdown[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:var(--primary-contrast);background-color:var(--octonary-contrast)}.adev-tutorial-nav-list-dropdown[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:after{content:"chevron_right";font-family:var(--icons);font-size:1.3rem;margin-inline-start:.2rem}.adev-nav-list[_ngcontent-%COMP%]{height:max-content;max-height:calc(var(--fixed-content-height) - var(--layout-padding) - 67px);padding-block-start:1rem;padding-block-end:0}@container tutorial-content (max-width: 430px){.adev-nav-list[_ngcontent-%COMP%]{max-height:calc(var(--fixed-content-height) - var(--layout-padding) - 105px)}}@media (max-width: 900px){.adev-nav-list[_ngcontent-%COMP%]{max-height:calc(var(--fixed-content-height) - var(--layout-padding) - 167px)}}.adev-nav-list[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background-color:var(--senary-contrast)}'],changeDetection:0});let t=e;return t})();export{st as default};