1import{a as kn}from"./chunk-HXHIN6LN.js";import{a as ke,b as Rt}from"./chunk-PY24DUCB.js";import{b as Y}from"./chunk-5OZNH4I5.js";import{a as Et}from"./chunk-WGRJ32F5.js";import{a as Dt}from"./chunk-3GWOY3PZ.js";import{a as I}from"./chunk-BBW45UMC.js";import{b as wt}from"./chunk-2VRUALZU.js";import{$ as pt,A as dt,Aa as ht,Ba as Se,Bb as te,Cb as u,Da as gt,Fa as ft,Gb as Oe,Ia as vt,Ja as J,Ka as f,Kb as $e,L as ge,La as v,Lb as Ot,M as w,N as He,Oa as A,P as oe,Pa as T,Pb as Qe,Q as F,Qa as m,R as B,Ra as s,Sa as a,Ta as y,V as C,Vb as kt,W as x,Xa as _t,Ya as S,_a as g,ab as c,bb as yt,ca as R,cb as bt,cc as Pt,dc as Mt,ea as ut,f as at,fa as L,ha as fe,i as st,ib as Ct,kb as P,la as mt,lb as d,mb as h,nb as D,o as lt,oa as l,pa as ve,qa as _,u as ct,ub as ee,wa as V,wb as xt,xa as ze,ya as q,yb as St,za as X}from"./chunk-UDT6HCOH.js";import{a as b,b as M,g as On,h as ot}from"./chunk-WWX6BADO.js";var G=(r=>(r.OpenApi="openapi",r.Sql="sql",r.GraphQL="graphql",r.Protobuf="protobuf",r))(G||{}),ae=(i=>(i.File="file",i.Url="url",i.Content="content",i))(ae||{});var Pn=`openapi: 3.0.3 2info: 3 title: Petstore API 4 version: 1.0.0 5 description: A sample API for managing pets 6servers: 7 - url: https://api.petstore.io/v1 8paths: 9 /pets: 10 get: 11 summary: List all pets 12 operationId: listPets 13 tags: [pets] 14 parameters: 15 - name: limit 16 in: query 17 schema: 18 type: integer 19 format: int32 20 responses: 21 '200': 22 description: A paged array of pets 23 content: 24 application/json: 25 schema: 26 type: array 27 items: 28 $ref: '#/components/schemas/Pet' 29 post: 30 summary: Create a pet 31 operationId: createPet 32 tags: [pets] 33 requestBody: 34 required: true 35 content: 36 application/json: 37 schema: 38 $ref: '#/components/schemas/NewPet' 39 responses: 40 '201': 41 description: Null response 42 /pets/{petId}: 43 get: 44 summary: Info for a specific pet 45 operationId: getPet 46 tags: [pets] 47 parameters: 48 - name: petId 49 in: path 50 required: true 51 schema: 52 type: string 53 responses: 54 '200': 55 description: Expected response 56 content: 57 application/json: 58 schema: 59 $ref: '#/components/schemas/Pet' 60components: 61 schemas: 62 Pet: 63 type: object 64 required: [id, name, status] 65 properties: 66 id: 67 type: integer 68 format: int64 69 name: 70 type: string 71 tag: 72 type: string 73 status: 74 type: string 75 enum: [available, pending, sold] 76 createdAt: 77 type: string 78 format: date-time 79 NewPet: 80 type: object 81 required: [name] 82 properties: 83 name: 84 type: string 85 tag: 86 type: string 87`,Mn=`schema { 88 query: Query 89} 90 91"""A country with basic geographic and cultural metadata.""" 92type Country { 93 code: ID! 94 name: String! 95 capital: String 96 currency: String 97 emoji: String 98 continent: Continent! 99 languages: [Language!]! 100} 101 102"""A continent grouping.""" 103type Continent { 104 code: ID! 105 name: String! 106 countries: [Country!]! 107} 108 109"""A spoken language.""" 110type Language { 111 code: ID! 112 name: String! 113 native: String 114 rtl: Boolean! 115} 116 117type Query { 118 countries: [Country!]! 119 country(code: ID!): Country 120 continents: [Continent!]! 121 continent(code: ID!): Continent 122 languages: [Language!]! 123} 124`,wn=`syntax = "proto3"; 125 126package user.v1; 127 128// A registered user of the platform. 129message User { 130 int64 id = 1; 131 string name = 2; 132 string email = 3; 133 UserStatus status = 4; 134 repeated string roles = 5; 135} 136 137enum UserStatus { 138 USER_STATUS_UNSPECIFIED = 0; 139 USER_STATUS_ACTIVE = 1; 140 USER_STATUS_SUSPENDED = 2; 141 USER_STATUS_DELETED = 3; 142} 143 144message ListUsersRequest { 145 int32 page_size = 1; 146 string page_token = 2; 147} 148 149message ListUsersResponse { 150 repeated User users = 1; 151 string next_page_token = 2; 152} 153 154message GetUserRequest { 155 int64 id = 1; 156} 157 158message CreateUserRequest { 159 string name = 1; 160 string email = 2; 161} 162 163// Manages platform users. 164service UserService { 165 rpc ListUsers(ListUsersRequest) returns (ListUsersResponse); 166 rpc GetUser(GetUserRequest) returns (User); 167 rpc CreateUser(CreateUserRequest) returns (User); 168} 169`,Dn=`CREATE TABLE departments ( 170 id INT PRIMARY KEY, 171 name VARCHAR(100) NOT NULL, 172 location VARCHAR(200) 173); 174 175CREATE TABLE employees ( 176 id INT PRIMARY KEY, 177 first_name VARCHAR(50) NOT NULL, 178 last_name VARCHAR(50) NOT NULL, 179 email VARCHAR(150) UNIQUE NOT NULL, 180 hire_date DATE NOT NULL, 181 salary DECIMAL(10, 2), 182 department_id INT NOT NULL, 183 FOREIGN KEY (department_id) REFERENCES departments(id) 184); 185 186CREATE TABLE projects ( 187 id INT PRIMARY KEY, 188 name VARCHAR(100) NOT NULL, 189 description TEXT, 190 start_date DATE, 191 end_date DATE, 192 budget DECIMAL(12, 2), 193 department_id INT NOT NULL, 194 FOREIGN KEY (department_id) REFERENCES departments(id) 195); 196 197CREATE TABLE project_assignments ( 198 id INT PRIMARY KEY, 199 employee_id INT NOT NULL, 200 project_id INT NOT NULL, 201 role VARCHAR(50) NOT NULL, 202 assigned_date DATE NOT NULL, 203 FOREIGN KEY (employee_id) REFERENCES employees(id), 204 FOREIGN KEY (project_id) REFERENCES projects(id) 205); 206`,ne={openapi:{fileName:"petstore.yaml",content:Pn,selectedConverter:"angular",converterOptions:{providedIn:"root",baseUrlToken:"BASE_URL",useHttpResources:!0,documentation:!0}},graphql:{fileName:"countries.graphql",content:Mn,selectedConverter:"angular",converterOptions:{providedIn:"root",baseUrlToken:"BASE_URL",documentation:!0}},protobuf:{fileName:"user-service.proto",content:wn,selectedConverter:"angular",converterOptions:{providedIn:"root",baseUrlToken:"BASE_URL"}},sql:{fileName:"employees.sql",content:Dn,selectedConverter:"csharp",converterOptions:{namespace:"MyApp.Models",generateNavigationProperties:!0,initializeProperties:!0}}},Rn=new Set(Object.values(ne).map(n=>n.content));function Vt(n){return!n||!n.trim()?!0:Rn.has(n)}var Bt=(()=>{class n{_renderer;_elementRef;onChange=t=>{};onTouched=()=>{};constructor(t,i){this._renderer=t,this._elementRef=i}setProperty(t,i){this._renderer.setProperty(this._elementRef.nativeElement,t,i)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static \u0275fac=function(i){return new(i||n)(_(ve),_(fe))};static \u0275dir=q({type:n})}return n})(),Ze=(()=>{class n extends Bt{static \u0275fac=(()=>{let t;return function(r){return(t||(t=L(n)))(r||n)}})();static \u0275dir=q({type:n,features:[X]})}return n})(),Re=new oe("");var En={provide:Re,useExisting:ge(()=>Ee),multi:!0};function Vn(){let n=Qe()?Qe().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var An=new oe(""),Ee=(()=>{class n extends Bt{_compositionMode;_composing=!1;constructor(t,i,r){super(t,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!Vn())}writeValue(t){let i=t??"";this.setProperty("value",i)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}
vendor: 15,375 bytes, line 206
206_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}static \u0275fac=function(i){return new(i||n)(_(ve),_(fe),_(An,8))};static \u0275dir=q({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&g("input",function(p){return r._handleInput(p.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(p){return r._compositionEnd(p.target.value)})},standalone:!1,features:[ee([En]),X]})}return n})();var Tn=new oe(""),In=new oe("");function qt(n){return n!=null}function jt(n){return ft(n)?st(n):n}function Ht(n){let e={};return n.forEach(t=>{e=t!=null?b(b({},e),t):e}),Object.keys(e).length===0?null:e}function zt(n,e){return e.map(t=>t(n))}function Nn(n){return!n.validate}function $t(n){return n.map(e=>Nn(e)?e:t=>e.validate(t))}function Fn(n){if(!n)return null;let e=n.filter(qt);return e.length==0?null:function(t){return Ht(zt(t,e))}}function Qt(n){return n!=null?Fn($t(n)):null}function Ln(n){if(!n)return null;let e=n.filter(qt);return e.length==0?null:function(t){let i=zt(t,e).map(jt);return ct(i).pipe(lt(Ht))}}function Kt(n){return n!=null?Ln($t(n)):null}function At(n,e){return n===null?[e]:Array.isArray(n)?[...n,e]:[n,e]}function Gn(n){return n._rawValidators}function Un(n){return n._rawAsyncValidators}function Ke(n){return n?Array.isArray(n)?n:[n]:[]}function Me(n,e){return Array.isArray(n)?n.includes(e):n===e}function Tt(n,e){let t=Ke(e);return Ke(n).forEach(r=>{Me(t,r)||t.push(r)}),t}function It(n,e){return Ke(e).filter(t=>!Me(n,t))}var we=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=Qt(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=Kt(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control&&this.control.reset(e)}hasError(e,t){return this.control?this.control.hasError(e,t):!1}getError(e,t){return this.control?this.control.getError(e,t):null}},We=class extends we{name;get formDirective(){return null}get path(){return null}},xe=class extends we{_parent=null;name=null;valueAccessor=null},Je=class{_cd;constructor(e){this._cd=e}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},Bn={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},Ca=M(b({},Bn),{"[class.ng-submitted]":"isSubmitted"}),Wt=(()=>{class n extends Je{constructor(t){super(t)}static \u0275fac=function(i){return new(i||n)(_(xe,2))};static \u0275dir=q({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&P("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[X]})}return n})();var _e="VALID",Pe="INVALID",se="PENDING",ye="DISABLED",ce=class{},De=class extends ce{value;source;constructor(e,t){super(),this.value=e,this.source=t}},be=class extends ce{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},Ce=class extends ce{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},le=class extends ce{status;source;constructor(e,t){super(),this.status=e,this.source=t}};function qn(n){return(Ve(n)?n.validators:n)||null}function jn(n){return Array.isArray(n)?Qt(n):n||null}function Hn(n,e){return(Ve(e)?e.asyncValidators:n)||null}function zn(n){return Array.isArray(n)?Kt(n):n||null}function Ve(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}var Ye=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,t){this._assignValidators(e),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return te(this.statusReactive)}set status(e){te(()=>this.statusReactive.set(e))}_status=u(()=>this.statusReactive());statusReactive=R(void 0);get valid(){return this.status===_e}get invalid(){return this.status===Pe}get pending(){return this.status==se}get disabled(){return this.status===ye}get enabled(){return this.status!==ye}errors;get pristine(){return te(this.pristineReactive)}set pristine(e){te(()=>this.pristineReactive.set(e))}_pristine=u(()=>this.pristineReactive());pristineReactive=R(!0);get dirty(){return!this.pristine}get touched(){return te(this.touchedReactive)}set touched(e){te(()=>this.touchedReactive.set(e))}_touched=u(()=>this.touchedReactive());touchedReactive=R(!1);get untouched(){return!this.touched}_events=new at;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(Tt(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(Tt(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(It(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(It(e,this._rawAsyncValidators))}hasValidator(e){return Me(this._rawValidators,e)}hasAsyncValidator(e){return Me(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let t=this.touched===!1;this.touched=!0;let i=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsTouched(M(b({},e),{sourceControl:i})),t&&e.emitEvent!==!1&&this._events.next(new Ce(!0,i))}markAllAsDirty(e={}){this.markAsDirty({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsDirty(e))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(e))}markAsUntouched(e={}){let t=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=e.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:i})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,i),t&&e.emitEvent!==!1&&this._events.next(new Ce(!1,i))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let i=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsDirty(M(b({},e),{sourceControl:i})),t&&e.emitEvent!==!1&&this._events.next(new be(!1,i))}markAsPristine(e={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=e.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e,i),t&&e.emitEvent!==!1&&this._events.next(new be(!0,i))}markAsPending(e={}){this.status=se;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new le(this.status,t)),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.markAsPending(M(b({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=ye,this.errors=null,this._forEachChild(r=>{r.disable(M(b({},e),{onlySelf:!0}))}),this._updateValue();let i=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new De(this.value,i)),this._events.next(new le(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(M(b({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=_e,this._forEachChild(i=>{i.enable(M(b({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(M(b({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(e,t){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine({},t),this._parent._updateTouched({},t))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===_e||this.status===se)&&this._runAsyncValidator(i,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new De(this.value,t)),this._events.next(new le(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(M(b({},e),{sourceControl:t}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?ye:_e}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=se,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let i=jt(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:t,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(t.emitEvent!==!1,this,t.shouldHaveEmitted)}get(e){let t=e;return t==null||(Array.isArray(t)||(t=t.split(".")),t.length===0)?null:t.reduce((i,r)=>i&&i._find(r),this)}getError(e,t){let i=t?this.get(t):this;return i&&i.errors?i.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,t,i){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||i)&&this._events.next(new le(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,i)}_initObservables(){this.valueChanges=new Se,this.statusChanges=new Se}_calculateStatus(){return this._allControlsDisabled()?ye:this.errors?Pe:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(se)?se:this._anyControlsHaveStatus(Pe)?Pe:_e}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,t){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,this._parent&&!e.onlySelf&&this._parent._updatePristine(e,t),r&&this._events.next(new be(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new Ce(this.touched,t)),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){Ve(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){let t=this._parent&&this._parent.dirty;return!e&&!!t&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=jn(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=zn(this._rawAsyncValidators)}};var Jt=new oe("",{providedIn:"root",factory:()=>Xe}),Xe="always";function $n(n,e){return[...e.path,n]}function Qn(n,e,t=Xe){Wn(n,e),e.valueAccessor.writeValue(n.value),(n.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(n.disabled),Jn(n,e),Zn(n,e),Yn(n,e),Kn(n,e)}function Nt(n,e){n.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function Kn(n,e){if(e.valueAccessor.setDisabledState){let t=i=>{e.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(t),e._registerOnDestroy(()=>{n._unregisterOnDisabledChange(t)})}}function Wn(n,e){let t=Gn(n);e.validator!==null?n.setValidators(At(t,e.validator)):typeof t=="function"&&n.setValidators([t]);let i=Un(n);e.asyncValidator!==null?n.setAsyncValidators(At(i,e.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();Nt(e._rawValidators,r),Nt(e._rawAsyncValidators,r)}function Jn(n,e){e.valueAccessor.registerOnChange(t=>{n._pendingValue=t,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&Yt(n,e)})}function Yn(n,e){e.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&Yt(n,e),n.updateOn!=="submit"&&n.markAsTouched()})}function Yt(n,e){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function Zn(n,e){let t=(i,r)=>{e.valueAccessor.writeValue(i),r&&e.viewToModelUpdate(i)};n.registerOnChange(t),e._registerOnDestroy(()=>{n._unregisterOnChange(t)}
vendor: 9,183 bytes, line 206
206)}function Xn(n,e){if(!n.hasOwnProperty("model"))return!1;let t=n.model;return t.isFirstChange()?!0:!Object.is(e,t.currentValue)}function ei(n){return Object.getPrototypeOf(n.constructor)===Ze}function ti(n,e){if(!e)return null;Array.isArray(e);let t,i,r;return e.forEach(o=>{o.constructor===Ee?t=o:ei(o)?i=o:r=o}),r||i||t||null}function Ft(n,e){let t=n.indexOf(e);t>-1&&n.splice(t,1)}function Lt(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var ni=class extends Ye{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,t,i){super(qn(t),Hn(i,t)),this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Ve(t)&&(t.nonNullable||t.initialValueIsDefault)&&(Lt(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&t.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,t.emitViewToModelChange!==!1)),this.updateValueAndValidity(t)}patchValue(e,t={}){this.setValue(e,t)}reset(e=this.defaultValue,t={}){this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){Ft(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){Ft(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(e){Lt(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};var ii={provide:xe,useExisting:ge(()=>et)},Gt=Promise.resolve(),et=(()=>{class n extends xe{_changeDetectorRef;callSetDisabledState;control=new ni;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new Se;constructor(t,i,r,o,p,O){super(),this._changeDetectorRef=p,this.callSetDisabledState=O,this._parent=t,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=ti(this,o)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){let i=t.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),Xn(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){Qn(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(t){Gt.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let i=t.isDisabled.currentValue,r=i!==0&&Ot(i);Gt.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?$n(t,this._parent):[t]}static \u0275fac=function(i){return new(i||n)(_(We,9),_(Tn,10),_(In,10),_(Re,10),_($e,8),_(Jt,8))};static \u0275dir=q({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[ee([ii]),X,ut]})}return n})();var ri={provide:Re,useExisting:ge(()=>Xt),multi:!0};function Zt(n,e){return n==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${n}: ${e}`.slice(0,50))}function oi(n){return n.split(":")[0]}var Xt=(()=>{class n extends Ze{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;appRefInjector=B(vt).injector;destroyRef=B(pt);cdr=B($e);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,gt({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(t){this.cdr.markForCheck(),this.value=t;let i=this._getOptionId(t),r=Zt(i,t);this.setProperty("value",r)}registerOnChange(t){this.onChange=i=>{this.value=this._getOptionValue(i),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i),t))return i;return null}_getOptionValue(t){let i=oi(t);return this._optionMap.has(i)?this._optionMap.get(i):t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=L(n)))(r||n)}})();static \u0275dir=q({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(i,r){i&1&&g("change",function(p){return r.onChange(p.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[ee([ri]),X]})}return n})(),en=(()=>{class n{_element;_renderer;_select;id;constructor(t,i,r){this._element=t,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(t){this._select!=null&&(this._select._optionMap.set(this.id,t),this._setElementValue(Zt(this.id,t)),this._select._writeValueAfterRender())}set value(t){this._setElementValue(t),this._select&&this._select._writeValueAfterRender()}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select._writeValueAfterRender())}static \u0275fac=function(i){return new(i||n)(_(fe),_(ve),_(Xt,9))};static \u0275dir=q({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})(),ai={provide:Re,useExisting:ge(()=>tn),multi:!0};function Ut(n,e){return n==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${n}: ${e}`.slice(0,50))}function si(n){return n.split(":")[0]}var tn=(()=>{class n extends Ze{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;writeValue(t){this.value=t;let i;if(Array.isArray(t)){let r=t.map(o=>this._getOptionId(o));i=(o,p)=>{o._setSelected(r.indexOf(p.toString())>-1)}}else i=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(t){this.onChange=i=>{let r=[],o=i.selectedOptions;if(o!==void 0){let p=o;for(let O=0;O<p.length;O++){let k=p[O],he=this._getOptionValue(k.value);r.push(he)}}else{let p=i.options;for(let O=0;O<p.length;O++){let k=p[O];if(k.selected){let he=this._getOptionValue(k.value);r.push(he)}}}this.value=r,t(r)}}_registerOption(t){let i=(this._idCounter++).toString();return this._optionMap.set(i,t),i}_getOptionId(t){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i)._value,t))return i;return null}_getOptionValue(t){let i=si(t);return this._optionMap.has(i)?this._optionMap.get(i)._value:t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=L(n)))(r||n)}})();static \u0275dir=q({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(i,r){i&1&&g("change",function(p){return r.onChange(p.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[ee([ai]),X]})}return n})(),nn=(()=>{class n{_element;_renderer;_select;id;_value;constructor(t,i,r){this._element=t,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){this._select!=null&&(this._value=t,this._setElementValue(Ut(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(Ut(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id
206),this._select.writeValue(this._select.value))}static \u0275fac=function(i){return new(i||n)(_(fe),_(ve),_(tn,9))};static \u0275dir=q({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})();var li=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=ze({type:n});static \u0275inj=He({})}return n})();var Ae=(()=>{class n{static withConfig(t){return{ngModule:n,providers:[{provide:Jt,useValue:t.callSetDisabledState??Xe}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=ze({type:n});static \u0275inj=He({imports:[li]})}return n})();var ci={openapi:"OpenAPI",sql:"SQL",graphql:"GraphQL",protobuf:"Protobuf"};function tt(){return globalThis.crypto?.randomUUID?.()??`src-${Math.random().toString(36).slice(2,10)}-${Date.now().toString(36)}`}function di(n){let e=ne[n];return{id:tt(),sourceType:n,inputMethod:"content",label:e.fileName,fileName:e.fileName,content:e.content,createdAt:new Date,selectedConverter:e.selectedConverter,converterOptions:b({},e.converterOptions)}}var N=class n{_seed=di("openapi");_sources=R([this._seed]);_selectedSourceId=R(this._seed.id);_selectedFileIndex=R(0);_isLoading=R(!1);_error=R(null);sources=this._sources.asReadonly();selectedSourceId=this._selectedSourceId.asReadonly();selectedFileIndex=this._selectedFileIndex.asReadonly();isLoading=this._isLoading.asReadonly();error=this._error.asReadonly();selectedSource=u(()=>{let e=this._selectedSourceId();return this._sources().find(t=>t.id===e)??null});selectedResult=u(()=>this.selectedSource()?.result??null);selectedFile=u(()=>{let e=this.selectedResult();return e?e.files[this._selectedFileIndex()]??null:null});hasResults=u(()=>{let e=this.selectedResult();return e!=null&&e.files.length>0});hasSources=u(()=>this._sources().length>0);sourceCounter={openapi:1,sql:0,graphql:0,protobuf:0};addSource(e){this.sourceCounter[e.sourceType]++;let t=this.sourceCounter[e.sourceType],i=ci[e.sourceType],r=e.fileName||`${i} #${t}`,o={id:tt(),sourceType:e.sourceType,inputMethod:e.inputMethod,label:r,fileName:e.fileName,url:e.url,content:e.content,createdAt:new Date,converterOptions:{}};this._sources.update(p=>[...p,o]),this._selectedSourceId.set(o.id),this._selectedFileIndex.set(0),this._error.set(null)}removeSource(e){if(this._sources.update(t=>t.filter(i=>i.id!==e)),this._selectedSourceId()===e){let t=this._sources();this._selectedSourceId.set(t.length>0?t[0].id:null),this._selectedFileIndex.set(0)}}selectSource(e){this._selectedSourceId.set(e),this._selectedFileIndex.set(0)}updateSelectedSource(e){let t=this._selectedSourceId();t&&this._sources.update(i=>i.map(r=>r.id===t?b(b({},r),e):r))}reseedWith(e){let t=ne[e.sourceType],i={id:tt(),sourceType:e.sourceType,inputMethod:"content",label:t.fileName,fileName:t.fileName,content:t.content,createdAt:new Date,selectedConverter:e.selectedConverter,converterOptions:b({},e.converterOptions)};this._sources.set([i]),this._selectedSourceId.set(i.id),this._selectedFileIndex.set(0),this._error.set(null)}changeSourceType(e){let t=this.selectedSource();if(!t||t.sourceType===e)return;let i=ne[e],r=t.inputMethod==="content"&&!Vt(t.content),o=t.inputMethod==="file"&&!!t.content?.trim(),p=r||o,O=e==="openapi"?t.inputMethod:t.inputMethod==="url"?"content":t.inputMethod,k={sourceType:e,inputMethod:O,selectedConverter:i.selectedConverter,converterOptions:b({},i.converterOptions),result:void 0};p||(k.content=i.content,k.fileName=i.fileName,k.label=i.fileName,k.url=void 0),this.updateSelectedSource(k)}selectFile(e){this._selectedFileIndex.set(e)}setLoading(e){this._isLoading.set(e)}setError(e){this._error.set(e)}setResult(e,t){let i=this.selectedFile();if(this._sources.update(r=>r.map(o=>o.id===e?M(b({},o),{result:t}):o)),i&&t.files.length>0){let r=t.files.findIndex(o=>o.name===i.name&&o.path===i.path);this._selectedFileIndex.set(r>=0?r:0)}else this._selectedFileIndex.set(0)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=w({token:n,factory:n.\u0275fac,providedIn:"root"})};var pi=["*"];function ui(n,e){if(n&1&&y(0,"app-icon",1),n&2){let t=c();m("name",t.icon)("size",13)}}function mi(n,e){if(n&1&&(s(0,"span",4),d(1),a()),n&2){let t=c();l(),h(t.subtitle)}}var j=class n{title;subtitle;icon;static \u0275fac=function(t){return new(t||n)};static \u0275cmp=V({type:n,selectors:[["app-panel-header"]],inputs:{title:"title",subt
206itle:"subtitle",icon:"icon"},ngContentSelectors:pi,decls:8,vars:3,consts:[[1,"ph"],[3,"name","size"],[1,"ph__titles"],[1,"ph__title"],[1,"ph__sub","mono"],[1,"ph__right"]],template:function(t,i){t&1&&(yt(),s(0,"div",0),f(1,ui,1,2,"app-icon",1),s(2,"div",2)(3,"span",3),d(4),a(),f(5,mi,2,1,"span",4),a(),s(6,"div",5),bt(7),a()()),t&2&&(l(),v(i.icon?1:-1),l(3),h(i.title),l(),v(i.subtitle?5:-1))},dependencies:[I],styles:[".ph[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;height:40px;padding:0 14px;border-bottom:1px solid var(--line-1);flex-shrink:0;color:var(--ink-1)}.ph__titles[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;align-items:baseline;gap:8px;overflow:hidden}.ph__title[_ngcontent-%COMP%]{font-size:var(--t-md);font-weight:500;letter-spacing:-.01em;color:var(--ink-0);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ph__sub[_ngcontent-%COMP%]{font-family:var(--font-mono);font-size:10.5px;color:var(--ink-3);white-space:nowrap}.ph__right[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px}"]})};var it=(n,e)=>e.id;function hi(n,e){if(n&1){let t=S();s(0,"button",14),g("click",function(r){C(t);let o=c().$implicit,p=c(2);return x(p.remove(o,r))}),y(1,"app-icon",15),a()}n&2&&(l(),m("size",10))}function gi(n,e){if(n&1){let t=S();s(0,"div",7),g("click",function(){let r=C(t).$implicit,o=c(2);return x(o.select(r))}),s(1,"div",8)(2,"div",9)(3,"span",10),d(4),a(),s(5,"span",11),d(6),a()(),s(7,"div",12),d(8),a()(),f(9,hi,2,1,"button",13),a()}if(n&2){let t=e.$implicit,i=c(2),r=i.selectedSourceId()===t.id;P("is-active",r),l(3),P("is-active",r),l(),h(i.shortForType(t.sourceType)),l(2),h(i.labelFor(t)),l(2),h(i.statsFor(t)),l(),v(i.sources().length>1?9:-1)}}function fi(n,e){if(n&1&&(s(0,"div",4),A(1,gi,10,8,"div",6,it),a()),n&2){let t=c();l(),T(t.sources())}}function vi(n,e){if(n&1){let t=S();s(0,"button",26),g("click",function(){let r=C(t).$implicit,o=c(2);return x(o.onSourceTypeChange(r.id))}),d(1),a()}if(n&2){let t=e.$implicit,i=c();P("is-active",t.id===i.sourceType),l(),D(" ",t.label," ")}}function _i(n,e){if(n&1){let t=S();s(0,"button",27),g("click",function(){let r=C(t).$implicit,o=c(2);return x(o.onInputMethodChange(r.id))}),d(1),a()}if(n&2){let t=e.$implicit,i=c();P("is-active",t.id===i.inputMethod),l(),D(" ",t.label," ")}}function yi(n,e){if(n&1){let t=S();s(0,"textarea",28),g("ngModelChange",function(r){C(t);let o=c(2);return x(o.onContentInput(r))}),a()}if(n&2){let t=c(),i=c();m("placeholder",i.contentPlaceholder())("ngModel",t.content??"")}}function bi(n,e){if(n&1){let t=S();s(0,"input",29),g("ngModelChange",function(r){C(t);let o=c(2);return x(o.onUrlInput(r))}),a(),s(1,"div",30),d(2,"Remote URL is fetched on each generation."),a()}if(n&2){let t=c();m("ngModel",t.url??"")}}function Ci(n,e){if(n&1&&(s(0,"div",35),d(1),a()),n&2){let t=c(2);l(),h(t.fileName)}}function xi(n,e){if(n&1){let t=S();s(0,"label",24),y(1,"app-icon",31),s(2,"div",32),d(3," Drop "),s(4,"span",33),d(5),a()(),s(6,"div",34),d(7,"or click to browse"),a(),f(8,Ci,2,1,"div",35),s(9,"input",36),g("change",function(r){C(t);let o=c(2);return x(o.onFileSelected(r))}),a()()}if(n&2){let t=c(),i=c();l(),m("size",18),l(4),h(i.fileAccept()),l(3),v(t.fileName?8:-1),l(),m("accept",i.fileAccept())}}function Si(n,e){n&1&&(s(0,"div",25),y(1,"app-icon",37),d(2),a()),n&2&&(l(),m("size",11),l(),D(" ",e," "))}function Oi(n,e){if(n&1&&(s(0,"div",16)(1,"div",17),d(2,"Format"),a(),s(3,"div",18),A(4,vi,2,3,"button",19,it),a()(),s(6,"div",16)(7,"div",17),d(8,"Input"),a(),s(9,"div",20),A(10,_i,2,3,"button",21,it),a()(),s(12,"div",22),f(13,yi,1,2,"textarea",23)(14,bi,3,1)(15,xi,10,4,"label",24),f(16,Si,3,2,"div",25),a()),n&2){let t,i,r=c();l(4),T(r.sourceTypes),l(6),T(r.availableInputModes()),l(3),v((t=e.inputMethod)===r.SourceInputMethod.Content?13:t===r.SourceInputMethod.Url?14:t===r.SourceInputMethod.File?15:-1),l(3),v((i=r.validationHint())?16:-1,i)}}function ki(n,e){n&1&&(s(0,"div",5)(1,"div",38),d(2,"No sources yet"),a(),s(3,"div",39),d(4,"Click "),s(5,"span",40),d(6,"+"),a(),d(7," to add one."),a()())}var on=[{id:"openapi",label:"OpenAPI",short:"OAS"},{id:"graphql",label:"GraphQL",short:"GQL"},{id:"protobuf",label:"Protobuf",short:"PROTO"},{id:"sql",label:"SQL DDL",short:"SQL"}],Te=[{id:"content",label:"Paste"},{id:"url",label:"URL"},{id:"file",label:"File"}],Ie=class n{stateService=B(N);sources=this.stateService.sources;selectedSourceId=this.stateService.selectedSourceId;selectedSource=this.stateService.selectedSource;sourceTypes=on;inputModes=Te;
206SourceInputMethod=ae;sourcesCount=u(()=>`${this.sources().length}`);availableInputModes=u(()=>{let e=this.selectedSource();return e?e.sourceType==="openapi"?Te:Te.filter(t=>t.id!=="url"):Te});contentPlaceholder=u(()=>{let e=this.selectedSource()?.sourceType??"openapi";return{openapi:"Paste OpenAPI spec (YAML or JSON)\u2026",sql:"Paste SQL DDL (CREATE / ALTER statements)\u2026",graphql:"Paste GraphQL SDL schema\u2026",protobuf:"Paste Protocol Buffers (.proto) definition\u2026"}[e]});fileAccept=u(()=>{let e=this.selectedSource()?.sourceType??"openapi";return{openapi:".yaml,.yml,.json",sql:".sql,.ddl",graphql:".graphql,.gql",protobuf:".proto"}[e]});validationHint=u(()=>{let e=this.selectedSource();if(!e)return null;let t=e.inputMethod==="file"||e.inputMethod==="content"?e.content??"":"";return!t.trim()||this.isValidContent(e.sourceType,t)?null:{openapi:"Expected JSON or YAML OpenAPI spec.",sql:"Expected CREATE / ALTER / DROP statements.",graphql:"Expected GraphQL SDL (type / schema / query \u2026).",protobuf:"Expected Proto3 syntax (message / service \u2026)."}[e.sourceType]});shortForType(e){return on.find(t=>t.id===e)?.short??e.toUpperCase()}addNewSource(){this.stateService.addSource({sourceType:"openapi",inputMethod:"content",content:""})}select(e){this.stateService.selectSource(e.id)}remove(e,t){t.stopPropagation(),this.stateService.removeSource(e.id)}onSourceTypeChange(e){this.stateService.changeSourceType(e)}onInputMethodChange(e){this.stateService.updateSelectedSource({inputMethod:e})}onContentInput(e){this.stateService.updateSelectedSource({content:e})}onUrlInput(e){this.stateService.updateSelectedSource({url:e})}onFileSelected(e){let t=e.target;if(!t.files?.length)return;let i=t.files[0],r=new FileReader;r.onload=()=>{this.stateService.updateSelectedSource({fileName:i.name,content:r.result})},r.readAsText(i)}statsFor(e){let t=e.content??"";return e.inputMethod==="url"?e.url?"remote url":"no url":t.trim()?`${t.split(` 207`).length} lines`:"empty"}labelFor(e){return e.fileName?e.fileName:e.inputMethod==="url"&&e.url?e.url:e.label}isValidContent(e,t){let i=t.trim();if(!i)return!1;if(e==="openapi"){if(i.startsWith("{"))try{return JSON.parse(i),!0}catch{return!1}return/^(openapi|swagger)\s*:/m.test(i)}return e==="sql"?/\b(CREATE|ALTER|DROP)\b/i.test(i):e==="graphql"?/\b(type|schema|query|mutation|subscription|input|enum|interface|union|scalar)\b/i.test(i):e==="protobuf"?/\b(syntax|message|service|enum|package)\b/.test(i):!1}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=V({type:n,selectors:[["app-source-panel"]],decls:7,vars:4,consts:[["icon","layers","title","Sources",3,"subtitle"],["type","button","title","Add source","aria-label","Add source",1,"add-btn",3,"click"],["name","plus",3,"size"],[1,"panel-body"],[1,"src-list"],[1,"empty-state"],[1,"src-card",3,"is-active"],[1,"src-card",3,"click"],[1,"src-card__main"],[1,"src-card__row"],[1,"src-card__type","mono"],[1,"src-card__label"],[1,"src-card__stats","mono"],["type","button","title","Remove","aria-label","Remove source",1,"src-card__remove"],["type","button","title","Remove","aria-label","Remove source",1,"src-card__remove",3,"click"],["name","x",3,"size"],[1,"section"],[1,"caps","section__label"],[1,"format-grid"],["type","button",1,"format-chip",3,"is-active"],[1,"mode-row"],["type","button",1,"mode-chip",3,"is-active"],[1,"section","section--editor"],["spellcheck","false",1,"src-textarea","mono",3,"placeholder","ngModel"],[1,"src-dropzone"],[1,"src-validation","mono"],["type","button",1,"format-chip",3,"click"],["type","button",1,"mode-chip",3,"click"],["spellcheck","false",1,"src-textarea","mono",3,"ngModelChange","placeholder","ngModel"],["type","url","placeholder","https://api.example.com/openapi.yaml",1,"src-input","mono",3,"ngModelChange","ngModel"],[1,"src-hint","mono"],["name","file",3,"size"],[1,"src-dropzone__primary"],[1,"mono","accent"],[1,"src-dropzone__secondary","mono"],[1,"src-dropzone__filename","mono"],["type","file",1,"src-dropzone__input",3,"change","accept"],["name","info",3,"size"],[1,"empty-state__title"],[1,"empty-state__sub"],[1,"mono"]],template:function(t,i){if(t&1&&(s(0,"app-panel-header",0)(1,"button",1),g("click",function(){return i.addNewSource()}),y(2,"app-icon",2),a()(),s(3,"div",3),f(4,fi,3,0,"div",4),f(5,Oi,17,2)(6,ki,8,0,"div",5),a()),t&2){let r;m("subtitle",i.sourcesCount()),l(2),m("size",11),l(2),v(i.sources().length>0?4:-1),l(),v((r=i.selectedSource())?5:6,r)}},dependencies:[Ae,Ee,Wt,et,j,I],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;min-height:0;background:var(--bg-1)}.add-btn[_ngcontent-%COMP%]{width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;background:var(--bg-2);border:1px solid var(--line-2);border-radius:var(--r-1);color:var(--ink-1);cursor:pointer;transition:all .12s ease}.add-btn[_ngcontent-%COMP%]:hover{background:var(--bg-3);color:var(--ink-0)}.panel-body[_ngcontent-%COMP%]{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column}.src-list[_ngcontent-%COMP%]{padding:var(--s-4);border-bottom:1px solid var(--line-1);display:flex;flex-direction:column;gap:4px;flex-shrink:0}.src-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;padding:7px 9px;background:transparent;border:1px solid var(--line-1);border-left:2px solid transparent;border-radius:var(--r-2);cursor:pointer;transition:all .12s ease}.src-card[_ngcontent-%COMP%]:hover{background:var(--bg-2)}.src-card.is-active[_ngcontent-%COMP%]{background:var(--bg-2);border-color:var(--accent-line);border-left-color:var(--accent)}.src-card.is-active[_ngcontent-%COMP%] .src-card__type[_ngcontent-%COMP%]{color:var(--accent)}.src-card__main[_ngcontent-%COMP%]{flex:1;min-width:0}.src-card__row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px}.src-card__type[_ngcontent-%COMP%]{font-size:9.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-3);white-space:nowrap}.src-card__label[_ngcontent-%COMP%]{font-size:var(--t-sm);color:var(--ink-0);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.src-card__stats[_ngcontent-%COMP%]{font-size:10px;color:var(--ink-3);margin-top:1px}.src-card__remove[_ngcontent-%COMP%]{width:18px;height:18px;display:inline-flex;align-items:center;justify-content:center;color:var(--ink-3);border-radius:var(--r-1);
207cursor:pointer}.src-card__remove[_ngcontent-%COMP%]:hover{background:var(--bg-3);color:var(--ink-0)}.section[_ngcontent-%COMP%]{padding:var(--s-4);border-bottom:1px solid var(--line-1);flex-shrink:0}.section--editor[_ngcontent-%COMP%]{flex:1;border-bottom:0;min-height:0;display:flex;flex-direction:column;gap:8px}.section__label[_ngcontent-%COMP%]{color:var(--ink-3);margin-bottom:8px}.format-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);gap:4px}.format-chip[_ngcontent-%COMP%]{height:28px;font-size:var(--t-sm);background:var(--bg-2);color:var(--ink-1);border:1px solid var(--line-1);border-radius:var(--r-2);cursor:pointer;transition:all .12s ease}.format-chip[_ngcontent-%COMP%]:hover{background:var(--bg-3);color:var(--ink-0)}.format-chip.is-active[_ngcontent-%COMP%]{background:var(--accent-dim);color:var(--accent);border-color:var(--accent-line)}.mode-row[_ngcontent-%COMP%]{display:flex;gap:4px}.mode-chip[_ngcontent-%COMP%]{padding:5px 10px;font-size:var(--t-sm);background:transparent;color:var(--ink-2);border:1px solid transparent;border-radius:var(--r-2);cursor:pointer}.mode-chip[_ngcontent-%COMP%]:hover{color:var(--ink-0);background:var(--bg-2)}.mode-chip.is-active[_ngcontent-%COMP%]{background:var(--bg-3);color:var(--ink-0);border-color:var(--line-2)}.src-textarea[_ngcontent-%COMP%]{width:100%;flex:1;min-height:180px;padding:10px;background:var(--bg-0);border:1px solid var(--line-2);border-radius:var(--r-2);color:var(--ink-1);font-size:11.5px;line-height:1.55;resize:none;outline:none}.src-textarea[_ngcontent-%COMP%]:focus{border-color:var(--accent)}.src-input[_ngcontent-%COMP%]{height:32px;padding:0 10px;background:var(--bg-0);border:1px solid var(--line-2);border-radius:var(--r-2);color:var(--ink-1);font-size:11.5px;outline:none}.src-input[_ngcontent-%COMP%]:focus{border-color:var(--accent)}.src-hint[_ngcontent-%COMP%]{font-size:10px;color:var(--ink-3);line-height:1.5}.src-dropzone[_ngcontent-%COMP%]{flex:1;min-height:140px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background:var(--bg-0);border:1px dashed var(--line-2);border-radius:var(--r-2);padding:16px;text-align:center;cursor:pointer;color:var(--ink-2)}.src-dropzone[_ngcontent-%COMP%]:hover{border-color:var(--line-3)}.src-dropzone__primary[_ngcontent-%COMP%]{font-size:var(--t-sm);color:var(--ink-1)}.src-dropzone__secondary[_ngcontent-%COMP%]{font-size:10px;color:var(--ink-3)}.src-dropzone__filename[_ngcontent-%COMP%]{font-size:10.5px;color:var(--ink-0);margin-top:6px}.src-dropzone__input[_ngcontent-%COMP%]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}.src-validation[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;font-size:10.5px;color:var(--warn)}.empty-state[_ngcontent-%COMP%]{padding:40px 20px;text-align:center;color:var(--ink-3)}.empty-state__title[_ngcontent-%COMP%]{font-family:var(--font-display);font-size:var(--t-lg);color:var(--ink-1);margin-bottom:6px}.empty-state__sub[_ngcontent-%COMP%]{font-size:var(--t-sm)}.accent[_ngcontent-%COMP%]{color:var(--accent)}"]})};var sn=On(kn());var Z=(k=>(k.Boolean="boolean",k.String="string",k.Number="number",k.Select="select",k.ButtonGroup="button-group",k.StringList="string-list",k.NumberList="number-list",k.KeyValueList="key-value-list",k))(Z||{});var U=class{constructor(e,t){this.pills=e;this.sourceTypesByRoute=t}sourceType(e){return e?this.sourceTypesByRoute[e]:void 0}converters(e,t){return t==="sql"?e.sqlConverterKey?[e.sqlConverterKey]:[]:e.apiConverterKeys}available(e){return this.pills.filter(t=>this.converters(t,e).length>0)}pill(e,t){return this.pills.find(i=>this.converters(i,e).includes(t))}isValid(e,t){return this.pill(e,t)!==void 0}};var K=class{constructor(e){this.definitions=e}converters(e){return this.definitions[e]}converter(e,t){return this.converters(e).find(i=>i.key===t)}options(e,t){return this.converter(e,t)?.options??[]}defaults(e,t){let i={};for(let r of this.options(e,t))r.defaultValue!==void 0&&(i[r.key]=r.defaultValue);return i}};var W=class{constructor(e){this.catalog=e}defaults(e,t){return this.catalog.defaults(e,t)}dependencySatisfied(e,t){if(!e.dependsOn)return!0;let i=t[e.dependsOn.key];return e.dependsOn.value===void 0?!!i:i===e.dependsOn.value}
207disabled(e,t){if(!e.disabledWhen)return!1;let i=t[e.disabledWhen.key];return e.disabledWhen.value===void 0?!!i:i===e.disabledWhen.value}prune(e,t,i){let r=this.catalog.options(e,t),o=b({},i),p=!0;for(;p;){p=!1;for(let O of r)O.key in o&&!this.dependencySatisfied(O,o)&&(delete o[O.key],p=!0)}return o}clearConflict(e,t,i,r){let o=b({},r);for(let p of this.catalog.options(e,t))p.disabledWhen?.key===i&&p.key in o&&this.disabled(p,o)&&delete o[p.key];return o}};var ie=class{constructor(e,t){this.definitions=e;this.defaultTitle=t}group(e){let t=new Map;for(let i of e){let r=this.title(i.key);t.set(r,[...t.get(r)??[],i])}return this.definitions.map(i=>i.title).filter(i=>t.has(i)).map(i=>({title:i,items:t.get(i)}))}title(e){return this.definitions.find(i=>i.keys?.includes(e)||i.prefixes?.some(r=>e.startsWith(r)))?.title??this.defaultTitle}};var wi=n=>({opt:n}),ln=(n,e)=>e.id,Di=(n,e)=>e.title,Ri=(n,e)=>e.key,cn=(n,e)=>e.value;function Ei(n,e){if(n&1){let t=S();s(0,"button",10),g("click",function(){let r=C(t).$implicit,o=c(2);return x(o.onSelectPill(r))}),d(1),a()}if(n&2){let t,i=e.$implicit,r=((t=c(2).activePill())==null?null:t.id)===i.id;P("is-active",r),l(),D(" ",i.label," ")}}function Vi(n,e){if(n&1){let t=S();s(0,"button",12),g("click",function(){let r=C(t).$implicit,o=c(3);return x(o.onSelectSubTarget(r.apiConverterKey))}),d(1),a()}if(n&2){let t,i=e.$implicit,r=c(3);P("is-active",((t=r.activeSubTarget())==null?null:t.id)===i.id),l(),D(" ",i.label," ")}}function Ai(n,e){if(n&1&&(s(0,"div",9),A(1,Vi,2,3,"button",11,ln),a()),n&2){let t,i=c(2);l(),T((t=i.activePill())==null?null:t.subTargets)}}function Ti(n,e){if(n&1&&_t(0,20),n&2){let t=e.$implicit;c(5);let i=Ct(6);m("ngTemplateOutlet",i)("ngTemplateOutletContext",xt(2,wi,t))}}function Ii(n,e){if(n&1&&(s(0,"div",19),A(1,Ti,1,4,"ng-container",20,Ri),a()),n&2){let t=c().$implicit;l(),T(t.items)}}function Ni(n,e){if(n&1){let t=S();s(0,"div",13)(1,"button",14),g("click",function(){let r=C(t).$implicit,o=c(3);return x(o.toggleGroup(r.title))}),s(2,"span",15),y(3,"app-icon",16),a(),s(4,"span",17),d(5),a(),s(6,"span",18),d(7),a()(),f(8,Ii,3,0,"div",19),a()}if(n&2){let t=e.$implicit,i=c(3);l(2),P("is-open",i.isGroupOpen(t.title)),l(),m("size",10),l(2),h(t.title),l(2),h(t.items.length),l(),v(i.isGroupOpen(t.title)?8:-1)}}function Fi(n,e){if(n&1&&A(0,Ni,9,6,"div",13,Di),n&2){let t=c(2);T(t.optionsGroups())}}function Li(n,e){if(n&1&&(s(0,"div",5)(1,"div",6),d(2,"Language / Framework"),a(),s(3,"div",7),A(4,Ei,2,3,"button",8,ln),a(),f(6,Ai,3,0,"div",9),a(),f(7,Fi,2,0)),n&2){let t=c();l(4),T(t.availablePills()),l(2),v(t.hasSubTargets()?6:-1),l(),v(e.selectedConverter?7:-1)}}function Gi(n,e){n&1&&(s(0,"div",3)(1,"div",21),d(2,"No source selected"),a(),s(3,"div",22),d(4,"Add a source on the left to configure generation."),a()())}function Ui(n,e){if(n&1){let t=S();s(0,"button",27),g("click",function(){C(t);let r=c(2);return x(r.downloadZip())}),y(1,"app-icon",28),d(2," .zip "),a()}n&2&&(l(),m("size",12))}function Bi(n,e){if(n&1){let t=S();s(0,"div",4)(1,"button",23),g("click",function(){C(t);let r=c();return x(r.onGenerate())}),y(2,"app-icon",24),d(3),s(4,"span",25),d(5,"\u2318\u21B5"),a()(),f(6,Ui,3,1,"button",26),a()}if(n&2){let t=c();l(),P("is-ready",t.canGenerate()&&!t.isLoading()),m("disabled",!t.canGenerate()),l(),m("size",12),l(),D(" ",t.generateLabel()," "),l(3),v(t.hasResults()?6:-1)}}function qi(n,e){if(n&1&&(s(0,"div",34),d(1),a()),n&2){let t=c(2).opt;l(),h(t.hint)}}function ji(n,e){if(n&1){let t=S();s(0,"div",29)(1,"div",32)(2,"div",33),d(3),a(),f(4,qi,2,1,"div",34),a(),s(5,"button",35),g("click",function(){C(t);let r=c().opt,o=c();return x(o.onOptionChange(r.key,!o.getOptionValue(r.key)))}),y(6,"span",36),a()()}if(n&2){let t=c().opt,i=c();l(3),h(t.label),l(),v(t.hint?4:-1),l(),P("is-on",!!i.getOptionValue(t.key)),J("aria-checked",!!i.getOptionValue(t.key))}}function Hi(n,e){n&1&&(s(0,"span",37),d(1,"*"),a())}function zi(n,e){if(n&1&&(s(0,"div",34),d(1),a()),n&2){let t=c(2).opt;l(),h(t.hint)}}function $i(n,e){if(n&1){let t=S();s(0,"div",30)(1,"div",32)(2,"span",33),d(3),a(),f(4,Hi,2,0,"span",37),f(5,zi,2,1,"div",34),a(),s(6,"input",38),g("input",function(r){C(t);let o=c().opt,p=c();return x(p.onOptionChange(o.key,r.target.value))}),a()()}if(n&2){let t=c().opt,i=c();l(3),h(t.label),l(),v(t.required?4:-1),l(),v(t.hint?5:-1),l(),m("placeholder",t.placeholder||"")("value",i.getOptionValue(t.key)??"")}}function Qi(n,e){if(n&1&&(s(0,"div",34),d(1),a()),n&2){let t=c(2).opt;l(),h(t.hint)}}function Ki(n,e){if(n&1){let t=S();s(0,"div",30)(1,"div",32)(2,"span",33),d(3),a(),f(4,Qi,2,1,"div",34),a(),s(5,"input",39),g("input",function(r){C(t);let o=c().opt,p=c();return x(p.onOptionChange(o.key,r.target.value===""?null:+r.target.value))}),a()()}if(n&2){let t=c().opt,i=c();l(3),h(t.label),l(),v(t.hint?4:-1),l(),m("placeholder",t.placeholder||"")("value",i.getOptionValue(t.key)??"")}}function Wi(n,e){if(n&1&&(s(0,"div",34),d(1),a()),n&2){let t=c(2).opt;l(),h(t.hint)}}function Ji(n,e){if(n&1){let t=S();s(0,"div",30)(1,"div",32)(2,"span",33),d(3),a(),f(4,Wi,2,1,"div",34),a(),s(5,"input",38),g("input",function(r){C(t);let o=c().opt,p=c();return x(p.onOptionChange(o.key,r.target.value))}),a()()}if(n&2){let t=c().opt,i=c();l(3),h(t.label),l(),v(t.hint?4:-1),l(),m("placeholder",t.placeholder||"")("value",i.getOptionValue(t.key)??"")}}function Yi(n,e){if(n&1&&(s(0,"div",34),d(1),a()),n&2){let t=c(2).opt;l(),h(t.hint)}}function Zi(n,e){if(n&1){let t=S();s(0,"div",30)(1,"div",32)(2,"span",33),d(3),a(),f(4,Yi,2,1,"div",34),a(),s(5,"input",38),g("input",function(r){C(t);let o=c().opt,p=c();return x(p.onOptionChange(o.key,r.target.value))}),a()()}if(n&2){let t=c().opt,i=c();l(3),h(t.label),l(),v(t.hint?4:-1),l(),m("placeholder",t.placeholder||"")("value",i.getOptionValue(t.key)??"")}}function Xi(n,e){if(n&1&&(s(0,"div",34),d(1),a()),n&2){let t=c(2).opt;l(),h(t.hint)}}function er(n,e){if(n&1){let t=S();s(0,"div",30)(1,"div",32)(2,"span",33),d(3),a(),f(4,Xi,2,1,"div",34),a(),s(5,"input",38),g("input",function(r){C(t);let o=c().opt,p=c();return x(p.onOptionChange(o.key,r.target.value))}),a()()}if(n&2){let t=c().opt,i=c();l(3),h(t.label),l(),v(t.hint?4:-1),l(),m("placeholder",t.placeholder||"")("value",i.getOptionValue(t.key)??"")}}function tr(n,e){if(n&1&&(s(0,"div",34),d(1),a()),n&2){let t=c(2).opt;l(),h(t.hint)}}function nr(n,e){if(n&1&&(s(0,"option",42),d(1),a()),n&2){let t=e.$implicit;m("value",t.value),l(),h(t.label)}}function ir(n,e){if(n&1){let t=S();s(0,"div",30)(1,"div",32)(2,"span",33),d(3),a(),f(4,tr,2,1,"div",34),a(),s(5,"select",40),g("change",function(r){C(t);let o=c().opt,p=c();return x(p.onOptionChange(o.key,r.target.value))}),s(6,"option",41),d(7,"\u2014 Select \u2014"),a(),A(8,nr,2,2,"option",42,cn),a()()}if(n&2){let t=c().opt,i=c();P("is-disabled",i.isDisabled(t)),l(3),h(t.label),l(),v(t.hint?4:-1),l(),m("disabled",i.isDisabled(t))("value",i.getOptionValue(t.key)??""),l(3),T(t.selectOptions)}}function rr(n,e){if(n&1&&(s(0,"div",34),d(1),a()),n&2){let t=c(2).opt;l(),h(t.hint)}}function or(n,e){if(n&1){let t=S();s(0,"button",45),g("click",function(){let r=C(t).$implicit,o=c(2).opt,p=c();return x(p.onOptionChange(o.key,r.value))}),d(1),a()}if(n&2){let t=e.$implicit,i=c(2).opt,r=c();P("is-active",(r.getOptionValue(i.key)??"")===t.value),m("disabled",r.isDisabled(i)),l(),D(" ",t.label," ")}}function ar(n,e){if(n&1&&(s(0,"div",30)(1,"div",32)(2,"span",33),d(3),a(),f(4,rr,2,1,"div",34),a(),s(5,"div",43),A(6,or,2,4,"button",44,cn),a()()),n&2){let t=c().opt,i=c();P("is-disabled",i.isDisabled(t)),l(3),h(t.label),l(),v(t.hint?4:-1),l(2),T(t.selectOptions)}}function sr(n,e){if(n&1&&f(0,ji,7,5,"div",29)(1,$i,7,5,"div",30)(2,Ki,6,4,"div",30)(3,Ji,6,4,"div",30)(4,Zi,6,4,"div",30)(5,er,6,4,"div",30)(6,ir,10,6,"div",31)(7,ar,8,4,"div",31),n&2){let t,i=e.opt,r=c();v((t=i.type)===r.OptionType.Boolean?0:t===r.OptionType.String?1:t===r.OptionType.Number?2:t===r.OptionType.StringList?3:t===r.OptionType.NumberList?4:t===r.OptionType.
207KeyValueList?5:t===r.OptionType.Select?6:t===r.OptionType.ButtonGroup?7:-1)}}var Ne=class n{constructor(e,t,i,r,o){this.stateService=e;this.targets=t;this.catalog=i;this.options=r;this.optionGroups=o;this.selectedSource=e.selectedSource,this.isLoading=e.isLoading,this.hasResults=e.hasResults,this.selectedResult=e.selectedResult,this.pills=t.pills}generate=Oe();OptionType=Z;SourceType=G;selectedSource;isLoading;hasResults;selectedResult;pills;collapsedGroups=R(new Set(["Error Handling","Timeout","Auth","Retries","Headers"]));availablePills=u(()=>{let e=this.selectedSource();return e?this.targets.available(e.sourceType):this.pills});activePill=u(()=>{let e=this.selectedSource();if(!e?.selectedConverter)return null;let t=e.selectedConverter;return this.targets.pill(e.sourceType,t)??null});activeSubTarget=u(()=>{let e=this.activePill(),t=this.selectedSource()?.selectedConverter;return!e?.subTargets||!t?null:e.subTargets.find(i=>i.apiConverterKey===t)??null});hasSubTargets=u(()=>{let e=this.selectedSource();return!!this.activePill()?.subTargets&&e?.sourceType!=="sql"});currentConverter=u(()=>{let e=this.selectedSource();return e?.selectedConverter?this.catalog.converter(e.sourceType,e.selectedConverter)??null:null});visibleOptions=u(()=>{let e=this.selectedSource(),t=this.currentConverter();return!e||!t?[]:t.options.filter(i=>this.options.dependencySatisfied(i,e.converterOptions))});optionsGroups=u(()=>this.optionGroups.group(this.visibleOptions()));pillSubtitle=u(()=>{let e=this.activePill(),t=this.activeSubTarget();return t?`${e?.label} \xB7 ${t.label}`:e?.sub??"Select a language"});canGenerate=u(()=>{let e=this.selectedSource();if(!e?.selectedConverter||this.isLoading()||!(e.inputMethod==="url"&&!!e.url?.trim()||!!e.content?.trim()))return!1;for(let i of this.visibleOptions())if(i.required&&!e.converterOptions[i.key])return!1;return!0});generateLabel=u(()=>this.isLoading()?"Generating\u2026":this.hasResults()?"Regenerate":"Generate");onSelectPill(e){let t=this.selectedSource();if(!t)return;let i=this.targets.converters(e,t.sourceType);i.length!==0&&this.applyConverter(i[0])}onSelectSubTarget(e){this.applyConverter(e)}onOptionChange(e,t){let i=this.selectedSource();if(!i?.selectedConverter)return;let r=M(b({},i.converterOptions),{[e]:t}),o=this.options.clearConflict(i.sourceType,i.selectedConverter,e,r),p=this.options.prune(i.sourceType,i.selectedConverter,o);this.stateService.updateSelectedSource({converterOptions:p})}getOptionValue(e){return this.selectedSource()?.converterOptions[e]??""}isDisabled(e){let t=this.selectedSource();return t?this.options.disabled(e,t.converterOptions):!1}toggleGroup(e){this.collapsedGroups.update(t=>{let i=new Set(t);return i.has(e)?i.delete(e):i.add(e),i})}isGroupOpen(e){return!this.collapsedGroups().has(e)}onGenerate(){this.generate.emit()}downloadZip(){return ot(this,null,function*(){let e=this.selectedResult(),t=this.selectedSource();if(!e?.files.length)return;let i=new sn.default;for(let O of e.files){let k=O.path?`${O.path}/${O.name}`:O.name;i.file(k,O.content)}let r=yield i.generateAsync({type:"blob"}),o=URL.createObjectURL(r),p=document.createElement("a");p.href=o,p.download=`${t?.label??"generated"}.zip`,p.click(),URL.revokeObjectURL(o)})}applyConverter(e){let t=this.selectedSource();t&&this.stateService.updateSelectedSource({selectedConverter:e,converterOptions:this.options.defaults(t.sourceType,e),result:void 0})}static \u0275fac=function(t){return new(t||n)(_(N),_(U),_(K),_(W),_(ie))};static \u0275cmp=V({type:n,selectors:[["app-options-panel"]],outputs:{generate:"generate"},decls:7,vars:3,consts:[["optRow",""],["icon","code","title","Options",3,"subtitle"],[1,"panel-body"],[1,"empty-state"],[1,"gen-bar"],[1,"picker-section"],[1,"caps","picker-label"],[1,"pill-grid"],["type","button",1,"pill-grid__item",3,"is-active"],[1,"sub-targets"],["type","button",1,"pill-grid__item",3,"click"],["type","button",1,"sub-chip",3,"is-active"],["type","button",1,"sub-chip",3,"click"],[1,"opt-group"],["type","button",1,"opt-group__head",3,"click"],[1,"opt-group__chev"],["name","chev",3,"size"],[1,"caps","opt-group__title"],[1,"opt-group__count","mono"],[1,"opt-group__body"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"empty-state__title"],[1,"empty-state__sub"],["type","button",1,"gen-btn",3,"click","disabled"],["name","bolt",3,"size"],[1,"gen-btn__kbd","mono"],["type","button",1,"zip-btn"],["type","button",1,"zip-btn",3,"click"],["name","download",3,"size"],[1,"opt-row","opt-row--toggle"],[1,"opt-row"],[1,"opt-row",3,"is-disabled"],[1,"opt-row__label"],[1,"opt-row__title"],[1,"opt-row__hint"],["type","button","role","switch",1,"toggle",3,"click"],[1,"toggle__knob"],[1,"opt-row__req"],["type","text",1,"opt-input","mono",3,"input","placeholder","value"],["type","number",1,"opt-input","mono",3,"input","placeholder","value"],[1,"opt-select",3,"change","disabled","value"],["value",""],[3,"value"],[1,"opt-bg"],["type","button",1,"opt-bg__btn","mono",3,"is-active","disabled"],["type","button",1,"opt-bg__btn","mono",3,"click","disabled"]],template:function(t,i){if(t&1&&(y(0,"app-panel-header",1),s(1,"div",2),f(2,Li,8,2)(3,Gi,5,0,"div",3),a(),f(4,Bi,7,6,"div",4),ht(5,sr,8,1,"ng-template",null,0,St)),t&2){let r,o;m("subtitle",i.pillSubtitle()),l(2),v((r=i.selectedSource())?2:3,r),l(2),v((o=i.selectedSource())!=null&&o.selectedConverter?4:-1)}},dependencies:[Ae,en,nn,kt,j,I],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;min-height:0;background:var(--bg-1)}.panel-body[_ngcontent-%COMP%]{flex:1;min-height:0;overflow-y:auto}.picker-section[_ngcontent-%COMP%]{padding:var(--s-4);border-bottom:1px solid var(--line-1)}.picker-label[_ngcontent-%COMP%]{color:var(--ink-3);margin-bottom:8px}.pill-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);gap:4px}.pill-grid__item[_ngcontent-%COMP%]{padding:7px 9px;background:var(--bg-2);color:var(--ink-1);border:1px solid var(--line-1);border-radius:var(--r-2);font-size:var(--t-sm);text-align:left;cursor:pointer;transition:all .12s ease}.pill-grid__item[_ngcontent-%COMP%]:hover{background:var(--bg-3);color:var(--ink-0)}.pill-grid__item.is-active[_ngcontent-%COMP%]{background:var(--accent-dim);color:var(--accent);border-color:var(--accent-line);font-weight:500}.sub-targets[_ngcontent-%COMP%]{margin-top:8px;display:flex;gap:4px;flex-wrap:wrap}.sub-chip[_ngcontent-%COMP%]{padding:4px 10px;font-size:var(--t-sm);background:var(--bg-2);color:var(--ink-1);border:1px solid var(--line-1);border-radius:var(--r-1);
207cursor:pointer}.sub-chip[_ngcontent-%COMP%]:hover{background:var(--bg-3);color:var(--ink-0)}.sub-chip.is-active[_ngcontent-%COMP%]{background:var(--accent-dim);color:var(--accent);border-color:var(--accent-line);font-weight:500}.opt-group[_ngcontent-%COMP%]{border-bottom:1px solid var(--line-1)}.opt-group__head[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;padding:10px 14px;gap:8px;color:var(--ink-2);cursor:pointer}.opt-group__head[_ngcontent-%COMP%]:hover{color:var(--ink-0)}.opt-group__chev[_ngcontent-%COMP%]{display:inline-flex;transition:transform .15s ease}.opt-group__chev.is-open[_ngcontent-%COMP%]{transform:rotate(90deg)}.opt-group__title[_ngcontent-%COMP%]{flex:1;text-align:left}.opt-group__count[_ngcontent-%COMP%]{font-size:10px;color:var(--ink-3)}.opt-group__body[_ngcontent-%COMP%]{padding:0 14px 10px}.opt-row[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;padding:8px 0;border-bottom:1px solid var(--line-1)}.opt-row[_ngcontent-%COMP%]:last-child{border-bottom:0}.opt-row--toggle[_ngcontent-%COMP%]{flex-direction:row;align-items:center;justify-content:space-between;gap:12px}.opt-row__label[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}.opt-row__title[_ngcontent-%COMP%]{font-size:var(--t-base);color:var(--ink-0)}.opt-row__req[_ngcontent-%COMP%]{color:var(--err);font-weight:500}.opt-row__hint[_ngcontent-%COMP%]{flex-basis:100%;font-size:var(--t-xs, 11px);color:var(--ink-3);line-height:1.35}.opt-input[_ngcontent-%COMP%], .opt-select[_ngcontent-%COMP%]{width:100%;height:28px;padding:0 9px;background:var(--bg-0);border:1px solid var(--line-2);border-radius:var(--r-2);color:var(--ink-0);font-size:var(--t-sm);outline:none}.opt-input[_ngcontent-%COMP%]:focus, .opt-select[_ngcontent-%COMP%]:focus{border-color:var(--accent)}.opt-bg[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:4px}.opt-bg__btn[_ngcontent-%COMP%]{padding:4px 10px;background:var(--bg-2);color:var(--ink-1);border:1px solid var(--line-1);border-radius:var(--r-1);font-size:var(--t-sm);cursor:pointer}.opt-bg__btn[_ngcontent-%COMP%]:hover{background:var(--bg-3);color:var(--ink-0)}.opt-bg__btn.is-active[_ngcontent-%COMP%]{background:var(--accent-dim);color:var(--accent);border-color:var(--accent-line)}.opt-row.is-disabled[_ngcontent-%COMP%]{opacity:.45}.opt-row.is-disabled[_ngcontent-%COMP%] .opt-bg__btn[_ngcontent-%COMP%], .opt-row.is-disabled[_ngcontent-%COMP%] .opt-select[_ngcontent-%COMP%]{cursor:not-allowed}.opt-bg__btn[_ngcontent-%COMP%]:disabled:hover{background:var(--bg-2);color:var(--ink-1)}.toggle[_ngcontent-%COMP%]{width:32px;height:18px;border-radius:10px;background:var(--bg-4);position:relative;cursor:pointer;flex-shrink:0;transition:background .18s ease}.toggle.is-on[_ngcontent-%COMP%]{background:var(--accent)}
207.toggle__knob[_ngcontent-%COMP%]{position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:var(--ink-1);transition:left .18s ease,background .18s ease;box-shadow:0 1px 2px #0000001f}.toggle.is-on[_ngcontent-%COMP%] .toggle__knob[_ngcontent-%COMP%]{left:16px;background:#fff}.gen-bar[_ngcontent-%COMP%]{flex-shrink:0;display:flex;gap:6px;padding:var(--s-4);border-top:1px solid var(--line-1);background:var(--bg-1)}.gen-btn[_ngcontent-%COMP%]{flex:1;height:36px;display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--bg-3);color:var(--ink-1);border:1px solid var(--line-2);border-radius:var(--r-2);font-size:var(--t-md);font-weight:500;cursor:pointer;transition:all .12s ease}.gen-btn[_ngcontent-%COMP%]:disabled{cursor:not-allowed;opacity:.6}.gen-btn.is-ready[_ngcontent-%COMP%]{background:var(--accent);color:var(--bg-0);border-color:var(--accent);box-shadow:0 4px 16px var(--accent-glow)}.gen-btn__kbd[_ngcontent-%COMP%]{font-size:9.5px;opacity:.7;padding:1px 4px;border:1px solid currentColor;border-radius:3px}.zip-btn[_ngcontent-%COMP%]{height:36px;padding:0 12px;display:inline-flex;align-items:center;gap:6px;background:var(--bg-2);color:var(--ink-1);border:1px solid var(--line-2);border-radius:var(--r-2);font-size:var(--t-sm);font-family:var(--font-mono);cursor:pointer}.zip-btn[_ngcontent-%COMP%]:hover{background:var(--bg-3);color:var(--ink-0)}.empty-state[_ngcontent-%COMP%]{padding:40px 20px;text-align:center;color:var(--ink-3)}.empty-state__title[_ngcontent-%COMP%]{font-family:var(--font-display);font-size:var(--t-lg);color:var(--ink-1);margin-bottom:6px}.empty-state__sub[_ngcontent-%COMP%]{font-size:var(--t-sm)}"]})};var lr=(n,e)=>e.path,cr=(n,e)=>e.file.name;function dr(n,e){if(n&1&&(s(0,"span",1),y(1,"app-icon",5),d(2),a()),n&2){let t=c();l(),m("size",9),l(),D(" ",t.execTime(),"ms ")}}function pr(n,e){n&1&&(s(0,"div",3)(1,"div",6),d(2,"Nothing generated yet"),a(),s(3,"div",7),d(4,"Pick a language on the right and hit generate."),a()())}function ur(n,e){if(n&1){let t=S();s(0,"button",9),g("click",function(){C(t);let r=c().$implicit,o=c(2);return x(o.toggleFolder(r.path))}),s(1,"span",10),y(2,"app-icon",11),a(),y(3,"app-icon",12),s(4,"span",13),d(5),a(),s(6,"span",14),d(7),a()()}if(n&2){let t=c().$implicit,i=c(2);l(),P("is-open",!i.isCollapsed(t.path)),l(),m("size",10),l(),m("size",12),l(2),h(t.name),l(2),h(t.files.length)}}function mr(n,e){if(n&1){let t=S();s(0,"button",16),g("click",function(){let r=C(t).$implicit,o=c(4);return x(o.onSelectFile(r.globalIndex))}),s(1,"span",17),d(2),a(),s(3,"span",18),d(4),a()()}if(n&2){let t=e.$implicit,i=c(4),r=i.selectedFileIndex()===t.globalIndex;P("is-nested",i.hasFolders())("is-active",r),m("title",t.file.name),l(2),h(i.extFor(t.file)),l(2),h(t.file.name)}}function hr(n,e){if(n&1&&A(0,mr,5,7,"button",15,cr),n&2){let t=c().$implicit;T(t.files)}}function gr(n,e){if(n&1&&(f(0,ur,8,6,"button",8),f(1,hr,2,0)),n&2){let t=e.$implicit,i=c(2);v(i.hasFolders()?0:-1),l(),v(i.isCollapsed(t.path)?-1:1)}}function fr(n,e){if(n&1&&(s(0,"div",4),A(1,gr,2,2,null,null,lr),a()),n&2){let t=c();l(),T(t.folders())}}var Fe=class n{stateService=B(N);result=this.stateService.selectedResult;selectedFileIndex=this.stateService.selectedFileIndex;collapsedFolders=R(new Set);folders=u(()=>{let e=this.result()?.files??[],t=new Map;return e.forEach((i,r)=>{let o=(i.path??"").replace(/^\/+|\/+$/g,""),p=o||"root";t.has(o)||t.set(o,{name:p,path:o,files:[]}),t.get(o).files.push({file:i,globalIndex:r})}),Array.from(t.values()).sort((i,r)=>i.path?r.path?i.name.localeCompare(r.name):1:-1)});hasFolders=u(()=>{let e=this.folders();return e.length>1||e.length===1&&e[0].path!==""});totalFiles=u(()=>this.result()?.files.length??0);totalLines=u(()=>{let e=this.result()?.files??[],t=0;for(let i of e)t+=(i.content??"").split(` 208`).length;return t});execTime=u(()=>this.result()?.executionTimeInMilliseconds??0);subtitle=u(()=>{let e=this.totalFiles();return e===0?"\u2014 no files yet":`${e} ${e===1?"file":"files"} \xB7 ${this.totalLines()} lines`});isCollapsed(e){return this.collapsedFolders().has(e)}toggleFolder(e){this.collapsedFolders.update(t=>{let i=new Set(t);return i.has(e)?i.delete(e):i.add(e),i})}onSelectFile(e){this.stateService.selectFile(e)}extFor(e){let t=e.name??"",i=t.lastIndexOf(".");return i<=0?"\xB7":t.slice(i+1).toLowerCase()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=V({type:n,selectors:[["app-files-panel"]],decls:5,vars:3,consts:[["icon","file","title","Files",3,"subtitle"],[1,"time-chip","mono"],[1,"panel-body"],[1,"empty-state"],[1,"tree"],["name","bolt",3,"size"],[1,"empty-state__title"],[1,"empty-state__sub"],["type","button",1,"folder"],["type","button",1,"folder",3,"click"],[1,"folder__chev"],["name","chev",3,"size"],["name","layers",3,"size"],[1,"folder__name","mono"],[1,"folder__count","mono"],["type","button",1,"file",3,"is-nested","is-active","title"],["type","button",1,"file",3,"click","title"],[1,"file__ext","mono"],[1,"file__name"]],template:function(t,i){t&1&&(s(0,"app-panel-header",0),f(1,dr,3,2,"span",1),a(),s(2,"div",2),f(3,pr,5,0,"div",3)(4,fr,3,0,"div",4),a()),t&2&&(m("subtitle",i.subtitle()),l(),v(i.execTime()>0?1:-1),l(2),v(i.folders().length===0?3:4))},dependencies:[j,I],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;min-height:0;background:var(--bg-1)}.panel-body[_ngcontent-%COMP%]{flex:1;min-height:0;overflow-y:auto}.time-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;font-size:10px;color:var(--ok);padding:2px 6px;background:var(--ok-bg);border:1px solid var(--ok-line);border-radius:var(--r-1)}.tree[_ngcontent-%COMP%]{padding:6px 0}.folder[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%;padding:4px 12px;gap:6px;color:var(--ink-2);cursor:pointer;background:transparent;border:0;text-align:left}.folder[_ngcontent-%COMP%]:hover{color:var(--ink-0)}.folder__chev[_ngcontent-%COMP%]{display:inline-flex;transition:transform .15s ease;color:var(--ink-3)}.folder__chev.is-open[_ngcontent-%COMP%]{transform:rotate(90deg)}.folder__name[_ngcontent-%COMP%]{flex:1;font-size:11.5px;color:var(--ink-1)}.folder__count[_ngcontent-%COMP%]{font-size:10px;color:var(--ink-3)}
208.file[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;width:100%;padding:4px 12px;background:transparent;border:0;border-left:2px solid transparent;font-size:var(--t-sm);color:var(--ink-1);text-align:left;cursor:pointer;transition:background .1s ease,color .1s ease}.file.is-nested[_ngcontent-%COMP%]{padding-left:32px}.file[_ngcontent-%COMP%]:hover{background:var(--bg-2);color:var(--ink-0)}.file.is-active[_ngcontent-%COMP%]{background:var(--accent-dim);color:var(--accent);border-left-color:var(--accent)}.file__ext[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:14px;padding:0 4px;background:var(--bg-2);color:var(--ink-2);border:1px solid var(--line-1);border-radius:2px;font-size:9px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;flex-shrink:0}.file.is-active[_ngcontent-%COMP%] .file__ext[_ngcontent-%COMP%]{background:var(--accent-dim);color:var(--accent);border-color:var(--accent-line)}.file__name[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1}.empty-state[_ngcontent-%COMP%]{padding:40px 20px;text-align:center;color:var(--ink-3)}.empty-state__title[_ngcontent-%COMP%]{font-family:var(--font-display);font-size:var(--t-lg);color:var(--ink-1);margin-bottom:6px}.empty-state__sub[_ngcontent-%COMP%]{font-size:var(--t-sm)}"]})};function vr(n,e){if(n&1){let t=S();s(0,"app-panel-header",0)(1,"button",1),g("click",function(){let r=C(t),o=c();return x(o.copyToClipboard(r.content))}),y(2,"app-icon",2),a(),s(3,"button",3),g("click",function(){let r=C(t),o=c();return x(o.downloadFile(r))}),y(4,"app-icon",4),a()(),s(5,"div",5),y(6,"app-highlight",6),a()}if(n&2){let t=e,i=c();m("title",t.name)("subtitle",i.subtitle()),l(),P("is-ok",i.copied()),m("title",i.copied()?"Copied!":"Copy"),J("aria-label",i.copied()?"Copied":"Copy file contents"),l(),m("name",i.copied()?"check":"copy")("size",12),l(2),m("size",12),l(2),m("code",t.content)("lang",i.highlightLanguage())}}function _r(n,e){n&1&&(y(0,"app-panel-header",7),s(1,"div",8)(2,"div",9),d(3,"Nothing to preview"),a(),s(4,"div",10),d(5,"Pick a file on the left."),a()())}var yr={angular:"typescript",react:"typescript","typescript-fetch":"typescript","go-nethttp":"go","java-spring":"java","python-httpx":"python","kotlin-ktor":"kotlin","csharp-httpclient":"csharp","rust-reqwest":"rust","swift-urlsession":"swift",typescript:"typescript",csharp:"csharp",go:"go",python:"python",java:"java",kotlin:"kotlin",groovy:"groovy",scala:"scala",swift:"swift",php:"php",rust:"rust"},Le=class n{stateService=B(N);selectedFile=this.stateService.selectedFile;copied=R(!1);highlightLanguage=u(()=>{let e=this.stateService.selectedSource();return e?.selectedConverter?yr[e.selectedConverter]??"typescript":"typescript"});subtitle=u(()=>{let e=this.selectedFile();if(!e)return"";let t=(e.content??"").split(` 209`).length,i=(e.content??"").length;return`${t} lines \xB7 ${i}B`});copyToClipboard(e){navigator.clipboard.writeText(e),this.copied.set(!0),setTimeout(()=>this.copied.set(!1),1500)}downloadFile(e){let t=new Blob([e.content],{type:"text/plain"}),i=URL.createObjectURL(t),r=document.createElement("a");r.href=i,r.download=e.name,r.click(),URL.revokeObjectURL(i)}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=V({type:n,selectors:[["app-code-preview-panel"]],decls:2,vars:1,consts:[["icon","code",3,"title","subtitle"],["type","button",1,"icon-btn",3,"click","title"],[3,"name","size"],["type","button","title","Download","aria-label","Download file",1,"icon-btn",3,"click"],["name","download",3,"size"],[1,"code-wrap"],[3,"code","lang"],["icon","code","title","Code","subtitle","no file selected"],[1,"empty-state"],[1,"empty-state__title"],[1,"empty-state__sub"]],template:function(t,i){if(t&1&&f(0,vr,7,11)(1,_r,6,0),t&2){let r;v((r=i.selectedFile())?0:1,r)}},dependencies:[j,I,Dt],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;min-height:0}.icon-btn[_ngcontent-%COMP%]{width:26px;height:26px;display:inline-flex;align-items:center;justify-content:center;color:var(--ink-2);background:var(--bg-2);border:1px solid var(--line-1);border-radius:var(--r-2);cursor:pointer;transition:background .12s ease,color .12s ease}.icon-btn[_ngcontent-%COMP%]:hover{background:var(--bg-3);color:var(--ink-0)}.icon-btn.is-ok[_ngcontent-%COMP%]{color:var(--ok)}.code-wrap[_ngcontent-%COMP%]{flex:1;min-height:0;overflow:auto;padding:14px 0;background:var(--bg-0)}app-highlight[_ngcontent-%COMP%]{display:block;padding:0 18px}.empty-state[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:20px;color:var(--ink-3)}.empty-state__title[_ngcontent-%COMP%]{font-family:var(--font-display);font-size:var(--t-lg);color:var(--ink-1);margin-bottom:6px}.empty-state__sub[_ngcontent-%COMP%]{font-size:var(--t-sm)}"]})};function br(n,e){if(n&1&&(s(0,"div",10)(1,"span",29),d(2),a(),s(3,"span",12),d(4,"Avg. time"),a()()),n&2){let t=c();l(2),D("",t.avgTimeMs(),"ms")}}var Ge=class n{constructor(e,t){this.stateService=e;this.targets=t;this.selectedSource=e.selectedSource,this.isLoading=e.isLoading,this.hasResults=e.hasResults,this.result=e.selectedResult,this.sources=e.sources}generate=Oe();selectedSource;isLoading;hasResults;result;sources;activePill=u(()=>{let e=this.selectedSource();return e?.selectedConverter?this.targets.pill(e.sourceType,e.selectedConverter)??null:null});genState=u(()=>this.isLoading()?"generating":this.hasResults()?"done":this.selectedSource()?.selectedConverter?"dirty":"idle");statusLabel=u(()=>{let e=this.genState();return e==="generating"?"emitting":e==="dirty"?"ready to emit":e==="done"?"ready":"configure"});generateLabel=u(()=>{let e=this.genState();return e==="generating"?"Generating\u2026":e==="done"?"Regenerate":"Generate \u2192"});sourceLabel=u(()=>{let e=this.selectedSource();return e?e.inputMethod==="url"?e.url||"remote url":e.fileName||e.label:"no source"});totalSources=u(()=>this.sources().length);totalFiles=u(()=>this.result()?.files.length??0);avgTimeMs=u(()=>{let e=this.sources().map(t=>Number(t.result?.executionTimeInMilliseconds)).filter(t=>Number.isFinite(t));return e.length===0?null:Math.round(e.reduce((t,i)=>t+i,0)/e.length)});statParsed=u(()=>{let e=this.totalSources();return e>1?`${e} specs`:"1 spec"});statLang=u(()=>this.activePill()?.label??"\u2014");statEmitted=u(()=>`${this.totalFiles()} files`);canGenerate=u(()=>{let e=this.selectedSource();return!e?.selectedConverter||this.isLoading()?!1:e.inputMethod==="url"&&!!e.url?.trim()||!!e.content?.trim()});onGenerate(){this.canGenerate()&&this.generate.emit()}SourceType=G;static \u0275fac=function(t){return new(t||n)(_(N),_(U))};static \u0275cmp=V({type:n,selectors:[["app-masthead"]],outputs:{generate:"generate"},decls:64,vars:16,consts:[[1,"masthead"],["aria-hidden","true",1,"masthead__grid"],[1,"masthead__inner"],[1,"masthead__lede"],[1,"masthead__eyebrow","mono"],[1,"masthead__dot"],[1,"masthead__title","serif"],[1,"masthead__title-dim"],[1,"masthead__title-accent","mono"],[1,"masthead__stats"],[1,"stat"],[1,"stat__val","mono"],[1,"stat__label","caps"],[1,"masthead__panel"],[1,"panel__head"],[1,"caps","panel__eyebrow"],[1,"panel__status","mono"],[1,"panel__status-dot"],[1,"panel__flow"],[1,"panel__source","mono",3,"title"],[1,"panel__line"],[1,"panel__lang","mono"],[1,"panel__mini"],[1,"mini"],[1,"mini__label","caps"],[1,"mini__val","mono"],[1,"mini__val","mono","is-accent"],["type","button",1,"panel__gen",3,"click","disabled"],["name","bolt",3,"size"],[1,"stat__val","mono","is-accent"]],template:function(t,i){t&1&&(s(0,"header",0),y(1,"div",1),s(2,"div",2)(3,"div",3)(4,"div",4),y(5,"span",5),d(6," Converters \xB7 Universal Generation "),a(),s(7,"h1",6),d(8," Any spec."),y(9,"br"),s(10,"span",7),d(11,"Any language."),a(),y(12,"br"),s(13,"span",8),d(14,"Production-ready."),a()(),s(15,"div",9)(16,"div",10)(17,"span",11),d(18,"11"),a(),s(19,"span",12),d(20,"Languages"),a()(),s(21,"div",10)(22,"span",11),d(23,"4"),a(),s(24,"span",12),d(25,"Formats"),a()(),s(26,"div",10)(27,"span",11),d(28),a(),s(29,"span",12),d(30,"Emitted"),a()(),f(31,br,5,1,"div",10),a()(),s(32,"aside",13)(33,"div",14)(34,"div",15),d(35,"Transformation"),a(),s(36,"div",16),y(37,"span",17),d(38),a()(),s(39,"div",18)(40,"span",19),d(41),a(),y(42,"span",20),s(43,"span",21),d(44),a()(),s(45,"div",22)(46,"div",23)(47,"div",24),d(48,"Parsed"),a(),s(49,"div",25),d(50),a()(),s(51,"div",23)(52,"div",24),d(53,"Target"),a(),s(54,"div",25),d(55),a()(),s(56,"div",23)(57,"div",24),d(58,"Emitted"),a(),s(59,"div",26),d(60),a()()(),s(61,"button",27),g("click",function(){return i.onGenerate()}),y(62,"app-icon",28),d(63),a()()()()),t&2&&(l(28),h(i.totalFiles()),l(3),v(i.avgTimeMs()!==null?31:-1),l(6),J("data-state",i.genState()),l(),D(" ",i.statusLabel()," "),l(2),m("title",i.sourceLabel()),l(),h(i.sourceLabel()),l(),J("data-state",i.genState()),l(2),h(i.statLang()),l(6),h(i.statParsed()),l(5),h(i.statLang()),l(5),h(i.statEmitted()),l(),P("is-ready",i.c
209anGenerate()),m("disabled",!i.canGenerate()),l(),m("size",12),l(),D(" ",i.generateLabel()," "))},dependencies:[I],styles:["[_nghost-%COMP%]{display:block;position:relative;overflow:hidden;border-bottom:1px solid var(--line-1);background:var(--bg-0)}.masthead[_ngcontent-%COMP%]{position:relative;padding:28px 32px 22px;overflow:hidden}.masthead__grid[_ngcontent-%COMP%]{position:absolute;inset:0;background-image:linear-gradient(to right,var(--grid-line) 1px,transparent 1px),linear-gradient(to bottom,var(--grid-line) 1px,transparent 1px);background-size:48px 48px;mask-image:radial-gradient(ellipse at 85% 50%,black 30%,transparent 75%);-webkit-mask-image:radial-gradient(ellipse at 85% 50%,black 30%,transparent 75%);pointer-events:none}.masthead__inner[_ngcontent-%COMP%]{position:relative;display:flex;align-items:flex-end;gap:40px}.masthead__lede[_ngcontent-%COMP%]{flex:1;min-width:0}.masthead__eyebrow[_ngcontent-%COMP%]{font-size:11px;color:var(--ink-3);letter-spacing:.14em;text-transform:uppercase;margin-bottom:10px;display:inline-flex;align-items:center;gap:8px}.masthead__dot[_ngcontent-%COMP%]{width:6px;height:6px;border-radius:50%;background:var(--accent);box-shadow:0 0 12px var(--accent-glow)}.masthead__title[_ngcontent-%COMP%]{margin:0;font-size:44px;font-weight:500;letter-spacing:-.03em;line-height:1.02;color:var(--ink-0);font-family:var(--font-display)}.masthead__title-dim[_ngcontent-%COMP%]{color:var(--ink-2)}.masthead__title-accent[_ngcontent-%COMP%]{font-size:38px;letter-spacing:-.02em;color:var(--accent);font-weight:400;font-family:var(--font-mono)}.masthead__stats[_ngcontent-%COMP%]{margin-top:18px;display:flex;align-items:center;gap:20px;flex-wrap:wrap;color:var(--ink-2)}.stat[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:6px}.stat__val[_ngcontent-%COMP%]{font-size:16px;color:var(--ink-0);font-weight:500;letter-spacing:-.01em}.stat__val.is-accent[_ngcontent-%COMP%]{color:var(--accent)}.stat__label[_ngcontent-%COMP%]{color:var(--ink-3);font-size:10px}.masthead__panel[_ngcontent-%COMP%]{min-width:320px;padding:14px 16px;background:var(--bg-1);border:1px solid var(--line-1);border-radius:var(--r-3);flex-shrink:0}.panel__head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.panel__eyebrow[_ngcontent-%COMP%]{color:var(--ink-3)}.panel__status[_ngcontent-%COMP%]{font-size:10px;color:var(--ink-2);display:inline-flex;align-items:center;gap:6px}.panel__status-dot[_ngcontent-%COMP%]{width:6px;height:6px;border-radius:50%;background:var(--ok)}.panel__status-dot[data-state=generating][_ngcontent-%COMP%]{background:var(--accent);box-shadow:0 0 10px var(--accent-glow);animation:me-pulse .9s ease-in-out infinite}.panel__status-dot[data-state=dirty][_ngcontent-%COMP%]{background:var(--accent)}.panel__status-dot[data-state=idle][_ngcontent-%COMP%]{background:var(--ink-3)}.panel__flow[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;font-size:12px}.panel__source[_ngcontent-%COMP%]{color:var(--ink-1);max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.panel__line[_ngcontent-%COMP%]{flex:1;height:1px;background:linear-gradient(to right,var(--line-2),var(--accent),var(--line-2))}.panel__line[data-state=generating][_ngcontent-%COMP%]{background:linear-gradient(to right,var(--line-2),var(--accent) 50%,var(--line-2))}.panel__lang[_ngcontent-%COMP%]{color:var(--accent)}.panel__mini[_ngcontent-%COMP%]{margin-top:12px;display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.mini[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.mini__label[_ngcontent-%COMP%]{color:var(--ink-3);font-size:9px}.mini__val[_ngcontent-%COMP%]{font-size:12px;color:var(--ink-0)}.mini__val.is-accent[_ngcontent-%COMP%]{color:var(--accent)}.panel__gen[_ngcontent-%COMP%]{margin-top:14px;width:100%;height:34px;background:var(--bg-3);color:var(--ink-1);border:1px solid var(--line-2);border-radius:var(--r-2);font-size:var(--t-md);font-weight:500;letter-spacing:-.005em;display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;transition:background .12s ease,color .12s ease,box-shadow .12s ease}.panel__gen[_ngcontent-%COMP%]:disabled{cursor:not-allowed;opacity:.6}.panel__gen.is-ready[_ngcontent-%COMP%]{background:var(--accent);color:var(--bg-0);border-color:var(--accent);box-shadow:0 4px 16px var(--accent-glow)}@media (max-width: 991px){.masthead__inner[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch;gap:20px}.masthead__panel[_ngcontent-%COMP%]{min-width:0}.masthead__title[_ngcontent-%COMP%]{font-size:36px}
209.masthead__title-accent[_ngcontent-%COMP%]{font-size:30px}}"]})};var Ue=class n extends Y{angular(e){return this.execute("/api/openapi/angular",e)}react(e){return this.execute("/api/openapi/react",e)}goNethttp(e){return this.execute("/api/openapi/go-nethttp",e)}javaSpring(e){return this.execute("/api/openapi/java-spring",e)}pythonHttpx(e){return this.execute("/api/openapi/python-httpx",e)}csharpHttpclient(e){return this.execute("/api/openapi/csharp-httpclient",e)}kotlinKtor(e){return this.execute("/api/openapi/kotlin-ktor",e)}rustReqwest(e){return this.execute("/api/openapi/rust-reqwest",e)}swiftUrlsession(e){return this.execute("/api/openapi/swift-urlsession",e)}typescriptFetch(e){return this.execute("/api/openapi/typescript-fetch",e)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=L(n)))(i||n)}})();static \u0275prov=w({token:n,factory:n.\u0275fac,providedIn:"root"})};var Be=class n extends Y{typescript(e){return this.execute("/api/sql/typescript",e)}csharp(e){return this.execute("/api/sql/csharp",e)}go(e){return this.execute("/api/sql/go",e)}python(e){return this.execute("/api/sql/python",e)}java(e){return this.execute("/api/sql/java",e)}kotlin(e){return this.execute("/api/sql/kotlin",e)}groovy(e){return this.execute("/api/sql/groovy",e)}scala(e){return this.execute("/api/sql/scala",e)}swift(e){return this.execute("/api/sql/swift",e)}php(e){return this.execute("/api/sql/php",e)}rust(e){return this.execute("/api/sql/rust",e)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=L(n)))(i||n)}})();static \u0275prov=w({token:n,factory:n.\u0275fac,providedIn:"root"})};var qe=class n extends Y{angular(e){return this.execute("/api/graphql/angular",e)}react(e){return this.execute("/api/graphql/react",e)}typescriptFetch(e){return this.execute("/api/graphql/typescript-fetch",e)}csharpHttpclient(e){return this.execute("/api/graphql/csharp-httpclient",e)}goNethttp(e){return this.execute("/api/graphql/go-nethttp",e)}javaSpring(e){return this.execute("/api/graphql/java-spring",e)}kotlinKtor(e){return this.execute("/api/graphql/kotlin-ktor",e)}pythonHttpx(e){return this.execute("/api/graphql/python-httpx",e)}rustReqwest(e){return this.execute("/api/graphql/rust-reqwest",e)}swiftUrlsession(e){return this.execute("/api/graphql/swift-urlsession",e)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=L(n)))(i||n)}})();static \u0275prov=w({token:n,factory:n.\u0275fac,providedIn:"root"})};var je=class n extends Y{angular(e){return this.execute("/api/protobuf/angular",e)}react(e){return this.execute("/api/protobuf/react",e)}typescriptFetch(e){return this.execute("/api/protobuf/typescript-fetch",e)}csharpHttpclient(e){return this.execute("/api/protobuf/csharp-httpclient",e)}goNethttp(e){return this.execute("/api/protobuf/go-nethttp",e)}javaSpring(e){return this.execute("/api/protobuf/java-spring",e)}kotlinKtor(e){return this.execute("/api/protobuf/kotlin-ktor",e)}pythonHttpx(e){return this.execute("/api/protobuf/python-httpx",e)}rustReqwest(e){return this.execute("/api/protobuf/rust-reqwest",e)}swiftUrlsession(e){return this.execute("/api/protobuf/swift-urlsession",e)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=L(n)))(i||n)}})();static \u0275prov=w({token:n,factory:n.\u0275fac,providedIn:"root"})};var re=class{constructor(e){this.catalog=e}assemble(e,t,i){let r=new Map(this.catalog.options(e,t).map(p=>[p.key,p])),o={};for(let[p,O]of Object.entries(i)){if(O==null||O==="")continue;let k=r.get(p),he=this.convert(p,k?.type,O);this.setNested(o,p,he)}return o}convert(e,t,i){if(t==="string-list")return this.stringList(i);if(t==="number-list")return this.numberList(i);if(t==="key-value-list"){let r=this.keyValuePairs(i);return e==="customHeaders"&&r?Object.entries(r).map(([o,p])=>({headerName:o,envVarName:p})):r}if(t==="number"){let r=typeof i=="number"?i:Number(i);return Number.isFinite(r)?r:void 0}return t==="boolean"?!!i:i}stringList(e){let t=String(e).split(",").map(i=>i.trim()).filter(Boolean);return t.length?t:void 0}numberList(e){let t=String(e).split(",").map(i=>i.trim()).filter(Boolean).map(Number).filter(Number.isFinite);return t.length?t:void 0}keyValuePairs(e){let t={};for(let i of String(e).split(",")){let r=i.indexOf("=");if(r<0)continue;let o=i.slice(0,r).trim(),p=i.slice(r+1).trim();o&&(t[o]=p)}return Object.keys(t).length?t:void 0}setNested(e,t,i){if(i==null||i===""||Array.isArray(i)&&i.length===0)return;let r=t.split("."),o=e;for(let p of r.slice(0,-1))(typeof o[p]!="object"||o[p]===null)&&(o[p]={}),o=o[p];o[r.at(-1)]=i}};var pe=class n{constructor(e,t,i,r,o){this.openService=e;this.sqlService=t;this.graphQLService=i;this.protobufService=r;this.payloadAssembler=o}generate(e){return e.sourceType==="openapi"?this.generateOpenApi(e):e.s
209ourceType==="sql"?this.generateSql(e):e.sourceType==="graphql"?this.generateGraphQL(e):e.sourceType==="protobuf"?this.generateProtobuf(e):null}generateOpenApi(e){let t=this.payloadAssembler.assemble(e.sourceType,e.selectedConverter,e.converterOptions);e.inputMethod==="url"?t.openApiSpecUrl=e.url:t.openApiSpec=e.content;let r={angular:o=>this.openService.angular(o),react:o=>this.openService.react(o),"typescript-fetch":o=>this.openService.typescriptFetch(o),"csharp-httpclient":o=>this.openService.csharpHttpclient(o),"go-nethttp":o=>this.openService.goNethttp(o),"java-spring":o=>this.openService.javaSpring(o),"kotlin-ktor":o=>this.openService.kotlinKtor(o),"python-httpx":o=>this.openService.pythonHttpx(o),"rust-reqwest":o=>this.openService.rustReqwest(o),"swift-urlsession":o=>this.openService.swiftUrlsession(o)}[e.selectedConverter];return r?r(t):null}generateSql(e){let t=M(b({},this.payloadAssembler.assemble(e.sourceType,e.selectedConverter,e.converterOptions)),{ddlSource:e.content}),r={typescript:o=>this.sqlService.typescript(o),csharp:o=>this.sqlService.csharp(o),go:o=>this.sqlService.go(o),python:o=>this.sqlService.python(o),java:o=>this.sqlService.java(o),kotlin:o=>this.sqlService.kotlin(o),groovy:o=>this.sqlService.groovy(o),scala:o=>this.sqlService.scala(o),swift:o=>this.sqlService.swift(o),php:o=>this.sqlService.php(o),rust:o=>this.sqlService.rust(o)}[e.selectedConverter];return r?r(t):null}generateGraphQL(e){let t=M(b({},this.payloadAssembler.assemble(e.sourceType,e.selectedConverter,e.converterOptions)),{graphQLSchema:e.content}),r={angular:o=>this.graphQLService.angular(o),react:o=>this.graphQLService.react(o),"typescript-fetch":o=>this.graphQLService.typescriptFetch(o),"csharp-httpclient":o=>this.graphQLService.csharpHttpclient(o),"go-nethttp":o=>this.graphQLService.goNethttp(o),"java-spring":o=>this.graphQLService.javaSpring(o),"kotlin-ktor":o=>this.graphQLService.kotlinKtor(o),"python-httpx":o=>this.graphQLService.pythonHttpx(o),"rust-reqwest":o=>this.graphQLService.rustReqwest(o),"swift-urlsession":o=>this.graphQLService.swiftUrlsession(o)}[e.selectedConverter];return r?r(t):null}generateProtobuf(e){let t=M(b({},this.payloadAssembler.assemble(e.sourceType,e.selectedConverter,e.converterOptions)),{protoSource:e.content}),r={angular:o=>this.protobufService.angular(o),react:o=>this.protobufService.react(o),"typescript-fetch":o=>this.protobufService.typescriptFetch(o),"csharp-httpclient":o=>this.protobufService.csharpHttpclient(o),"go-nethttp":o=>this.protobufService.goNethttp(o),"java-spring":o=>this.protobufService.javaSpring(o),"kotlin-ktor":o=>this.protobufService.kotlinKtor(o),"python-httpx":o=>this.protobufService.pythonHttpx(o),"rust-reqwest":o=>this.protobufService.rustReqwest(o),"swift-urlsession":o=>this.protobufService.swiftUrlsession(o)}[e.selectedConverter];return r?r(t):null}static \u0275fac=function(t){return new(t||n)(F(Ue),F(Be),F(qe),F(je),F(re))};static \u0275prov=w({token:n,factory:n.\u0275fac})};var ue=class n{constructor(e){this.targets=e}sourceType(e){return this.targets.sourceType(e)}isValidTarget(e,t){return this.targets.isValid(e,t)}static \u0275fac=function(t){return new(t||n)(F(U))};static \u0275prov=w({token:n,factory:n.\u0275fac})};var me=class n{constructor(e,t,i){this.meta=e;this.title=t;this.generationDataFlow=i}apply(){this.title.setTitle("Convert OpenAPI, GraphQL, Protobuf & SQL to 11 Languages | MetaEngine"),this.meta.updateTag({name:"description",content:this.generationDataFlow.browserMetaDescription}),this.meta.updateTag({name:"keywords",content:"code converter, OpenAPI code generation, GraphQL code generation, Protobuf code generation, SQL code generation, TypeScript, Python, Go, C#, Java, Kotlin, Rust, Swift, PHP, Scala, Groovy, Angular, React, browser-based, free code generator"}),this.meta.updateTag({property:"og:title",content:"Convert OpenAPI, GraphQL, Protobuf & SQL \u2014 MetaEngine"}),this.meta.updateTag({property:"og:description",content:this.generationDataFlow.browserMetaDescription}),this.meta.updateTag({property:"og:type",content:"website"}),this.meta.updateTag({name:"twitter:card",content:"summary_large_image"}),this.meta.updateTag({name:"twitter:title",content:"Convert OpenAPI, GraphQL, Protobuf & SQL \u2014 MetaEngine"}),this.meta.updateTag({name:"twitter:description",content:this.generationDataFlow.browserMetaDescription})}static \u0275fac=function(t){return new(t||n)(F(Pt),F(Mt),F(ke))};static \u0275prov=w({token:n,factory:n.\u0275fac})};var Rr=[{value:"",label:"(none)"},{value:"root",label:"root"},{value:"platform",label:"platform"},{value:"any",label:"any"}],Er=[{value:"",label:"(none)"},{value:"AutoProvided",label:"AutoProvided"},{value:"ComponentScoped",label:"ComponentScoped"}],Vr=[{value:"",label:"(default \u2014 encoding/json)"},{value:"encoding/json",label:"encoding/json"},{value:"jsoniter",label:"jsoniter"},{value:"go-json",label:"go-json"}],Ar={key:"documentation",label:"Documentation",type:"boolean"},Tr={key:"fragments",label:"Emit Fragments",type:"boolean",hint:"Emit reusable named GraphQL fragments."},Ir={key:"optionsObjectThreshold",label:"Options Object Threshold",type:"number",placeholder:"4"},Nr={key:"customScalars",label:"Custom Scalars",type:"key-value-list",placeholder:"DateTime=Instant, BigInt=long",hint:"Comma-separated scalarName=targetTypeSlug pairs."},Fr={key:"errorHandling.enabled",label:"Error Handling",type:"boolean",hint:"Map HTTP status codes to typed errors / nulls."},Lr={key:"errorHandling.returnNullForStatusCodes",label:"Return Null For Codes",type:"number-list",placeholder:"404, 403",depen
209dsOn:{key:"errorHandling.enabled",value:!0}},Gr={key:"errorHandling.throwForStatusCodes",label:"Throw For Codes",type:"number-list",placeholder:"500, 401",dependsOn:{key:"errorHandling.enabled",value:!0}},Ur={key:"timeout.seconds",label:"Timeout (seconds)",type:"number",placeholder:"30"},Br={key:"timeout.connect",label:"Connect Timeout",type:"number",placeholder:"5"},qr={key:"timeout.read",label:"Read Timeout",type:"number",placeholder:"15"},jr={key:"timeout.write",label:"Write Timeout",type:"number",placeholder:"15"},Hr={key:"bearerAuth.envVarName",label:"Bearer Token Env Var",type:"string",placeholder:"API_TOKEN"},zr={key:"bearerAuth.headerName",label:"Bearer Header Override",type:"string",placeholder:"Authorization"},$r={key:"basicAuth.usernameEnvVar",label:"Basic Auth Username Env",type:"string",placeholder:"API_USER"},Qr={key:"basicAuth.passwordEnvVar",label:"Basic Auth Password Env",type:"string",placeholder:"API_PASS"},Kr={key:"retries.maxAttempts",label:"Max Retry Attempts",type:"number",placeholder:"3"},Wr={key:"retries.baseDelaySeconds",label:"Retry Base Delay (s)",type:"number",placeholder:"0.5"},Jr={key:"retries.maxDelaySeconds",label:"Retry Max Delay (s)",type:"number",placeholder:"30"},Yr={key:"retries.retryStatusCodes",label:"Retry Status Codes",type:"number-list",placeholder:"429, 503"},Zr={key:"customHeaders",label:"Custom Headers",type:"key-value-list",placeholder:"X-Tenant-ID=TENANT_ID",hint:"Comma-separated headerName=envVarName pairs."},H=[Ar,Tr,Ir,Nr,Fr,Lr,Gr,Ur,Br,qr,jr,Hr,zr,$r,Qr,Kr,Wr,Jr,Yr,Zr],dn=[{key:"angular",label:"Angular",options:[{key:"useInjectFunction",label:"Use inject() Function",type:"boolean"},{key:"providedIn",label:"Provided In",type:"button-group",selectOptions:Rr,disabledWhen:{key:"serviceDecorator"}},{key:"serviceDecorator",label:"Service Decorator",type:"button-group",selectOptions:Er,disabledWhen:{key:"providedIn"},hint:"Angular 22+ @Service decorator (auto-enables inject() DI). Mutually exclusive with Provided In."},{key:"baseUrlToken",label:"Base URL Token",type:"string",placeholder:"BASE_URL",defaultValue:"BASE_URL"},{key:"useInterceptors",label:"Use Interceptors",type:"boolean"},{key:"responseDateTransformation",label:"Date Transformation",type:"boolean"},{key:"useTypesBarrel",label:"Use Types Barrel",type:"boolean"},...H]},{key:"react",label:"React",options:[{key:"useTanStackQuery",label:"Use TanStack Query",type:"boolean"},{key:"useMiddleware",label:"Use Middleware",type:"boolean"},{key:"useTypesBarrel",label:"Use Types Barrel",type:"boolean"},{key:"responseDateTransformation",label:"Date Transformation",type:"boolean"},{key:"baseUrlEnvVar",label:"Base URL Env Var",type:"string",placeholder:"REACT_APP_GRAPHQL_URL",defaultValue:"REACT_APP_GRAPHQL_URL"},...H]},{key:"typescript-fetch",label:"TypeScript Fetch",options:[{key:"baseUrlEnvVar",label:"Base URL Env Var",type:"string",placeholder:"GRAPHQL_BASE_URL",defaultValue:"GRAPHQL_BASE_URL"},{key:"useImportMetaEnv",label:"Use import.meta.env",type:"boolean",dependsOn:{key:"baseUrlEnvVar"}},{key:"useMiddleware",label:"Use Middleware",type:"boolean"},{key:"useResultPattern",label:"Use Result Pattern",type:"boolean"},{key:"useTypesBarrel",label:"Use Types Barrel",type:"boolean"},{key:"responseDateTransformation",label:"Date Transformation",type:"boolean"},...H]},{key:"csharp-httpclient",label:"C# HttpClient",options:[{key:"namespaceName",label:"Namespace",type:"string",required:!0,placeholder:"MyApp.GraphQL",defaultValue:"MetaEngine.GraphQL"},{key:"useMiddleware",label:"Use Middleware",type:"boolean"},...H]},{key:"go-nethttp",label:"Go (net/http)",options:[{key:"moduleName",label:"Module Name",type:"string",required:!0,placeholder:"github.com/user/project",defaultValue:"github.com/meta-engine/example"},{key:"packageName",label:"Package Name",type:"string",required:!0,placeholder:"graphql",defaultValue:"graphql"},{key:"useContext",label:"Use context.Context",type:"boolean"},{key:"jsonLibrary",label:"JSON Library",type:"select",selectOptions:Vr},{key:"usePointersForOmittable",label:"Pointers for Omittable",type:"boolean"},{key:"useValidateStructTags",label:"Validate Struct Tags",type:"boolean"},{key:"useMiddleware",label:"Use Middleware",type:"boolean"},...H]},{key:"java-spring",label:"Java Spring",options:[{key:"packageName",label:"Package Name",type:"string",required:!0,placeholder:"com.example.graphql",defaultValue:"com.metaengine.example"},{key:"beanValidation",label:"Bean Validation",type:"boolean"},{key:"nonNullSerialization",label:"Non-Null Serialization",type:"boolean"},{key:"baseUrlProperty",label:"Base URL Property",type:"string",placeholder:"api.base-url"},...H]},{key:"kotlin-ktor",label:"Kotlin Ktor",options:[{key:"packageName",label:"Package Name",type:"string",required:!0,placeholder:"com.example.graphql",defaultValue:"com.metaengine.example"},...H]},{key:"python-httpx",label:"Python httpx",options:[{key:"baseUrlEnvVar",label:"Base URL Env Var",type:"string",placeholder:"GRAPHQL_BASE_URL",defaultValue:"GRAPHQL_BASE_URL"},{key:"generateSyncMethods",label:"Sync Methods",type:"boolean"},{key:"useCamelCaseAliases",label:"camelCase Aliases",type:"boolean"},{key:"useMiddleware",label:"Use Middleware",type:"boolean"},...H]},{key:"rust-reqwest",label:"Rust Reqwest",options:[...H]},{key:"swift-urlsession",label:"Swift URLSession",options:[{key:"typedThrows",label:"Typed Throws",type:"boolean"}
209,{key:"strictEnums",label:"Strict Enums",type:"boolean"},{key:"useMiddleware",label:"Use Middleware",type:"boolean"},...H]}];var pn=[{id:"typescript",label:"TypeScript",ext:"ts",apiConverterKeys:["angular","react","typescript-fetch"],sqlConverterKey:"typescript",sub:"Angular \xB7 React \xB7 Fetch",subTargets:[{id:"angular",label:"Angular",apiConverterKey:"angular"},{id:"react",label:"React",apiConverterKey:"react"},{id:"fetch",label:"Fetch",apiConverterKey:"typescript-fetch"}]},{id:"csharp",label:"C#",ext:"cs",apiConverterKeys:["csharp-httpclient"],sqlConverterKey:"csharp",sub:".NET \xB7 HttpClient"},{id:"go",label:"Go",ext:"go",apiConverterKeys:["go-nethttp"],sqlConverterKey:"go",sub:"net/http"},{id:"groovy",label:"Groovy",ext:"groovy",apiConverterKeys:[],sqlConverterKey:"groovy",sub:"JVM \xB7 SQL models"},{id:"java",label:"Java",ext:"java",apiConverterKeys:["java-spring"],sqlConverterKey:"java",sub:"Spring RestClient"},{id:"kotlin",label:"Kotlin",ext:"kt",apiConverterKeys:["kotlin-ktor"],sqlConverterKey:"kotlin",sub:"Ktor \xB7 kotlinx"},{id:"php",label:"PHP",ext:"php",apiConverterKeys:[],sqlConverterKey:"php",sub:"SQL models"},{id:"python",label:"Python",ext:"py",apiConverterKeys:["python-httpx"],sqlC
209onverterKey:"python",sub:"async/await \xB7 httpx"},{id:"rust",label:"Rust",ext:"rs",apiConverterKeys:["rust-reqwest"],sqlConverterKey:"rust",sub:"reqwest \xB7 serde"},{id:"scala",label:"Scala",ext:"scala",apiConverterKeys:[],sqlConverterKey:"scala",sub:"JVM \xB7 SQL models"},{id:"swift",label:"Swift",ext:"swift",apiConverterKeys:["swift-urlsession"],sqlConverterKey:"swift",sub:"URLSession \xB7 actor"}];var Xr=[{value:"",label:"(none)"},{value:"root",label:"root"},{value:"platform",label:"platform"},{value:"any",label:"any"}],eo=[{value:"",label:"(none)"},{value:"AutoProvided",label:"AutoProvided"},{value:"ComponentScoped",label:"ComponentScoped"}],to=[{value:"",label:"(default \u2014 encoding/json)"},{value:"encoding/json",label:"encoding/json"},{value:"jsoniter",label:"jsoniter"},{value:"go-json",label:"go-json"}],no={key:"documentation",label:"Documentation",type:"boolean"},io={key:"strictValidation",label:"Strict Validation",type:"boolean",hint:"Fail-fast on spec issues that the engine would otherwise tolerate."},ro={key:"optionsObjectThreshold",label:"Options Object Threshold",type:"number",placeholder:"4",hint:"Param count before grouping into an options object."},oo={key:"includeTags",label:"Include Tags",type:"string-list",placeholder:"pets, users",hint:"Comma-separated. Only operations with these tags are emitted."},ao={key:"typeMappings",label:"Type Mappings",type:"key-value-list",placeholder:"int64=long, date-time=Instant",hint:"Comma-separated key=value. Overrides target type per OpenAPI primitive/format (int64, decimal, date-time, date)."},so={key:"errorHandling.enabled",label:"Error Handling",type:"boolean",hint:"Map HTTP status codes to typed errors / nulls."},lo={key:"errorHandling.returnNullForStatusCodes",label:"Return Null For Codes",type:"number-list",placeholder:"404, 403",dependsOn:{key:"errorHandling.enabled",value:!0}},co={key:"errorHandling.throwForStatusCodes",label:"Throw For Codes",type:"number-list",placeholder:"500, 401",dependsOn:{key:"errorHandling.enabled",value:!0}},po={key:"timeout.seconds",label:"Timeout (seconds)",type:"number",placeholder:"30"},uo={key:"timeout.connect",label:"Connect Timeout",type:"number",placeholder:"5"},mo={key:"timeout.read",label:"Read Timeout",type:"number",placeholder:"15"},ho={key:"timeout.write",label:"Write Timeout",type:"number",placeholder:"15"},go={key:"bearerAuth.envVarName",label:"Bearer Token Env Var",type:"string",placeholder:"API_TOKEN"},fo={key:"bearerAuth.headerName",label:"Bearer Header Override",type:"string",placeholder:"Authorization"},vo={key:"basicAuth.usernameEnvVar",label:"Basic Auth Username Env",type:"string",placeholder:"API_USER"},_o={key:"basicAuth.passwordEnvVar",label:"Basic Auth Password Env",type:"string",placeholder:"API_PASS"},yo={key:"retries.maxAttempts",label:"Max Retry Attempts",type:"number",placeholder:"3"},bo={key:"retries.baseDelaySeconds",label:"Retry Base Delay (s)",type:"number",placeholder:"0.5"},Co={key:"retries.maxDelaySeconds",label:"Retry Max Delay (s)",type:"number",placeholder:"30"},xo={key:"retries.retryStatusCodes",label:"Retry Status Codes",type:"number-list",placeholder:"429, 503"},So={key:"customHeaders",label:"Custom Headers",type:"key-value-list",placeholder:"X-Tenant-ID=TENANT_ID, X-Trace=TRACE_ID",hint:"Comma-separated headerName=envVarName pairs."},z=[no,io,ro,oo,ao,so,lo,co,po,uo,mo,ho,go,fo,vo,_o,yo,bo,Co,xo,So],un=[{key:"angular",label:"Angular",options:[{key:"useInjectFunction",label:"Use inject() Function",type:"boolean"},{key:"providedIn",label:"Provided In",type:"button-group",selectOptions:Xr,disabledWhen:{key:"serviceDecorator"}},{key:"serviceDecorator",label:"Service Decorator",type:"button-group",selectOptions:eo,disabledWhen:{key:"providedIn"},hint:"Angular 22+ @Service decorator (auto-enables inject() DI). Mutually exclusive with Provided In."},{key:"baseUrlToken",label:"Base URL Token",type:"string",placeholder:"BASE_URL",defaultValue:"BASE_URL"},{key:"useHttpResources",label:"Use httpResource",type:"boolean"},{key:"httpResourceTrigger",label:"httpResource Trigger",type:"boolean",dependsOn:{key:"useHttpResources",value:!0}},{key:"useInterceptors",label:"Use Interceptors",type:"boolean"},{key:"responseDateTransformation",label:"Date Transformation",type:"boolean"},...z]},{key:"react",label:"React",options:[{key:"useTanStackQuery",label:"Use TanStack Query",type:"boolean"},{key:"useTypesBarrel",label:"Use Types Barrel",type:"boolean"},{key:"responseDateTransformation",label:"Date Transformation",type:"boolean"},{key:"baseUrlEnvVar",label:"Base URL Env Var",type:"string",placeholder:"REACT_APP_API_URL",defaultValue:"REACT_APP_API_URL"},...z]},{key:"typescript-fetch",label:"TypeScript Fetch",options:[{key:"baseUrlEnvVar",label:"Base URL Env Var",type:"string",placeholder:"API_BASE_URL",defaultValue:"API_BASE_URL"},{key:"useImportMetaEnv",label:"Use import.meta.env",type:"boolean",dependsOn:{key:"baseUrlEnvVar"}},{key:"useMiddleware",label:"Use Middleware",type:"boolean"},{key:"useResultPattern",label:"Use Result Pattern",type:"boolean"},{key:"useTypesBarrel",label:"Use Types Barrel",type:"boolean"},...z]},{key:"csharp-httpclient",label:"C# HttpClient",options:[{key:"namespaceName",label:"Namespace",type:"string",required:!0,placeholder:"MyApp.Api",defaultValue:"MetaEngine.Api"},...z]},{key:"go-nethttp",label:"Go (net/http)",options:[{key:"moduleName",label:"Module Name",type:"string",required:!0,placeholder:"github.com/user/project",defaultValue:"github.com/meta-engine/example"},{key:"packageName",label:"Package Name",type:"string",required:!0,placeholder:"api",defaultValue:"api"},{key:"useContext",label:"Use context.Context",type:"boolean"},{key:"jsonLibrary",label:"JSON Library",type:"select",selectOptions:to},{key:"usePointersForOmittable",label:"Pointers for Omittable",type:"boolean"},{key:"useValidateStructTags",label:"Validate Struct Tags",type:"boolean"},{key:"baseUrlEnvVar",label:"Base URL Env Var",type:"string",placeholder:"API_BASE_URL",defaultValue:"API_BASE_URL"},...z]},{key:"java-spring",label:"Java Spring",options:[{key:"packageName",label:"Package Name",type:"string",required:!0,placeholder:"com.example.api",defaultValue:"com.metaengine.example"},{key:"beanValidation",label:"Bean Validation",type:"boolean"},{key:"nonNullSerialization",label:"Non-Null Serialization",type:"boolean"},{key:"baseUrlProperty",label:"Base URL Property",type:"string",placeholder:"api.base-url"},...z]}
209,{key:"kotlin-ktor",label:"Kotlin Ktor",options:[{key:"packageName",label:"Package Name",type:"string",required:!0,placeholder:"com.example.api",defaultValue:"com.metaengine.example"},...z]},{key:"python-httpx",label:"Python httpx",options:[{key:"generateSyncMethods",label:"Sync Methods",type:"boolean"},{key:"useCamelCaseAliases",label:"camelCase Aliases",type:"boolean"},{key:"baseUrlEnvVar",label:"Base URL Env Var",type:"string",placeholder:"API_BASE_URL",defaultValue:"API_BASE_URL"},...z]},{key:"rust-reqwest",label:"Rust Reqwest",options:[{key:"strictEnums",label:"Strict Enums",type:"boolean"},...z]},{key:"swift-urlsession",label:"Swift URLSession",options:[{key:"typedThrows",label:"Typed Throws",type:"boolean"},{key:"strictEnums",label:"Strict Enums",type:"boolean"},...z]}];var Oo=[{value:"",label:"(none)"},{value:"root",label:"root"},{value:"platform",label:"platform"},{value:"any",label:"any"}],ko=[{value:"",label:"(none)"},{value:"AutoProvided",label:"AutoProvided"},{value:"ComponentScoped",label:"ComponentScoped"}],Po=[{value:"",label:"(default \u2014 encoding/json)"},{value:"encoding/json",label:"encoding/json"},{value:"jsoniter",label:"jsoniter"},{value:"go-json",label:"go-json"}],Mo={key:"documentation",label:"Documentation",type:"boolean"},wo={key:"optionsObjectThreshold",label:"Options Object Threshold",type:"number",placeholder:"4"},Do={key:"errorHandling.enabled",label:"Error Handling",type:"boolean",hint:"Map HTTP status codes to typed errors / nulls."},Ro={key:"errorHandling.returnNullForStatusCodes",label:"Return Null For Codes",type:"number-list",placeholder:"404, 403",dependsOn:{key:"errorHandling.enabled",value:!0}},Eo={key:"errorHandling.throwForStatusCodes",label:"Throw For Codes",type:"number-list",placeholder:"500, 401",dependsOn:{key:"errorHandling.enabled",value:!0}},Vo={key:"timeout.seconds",label:"Timeout (seconds)",type:"number",placeholder:"30"},Ao={key:"timeout.connect",label:"Connect Timeout",type:"number",placeholder:"5"},To={key:"timeout.read",label:"Read Timeout",type:"number",placeholder:"15"},Io={key:"timeout.write",label:"Write Timeout",type:"number",placeholder:"15"},No={key:"bearerAuth.envVarName",label:"Bearer Token Env Var",type:"string",placeholder:"API_TOKEN"},Fo={key:"bearerAuth.headerName",label:"Bearer Header Override",type:"string",placeholder:"Authorization"},Lo={key:"basicAuth.usernameEnvVar",label:"Basic Auth Username Env",type:"string",placeholder:"API_USER"},Go={key:"basicAuth.passwordEnvVar",label:"Basic Auth Password Env",type:"string",placeholder:"API_PASS"},Uo={key:"retries.maxAttempts",label:"Max Retry Attempts",type:"number",placeholder:"3"},Bo={key:"retries.baseDelaySeconds",label:"Retry Base Delay (s)",type:"number",placeholder:"0.5"},qo={key:"retries.maxDelaySeconds",label:"Retry Max Delay (s)",type:"number",placeholder:"30"},jo={key:"retries.retryStatusCodes",label:"Retry Status Codes",type:"number-list",placeholder:"429, 503"},Ho={key:"customHeaders",label:"Custom Headers",type:"key-value-list",placeholder:"X-Tenant-ID=TENANT_ID",hint:"Comma-separated headerName=envVarName pairs."},$=[Mo,wo,Do,Ro,Eo,Vo,Ao,To,Io,No,Fo,Lo,Go,Uo,Bo,qo,jo,Ho],mn=[{key:"angular",label:"Angular",options:[{key:"useInjectFunction",label:"Use inject() Function",type:"boolean"},{key:"providedIn",label:"Provided In",type:"button-group",selectOptions:Oo,disabledWhen:{key:"serviceDecorator"}},{key:"serviceDecorator",label:"Service Decorator",type:"button-group",selectOptions:ko,disabledWhen:{key:"providedIn"},hint:"Angular 22+ @Service decorator (auto-enables inject() DI). Mutually exclusive with Provided In."},{key:"baseUrlToken",label:"Base URL Token",type:"string",placeholder:"BASE_URL",defaultValue:"BASE_URL"},{key:"useInterceptors",label:"Use Interceptors",type:"boolean"},{key:"responseDateTransformation",label:"Date Transformation",type:"boolean"},...$]},{key:"react",label:"React",options:[{key:"useTanStackQuery",label:"Use TanStack Query",type:"boolean"},{key:"useTypesBarrel",label:"Use Types Barrel",type:"boolean"},{key:"responseDateTransformation",label:"Date Transformation",type:"boolean"},{key:"baseUrlEnvVar",label:"Base URL Env Var",type:"string",placeholder:"REACT_APP_API_URL",defaultValue:"REACT_APP_API_URL"},...$]},{key:"typescript-fetch",label:"TypeScript Fetch",options:[{key:"baseUrlEnvVar",label:"Base URL Env Var",type:"string",placeholder:"API_BASE_URL",defaultValue:"API_BASE_URL"},{key:"useImportMetaEnv",label:"Use import.meta.env",type:"boolean",dependsOn:{key:"baseUrlEnvVar"}},{key:"useMiddleware",label:"Use Middleware",type:"boolean"},{key:"useResultPattern",label:"Use Result Pattern",type:"boolean"},{key:"useTypesBarrel",label:"Use Types Barrel",type:"boolean"},{key:"responseDateTransformation",label:"Date Transformation",type:"boolean"},...$]},{key:"csharp-httpclient",label:"C# HttpClient",options:[{key:"namespaceName",label:"Namespace",type:"string",required:!0,placeholder:"MyApp.Grpc",defaultValue:"MetaEngine.Grpc"},{key:"useDependencyInjection",label:"Use Dependency Injection",type:"boolean"},...$]},{key:"go-nethttp",label:"Go (net/http)",options:[{key:"moduleName",label:"Module Name",type:"string",required:!0,placeholder:"github.com/user/project",defaultValue:"github.com/meta-engine/example"},{key:"packageName",label:"Package Name",type:"string",required:!0,placeholder:"proto",defaultValue:"proto"},{key:"useContext",label:"Use context.Context",type:"boolean"},{key:"jsonLibrary",label:"JSON Library",type:"select",selectOptions:Po},{key:"usePointersForOmittable",label:"Pointers for Omittable",type:"boolean"},{key:"useValidateStructTags",label:"Validate Struct Tags",type:"boolean"},{key:"baseUrlEnvVar",label:"Base URL Env Var",type:"string",placeholder:"API_BASE_URL",defaultValue:"API_BASE_URL"},...$]},{key:"java-spring",label:"Java Spring",options:[{key:"packageName",label:"Package Name",type:"string",required:!0,placeholder:"com.example.proto",defaultValue:"com.metaengine.example"},{key:"beanValidation",label:"Bean Validation",type:"boolean"},{key:"nonNullSerialization",label:"Non-Null Serialization",type:"boolean"},{key:"baseUrlProperty",label:"Base URL Property",type:"string",placeholder:"api.base-url"},...$]},{key:"kotlin-ktor",label:"Kotlin Ktor",options:[{key:"packageName",label:"Package Name",type:"string",required:!0,placeholder:"com.example.proto",defaultValue:"com.metaengine.example"},...$]},{key:"python-httpx",label:"Python httpx",options:[{key:"generateSyncMethods",label:"Sync Methods",type:"boolean"},{key:"useCamelCaseAliases",label:"camelCase Aliases",type:"boolean"},{key:"baseUrlEnvVar",label:"Base URL Env Var",type:"string",placeholder:"API_BASE_URL",defaultValue:"API_BASE_URL"},...$]},{key:"rust-reqwest",label:"Rust Reqwest",options:[...$]},{key:"swift-urlsession",label:"Swift URLSession",options:[{key:"typedThrows",label:"Typed Throws",type:"boolean"}
209,{key:"strictEnums",label:"Strict Enums",type:"boolean"},...$]}];var zo=[{value:"",label:"(default \u2014 string)"},{value:"string",label:"string (raw JSON)"},{value:"object",label:"object (parsed)"}],$o=[{value:"",label:"(default \u2014 dataclass)"},{value:"dataclass",label:"Dataclass"},{value:"pydantic",label:"Pydantic"},{value:"plain",label:"Plain"}],Qo={key:"generateInterfaces",label:"Generate Interfaces",type:"boolean",hint:"Interface/protocol/trait output vs concrete record/dataclass."},Ko={key:"generateInterfaces",label:"Generate Traits",type:"boolean",hint:"Maps to GenerateInterfaces on the engine side."},hn={key:"generateNavigationProperties",label:"Navigation Properties",type:"boolean",hint:"Foreign-key navigation properties on models."},gn={key:"generateValidationAnnotations",label:"Validation Annotations",type:"boolean",hint:"Emit validation annotations from column constraints."},fn={key:"initializeProperties",label:"Initialize Properties",type:"boolean",hint:"Default values on model properties."},vn={key:"singularTypeNames",label:"Singular Type Names",type:"boolean",hint:"`users` table \u2192 `User` type."},_n={key:"precisionSafeDecimals",label:"Precision-Safe Decimals",type:"boolean",hint:"Decimal as `string`/precision-safe type instead of float."},yn={key:"jsonAs",label:"JSON As",type:"select",selectOptions:zo,hint:"How to model SQL JSON columns."},bn={key:"schemaPrefix",label:"Schema Prefix",type:"string",placeholder:"Auth_",hint:"Prepend SQL schema name (e.g. `Auth_User`)."},Q=[Qo,hn,gn,fn,vn,_n,yn,bn],Wo=[Ko,hn,gn,fn,vn,_n,yn,bn],Cn=[{key:"typescript",label:"TypeScript",options:[...Q]},{key:"csharp",label:"C#",options:[{key:"namespace",label:"Namespace",type:"string",placeholder:"MyApp.Models"},...Q]},{key:"go",label:"Go",options:[{key:"moduleName",label:"Module Name",type:"string",required:!0,placeholder:"github.com/user/project",defaultValue:"github.com/meta-engine/example"},...Q]},{key:"python",label:"Python",options:[{key:"modelStyle",label:"Model Style",type:"select",selectOptions:$o},...Q]},{key:"java",label:"Java",options:[{key:"packageName",label:"Package Name",type:"string",required:!0,placeholder:"com.example.models",defaultValue:"com.metaengine.example"},...Q]},{key:"kotlin",label:"Kotlin",options:[{key:"packageName",label:"Package Name",type:"string",required:!0,placeholder:"com.example.models",defaultValue:"com.metaengine.example"},...Q]},{key:"groovy",label:"Groovy",options:[{key:"packageName",label:"Package Name",type:"string",required:!0,placeholder:"com.example.models",defaultValue:"com.metaengine.example"},...Q]},{key:"scala",label:"Scala",options:[{key:"packageName",label:"Package Name",type:"string",required:!0,placeholder:"com.example.models",defaultValue:"com.metaengine.example"},...Wo]},{key:"swift",label:"Swift",options:[...Q]},{key:"php",label:"PHP",options:[{key:"rootNamespace",label:"Root Namespace",type:"string",required:!0,placeholder:"App\\Models",defaultValue:"MetaEngine\\Models"},{key:"useStrictTypes",label:"Use Strict Types",type:"boolean",defaultValue:!0},...Q]},{key:"rust",label:"Rust",options:[...Q]}];var Jo={openapi:un,sql:Cn,graphql:dn,protobuf:mn},Yo={openapi:"openapi",sql:"sql",graphql:"graphql",protobuf:"protobuf"},Zo=[{title:"Naming",keys:["namespace","namespaceName","packageName","moduleName","rootNamespace","baseUrlToken","baseUrlEnvVar","baseUrlProperty"]},{title:"Runtime",keys:["useInjectFunction","providedIn","serviceDecorator","useHttpResources","httpResourceTrigger","useInterceptors","useTanStackQuery","useImportMetaEnv","useMiddleware","useResultPattern","generateSyncMethods","useCamelCaseAliases","useContext","jsonLibrary","usePointersForOmittable","useValidateStructTags","useDependencyInjection","typedThrows","useStrictTypes"]},{title:"Output",keys:["documentation","fragments","discriminatedUnions","useTypesBarrel","responseDateTransformation","optionsObjectThreshold","beanValidation","nonNullSerialization","strictEnums","strictValidation","includeTags","typeMappings","customScalars","generateInterfaces","generateNavigationProperties","generateValidationAnnotations","initializeProperties","modelStyle","singularTypeNames","precisionSafeDecimals","jsonAs","schemaPrefix"]},{title:"Options"},{title:"Error Handling",prefixes:["errorHandling."]},{title:"Timeout",prefixes:["timeout."]},{title:"Auth",prefixes:["bearerAuth.","basicAuth."]},{title:"Retries",prefixes:["retries."]},{title:"Headers",keys:["customHeaders"]}],xn=[{provide:K,useFactory:()=>new K(Jo)},{provide:W,useFactory:n=>new W(n),deps:[K]},{provide:ie,useFactory:()=>new ie(Zo,"Options")},{provide:re,useFactory:n=>new re(n),deps:[K]},{provide:U,useFactory:()=>new U(pn,Yo)}];function Xo(n,e){if(n&1){let t=S();s(0,"div",7)(1,"span",11),d(2,"Error"),a(),s(3,"span",12),d(4),a(),s(5,"button",13),g("click",function(){C(t);let r=c();return x(r.clearError())}),y(6,"app-icon",14),a()()}n&2&&(l(4),h(e),l(2),m("size",12))}var Sn=class n{constructor(e,t,i,r,o,p,O,k){this.stateService=e;this.generation=t;this.routeSelection=i;this.seo=r;this.runtimePlatform=o;this.route=p;this.options=O;this.generationDataFlow=k;this.hasResults=e.hasResults,this.error=e.error,this.isLoading=e.isLoading}hasResults;error;isLoading;ngOnInit(){this.seo.apply(),this.hydrateFromQueryParams(),this.runtimePlatform.isBrowser()&&!this.hasResults()&&!this.isLoading()&&this.onGenerate()}
209hydrateFromQueryParams(){let e=this.route.snapshot.queryParamMap,t=e.get("spec"),i=e.get("target"),r=this.routeSelection.sourceType(t);if(!r){this.resetToDefault();return}if(!i){this.reseedWithSourcePreset(r);return}if(!this.routeSelection.isValidTarget(r,i)){console.warn(`[converters] target "${i}" is not valid for spec "${t}"; falling back to source preset`),this.reseedWithSourcePreset(r);return}this.stateService.reseedWith({sourceType:r,selectedConverter:i,converterOptions:this.options.defaults(r,i)})}reseedWithSourcePreset(e){let t=ne[e];this.stateService.reseedWith({sourceType:e,selectedConverter:t.selectedConverter,converterOptions:b({},t.converterOptions)})}resetToDefault(){this.reseedWithSourcePreset("openapi")}clearError(){this.stateService.setError(null)}onGenerate(){let e=this.stateService.selectedSource();if(!e)return;this.stateService.setLoading(!0),this.stateService.setError(null);let t=this.generation.generate(e);if(!t){this.stateService.setLoading(!1),this.stateService.setError("Unknown converter selected");return}t.pipe(dt(()=>this.stateService.setLoading(!1))).subscribe({next:i=>this.stateService.setResult(e.id,i),error:i=>{let r=i.error?.message||i.message||"",o=i.status===400||i.status===422;this.stateService.setError(o?r:"An unexpected error occurred. Please try again.")}})}static \u0275fac=function(t){return new(t||n)(_(N),_(pe),_(ue),_(me),_(Et),_(wt),_(W),_(ke))};static \u0275cmp=V({type:n,selectors:[["app-converters"]],features:[ee([...Rt,...xn,pe,ue,me])],decls:22,vars:5,consts:[[1,"page"],[3,"generate"],["aria-label","Generation data flow",1,"data-flow"],["aria-hidden","true",1,"data-flow__icon"],["name","lock",3,"size"],["target","_blank","rel","noopener",3,"href"],["aria-hidden","true"],["role","alert",1,"error-banner"],[1,"workspace-wrap"],[1,"workspace"],[1,"workspace__cell"],[1,"error-banner__label"],[1,"error-banner__msg"],["type","button","aria-label","Dismiss",1,"error-banner__close",3,"click"],["name","x",3,"size"]],template:function(t,i){if(t&1&&(s(0,"div",0)(1,"app-masthead",1),g("generate",function(){return i.onGenerate()}),a(),s(2,"aside",2)(3,"span",3),y(4,"app-icon",4),a(),s(5,"p"),d(6),a(),s(7,"a",5),d(8),s(9,"span",6),d(10,"\u2197"),a()()(),f(11,Xo,7,2,"div",7),s(12,"div",8)(13,"div",9)(14,"div",10),y(15,"app-source-panel"),a(),s(16,"div",10)(17,"app-options-panel",1),g("generate",function(){return i.onGenerate()}),a()(),s(18,"div",10),y(19,"app-files-panel"),a(),s(20,"div",10),y(21,"app-code-preview-panel"),a()()()()),t&2){let r;l(4),m("size",13),l(2),h(i.generationDataFlow.browserNotice),l(),m("href",i.generationDataFlow.privacyPolicyUrl,mt),l(),D(" ",i.generationDataFlow.privacyPolicyLabel," "),l(3),v((r=i.error())?11:-1,r)}},dependencies:[Ie,Ne,Fe,Le,Ge,I],styles:["[_nghost-%COMP%]{display:block;background:var(--bg-0);min-height:calc(100vh - var(--nav-height))}.page[_ngcontent-%COMP%]{display:flex;flex-direction:column;--workspace-padding: 24px 32px 32px;--workspace-height: calc(100vh - var(--nav-height) - 160px)}.data-flow[_ngcontent-%COMP%]{margin:16px 32px 0;padding:10px 14px;display:flex;align-items:center;gap:12px;border:1px solid var(--line-1);border-radius:var(--r-2);background:var(--bg-1);color:var(--ink-2);font-size:var(--t-xs);line-height:1.5}.data-flow__icon[_ngcontent-%COMP%]{width:28px;height:28px;flex:0 0 28px;display:grid;place-items:center;border:1px solid var(--line-2);border-radius:var(--r-1);color:var(--accent)}.data-flow[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{min-width:0;flex:1;margin:0;overflow-wrap:anywhere}.data-flow[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{min-height:44px;display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;color:var(--accent);text-underline-offset:3px}.error-banner[_ngcontent-%COMP%]{margin:16px 32px 0;padding:10px 14px;display:flex;align-items:center;gap:12px;background:#b54a2a0f;border:1px solid rgba(181,74,42,.25);border-radius:var(--r-2);color:var(--ink-0);font-size:var(--t-sm)}.error-banner__label[_ngcontent-%COMP%]{font-family:var(--font-mono);font-size:var(--t-xs);letter-spacing:.08em;text-transform:uppercase;color:var(--err)}.error-banner__msg[_ngcontent-%COMP%]{flex:1}.error-banner__close[_ngcontent-%COMP%]{width:20px;height:20px;
209display:inline-flex;align-items:center;justify-content:center;color:var(--ink-2);border-radius:var(--r-1)}.error-banner__close[_ngcontent-%COMP%]:hover{color:var(--ink-0);background:var(--bg-2)}.workspace-wrap[_ngcontent-%COMP%]{padding:var(--workspace-padding)}.workspace[_ngcontent-%COMP%]{display:grid;grid-template-columns:280px 300px 260px 1fr;border:1px solid var(--line-1);border-radius:var(--r-4);overflow:hidden;background:var(--bg-1);height:var(--workspace-height);min-height:620px}.workspace__cell[_ngcontent-%COMP%]{min-width:0;border-right:1px solid var(--line-1);overflow:hidden;display:flex;flex-direction:column}.workspace__cell[_ngcontent-%COMP%]:last-child{border-right:none}@media (max-width: 1200px){.workspace[_ngcontent-%COMP%]{grid-template-columns:260px 280px 240px 1fr}}@media (max-width: 991px){.data-flow[_ngcontent-%COMP%]{margin-inline:20px;align-items:flex-start;flex-wrap:wrap}.data-flow[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{margin-left:40px}.workspace[_ngcontent-%COMP%]{grid-template-columns:1fr;height:auto;min-height:0}.workspace__cell[_ngcontent-%COMP%]{border-right:none;border-bottom:1px solid var(--line-1);max-height:60vh}.workspace__cell[_ngcontent-%COMP%]:last-child{border-bottom:none}}"]})};export{Sn as ConvertersComponent};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.