1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2d4792ec-7d9b-5f52-80b4-46a0070834c2")}catch(e){}}(); 3import{a as wo}from"./chunk-5BUT3O5K.js";import{a as go}from"./chunk-S5DRG3CN.js";import"./chunk-XV5QIMWT.js";import{b as W}from"./chunk-Y4TAQZ5L.js";import{i as fo}from"./chunk-OJGT5CO7.js";import"./chunk-PVZKWQQE.js";import{e as po,i as co,k as uo}from"./chunk-RS4OAOOQ.js";import"./chunk-CAZIV44N.js";import"./chunk-XIEPXTT7.js";import{a as mo,b as so}from"./chunk-Z5SC3XPW.js";import"./chunk-C7TPGH4O.js";import"./chunk-OCEDQH3D.js";import{a as Z}from"./chunk-QCZFMUQ2.js";import{a as Q,i as Y}from"./chunk-FYEFAVDI.js";import"./chunk-V32LTTP3.js";import{a as G,b as L,c as K}from"./chunk-75MSKHQ5.js";import"./chunk-6GTHYMO6.js";import"./chunk-LQWW6DAP.js";import"./chunk-QVMKUOA2.js";import{C as ro,F as lo,c as oo,e as I,h as to,i as eo,l as E,o as io,s as no,v as ao}from"./chunk-DUEKGWVE.js";import{b as M,c as D}from"./chunk-SV4QHZ6R.js";import"./chunk-J7WPYGOY.js";import{a as O,k as _,l as v}from"./chunk-WZYMWVAN.js";import{a as q,d as U,e as $,f as H,g as X,h as J}from"./chunk-WO2N3BGC.js";import"./chunk-WHTYCSAG.js";import"./chunk-MIRAE4HP.js";import{b as j,f as C}from"./chunk-LKCBMZWZ.js";import"./chunk-VMBK3ESP.js";import"./chunk-VQM3N5YY.js";import"./chunk-U2S4Q5VS.js";import"./chunk-7B3DFEIE.js";import"./chunk-QFRXUKCK.js";import{$b as x,Bb as h,Ca as w,Ec as l,Fc as c,Gc as g,Wb as V,Yb as k,Zc as s,_b as B,_c as d,ac as N,bc as p,cc as r,dc as e,ec as z,jb as a,lc as P,ma as m,md as R,nc as f,nd as A,sa as S,ta as b,zc as y}from"./chunk-MPV5Q6GW.js";import"./chunk-THKSGHO2.js";function Co(t,T){if(t&1&&(r(0,"mat-option",4),l(1),e()),t&2){let o=T.$implicit;p("value",o),a(),g(" ",o.name," ")}}function Fo(t,T){t&1&&(r(0,"div",6)(1,"mat-icon",7),l(2,"warning"),e(),l(3),s(4,"transloco"),e()),t&2&&(a(3),g(" ",d(4,1,"catalog.multi_image_download.messages.too_large_zip")," "))}var ho=(()=>{class t{#o;constructor(){this.countChecked=A(0),this.download=R(),this.fb=m(ro),this.localStorageKey=m(L),this.#o=K(this.localStorageKey.key(G.CATALOG_V2_BATCH_DOWNLOAD_FORM),{resolution:null,zip_name:Date.now()}),this.downloadForm=this.fb.group({resolution:new E(this.#o().resolution,{validators:[I.required]}),zip_name:new E(this.#o().zip_name,{validators:I.required})}),this._resolutions=[],this.downloadForm.valueChanges.pipe(O()).subscribe(()=>this.#o.set(this.downloadForm.getRawValue()))}get resolutions(){return this._resolutions}set resolutions(o){this._resolutions=o,!this.downloadForm.controls.resolution.value&&this._resolutions.length>0&&this.downloadForm.patchValue({resolution:this._resolutions[0]})}submit(){this.onDownload()}onDownload(){if(!this.downloadForm.valid)return;let o=this.downloadForm.value.resolution;o&&this.download.emit([o,this.downloadForm.value.zip_name+""])}compareResolutions(o,i){return o&&i?o.id===i.id:o===i}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=h({type:t,selectors:[["cat-v2-download-form"]],inputs:{countChecked:[1,"countChecked"],resolutions:"resolutions"},outputs:{download:"download"},decls:15,vars:9,consts:[[3,"ngSubmit","formGroup"],[1,"flex","flex-col","gap-2"],["subscriptSizing","dynamic"],["formControlName","resolution",3,"compareWith"],[3,"value"],["formControlName","zip_name","matInput",""],[1,"flex","gap-1","items-center","text-orange-500"],[1,"min-w-0","shrink-0"]],template:function(i,n){i&1&&(r(0,"form",0),f("ngSubmit",function(){return n.onDownload()}),r(1,"div",1)(2,"mat-form-field",2)(3,"mat-label"),l(4),s(5,"transloco"),e(),r(6,"mat-select",3),x(7,Co,2,2,"mat-option",4,B),e()(),r(9,"mat-form-field",2)(10,"mat-label"),l(11),s(12,"transloco"),e(),z(13,"input",5),e(),V(14,Fo,5,3,"div",6),e()()),i&2&&(p("formGroup",n.downloadForm),a(4),c(d(5,5,"catalog.multi_image_download.resolution")),a(2),p("compareWith",n.compareResolutions),a(),N(n.resolutions),a(4),c(d(12,7,"catalog.multi_image_download.zip_name")),a(3),k(n.downloadForm&&n.downloadForm.value.resolution&&n.downloadForm.value.resolution.id==="orig"&&n.countChecked()>=25?14:-1))},dependencies:[Z,Y,Q,lo,io,oo,to,eo,no,ao,v,uo,co,po,C,D,M,so,mo,fo,_],styles:[`mat-form-field[_ngcontent-%COMP%]{width:100%} 4/*# sourceMappingURL=download-form.component-IVMXKEG6.css.map */`]})}}return t})();var tt=(()=>{class t{constructor(){this.counter=w(0),this.batchSize=w(0),this.percent=w(0),this.state=m(go),this.dialogRef=m(q),this.catalogV2Env=m(W),this.downloadProgressDialog=m(wo)}onDownload(o){this.state.downloadInProgress.set(!0),this.dialogRef.close(),this.downloadProgressDialog.open$({resolution:o[0],name:o[1],count:this.state.count(),coreId:this.catalogV2Env.env.castorCoreId}).subscribe(()=>{this.state.downloadInProgress.set(!1)})}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=h({type:t,selectors:[["cat-v2-download-progress-dialog"]],decls:15,vars:12,consts:[["downloadForm",""],["mat-dialog-title",""],["mat-dialog-content",""],[3,"download","countChecked","resolutions"],["align","end"],["mat-button","","mat-dialog-close",""],["mat-flat-button","",1,"primary-button",3,"click","disabled"]],template:function(i,n){if(i&1){let u=P();r(0,"h1",1),l(1),s(2,"transloco"),e(),r(3,"div",2)(4,"cat-v2-download-form",3,0),f("download",function(F){return S(u),b(n.onDownload(F))}),e()(),r(6,"mat-dialog-actions",4)(7,"button",5),l(8),s(9,"transloco"),e(),r(10,"button",6),f("
4click",function(){S(u);let F=y(5);return b(F.submit())}),r(11,"mat-icon"),l(12,"cloud_download"),e(),l(13),s(14,"transloco"),e()()}if(i&2){let u=y(5);a(),c(d(2,6,"catalog.multi_image_download.title")),a(3),p("countChecked",n.state.count())("resolutions",n.state.resolutions()),a(4),c(d(9,8,"ui.buttons.cancel")),a(2),p("disabled",n.state.count()===0||!u.downloadForm.valid||n.state.downloadInProgress()),a(3),g(" ",d(14,10,"catalog.multi_image_download.start_download")," ")}},dependencies:[D,M,v,J,U,$,X,H,ho,C,j,_],encapsulation:2})}}return t})();export{tt as DownloadFormDialogComponent}; 5//# sourceMappingURL=chunk-6DRE3BDK.js.map 6 7//# debugId=2d4792ec-7d9b-5f52-80b4-46a0070834c2
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.