@ohif/app 3.7.0-beta.4 → 3.7.0-beta.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{192.bundle.a692060cb8ee9076ddee.js → 192.bundle.b2863bbbf41f16203af7.js} +4 -4
- package/dist/{199.bundle.69d1b0419e63f5546281.js → 199.bundle.af3f8b331f3b030fe4b1.js} +2 -7
- package/dist/{208.bundle.9123fc7f84b459723777.js → 208.bundle.a27d931468daecfff934.js} +4 -4
- package/dist/{270.bundle.4564621556b0f963a004.js → 270.bundle.2d215f8720350f03e171.js} +133 -122
- package/dist/{283.bundle.326b6ad7c2dc105fd0b8.js → 283.bundle.76f6d48710f450ccd0f3.js} +58 -33
- package/dist/{331.bundle.bd0c13931a21d53086c9.js → 389.bundle.38df7e54d2f632cfa7a0.js} +123 -74
- package/dist/{404.bundle.0de1e82fef0a0cd2c34e.js → 404.bundle.02cea2f3b08cdbe8ceee.js} +9 -16
- package/dist/{351.bundle.da314e071dcf5e888085.js → 468.bundle.84576e0c0e8a7bdcfb90.js} +117 -85
- package/dist/{55.bundle.5f5e5ef9087b0beee35c.js → 55.bundle.fe53f3784bfe7db4a5a5.js} +6 -6
- package/dist/{569.bundle.0ed8d8178ffd43fe1c34.js → 569.bundle.e77c17d37a65e5dedfed.js} +23 -12
- package/dist/{581.bundle.360d26f97b37da8faec3.js → 581.bundle.15078e71fe52b53f48b3.js} +7 -6
- package/dist/{616.bundle.3f5157b8b6911d95e8ec.js → 616.bundle.b159e7f111ada286d862.js} +6 -6
- package/dist/{707.bundle.fec5dc4210086c7f617d.js → 625.bundle.7e4bece1b4ef5dc300a8.js} +79 -105
- package/dist/{642.bundle.478ce6f500f977507924.js → 642.bundle.ac0c06c27fc4366de343.js} +2 -2
- package/dist/{728.bundle.d13856835357400fef82.js → 728.bundle.5bef7c8643b42d70a79f.js} +11 -10
- package/dist/{744.bundle.bbf06d38d4e6cc5127a1.js → 744.bundle.0be683bc1498cc0d89ef.js} +64 -91
- package/dist/{790.bundle.45eaa69aab86f0048f1c.js → 790.bundle.18db48c8d89ce04e57bc.js} +4 -4
- package/dist/{799.bundle.ca18bdf4abe4d9abea26.js → 799.bundle.d8e50f1fd6bf4fa3a5e1.js} +56 -8
- package/dist/{82.bundle.579b84883e04e040cc03.js → 82.bundle.9affd6d9fbce4d32e826.js} +143 -112
- package/dist/{917.bundle.c88ce40fac58f95c68d1.js → 917.bundle.cba9223eb2a6dfea6066.js} +2 -2
- package/dist/945.min.worker.js +1 -1
- package/dist/945.min.worker.js.map +1 -1
- package/dist/{953.bundle.9e3a7225f07336bfcb41.js → 953.bundle.95b0621f1da8dfeaed8a.js} +4 -3
- package/dist/{973.bundle.7e3f2870f5ae0400fa85.js → 973.bundle.fa8a13ecc41ff54fb82b.js} +2 -2
- package/dist/{976.bundle.45373bcb38773e2c10c9.js → 976.bundle.19dac9a84b453d2c4dbb.js} +7 -7
- package/dist/{984.bundle.ed28bde89cb27e6ae9cd.js → 984.bundle.3623bc3bc26748a21d00.js} +9 -9
- package/dist/app-config.js +7 -7
- package/dist/{app.bundle.976f90a2d39df9f3146e.js → app.bundle.6987d8f46ddf4345d40a.js} +1483 -739
- package/dist/app.bundle.css +1 -1
- package/dist/cornerstoneDICOMImageLoader.min.js +1 -1
- package/dist/cornerstoneDICOMImageLoader.min.js.map +1 -1
- package/dist/google.js +6 -5
- package/dist/index.html +1 -1
- package/dist/{index.worker.1c69152d710fa7b84bce.worker.js → index.worker.17eee78bdafa44cbb47d.worker.js} +2 -2
- package/dist/index.worker.17eee78bdafa44cbb47d.worker.js.map +1 -0
- package/dist/sw.js +1 -1
- package/package.json +19 -19
- package/dist/index.worker.1c69152d710fa7b84bce.worker.js.map +0 -1
- /package/dist/{351.css → 468.css} +0 -0
- /package/dist/{50.bundle.222e93034cacb51bee8b.js → 50.bundle.7def59ad0bc69d63790b.js} +0 -0
- /package/dist/{707.css → 625.css} +0 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/***/ 99605:
|
|
5
5
|
/***/ (function(module) {
|
|
6
6
|
|
|
7
|
-
!function(e,t){ true?module.exports=t():0}(this,(()=>(()=>{"use strict";var e={578:(e,t,r)=>{const n=r(823),o=r(187),a=r(592),i=r(604),s=r(249),l=r(968),c=Object.prototype.toString,{Z_NO_FLUSH:u,Z_FINISH:d,Z_OK:f,Z_STREAM_END:m,Z_NEED_DICT:g,Z_STREAM_ERROR:h,Z_DATA_ERROR:p,Z_MEM_ERROR:x}=r(684);function w(e){this.options=o.assign({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;let r=n.inflateInit2(this.strm,t.windowBits);if(r!==f)throw new Error(i[r]);if(this.header=new l,n.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=a.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=n.inflateSetDictionary(this.strm,t.dictionary),r!==f)))throw new Error(i[r])}function b(e,t){const r=new w(t);if(r.push(e),r.err)throw r.msg||i[r.err];return r.result}w.prototype.push=function(e,t){const r=this.strm,o=this.options.chunkSize,i=this.options.dictionary;let s,l,w;if(this.ended)return!1;for(l=t===~~t?t:!0===t?d:u,"[object ArrayBuffer]"===c.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(o),r.next_out=0,r.avail_out=o),s=n.inflate(r,l),s===g&&i&&(s=n.inflateSetDictionary(r,i),s===f?s=n.inflate(r,l):s===p&&(s=g));r.avail_in>0&&s===m&&r.state.wrap>0&&0!==e[r.next_in];)n.inflateReset(r),s=n.inflate(r,l);switch(s){case h:case p:case g:case x:return this.onEnd(s),this.ended=!0,!1}if(w=r.avail_out,r.next_out&&(0===r.avail_out||s===m))if("string"===this.options.to){let e=a.utf8border(r.output,r.next_out),t=r.next_out-e,n=a.buf2string(r.output,e);r.next_out=t,r.avail_out=o-t,t&&r.output.set(r.output.subarray(e,e+t),0),this.onData(n)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(s!==f||0!==w){if(s===m)return s=n.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},w.prototype.onData=function(e){this.chunks.push(e)},w.prototype.onEnd=function(e){e===f&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},e.exports.Hq=function(e,t){return(t=t||{}).raw=!0,b(e,t)},r(684)},187:e=>{const t=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);e.exports.assign=function(e){const r=Array.prototype.slice.call(arguments,1);for(;r.length;){const n=r.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(const r in n)t(n,r)&&(e[r]=n[r])}}return e},e.exports.flattenChunks=e=>{let t=0;for(let r=0,n=e.length;r<n;r++)t+=e[r].length;const r=new Uint8Array(t);for(let t=0,n=0,o=e.length;t<o;t++){let o=e[t];r.set(o,n),n+=o.length}return r}},592:e=>{let t=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){t=!1}const r=new Uint8Array(256);for(let e=0;e<256;e++)r[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;r[254]=r[254]=1,e.exports.string2buf=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,r,n,o,a,i=e.length,s=0;for(o=0;o<i;o++)r=e.charCodeAt(o),55296==(64512&r)&&o+1<i&&(n=e.charCodeAt(o+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),o++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(t=new Uint8Array(s),a=0,o=0;a<s;o++)r=e.charCodeAt(o),55296==(64512&r)&&o+1<i&&(n=e.charCodeAt(o+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),o++)),r<128?t[a++]=r:r<2048?(t[a++]=192|r>>>6,t[a++]=128|63&r):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|63&r):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|63&r);return t};e.exports.buf2string=(e,n)=>{const o=n||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,n));let a,i;const s=new Array(2*o);for(i=0,a=0;a<o;){let t=e[a++];if(t<128){s[i++]=t;continue}let n=r[t];if(n>4)s[i++]=65533,a+=n-1;else{for(t&=2===n?31:3===n?15:7;n>1&&a<o;)t=t<<6|63&e[a++],n--;n>1?s[i++]=65533:t<65536?s[i++]=t:(t-=65536,s[i++]=55296|t>>10&1023,s[i++]=56320|1023&t)}}return((e,r)=>{if(r<65534&&e.subarray&&t)return String.fromCharCode.apply(null,e.length===r?e:e.subarray(0,r));let n="";for(let t=0;t<r;t++)n+=String.fromCharCode(e[t]);return n})(s,i)},e.exports.utf8border=(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);let n=t-1;for(;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+r[e[n]]>t?n:t}},693:e=>{e.exports=(e,t,r,n)=>{let o=65535&e|0,a=e>>>16&65535|0,i=0;for(;0!==r;){i=r>2e3?2e3:r,r-=i;do{o=o+t[n++]|0,a=a+o|0}while(--i);o%=65521,a%=65521}return o|a<<16|0}},684:e=>{e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},464:e=>{const t=new Uint32Array((()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t})());e.exports=(e,r,n,o)=>{const a=t,i=o+n;e^=-1;for(let t=o;t<i;t++)e=e>>>8^a[255&(e^r[t])];return-1^e}},968:e=>{e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},365:e=>{const t=16209;e.exports=function(e,r){let n,o,a,i,s,l,c,u,d,f,m,g,h,p,x,w,b,y,k,v,D,T,S,P;const I=e.state;n=e.next_in,S=e.input,o=n+(e.avail_in-5),a=e.next_out,P=e.output,i=a-(r-e.avail_out),s=a+(e.avail_out-257),l=I.dmax,c=I.wsize,u=I.whave,d=I.wnext,f=I.window,m=I.hold,g=I.bits,h=I.lencode,p=I.distcode,x=(1<<I.lenbits)-1,w=(1<<I.distbits)-1;e:do{g<15&&(m+=S[n++]<<g,g+=8,m+=S[n++]<<g,g+=8),b=h[m&x];t:for(;;){if(y=b>>>24,m>>>=y,g-=y,y=b>>>16&255,0===y)P[a++]=65535&b;else{if(!(16&y)){if(0==(64&y)){b=h[(65535&b)+(m&(1<<y)-1)];continue t}if(32&y){I.mode=16191;break e}e.msg="invalid literal/length code",I.mode=t;break e}k=65535&b,y&=15,y&&(g<y&&(m+=S[n++]<<g,g+=8),k+=m&(1<<y)-1,m>>>=y,g-=y),g<15&&(m+=S[n++]<<g,g+=8,m+=S[n++]<<g,g+=8),b=p[m&w];r:for(;;){if(y=b>>>24,m>>>=y,g-=y,y=b>>>16&255,!(16&y)){if(0==(64&y)){b=p[(65535&b)+(m&(1<<y)-1)];continue r}e.msg="invalid distance code",I.mode=t;break e}if(v=65535&b,y&=15,g<y&&(m+=S[n++]<<g,g+=8,g<y&&(m+=S[n++]<<g,g+=8)),v+=m&(1<<y)-1,v>l){e.msg="invalid distance too far back",I.mode=t;break e}if(m>>>=y,g-=y,y=a-i,v>y){if(y=v-y,y>u&&I.sane){e.msg="invalid distance too far back",I.mode=t;break e}if(D=0,T=f,0===d){if(D+=c-y,y<k){k-=y;do{P[a++]=f[D++]}while(--y);D=a-v,T=P}}else if(d<y){if(D+=c+d-y,y-=d,y<k){k-=y;do{P[a++]=f[D++]}while(--y);if(D=0,d<k){y=d,k-=y;do{P[a++]=f[D++]}while(--y);D=a-v,T=P}}}else if(D+=d-y,y<k){k-=y;do{P[a++]=f[D++]}while(--y);D=a-v,T=P}for(;k>2;)P[a++]=T[D++],P[a++]=T[D++],P[a++]=T[D++],k-=3;k&&(P[a++]=T[D++],k>1&&(P[a++]=T[D++]))}else{D=a-v;do{P[a++]=P[D++],P[a++]=P[D++],P[a++]=P[D++],k-=3}while(k>2);k&&(P[a++]=P[D++],k>1&&(P[a++]=P[D++]))}break}}break}}while(n<o&&a<s);k=g>>3,n-=k,g-=k<<3,m&=(1<<g)-1,e.next_in=n,e.next_out=a,e.avail_in=n<o?o-n+5:5-(n-o),e.avail_out=a<s?s-a+257:257-(a-s),I.hold=m,I.bits=g}},823:(e,t,r)=>{const n=r(693),o=r(464),a=r(365),i=r(446),{Z_FINISH:s,Z_BLOCK:l,Z_TREES:c,Z_OK:u,Z_STREAM_END:d,Z_NEED_DICT:f,Z_STREAM_ERROR:m,Z_DATA_ERROR:g,Z_MEM_ERROR:h,Z_BUF_ERROR:p,Z_DEFLATED:x}=r(684),w=16180,b=16190,y=16191,k=16192,v=16194,D=16199,T=16200,S=16206,P=16209,I=16210,C=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function _(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const A=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<w||t.mode>16211?1:0},L=e=>{if(A(e))return m;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=w,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,u},E=e=>{if(A(e))return m;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,L(e)},M=(e,t)=>{let r;if(A(e))return m;const n=e.state;return t<0?(r=0,t=-t):(r=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?m:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,E(e))},R=(e,t)=>{if(!e)return m;const r=new _;e.state=r,r.strm=e,r.window=null,r.mode=w;const n=M(e,t);return n!==u&&(e.state=null),n};let F,O,B=!0;const U=e=>{if(B){F=new Int32Array(512),O=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(i(1,e.lens,0,288,F,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;i(2,e.lens,0,32,O,0,e.work,{bits:5}),B=!1}e.lencode=F,e.lenbits=9,e.distcode=O,e.distbits=5},N=(e,t,r,n)=>{let o;const a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),n>=a.wsize?(a.window.set(t.subarray(r-a.wsize,r),0),a.wnext=0,a.whave=a.wsize):(o=a.wsize-a.wnext,o>n&&(o=n),a.window.set(t.subarray(r-n,r-n+o),a.wnext),(n-=o)?(a.window.set(t.subarray(r-n,r),0),a.wnext=n,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0};e.exports.inflateReset=E,e.exports.inflateReset2=M,e.exports.inflateResetKeep=L,e.exports.inflateInit=e=>R(e,15),e.exports.inflateInit2=R,e.exports.inflate=(e,t)=>{let r,_,L,E,M,R,F,O,B,j,W,Z,$,G,V,q,z,Y,H,K,J,X,Q=0;const ee=new Uint8Array(4);let te,re;const ne=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(A(e)||!e.output||!e.input&&0!==e.avail_in)return m;r=e.state,r.mode===y&&(r.mode=k),M=e.next_out,L=e.output,F=e.avail_out,E=e.next_in,_=e.input,R=e.avail_in,O=r.hold,B=r.bits,j=R,W=F,X=u;e:for(;;)switch(r.mode){case w:if(0===r.wrap){r.mode=k;break}for(;B<16;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(2&r.wrap&&35615===O){0===r.wbits&&(r.wbits=15),r.check=0,ee[0]=255&O,ee[1]=O>>>8&255,r.check=o(r.check,ee,2,0),O=0,B=0,r.mode=16181;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&O)<<8)+(O>>8))%31){e.msg="incorrect header check",r.mode=P;break}if((15&O)!==x){e.msg="unknown compression method",r.mode=P;break}if(O>>>=4,B-=4,J=8+(15&O),0===r.wbits&&(r.wbits=J),J>15||J>r.wbits){e.msg="invalid window size",r.mode=P;break}r.dmax=1<<r.wbits,r.flags=0,e.adler=r.check=1,r.mode=512&O?16189:y,O=0,B=0;break;case 16181:for(;B<16;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(r.flags=O,(255&r.flags)!==x){e.msg="unknown compression method",r.mode=P;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=P;break}r.head&&(r.head.text=O>>8&1),512&r.flags&&4&r.wrap&&(ee[0]=255&O,ee[1]=O>>>8&255,r.check=o(r.check,ee,2,0)),O=0,B=0,r.mode=16182;case 16182:for(;B<32;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}r.head&&(r.head.time=O),512&r.flags&&4&r.wrap&&(ee[0]=255&O,ee[1]=O>>>8&255,ee[2]=O>>>16&255,ee[3]=O>>>24&255,r.check=o(r.check,ee,4,0)),O=0,B=0,r.mode=16183;case 16183:for(;B<16;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}r.head&&(r.head.xflags=255&O,r.head.os=O>>8),512&r.flags&&4&r.wrap&&(ee[0]=255&O,ee[1]=O>>>8&255,r.check=o(r.check,ee,2,0)),O=0,B=0,r.mode=16184;case 16184:if(1024&r.flags){for(;B<16;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}r.length=O,r.head&&(r.head.extra_len=O),512&r.flags&&4&r.wrap&&(ee[0]=255&O,ee[1]=O>>>8&255,r.check=o(r.check,ee,2,0)),O=0,B=0}else r.head&&(r.head.extra=null);r.mode=16185;case 16185:if(1024&r.flags&&(Z=r.length,Z>R&&(Z=R),Z&&(r.head&&(J=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(_.subarray(E,E+Z),J)),512&r.flags&&4&r.wrap&&(r.check=o(r.check,_,Z,E)),R-=Z,E+=Z,r.length-=Z),r.length))break e;r.length=0,r.mode=16186;case 16186:if(2048&r.flags){if(0===R)break e;Z=0;do{J=_[E+Z++],r.head&&J&&r.length<65536&&(r.head.name+=String.fromCharCode(J))}while(J&&Z<R);if(512&r.flags&&4&r.wrap&&(r.check=o(r.check,_,Z,E)),R-=Z,E+=Z,J)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=16187;case 16187:if(4096&r.flags){if(0===R)break e;Z=0;do{J=_[E+Z++],r.head&&J&&r.length<65536&&(r.head.comment+=String.fromCharCode(J))}while(J&&Z<R);if(512&r.flags&&4&r.wrap&&(r.check=o(r.check,_,Z,E)),R-=Z,E+=Z,J)break e}else r.head&&(r.head.comment=null);r.mode=16188;case 16188:if(512&r.flags){for(;B<16;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(4&r.wrap&&O!==(65535&r.check)){e.msg="header crc mismatch",r.mode=P;break}O=0,B=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=y;break;case 16189:for(;B<32;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}e.adler=r.check=C(O),O=0,B=0,r.mode=b;case b:if(0===r.havedict)return e.next_out=M,e.avail_out=F,e.next_in=E,e.avail_in=R,r.hold=O,r.bits=B,f;e.adler=r.check=1,r.mode=y;case y:if(t===l||t===c)break e;case k:if(r.last){O>>>=7&B,B-=7&B,r.mode=S;break}for(;B<3;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}switch(r.last=1&O,O>>>=1,B-=1,3&O){case 0:r.mode=16193;break;case 1:if(U(r),r.mode=D,t===c){O>>>=2,B-=2;break e}break;case 2:r.mode=16196;break;case 3:e.msg="invalid block type",r.mode=P}O>>>=2,B-=2;break;case 16193:for(O>>>=7&B,B-=7&B;B<32;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if((65535&O)!=(O>>>16^65535)){e.msg="invalid stored block lengths",r.mode=P;break}if(r.length=65535&O,O=0,B=0,r.mode=v,t===c)break e;case v:r.mode=16195;case 16195:if(Z=r.length,Z){if(Z>R&&(Z=R),Z>F&&(Z=F),0===Z)break e;L.set(_.subarray(E,E+Z),M),R-=Z,E+=Z,F-=Z,M+=Z,r.length-=Z;break}r.mode=y;break;case 16196:for(;B<14;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(r.nlen=257+(31&O),O>>>=5,B-=5,r.ndist=1+(31&O),O>>>=5,B-=5,r.ncode=4+(15&O),O>>>=4,B-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=P;break}r.have=0,r.mode=16197;case 16197:for(;r.have<r.ncode;){for(;B<3;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}r.lens[ne[r.have++]]=7&O,O>>>=3,B-=3}for(;r.have<19;)r.lens[ne[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,te={bits:r.lenbits},X=i(0,r.lens,0,19,r.lencode,0,r.work,te),r.lenbits=te.bits,X){e.msg="invalid code lengths set",r.mode=P;break}r.have=0,r.mode=16198;case 16198:for(;r.have<r.nlen+r.ndist;){for(;Q=r.lencode[O&(1<<r.lenbits)-1],V=Q>>>24,q=Q>>>16&255,z=65535&Q,!(V<=B);){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(z<16)O>>>=V,B-=V,r.lens[r.have++]=z;else{if(16===z){for(re=V+2;B<re;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(O>>>=V,B-=V,0===r.have){e.msg="invalid bit length repeat",r.mode=P;break}J=r.lens[r.have-1],Z=3+(3&O),O>>>=2,B-=2}else if(17===z){for(re=V+3;B<re;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}O>>>=V,B-=V,J=0,Z=3+(7&O),O>>>=3,B-=3}else{for(re=V+7;B<re;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}O>>>=V,B-=V,J=0,Z=11+(127&O),O>>>=7,B-=7}if(r.have+Z>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=P;break}for(;Z--;)r.lens[r.have++]=J}}if(r.mode===P)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=P;break}if(r.lenbits=9,te={bits:r.lenbits},X=i(1,r.lens,0,r.nlen,r.lencode,0,r.work,te),r.lenbits=te.bits,X){e.msg="invalid literal/lengths set",r.mode=P;break}if(r.distbits=6,r.distcode=r.distdyn,te={bits:r.distbits},X=i(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,te),r.distbits=te.bits,X){e.msg="invalid distances set",r.mode=P;break}if(r.mode=D,t===c)break e;case D:r.mode=T;case T:if(R>=6&&F>=258){e.next_out=M,e.avail_out=F,e.next_in=E,e.avail_in=R,r.hold=O,r.bits=B,a(e,W),M=e.next_out,L=e.output,F=e.avail_out,E=e.next_in,_=e.input,R=e.avail_in,O=r.hold,B=r.bits,r.mode===y&&(r.back=-1);break}for(r.back=0;Q=r.lencode[O&(1<<r.lenbits)-1],V=Q>>>24,q=Q>>>16&255,z=65535&Q,!(V<=B);){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(q&&0==(240&q)){for(Y=V,H=q,K=z;Q=r.lencode[K+((O&(1<<Y+H)-1)>>Y)],V=Q>>>24,q=Q>>>16&255,z=65535&Q,!(Y+V<=B);){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}O>>>=Y,B-=Y,r.back+=Y}if(O>>>=V,B-=V,r.back+=V,r.length=z,0===q){r.mode=16205;break}if(32&q){r.back=-1,r.mode=y;break}if(64&q){e.msg="invalid literal/length code",r.mode=P;break}r.extra=15&q,r.mode=16201;case 16201:if(r.extra){for(re=r.extra;B<re;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}r.length+=O&(1<<r.extra)-1,O>>>=r.extra,B-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=16202;case 16202:for(;Q=r.distcode[O&(1<<r.distbits)-1],V=Q>>>24,q=Q>>>16&255,z=65535&Q,!(V<=B);){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(0==(240&q)){for(Y=V,H=q,K=z;Q=r.distcode[K+((O&(1<<Y+H)-1)>>Y)],V=Q>>>24,q=Q>>>16&255,z=65535&Q,!(Y+V<=B);){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}O>>>=Y,B-=Y,r.back+=Y}if(O>>>=V,B-=V,r.back+=V,64&q){e.msg="invalid distance code",r.mode=P;break}r.offset=z,r.extra=15&q,r.mode=16203;case 16203:if(r.extra){for(re=r.extra;B<re;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}r.offset+=O&(1<<r.extra)-1,O>>>=r.extra,B-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=P;break}r.mode=16204;case 16204:if(0===F)break e;if(Z=W-F,r.offset>Z){if(Z=r.offset-Z,Z>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=P;break}Z>r.wnext?(Z-=r.wnext,$=r.wsize-Z):$=r.wnext-Z,Z>r.length&&(Z=r.length),G=r.window}else G=L,$=M-r.offset,Z=r.length;Z>F&&(Z=F),F-=Z,r.length-=Z;do{L[M++]=G[$++]}while(--Z);0===r.length&&(r.mode=T);break;case 16205:if(0===F)break e;L[M++]=r.length,F--,r.mode=T;break;case S:if(r.wrap){for(;B<32;){if(0===R)break e;R--,O|=_[E++]<<B,B+=8}if(W-=F,e.total_out+=W,r.total+=W,4&r.wrap&&W&&(e.adler=r.check=r.flags?o(r.check,L,W,M-W):n(r.check,L,W,M-W)),W=F,4&r.wrap&&(r.flags?O:C(O))!==r.check){e.msg="incorrect data check",r.mode=P;break}O=0,B=0}r.mode=16207;case 16207:if(r.wrap&&r.flags){for(;B<32;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(4&r.wrap&&O!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=P;break}O=0,B=0}r.mode=16208;case 16208:X=d;break e;case P:X=g;break e;case I:return h;default:return m}return e.next_out=M,e.avail_out=F,e.next_in=E,e.avail_in=R,r.hold=O,r.bits=B,(r.wsize||W!==e.avail_out&&r.mode<P&&(r.mode<S||t!==s))&&N(e,e.output,e.next_out,W-e.avail_out)?(r.mode=I,h):(j-=e.avail_in,W-=e.avail_out,e.total_in+=j,e.total_out+=W,r.total+=W,4&r.wrap&&W&&(e.adler=r.check=r.flags?o(r.check,L,W,e.next_out-W):n(r.check,L,W,e.next_out-W)),e.data_type=r.bits+(r.last?64:0)+(r.mode===y?128:0)+(r.mode===D||r.mode===v?256:0),(0===j&&0===W||t===s)&&X===u&&(X=p),X)},e.exports.inflateEnd=e=>{if(A(e))return m;let t=e.state;return t.window&&(t.window=null),e.state=null,u},e.exports.inflateGetHeader=(e,t)=>{if(A(e))return m;const r=e.state;return 0==(2&r.wrap)?m:(r.head=t,t.done=!1,u)},e.exports.inflateSetDictionary=(e,t)=>{const r=t.length;let o,a,i;return A(e)?m:(o=e.state,0!==o.wrap&&o.mode!==b?m:o.mode===b&&(a=1,a=n(a,t,r,0),a!==o.check)?g:(i=N(e,t,r,r),i?(o.mode=I,h):(o.havedict=1,u)))},e.exports.inflateInfo="pako inflate (from Nodeca project)"},446:e=>{const t=15,r=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),n=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),o=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),a=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);e.exports=(e,i,s,l,c,u,d,f)=>{const m=f.bits;let g,h,p,x,w,b,y=0,k=0,v=0,D=0,T=0,S=0,P=0,I=0,C=0,_=0,A=null;const L=new Uint16Array(16),E=new Uint16Array(16);let M,R,F,O=null;for(y=0;y<=t;y++)L[y]=0;for(k=0;k<l;k++)L[i[s+k]]++;for(T=m,D=t;D>=1&&0===L[D];D--);if(T>D&&(T=D),0===D)return c[u++]=20971520,c[u++]=20971520,f.bits=1,0;for(v=1;v<D&&0===L[v];v++);for(T<v&&(T=v),I=1,y=1;y<=t;y++)if(I<<=1,I-=L[y],I<0)return-1;if(I>0&&(0===e||1!==D))return-1;for(E[1]=0,y=1;y<t;y++)E[y+1]=E[y]+L[y];for(k=0;k<l;k++)0!==i[s+k]&&(d[E[i[s+k]]++]=k);if(0===e?(A=O=d,b=20):1===e?(A=r,O=n,b=257):(A=o,O=a,b=0),_=0,k=0,y=v,w=u,S=T,P=0,p=-1,C=1<<T,x=C-1,1===e&&C>852||2===e&&C>592)return 1;for(;;){M=y-P,d[k]+1<b?(R=0,F=d[k]):d[k]>=b?(R=O[d[k]-b],F=A[d[k]-b]):(R=96,F=0),g=1<<y-P,h=1<<S,v=h;do{h-=g,c[w+(_>>P)+h]=M<<24|R<<16|F|0}while(0!==h);for(g=1<<y-1;_&g;)g>>=1;if(0!==g?(_&=g-1,_+=g):_=0,k++,0==--L[y]){if(y===D)break;y=i[s+d[k]]}if(y>T&&(_&x)!==p){for(0===P&&(P=T),w+=v,S=y-P,I=1<<S;S+P<D&&(I-=L[S+P],!(I<=0));)S++,I<<=1;if(C+=1<<S,1===e&&C>852||2===e&&C>592)return 1;p=_&x,c[p]=T<<24|S<<16|w-u|0}}return 0!==_&&(c[w+_]=y-P<<24|64<<16|0),f.bits=T,0}},604:e=>{e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},249:e=>{e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&!e;)e=n[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})();var n={};return(()=>{function e(e,t,r){if(void 0===e)throw new Error("decodeRGB: rgbBuffer must not be undefined");if(e.length%3!=0)throw new Error("decodeRGB: rgbBuffer length must be divisible by 3");const n=e.length/3;let o=0,a=0;if(r)for(let r=0;r<n;r++)t[a++]=e[o++],t[a++]=e[o++],t[a++]=e[o++],t[a++]=255;else t.set(e)}function t(e,t,r){if(void 0===e)throw new Error("decodeRGB: rgbBuffer must not be undefined");if(e.length%3!=0)throw new Error("decodeRGB: rgbBuffer length must be divisible by 3");const n=e.length/3;let o=0,a=0,i=n,s=2*n;if(r)for(let r=0;r<n;r++)t[o++]=e[a++],t[o++]=e[i++],t[o++]=e[s++],t[o++]=255;else t.set(e)}function o(e,t,r){if(void 0===e)throw new Error("decodeRGB: ybrBuffer must not be undefined");if(e.length%3!=0)throw new Error("decodeRGB: ybrBuffer length must be divisble by 3");const n=e.length/3;let o=0,a=0;if(r)for(let r=0;r<n;r++){const r=e[o++],n=e[o++],i=e[o++];t[a++]=r+1.402*(i-128),t[a++]=r-.34414*(n-128)-.71414*(i-128),t[a++]=r+1.772*(n-128),t[a++]=255}else for(let r=0;r<n;r++){const r=e[o++],n=e[o++],i=e[o++];t[a++]=r+1.402*(i-128),t[a++]=r-.34414*(n-128)-.71414*(i-128),t[a++]=r+1.772*(n-128)}}function a(e,t,r){if(void 0===e)throw new Error("decodeRGB: ybrBuffer must not be undefined");if(e.length%3!=0)throw new Error("decodeRGB: ybrBuffer length must be divisble by 3");const n=e.length/3;let o=0,a=0,i=n,s=2*n;if(r)for(let r=0;r<n;r++){const r=e[a++],n=e[i++],l=e[s++];t[o++]=r+1.402*(l-128),t[o++]=r-.34414*(n-128)-.71414*(l-128),t[o++]=r+1.772*(n-128),t[o++]=255}else for(let r=0;r<n;r++){const r=e[a++],n=e[i++],l=e[s++];t[o++]=r+1.402*(l-128),t[o++]=r-.34414*(n-128)-.71414*(l-128),t[o++]=r+1.772*(n-128)}}r.r(n),r.d(n,{configure:()=>tt,convertColorSpace:()=>O,convertPALETTECOLOR:()=>et,convertRGBColorByPixel:()=>e,convertRGBColorByPlane:()=>t,convertYBRFullByPixel:()=>o,convertYBRFullByPlane:()=>a,createImage:()=>se,decodeImageFrame:()=>ee,decodeJPEGBaseline8BitColor:()=>U,default:()=>rt,external:()=>Xe,getImageFrame:()=>te,getMinMax:()=>R,getPixelData:()=>M,internal:()=>L,isColorImage:()=>re,isJPEGBaseline8BitColor:()=>ne,wadors:()=>ce,wadouri:()=>ze,webWorkerManager:()=>J});const i=function(e,t,r){return t=t||0,e&&e.Value?e.Value.length<=t?r:e.Value[t]:r};const s=function(e,t,r){const n=i(e,t,r);if(void 0!==n)return parseFloat(n)};const l=function(e,t){const r=i(e,t);if(void 0!==r)return parseFloat(r)};const c=function(e,t){if(!e)return;if(!e.Value)return;if(!Array.isArray(e.Value))return;if(t&&e.Value.length<t)return;const r=[];for(let t=0;t<e.Value.length;t++)r.push(parseFloat(e.Value[t]));return r};function u(e){const t=e.indexOf(":");return e.substring(t+1)}function d(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e&&e.Value?e.Value[0]&&t?e.Value[0]:e.Value:e}function f(e,t,r){return{shared:(t?Object.values(t[0]):[]).map((e=>e[0])).filter((e=>void 0!==e&&"object"==typeof e)),perFrame:(e?Object.values(e[r-1]):[]).map((e=>e.Value[0])).filter((e=>void 0!==e&&"object"==typeof e))}}function m(e){let{52009230:t,52009229:r,"00280008":n,...o}=e;return t=d(t,!1),r=d(r,!1),n=d(n),{PerFrameFunctionalGroupsSequence:t,SharedFunctionalGroupsSequence:r,NumberOfFrames:n,rest:o}}function g(e){const t=e.indexOf("/frames/")+8,r=e.slice(0,t),n=parseInt(e.slice(t),10);return{metadata:p[`${r}1`],frame:n}}const h={_retrieveMultiframeMetadata:g,retrieveMultiframeMetadata:function(e){return g(u(e))},isMultiframe:function(e){const t=i(e["00280008"]);return t&&t>1}};let p=[],x={};const w={add:function(e,t){const r=u(e);t.isMultiframe=h.isMultiframe(t),p[r]=t},get:function(e){const t=u(e),r=p[t];if(r&&!r?.isMultiframe)return r;const n=x[t];if(n)return n;const o=h._retrieveMultiframeMetadata(t);if(!o||!o.metadata)return;const{metadata:a,frame:i}=o;if(a){const e=function(e,t){const{PerFrameFunctionalGroupsSequence:r,SharedFunctionalGroupsSequence:n,NumberOfFrames:o,rest:a}=m(t);if(r||o>1){const{shared:i,perFrame:s}=f(r,n,e),l=Object.assign(t,{frameNumber:e});return[...i,...s].forEach((e=>{Object.entries(e).forEach((e=>{let[t,r]=e;l[t]=r}))})),Object.assign(a,{"00280008":o},l)}return t}(i,a);return x[t]=e,e}},remove:function(e){const t=u(e);p[t]=void 0,x[t]=void 0},purge:function(){p=[],x={}}};function b(e){return"RECON TOMO"===e||"RECON GATED TOMO"===e}function y(e){return i(e["00080060"]).includes("NM")}function k(e,t){const r=d(e["00080008"],!1);if(r)return r[t]}function v(e){let t=c(e["00200037"],6);return!t&&y(e)&&(t=function(e){let t;const r=k(e,2);if(r&&b(r)){const r=d(e["00540022"]);r&&(t=c(r["00200037"],6))}return t}(e)),t}function D(e){let t=c(e["00200032"],3);return!t&&y(e)&&(t=function(e){let t;const r=k(e,2);if(r&&b(r)){const r=d(e["00540022"]);r&&(t=c(r["00200032"],3))}return t}(e)),t}const T=function(e,t){if("multiframeModule"===e){const{metadata:e,frame:r}=h.retrieveMultiframeMetadata(t);if(!e)return;const{PerFrameFunctionalGroupsSequence:n,SharedFunctionalGroupsSequence:o,NumberOfFrames:a}=m(e);if(n||a>1){const{shared:e,perFrame:t}=f(n,o,r);return{NumberOfFrames:a,PerFrameFunctionalInformation:t,SharedFunctionalInformation:e}}return{NumberOfFrames:a}}const{dicomParser:r}=Xe,n=w.get(t);if(n){if("generalSeriesModule"===e)return{modality:i(n["00080060"]),seriesInstanceUID:i(n["0020000E"]),seriesNumber:l(n["00200011"]),studyInstanceUID:i(n["0020000D"]),seriesDate:r.parseDA(i(n["00080021"])),seriesTime:r.parseTM(i(n["00080031"],0,"")),acquisitionDate:r.parseDA(i(n["00080022"]),""),acquisitionTime:r.parseTM(i(n["00080032"],0,""))};if("patientStudyModule"===e)return{patientAge:l(n["00101010"]),patientSize:l(n["00101020"]),patientSex:i(n["00100040"]),patientWeight:l(n["00101030"])};if("nmMultiframeGeometryModule"===e){const e=i(n["00080060"]),t=k(n,2);return{modality:e,imageType:i(n["00080008"]),imageSubType:t,imageOrientationPatient:v(n),imagePositionPatient:D(n),sliceThickness:l(n["00180050"]),pixelSpacing:c(n["00280030"],2),numberOfFrames:l(n["00280008"]),isNMReconstructable:b(t)&&e.includes("NM")}}if("imagePlaneModule"===e){const e=v(n),t=D(n),r=c(n["00280030"],2);let o=null,a=null;r&&(a=r[0],o=r[1]);let s=null,u=null;return e&&(s=[parseFloat(e[0]),parseFloat(e[1]),parseFloat(e[2])],u=[parseFloat(e[3]),parseFloat(e[4]),parseFloat(e[5])]),{frameOfReferenceUID:i(n["00200052"]),rows:l(n["00280010"]),columns:l(n["00280011"]),imageOrientationPatient:e,rowCosines:s,columnCosines:u,imagePositionPatient:t,sliceThickness:l(n["00180050"]),sliceLocation:l(n["00201041"]),pixelSpacing:r,rowPixelSpacing:a,columnPixelSpacing:o}}if("imagePixelModule"===e)return{samplesPerPixel:l(n["00280002"]),photometricInterpretation:i(n["00280004"]),rows:l(n["00280010"]),columns:l(n["00280011"]),bitsAllocated:l(n["00280100"]),bitsStored:l(n["00280101"]),highBit:i(n["00280102"]),pixelRepresentation:l(n["00280103"]),planarConfiguration:l(n["00280006"]),pixelAspectRatio:i(n["00280034"]),smallestPixelValue:l(n["00280106"]),largestPixelValue:l(n["00280107"]),redPaletteColorLookupTableDescriptor:c(n["00281101"]),greenPaletteColorLookupTableDescriptor:c(n["00281102"]),bluePaletteColorLookupTableDescriptor:c(n["00281103"]),redPaletteColorLookupTableData:c(n["00281201"]),greenPaletteColorLookupTableData:c(n["00281202"]),bluePaletteColorLookupTableData:c(n["00281203"])};if("voiLutModule"===e)return{windowCenter:c(n["00281050"],1),windowWidth:c(n["00281051"],1)};if("modalityLutModule"===e)return{rescaleIntercept:l(n["00281052"]),rescaleSlope:l(n["00281053"]),rescaleType:i(n["00281054"])};if("sopCommonModule"===e)return{sopClassUID:i(n["00080016"]),sopInstanceUID:i(n["00080018"])};if("petIsotopeModule"===e){const e=i(n["00540016"]);if(void 0===e)return;return{radiopharmaceuticalInfo:{radiopharmaceuticalStartTime:r.parseTM(i(e["00181072"],0,"")),radiopharmaceuticalStartDateTime:i(e["00181078"],0,""),radionuclideTotalDose:l(e["00181074"]),radionuclideHalfLife:l(e["00181075"])}}}return"overlayPlaneModule"===e?function(e){const t=[];for(let r=0;r<=30;r+=2){let n=`x60${r.toString(16)}`;4===n.length&&(n=`x600${r.toString(16)}`);const o=i(e[`${n}3000`]);if(!o)continue;const a=[];for(let t=0;t<o.length;t++)for(let r=0;r<8;r++){const n=e.Value[o.dataOffset+t];a[8*t+r]=n>>r&1}t.push({rows:l(e[`${n}0010`]),columns:l(e[`${n}0011`]),type:i(e[`${n}0040`]),x:l(e[`${n}0050`],1)-1,y:l(e[`${n}0050`],0)-1,pixelData:a,description:i(e[`${n}0022`]),label:i(e[`${n}1500`]),roiArea:i(e[`${n}1301`]),roiMean:i(e[`${n}1302`]),roiStandardDeviation:i(e[`${n}1303`])})}return{overlays:t}}(n):"transferSyntax"===e?{transferSyntaxUID:i(n["00020010"])}:"petSeriesModule"===e?{correctedImage:i(n["00280051"]),units:i(n["00541001"]),decayCorrection:i(n["00541102"])}:"petImageModule"===e?{frameReferenceTime:l(n["00541300"]),actualFrameDuration:l(n["00181242"])}:void 0}};function S(e,t,r){if(r+e.length>t.length)return!1;let n=r;for(let r=0;r<e.length;r++)if(e[r]!==t[n++])return!1;return!0}const P=function(e,t,r){r=r||0;const n=function(e){const t=new Uint8Array(e.length);for(let r=0,n=e.length;r<n;r++)t[r]=e.charCodeAt(r);return t}(t);for(let t=r;t<e.length;t++)if(n[0]===e[t]&&S(n,e,t))return t;return-1};let I={open(e,t){e.open("get",t,!0)},beforeSend(){},beforeProcessing:e=>Promise.resolve(e.response),imageCreated(){},strict:!1,decodeConfig:{convertFloatPixelDataToInt:!0,use16BitDataType:!1}};function C(e){I=Object.assign(I,e)}function _(){return I}const A=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{cornerstone:o}=Xe,a=_(),i=e=>{if("function"==typeof a.errorInterceptor){const t=new Error("request failed");t.request=e,t.response=e.response,t.status=e.status,a.errorInterceptor(t)}},s=new XMLHttpRequest,l=new Promise(((l,c)=>{a.open(s,e,r,n);const u=a.beforeSend(s,t,r,n);s.responseType="arraybuffer";const d=Object.assign({},r,u);Object.keys(d).forEach((function(t){null!==d[t]&&("Accept"===t&&-1!==e.indexOf("accept=")||s.setRequestHeader(t,d[t]))})),n.deferred={resolve:l,reject:c},n.url=e,n.imageId=t,s.onloadstart=function(r){a.onloadstart&&a.onloadstart(r,n);const i={url:e,imageId:t};o.triggerEvent(o.events,"cornerstoneimageloadstart",i)},s.onloadend=function(r){a.onloadend&&a.onloadend(r,n);const i={url:e,imageId:t};o.triggerEvent(o.events,"cornerstoneimageloadend",i)},s.onreadystatechange=function(e){a.onreadystatechange?a.onreadystatechange(e,n):4===s.readyState&&(200===s.status?a.beforeProcessing(s).then(l).catch((()=>{i(s),c(s)})):(i(s),c(s)))},s.onprogress=function(r){const i=r.loaded;let s,l;r.lengthComputable&&(s=r.total,l=Math.round(i/s*100)),a.onprogress&&a.onprogress(r,n);const c={url:e,imageId:t,loaded:i,total:s,percentComplete:l};o.triggerEvent(o.events,o.EVENTS.IMAGE_LOAD_PROGRESS,c)},s.onerror=function(){i(s),c(s)},s.onabort=function(){i(s),c(s)},s.send()}));return l.xhr=s,l},L={xhrRequest:A,setOptions:C,getOptions:_};function E(e){for(let t=0;t<e.length;t++)if("Content-Type:"===e[t].substr(0,13))return e[t].substr(13).trim()}const M=function(e,t){const r={Accept:arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/octet-stream"};return new Promise(((n,o)=>{const a=A(e,t,r),{xhr:i}=a;a.then((function(e){const t=new Uint8Array(e),r=i.getResponseHeader("Content-Type")||"application/octet-stream";if(-1===r.indexOf("multipart"))return void n({contentType:r,imageFrame:{pixelData:t}});const a=P(t,"\r\n\r\n");-1===a&&o(new Error("invalid response - no multipart mime header"));const s=function(e,t,r){t=t||0,r=r||e.length-t;let n="";for(let o=t;o<t+r;o++)n+=String.fromCharCode(e[o]);return n}(t,0,a),l=s.split("\r\n"),c=function(e){for(let t=0;t<e.length;t++)if("--"===e[t].substr(0,2))return e[t]}(l);c||o(new Error("invalid response - no boundary marker"));const u=a+4,d=P(t,c,u);-1===d&&o(new Error("invalid response - terminating boundary not found"));const f=d-u-2;n({contentType:E(l),imageFrame:{pixelData:new Uint8Array(e,u,f)}})}),o)}))};const R=function(e){let t,r=e[0],n=e[0];const o=e.length;for(let a=1;a<o;a++)t=e[a],r=Math.min(r,t),n=Math.max(n,t);return{min:r,max:n}};function F(r,n,o){0===r.planarConfiguration?e(r.pixelData,n,o):t(r.pixelData,n,o)}function O(e,t,r){if("RGB"===e.photometricInterpretation)F(e,t,r);else if("YBR_RCT"===e.photometricInterpretation)F(e,t,r);else if("YBR_ICT"===e.photometricInterpretation)F(e,t,r);else if("PALETTE COLOR"===e.photometricInterpretation)et(e,t,r);else if("YBR_FULL_422"===e.photometricInterpretation)!function(e,t,r){if(void 0===e)throw new Error("decodeRGB: ybrBuffer must not be undefined");if(e.length%2!=0)throw new Error("decodeRGB: ybrBuffer length must be divisble by 3");const n=e.length/2;let o=0,a=0;if(r)for(let r=0;r<n;r+=2){const r=e[o++],n=e[o++],i=e[o++],s=e[o++];t[a++]=r+1.402*(s-128),t[a++]=r-.34414*(i-128)-.71414*(s-128),t[a++]=r+1.772*(i-128),t[a++]=255,t[a++]=n+1.402*(s-128),t[a++]=n-.34414*(i-128)-.71414*(s-128),t[a++]=n+1.772*(i-128),t[a++]=255}else for(let r=0;r<n;r+=2){const r=e[o++],n=e[o++],i=e[o++],s=e[o++];t[a++]=r+1.402*(s-128),t[a++]=r-.34414*(i-128)-.71414*(s-128),t[a++]=r+1.772*(i-128),t[a++]=n+1.402*(s-128),t[a++]=n-.34414*(i-128)-.71414*(s-128),t[a++]=n+1.772*(i-128)}}(e.pixelData,t,r);else{if("YBR_FULL"!==e.photometricInterpretation)throw new Error(`No color space conversion for photometric interpretation ${e.photometricInterpretation}`);!function(e,t,r){0===e.planarConfiguration?o(e.pixelData,t,r):a(e.pixelData,t,r)}(e,t,r)}}function B(e){return function(e){let t;try{return decodeURIComponent(escape(e))}catch(r){if(t=r,t instanceof URIError)return e;throw t}}(String.fromCharCode.apply(null,Array.prototype.slice.apply(new Uint8Array(e))))}const U=function(e,t,r){const n=(new Date).getTime(),o=new Blob([t],{type:"image/jpeg"});return new Promise(((t,a)=>{const i=new FileReader;void 0===i.readAsBinaryString?i.readAsArrayBuffer(o):i.readAsBinaryString(o),i.onload=function(){const o=new Image;o.onload=function(){r.height=o.height,r.width=o.width,e.rows=o.height,e.columns=o.width;const a=r.getContext("2d");a.drawImage(this,0,0);const i=a.getImageData(0,0,o.width,o.height),s=(new Date).getTime();e.pixelData=new Uint8Array(i.data.buffer),e.imageData=i,e.decodeTimeInMS=s-n;const l=R(e.pixelData);e.smallestPixelValue=l.min,e.largestPixelValue=l.max,e.pixelDataLength=e.pixelData.length,t(e)},o.onerror=function(e){a(e)},void 0===i.readAsBinaryString?o.src=`data:image/jpeg;base64,${window.btoa(B(i.result))}`:o.src=`data:image/jpeg;base64,${window.btoa(i.result)}`},i.onerror=e=>{a(e)}}))};function N(){return new Worker(r.p+"index.worker.1c69152d710fa7b84bce.worker.js")}let j=0;const W=[],Z=[],$=_(),G={maxWebWorkers:navigator.hardwareConcurrency||1,startWebWorkersOnDemand:!0,webWorkerTaskPaths:[],taskConfiguration:{decodeTask:{initializeCodecsOnStartup:!1,strict:$.strict}}};let V;const q={maxWebWorkers:0,numWebWorkers:0,numTasksQueued:0,numTasksExecuting:0,numTasksCompleted:0,totalTaskTimeInMS:0,totalTimeDelayedInMS:0};function z(){if(W.length){for(let e=0;e<Z.length;e++)if("ready"===Z[e].status){Z[e].status="busy";const t=W.shift();t.start=(new Date).getTime();const r=(new Date).getTime();return q.totalTimeDelayedInMS+=r-t.added,Z[e].task=t,Z[e].worker.postMessage({taskType:t.taskType,workerIndex:e,data:t.data},t.transferList),void q.numTasksExecuting++}Z.length<V.maxWebWorkers&&H()}}function Y(e){if("initialize"===e.data.taskType)Z[e.data.workerIndex].status="ready",z();else{const t=Z[e.data.workerIndex].task.start,r="success"===e.data.status?"resolve":"reject";try{Z[e.data.workerIndex].task.deferred[r](e.data.result)}catch(e){console.warn("Caught error delivering response",e)}Z[e.data.workerIndex].task=void 0,q.numTasksExecuting--,Z[e.data.workerIndex].status="ready",q.numTasksCompleted++;const n=(new Date).getTime();q.totalTaskTimeInMS+=n-t,z()}}function H(){if(Z.length>=V.maxWebWorkers)return;const e=new N;Z.push({worker:e,status:"initializing"}),e.addEventListener("message",Y),e.postMessage({taskType:"initialize",workerIndex:Z.length-1,config:V})}function K(e){if(V=e=e||G,V.maxWebWorkers=V.maxWebWorkers||navigator.hardwareConcurrency||1,!V.startWebWorkersOnDemand)for(let e=0;e<V.maxWebWorkers;e++)H()}const J={initialize:K,loadWebWorkerTask:function(e,t){V.webWorkerTaskPaths.push(e),t&&(V.taskConfiguration=Object.assign(V.taskConfiguration,t));for(let t=0;t<Z.length;t++)Z[t].worker.postMessage({taskType:"loadWebWorkerTask",workerIndex:Z.length-1,sourcePath:e,config:V})},addTask:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3?arguments[3]:void 0;V||K();let o={resolve:void 0,reject:void 0};const a=new Promise(((e,t)=>{o={resolve:e,reject:t}}));let i;for(i=0;i<W.length&&!(W[i].priority<r);i++);const s=j++;return W.splice(i,0,{taskId:s,taskType:e,status:"ready",added:(new Date).getTime(),data:t,deferred:o,priority:r,transferList:n}),z(),{taskId:s,promise:a}},getStatistics:function(){return q.maxWebWorkers=V.maxWebWorkers,q.numWebWorkers=Z.length,q.numTasksQueued=W.length,q},setTaskPriority:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(let r=0;r<W.length;r++)if(W[r].taskId===e){const e=W.splice(r,1)[0];for(e.priority=t,r=0;r<W.length&&!(W[r].priority<t);r++);return W.splice(r,0,e),!0}return!1},cancelTask:function(e,t){for(let r=0;r<W.length;r++)if(W[r].taskId===e){return W.splice(r,1).deferred.reject(t),!0}return!1},webWorkers:Z,terminate:function(){for(let e=0;e<Z.length;e++)Z[e].worker.terminate();Z.length=0,V=void 0}};var X=r(578);function Q(e,t,r,n,o){const a=n.priority||void 0,i=n.transferPixelData?[r.buffer]:void 0;return J.addTask("decodeTask",{imageFrame:e,transferSyntax:t,pixelData:r,options:n,decodeConfig:o},a,i).promise}window.pako={inflateRaw:X.Hq};const ee=function(e,t,r,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=arguments.length>5?arguments[5]:void 0;switch(t){case"1.2.840.10008.1.2":case"1.2.840.10008.1.2.1":case"1.2.840.10008.1.2.2":case"1.2.840.10008.1.2.1.99":case"1.2.840.10008.1.2.5":case"1.2.840.10008.1.2.4.51":case"1.2.840.10008.1.2.4.57":case"1.2.840.10008.1.2.4.70":case"1.2.840.10008.1.2.4.80":case"1.2.840.10008.1.2.4.81":case"1.2.840.10008.1.2.4.90":case"1.2.840.10008.1.2.4.91":case"3.2.840.10008.1.2.4.96":return Q(e,t,r,o,a);case"1.2.840.10008.1.2.4.50":return 8!==e.bitsAllocated||3!==e.samplesPerPixel&&4!==e.samplesPerPixel?Q(e,t,r,o,a):U(e,r,n)}return Promise.reject(new Error(`No decoder for transfer syntax ${t}`))};const te=function(e){const{cornerstone:t}=Xe,r=t.metaData.get("imagePixelModule",e);return{samplesPerPixel:r.samplesPerPixel,photometricInterpretation:r.photometricInterpretation,planarConfiguration:r.planarConfiguration,rows:r.rows,columns:r.columns,bitsAllocated:r.bitsAllocated,bitsStored:r.bitsStored,pixelRepresentation:r.pixelRepresentation,smallestPixelValue:r.smallestPixelValue,largestPixelValue:r.largestPixelValue,redPaletteColorLookupTableDescriptor:r.redPaletteColorLookupTableDescriptor,greenPaletteColorLookupTableDescriptor:r.greenPaletteColorLookupTableDescriptor,bluePaletteColorLookupTableDescriptor:r.bluePaletteColorLookupTableDescriptor,redPaletteColorLookupTableData:r.redPaletteColorLookupTableData,greenPaletteColorLookupTableData:r.greenPaletteColorLookupTableData,bluePaletteColorLookupTableData:r.bluePaletteColorLookupTableData,pixelData:void 0,imageId:e}};function re(e){return"RGB"===e||"PALETTE COLOR"===e||"YBR_FULL"===e||"YBR_FULL_422"===e||"YBR_PARTIAL_422"===e||"YBR_PARTIAL_420"===e||"YBR_RCT"===e||"YBR_ICT"===e}const ne=function(e,t){if(t=t||e.transferSyntax,8===e.bitsAllocated&&"1.2.840.10008.1.2.4.50"===t&&(3===e.samplesPerPixel||4===e.samplesPerPixel))return!0};let oe="";function ae(e){const t=function(e,t){let r;return Number.isInteger(e)&&Number.isInteger(t)?e>=0?t<=255?r=Uint8Array:t<=65535&&(r=Uint16Array):e>=-128&&t<=127?r=Int8Array:e>=-32768&&t<=32767&&(r=Int16Array):r=Float32Array,r}(e.smallestPixelValue,e.largestPixelValue);if(!t)throw new Error("Could not apply a typed array to the pixel data");{const r=new t(e.pixelData);e.pixelData=r}}function ie(e,t){const r=e.length/4;let n=0,o=0;for(let a=0;a<r;a++)t[o++]=e[n++],t[o++]=e[n++],t[o++]=e[n++],n++;return t}const se=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=n.useRGBA;if(n.preScale={enabled:!(!n.preScale||void 0===n.preScale.enabled)&&n.preScale.enabled},!t||!t.length)return Promise.reject(new Error("The file does not contain image data."));const{cornerstone:a}=Xe,i=document.createElement("canvas"),s=te(e);if(n.preScale.enabled){const t=function(e,t){const r=e.get("modalityLutModule",t)||{},n=e.get("generalSeriesModule",t)||{},{modality:o}=n,a={rescaleSlope:r.rescaleSlope,rescaleIntercept:r.rescaleIntercept,modality:o},i=e.get("scalingModule",t)||{};return{...a,..."PT"===o&&{suvbw:i.suvbw}}}(a.metaData,e);t&&(n.preScale={...n.preScale,scalingParameters:t})}n.isSharedArrayBuffer=n.targetBuffer?.arrayBuffer&&n.targetBuffer.arrayBuffer instanceof SharedArrayBuffer;const{decodeConfig:l}=_(),c=ee(s,r,t,i,n,l),{use16BitDataType:u}=l,d=re(s.photometricInterpretation);return new Promise(((t,s)=>{c.then((function(s){if(n.skipCreateImage)return t(s);let l=!1;if(n.targetBuffer&&n.targetBuffer.type&&!d){const{arrayBuffer:e,type:t,offset:r=0,length:o}=n.targetBuffer,a=s.pixelDataLength,i=r,c=null!=o?o:a-i,d={Uint8Array,Uint16Array:u?Uint16Array:void 0,Int16Array:u?Int16Array:void 0,Float32Array};if(c!==s.pixelDataLength)throw new Error(`target array for image does not have the same length (${c}) as the decoded image length (${s.pixelDataLength}).`);const f=d[t],m=e?new f(e,i,c):new f(s.pixelData);if(c!==s.pixelDataLength)throw new Error("target array for image does not have the same length as the decoded image length.");s.pixelData=m,l=!0}l||ae(s);const c=a.metaData.get("imagePlaneModule",e)||{},f=a.metaData.get("voiLutModule",e)||{},m=a.metaData.get("modalityLutModule",e)||{},g=a.metaData.get("sopCommonModule",e)||{};if(d){if(o){if(!ne(s,r)&&"RGB"!==s.photometricInterpretation){i.height=s.rows,i.width=s.columns;const e=i.getContext("2d").createImageData(s.columns,s.rows);O(s,e.data,o),s.imageData=e,s.pixelData=e.data,s.pixelDataLength=e.data.length}}else if(ne(s,r)){const e=new Uint8Array(s.pixelData.length/4*3);s.pixelData=ie(s.pixelData,e),s.pixelDataLength=s.pixelData.length}else if("PALETTE COLOR"===s.photometricInterpretation){i.height=s.rows,i.width=s.columns;const e=i.getContext("2d").createImageData(s.columns,s.rows);O(s,e.data,!0);const t=new e.data.constructor(e.data.length/4*3);s.pixelData=new Uint8Array(ie(e.data,t)),s.pixelDataLength=s.pixelData.length}const e=R(s.pixelData);s.smallestPixelValue=e.min,s.largestPixelValue=e.max}const h={imageId:e,color:d,columnPixelSpacing:c.columnPixelSpacing,columns:s.columns,height:s.rows,preScale:s.preScale,intercept:m.rescaleIntercept?m.rescaleIntercept:0,slope:m.rescaleSlope?m.rescaleSlope:1,invert:"MONOCHROME1"===s.photometricInterpretation,minPixelValue:s.smallestPixelValue,maxPixelValue:s.largestPixelValue,rowPixelSpacing:c.rowPixelSpacing,rows:s.rows,sizeInBytes:s.pixelData.byteLength,width:s.columns,windowCenter:f.windowCenter?f.windowCenter[0]:void 0,windowWidth:f.windowWidth?f.windowWidth[0]:void 0,voiLUTFunction:f.voiLUTFunction?f.voiLUTFunction:void 0,decodeTimeInMS:s.decodeTimeInMS,floatPixelData:void 0,imageFrame:s,rgba:d&&o,getPixelData:()=>s.pixelData,getCanvas:void 0,numComps:void 0};var p;if(window.image=h,h.color&&(h.getCanvas=function(){if(oe===e)return i;const t=h.columns,r=h.rows;i.height=r,i.width=t;const n=i.getContext("2d"),o=n.createImageData(t,r),a=s.pixelData;if(a.length===t*r*4)for(let e=0;e<a.length;e++)o.data[e]=a[e];else if(a.length===t*r*3){let e=0;for(let t=0;t<a.length;t+=3)o.data[e++]=a[t],o.data[e++]=a[t+1],o.data[e++]=a[t+2],o.data[e++]=255}return s.pixelData=o.data,s.pixelDataLength=o.data.length,s.imageData=o,n.putImageData(s.imageData,0,0),oe=e,i}),m.modalityLUTSequence&&m.modalityLUTSequence.length>0&&("1.2.840.10008.5.1.4.1.1.12.1"!==(p=g.sopClassUID)&&"1.2.840.10008.5.1.4.1.1.12.2.1"!==p)&&(h.modalityLUT=m.modalityLUTSequence[0]),f.voiLUTSequence&&f.voiLUTSequence.length>0&&(h.voiLUT=f.voiLUTSequence[0]),h.color&&(h.windowWidth=255,h.windowCenter=127),void 0===h.windowCenter||void 0===h.windowWidth){const e=h.imageFrame.minAfterScale,t=h.imageFrame.maxAfterScale;h.windowWidth=t-e,h.windowCenter=(t+e)/2}t(h)}),s)}))};const le=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=Xe.cornerstone.imageRetrievalPoolManager,n=(new Date).getTime();return{promise:new Promise(((o,a)=>{const i=t.requestType||"interaction",s=t.additionalDetails||{imageId:e},l=void 0===t.priority?5:t.priority,c=t.addToBeginning||!1,u=e.substring(7);r.addRequest(function(e,r,i){return M(e,r,i).then((e=>{const i=function(e){const t="1.2.840.10008.1.2";if(!e)return t;const r=e.split(";"),n={};r.forEach((e=>{const t=e.split("=");if(2!==t.length)return;const r=t[1].trim().replace(/"/g,"");n[t[0].trim()]=r}));const o={"image/jpeg":"1.2.840.10008.1.2.4.50","image/x-dicom-rle":"1.2.840.10008.1.2.5","image/x-jls":"1.2.840.10008.1.2.4.80","image/jls":"1.2.840.10008.1.2.4.80","image/jll":"1.2.840.10008.1.2.4.70","image/jp2":"1.2.840.10008.1.2.4.90","image/jpx":"1.2.840.10008.1.2.4.92","image/jphc":"3.2.840.10008.1.2.4.96","image/jxl":"1.2.840.10008.1.2.4.140"};return n["transfer-syntax"]?n["transfer-syntax"]:e&&!Object.keys(n).length&&o[e]?o[e]:n.type&&o[n.type]?o[n.type]:o[e]?o[e]:t}(e.contentType),s=e.imageFrame.pixelData;se(r,s,i,t).then((e=>{const t=(new Date).getTime();e.loadTimeInMS=t-n,o(e)}),a)}),a).catch((e=>{a(e)}))}.bind(this,u,e,"multipart/related; type=application/octet-stream; transfer-syntax=*"),i,s,l,c)})),cancelFn:void 0}};const ce={metaData:{getNumberString:s,getNumberValue:l,getNumberValues:c,getValue:i,metaDataProvider:T},findIndexOfString:P,getPixelData:M,loadImage:le,metaDataManager:w,register:function(e){e.registerImageLoader("wadors",le),e.metaData.addProvider(T)}};function ue(e,t){if(e.elements[t]&&6===e.elements[t].length)return[e.uint16(t,0),e.uint16(t,1),e.uint16(t,2)]}function de(e,t,r){const n=[],o=e.elements[t];for(let a=0;a<r[0];a++)16===r[2]?n[a]=e.uint16(t,a):n[a]=e.byteArray[a+o.dataOffset];return n}const fe=function(e){const t={samplesPerPixel:e.uint16("x00280002"),photometricInterpretation:e.string("x00280004"),rows:e.uint16("x00280010"),columns:e.uint16("x00280011"),bitsAllocated:e.uint16("x00280100"),bitsStored:e.uint16("x00280101"),highBit:e.uint16("x00280102"),pixelRepresentation:e.uint16("x00280103"),planarConfiguration:e.uint16("x00280006"),pixelAspectRatio:e.string("x00280034")};return function(e,t){0===e.uint16("x00280103")?(t.smallestPixelValue=e.uint16("x00280106"),t.largestPixelValue=e.uint16("x00280107")):(t.smallestPixelValue=e.int16("x00280106"),t.largestPixelValue=e.int16("x00280107"))}(e,t),"PALETTE COLOR"===t.photometricInterpretation&&e.elements.x00281101&&function(e,t){t.redPaletteColorLookupTableDescriptor=ue(e,"x00281101"),t.greenPaletteColorLookupTableDescriptor=ue(e,"x00281102"),t.bluePaletteColorLookupTableDescriptor=ue(e,"x00281103"),0===t.redPaletteColorLookupTableDescriptor[0]&&(t.redPaletteColorLookupTableDescriptor[0]=65536,t.greenPaletteColorLookupTableDescriptor[0]=65536,t.bluePaletteColorLookupTableDescriptor[0]=65536);const r=t.redPaletteColorLookupTableDescriptor[0],n=e.elements.x00281201.length===r?8:16;t.redPaletteColorLookupTableDescriptor[2]!==n&&(t.redPaletteColorLookupTableDescriptor[2]=n,t.greenPaletteColorLookupTableDescriptor[2]=n,t.bluePaletteColorLookupTableDescriptor[2]=n),t.redPaletteColorLookupTableData=de(e,"x00281201",t.redPaletteColorLookupTableDescriptor),t.greenPaletteColorLookupTableData=de(e,"x00281202",t.greenPaletteColorLookupTableDescriptor),t.bluePaletteColorLookupTableData=de(e,"x00281203",t.bluePaletteColorLookupTableDescriptor)}(e,t),t};function me(e,t){let r=t.uint16("x00283002",0);0===r&&(r=65535);let n=0;n=0===e?t.uint16("x00283002",1):t.int16("x00283002",1);const o={id:"1",firstValueMapped:n,numBitsPerEntry:t.uint16("x00283002",2),lut:[]};for(let n=0;n<r;n++)o.lut[n]=0===e?t.uint16("x00283006",n):t.int16("x00283006",n);return o}const ge=function(e,t){if(!t||!t.items||!t.items.length)return;const r=[];for(let n=0;n<t.items.length;n++){const o=me(e,t.items[n].dataSet);o&&r.push(o)}return r};const he=function(e){const t=e.string("x00080016");if("1.2.840.10008.5.1.4.1.1.2"===t||"1.2.840.10008.5.1.4.1.1.2.1"===t)return 1;const r=e.floatString("x00281052"),n=e.floatString("x00281053");if(void 0!==r&&void 0!==n){const t=function(e){const t=e.uint16("x00280103"),r=e.uint16("x00280101");return 0===t?0:-1<<r-1}(e);return t*n+r<0?1:0}return e.elements.x00283000&&e.elements.x00283000.length>0?0:e.uint16("x00280103")};const pe=function(e,t,r){const n=[],o=e.string(t);if(!o)return;const a=o.split("\\");if(!(r&&a.length<r)){for(let e=0;e<a.length;e++)n.push(parseFloat(a[e]));return n}};const xe=function(e){const t=e.indexOf(":");let r=e.substring(t+1);const n=r.indexOf("frame=");let o;if(-1!==n){const e=r.substring(n+6);o=parseInt(e,10),r=r.substring(0,n-1)}return{scheme:e.substring(0,t),url:r,frame:o,pixelDataFrame:void 0!==o?o-1:void 0}};function we(e){const{dicomParser:t}=Xe;let r,n=t.parseDicom(e,{untilTag:"x7fe00010"});n.elements.x7fe00010||console.warn("Pixel data not found!");try{r=t.parseDicom(e)}catch(e){console.error(e),console.log("pixel data dataset:",e.dataSet),r=e.dataSet}return n.elements.x7fe00010=r.elements.x7fe00010,n=function(e){const t=e.elements.x7fe00010.fragments,r=e.byteArray.length;for(const e of t){const{position:t,length:n}=e;n>r-t&&(console.log(`Truncated fragment, changing fragment length from ${e.length} to ${r-t}`),e.length=r-t)}return e}(n),n}async function be(e,t,r){const n=we(e),{uri:o,imageId:a,fileTotalLength:i}=r;return n.fetchMore=async function(s){const l=Object.assign({uri:o,imageId:a,fetchedLength:e.length,lengthToFetch:i-e.length},s),{fetchedLength:c,lengthToFetch:u}=l,{arrayBuffer:d}=await t(o,a,{byteRange:`${c}-${c+u}`}),f=new Uint8Array(d),m=new Uint8Array(n.byteArray.length+f.length);return m.set(n.byteArray),m.set(f,n.byteArray.length),be(m,t,r)},n}function ye(e,t,r){const n={};(t?Object.values(t.items[0].dataSet.elements):[]).map((e=>n[e.tag]=e));const o={};return(e?Object.values(e.items[r-1].dataSet.elements):[]).map((e=>o[e.tag]=e)),{shared:n,perFrame:o}}function ke(e){if(!e)return;const{elements:t,...r}=e,{x52009230:n,x52009229:o,...a}=t;return{NumberOfFrames:e.intString("x00280008"),PerFrameFunctionalGroupsSequence:n,SharedFunctionalGroupsSequence:o,otherElements:a,otherAttributtes:r}}function ve(e){if(Pe[e])return Pe[e]}function De(e){if(!e)return!1;const t=e.intString("x00280008");return t&&t>1}const Te={_get:ve,generateMultiframeWADOURIs:function(e){const t=[],r=ve(e);if(De(r)){const n=r.intString("x00280008");for(let r=1;r<=n;r++)t.push(`${e}&frame=${r}`)}else t.push(e);return t},retrieveMultiframeDataset:function(e){const t=function(e){return e.indexOf("&frame=")}(e),r=-1===t?e:e.slice(0,t),n=parseInt(e.slice(t+7),10)||1;let o;return o=Pe[r]?Pe[r].dataSet:void 0,{dataSet:o,frame:n}},isMultiframeDataset:function(e){return De(ve(e))}};let Se=0,Pe={},Ie={};function Ce(){return{cacheSizeInBytes:Se,numberOfDataSetsCached:Object.keys(Pe).length}}const _e={isLoaded:function(e){return void 0!==Pe[e]},load:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A,r=arguments.length>2?arguments[2]:void 0;const{cornerstone:n,dicomParser:o}=Xe;if(Pe[e])return new Promise((t=>{Pe[e].cacheCount++,t(Pe[e].dataSet)}));if(Ie[e])return Ie[e].cacheCount++,Ie[e];const a=t(e,r),i=new Promise(((s,l)=>{a.then((async function(a){const c={isPartialContent:!1,fileTotalLength:null};if(!(a instanceof ArrayBuffer)){if(!a.arrayBuffer)return l(new Error("If not returning ArrayBuffer, must return object with `arrayBuffer` parameter"));c.isPartialContent=a.flags.isPartialContent,c.fileTotalLength=a.flags.fileTotalLength,a=a.arrayBuffer}const u=new Uint8Array(a);let d;try{d=c.isPartialContent?await be(u,t,{uri:e,imageId:r,fileTotalLength:c.fileTotalLength}):o.parseDicom(u)}catch(e){return l(e)}Pe[e]={dataSet:d,cacheCount:i.cacheCount},Se+=d.byteArray.length,s(d),n.triggerEvent(n.events,"datasetscachechanged",{uri:e,action:"loaded",cacheInfo:Ce()})}),l).then((()=>{delete Ie[e]}),(()=>{delete Ie[e]}))}));return i.cacheCount=1,Ie[e]=i,i},unload:function(e){const{cornerstone:t}=Xe;Pe[e]&&(Pe[e].cacheCount--,0===Pe[e].cacheCount&&(Se-=Pe[e].dataSet.byteArray.length,delete Pe[e],t.triggerEvent(t.events,"datasetscachechanged",{uri:e,action:"unloaded",cacheInfo:Ce()})))},getInfo:Ce,purge:function(){Pe={},Ie={},Se=0},get:function(e){let t;if(e.includes("&frame=")){const{frame:r,dataSet:n}=Te.retrieveMultiframeDataset(e);t=function(e,t){if(!t)return;const{NumberOfFrames:r,PerFrameFunctionalGroupsSequence:n,SharedFunctionalGroupsSequence:o,otherElements:a}=ke(t);if(n||r>1){const{shared:r,perFrame:i}=ye(n,o,e),s={elements:{...a,...r,...i}},l=Object.create(t);return Object.assign(l,s)}return t}(r,n)}else Pe[e]&&(t=Pe[e].dataSet);return t},update:function(e,t){const r=Pe[e];r?(Se-=r.dataSet.byteArray.length,r.dataSet=t,Se+=t.byteArray.length,Xe.cornerstone.triggerEvent(Xe.cornerstone.events,"datasetscachechanged",{uri:e,action:"updated",cacheInfo:Ce()})):console.error(`No loaded dataSet for uri ${e}`)}};function Ae(e,t){const r=e.string("x00080008");if(r){const e=r.split("\\");if(e.length>t)return e[t]}}function Le(e){let t=pe(e,"x00200037",6);return!t&&e.elements.x00209116&&(t=pe(e.elements.x00209116.items[0].dataSet,"x00200037",6)),t||(t=function(e){let t;if(e.string("x00080060").includes("NM")){const r=Ae(e,2);r&&b(r)&&e.elements.x00540022&&(t=pe(e.elements.x00540022.items[0].dataSet,"x00200037",6))}return t}(e)),t}function Ee(e){let t=pe(e,"x00200032",3);return!t&&e.elements.x00209113&&(t=pe(e.elements.x00209113.items[0].dataSet,"x00200032",3)),t||(t=function(e){let t;if(e.string("x00080060").includes("NM")){const r=Ae(e,2);r&&b(r)&&e.elements.x00540022&&(t=pe(e.elements.x00540022.items[0].dataSet,"x00200032",3))}return t}(e)),t}function Me(e){let t=pe(e,"x00280030",2);return!t&&e.elements.x00289110&&(t=pe(e.elements.x00289110.items[0].dataSet,"x00280030",2)),t}function Re(e){let t;return e.elements.x00180050?t=e.floatString("x00180050"):e.elements.x00289110&&e.elements.x00289110.items.length&&e.elements.x00289110.items[0].dataSet.elements.x00180050&&(t=e.elements.x00289110.items[0].dataSet.floatString("x00180050")),t}const Fe=function(e,t){const{dicomParser:r}=Xe,n=xe(t);if("multiframeModule"===e){const e=Te.retrieveMultiframeDataset(n.url);if(!e.dataSet)return;const t=function(e,t){if(!e)return;const{NumberOfFrames:r,PerFrameFunctionalGroupsSequence:n,SharedFunctionalGroupsSequence:o}=ke(e);if(n||r>1){const{shared:e,perFrame:a}=ye(n,o,t);return{NumberOfFrames:r,PerFrameFunctionalInformation:a,SharedFunctionalInformation:e}}return{NumberOfFrames:r}}(e.dataSet,e.frame);return t}let o=n.url;n.frame&&(o=`${o}&frame=${n.frame}`);const a=_e.get(o);if(a){if("generalSeriesModule"===e)return{modality:a.string("x00080060"),seriesInstanceUID:a.string("x0020000e"),seriesNumber:a.intString("x00200011"),studyInstanceUID:a.string("x0020000d"),seriesDate:r.parseDA(a.string("x00080021")),seriesTime:r.parseTM(a.string("x00080031")||""),acquisitionDate:r.parseDA(a.string("x00080022")||""),acquisitionTime:r.parseTM(a.string("x00080032")||"")};if("patientStudyModule"===e)return{patientAge:a.intString("x00101010"),patientSize:a.floatString("x00101020"),patientWeight:a.floatString("x00101030")};if("imagePlaneModule"===e){const e=Le(a),t=Ee(a),r=Me(a);let n;a.elements.x00200052&&(n=a.string("x00200052"));const o=Re(a);let i;a.elements.x00201041&&(i=a.floatString("x00201041"));let s=null,l=null;r&&(l=r[0],s=r[1]);let c=null,u=null;return e&&(c=[parseFloat(e[0]),parseFloat(e[1]),parseFloat(e[2])],u=[parseFloat(e[3]),parseFloat(e[4]),parseFloat(e[5])]),{frameOfReferenceUID:n,rows:a.uint16("x00280010"),columns:a.uint16("x00280011"),imageOrientationPatient:e,rowCosines:c,columnCosines:u,imagePositionPatient:t,sliceThickness:o,sliceLocation:i,pixelSpacing:r,rowPixelSpacing:l,columnPixelSpacing:s}}if("nmMultiframeGeometryModule"===e){const e=a.string("x00080060"),t=Ae(a,2);return{modality:e,imageType:a.string("x00080008"),imageSubType:t,imageOrientationPatient:Le(a),imagePositionPatient:Ee(a),sliceThickness:Re(a),pixelSpacing:Me(a),numberOfFrames:a.uint16("x00280008"),isNMReconstructable:b(t)&&e.includes("NM")}}if("imagePixelModule"===e)return fe(a);if("modalityLutModule"===e)return{rescaleIntercept:a.floatString("x00281052"),rescaleSlope:a.floatString("x00281053"),rescaleType:a.string("x00281054"),modalityLUTSequence:ge(a.uint16("x00280103"),a.elements.x00283000)};if("voiLutModule"===e){const e=he(a);return{windowCenter:pe(a,"x00281050",1),windowWidth:pe(a,"x00281051",1),voiLUTSequence:ge(e,a.elements.x00283010)}}if("sopCommonModule"===e)return{sopClassUID:a.string("x00080016"),sopInstanceUID:a.string("x00080018")};if("petIsotopeModule"===e){const e=a.elements.x00540016;if(void 0===e)return;const t=e.items[0].dataSet;return{radiopharmaceuticalInfo:{radiopharmaceuticalStartTime:r.parseTM(t.string("x00181072")||""),radionuclideTotalDose:t.floatString("x00181074"),radionuclideHalfLife:t.floatString("x00181075")}}}return"overlayPlaneModule"===e?function(e){const t=[];for(let r=0;r<=30;r+=2){let n=`x60${r.toString(16)}`;4===n.length&&(n=`x600${r.toString(16)}`);const o=e.elements[`${n}3000`];if(!o)continue;const a=[];for(let t=0;t<o.length;t++)for(let r=0;r<8;r++){const n=e.byteArray[o.dataOffset+t];a[8*t+r]=n>>r&1}t.push({rows:e.uint16(`${n}0010`),columns:e.uint16(`${n}0011`),type:e.string(`${n}0040`),x:e.int16(`${n}0050`,1)-1,y:e.int16(`${n}0050`,0)-1,pixelData:a,description:e.string(`${n}0022`),label:e.string(`${n}1500`),roiArea:e.string(`${n}1301`),roiMean:e.string(`${n}1302`),roiStandardDeviation:e.string(`${n}1303`)})}return{overlays:t}}(a):"transferSyntax"===e?{transferSyntaxUID:a.string("x00020010")}:"petSeriesModule"===e?{correctedImage:a.string("x00280051"),units:a.string("x00541001"),decayCorrection:a.string("x00541102")}:"petImageModule"===e?{frameReferenceTime:r.floatString(a.string("x00541300")||""),actualFrameDuration:r.intString(a.string("x00181242"))}:void 0}};let Oe=[];const Be={add:function(e){return"dicomfile:"+(Oe.push(e)-1)},get:function(e){return Oe[e]},remove:function(e){Oe[e]=void 0},purge:function(){Oe=[]}};function Ue(e,t){const{dicomParser:r}=Xe;if(e.elements.x7fe00010&&e.elements.x7fe00010.basicOffsetTable.length)return r.readEncapsulatedImageFrame(e,e.elements.x7fe00010,t);if(function(e){return e.intString("x00280008")!==e.elements.x7fe00010.fragments.length}(e)){const n=r.createJPEGBasicOffsetTable(e,e.elements.x7fe00010);return r.readEncapsulatedImageFrame(e,e.elements.x7fe00010,t,n)}return r.readEncapsulatedPixelDataFromFragments(e,e.elements.x7fe00010,t)}function Ne(e,t){return e&1<<t}const je=function(e,t,r){const n=new Uint8Array(r);for(let o=0;o<r;o++){const r=e[Math.floor(o/8)+t],a=o%8;n[o]=Ne(r,a)?1:0}return n};const We=function(e,t){const r=e.elements.x7fe00010||e.elements.x7fe00008,n=e.uint16("x00280100"),o=e.uint16("x00280010"),a=e.uint16("x00280011");let i=e.uint16("x00280002");"YBR_FULL_422"===e.string("x00280004")&&(i=2,console.warn("Using SamplesPerPixel of 2 for YBR_FULL_422 photometric interpretation.\n See http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.7.6.3.html for more information."));const s=r.dataOffset,l=o*a*i;let c;if(8===n){if(c=s+t*l,c>=e.byteArray.length)throw new Error("frame exceeds size of pixelData");return new Uint8Array(e.byteArray.buffer,c,l)}if(16===n){if(c=s+t*l*2,c>=e.byteArray.length)throw new Error("frame exceeds size of pixelData");return new Uint8Array(e.byteArray.buffer,c,2*l)}if(1===n){if(c=s+t*l*.125,c>=e.byteArray.length)throw new Error("frame exceeds size of pixelData");return je(e.byteArray,c,l)}if(32===n){if(c=s+t*l*4,c>=e.byteArray.length)throw new Error("frame exceeds size of pixelData");return new Uint8Array(e.byteArray.buffer,c,4*l)}throw new Error("unsupported pixel format")};const Ze=function(e){const t=xe(e),r=parseInt(t.url,10),n=Be.get(r);return new Promise(((e,t)=>{const r=new FileReader;r.onload=t=>{const r=t.target.result;e(r)},r.onerror=t,r.readAsArrayBuffer(n)}))};const $e=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=e.elements.x7fe00010||e.elements.x7fe00008;return r?r.encapsulatedPixelData?Ue(e,t):We(e,t):null};function Ge(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0;const i=(new Date).getTime(),s={cancelFn:void 0,promise:void 0};return s.promise=new Promise(((l,c)=>{e.then((e=>{const u=$e(e,r),d=e.string("x00020010"),f=(new Date).getTime(),m=se(t,u,d,o);!function(e,t){e.decache=function(){const e=xe(t);_e.unload(e.url)}}(s,t),m.then((t=>{t.data=e,t.sharedCacheKey=n;const r=(new Date).getTime();t.loadTimeInMS=f-i,t.totalTimeInMS=r-i,void 0!==a&&void 0!==a.imageDoneCallback&&a.imageDoneCallback(t),l(t)}),(function(t){c({error:t,dataSet:e})}))}),(function(e){c({error:e})}))})),s}function Ve(e){return"dicomweb"===e||"wadouri"===e?A:"dicomfile"===e?Ze:void 0}function qe(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=xe(e);t=Object.assign({},t);let n=t.loader;if(void 0===n?n=Ve(r.scheme):delete t.loader,_e.isLoaded(r.url)){return function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;const a=(new Date).getTime();return{promise:new Promise(((i,s)=>{const l=(new Date).getTime();let c;try{const n=$e(e,r),a=e.string("x00020010");c=se(t,n,a,o)}catch(t){return void s({error:t,dataSet:e})}c.then((t=>{t.data=e,t.sharedCacheKey=n;const r=(new Date).getTime();t.loadTimeInMS=l-a,t.totalTimeInMS=r-a,i(t)}),s)})),cancelFn:void 0}}(_e.get(r.url,n,e),e,r.pixelDataFrame,r.url,t)}return Ge(_e.load(r.url,n,e),e,r.frame,r.url,t)}const ze={metaData:{getImagePixelModule:fe,getLUTs:ge,getModalityLUTOutputPixelRepresentation:he,getNumberValues:pe,metaDataProvider:Fe},dataSetCacheManager:_e,fileManager:Be,getEncapsulatedImageFrame:Ue,getUncompressedImageFrame:We,loadFileRequest:Ze,loadImageFromPromise:Ge,getLoaderForScheme:Ve,loadImage:qe,parseImageId:xe,unpackBinaryFrame:je,register:function(e){e.registerImageLoader("dicomweb",qe),e.registerImageLoader("wadouri",qe),e.registerImageLoader("dicomfile",qe),e.metaData.addProvider(Fe)}};const Ye=function(e){ce.register(e),ze.register(e)};let He,Ke;const Je={set cornerstone(e){He=e,Ye(He)},get cornerstone(){if(!He){if(He=window&&window.cornerstone,!He)throw new Error("cornerstoneDICOMImageLoader requires a copy of Cornerstone to work properly. Please add cornerstoneDICOMImageLoader.external.cornerstone = cornerstone; to your application.");Ye(He)}return He},set dicomParser(e){Ke=e},get dicomParser(){if(!Ke){if(!window||!window.dicomParser)throw new Error("cornerstoneDICOMImageLoader requires a copy of dicomParser to work properly. Please add cornerstoneDICOMImageLoader.external.dicomParser = dicomParser; to your application.");Ke=window.dicomParser}return Ke}},Xe=Je;function Qe(e,t){const r=e.length,n=new Uint8ClampedArray(r);for(let o=0;o<r;++o)n[o]=e[o]>>t;return n}function et(e,t,r){const n=e.columns*e.rows,o=e.pixelData;let a=e.redPaletteColorLookupTableData;a||(a=Xe.cornerstone.metaData.get("imagePixelModule",e.imageId)?.redPaletteColorLookupTableData);let i=e.greenPaletteColorLookupTableData;i||(i=Xe.cornerstone.metaData.get("imagePixelModule",e.imageId)?.greenPaletteColorLookupTableData);let s=e.bluePaletteColorLookupTableData;if(s||(s=Xe.cornerstone.metaData.get("imagePixelModule",e.imageId)?.bluePaletteColorLookupTableData),!a||!i||!s)throw new Error("The image does not have a complete color palette. R, G, and B palette data are required.");const l=e.redPaletteColorLookupTableData.length;let c=0,u=0;const d=e.redPaletteColorLookupTableDescriptor[1],f=8===e.redPaletteColorLookupTableDescriptor[2]?0:8,m=Qe(a,f),g=Qe(i,f),h=Qe(s,f);if(r)for(let e=0;e<n;++e){let e=o[c++];e<d?e=0:e>d+l-1?e=l-1:e-=d,t[u++]=m[e],t[u++]=g[e],t[u++]=h[e],t[u++]=255}else for(let e=0;e<n;++e){let e=o[c++];e<d?e=0:e>d+l-1?e=l-1:e-=d,t[u++]=m[e],t[u++]=g[e],t[u++]=h[e]}}const tt=function(e){C(e)},rt={convertRGBColorByPixel:e,convertRGBColorByPlane:t,convertYBRFullByPixel:o,convertYBRFullByPlane:a,convertPALETTECOLOR:et,wadouri:ze,wadors:ce,configure:tt,convertColorSpace:O,createImage:se,decodeImageFrame:ee,decodeJPEGBaseline8BitColor:U,getImageFrame:te,getPixelData:M,getMinMax:R,isColorImage:re,isJPEGBaseline8BitColor:ne,webWorkerManager:J,internal:L,external:Je}})(),n})()));
|
|
7
|
+
!function(e,t){ true?module.exports=t():0}(this,(()=>(()=>{"use strict";var e={578:(e,t,r)=>{const n=r(823),o=r(187),a=r(592),i=r(604),s=r(249),l=r(968),c=Object.prototype.toString,{Z_NO_FLUSH:u,Z_FINISH:d,Z_OK:f,Z_STREAM_END:m,Z_NEED_DICT:g,Z_STREAM_ERROR:h,Z_DATA_ERROR:p,Z_MEM_ERROR:x}=r(684);function w(e){this.options=o.assign({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;let r=n.inflateInit2(this.strm,t.windowBits);if(r!==f)throw new Error(i[r]);if(this.header=new l,n.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=a.string2buf(t.dictionary):"[object ArrayBuffer]"===c.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=n.inflateSetDictionary(this.strm,t.dictionary),r!==f)))throw new Error(i[r])}function b(e,t){const r=new w(t);if(r.push(e),r.err)throw r.msg||i[r.err];return r.result}w.prototype.push=function(e,t){const r=this.strm,o=this.options.chunkSize,i=this.options.dictionary;let s,l,w;if(this.ended)return!1;for(l=t===~~t?t:!0===t?d:u,"[object ArrayBuffer]"===c.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(o),r.next_out=0,r.avail_out=o),s=n.inflate(r,l),s===g&&i&&(s=n.inflateSetDictionary(r,i),s===f?s=n.inflate(r,l):s===p&&(s=g));r.avail_in>0&&s===m&&r.state.wrap>0&&0!==e[r.next_in];)n.inflateReset(r),s=n.inflate(r,l);switch(s){case h:case p:case g:case x:return this.onEnd(s),this.ended=!0,!1}if(w=r.avail_out,r.next_out&&(0===r.avail_out||s===m))if("string"===this.options.to){let e=a.utf8border(r.output,r.next_out),t=r.next_out-e,n=a.buf2string(r.output,e);r.next_out=t,r.avail_out=o-t,t&&r.output.set(r.output.subarray(e,e+t),0),this.onData(n)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(s!==f||0!==w){if(s===m)return s=n.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},w.prototype.onData=function(e){this.chunks.push(e)},w.prototype.onEnd=function(e){e===f&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},e.exports.Hq=function(e,t){return(t=t||{}).raw=!0,b(e,t)},r(684)},187:e=>{const t=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);e.exports.assign=function(e){const r=Array.prototype.slice.call(arguments,1);for(;r.length;){const n=r.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(const r in n)t(n,r)&&(e[r]=n[r])}}return e},e.exports.flattenChunks=e=>{let t=0;for(let r=0,n=e.length;r<n;r++)t+=e[r].length;const r=new Uint8Array(t);for(let t=0,n=0,o=e.length;t<o;t++){let o=e[t];r.set(o,n),n+=o.length}return r}},592:e=>{let t=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){t=!1}const r=new Uint8Array(256);for(let e=0;e<256;e++)r[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;r[254]=r[254]=1,e.exports.string2buf=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,r,n,o,a,i=e.length,s=0;for(o=0;o<i;o++)r=e.charCodeAt(o),55296==(64512&r)&&o+1<i&&(n=e.charCodeAt(o+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),o++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(t=new Uint8Array(s),a=0,o=0;a<s;o++)r=e.charCodeAt(o),55296==(64512&r)&&o+1<i&&(n=e.charCodeAt(o+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),o++)),r<128?t[a++]=r:r<2048?(t[a++]=192|r>>>6,t[a++]=128|63&r):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|63&r):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|63&r);return t};e.exports.buf2string=(e,n)=>{const o=n||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,n));let a,i;const s=new Array(2*o);for(i=0,a=0;a<o;){let t=e[a++];if(t<128){s[i++]=t;continue}let n=r[t];if(n>4)s[i++]=65533,a+=n-1;else{for(t&=2===n?31:3===n?15:7;n>1&&a<o;)t=t<<6|63&e[a++],n--;n>1?s[i++]=65533:t<65536?s[i++]=t:(t-=65536,s[i++]=55296|t>>10&1023,s[i++]=56320|1023&t)}}return((e,r)=>{if(r<65534&&e.subarray&&t)return String.fromCharCode.apply(null,e.length===r?e:e.subarray(0,r));let n="";for(let t=0;t<r;t++)n+=String.fromCharCode(e[t]);return n})(s,i)},e.exports.utf8border=(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);let n=t-1;for(;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+r[e[n]]>t?n:t}},693:e=>{e.exports=(e,t,r,n)=>{let o=65535&e|0,a=e>>>16&65535|0,i=0;for(;0!==r;){i=r>2e3?2e3:r,r-=i;do{o=o+t[n++]|0,a=a+o|0}while(--i);o%=65521,a%=65521}return o|a<<16|0}},684:e=>{e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},464:e=>{const t=new Uint32Array((()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t})());e.exports=(e,r,n,o)=>{const a=t,i=o+n;e^=-1;for(let t=o;t<i;t++)e=e>>>8^a[255&(e^r[t])];return-1^e}},968:e=>{e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},365:e=>{const t=16209;e.exports=function(e,r){let n,o,a,i,s,l,c,u,d,f,m,g,h,p,x,w,b,y,k,v,D,T,S,P;const I=e.state;n=e.next_in,S=e.input,o=n+(e.avail_in-5),a=e.next_out,P=e.output,i=a-(r-e.avail_out),s=a+(e.avail_out-257),l=I.dmax,c=I.wsize,u=I.whave,d=I.wnext,f=I.window,m=I.hold,g=I.bits,h=I.lencode,p=I.distcode,x=(1<<I.lenbits)-1,w=(1<<I.distbits)-1;e:do{g<15&&(m+=S[n++]<<g,g+=8,m+=S[n++]<<g,g+=8),b=h[m&x];t:for(;;){if(y=b>>>24,m>>>=y,g-=y,y=b>>>16&255,0===y)P[a++]=65535&b;else{if(!(16&y)){if(0==(64&y)){b=h[(65535&b)+(m&(1<<y)-1)];continue t}if(32&y){I.mode=16191;break e}e.msg="invalid literal/length code",I.mode=t;break e}k=65535&b,y&=15,y&&(g<y&&(m+=S[n++]<<g,g+=8),k+=m&(1<<y)-1,m>>>=y,g-=y),g<15&&(m+=S[n++]<<g,g+=8,m+=S[n++]<<g,g+=8),b=p[m&w];r:for(;;){if(y=b>>>24,m>>>=y,g-=y,y=b>>>16&255,!(16&y)){if(0==(64&y)){b=p[(65535&b)+(m&(1<<y)-1)];continue r}e.msg="invalid distance code",I.mode=t;break e}if(v=65535&b,y&=15,g<y&&(m+=S[n++]<<g,g+=8,g<y&&(m+=S[n++]<<g,g+=8)),v+=m&(1<<y)-1,v>l){e.msg="invalid distance too far back",I.mode=t;break e}if(m>>>=y,g-=y,y=a-i,v>y){if(y=v-y,y>u&&I.sane){e.msg="invalid distance too far back",I.mode=t;break e}if(D=0,T=f,0===d){if(D+=c-y,y<k){k-=y;do{P[a++]=f[D++]}while(--y);D=a-v,T=P}}else if(d<y){if(D+=c+d-y,y-=d,y<k){k-=y;do{P[a++]=f[D++]}while(--y);if(D=0,d<k){y=d,k-=y;do{P[a++]=f[D++]}while(--y);D=a-v,T=P}}}else if(D+=d-y,y<k){k-=y;do{P[a++]=f[D++]}while(--y);D=a-v,T=P}for(;k>2;)P[a++]=T[D++],P[a++]=T[D++],P[a++]=T[D++],k-=3;k&&(P[a++]=T[D++],k>1&&(P[a++]=T[D++]))}else{D=a-v;do{P[a++]=P[D++],P[a++]=P[D++],P[a++]=P[D++],k-=3}while(k>2);k&&(P[a++]=P[D++],k>1&&(P[a++]=P[D++]))}break}}break}}while(n<o&&a<s);k=g>>3,n-=k,g-=k<<3,m&=(1<<g)-1,e.next_in=n,e.next_out=a,e.avail_in=n<o?o-n+5:5-(n-o),e.avail_out=a<s?s-a+257:257-(a-s),I.hold=m,I.bits=g}},823:(e,t,r)=>{const n=r(693),o=r(464),a=r(365),i=r(446),{Z_FINISH:s,Z_BLOCK:l,Z_TREES:c,Z_OK:u,Z_STREAM_END:d,Z_NEED_DICT:f,Z_STREAM_ERROR:m,Z_DATA_ERROR:g,Z_MEM_ERROR:h,Z_BUF_ERROR:p,Z_DEFLATED:x}=r(684),w=16180,b=16190,y=16191,k=16192,v=16194,D=16199,T=16200,S=16206,P=16209,I=16210,C=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function _(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const A=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<w||t.mode>16211?1:0},L=e=>{if(A(e))return m;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=w,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,u},E=e=>{if(A(e))return m;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,L(e)},M=(e,t)=>{let r;if(A(e))return m;const n=e.state;return t<0?(r=0,t=-t):(r=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?m:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,E(e))},R=(e,t)=>{if(!e)return m;const r=new _;e.state=r,r.strm=e,r.window=null,r.mode=w;const n=M(e,t);return n!==u&&(e.state=null),n};let F,O,B=!0;const U=e=>{if(B){F=new Int32Array(512),O=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(i(1,e.lens,0,288,F,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;i(2,e.lens,0,32,O,0,e.work,{bits:5}),B=!1}e.lencode=F,e.lenbits=9,e.distcode=O,e.distbits=5},N=(e,t,r,n)=>{let o;const a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),n>=a.wsize?(a.window.set(t.subarray(r-a.wsize,r),0),a.wnext=0,a.whave=a.wsize):(o=a.wsize-a.wnext,o>n&&(o=n),a.window.set(t.subarray(r-n,r-n+o),a.wnext),(n-=o)?(a.window.set(t.subarray(r-n,r),0),a.wnext=n,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0};e.exports.inflateReset=E,e.exports.inflateReset2=M,e.exports.inflateResetKeep=L,e.exports.inflateInit=e=>R(e,15),e.exports.inflateInit2=R,e.exports.inflate=(e,t)=>{let r,_,L,E,M,R,F,O,B,j,W,Z,$,G,V,q,z,Y,H,K,J,X,Q=0;const ee=new Uint8Array(4);let te,re;const ne=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(A(e)||!e.output||!e.input&&0!==e.avail_in)return m;r=e.state,r.mode===y&&(r.mode=k),M=e.next_out,L=e.output,F=e.avail_out,E=e.next_in,_=e.input,R=e.avail_in,O=r.hold,B=r.bits,j=R,W=F,X=u;e:for(;;)switch(r.mode){case w:if(0===r.wrap){r.mode=k;break}for(;B<16;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(2&r.wrap&&35615===O){0===r.wbits&&(r.wbits=15),r.check=0,ee[0]=255&O,ee[1]=O>>>8&255,r.check=o(r.check,ee,2,0),O=0,B=0,r.mode=16181;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&O)<<8)+(O>>8))%31){e.msg="incorrect header check",r.mode=P;break}if((15&O)!==x){e.msg="unknown compression method",r.mode=P;break}if(O>>>=4,B-=4,J=8+(15&O),0===r.wbits&&(r.wbits=J),J>15||J>r.wbits){e.msg="invalid window size",r.mode=P;break}r.dmax=1<<r.wbits,r.flags=0,e.adler=r.check=1,r.mode=512&O?16189:y,O=0,B=0;break;case 16181:for(;B<16;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(r.flags=O,(255&r.flags)!==x){e.msg="unknown compression method",r.mode=P;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=P;break}r.head&&(r.head.text=O>>8&1),512&r.flags&&4&r.wrap&&(ee[0]=255&O,ee[1]=O>>>8&255,r.check=o(r.check,ee,2,0)),O=0,B=0,r.mode=16182;case 16182:for(;B<32;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}r.head&&(r.head.time=O),512&r.flags&&4&r.wrap&&(ee[0]=255&O,ee[1]=O>>>8&255,ee[2]=O>>>16&255,ee[3]=O>>>24&255,r.check=o(r.check,ee,4,0)),O=0,B=0,r.mode=16183;case 16183:for(;B<16;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}r.head&&(r.head.xflags=255&O,r.head.os=O>>8),512&r.flags&&4&r.wrap&&(ee[0]=255&O,ee[1]=O>>>8&255,r.check=o(r.check,ee,2,0)),O=0,B=0,r.mode=16184;case 16184:if(1024&r.flags){for(;B<16;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}r.length=O,r.head&&(r.head.extra_len=O),512&r.flags&&4&r.wrap&&(ee[0]=255&O,ee[1]=O>>>8&255,r.check=o(r.check,ee,2,0)),O=0,B=0}else r.head&&(r.head.extra=null);r.mode=16185;case 16185:if(1024&r.flags&&(Z=r.length,Z>R&&(Z=R),Z&&(r.head&&(J=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(_.subarray(E,E+Z),J)),512&r.flags&&4&r.wrap&&(r.check=o(r.check,_,Z,E)),R-=Z,E+=Z,r.length-=Z),r.length))break e;r.length=0,r.mode=16186;case 16186:if(2048&r.flags){if(0===R)break e;Z=0;do{J=_[E+Z++],r.head&&J&&r.length<65536&&(r.head.name+=String.fromCharCode(J))}while(J&&Z<R);if(512&r.flags&&4&r.wrap&&(r.check=o(r.check,_,Z,E)),R-=Z,E+=Z,J)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=16187;case 16187:if(4096&r.flags){if(0===R)break e;Z=0;do{J=_[E+Z++],r.head&&J&&r.length<65536&&(r.head.comment+=String.fromCharCode(J))}while(J&&Z<R);if(512&r.flags&&4&r.wrap&&(r.check=o(r.check,_,Z,E)),R-=Z,E+=Z,J)break e}else r.head&&(r.head.comment=null);r.mode=16188;case 16188:if(512&r.flags){for(;B<16;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(4&r.wrap&&O!==(65535&r.check)){e.msg="header crc mismatch",r.mode=P;break}O=0,B=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=y;break;case 16189:for(;B<32;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}e.adler=r.check=C(O),O=0,B=0,r.mode=b;case b:if(0===r.havedict)return e.next_out=M,e.avail_out=F,e.next_in=E,e.avail_in=R,r.hold=O,r.bits=B,f;e.adler=r.check=1,r.mode=y;case y:if(t===l||t===c)break e;case k:if(r.last){O>>>=7&B,B-=7&B,r.mode=S;break}for(;B<3;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}switch(r.last=1&O,O>>>=1,B-=1,3&O){case 0:r.mode=16193;break;case 1:if(U(r),r.mode=D,t===c){O>>>=2,B-=2;break e}break;case 2:r.mode=16196;break;case 3:e.msg="invalid block type",r.mode=P}O>>>=2,B-=2;break;case 16193:for(O>>>=7&B,B-=7&B;B<32;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if((65535&O)!=(O>>>16^65535)){e.msg="invalid stored block lengths",r.mode=P;break}if(r.length=65535&O,O=0,B=0,r.mode=v,t===c)break e;case v:r.mode=16195;case 16195:if(Z=r.length,Z){if(Z>R&&(Z=R),Z>F&&(Z=F),0===Z)break e;L.set(_.subarray(E,E+Z),M),R-=Z,E+=Z,F-=Z,M+=Z,r.length-=Z;break}r.mode=y;break;case 16196:for(;B<14;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(r.nlen=257+(31&O),O>>>=5,B-=5,r.ndist=1+(31&O),O>>>=5,B-=5,r.ncode=4+(15&O),O>>>=4,B-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=P;break}r.have=0,r.mode=16197;case 16197:for(;r.have<r.ncode;){for(;B<3;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}r.lens[ne[r.have++]]=7&O,O>>>=3,B-=3}for(;r.have<19;)r.lens[ne[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,te={bits:r.lenbits},X=i(0,r.lens,0,19,r.lencode,0,r.work,te),r.lenbits=te.bits,X){e.msg="invalid code lengths set",r.mode=P;break}r.have=0,r.mode=16198;case 16198:for(;r.have<r.nlen+r.ndist;){for(;Q=r.lencode[O&(1<<r.lenbits)-1],V=Q>>>24,q=Q>>>16&255,z=65535&Q,!(V<=B);){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(z<16)O>>>=V,B-=V,r.lens[r.have++]=z;else{if(16===z){for(re=V+2;B<re;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(O>>>=V,B-=V,0===r.have){e.msg="invalid bit length repeat",r.mode=P;break}J=r.lens[r.have-1],Z=3+(3&O),O>>>=2,B-=2}else if(17===z){for(re=V+3;B<re;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}O>>>=V,B-=V,J=0,Z=3+(7&O),O>>>=3,B-=3}else{for(re=V+7;B<re;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}O>>>=V,B-=V,J=0,Z=11+(127&O),O>>>=7,B-=7}if(r.have+Z>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=P;break}for(;Z--;)r.lens[r.have++]=J}}if(r.mode===P)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=P;break}if(r.lenbits=9,te={bits:r.lenbits},X=i(1,r.lens,0,r.nlen,r.lencode,0,r.work,te),r.lenbits=te.bits,X){e.msg="invalid literal/lengths set",r.mode=P;break}if(r.distbits=6,r.distcode=r.distdyn,te={bits:r.distbits},X=i(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,te),r.distbits=te.bits,X){e.msg="invalid distances set",r.mode=P;break}if(r.mode=D,t===c)break e;case D:r.mode=T;case T:if(R>=6&&F>=258){e.next_out=M,e.avail_out=F,e.next_in=E,e.avail_in=R,r.hold=O,r.bits=B,a(e,W),M=e.next_out,L=e.output,F=e.avail_out,E=e.next_in,_=e.input,R=e.avail_in,O=r.hold,B=r.bits,r.mode===y&&(r.back=-1);break}for(r.back=0;Q=r.lencode[O&(1<<r.lenbits)-1],V=Q>>>24,q=Q>>>16&255,z=65535&Q,!(V<=B);){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(q&&0==(240&q)){for(Y=V,H=q,K=z;Q=r.lencode[K+((O&(1<<Y+H)-1)>>Y)],V=Q>>>24,q=Q>>>16&255,z=65535&Q,!(Y+V<=B);){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}O>>>=Y,B-=Y,r.back+=Y}if(O>>>=V,B-=V,r.back+=V,r.length=z,0===q){r.mode=16205;break}if(32&q){r.back=-1,r.mode=y;break}if(64&q){e.msg="invalid literal/length code",r.mode=P;break}r.extra=15&q,r.mode=16201;case 16201:if(r.extra){for(re=r.extra;B<re;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}r.length+=O&(1<<r.extra)-1,O>>>=r.extra,B-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=16202;case 16202:for(;Q=r.distcode[O&(1<<r.distbits)-1],V=Q>>>24,q=Q>>>16&255,z=65535&Q,!(V<=B);){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(0==(240&q)){for(Y=V,H=q,K=z;Q=r.distcode[K+((O&(1<<Y+H)-1)>>Y)],V=Q>>>24,q=Q>>>16&255,z=65535&Q,!(Y+V<=B);){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}O>>>=Y,B-=Y,r.back+=Y}if(O>>>=V,B-=V,r.back+=V,64&q){e.msg="invalid distance code",r.mode=P;break}r.offset=z,r.extra=15&q,r.mode=16203;case 16203:if(r.extra){for(re=r.extra;B<re;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}r.offset+=O&(1<<r.extra)-1,O>>>=r.extra,B-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=P;break}r.mode=16204;case 16204:if(0===F)break e;if(Z=W-F,r.offset>Z){if(Z=r.offset-Z,Z>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=P;break}Z>r.wnext?(Z-=r.wnext,$=r.wsize-Z):$=r.wnext-Z,Z>r.length&&(Z=r.length),G=r.window}else G=L,$=M-r.offset,Z=r.length;Z>F&&(Z=F),F-=Z,r.length-=Z;do{L[M++]=G[$++]}while(--Z);0===r.length&&(r.mode=T);break;case 16205:if(0===F)break e;L[M++]=r.length,F--,r.mode=T;break;case S:if(r.wrap){for(;B<32;){if(0===R)break e;R--,O|=_[E++]<<B,B+=8}if(W-=F,e.total_out+=W,r.total+=W,4&r.wrap&&W&&(e.adler=r.check=r.flags?o(r.check,L,W,M-W):n(r.check,L,W,M-W)),W=F,4&r.wrap&&(r.flags?O:C(O))!==r.check){e.msg="incorrect data check",r.mode=P;break}O=0,B=0}r.mode=16207;case 16207:if(r.wrap&&r.flags){for(;B<32;){if(0===R)break e;R--,O+=_[E++]<<B,B+=8}if(4&r.wrap&&O!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=P;break}O=0,B=0}r.mode=16208;case 16208:X=d;break e;case P:X=g;break e;case I:return h;default:return m}return e.next_out=M,e.avail_out=F,e.next_in=E,e.avail_in=R,r.hold=O,r.bits=B,(r.wsize||W!==e.avail_out&&r.mode<P&&(r.mode<S||t!==s))&&N(e,e.output,e.next_out,W-e.avail_out)?(r.mode=I,h):(j-=e.avail_in,W-=e.avail_out,e.total_in+=j,e.total_out+=W,r.total+=W,4&r.wrap&&W&&(e.adler=r.check=r.flags?o(r.check,L,W,e.next_out-W):n(r.check,L,W,e.next_out-W)),e.data_type=r.bits+(r.last?64:0)+(r.mode===y?128:0)+(r.mode===D||r.mode===v?256:0),(0===j&&0===W||t===s)&&X===u&&(X=p),X)},e.exports.inflateEnd=e=>{if(A(e))return m;let t=e.state;return t.window&&(t.window=null),e.state=null,u},e.exports.inflateGetHeader=(e,t)=>{if(A(e))return m;const r=e.state;return 0==(2&r.wrap)?m:(r.head=t,t.done=!1,u)},e.exports.inflateSetDictionary=(e,t)=>{const r=t.length;let o,a,i;return A(e)?m:(o=e.state,0!==o.wrap&&o.mode!==b?m:o.mode===b&&(a=1,a=n(a,t,r,0),a!==o.check)?g:(i=N(e,t,r,r),i?(o.mode=I,h):(o.havedict=1,u)))},e.exports.inflateInfo="pako inflate (from Nodeca project)"},446:e=>{const t=15,r=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),n=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),o=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),a=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);e.exports=(e,i,s,l,c,u,d,f)=>{const m=f.bits;let g,h,p,x,w,b,y=0,k=0,v=0,D=0,T=0,S=0,P=0,I=0,C=0,_=0,A=null;const L=new Uint16Array(16),E=new Uint16Array(16);let M,R,F,O=null;for(y=0;y<=t;y++)L[y]=0;for(k=0;k<l;k++)L[i[s+k]]++;for(T=m,D=t;D>=1&&0===L[D];D--);if(T>D&&(T=D),0===D)return c[u++]=20971520,c[u++]=20971520,f.bits=1,0;for(v=1;v<D&&0===L[v];v++);for(T<v&&(T=v),I=1,y=1;y<=t;y++)if(I<<=1,I-=L[y],I<0)return-1;if(I>0&&(0===e||1!==D))return-1;for(E[1]=0,y=1;y<t;y++)E[y+1]=E[y]+L[y];for(k=0;k<l;k++)0!==i[s+k]&&(d[E[i[s+k]]++]=k);if(0===e?(A=O=d,b=20):1===e?(A=r,O=n,b=257):(A=o,O=a,b=0),_=0,k=0,y=v,w=u,S=T,P=0,p=-1,C=1<<T,x=C-1,1===e&&C>852||2===e&&C>592)return 1;for(;;){M=y-P,d[k]+1<b?(R=0,F=d[k]):d[k]>=b?(R=O[d[k]-b],F=A[d[k]-b]):(R=96,F=0),g=1<<y-P,h=1<<S,v=h;do{h-=g,c[w+(_>>P)+h]=M<<24|R<<16|F|0}while(0!==h);for(g=1<<y-1;_&g;)g>>=1;if(0!==g?(_&=g-1,_+=g):_=0,k++,0==--L[y]){if(y===D)break;y=i[s+d[k]]}if(y>T&&(_&x)!==p){for(0===P&&(P=T),w+=v,S=y-P,I=1<<S;S+P<D&&(I-=L[S+P],!(I<=0));)S++,I<<=1;if(C+=1<<S,1===e&&C>852||2===e&&C>592)return 1;p=_&x,c[p]=T<<24|S<<16|w-u|0}}return 0!==_&&(c[w+_]=y-P<<24|64<<16|0),f.bits=T,0}},604:e=>{e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},249:e=>{e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&!e;)e=n[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})();var n={};return(()=>{function e(e,t,r){if(void 0===e)throw new Error("decodeRGB: rgbBuffer must not be undefined");if(e.length%3!=0)throw new Error("decodeRGB: rgbBuffer length must be divisible by 3");const n=e.length/3;let o=0,a=0;if(r)for(let r=0;r<n;r++)t[a++]=e[o++],t[a++]=e[o++],t[a++]=e[o++],t[a++]=255;else t.set(e)}function t(e,t,r){if(void 0===e)throw new Error("decodeRGB: rgbBuffer must not be undefined");if(e.length%3!=0)throw new Error("decodeRGB: rgbBuffer length must be divisible by 3");const n=e.length/3;let o=0,a=0,i=n,s=2*n;if(r)for(let r=0;r<n;r++)t[o++]=e[a++],t[o++]=e[i++],t[o++]=e[s++],t[o++]=255;else t.set(e)}function o(e,t,r){if(void 0===e)throw new Error("decodeRGB: ybrBuffer must not be undefined");if(e.length%3!=0)throw new Error("decodeRGB: ybrBuffer length must be divisble by 3");const n=e.length/3;let o=0,a=0;if(r)for(let r=0;r<n;r++){const r=e[o++],n=e[o++],i=e[o++];t[a++]=r+1.402*(i-128),t[a++]=r-.34414*(n-128)-.71414*(i-128),t[a++]=r+1.772*(n-128),t[a++]=255}else for(let r=0;r<n;r++){const r=e[o++],n=e[o++],i=e[o++];t[a++]=r+1.402*(i-128),t[a++]=r-.34414*(n-128)-.71414*(i-128),t[a++]=r+1.772*(n-128)}}function a(e,t,r){if(void 0===e)throw new Error("decodeRGB: ybrBuffer must not be undefined");if(e.length%3!=0)throw new Error("decodeRGB: ybrBuffer length must be divisble by 3");const n=e.length/3;let o=0,a=0,i=n,s=2*n;if(r)for(let r=0;r<n;r++){const r=e[a++],n=e[i++],l=e[s++];t[o++]=r+1.402*(l-128),t[o++]=r-.34414*(n-128)-.71414*(l-128),t[o++]=r+1.772*(n-128),t[o++]=255}else for(let r=0;r<n;r++){const r=e[a++],n=e[i++],l=e[s++];t[o++]=r+1.402*(l-128),t[o++]=r-.34414*(n-128)-.71414*(l-128),t[o++]=r+1.772*(n-128)}}r.r(n),r.d(n,{configure:()=>tt,convertColorSpace:()=>O,convertPALETTECOLOR:()=>et,convertRGBColorByPixel:()=>e,convertRGBColorByPlane:()=>t,convertYBRFullByPixel:()=>o,convertYBRFullByPlane:()=>a,createImage:()=>se,decodeImageFrame:()=>ee,decodeJPEGBaseline8BitColor:()=>U,default:()=>rt,external:()=>Xe,getImageFrame:()=>te,getMinMax:()=>R,getPixelData:()=>M,internal:()=>L,isColorImage:()=>re,isJPEGBaseline8BitColor:()=>ne,wadors:()=>ce,wadouri:()=>ze,webWorkerManager:()=>J});const i=function(e,t,r){return t=t||0,e&&e.Value?e.Value.length<=t?r:e.Value[t]:r};const s=function(e,t,r){const n=i(e,t,r);if(void 0!==n)return parseFloat(n)};const l=function(e,t){const r=i(e,t);if(void 0!==r)return parseFloat(r)};const c=function(e,t){if(!e)return;if(!e.Value)return;if(!Array.isArray(e.Value))return;if(t&&e.Value.length<t)return;const r=[];for(let t=0;t<e.Value.length;t++)r.push(parseFloat(e.Value[t]));return r};function u(e){const t=e.indexOf(":");return e.substring(t+1)}function d(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e&&e.Value?e.Value[0]&&t?e.Value[0]:e.Value:e}function f(e,t,r){return{shared:(t?Object.values(t[0]):[]).map((e=>e[0])).filter((e=>void 0!==e&&"object"==typeof e)),perFrame:(e?Object.values(e[r-1]):[]).map((e=>e.Value[0])).filter((e=>void 0!==e&&"object"==typeof e))}}function m(e){let{52009230:t,52009229:r,"00280008":n,...o}=e;return t=d(t,!1),r=d(r,!1),n=d(n),{PerFrameFunctionalGroupsSequence:t,SharedFunctionalGroupsSequence:r,NumberOfFrames:n,rest:o}}function g(e){const t=e.indexOf("/frames/")+8,r=e.slice(0,t),n=parseInt(e.slice(t),10);return{metadata:p[`${r}1`],frame:n}}const h={_retrieveMultiframeMetadata:g,retrieveMultiframeMetadata:function(e){return g(u(e))},isMultiframe:function(e){const t=i(e["00280008"]);return t&&t>1}};let p=[],x={};const w={add:function(e,t){const r=u(e);t.isMultiframe=h.isMultiframe(t),p[r]=t},get:function(e){const t=u(e),r=p[t];if(r&&!r?.isMultiframe)return r;const n=x[t];if(n)return n;const o=h._retrieveMultiframeMetadata(t);if(!o||!o.metadata)return;const{metadata:a,frame:i}=o;if(a){const e=function(e,t){const{PerFrameFunctionalGroupsSequence:r,SharedFunctionalGroupsSequence:n,NumberOfFrames:o,rest:a}=m(t);if(r||o>1){const{shared:i,perFrame:s}=f(r,n,e),l=Object.assign(t,{frameNumber:e});return[...i,...s].forEach((e=>{Object.entries(e).forEach((e=>{let[t,r]=e;l[t]=r}))})),Object.assign(a,{"00280008":o},l)}return t}(i,a);return x[t]=e,e}},remove:function(e){const t=u(e);p[t]=void 0,x[t]=void 0},purge:function(){p=[],x={}}};function b(e){return"RECON TOMO"===e||"RECON GATED TOMO"===e}function y(e){return i(e["00080060"]).includes("NM")}function k(e,t){const r=d(e["00080008"],!1);if(r)return r[t]}function v(e){let t=c(e["00200037"],6);return!t&&y(e)&&(t=function(e){let t;const r=k(e,2);if(r&&b(r)){const r=d(e["00540022"]);r&&(t=c(r["00200037"],6))}return t}(e)),t}function D(e){let t=c(e["00200032"],3);return!t&&y(e)&&(t=function(e){let t;const r=k(e,2);if(r&&b(r)){const r=d(e["00540022"]);r&&(t=c(r["00200032"],3))}return t}(e)),t}const T=function(e,t){if("multiframeModule"===e){const{metadata:e,frame:r}=h.retrieveMultiframeMetadata(t);if(!e)return;const{PerFrameFunctionalGroupsSequence:n,SharedFunctionalGroupsSequence:o,NumberOfFrames:a}=m(e);if(n||a>1){const{shared:e,perFrame:t}=f(n,o,r);return{NumberOfFrames:a,PerFrameFunctionalInformation:t,SharedFunctionalInformation:e}}return{NumberOfFrames:a}}const{dicomParser:r}=Xe,n=w.get(t);if(n){if("generalSeriesModule"===e)return{modality:i(n["00080060"]),seriesInstanceUID:i(n["0020000E"]),seriesNumber:l(n["00200011"]),studyInstanceUID:i(n["0020000D"]),seriesDate:r.parseDA(i(n["00080021"])),seriesTime:r.parseTM(i(n["00080031"],0,"")),acquisitionDate:r.parseDA(i(n["00080022"]),""),acquisitionTime:r.parseTM(i(n["00080032"],0,""))};if("patientStudyModule"===e)return{patientAge:l(n["00101010"]),patientSize:l(n["00101020"]),patientSex:i(n["00100040"]),patientWeight:l(n["00101030"])};if("nmMultiframeGeometryModule"===e){const e=i(n["00080060"]),t=k(n,2);return{modality:e,imageType:i(n["00080008"]),imageSubType:t,imageOrientationPatient:v(n),imagePositionPatient:D(n),sliceThickness:l(n["00180050"]),pixelSpacing:c(n["00280030"],2),numberOfFrames:l(n["00280008"]),isNMReconstructable:b(t)&&e.includes("NM")}}if("imagePlaneModule"===e){const e=v(n),t=D(n),r=c(n["00280030"],2);let o=null,a=null;r&&(a=r[0],o=r[1]);let s=null,u=null;return e&&(s=[parseFloat(e[0]),parseFloat(e[1]),parseFloat(e[2])],u=[parseFloat(e[3]),parseFloat(e[4]),parseFloat(e[5])]),{frameOfReferenceUID:i(n["00200052"]),rows:l(n["00280010"]),columns:l(n["00280011"]),imageOrientationPatient:e,rowCosines:s,columnCosines:u,imagePositionPatient:t,sliceThickness:l(n["00180050"]),sliceLocation:l(n["00201041"]),pixelSpacing:r,rowPixelSpacing:a,columnPixelSpacing:o}}if("imagePixelModule"===e)return{samplesPerPixel:l(n["00280002"]),photometricInterpretation:i(n["00280004"]),rows:l(n["00280010"]),columns:l(n["00280011"]),bitsAllocated:l(n["00280100"]),bitsStored:l(n["00280101"]),highBit:i(n["00280102"]),pixelRepresentation:l(n["00280103"]),planarConfiguration:l(n["00280006"]),pixelAspectRatio:i(n["00280034"]),smallestPixelValue:l(n["00280106"]),largestPixelValue:l(n["00280107"]),redPaletteColorLookupTableDescriptor:c(n["00281101"]),greenPaletteColorLookupTableDescriptor:c(n["00281102"]),bluePaletteColorLookupTableDescriptor:c(n["00281103"]),redPaletteColorLookupTableData:c(n["00281201"]),greenPaletteColorLookupTableData:c(n["00281202"]),bluePaletteColorLookupTableData:c(n["00281203"])};if("voiLutModule"===e)return{windowCenter:c(n["00281050"],1),windowWidth:c(n["00281051"],1)};if("modalityLutModule"===e)return{rescaleIntercept:l(n["00281052"]),rescaleSlope:l(n["00281053"]),rescaleType:i(n["00281054"])};if("sopCommonModule"===e)return{sopClassUID:i(n["00080016"]),sopInstanceUID:i(n["00080018"])};if("petIsotopeModule"===e){const e=i(n["00540016"]);if(void 0===e)return;return{radiopharmaceuticalInfo:{radiopharmaceuticalStartTime:r.parseTM(i(e["00181072"],0,"")),radiopharmaceuticalStartDateTime:i(e["00181078"],0,""),radionuclideTotalDose:l(e["00181074"]),radionuclideHalfLife:l(e["00181075"])}}}return"overlayPlaneModule"===e?function(e){const t=[];for(let r=0;r<=30;r+=2){let n=`x60${r.toString(16)}`;4===n.length&&(n=`x600${r.toString(16)}`);const o=i(e[`${n}3000`]);if(!o)continue;const a=[];for(let t=0;t<o.length;t++)for(let r=0;r<8;r++){const n=e.Value[o.dataOffset+t];a[8*t+r]=n>>r&1}t.push({rows:l(e[`${n}0010`]),columns:l(e[`${n}0011`]),type:i(e[`${n}0040`]),x:l(e[`${n}0050`],1)-1,y:l(e[`${n}0050`],0)-1,pixelData:a,description:i(e[`${n}0022`]),label:i(e[`${n}1500`]),roiArea:i(e[`${n}1301`]),roiMean:i(e[`${n}1302`]),roiStandardDeviation:i(e[`${n}1303`])})}return{overlays:t}}(n):"transferSyntax"===e?{transferSyntaxUID:i(n["00020010"])}:"petSeriesModule"===e?{correctedImage:i(n["00280051"]),units:i(n["00541001"]),decayCorrection:i(n["00541102"])}:"petImageModule"===e?{frameReferenceTime:l(n["00541300"]),actualFrameDuration:l(n["00181242"])}:void 0}};function S(e,t,r){if(r+e.length>t.length)return!1;let n=r;for(let r=0;r<e.length;r++)if(e[r]!==t[n++])return!1;return!0}const P=function(e,t,r){r=r||0;const n=function(e){const t=new Uint8Array(e.length);for(let r=0,n=e.length;r<n;r++)t[r]=e.charCodeAt(r);return t}(t);for(let t=r;t<e.length;t++)if(n[0]===e[t]&&S(n,e,t))return t;return-1};let I={open(e,t){e.open("get",t,!0)},beforeSend(){},beforeProcessing:e=>Promise.resolve(e.response),imageCreated(){},strict:!1,decodeConfig:{convertFloatPixelDataToInt:!0,use16BitDataType:!1}};function C(e){I=Object.assign(I,e)}function _(){return I}const A=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{cornerstone:o}=Xe,a=_(),i=e=>{if("function"==typeof a.errorInterceptor){const t=new Error("request failed");t.request=e,t.response=e.response,t.status=e.status,a.errorInterceptor(t)}},s=new XMLHttpRequest,l=new Promise(((l,c)=>{a.open(s,e,r,n);const u=a.beforeSend(s,t,r,n);s.responseType="arraybuffer";const d=Object.assign({},r,u);Object.keys(d).forEach((function(t){null!==d[t]&&("Accept"===t&&-1!==e.indexOf("accept=")||s.setRequestHeader(t,d[t]))})),n.deferred={resolve:l,reject:c},n.url=e,n.imageId=t,s.onloadstart=function(r){a.onloadstart&&a.onloadstart(r,n);const i={url:e,imageId:t};o.triggerEvent(o.events,"cornerstoneimageloadstart",i)},s.onloadend=function(r){a.onloadend&&a.onloadend(r,n);const i={url:e,imageId:t};o.triggerEvent(o.events,"cornerstoneimageloadend",i)},s.onreadystatechange=function(e){a.onreadystatechange?a.onreadystatechange(e,n):4===s.readyState&&(200===s.status?a.beforeProcessing(s).then(l).catch((()=>{i(s),c(s)})):(i(s),c(s)))},s.onprogress=function(r){const i=r.loaded;let s,l;r.lengthComputable&&(s=r.total,l=Math.round(i/s*100)),a.onprogress&&a.onprogress(r,n);const c={url:e,imageId:t,loaded:i,total:s,percentComplete:l};o.triggerEvent(o.events,o.EVENTS.IMAGE_LOAD_PROGRESS,c)},s.onerror=function(){i(s),c(s)},s.onabort=function(){i(s),c(s)},s.send()}));return l.xhr=s,l},L={xhrRequest:A,setOptions:C,getOptions:_};function E(e){for(let t=0;t<e.length;t++)if("Content-Type:"===e[t].substr(0,13))return e[t].substr(13).trim()}const M=function(e,t){const r={Accept:arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/octet-stream"};return new Promise(((n,o)=>{const a=A(e,t,r),{xhr:i}=a;a.then((function(e){const t=new Uint8Array(e),r=i.getResponseHeader("Content-Type")||"application/octet-stream";if(-1===r.indexOf("multipart"))return void n({contentType:r,imageFrame:{pixelData:t}});const a=P(t,"\r\n\r\n");-1===a&&o(new Error("invalid response - no multipart mime header"));const s=function(e,t,r){t=t||0,r=r||e.length-t;let n="";for(let o=t;o<t+r;o++)n+=String.fromCharCode(e[o]);return n}(t,0,a),l=s.split("\r\n"),c=function(e){for(let t=0;t<e.length;t++)if("--"===e[t].substr(0,2))return e[t]}(l);c||o(new Error("invalid response - no boundary marker"));const u=a+4,d=P(t,c,u);-1===d&&o(new Error("invalid response - terminating boundary not found"));const f=d-u-2;n({contentType:E(l),imageFrame:{pixelData:new Uint8Array(e,u,f)}})}),o)}))};const R=function(e){let t,r=e[0],n=e[0];const o=e.length;for(let a=1;a<o;a++)t=e[a],r=Math.min(r,t),n=Math.max(n,t);return{min:r,max:n}};function F(r,n,o){0===r.planarConfiguration?e(r.pixelData,n,o):t(r.pixelData,n,o)}function O(e,t,r){if("RGB"===e.photometricInterpretation)F(e,t,r);else if("YBR_RCT"===e.photometricInterpretation)F(e,t,r);else if("YBR_ICT"===e.photometricInterpretation)F(e,t,r);else if("PALETTE COLOR"===e.photometricInterpretation)et(e,t,r);else if("YBR_FULL_422"===e.photometricInterpretation)!function(e,t,r){if(void 0===e)throw new Error("decodeRGB: ybrBuffer must not be undefined");if(e.length%2!=0)throw new Error("decodeRGB: ybrBuffer length must be divisble by 3");const n=e.length/2;let o=0,a=0;if(r)for(let r=0;r<n;r+=2){const r=e[o++],n=e[o++],i=e[o++],s=e[o++];t[a++]=r+1.402*(s-128),t[a++]=r-.34414*(i-128)-.71414*(s-128),t[a++]=r+1.772*(i-128),t[a++]=255,t[a++]=n+1.402*(s-128),t[a++]=n-.34414*(i-128)-.71414*(s-128),t[a++]=n+1.772*(i-128),t[a++]=255}else for(let r=0;r<n;r+=2){const r=e[o++],n=e[o++],i=e[o++],s=e[o++];t[a++]=r+1.402*(s-128),t[a++]=r-.34414*(i-128)-.71414*(s-128),t[a++]=r+1.772*(i-128),t[a++]=n+1.402*(s-128),t[a++]=n-.34414*(i-128)-.71414*(s-128),t[a++]=n+1.772*(i-128)}}(e.pixelData,t,r);else{if("YBR_FULL"!==e.photometricInterpretation)throw new Error(`No color space conversion for photometric interpretation ${e.photometricInterpretation}`);!function(e,t,r){0===e.planarConfiguration?o(e.pixelData,t,r):a(e.pixelData,t,r)}(e,t,r)}}function B(e){return function(e){let t;try{return decodeURIComponent(escape(e))}catch(r){if(t=r,t instanceof URIError)return e;throw t}}(String.fromCharCode.apply(null,Array.prototype.slice.apply(new Uint8Array(e))))}const U=function(e,t,r){const n=(new Date).getTime(),o=new Blob([t],{type:"image/jpeg"});return new Promise(((t,a)=>{const i=new FileReader;void 0===i.readAsBinaryString?i.readAsArrayBuffer(o):i.readAsBinaryString(o),i.onload=function(){const o=new Image;o.onload=function(){r.height=o.height,r.width=o.width,e.rows=o.height,e.columns=o.width;const a=r.getContext("2d");a.drawImage(this,0,0);const i=a.getImageData(0,0,o.width,o.height),s=(new Date).getTime();e.pixelData=new Uint8Array(i.data.buffer),e.imageData=i,e.decodeTimeInMS=s-n;const l=R(e.pixelData);e.smallestPixelValue=l.min,e.largestPixelValue=l.max,e.pixelDataLength=e.pixelData.length,t(e)},o.onerror=function(e){a(e)},void 0===i.readAsBinaryString?o.src=`data:image/jpeg;base64,${window.btoa(B(i.result))}`:o.src=`data:image/jpeg;base64,${window.btoa(i.result)}`},i.onerror=e=>{a(e)}}))};function N(){return new Worker(r.p+"index.worker.17eee78bdafa44cbb47d.worker.js")}let j=0;const W=[],Z=[],$=_(),G={maxWebWorkers:navigator.hardwareConcurrency||1,startWebWorkersOnDemand:!0,webWorkerTaskPaths:[],taskConfiguration:{decodeTask:{initializeCodecsOnStartup:!1,strict:$.strict}}};let V;const q={maxWebWorkers:0,numWebWorkers:0,numTasksQueued:0,numTasksExecuting:0,numTasksCompleted:0,totalTaskTimeInMS:0,totalTimeDelayedInMS:0};function z(){if(W.length){for(let e=0;e<Z.length;e++)if("ready"===Z[e].status){Z[e].status="busy";const t=W.shift();t.start=(new Date).getTime();const r=(new Date).getTime();return q.totalTimeDelayedInMS+=r-t.added,Z[e].task=t,Z[e].worker.postMessage({taskType:t.taskType,workerIndex:e,data:t.data},t.transferList),void q.numTasksExecuting++}Z.length<V.maxWebWorkers&&H()}}function Y(e){if("initialize"===e.data.taskType)Z[e.data.workerIndex].status="ready",z();else{const t=Z[e.data.workerIndex].task.start,r="success"===e.data.status?"resolve":"reject";try{Z[e.data.workerIndex].task.deferred[r](e.data.result)}catch(e){console.warn("Caught error delivering response",e)}Z[e.data.workerIndex].task=void 0,q.numTasksExecuting--,Z[e.data.workerIndex].status="ready",q.numTasksCompleted++;const n=(new Date).getTime();q.totalTaskTimeInMS+=n-t,z()}}function H(){if(Z.length>=V.maxWebWorkers)return;const e=new N;Z.push({worker:e,status:"initializing"}),e.addEventListener("message",Y),e.postMessage({taskType:"initialize",workerIndex:Z.length-1,config:V})}function K(e){if(V=e=e||G,V.maxWebWorkers=V.maxWebWorkers||navigator.hardwareConcurrency||1,!V.startWebWorkersOnDemand)for(let e=0;e<V.maxWebWorkers;e++)H()}const J={initialize:K,loadWebWorkerTask:function(e,t){V.webWorkerTaskPaths.push(e),t&&(V.taskConfiguration=Object.assign(V.taskConfiguration,t));for(let t=0;t<Z.length;t++)Z[t].worker.postMessage({taskType:"loadWebWorkerTask",workerIndex:Z.length-1,sourcePath:e,config:V})},addTask:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3?arguments[3]:void 0;V||K();let o={resolve:void 0,reject:void 0};const a=new Promise(((e,t)=>{o={resolve:e,reject:t}}));let i;for(i=0;i<W.length&&!(W[i].priority<r);i++);const s=j++;return W.splice(i,0,{taskId:s,taskType:e,status:"ready",added:(new Date).getTime(),data:t,deferred:o,priority:r,transferList:n}),z(),{taskId:s,promise:a}},getStatistics:function(){return q.maxWebWorkers=V.maxWebWorkers,q.numWebWorkers=Z.length,q.numTasksQueued=W.length,q},setTaskPriority:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(let r=0;r<W.length;r++)if(W[r].taskId===e){const e=W.splice(r,1)[0];for(e.priority=t,r=0;r<W.length&&!(W[r].priority<t);r++);return W.splice(r,0,e),!0}return!1},cancelTask:function(e,t){for(let r=0;r<W.length;r++)if(W[r].taskId===e){return W.splice(r,1).deferred.reject(t),!0}return!1},webWorkers:Z,terminate:function(){for(let e=0;e<Z.length;e++)Z[e].worker.terminate();Z.length=0,V=void 0}};var X=r(578);function Q(e,t,r,n,o){const a=n.priority||void 0,i=n.transferPixelData?[r.buffer]:void 0;return J.addTask("decodeTask",{imageFrame:e,transferSyntax:t,pixelData:r,options:n,decodeConfig:o},a,i).promise}window.pako={inflateRaw:X.Hq};const ee=function(e,t,r,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=arguments.length>5?arguments[5]:void 0;switch(t){case"1.2.840.10008.1.2":case"1.2.840.10008.1.2.1":case"1.2.840.10008.1.2.2":case"1.2.840.10008.1.2.1.99":case"1.2.840.10008.1.2.5":case"1.2.840.10008.1.2.4.51":case"1.2.840.10008.1.2.4.57":case"1.2.840.10008.1.2.4.70":case"1.2.840.10008.1.2.4.80":case"1.2.840.10008.1.2.4.81":case"1.2.840.10008.1.2.4.90":case"1.2.840.10008.1.2.4.91":case"3.2.840.10008.1.2.4.96":return Q(e,t,r,o,a);case"1.2.840.10008.1.2.4.50":return 8!==e.bitsAllocated||3!==e.samplesPerPixel&&4!==e.samplesPerPixel?Q(e,t,r,o,a):U(e,r,n)}return Promise.reject(new Error(`No decoder for transfer syntax ${t}`))};const te=function(e){const{cornerstone:t}=Xe,r=t.metaData.get("imagePixelModule",e);return{samplesPerPixel:r.samplesPerPixel,photometricInterpretation:r.photometricInterpretation,planarConfiguration:r.planarConfiguration,rows:r.rows,columns:r.columns,bitsAllocated:r.bitsAllocated,bitsStored:r.bitsStored,pixelRepresentation:r.pixelRepresentation,smallestPixelValue:r.smallestPixelValue,largestPixelValue:r.largestPixelValue,redPaletteColorLookupTableDescriptor:r.redPaletteColorLookupTableDescriptor,greenPaletteColorLookupTableDescriptor:r.greenPaletteColorLookupTableDescriptor,bluePaletteColorLookupTableDescriptor:r.bluePaletteColorLookupTableDescriptor,redPaletteColorLookupTableData:r.redPaletteColorLookupTableData,greenPaletteColorLookupTableData:r.greenPaletteColorLookupTableData,bluePaletteColorLookupTableData:r.bluePaletteColorLookupTableData,pixelData:void 0,imageId:e}};function re(e){return"RGB"===e||"PALETTE COLOR"===e||"YBR_FULL"===e||"YBR_FULL_422"===e||"YBR_PARTIAL_422"===e||"YBR_PARTIAL_420"===e||"YBR_RCT"===e||"YBR_ICT"===e}const ne=function(e,t){if(t=t||e.transferSyntax,8===e.bitsAllocated&&"1.2.840.10008.1.2.4.50"===t&&(3===e.samplesPerPixel||4===e.samplesPerPixel))return!0};let oe="";function ae(e){const t=function(e,t){let r;return Number.isInteger(e)&&Number.isInteger(t)?e>=0?t<=255?r=Uint8Array:t<=65535&&(r=Uint16Array):e>=-128&&t<=127?r=Int8Array:e>=-32768&&t<=32767&&(r=Int16Array):r=Float32Array,r}(e.smallestPixelValue,e.largestPixelValue);if(!t)throw new Error("Could not apply a typed array to the pixel data");{const r=new t(e.pixelData);e.pixelData=r}}function ie(e,t){const r=e.length/4;let n=0,o=0;for(let a=0;a<r;a++)t[o++]=e[n++],t[o++]=e[n++],t[o++]=e[n++],n++;return t}const se=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=n.useRGBA;if(n.preScale={enabled:!(!n.preScale||void 0===n.preScale.enabled)&&n.preScale.enabled},!t||!t.length)return Promise.reject(new Error("The file does not contain image data."));const{cornerstone:a}=Xe,i=document.createElement("canvas"),s=te(e);if(n.preScale.enabled){const t=function(e,t){const r=e.get("modalityLutModule",t)||{},n=e.get("generalSeriesModule",t)||{},{modality:o}=n,a={rescaleSlope:r.rescaleSlope,rescaleIntercept:r.rescaleIntercept,modality:o},i=e.get("scalingModule",t)||{};return{...a,..."PT"===o&&{suvbw:i.suvbw}}}(a.metaData,e);t&&(n.preScale={...n.preScale,scalingParameters:t})}n.isSharedArrayBuffer=n.targetBuffer?.arrayBuffer&&n.targetBuffer.arrayBuffer instanceof SharedArrayBuffer;const{decodeConfig:l}=_(),c=ee(s,r,t,i,n,l),{use16BitDataType:u}=l,d=re(s.photometricInterpretation);return new Promise(((t,s)=>{c.then((function(s){if(n.skipCreateImage)return t(s);let l=!1;if(n.targetBuffer&&n.targetBuffer.type&&!d){const{arrayBuffer:e,type:t,offset:r=0,length:o}=n.targetBuffer,a=s.pixelDataLength,i=r,c=null!=o?o:a-i,d={Uint8Array,Uint16Array:u?Uint16Array:void 0,Int16Array:u?Int16Array:void 0,Float32Array};if(c!==s.pixelDataLength)throw new Error(`target array for image does not have the same length (${c}) as the decoded image length (${s.pixelDataLength}).`);const f=d[t],m=e?new f(e,i,c):new f(s.pixelData);if(c!==s.pixelDataLength)throw new Error("target array for image does not have the same length as the decoded image length.");s.pixelData=m,l=!0}l||ae(s);const c=a.metaData.get("imagePlaneModule",e)||{},f=a.metaData.get("voiLutModule",e)||{},m=a.metaData.get("modalityLutModule",e)||{},g=a.metaData.get("sopCommonModule",e)||{};if(d){if(o){if(!ne(s,r)&&"RGB"!==s.photometricInterpretation){i.height=s.rows,i.width=s.columns;const e=i.getContext("2d").createImageData(s.columns,s.rows);O(s,e.data,o),s.imageData=e,s.pixelData=e.data,s.pixelDataLength=e.data.length}}else if(ne(s,r)){const e=new Uint8Array(s.pixelData.length/4*3);s.pixelData=ie(s.pixelData,e),s.pixelDataLength=s.pixelData.length}else if("PALETTE COLOR"===s.photometricInterpretation){i.height=s.rows,i.width=s.columns;const e=i.getContext("2d").createImageData(s.columns,s.rows);O(s,e.data,!0);const t=new e.data.constructor(e.data.length/4*3);s.pixelData=new Uint8Array(ie(e.data,t)),s.pixelDataLength=s.pixelData.length}const e=R(s.pixelData);s.smallestPixelValue=e.min,s.largestPixelValue=e.max}const h={imageId:e,color:d,columnPixelSpacing:c.columnPixelSpacing,columns:s.columns,height:s.rows,preScale:s.preScale,intercept:m.rescaleIntercept?m.rescaleIntercept:0,slope:m.rescaleSlope?m.rescaleSlope:1,invert:"MONOCHROME1"===s.photometricInterpretation,minPixelValue:s.smallestPixelValue,maxPixelValue:s.largestPixelValue,rowPixelSpacing:c.rowPixelSpacing,rows:s.rows,sizeInBytes:s.pixelData.byteLength,width:s.columns,windowCenter:f.windowCenter?f.windowCenter[0]:void 0,windowWidth:f.windowWidth?f.windowWidth[0]:void 0,voiLUTFunction:f.voiLUTFunction?f.voiLUTFunction:void 0,decodeTimeInMS:s.decodeTimeInMS,floatPixelData:void 0,imageFrame:s,rgba:d&&o,getPixelData:()=>s.pixelData,getCanvas:void 0,numComps:void 0};var p;if(window.image=h,h.color&&(h.getCanvas=function(){if(oe===e)return i;const t=h.columns,r=h.rows;i.height=r,i.width=t;const n=i.getContext("2d"),o=n.createImageData(t,r),a=s.pixelData;if(a.length===t*r*4)for(let e=0;e<a.length;e++)o.data[e]=a[e];else if(a.length===t*r*3){let e=0;for(let t=0;t<a.length;t+=3)o.data[e++]=a[t],o.data[e++]=a[t+1],o.data[e++]=a[t+2],o.data[e++]=255}return s.pixelData=o.data,s.pixelDataLength=o.data.length,s.imageData=o,n.putImageData(s.imageData,0,0),oe=e,i}),m.modalityLUTSequence&&m.modalityLUTSequence.length>0&&("1.2.840.10008.5.1.4.1.1.12.1"!==(p=g.sopClassUID)&&"1.2.840.10008.5.1.4.1.1.12.2.1"!==p)&&(h.modalityLUT=m.modalityLUTSequence[0]),f.voiLUTSequence&&f.voiLUTSequence.length>0&&(h.voiLUT=f.voiLUTSequence[0]),h.color&&(h.windowWidth=255,h.windowCenter=127),void 0===h.windowCenter||void 0===h.windowWidth){const e=h.imageFrame.minAfterScale,t=h.imageFrame.maxAfterScale;h.windowWidth=t-e,h.windowCenter=(t+e)/2}t(h)}),s)}))};const le=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=Xe.cornerstone.imageRetrievalPoolManager,n=(new Date).getTime();return{promise:new Promise(((o,a)=>{const i=t.requestType||"interaction",s=t.additionalDetails||{imageId:e},l=void 0===t.priority?5:t.priority,c=t.addToBeginning||!1,u=e.substring(7);r.addRequest(function(e,r,i){return M(e,r,i).then((e=>{const i=function(e){const t="1.2.840.10008.1.2";if(!e)return t;const r=e.split(";"),n={};r.forEach((e=>{const t=e.split("=");if(2!==t.length)return;const r=t[1].trim().replace(/"/g,"");n[t[0].trim()]=r}));const o={"image/jpeg":"1.2.840.10008.1.2.4.50","image/x-dicom-rle":"1.2.840.10008.1.2.5","image/x-jls":"1.2.840.10008.1.2.4.80","image/jls":"1.2.840.10008.1.2.4.80","image/jll":"1.2.840.10008.1.2.4.70","image/jp2":"1.2.840.10008.1.2.4.90","image/jpx":"1.2.840.10008.1.2.4.92","image/jphc":"3.2.840.10008.1.2.4.96","image/jxl":"1.2.840.10008.1.2.4.140"};return n["transfer-syntax"]?n["transfer-syntax"]:e&&!Object.keys(n).length&&o[e]?o[e]:n.type&&o[n.type]?o[n.type]:o[e]?o[e]:t}(e.contentType),s=e.imageFrame.pixelData;se(r,s,i,t).then((e=>{const t=(new Date).getTime();e.loadTimeInMS=t-n,o(e)}),a)}),a).catch((e=>{a(e)}))}.bind(this,u,e,"multipart/related; type=application/octet-stream; transfer-syntax=*"),i,s,l,c)})),cancelFn:void 0}};const ce={metaData:{getNumberString:s,getNumberValue:l,getNumberValues:c,getValue:i,metaDataProvider:T},findIndexOfString:P,getPixelData:M,loadImage:le,metaDataManager:w,register:function(e){e.registerImageLoader("wadors",le),e.metaData.addProvider(T)}};function ue(e,t){if(e.elements[t]&&6===e.elements[t].length)return[e.uint16(t,0),e.uint16(t,1),e.uint16(t,2)]}function de(e,t,r){const n=[],o=e.elements[t];for(let a=0;a<r[0];a++)16===r[2]?n[a]=e.uint16(t,a):n[a]=e.byteArray[a+o.dataOffset];return n}const fe=function(e){const t={samplesPerPixel:e.uint16("x00280002"),photometricInterpretation:e.string("x00280004"),rows:e.uint16("x00280010"),columns:e.uint16("x00280011"),bitsAllocated:e.uint16("x00280100"),bitsStored:e.uint16("x00280101"),highBit:e.uint16("x00280102"),pixelRepresentation:e.uint16("x00280103"),planarConfiguration:e.uint16("x00280006"),pixelAspectRatio:e.string("x00280034")};return function(e,t){0===e.uint16("x00280103")?(t.smallestPixelValue=e.uint16("x00280106"),t.largestPixelValue=e.uint16("x00280107")):(t.smallestPixelValue=e.int16("x00280106"),t.largestPixelValue=e.int16("x00280107"))}(e,t),"PALETTE COLOR"===t.photometricInterpretation&&e.elements.x00281101&&function(e,t){t.redPaletteColorLookupTableDescriptor=ue(e,"x00281101"),t.greenPaletteColorLookupTableDescriptor=ue(e,"x00281102"),t.bluePaletteColorLookupTableDescriptor=ue(e,"x00281103"),0===t.redPaletteColorLookupTableDescriptor[0]&&(t.redPaletteColorLookupTableDescriptor[0]=65536,t.greenPaletteColorLookupTableDescriptor[0]=65536,t.bluePaletteColorLookupTableDescriptor[0]=65536);const r=t.redPaletteColorLookupTableDescriptor[0],n=e.elements.x00281201.length===r?8:16;t.redPaletteColorLookupTableDescriptor[2]!==n&&(t.redPaletteColorLookupTableDescriptor[2]=n,t.greenPaletteColorLookupTableDescriptor[2]=n,t.bluePaletteColorLookupTableDescriptor[2]=n),t.redPaletteColorLookupTableData=de(e,"x00281201",t.redPaletteColorLookupTableDescriptor),t.greenPaletteColorLookupTableData=de(e,"x00281202",t.greenPaletteColorLookupTableDescriptor),t.bluePaletteColorLookupTableData=de(e,"x00281203",t.bluePaletteColorLookupTableDescriptor)}(e,t),t};function me(e,t){let r=t.uint16("x00283002",0);0===r&&(r=65535);let n=0;n=0===e?t.uint16("x00283002",1):t.int16("x00283002",1);const o={id:"1",firstValueMapped:n,numBitsPerEntry:t.uint16("x00283002",2),lut:[]};for(let n=0;n<r;n++)o.lut[n]=0===e?t.uint16("x00283006",n):t.int16("x00283006",n);return o}const ge=function(e,t){if(!t||!t.items||!t.items.length)return;const r=[];for(let n=0;n<t.items.length;n++){const o=me(e,t.items[n].dataSet);o&&r.push(o)}return r};const he=function(e){const t=e.string("x00080016");if("1.2.840.10008.5.1.4.1.1.2"===t||"1.2.840.10008.5.1.4.1.1.2.1"===t)return 1;const r=e.floatString("x00281052"),n=e.floatString("x00281053");if(void 0!==r&&void 0!==n){const t=function(e){const t=e.uint16("x00280103"),r=e.uint16("x00280101");return 0===t?0:-1<<r-1}(e);return t*n+r<0?1:0}return e.elements.x00283000&&e.elements.x00283000.length>0?0:e.uint16("x00280103")};const pe=function(e,t,r){const n=[],o=e.string(t);if(!o)return;const a=o.split("\\");if(!(r&&a.length<r)){for(let e=0;e<a.length;e++)n.push(parseFloat(a[e]));return n}};const xe=function(e){const t=e.indexOf(":");let r=e.substring(t+1);const n=r.indexOf("frame=");let o;if(-1!==n){const e=r.substring(n+6);o=parseInt(e,10),r=r.substring(0,n-1)}return{scheme:e.substring(0,t),url:r,frame:o,pixelDataFrame:void 0!==o?o-1:void 0}};function we(e){const{dicomParser:t}=Xe;let r,n=t.parseDicom(e,{untilTag:"x7fe00010"});n.elements.x7fe00010||console.warn("Pixel data not found!");try{r=t.parseDicom(e)}catch(e){console.error(e),console.log("pixel data dataset:",e.dataSet),r=e.dataSet}return n.elements.x7fe00010=r.elements.x7fe00010,n=function(e){const t=e.elements.x7fe00010.fragments,r=e.byteArray.length;for(const e of t){const{position:t,length:n}=e;n>r-t&&(console.log(`Truncated fragment, changing fragment length from ${e.length} to ${r-t}`),e.length=r-t)}return e}(n),n}async function be(e,t,r){const n=we(e),{uri:o,imageId:a,fileTotalLength:i}=r;return n.fetchMore=async function(s){const l=Object.assign({uri:o,imageId:a,fetchedLength:e.length,lengthToFetch:i-e.length},s),{fetchedLength:c,lengthToFetch:u}=l,{arrayBuffer:d}=await t(o,a,{byteRange:`${c}-${c+u}`}),f=new Uint8Array(d),m=new Uint8Array(n.byteArray.length+f.length);return m.set(n.byteArray),m.set(f,n.byteArray.length),be(m,t,r)},n}function ye(e,t,r){const n={};(t?Object.values(t.items[0].dataSet.elements):[]).map((e=>n[e.tag]=e));const o={};return(e?Object.values(e.items[r-1].dataSet.elements):[]).map((e=>o[e.tag]=e)),{shared:n,perFrame:o}}function ke(e){if(!e)return;const{elements:t,...r}=e,{x52009230:n,x52009229:o,...a}=t;return{NumberOfFrames:e.intString("x00280008"),PerFrameFunctionalGroupsSequence:n,SharedFunctionalGroupsSequence:o,otherElements:a,otherAttributtes:r}}function ve(e){if(Pe[e])return Pe[e]}function De(e){if(!e)return!1;const t=e.intString("x00280008");return t&&t>1}const Te={_get:ve,generateMultiframeWADOURIs:function(e){const t=[],r=ve(e);if(De(r)){const n=r.intString("x00280008");for(let r=1;r<=n;r++)t.push(`${e}&frame=${r}`)}else t.push(e);return t},retrieveMultiframeDataset:function(e){const t=function(e){return e.indexOf("&frame=")}(e),r=-1===t?e:e.slice(0,t),n=parseInt(e.slice(t+7),10)||1;let o;return o=Pe[r]?Pe[r].dataSet:void 0,{dataSet:o,frame:n}},isMultiframeDataset:function(e){return De(ve(e))}};let Se=0,Pe={},Ie={};function Ce(){return{cacheSizeInBytes:Se,numberOfDataSetsCached:Object.keys(Pe).length}}const _e={isLoaded:function(e){return void 0!==Pe[e]},load:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:A,r=arguments.length>2?arguments[2]:void 0;const{cornerstone:n,dicomParser:o}=Xe;if(Pe[e])return new Promise((t=>{Pe[e].cacheCount++,t(Pe[e].dataSet)}));if(Ie[e])return Ie[e].cacheCount++,Ie[e];const a=t(e,r),i=new Promise(((s,l)=>{a.then((async function(a){const c={isPartialContent:!1,fileTotalLength:null};if(!(a instanceof ArrayBuffer)){if(!a.arrayBuffer)return l(new Error("If not returning ArrayBuffer, must return object with `arrayBuffer` parameter"));c.isPartialContent=a.flags.isPartialContent,c.fileTotalLength=a.flags.fileTotalLength,a=a.arrayBuffer}const u=new Uint8Array(a);let d;try{d=c.isPartialContent?await be(u,t,{uri:e,imageId:r,fileTotalLength:c.fileTotalLength}):o.parseDicom(u)}catch(e){return l(e)}Pe[e]={dataSet:d,cacheCount:i.cacheCount},Se+=d.byteArray.length,s(d),n.triggerEvent(n.events,"datasetscachechanged",{uri:e,action:"loaded",cacheInfo:Ce()})}),l).then((()=>{delete Ie[e]}),(()=>{delete Ie[e]}))}));return i.cacheCount=1,Ie[e]=i,i},unload:function(e){const{cornerstone:t}=Xe;Pe[e]&&(Pe[e].cacheCount--,0===Pe[e].cacheCount&&(Se-=Pe[e].dataSet.byteArray.length,delete Pe[e],t.triggerEvent(t.events,"datasetscachechanged",{uri:e,action:"unloaded",cacheInfo:Ce()})))},getInfo:Ce,purge:function(){Pe={},Ie={},Se=0},get:function(e){let t;if(e.includes("&frame=")){const{frame:r,dataSet:n}=Te.retrieveMultiframeDataset(e);t=function(e,t){if(!t)return;const{NumberOfFrames:r,PerFrameFunctionalGroupsSequence:n,SharedFunctionalGroupsSequence:o,otherElements:a}=ke(t);if(n||r>1){const{shared:r,perFrame:i}=ye(n,o,e),s={elements:{...a,...r,...i}},l=Object.create(t);return Object.assign(l,s)}return t}(r,n)}else Pe[e]&&(t=Pe[e].dataSet);return t},update:function(e,t){const r=Pe[e];r?(Se-=r.dataSet.byteArray.length,r.dataSet=t,Se+=t.byteArray.length,Xe.cornerstone.triggerEvent(Xe.cornerstone.events,"datasetscachechanged",{uri:e,action:"updated",cacheInfo:Ce()})):console.error(`No loaded dataSet for uri ${e}`)}};function Ae(e,t){const r=e.string("x00080008");if(r){const e=r.split("\\");if(e.length>t)return e[t]}}function Le(e){let t=pe(e,"x00200037",6);return!t&&e.elements.x00209116&&(t=pe(e.elements.x00209116.items[0].dataSet,"x00200037",6)),t||(t=function(e){let t;if(e.string("x00080060").includes("NM")){const r=Ae(e,2);r&&b(r)&&e.elements.x00540022&&(t=pe(e.elements.x00540022.items[0].dataSet,"x00200037",6))}return t}(e)),t}function Ee(e){let t=pe(e,"x00200032",3);return!t&&e.elements.x00209113&&(t=pe(e.elements.x00209113.items[0].dataSet,"x00200032",3)),t||(t=function(e){let t;if(e.string("x00080060").includes("NM")){const r=Ae(e,2);r&&b(r)&&e.elements.x00540022&&(t=pe(e.elements.x00540022.items[0].dataSet,"x00200032",3))}return t}(e)),t}function Me(e){let t=pe(e,"x00280030",2);return!t&&e.elements.x00289110&&(t=pe(e.elements.x00289110.items[0].dataSet,"x00280030",2)),t}function Re(e){let t;return e.elements.x00180050?t=e.floatString("x00180050"):e.elements.x00289110&&e.elements.x00289110.items.length&&e.elements.x00289110.items[0].dataSet.elements.x00180050&&(t=e.elements.x00289110.items[0].dataSet.floatString("x00180050")),t}const Fe=function(e,t){const{dicomParser:r}=Xe,n=xe(t);if("multiframeModule"===e){const e=Te.retrieveMultiframeDataset(n.url);if(!e.dataSet)return;const t=function(e,t){if(!e)return;const{NumberOfFrames:r,PerFrameFunctionalGroupsSequence:n,SharedFunctionalGroupsSequence:o}=ke(e);if(n||r>1){const{shared:e,perFrame:a}=ye(n,o,t);return{NumberOfFrames:r,PerFrameFunctionalInformation:a,SharedFunctionalInformation:e}}return{NumberOfFrames:r}}(e.dataSet,e.frame);return t}let o=n.url;n.frame&&(o=`${o}&frame=${n.frame}`);const a=_e.get(o);if(a){if("generalSeriesModule"===e)return{modality:a.string("x00080060"),seriesInstanceUID:a.string("x0020000e"),seriesNumber:a.intString("x00200011"),studyInstanceUID:a.string("x0020000d"),seriesDate:r.parseDA(a.string("x00080021")),seriesTime:r.parseTM(a.string("x00080031")||""),acquisitionDate:r.parseDA(a.string("x00080022")||""),acquisitionTime:r.parseTM(a.string("x00080032")||"")};if("patientStudyModule"===e)return{patientAge:a.intString("x00101010"),patientSize:a.floatString("x00101020"),patientWeight:a.floatString("x00101030")};if("imagePlaneModule"===e){const e=Le(a),t=Ee(a),r=Me(a);let n;a.elements.x00200052&&(n=a.string("x00200052"));const o=Re(a);let i;a.elements.x00201041&&(i=a.floatString("x00201041"));let s=null,l=null;r&&(l=r[0],s=r[1]);let c=null,u=null;return e&&(c=[parseFloat(e[0]),parseFloat(e[1]),parseFloat(e[2])],u=[parseFloat(e[3]),parseFloat(e[4]),parseFloat(e[5])]),{frameOfReferenceUID:n,rows:a.uint16("x00280010"),columns:a.uint16("x00280011"),imageOrientationPatient:e,rowCosines:c,columnCosines:u,imagePositionPatient:t,sliceThickness:o,sliceLocation:i,pixelSpacing:r,rowPixelSpacing:l,columnPixelSpacing:s}}if("nmMultiframeGeometryModule"===e){const e=a.string("x00080060"),t=Ae(a,2);return{modality:e,imageType:a.string("x00080008"),imageSubType:t,imageOrientationPatient:Le(a),imagePositionPatient:Ee(a),sliceThickness:Re(a),pixelSpacing:Me(a),numberOfFrames:a.uint16("x00280008"),isNMReconstructable:b(t)&&e.includes("NM")}}if("imagePixelModule"===e)return fe(a);if("modalityLutModule"===e)return{rescaleIntercept:a.floatString("x00281052"),rescaleSlope:a.floatString("x00281053"),rescaleType:a.string("x00281054"),modalityLUTSequence:ge(a.uint16("x00280103"),a.elements.x00283000)};if("voiLutModule"===e){const e=he(a);return{windowCenter:pe(a,"x00281050",1),windowWidth:pe(a,"x00281051",1),voiLUTSequence:ge(e,a.elements.x00283010)}}if("sopCommonModule"===e)return{sopClassUID:a.string("x00080016"),sopInstanceUID:a.string("x00080018")};if("petIsotopeModule"===e){const e=a.elements.x00540016;if(void 0===e)return;const t=e.items[0].dataSet;return{radiopharmaceuticalInfo:{radiopharmaceuticalStartTime:r.parseTM(t.string("x00181072")||""),radionuclideTotalDose:t.floatString("x00181074"),radionuclideHalfLife:t.floatString("x00181075")}}}return"overlayPlaneModule"===e?function(e){const t=[];for(let r=0;r<=30;r+=2){let n=`x60${r.toString(16)}`;4===n.length&&(n=`x600${r.toString(16)}`);const o=e.elements[`${n}3000`];if(!o)continue;const a=[];for(let t=0;t<o.length;t++)for(let r=0;r<8;r++){const n=e.byteArray[o.dataOffset+t];a[8*t+r]=n>>r&1}t.push({rows:e.uint16(`${n}0010`),columns:e.uint16(`${n}0011`),type:e.string(`${n}0040`),x:e.int16(`${n}0050`,1)-1,y:e.int16(`${n}0050`,0)-1,pixelData:a,description:e.string(`${n}0022`),label:e.string(`${n}1500`),roiArea:e.string(`${n}1301`),roiMean:e.string(`${n}1302`),roiStandardDeviation:e.string(`${n}1303`)})}return{overlays:t}}(a):"transferSyntax"===e?{transferSyntaxUID:a.string("x00020010")}:"petSeriesModule"===e?{correctedImage:a.string("x00280051"),units:a.string("x00541001"),decayCorrection:a.string("x00541102")}:"petImageModule"===e?{frameReferenceTime:r.floatString(a.string("x00541300")||""),actualFrameDuration:r.intString(a.string("x00181242"))}:void 0}};let Oe=[];const Be={add:function(e){return"dicomfile:"+(Oe.push(e)-1)},get:function(e){return Oe[e]},remove:function(e){Oe[e]=void 0},purge:function(){Oe=[]}};function Ue(e,t){const{dicomParser:r}=Xe;if(e.elements.x7fe00010&&e.elements.x7fe00010.basicOffsetTable.length)return r.readEncapsulatedImageFrame(e,e.elements.x7fe00010,t);if(function(e){return e.intString("x00280008")!==e.elements.x7fe00010.fragments.length}(e)){const n=r.createJPEGBasicOffsetTable(e,e.elements.x7fe00010);return r.readEncapsulatedImageFrame(e,e.elements.x7fe00010,t,n)}return r.readEncapsulatedPixelDataFromFragments(e,e.elements.x7fe00010,t)}function Ne(e,t){return e&1<<t}const je=function(e,t,r){const n=new Uint8Array(r);for(let o=0;o<r;o++){const r=e[Math.floor(o/8)+t],a=o%8;n[o]=Ne(r,a)?1:0}return n};const We=function(e,t){const r=e.elements.x7fe00010||e.elements.x7fe00008,n=e.uint16("x00280100"),o=e.uint16("x00280010"),a=e.uint16("x00280011");let i=e.uint16("x00280002");"YBR_FULL_422"===e.string("x00280004")&&(i=2,console.warn("Using SamplesPerPixel of 2 for YBR_FULL_422 photometric interpretation.\n See http://dicom.nema.org/medical/dicom/current/output/chtml/part03/sect_C.7.6.3.html for more information."));const s=r.dataOffset,l=o*a*i;let c;if(8===n){if(c=s+t*l,c>=e.byteArray.length)throw new Error("frame exceeds size of pixelData");return new Uint8Array(e.byteArray.buffer.slice(c,c+l))}if(16===n){if(c=s+t*l*2,c>=e.byteArray.length)throw new Error("frame exceeds size of pixelData");return new Uint8Array(e.byteArray.buffer.slice(c,c+2*l))}if(1===n){if(c=s+t*l*.125,c>=e.byteArray.length)throw new Error("frame exceeds size of pixelData");return je(e.byteArray,c,l)}if(32===n){if(c=s+t*l*4,c>=e.byteArray.length)throw new Error("frame exceeds size of pixelData");return new Uint8Array(e.byteArray.buffer.slice(c,c+4*l))}throw new Error("unsupported pixel format")};const Ze=function(e){const t=xe(e),r=parseInt(t.url,10),n=Be.get(r);return new Promise(((e,t)=>{const r=new FileReader;r.onload=t=>{const r=t.target.result;e(r)},r.onerror=t,r.readAsArrayBuffer(n)}))};const $e=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=e.elements.x7fe00010||e.elements.x7fe00008;return r?r.encapsulatedPixelData?Ue(e,t):We(e,t):null};function Ge(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0;const i=(new Date).getTime(),s={cancelFn:void 0,promise:void 0};return s.promise=new Promise(((l,c)=>{e.then((e=>{const u=$e(e,r),d=e.string("x00020010"),f=(new Date).getTime(),m=se(t,u,d,o);!function(e,t){e.decache=function(){const e=xe(t);_e.unload(e.url)}}(s,t),m.then((t=>{t.data=e,t.sharedCacheKey=n;const r=(new Date).getTime();t.loadTimeInMS=f-i,t.totalTimeInMS=r-i,void 0!==a&&void 0!==a.imageDoneCallback&&a.imageDoneCallback(t),l(t)}),(function(t){c({error:t,dataSet:e})}))}),(function(e){c({error:e})}))})),s}function Ve(e){return"dicomweb"===e||"wadouri"===e?A:"dicomfile"===e?Ze:void 0}function qe(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=xe(e);t=Object.assign({},t);let n=t.loader;if(void 0===n?n=Ve(r.scheme):delete t.loader,_e.isLoaded(r.url)){return function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;const a=(new Date).getTime();return{promise:new Promise(((i,s)=>{const l=(new Date).getTime();let c;try{const n=$e(e,r),a=e.string("x00020010");c=se(t,n,a,o)}catch(t){return void s({error:t,dataSet:e})}c.then((t=>{t.data=e,t.sharedCacheKey=n;const r=(new Date).getTime();t.loadTimeInMS=l-a,t.totalTimeInMS=r-a,i(t)}),s)})),cancelFn:void 0}}(_e.get(r.url,n,e),e,r.pixelDataFrame,r.url,t)}return Ge(_e.load(r.url,n,e),e,r.frame,r.url,t)}const ze={metaData:{getImagePixelModule:fe,getLUTs:ge,getModalityLUTOutputPixelRepresentation:he,getNumberValues:pe,metaDataProvider:Fe},dataSetCacheManager:_e,fileManager:Be,getEncapsulatedImageFrame:Ue,getUncompressedImageFrame:We,loadFileRequest:Ze,loadImageFromPromise:Ge,getLoaderForScheme:Ve,loadImage:qe,parseImageId:xe,unpackBinaryFrame:je,register:function(e){e.registerImageLoader("dicomweb",qe),e.registerImageLoader("wadouri",qe),e.registerImageLoader("dicomfile",qe),e.metaData.addProvider(Fe)}};const Ye=function(e){ce.register(e),ze.register(e)};let He,Ke;const Je={set cornerstone(e){He=e,Ye(He)},get cornerstone(){if(!He){if(He=window&&window.cornerstone,!He)throw new Error("cornerstoneDICOMImageLoader requires a copy of Cornerstone to work properly. Please add cornerstoneDICOMImageLoader.external.cornerstone = cornerstone; to your application.");Ye(He)}return He},set dicomParser(e){Ke=e},get dicomParser(){if(!Ke){if(!window||!window.dicomParser)throw new Error("cornerstoneDICOMImageLoader requires a copy of dicomParser to work properly. Please add cornerstoneDICOMImageLoader.external.dicomParser = dicomParser; to your application.");Ke=window.dicomParser}return Ke}},Xe=Je;function Qe(e,t){const r=e.length,n=new Uint8ClampedArray(r);for(let o=0;o<r;++o)n[o]=e[o]>>t;return n}function et(e,t,r){const n=e.columns*e.rows,o=e.pixelData;let a=e.redPaletteColorLookupTableData;a||(a=Xe.cornerstone.metaData.get("imagePixelModule",e.imageId)?.redPaletteColorLookupTableData);let i=e.greenPaletteColorLookupTableData;i||(i=Xe.cornerstone.metaData.get("imagePixelModule",e.imageId)?.greenPaletteColorLookupTableData);let s=e.bluePaletteColorLookupTableData;if(s||(s=Xe.cornerstone.metaData.get("imagePixelModule",e.imageId)?.bluePaletteColorLookupTableData),!a||!i||!s)throw new Error("The image does not have a complete color palette. R, G, and B palette data are required.");const l=e.redPaletteColorLookupTableData.length;let c=0,u=0;const d=e.redPaletteColorLookupTableDescriptor[1],f=8===e.redPaletteColorLookupTableDescriptor[2]?0:8,m=Qe(a,f),g=Qe(i,f),h=Qe(s,f);if(r)for(let e=0;e<n;++e){let e=o[c++];e<d?e=0:e>d+l-1?e=l-1:e-=d,t[u++]=m[e],t[u++]=g[e],t[u++]=h[e],t[u++]=255}else for(let e=0;e<n;++e){let e=o[c++];e<d?e=0:e>d+l-1?e=l-1:e-=d,t[u++]=m[e],t[u++]=g[e],t[u++]=h[e]}}const tt=function(e){C(e)},rt={convertRGBColorByPixel:e,convertRGBColorByPlane:t,convertYBRFullByPixel:o,convertYBRFullByPlane:a,convertPALETTECOLOR:et,wadouri:ze,wadors:ce,configure:tt,convertColorSpace:O,createImage:se,decodeImageFrame:ee,decodeJPEGBaseline8BitColor:U,getImageFrame:te,getPixelData:M,getMinMax:R,isColorImage:re,isJPEGBaseline8BitColor:ne,webWorkerManager:J,internal:L,external:Je}})(),n})()));
|
|
8
8
|
//# sourceMappingURL=cornerstoneDICOMImageLoader.min.js.map
|
|
9
9
|
|
|
10
10
|
/***/ }),
|
|
@@ -4207,16 +4207,15 @@ exports.Z = function (file, acceptedFiles) {
|
|
|
4207
4207
|
|
|
4208
4208
|
/***/ }),
|
|
4209
4209
|
|
|
4210
|
-
/***/
|
|
4210
|
+
/***/ 42492:
|
|
4211
4211
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4212
4212
|
|
|
4213
4213
|
"use strict";
|
|
4214
4214
|
|
|
4215
4215
|
// EXPORTS
|
|
4216
4216
|
__webpack_require__.d(__webpack_exports__, {
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
lr: () => (/* reexport */ useSearchParams)
|
|
4217
|
+
N: () => (/* reexport */ useDebounce),
|
|
4218
|
+
l: () => (/* reexport */ useSearchParams/* default */.Z)
|
|
4220
4219
|
});
|
|
4221
4220
|
|
|
4222
4221
|
// EXTERNAL MODULE: ../../../node_modules/react/index.js
|
|
@@ -4250,35 +4249,48 @@ function useDebounce(value, delay) {
|
|
|
4250
4249
|
|
|
4251
4250
|
return debouncedValue;
|
|
4252
4251
|
}
|
|
4253
|
-
// EXTERNAL MODULE:
|
|
4254
|
-
var
|
|
4255
|
-
;// CONCATENATED MODULE: ./hooks/
|
|
4252
|
+
// EXTERNAL MODULE: ./hooks/useSearchParams.ts
|
|
4253
|
+
var useSearchParams = __webpack_require__(2318);
|
|
4254
|
+
;// CONCATENATED MODULE: ./hooks/index.js
|
|
4256
4255
|
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4256
|
+
|
|
4257
|
+
|
|
4258
|
+
|
|
4259
|
+
/***/ }),
|
|
4260
|
+
|
|
4261
|
+
/***/ 2318:
|
|
4262
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4263
|
+
|
|
4264
|
+
"use strict";
|
|
4265
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4266
|
+
/* harmony export */ Z: () => (/* binding */ useSearchParams)
|
|
4267
|
+
/* harmony export */ });
|
|
4268
|
+
/* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14935);
|
|
4261
4269
|
|
|
4262
4270
|
|
|
4263
4271
|
/**
|
|
4264
|
-
* It returns a
|
|
4265
|
-
* lowercase
|
|
4266
|
-
* @
|
|
4272
|
+
* It returns a URLSearchParams of the query parameters in the URL, where the keys are
|
|
4273
|
+
* either lowercase or maintain their case based on the lowerCaseKeys parameter.
|
|
4274
|
+
* @param {lowerCaseKeys:boolean} true to return lower case keys; false (default) to maintain casing;
|
|
4275
|
+
* @returns {URLSearchParams}
|
|
4267
4276
|
*/
|
|
4268
4277
|
function useSearchParams() {
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4278
|
+
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
|
4279
|
+
lowerCaseKeys: false
|
|
4280
|
+
};
|
|
4281
|
+
const {
|
|
4282
|
+
lowerCaseKeys
|
|
4283
|
+
} = options;
|
|
4284
|
+
const searchParams = new URLSearchParams((0,react_router__WEBPACK_IMPORTED_MODULE_0__/* .useLocation */ .TH)().search);
|
|
4285
|
+
if (!lowerCaseKeys) {
|
|
4286
|
+
return searchParams;
|
|
4274
4287
|
}
|
|
4275
|
-
|
|
4288
|
+
const lowerCaseSearchParams = new URLSearchParams();
|
|
4289
|
+
for (const [key, value] of searchParams) {
|
|
4290
|
+
lowerCaseSearchParams.set(key.toLowerCase(), value);
|
|
4291
|
+
}
|
|
4292
|
+
return lowerCaseSearchParams;
|
|
4276
4293
|
}
|
|
4277
|
-
;// CONCATENATED MODULE: ./hooks/index.js
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
4294
|
|
|
4283
4295
|
/***/ }),
|
|
4284
4296
|
|
|
@@ -4330,14 +4342,16 @@ Compose.propTypes = {
|
|
|
4330
4342
|
components: (prop_types_default()).array,
|
|
4331
4343
|
children: (prop_types_default()).node.isRequired
|
|
4332
4344
|
};
|
|
4333
|
-
// EXTERNAL MODULE: ../../ui/src/index.js +
|
|
4334
|
-
var ui_src = __webpack_require__(
|
|
4345
|
+
// EXTERNAL MODULE: ../../ui/src/index.js + 452 modules
|
|
4346
|
+
var ui_src = __webpack_require__(28619);
|
|
4335
4347
|
// EXTERNAL MODULE: ./state/index.js + 1 modules
|
|
4336
4348
|
var state = __webpack_require__(22896);
|
|
4337
|
-
// EXTERNAL MODULE: ../../core/src/index.ts +
|
|
4338
|
-
var core_src = __webpack_require__(
|
|
4349
|
+
// EXTERNAL MODULE: ../../core/src/index.ts + 103 modules
|
|
4350
|
+
var core_src = __webpack_require__(87754);
|
|
4339
4351
|
// EXTERNAL MODULE: ../node_modules/react-router/dist/index.js
|
|
4340
4352
|
var react_router_dist = __webpack_require__(14935);
|
|
4353
|
+
// EXTERNAL MODULE: ./hooks/useSearchParams.ts
|
|
4354
|
+
var useSearchParams = __webpack_require__(2318);
|
|
4341
4355
|
;// CONCATENATED MODULE: ./routes/DataSourceWrapper.tsx
|
|
4342
4356
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4343
4357
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
@@ -4348,6 +4362,14 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
4348
4362
|
|
|
4349
4363
|
|
|
4350
4364
|
|
|
4365
|
+
|
|
4366
|
+
/**
|
|
4367
|
+
* Determines if two React Router location objects are the same.
|
|
4368
|
+
*/
|
|
4369
|
+
const areLocationsTheSame = (location0, location1) => {
|
|
4370
|
+
return location0.pathname === location1.pathname && location0.search === location1.search && location0.hash === location1.hash;
|
|
4371
|
+
};
|
|
4372
|
+
|
|
4351
4373
|
/**
|
|
4352
4374
|
* Uses route properties to determine the data source that should be passed
|
|
4353
4375
|
* to the child layout template. In some instances, initiates requests and
|
|
@@ -4363,33 +4385,10 @@ function DataSourceWrapper(props) {
|
|
|
4363
4385
|
} = props;
|
|
4364
4386
|
const params = (0,react_router_dist/* useParams */.UO)();
|
|
4365
4387
|
const location = (0,react_router_dist/* useLocation */.TH)();
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
const
|
|
4370
|
-
if (!dataSourceName && window.config.defaultDataSourceName) {
|
|
4371
|
-
dataSourceName = window.config.defaultDataSourceName;
|
|
4372
|
-
} else if (!dataSourceName) {
|
|
4373
|
-
// Gets the first defined datasource with the right name
|
|
4374
|
-
// Mostly for historical reasons - new configs should use the defaultDataSourceName
|
|
4375
|
-
const dataSourceModules = extensionManager.modules[core_src/* MODULE_TYPES */.OB.DATA_SOURCE];
|
|
4376
|
-
// TODO: Good usecase for flatmap?
|
|
4377
|
-
const webApiDataSources = dataSourceModules.reduce((acc, curr) => {
|
|
4378
|
-
const mods = [];
|
|
4379
|
-
curr.module.forEach(mod => {
|
|
4380
|
-
if (mod.type === 'webApi') {
|
|
4381
|
-
mods.push(mod);
|
|
4382
|
-
}
|
|
4383
|
-
});
|
|
4384
|
-
return acc.concat(mods);
|
|
4385
|
-
}, []);
|
|
4386
|
-
dataSourceName = webApiDataSources.map(ds => ds.name).find(it => extensionManager.getDataSources(it)?.[0] !== undefined);
|
|
4387
|
-
}
|
|
4388
|
-
const dataSource = extensionManager.getDataSources(dataSourceName)?.[0];
|
|
4389
|
-
if (!dataSource) {
|
|
4390
|
-
throw new Error(`No data source found for ${dataSourceName}`);
|
|
4391
|
-
}
|
|
4392
|
-
|
|
4388
|
+
const lowerCaseSearchParams = (0,useSearchParams/* default */.Z)({
|
|
4389
|
+
lowerCaseKeys: true
|
|
4390
|
+
});
|
|
4391
|
+
const query = (0,useSearchParams/* default */.Z)();
|
|
4393
4392
|
// Route props --> studies.mapParams
|
|
4394
4393
|
// mapParams --> studies.search
|
|
4395
4394
|
// studies.search --> studies.processResults
|
|
@@ -4404,9 +4403,84 @@ function DataSourceWrapper(props) {
|
|
|
4404
4403
|
pageNumber: 1,
|
|
4405
4404
|
location: 'Not a valid location, causes first load to occur'
|
|
4406
4405
|
};
|
|
4406
|
+
const getInitialDataSourceName = (0,react.useCallback)(() => {
|
|
4407
|
+
// TODO - get the variable from the props all the time...
|
|
4408
|
+
let dataSourceName = lowerCaseSearchParams.get('datasources');
|
|
4409
|
+
if (!dataSourceName && window.config.defaultDataSourceName) {
|
|
4410
|
+
return '';
|
|
4411
|
+
}
|
|
4412
|
+
if (!dataSourceName) {
|
|
4413
|
+
// Gets the first defined datasource with the right name
|
|
4414
|
+
// Mostly for historical reasons - new configs should use the defaultDataSourceName
|
|
4415
|
+
const dataSourceModules = extensionManager.modules[core_src/* MODULE_TYPES */.OB.DATA_SOURCE];
|
|
4416
|
+
// TODO: Good usecase for flatmap?
|
|
4417
|
+
const webApiDataSources = dataSourceModules.reduce((acc, curr) => {
|
|
4418
|
+
const mods = [];
|
|
4419
|
+
curr.module.forEach(mod => {
|
|
4420
|
+
if (mod.type === 'webApi') {
|
|
4421
|
+
mods.push(mod);
|
|
4422
|
+
}
|
|
4423
|
+
});
|
|
4424
|
+
return acc.concat(mods);
|
|
4425
|
+
}, []);
|
|
4426
|
+
dataSourceName = webApiDataSources.map(ds => ds.name).find(it => extensionManager.getDataSources(it)?.[0] !== undefined);
|
|
4427
|
+
}
|
|
4428
|
+
return dataSourceName;
|
|
4429
|
+
}, []);
|
|
4430
|
+
const [isDataSourceInitialized, setIsDataSourceInitialized] = (0,react.useState)(false);
|
|
4431
|
+
|
|
4432
|
+
// The path to the data source to be used in the URL for a mode (e.g. mode/dataSourcePath?StudyIntanceUIDs=1.2.3)
|
|
4433
|
+
const [dataSourcePath, setDataSourcePath] = (0,react.useState)(() => {
|
|
4434
|
+
const dataSourceName = getInitialDataSourceName();
|
|
4435
|
+
return dataSourceName ? `/${dataSourceName}` : '';
|
|
4436
|
+
});
|
|
4437
|
+
const [dataSource, setDataSource] = (0,react.useState)(() => {
|
|
4438
|
+
const dataSourceName = getInitialDataSourceName();
|
|
4439
|
+
if (!dataSourceName) {
|
|
4440
|
+
return extensionManager.getActiveDataSource()[0];
|
|
4441
|
+
}
|
|
4442
|
+
const dataSource = extensionManager.getDataSources(dataSourceName)?.[0];
|
|
4443
|
+
if (!dataSource) {
|
|
4444
|
+
throw new Error(`No data source found for ${dataSourceName}`);
|
|
4445
|
+
}
|
|
4446
|
+
return dataSource;
|
|
4447
|
+
});
|
|
4407
4448
|
const [data, setData] = (0,react.useState)(DEFAULT_DATA);
|
|
4408
4449
|
const [isLoading, setIsLoading] = (0,react.useState)(false);
|
|
4450
|
+
|
|
4451
|
+
/**
|
|
4452
|
+
* The effect to initialize the data source whenever it changes. Similar to
|
|
4453
|
+
* whenever a different Mode is entered, the Mode's data source is initialized, so
|
|
4454
|
+
* too this DataSourceWrapper must initialize its data source whenever a different
|
|
4455
|
+
* data source is activated. Furthermore, a data source might be initialized
|
|
4456
|
+
* several times as it gets activated/deactivated because the location URL
|
|
4457
|
+
* might change and data sources initialize based on the URL.
|
|
4458
|
+
*/
|
|
4459
|
+
(0,react.useEffect)(() => {
|
|
4460
|
+
const initializeDataSource = async () => {
|
|
4461
|
+
await dataSource.initialize({
|
|
4462
|
+
params,
|
|
4463
|
+
query
|
|
4464
|
+
});
|
|
4465
|
+
setIsDataSourceInitialized(true);
|
|
4466
|
+
};
|
|
4467
|
+
initializeDataSource();
|
|
4468
|
+
}, [dataSource]);
|
|
4469
|
+
(0,react.useEffect)(() => {
|
|
4470
|
+
const dataSourceChangedCallback = () => {
|
|
4471
|
+
setIsDataSourceInitialized(false);
|
|
4472
|
+
setDataSourcePath('');
|
|
4473
|
+
setDataSource(extensionManager.getActiveDataSource()[0]);
|
|
4474
|
+
// Setting data to DEFAULT_DATA triggers a new query just like it does for the initial load.
|
|
4475
|
+
setData(DEFAULT_DATA);
|
|
4476
|
+
};
|
|
4477
|
+
const sub = extensionManager.subscribe(core_src/* ExtensionManager */.W$.EVENTS.ACTIVE_DATA_SOURCE_CHANGED, dataSourceChangedCallback);
|
|
4478
|
+
return () => sub.unsubscribe();
|
|
4479
|
+
}, []);
|
|
4409
4480
|
(0,react.useEffect)(() => {
|
|
4481
|
+
if (!isDataSourceInitialized) {
|
|
4482
|
+
return;
|
|
4483
|
+
}
|
|
4410
4484
|
const queryFilterValues = _getQueryFilterValues(location.search, STUDIES_LIMIT);
|
|
4411
4485
|
|
|
4412
4486
|
// 204: no content
|
|
@@ -4429,7 +4503,10 @@ function DataSourceWrapper(props) {
|
|
|
4429
4503
|
const isSamePage = data.pageNumber === queryFilterValues.pageNumber;
|
|
4430
4504
|
const previousOffset = Math.floor(data.pageNumber * data.resultsPerPage / STUDIES_LIMIT) * (STUDIES_LIMIT - 1);
|
|
4431
4505
|
const newOffset = Math.floor(queryFilterValues.pageNumber * queryFilterValues.resultsPerPage / STUDIES_LIMIT) * (STUDIES_LIMIT - 1);
|
|
4432
|
-
|
|
4506
|
+
// Simply checking data.location !== location is not sufficient because even though the location href (i.e. entire URL)
|
|
4507
|
+
// has not changed, the React Router still provides a new location reference and would result in two study queries
|
|
4508
|
+
// on initial load. Alternatively, window.location.href could be used.
|
|
4509
|
+
const isLocationUpdated = typeof data.location === 'string' || !areLocationsTheSame(data.location, location);
|
|
4433
4510
|
const isDataInvalid = !isSamePage || !isLoading && (newOffset !== previousOffset || isLocationUpdated);
|
|
4434
4511
|
if (isDataInvalid) {
|
|
4435
4512
|
getData();
|
|
@@ -4438,13 +4515,13 @@ function DataSourceWrapper(props) {
|
|
|
4438
4515
|
console.warn(ex);
|
|
4439
4516
|
}
|
|
4440
4517
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4441
|
-
}, [data, location, params, isLoading, setIsLoading]);
|
|
4518
|
+
}, [data, location, params, isLoading, setIsLoading, dataSource, isDataSourceInitialized]);
|
|
4442
4519
|
// queryFilterValues
|
|
4443
4520
|
|
|
4444
4521
|
// TODO: Better way to pass DataSource?
|
|
4445
4522
|
return /*#__PURE__*/react.createElement(LayoutTemplate, _extends({}, rest, {
|
|
4446
4523
|
data: data.studies,
|
|
4447
|
-
dataPath:
|
|
4524
|
+
dataPath: dataSourcePath,
|
|
4448
4525
|
dataTotal: data.total,
|
|
4449
4526
|
dataSource: dataSource,
|
|
4450
4527
|
isLoadingData: isLoading
|
|
@@ -4777,8 +4854,8 @@ const filtersMeta = [{
|
|
|
4777
4854
|
gridCol: 2
|
|
4778
4855
|
}];
|
|
4779
4856
|
/* harmony default export */ const WorkList_filtersMeta = (filtersMeta);
|
|
4780
|
-
// EXTERNAL MODULE: ./hooks/index.js +
|
|
4781
|
-
var hooks = __webpack_require__(
|
|
4857
|
+
// EXTERNAL MODULE: ./hooks/index.js + 1 modules
|
|
4858
|
+
var hooks = __webpack_require__(42492);
|
|
4782
4859
|
;// CONCATENATED MODULE: ./routes/WorkList/WorkList.tsx
|
|
4783
4860
|
|
|
4784
4861
|
|
|
@@ -4834,7 +4911,7 @@ function WorkList(_ref) {
|
|
|
4834
4911
|
// ~ Modes
|
|
4835
4912
|
const [appConfig] = (0,state/* useAppConfig */.M)();
|
|
4836
4913
|
// ~ Filters
|
|
4837
|
-
const searchParams = (0,hooks/* useSearchParams */.
|
|
4914
|
+
const searchParams = (0,hooks/* useSearchParams */.l)();
|
|
4838
4915
|
const navigate = (0,dist/* useNavigate */.s0)();
|
|
4839
4916
|
const STUDIES_LIMIT = 101;
|
|
4840
4917
|
const queryFilterValues = WorkList_getQueryFilterValues(searchParams);
|
|
@@ -4842,7 +4919,7 @@ function WorkList(_ref) {
|
|
|
4842
4919
|
...defaultFilterValues,
|
|
4843
4920
|
...queryFilterValues
|
|
4844
4921
|
});
|
|
4845
|
-
const debouncedFilterValues = (0,hooks/* useDebounce */.
|
|
4922
|
+
const debouncedFilterValues = (0,hooks/* useDebounce */.N)(filterValues, 200);
|
|
4846
4923
|
const {
|
|
4847
4924
|
resultsPerPage,
|
|
4848
4925
|
pageNumber,
|
|
@@ -4890,6 +4967,9 @@ function WorkList(_ref) {
|
|
|
4890
4967
|
const [expandedRows, setExpandedRows] = (0,react.useState)([]);
|
|
4891
4968
|
const [studiesWithSeriesData, setStudiesWithSeriesData] = (0,react.useState)([]);
|
|
4892
4969
|
const numOfStudies = studiesTotal;
|
|
4970
|
+
const querying = (0,react.useMemo)(() => {
|
|
4971
|
+
return isLoadingData || expandedRows.length > 0;
|
|
4972
|
+
}, [isLoadingData, expandedRows]);
|
|
4893
4973
|
const setFilterValues = val => {
|
|
4894
4974
|
if (filterValues.pageNumber === val.pageNumber) {
|
|
4895
4975
|
val.pageNumber = 1;
|
|
@@ -4985,6 +5065,7 @@ function WorkList(_ref) {
|
|
|
4985
5065
|
}
|
|
4986
5066
|
fetchSeries(studyInstanceUid);
|
|
4987
5067
|
}
|
|
5068
|
+
|
|
4988
5069
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4989
5070
|
}, [expandedRows, studies]);
|
|
4990
5071
|
const isFiltering = (filterValues, defaultFilterValues) => {
|
|
@@ -5070,6 +5151,8 @@ function WorkList(_ref) {
|
|
|
5070
5151
|
instances: s.numSeriesInstances || ''
|
|
5071
5152
|
};
|
|
5072
5153
|
}) : []
|
|
5154
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
5155
|
+
className: "flex flex-row gap-2"
|
|
5073
5156
|
}, appConfig.loadedModes.map((mode, i) => {
|
|
5074
5157
|
const isFirst = i === 0;
|
|
5075
5158
|
const modalitiesToCheck = modalities.replaceAll('/', '\\');
|
|
@@ -5089,10 +5172,18 @@ function WorkList(_ref) {
|
|
|
5089
5172
|
}
|
|
5090
5173
|
query.append('StudyInstanceUIDs', studyInstanceUid);
|
|
5091
5174
|
return /*#__PURE__*/react.createElement(dist/* Link */.rU, {
|
|
5175
|
+
className: isValidMode ? '' : 'cursor-not-allowed',
|
|
5092
5176
|
key: i,
|
|
5093
|
-
to: `${dataPath ? '../../' : ''}${mode.routeName}${dataPath || ''}?${query.toString()}
|
|
5177
|
+
to: `${dataPath ? '../../' : ''}${mode.routeName}${dataPath || ''}?${query.toString()}`,
|
|
5178
|
+
onClick: event => {
|
|
5179
|
+
// In case any event bubbles up for an invalid mode, prevent the navigation.
|
|
5180
|
+
// For example, the event bubbles up when the icon embedded in the disabled button is clicked.
|
|
5181
|
+
if (!isValidMode) {
|
|
5182
|
+
event.preventDefault();
|
|
5183
|
+
}
|
|
5184
|
+
}
|
|
5094
5185
|
// to={`${mode.routeName}/dicomweb?StudyInstanceUIDs=${studyInstanceUid}`}
|
|
5095
|
-
}, /*#__PURE__*/react.createElement(ui_src/*
|
|
5186
|
+
}, /*#__PURE__*/react.createElement(ui_src/* LegacyButton */.mN, {
|
|
5096
5187
|
rounded: "full",
|
|
5097
5188
|
variant: isValidMode ? 'contained' : 'disabled',
|
|
5098
5189
|
disabled: !isValidMode,
|
|
@@ -5100,19 +5191,16 @@ function WorkList(_ref) {
|
|
|
5100
5191
|
name: "launch-arrow"
|
|
5101
5192
|
}) // launch-arrow | launch-info
|
|
5102
5193
|
,
|
|
5103
|
-
className: classnames_default()('font-medium ', {
|
|
5104
|
-
'ml-2': !isFirst
|
|
5105
|
-
}),
|
|
5106
5194
|
onClick: () => {}
|
|
5107
5195
|
}, t(`Modes:${mode.displayName}`)));
|
|
5108
|
-
})),
|
|
5196
|
+
}))),
|
|
5109
5197
|
onClickRow: () => setExpandedRows(s => isExpanded ? s.filter(n => rowKey !== n) : [...s, rowKey]),
|
|
5110
5198
|
isExpanded
|
|
5111
5199
|
};
|
|
5112
5200
|
});
|
|
5113
5201
|
const hasStudies = numOfStudies > 0;
|
|
5114
|
-
const versionNumber = "3.7.0-beta.
|
|
5115
|
-
const commitHash = "
|
|
5202
|
+
const versionNumber = "3.7.0-beta.40";
|
|
5203
|
+
const commitHash = "019dedce343650e384d35b79345386a2dfd2bc4e";
|
|
5116
5204
|
const menuOptions = [{
|
|
5117
5205
|
title: t('Header:About'),
|
|
5118
5206
|
icon: 'info',
|
|
@@ -5162,7 +5250,7 @@ function WorkList(_ref) {
|
|
|
5162
5250
|
const {
|
|
5163
5251
|
component: dicomUploadComponent
|
|
5164
5252
|
} = customizationService.get('dicomUploadComponent') ?? {};
|
|
5165
|
-
const uploadProps = dicomUploadComponent && dataSource.getConfig()
|
|
5253
|
+
const uploadProps = dicomUploadComponent && dataSource.getConfig()?.dicomUploadEnabled ? {
|
|
5166
5254
|
title: 'Upload files',
|
|
5167
5255
|
closeButton: true,
|
|
5168
5256
|
shouldCloseOnEsc: false,
|
|
@@ -5207,6 +5295,7 @@ function WorkList(_ref) {
|
|
|
5207
5295
|
}, /*#__PURE__*/react.createElement(ui_src/* StudyListTable */.X7, {
|
|
5208
5296
|
tableDataSource: tableDataSource.slice(offset, offsetAndTake),
|
|
5209
5297
|
numOfStudies: numOfStudies,
|
|
5298
|
+
querying: querying,
|
|
5210
5299
|
filtersMeta: WorkList_filtersMeta
|
|
5211
5300
|
}), /*#__PURE__*/react.createElement("div", {
|
|
5212
5301
|
className: "grow"
|
|
@@ -6046,15 +6135,15 @@ async function loadModule(module) {
|
|
|
6046
6135
|
return imported.default;
|
|
6047
6136
|
}
|
|
6048
6137
|
if (module === "@ohif/extension-cornerstone") {
|
|
6049
|
-
const imported = await Promise.all(/* import() */[__webpack_require__.e(780), __webpack_require__.e(381), __webpack_require__.e(
|
|
6138
|
+
const imported = await Promise.all(/* import() */[__webpack_require__.e(780), __webpack_require__.e(381), __webpack_require__.e(389), __webpack_require__.e(270), __webpack_require__.e(935), __webpack_require__.e(728), __webpack_require__.e(625)]).then(__webpack_require__.bind(__webpack_require__, 39501));
|
|
6050
6139
|
return imported.default;
|
|
6051
6140
|
}
|
|
6052
6141
|
if (module === "@ohif/extension-measurement-tracking") {
|
|
6053
|
-
const imported = await Promise.all(/* import() */[__webpack_require__.e(780), __webpack_require__.e(381), __webpack_require__.e(
|
|
6142
|
+
const imported = await Promise.all(/* import() */[__webpack_require__.e(780), __webpack_require__.e(381), __webpack_require__.e(389), __webpack_require__.e(270), __webpack_require__.e(606), __webpack_require__.e(531), __webpack_require__.e(984), __webpack_require__.e(744)]).then(__webpack_require__.bind(__webpack_require__, 43744));
|
|
6054
6143
|
return imported.default;
|
|
6055
6144
|
}
|
|
6056
6145
|
if (module === "@ohif/extension-cornerstone-dicom-sr") {
|
|
6057
|
-
const imported = await Promise.all(/* import() */[__webpack_require__.e(780), __webpack_require__.e(381), __webpack_require__.e(
|
|
6146
|
+
const imported = await Promise.all(/* import() */[__webpack_require__.e(780), __webpack_require__.e(381), __webpack_require__.e(389), __webpack_require__.e(270), __webpack_require__.e(606), __webpack_require__.e(984)]).then(__webpack_require__.bind(__webpack_require__, 65948));
|
|
6058
6147
|
return imported.default;
|
|
6059
6148
|
}
|
|
6060
6149
|
if (module === "@ohif/extension-cornerstone-dicom-seg") {
|
|
@@ -6074,7 +6163,7 @@ async function loadModule(module) {
|
|
|
6074
6163
|
return imported.default;
|
|
6075
6164
|
}
|
|
6076
6165
|
if (module === "@ohif/extension-tmtv") {
|
|
6077
|
-
const imported = await Promise.all(/* import() */[__webpack_require__.e(780), __webpack_require__.e(381), __webpack_require__.e(
|
|
6166
|
+
const imported = await Promise.all(/* import() */[__webpack_require__.e(780), __webpack_require__.e(381), __webpack_require__.e(389), __webpack_require__.e(270), __webpack_require__.e(283)]).then(__webpack_require__.bind(__webpack_require__, 66135));
|
|
6078
6167
|
return imported.default;
|
|
6079
6168
|
}
|
|
6080
6169
|
if (module === "@ohif/extension-test") {
|
|
@@ -6208,9 +6297,15 @@ function ModeRoute(_ref3) {
|
|
|
6208
6297
|
} = _ref3;
|
|
6209
6298
|
// Parse route params/querystring
|
|
6210
6299
|
const location = (0,react_router_dist/* useLocation */.TH)();
|
|
6211
|
-
|
|
6300
|
+
|
|
6301
|
+
// The react router DOM placeholder map (see https://reactrouter.com/en/main/hooks/use-params).
|
|
6212
6302
|
const params = (0,react_router_dist/* useParams */.UO)();
|
|
6213
|
-
|
|
6303
|
+
// The URL's query search parameters where the keys casing is maintained
|
|
6304
|
+
const query = (0,hooks/* useSearchParams */.l)();
|
|
6305
|
+
// The URL's query search parameters where the keys are all lower case.
|
|
6306
|
+
const lowerCaseSearchParams = (0,hooks/* useSearchParams */.l)({
|
|
6307
|
+
lowerCaseKeys: true
|
|
6308
|
+
});
|
|
6214
6309
|
const [studyInstanceUIDs, setStudyInstanceUIDs] = (0,react.useState)();
|
|
6215
6310
|
const [refresh, setRefresh] = (0,react.useState)(false);
|
|
6216
6311
|
const [ExtensionDependenciesLoaded, setExtensionDependenciesLoaded] = (0,react.useState)(false);
|
|
@@ -6235,8 +6330,8 @@ function ModeRoute(_ref3) {
|
|
|
6235
6330
|
hotkeys: hotkeyObj,
|
|
6236
6331
|
hangingProtocol
|
|
6237
6332
|
} = mode;
|
|
6238
|
-
const runTimeHangingProtocolId =
|
|
6239
|
-
const token =
|
|
6333
|
+
const runTimeHangingProtocolId = lowerCaseSearchParams.get('hangingprotocolid');
|
|
6334
|
+
const token = lowerCaseSearchParams.get('token');
|
|
6240
6335
|
if (token) {
|
|
6241
6336
|
// if a token is passed in, set the userAuthenticationService to use it
|
|
6242
6337
|
// for the Authorization header for all requests
|
|
@@ -6262,10 +6357,11 @@ function ModeRoute(_ref3) {
|
|
|
6262
6357
|
// Preserve the old array interface for hotkeys
|
|
6263
6358
|
const hotkeys = Array.isArray(hotkeyObj) ? hotkeyObj : hotkeyObj?.hotkeys;
|
|
6264
6359
|
const hotkeyName = hotkeyObj?.name || 'hotkey-definitions-v2';
|
|
6265
|
-
|
|
6266
|
-
|
|
6360
|
+
|
|
6361
|
+
// An undefined dataSourceName implies that the active data source that is already set in the ExtensionManager should be used.
|
|
6362
|
+
if (dataSourceName !== undefined) {
|
|
6363
|
+
extensionManager.setActiveDataSource(dataSourceName);
|
|
6267
6364
|
}
|
|
6268
|
-
extensionManager.setActiveDataSource(dataSourceName);
|
|
6269
6365
|
const dataSource = extensionManager.getActiveDataSource()[0];
|
|
6270
6366
|
|
|
6271
6367
|
// Only handling one route per mode for now
|
|
@@ -6328,11 +6424,14 @@ function ModeRoute(_ref3) {
|
|
|
6328
6424
|
|
|
6329
6425
|
// Todo: this should not be here, data source should not care about params
|
|
6330
6426
|
const initializeDataSource = async (params, query) => {
|
|
6331
|
-
|
|
6427
|
+
await dataSource.initialize({
|
|
6332
6428
|
params,
|
|
6333
6429
|
query
|
|
6334
6430
|
});
|
|
6335
|
-
setStudyInstanceUIDs(
|
|
6431
|
+
setStudyInstanceUIDs(dataSource.getStudyInstanceUIDs({
|
|
6432
|
+
params,
|
|
6433
|
+
query
|
|
6434
|
+
}));
|
|
6336
6435
|
};
|
|
6337
6436
|
initializeDataSource(params, query);
|
|
6338
6437
|
return () => {
|
|
@@ -6567,15 +6666,14 @@ function buildModeRoutes(_ref) {
|
|
|
6567
6666
|
private: true
|
|
6568
6667
|
});
|
|
6569
6668
|
});
|
|
6570
|
-
const defaultDataSourceName = extensionManager.defaultDataSourceName;
|
|
6571
6669
|
|
|
6572
|
-
// Add
|
|
6670
|
+
// Add active DataSource route.
|
|
6671
|
+
// This is the DataSource route for the active data source defined in ExtensionManager.getActiveDataSource
|
|
6573
6672
|
const path = `/${mode.routeName}`;
|
|
6574
6673
|
|
|
6575
6674
|
// TODO move up.
|
|
6576
6675
|
const children = () => /*#__PURE__*/react.createElement(ModeRoute, {
|
|
6577
6676
|
mode: mode,
|
|
6578
|
-
dataSourceName: defaultDataSourceName,
|
|
6579
6677
|
extensionManager: extensionManager,
|
|
6580
6678
|
servicesManager: servicesManager,
|
|
6581
6679
|
commandsManager: commandsManager,
|
|
@@ -6670,7 +6768,8 @@ const createRoutes = _ref => {
|
|
|
6670
6768
|
private: true,
|
|
6671
6769
|
props: {
|
|
6672
6770
|
children: WorkList_WorkList,
|
|
6673
|
-
servicesManager
|
|
6771
|
+
servicesManager,
|
|
6772
|
+
extensionManager
|
|
6674
6773
|
}
|
|
6675
6774
|
};
|
|
6676
6775
|
const customRoutes = customizationService.getGlobalCustomization('customRoutes');
|
|
@@ -6967,6 +7066,12 @@ function OpenIdConnectRoutes(_ref) {
|
|
|
6967
7066
|
const userManager = initUserManager(oidc, routerBasename);
|
|
6968
7067
|
const getAuthorizationHeader = () => {
|
|
6969
7068
|
const user = userAuthenticationService.getUser();
|
|
7069
|
+
|
|
7070
|
+
// if the user is null return early, next time
|
|
7071
|
+
// we hit this function we will have a user
|
|
7072
|
+
if (!user) {
|
|
7073
|
+
return;
|
|
7074
|
+
}
|
|
6970
7075
|
return {
|
|
6971
7076
|
Authorization: `Bearer ${user.access_token}`
|
|
6972
7077
|
};
|
|
@@ -7131,7 +7236,7 @@ function App(_ref) {
|
|
|
7131
7236
|
i18n: src["default"]
|
|
7132
7237
|
}], [ui_src/* ThemeWrapper */.$S], [ui_src/* ViewportGridProvider */.CW, {
|
|
7133
7238
|
service: viewportGridService
|
|
7134
|
-
}], [ui_src/* ViewportDialogProvider */.
|
|
7239
|
+
}], [ui_src/* ViewportDialogProvider */.DF, {
|
|
7135
7240
|
service: uiViewportDialogService
|
|
7136
7241
|
}], [ui_src/* CineProvider */.bC, {
|
|
7137
7242
|
service: cineService
|
|
@@ -7441,7 +7546,7 @@ function _getImageOrientationPatient(image) {
|
|
|
7441
7546
|
|
|
7442
7547
|
/***/ }),
|
|
7443
7548
|
|
|
7444
|
-
/***/
|
|
7549
|
+
/***/ 87754:
|
|
7445
7550
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
7446
7551
|
|
|
7447
7552
|
"use strict";
|
|
@@ -7508,379 +7613,6 @@ const log = {
|
|
|
7508
7613
|
timeEnd: console.timeEnd
|
|
7509
7614
|
};
|
|
7510
7615
|
/* harmony default export */ const src_log = (log);
|
|
7511
|
-
;// CONCATENATED MODULE: ../../core/src/extensions/ExtensionManager.ts
|
|
7512
|
-
|
|
7513
|
-
|
|
7514
|
-
|
|
7515
|
-
/**
|
|
7516
|
-
* This is the arguments given to create the extension.
|
|
7517
|
-
*/
|
|
7518
|
-
|
|
7519
|
-
/**
|
|
7520
|
-
* The configuration of an extension.
|
|
7521
|
-
* This uses type as the extension manager only knows that the configuration
|
|
7522
|
-
* is an object of some sort, and doesn't know anything else about it.
|
|
7523
|
-
*/
|
|
7524
|
-
|
|
7525
|
-
/**
|
|
7526
|
-
* The parameters passed to the extension.
|
|
7527
|
-
*/
|
|
7528
|
-
|
|
7529
|
-
/**
|
|
7530
|
-
* The type of an actual extension instance.
|
|
7531
|
-
* This is an interface as it declares possible calls, but extensions can
|
|
7532
|
-
* have more values than this.
|
|
7533
|
-
*/
|
|
7534
|
-
|
|
7535
|
-
class ExtensionManager {
|
|
7536
|
-
constructor(_ref) {
|
|
7537
|
-
var _this = this;
|
|
7538
|
-
let {
|
|
7539
|
-
commandsManager,
|
|
7540
|
-
servicesManager,
|
|
7541
|
-
hotkeysManager,
|
|
7542
|
-
appConfig = {}
|
|
7543
|
-
} = _ref;
|
|
7544
|
-
this._commandsManager = void 0;
|
|
7545
|
-
this._servicesManager = void 0;
|
|
7546
|
-
this._hotkeysManager = void 0;
|
|
7547
|
-
/**
|
|
7548
|
-
* An array of extensions, or an array of arrays that contains extension
|
|
7549
|
-
* configuration pairs.
|
|
7550
|
-
*
|
|
7551
|
-
* @param {Object[]} extensions - Array of extensions
|
|
7552
|
-
*/
|
|
7553
|
-
this.registerExtensions = async function (extensions) {
|
|
7554
|
-
let dataSources = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
7555
|
-
// Todo: we ideally should be able to run registrations in parallel
|
|
7556
|
-
// but currently since some extensions need to be registered before
|
|
7557
|
-
// others, we need to run them sequentially. We need a postInit hook
|
|
7558
|
-
// to avoid this sequential async registration
|
|
7559
|
-
for (let i = 0; i < extensions.length; i++) {
|
|
7560
|
-
const extension = extensions[i];
|
|
7561
|
-
const hasConfiguration = Array.isArray(extension);
|
|
7562
|
-
try {
|
|
7563
|
-
if (hasConfiguration) {
|
|
7564
|
-
// Important: for some reason in the line below the type
|
|
7565
|
-
// of extension is not recognized as [ExtensionRegister,
|
|
7566
|
-
// ExtensionConfiguration] by babel DON"T CHANGE IT
|
|
7567
|
-
// Same for the for loop above don't use
|
|
7568
|
-
// for (const extension of extensions)
|
|
7569
|
-
const ohifExtension = extension[0];
|
|
7570
|
-
const configuration = extension[1];
|
|
7571
|
-
await _this.registerExtension(ohifExtension, configuration, dataSources);
|
|
7572
|
-
} else {
|
|
7573
|
-
await _this.registerExtension(extension, {}, dataSources);
|
|
7574
|
-
}
|
|
7575
|
-
} catch (error) {
|
|
7576
|
-
console.error(error);
|
|
7577
|
-
}
|
|
7578
|
-
}
|
|
7579
|
-
};
|
|
7580
|
-
/**
|
|
7581
|
-
*
|
|
7582
|
-
* TODO: Id Management: SopClassHandlers currently refer to viewport module by id; setting the extension id as viewport module id is a workaround for now
|
|
7583
|
-
* @param {Object} extension
|
|
7584
|
-
* @param {Object} configuration
|
|
7585
|
-
*/
|
|
7586
|
-
this.registerExtension = async function (extension) {
|
|
7587
|
-
let configuration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
7588
|
-
let dataSources = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
7589
|
-
if (!extension) {
|
|
7590
|
-
throw new Error('Attempting to register a null/undefined extension.');
|
|
7591
|
-
}
|
|
7592
|
-
const extensionId = extension.id;
|
|
7593
|
-
if (!extensionId) {
|
|
7594
|
-
// Note: Mode framework cannot function without IDs.
|
|
7595
|
-
src_log.warn(extension);
|
|
7596
|
-
throw new Error(`Extension ID not set`);
|
|
7597
|
-
}
|
|
7598
|
-
if (_this.registeredExtensionIds.includes(extensionId)) {
|
|
7599
|
-
src_log.warn(`Extension ID ${extensionId} has already been registered. Exiting before duplicating modules.`);
|
|
7600
|
-
return;
|
|
7601
|
-
}
|
|
7602
|
-
|
|
7603
|
-
// preRegistrationHook
|
|
7604
|
-
if (extension.preRegistration) {
|
|
7605
|
-
await extension.preRegistration({
|
|
7606
|
-
servicesManager: _this._servicesManager,
|
|
7607
|
-
commandsManager: _this._commandsManager,
|
|
7608
|
-
hotkeysManager: _this._hotkeysManager,
|
|
7609
|
-
extensionManager: _this,
|
|
7610
|
-
appConfig: _this._appConfig,
|
|
7611
|
-
configuration
|
|
7612
|
-
});
|
|
7613
|
-
}
|
|
7614
|
-
if (extension.onModeEnter) {
|
|
7615
|
-
_this._extensionLifeCycleHooks.onModeEnter[extensionId] = extension.onModeEnter;
|
|
7616
|
-
}
|
|
7617
|
-
if (extension.onModeExit) {
|
|
7618
|
-
_this._extensionLifeCycleHooks.onModeExit[extensionId] = extension.onModeExit;
|
|
7619
|
-
}
|
|
7620
|
-
|
|
7621
|
-
// Register Modules
|
|
7622
|
-
_this.moduleTypeNames.forEach(moduleType => {
|
|
7623
|
-
const extensionModule = _this._getExtensionModule(moduleType, extension, extensionId, configuration);
|
|
7624
|
-
if (extensionModule) {
|
|
7625
|
-
switch (moduleType) {
|
|
7626
|
-
case MODULE_TYPES.COMMANDS:
|
|
7627
|
-
_this._initCommandsModule(extensionModule);
|
|
7628
|
-
break;
|
|
7629
|
-
case MODULE_TYPES.DATA_SOURCE:
|
|
7630
|
-
_this._initDataSourcesModule(extensionModule, extensionId, dataSources);
|
|
7631
|
-
break;
|
|
7632
|
-
case MODULE_TYPES.HANGING_PROTOCOL:
|
|
7633
|
-
_this._initHangingProtocolsModule(extensionModule, extensionId);
|
|
7634
|
-
case MODULE_TYPES.TOOLBAR:
|
|
7635
|
-
case MODULE_TYPES.VIEWPORT:
|
|
7636
|
-
case MODULE_TYPES.PANEL:
|
|
7637
|
-
case MODULE_TYPES.SOP_CLASS_HANDLER:
|
|
7638
|
-
case MODULE_TYPES.CONTEXT:
|
|
7639
|
-
case MODULE_TYPES.LAYOUT_TEMPLATE:
|
|
7640
|
-
case MODULE_TYPES.CUSTOMIZATION:
|
|
7641
|
-
case MODULE_TYPES.STATE_SYNC:
|
|
7642
|
-
case MODULE_TYPES.UTILITY:
|
|
7643
|
-
// Default for most extension points,
|
|
7644
|
-
// Just adds each entry ready for consumption by mode.
|
|
7645
|
-
extensionModule.forEach(element => {
|
|
7646
|
-
if (!element.name) {
|
|
7647
|
-
throw new Error(`Extension ID ${extensionId} module ${moduleType} element has no name`);
|
|
7648
|
-
}
|
|
7649
|
-
const id = `${extensionId}.${moduleType}.${element.name}`;
|
|
7650
|
-
element.id = id;
|
|
7651
|
-
_this.modulesMap[id] = element;
|
|
7652
|
-
});
|
|
7653
|
-
break;
|
|
7654
|
-
default:
|
|
7655
|
-
throw new Error(`Module type invalid: ${moduleType}`);
|
|
7656
|
-
}
|
|
7657
|
-
_this.modules[moduleType].push({
|
|
7658
|
-
extensionId,
|
|
7659
|
-
module: extensionModule
|
|
7660
|
-
});
|
|
7661
|
-
}
|
|
7662
|
-
});
|
|
7663
|
-
|
|
7664
|
-
// Track extension registration
|
|
7665
|
-
_this.registeredExtensionIds.push(extensionId);
|
|
7666
|
-
};
|
|
7667
|
-
this.getModuleEntry = stringEntry => {
|
|
7668
|
-
return this.modulesMap[stringEntry];
|
|
7669
|
-
};
|
|
7670
|
-
this.getDataSources = dataSourceName => {
|
|
7671
|
-
if (dataSourceName === undefined) {
|
|
7672
|
-
// Default to the activeDataSource
|
|
7673
|
-
dataSourceName = this.activeDataSource;
|
|
7674
|
-
}
|
|
7675
|
-
|
|
7676
|
-
// Note: this currently uses the data source name, which feels weird...
|
|
7677
|
-
return this.dataSourceMap[dataSourceName];
|
|
7678
|
-
};
|
|
7679
|
-
this.getActiveDataSource = () => {
|
|
7680
|
-
return this.dataSourceMap[this.activeDataSource];
|
|
7681
|
-
};
|
|
7682
|
-
this.getDataSource = () => {
|
|
7683
|
-
return this.dataSourceMap[this.activeDataSource];
|
|
7684
|
-
};
|
|
7685
|
-
/**
|
|
7686
|
-
* @private
|
|
7687
|
-
* @param {string} moduleType
|
|
7688
|
-
* @param {Object} extension
|
|
7689
|
-
* @param {string} extensionId - Used for logging warnings
|
|
7690
|
-
*/
|
|
7691
|
-
this._getExtensionModule = (moduleType, extension, extensionId, configuration) => {
|
|
7692
|
-
const getModuleFnName = 'get' + _capitalizeFirstCharacter(moduleType);
|
|
7693
|
-
const getModuleFn = extension[getModuleFnName];
|
|
7694
|
-
if (!getModuleFn) {
|
|
7695
|
-
return;
|
|
7696
|
-
}
|
|
7697
|
-
try {
|
|
7698
|
-
const extensionModule = extension[getModuleFnName]({
|
|
7699
|
-
appConfig: this._appConfig,
|
|
7700
|
-
commandsManager: this._commandsManager,
|
|
7701
|
-
servicesManager: this._servicesManager,
|
|
7702
|
-
hotkeysManager: this._hotkeysManager,
|
|
7703
|
-
extensionManager: this,
|
|
7704
|
-
configuration
|
|
7705
|
-
});
|
|
7706
|
-
if (!extensionModule) {
|
|
7707
|
-
src_log.warn(`Null or undefined returned when registering the ${getModuleFnName} module for the ${extensionId} extension`);
|
|
7708
|
-
}
|
|
7709
|
-
return extensionModule;
|
|
7710
|
-
} catch (ex) {
|
|
7711
|
-
console.log(ex);
|
|
7712
|
-
throw new Error(`Exception thrown while trying to call ${getModuleFnName} for the ${extensionId} extension`);
|
|
7713
|
-
}
|
|
7714
|
-
};
|
|
7715
|
-
this._initHangingProtocolsModule = (extensionModule, extensionId) => {
|
|
7716
|
-
const {
|
|
7717
|
-
hangingProtocolService
|
|
7718
|
-
} = this._servicesManager.services;
|
|
7719
|
-
extensionModule.forEach(_ref2 => {
|
|
7720
|
-
let {
|
|
7721
|
-
name,
|
|
7722
|
-
protocol
|
|
7723
|
-
} = _ref2;
|
|
7724
|
-
if (protocol) {
|
|
7725
|
-
// Only auto-register if protocol specified, otherwise let mode register
|
|
7726
|
-
hangingProtocolService.addProtocol(name, protocol);
|
|
7727
|
-
}
|
|
7728
|
-
});
|
|
7729
|
-
};
|
|
7730
|
-
/**
|
|
7731
|
-
*
|
|
7732
|
-
* @private
|
|
7733
|
-
* @param {Object[]} commandDefinitions
|
|
7734
|
-
*/
|
|
7735
|
-
this._initCommandsModule = extensionModule => {
|
|
7736
|
-
let {
|
|
7737
|
-
definitions,
|
|
7738
|
-
defaultContext
|
|
7739
|
-
} = extensionModule;
|
|
7740
|
-
if (!definitions || Object.keys(definitions).length === 0) {
|
|
7741
|
-
src_log.warn('Commands Module contains no command definitions');
|
|
7742
|
-
return;
|
|
7743
|
-
}
|
|
7744
|
-
defaultContext = defaultContext || 'VIEWER';
|
|
7745
|
-
if (!this._commandsManager.getContext(defaultContext)) {
|
|
7746
|
-
this._commandsManager.createContext(defaultContext);
|
|
7747
|
-
}
|
|
7748
|
-
Object.keys(definitions).forEach(commandName => {
|
|
7749
|
-
const commandDefinition = definitions[commandName];
|
|
7750
|
-
const commandHasContextThatDoesNotExist = commandDefinition.context && !this._commandsManager.getContext(commandDefinition.context);
|
|
7751
|
-
if (commandHasContextThatDoesNotExist) {
|
|
7752
|
-
this._commandsManager.createContext(commandDefinition.context);
|
|
7753
|
-
}
|
|
7754
|
-
this._commandsManager.registerCommand(commandDefinition.context || defaultContext, commandName, commandDefinition);
|
|
7755
|
-
});
|
|
7756
|
-
};
|
|
7757
|
-
this.modules = {};
|
|
7758
|
-
this.registeredExtensionIds = [];
|
|
7759
|
-
this.moduleTypeNames = Object.values(MODULE_TYPES);
|
|
7760
|
-
//
|
|
7761
|
-
this._commandsManager = commandsManager;
|
|
7762
|
-
this._servicesManager = servicesManager;
|
|
7763
|
-
this._hotkeysManager = hotkeysManager;
|
|
7764
|
-
this._appConfig = appConfig;
|
|
7765
|
-
this.modulesMap = {};
|
|
7766
|
-
this.moduleTypeNames.forEach(moduleType => {
|
|
7767
|
-
this.modules[moduleType] = [];
|
|
7768
|
-
});
|
|
7769
|
-
this._extensionLifeCycleHooks = {
|
|
7770
|
-
onModeEnter: {},
|
|
7771
|
-
onModeExit: {}
|
|
7772
|
-
};
|
|
7773
|
-
this.dataSourceMap = {};
|
|
7774
|
-
this.dataSourceDefs = {};
|
|
7775
|
-
this.defaultDataSourceName = appConfig.defaultDataSourceName;
|
|
7776
|
-
this.activeDataSource = undefined;
|
|
7777
|
-
}
|
|
7778
|
-
setActiveDataSource(dataSourceName) {
|
|
7779
|
-
this.activeDataSource = dataSourceName;
|
|
7780
|
-
}
|
|
7781
|
-
|
|
7782
|
-
/**
|
|
7783
|
-
* Calls all the services and extension on mode enters.
|
|
7784
|
-
* The service onModeEnter is called first
|
|
7785
|
-
* Then registered extensions onModeEnter is called
|
|
7786
|
-
* This is supposed to setup the extension for a standard entry.
|
|
7787
|
-
*/
|
|
7788
|
-
onModeEnter() {
|
|
7789
|
-
const {
|
|
7790
|
-
registeredExtensionIds,
|
|
7791
|
-
_servicesManager,
|
|
7792
|
-
_commandsManager,
|
|
7793
|
-
_hotkeysManager,
|
|
7794
|
-
_extensionLifeCycleHooks
|
|
7795
|
-
} = this;
|
|
7796
|
-
|
|
7797
|
-
// The onModeEnter of the service must occur BEFORE the extension
|
|
7798
|
-
// onModeEnter in order to reset the state to a standard state
|
|
7799
|
-
// before the extension restores and cached data.
|
|
7800
|
-
for (const service of Object.values(_servicesManager.services)) {
|
|
7801
|
-
service?.onModeEnter?.();
|
|
7802
|
-
}
|
|
7803
|
-
registeredExtensionIds.forEach(extensionId => {
|
|
7804
|
-
const onModeEnter = _extensionLifeCycleHooks.onModeEnter[extensionId];
|
|
7805
|
-
if (typeof onModeEnter === 'function') {
|
|
7806
|
-
onModeEnter({
|
|
7807
|
-
servicesManager: _servicesManager,
|
|
7808
|
-
commandsManager: _commandsManager,
|
|
7809
|
-
hotkeysManager: _hotkeysManager
|
|
7810
|
-
});
|
|
7811
|
-
}
|
|
7812
|
-
});
|
|
7813
|
-
}
|
|
7814
|
-
onModeExit() {
|
|
7815
|
-
const {
|
|
7816
|
-
registeredExtensionIds,
|
|
7817
|
-
_servicesManager,
|
|
7818
|
-
_commandsManager,
|
|
7819
|
-
_extensionLifeCycleHooks
|
|
7820
|
-
} = this;
|
|
7821
|
-
registeredExtensionIds.forEach(extensionId => {
|
|
7822
|
-
const onModeExit = _extensionLifeCycleHooks.onModeExit[extensionId];
|
|
7823
|
-
if (typeof onModeExit === 'function') {
|
|
7824
|
-
onModeExit({
|
|
7825
|
-
servicesManager: _servicesManager,
|
|
7826
|
-
commandsManager: _commandsManager
|
|
7827
|
-
});
|
|
7828
|
-
}
|
|
7829
|
-
});
|
|
7830
|
-
|
|
7831
|
-
// The service onModeExit calls must occur after the extension ones
|
|
7832
|
-
// so that extension ones can store/restore data.
|
|
7833
|
-
for (const service of Object.values(_servicesManager.services)) {
|
|
7834
|
-
try {
|
|
7835
|
-
service?.onModeExit?.();
|
|
7836
|
-
} catch (e) {
|
|
7837
|
-
console.warn('onModeExit caught', e);
|
|
7838
|
-
}
|
|
7839
|
-
}
|
|
7840
|
-
}
|
|
7841
|
-
_initDataSourcesModule(extensionModule, extensionId) {
|
|
7842
|
-
let dataSources = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
7843
|
-
const {
|
|
7844
|
-
userAuthenticationService
|
|
7845
|
-
} = this._servicesManager.services;
|
|
7846
|
-
dataSources.forEach(dataSource => {
|
|
7847
|
-
this.dataSourceDefs[dataSource.sourceName] = dataSource;
|
|
7848
|
-
});
|
|
7849
|
-
extensionModule.forEach(element => {
|
|
7850
|
-
const namespace = `${extensionId}.${MODULE_TYPES.DATA_SOURCE}.${element.name}`;
|
|
7851
|
-
dataSources.forEach(dataSource => {
|
|
7852
|
-
if (dataSource.namespace === namespace) {
|
|
7853
|
-
const dataSourceInstance = element.createDataSource(dataSource.configuration, userAuthenticationService);
|
|
7854
|
-
if (this.dataSourceMap[dataSource.sourceName]) {
|
|
7855
|
-
this.dataSourceMap[dataSource.sourceName].push(dataSourceInstance);
|
|
7856
|
-
} else {
|
|
7857
|
-
this.dataSourceMap[dataSource.sourceName] = [dataSourceInstance];
|
|
7858
|
-
}
|
|
7859
|
-
}
|
|
7860
|
-
});
|
|
7861
|
-
});
|
|
7862
|
-
extensionModule.forEach(element => {
|
|
7863
|
-
this.modulesMap[`${extensionId}.${MODULE_TYPES.DATA_SOURCE}.${element.name}`] = element;
|
|
7864
|
-
});
|
|
7865
|
-
}
|
|
7866
|
-
}
|
|
7867
|
-
|
|
7868
|
-
/**
|
|
7869
|
-
* @private
|
|
7870
|
-
* @param {string} lower
|
|
7871
|
-
*/
|
|
7872
|
-
function _capitalizeFirstCharacter(lower) {
|
|
7873
|
-
return lower.charAt(0).toUpperCase() + lower.substring(1);
|
|
7874
|
-
}
|
|
7875
|
-
;// CONCATENATED MODULE: ../../core/src/extensions/index.js
|
|
7876
|
-
|
|
7877
|
-
|
|
7878
|
-
const DEFAULT_EXPORTS = {
|
|
7879
|
-
ExtensionManager: ExtensionManager,
|
|
7880
|
-
MODULE_TYPES: MODULE_TYPES
|
|
7881
|
-
};
|
|
7882
|
-
/* harmony default export */ const extensions = ((/* unused pure expression or super */ null && (DEFAULT_EXPORTS)));
|
|
7883
|
-
|
|
7884
7616
|
// EXTERNAL MODULE: ../../core/src/utils/guid.js
|
|
7885
7617
|
var guid = __webpack_require__(33464);
|
|
7886
7618
|
;// CONCATENATED MODULE: ../../core/src/services/_shared/pubSubServiceInterface.js
|
|
@@ -10458,23 +10190,176 @@ var validate = __webpack_require__(7315);
|
|
|
10458
10190
|
var validate_default = /*#__PURE__*/__webpack_require__.n(validate);
|
|
10459
10191
|
;// CONCATENATED MODULE: ../../core/src/services/HangingProtocolService/lib/validator.js
|
|
10460
10192
|
|
|
10461
|
-
|
|
10462
|
-
|
|
10463
|
-
|
|
10464
|
-
|
|
10193
|
+
/**
|
|
10194
|
+
* check if the value is strictly equal to options
|
|
10195
|
+
*
|
|
10196
|
+
* @example
|
|
10197
|
+
* value = ['abc', 'def', 'GHI']
|
|
10198
|
+
* testValue = 'abc' (Fail)
|
|
10199
|
+
* = ['abc'] (Fail)
|
|
10200
|
+
* = ['abc', 'def', 'GHI'] (Valid)
|
|
10201
|
+
* = ['abc', 'GHI', 'def'] (Fail)
|
|
10202
|
+
* = ['abc', 'def'] (Fail)
|
|
10203
|
+
*
|
|
10204
|
+
* value = 'Attenuation Corrected'
|
|
10205
|
+
* testValue = 'Attenuation Corrected' (Valid)
|
|
10206
|
+
* testValue = 'Attenuation' (Fail)
|
|
10207
|
+
*
|
|
10208
|
+
* value = ['Attenuation Corrected']
|
|
10209
|
+
* testValue = ['Attenuation Corrected'] (Valid)
|
|
10210
|
+
* = 'Attenuation Corrected' (Valid)
|
|
10211
|
+
* = 'Attenuation' (Fail)
|
|
10212
|
+
*
|
|
10213
|
+
* */
|
|
10214
|
+
(validate_default()).validators.equals = function (value, options, key) {
|
|
10215
|
+
const testValue = getTestValue(options);
|
|
10216
|
+
const dicomArrayValue = dicomTagToArray(value);
|
|
10217
|
+
|
|
10218
|
+
// If options is an array, then we need to validate each element in the array
|
|
10219
|
+
if (Array.isArray(testValue)) {
|
|
10220
|
+
// If the array has only one element, then we need to compare the value to that element
|
|
10221
|
+
if (testValue.length !== dicomArrayValue.length) {
|
|
10222
|
+
return `${key} must be an array of length ${testValue.length}`;
|
|
10223
|
+
} else {
|
|
10224
|
+
for (let i = 0; i < testValue.length; i++) {
|
|
10225
|
+
if (testValue[i] !== dicomArrayValue[i]) {
|
|
10226
|
+
return `${key} ${testValue[i]} must equal ${dicomArrayValue[i]}`;
|
|
10227
|
+
}
|
|
10228
|
+
}
|
|
10229
|
+
}
|
|
10230
|
+
} else if (testValue !== dicomArrayValue[0]) {
|
|
10231
|
+
return `${key} must equal ${testValue}`;
|
|
10465
10232
|
}
|
|
10466
10233
|
};
|
|
10234
|
+
/**
|
|
10235
|
+
* check if the value is not equal to options
|
|
10236
|
+
*
|
|
10237
|
+
* @example
|
|
10238
|
+
* value = ['abc', 'def', 'GHI']
|
|
10239
|
+
* testValue = 'abc' (Valid)
|
|
10240
|
+
* = ['abc'] (Valid)
|
|
10241
|
+
* = ['abc', 'def', 'GHI'] (Fail)
|
|
10242
|
+
* = ['abc', 'GHI', 'def'] (Valid)
|
|
10243
|
+
* = ['abc', 'def'] (Valid)
|
|
10244
|
+
*
|
|
10245
|
+
* value = 'Attenuation Corrected'
|
|
10246
|
+
* = 'Attenuation Corrected' (Fail)
|
|
10247
|
+
* = 'Attenuation' (Valid)
|
|
10248
|
+
*
|
|
10249
|
+
* value = ['Attenuation Corrected']
|
|
10250
|
+
* testValue = ['Attenuation Corrected'] (Fail)
|
|
10251
|
+
* = 'Attenuation Corrected' (Fail)
|
|
10252
|
+
* = 'Attenuation' (Fail)
|
|
10253
|
+
* */
|
|
10467
10254
|
(validate_default()).validators.doesNotEqual = function (value, options, key) {
|
|
10468
|
-
const testValue = options
|
|
10469
|
-
|
|
10470
|
-
|
|
10255
|
+
const testValue = getTestValue(options);
|
|
10256
|
+
const dicomArrayValue = dicomTagToArray(value);
|
|
10257
|
+
if (Array.isArray(testValue)) {
|
|
10258
|
+
if (testValue.length === dicomArrayValue.length) {
|
|
10259
|
+
let score = 0;
|
|
10260
|
+
testValue.forEach((x, i) => {
|
|
10261
|
+
if (x === dicomArrayValue[i]) {
|
|
10262
|
+
score++;
|
|
10263
|
+
}
|
|
10264
|
+
});
|
|
10265
|
+
if (score === testValue.length) {
|
|
10266
|
+
return `${key} must not equal to ${testValue}`;
|
|
10267
|
+
}
|
|
10268
|
+
}
|
|
10269
|
+
} else if (testValue === dicomArrayValue[0]) {
|
|
10270
|
+
console.debug(dicomArrayValue, testValue);
|
|
10271
|
+
return `${key} must not equal to ${testValue}`;
|
|
10471
10272
|
}
|
|
10472
10273
|
};
|
|
10473
10274
|
|
|
10275
|
+
/**
|
|
10276
|
+
* Check if a value includes one or more specified options.
|
|
10277
|
+
*
|
|
10278
|
+
* @example
|
|
10279
|
+
* value = ['abc', 'def', 'GHI']
|
|
10280
|
+
* testValue = ‘abc’ (Fail)
|
|
10281
|
+
* = ‘dog’ (Fail)
|
|
10282
|
+
* = [‘abc’] (Valid)
|
|
10283
|
+
* = [‘att’, ‘abc’] (Valid)
|
|
10284
|
+
* = ['abc', 'def', 'dog'] (Valid)
|
|
10285
|
+
* = ['cat', 'dog'] (Fail)
|
|
10286
|
+
*
|
|
10287
|
+
* value = ['Attenuation Corrected']
|
|
10288
|
+
* testValue = 'Attenuation Corrected' (Fail)
|
|
10289
|
+
* = ['Attenuation Corrected', 'Corrected'] (Valid)
|
|
10290
|
+
* = ['Attenuation', 'Corrected'] (Fail)
|
|
10291
|
+
*
|
|
10292
|
+
* value = 'Attenuation Corrected'
|
|
10293
|
+
* testValue = ['Attenuation Corrected', 'Corrected'] (Valid)
|
|
10294
|
+
* = ['Attenuation', 'Corrected'] (Fail)
|
|
10295
|
+
* */
|
|
10296
|
+
(validate_default()).validators.includes = function (value, options, key) {
|
|
10297
|
+
const testValue = getTestValue(options);
|
|
10298
|
+
const dicomArrayValue = dicomTagToArray(value);
|
|
10299
|
+
if (Array.isArray(testValue)) {
|
|
10300
|
+
const includedValues = testValue.filter(el => dicomArrayValue.includes(el));
|
|
10301
|
+
if (includedValues.length === 0) {
|
|
10302
|
+
return `${key} must include at least one of the following values: ${testValue.join(', ')}`;
|
|
10303
|
+
}
|
|
10304
|
+
} else return `${key} ${testValue} must be an array`;
|
|
10305
|
+
// else if (!value.includes(testValue)) {
|
|
10306
|
+
// return `${key} ${value} must include ${testValue}`;
|
|
10307
|
+
// }
|
|
10308
|
+
};
|
|
10309
|
+
/**
|
|
10310
|
+
* Check if a value does not include one or more specified options.
|
|
10311
|
+
*
|
|
10312
|
+
* @example
|
|
10313
|
+
* value = ['abc', 'def', 'GHI']
|
|
10314
|
+
* testValue = ['Corr'] (Valid)
|
|
10315
|
+
* = 'abc' (Fail)
|
|
10316
|
+
* = ['abc'] (Fail)
|
|
10317
|
+
* = [‘att’, ‘cor’] (Valid)
|
|
10318
|
+
* = ['abc', 'def', 'dog'] (Fail)
|
|
10319
|
+
*
|
|
10320
|
+
* value = ['Attenuation Corrected']
|
|
10321
|
+
* testValue = 'Attenuation Corrected' (Fail)
|
|
10322
|
+
* = ['Attenuation Corrected', 'Corrected'] (Fail)
|
|
10323
|
+
* = ['Attenuation', 'Corrected'] (Valid)
|
|
10324
|
+
*
|
|
10325
|
+
* value = 'Attenuation Corrected'
|
|
10326
|
+
* testValue = ['Attenuation Corrected', 'Corrected'] (Fail)
|
|
10327
|
+
* = ['Attenuation', 'Corrected'] (Valid)
|
|
10328
|
+
* */
|
|
10329
|
+
(validate_default()).validators.doesNotInclude = function (value, options, key) {
|
|
10330
|
+
const testValue = getTestValue(options);
|
|
10331
|
+
const dicomArrayValue = dicomTagToArray(value);
|
|
10332
|
+
|
|
10333
|
+
// if (!Array.isArray(value) || value.length === 1) {
|
|
10334
|
+
// return `${key} is not allowed as a single value`;
|
|
10335
|
+
// }
|
|
10336
|
+
if (Array.isArray(testValue)) {
|
|
10337
|
+
const includedValues = testValue.filter(el => dicomArrayValue.includes(el));
|
|
10338
|
+
if (includedValues.length > 0) {
|
|
10339
|
+
return `${key} must not include the following value: ${includedValues}`;
|
|
10340
|
+
}
|
|
10341
|
+
} else return `${key} ${testValue} must be an array`;
|
|
10342
|
+
};
|
|
10474
10343
|
// Ignore case contains.
|
|
10475
10344
|
// options testValue MUST be in lower case already, otherwise it won't match
|
|
10345
|
+
/**
|
|
10346
|
+
* @example
|
|
10347
|
+
* value = 'Attenuation Corrected'
|
|
10348
|
+
* testValue = ‘Corr’ (Valid)
|
|
10349
|
+
* = ‘corr’ (Valid)
|
|
10350
|
+
* = [‘att’, ‘cor’] (Valid)
|
|
10351
|
+
* = [‘Att’, ‘Wall’] (Valid)
|
|
10352
|
+
* = [‘cat’, ‘dog’] (Fail)
|
|
10353
|
+
*
|
|
10354
|
+
* value = ['abc', 'def', 'GHI']
|
|
10355
|
+
* testValue = 'def' (Valid)
|
|
10356
|
+
* = 'dog' (Fail)
|
|
10357
|
+
* = ['gh', 'de'] (Valid)
|
|
10358
|
+
* = ['cat', 'dog'] (Fail)
|
|
10359
|
+
*
|
|
10360
|
+
* */
|
|
10476
10361
|
(validate_default()).validators.containsI = function (value, options, key) {
|
|
10477
|
-
const testValue = options
|
|
10362
|
+
const testValue = getTestValue(options);
|
|
10478
10363
|
if (Array.isArray(value)) {
|
|
10479
10364
|
if (value.some(item => !validate_default().validators.containsI(item.toLowerCase(), options, key))) {
|
|
10480
10365
|
return undefined;
|
|
@@ -10482,17 +10367,33 @@ var validate_default = /*#__PURE__*/__webpack_require__.n(validate);
|
|
|
10482
10367
|
return `No item of ${value.join(',')} contains ${JSON.stringify(testValue)}`;
|
|
10483
10368
|
}
|
|
10484
10369
|
if (Array.isArray(testValue)) {
|
|
10485
|
-
if (testValue.some(subTest => !validate_default().validators.containsI(value, subTest, key))) {
|
|
10370
|
+
if (testValue.some(subTest => !validate_default().validators.containsI(value, subTest.toLowerCase(), key))) {
|
|
10486
10371
|
return;
|
|
10487
10372
|
}
|
|
10488
10373
|
return `${key} must contain at least one of ${testValue.join(',')}`;
|
|
10489
10374
|
}
|
|
10490
|
-
if (testValue && value.indexOf && value.toLowerCase().indexOf(testValue) === -1) {
|
|
10375
|
+
if (testValue && value.indexOf && value.toLowerCase().indexOf(testValue.toLowerCase()) === -1) {
|
|
10491
10376
|
return key + 'must contain any case of' + testValue;
|
|
10492
10377
|
}
|
|
10493
10378
|
};
|
|
10379
|
+
/**
|
|
10380
|
+
* @example
|
|
10381
|
+
* value = 'Attenuation Corrected'
|
|
10382
|
+
* testValue = ‘Corr’ (Valid)
|
|
10383
|
+
* = ‘corr’ (Fail)
|
|
10384
|
+
* = [‘att’, ‘cor’] (Fail)
|
|
10385
|
+
* = [‘Att’, ‘Wall’] (Valid)
|
|
10386
|
+
* = [‘cat’, ‘dog’] (Fail)
|
|
10387
|
+
*
|
|
10388
|
+
* value = ['abc', 'def', 'GHI']
|
|
10389
|
+
* testValue = 'def' (Valid)
|
|
10390
|
+
* = 'dog' (Fail)
|
|
10391
|
+
* = ['cat', 'de'] (Valid)
|
|
10392
|
+
* = ['cat', 'dog'] (Fail)
|
|
10393
|
+
*
|
|
10394
|
+
* */
|
|
10494
10395
|
(validate_default()).validators.contains = function (value, options, key) {
|
|
10495
|
-
const testValue = options
|
|
10396
|
+
const testValue = getTestValue(options);
|
|
10496
10397
|
if (Array.isArray(value)) {
|
|
10497
10398
|
if (value.some(item => !validate_default().validators.contains(item, options, key))) {
|
|
10498
10399
|
return undefined;
|
|
@@ -10509,35 +10410,231 @@ var validate_default = /*#__PURE__*/__webpack_require__.n(validate);
|
|
|
10509
10410
|
return key + 'must contain ' + testValue;
|
|
10510
10411
|
}
|
|
10511
10412
|
};
|
|
10413
|
+
/**
|
|
10414
|
+
* @example
|
|
10415
|
+
* value = 'Attenuation Corrected'
|
|
10416
|
+
* testValue = ‘Corr’ (Fail)
|
|
10417
|
+
* = ‘corr’ (Valid)
|
|
10418
|
+
* = [‘att’, ‘cor’] (Valid)
|
|
10419
|
+
* = [‘Att’, ‘Wall’] (Fail)
|
|
10420
|
+
* = [‘cat’, ‘dog’] (Valid)
|
|
10421
|
+
*
|
|
10422
|
+
* value = ['abc', 'def', 'GHI']
|
|
10423
|
+
* testValue = 'def' (Fail)
|
|
10424
|
+
* = 'dog' (Valid)
|
|
10425
|
+
* = ['cat', 'de'] (Fail)
|
|
10426
|
+
* = ['cat', 'dog'] (Valid)
|
|
10427
|
+
*
|
|
10428
|
+
* */
|
|
10512
10429
|
(validate_default()).validators.doesNotContain = function (value, options, key) {
|
|
10513
|
-
|
|
10514
|
-
|
|
10430
|
+
const containsResult = validate_default().validators.contains(value, options, key);
|
|
10431
|
+
if (!containsResult) {
|
|
10432
|
+
return `No item of ${value} should contain ${getTestValue(options)}`;
|
|
10433
|
+
}
|
|
10434
|
+
};
|
|
10435
|
+
|
|
10436
|
+
/**
|
|
10437
|
+
* @example
|
|
10438
|
+
* value = 'Attenuation Corrected'
|
|
10439
|
+
* testValue = ‘Corr’ (Fail)
|
|
10440
|
+
* = ‘corr’ (Fail)
|
|
10441
|
+
* = [‘att’, ‘cor’] (Fail)
|
|
10442
|
+
* = [‘Att’, ‘Wall’] (Fail)
|
|
10443
|
+
* = [‘cat’, ‘dog’] (Valid)
|
|
10444
|
+
*
|
|
10445
|
+
* value = ['abc', 'def', 'GHI']
|
|
10446
|
+
* testValue = 'DEF' (Fail)
|
|
10447
|
+
* = 'dog' (Valid)
|
|
10448
|
+
* = ['cat', 'gh'] (Fail)
|
|
10449
|
+
* = ['cat', 'dog'] (Valid)
|
|
10450
|
+
*
|
|
10451
|
+
* */
|
|
10452
|
+
(validate_default()).validators.doesNotContainI = function (value, options, key) {
|
|
10453
|
+
const containsResult = validate_default().validators.containsI(value, options, key);
|
|
10454
|
+
if (!containsResult) {
|
|
10455
|
+
return `No item of ${value} should not contain ${getTestValue(options)}`;
|
|
10515
10456
|
}
|
|
10516
10457
|
};
|
|
10458
|
+
/**
|
|
10459
|
+
* @example
|
|
10460
|
+
* value = 'Attenuation Corrected'
|
|
10461
|
+
* testValue = ‘Corr’ (Fail)
|
|
10462
|
+
* = ‘Att’ (Fail)
|
|
10463
|
+
* = ['cat', 'dog', 'Att'] (Valid)
|
|
10464
|
+
* = [‘cat’, ‘dog’] (Fail)
|
|
10465
|
+
*
|
|
10466
|
+
* value = ['abc', 'def', 'GHI']
|
|
10467
|
+
* testValue = 'deg' (Valid)
|
|
10468
|
+
* = ['cat', 'GH'] (Valid)
|
|
10469
|
+
* = ['cat', 'gh'] (Fail)
|
|
10470
|
+
* = ['cat', 'dog'] (Fail)
|
|
10471
|
+
*
|
|
10472
|
+
* */
|
|
10517
10473
|
(validate_default()).validators.startsWith = function (value, options, key) {
|
|
10518
|
-
|
|
10519
|
-
|
|
10474
|
+
let testValues = getTestValue(options);
|
|
10475
|
+
if (typeof testValues === 'string') {
|
|
10476
|
+
testValues = [testValues];
|
|
10477
|
+
}
|
|
10478
|
+
if (typeof value === 'string') {
|
|
10479
|
+
if (!testValues.some(testValue => value.startsWith(testValue))) {
|
|
10480
|
+
return key + ' must start with any of these values: ' + testValues;
|
|
10481
|
+
}
|
|
10482
|
+
} else if (Array.isArray(value)) {
|
|
10483
|
+
let valid = false;
|
|
10484
|
+
for (let i = 0; i < value.length; i++) {
|
|
10485
|
+
for (let j = 0; j < testValues.length; j++) {
|
|
10486
|
+
if (value[i].startsWith(testValues[j])) {
|
|
10487
|
+
valid = true; // set valid flag to true if a match is found
|
|
10488
|
+
break;
|
|
10489
|
+
}
|
|
10490
|
+
}
|
|
10491
|
+
if (valid) {
|
|
10492
|
+
return undefined; // break out of loop if a match is found
|
|
10493
|
+
}
|
|
10494
|
+
}
|
|
10495
|
+
|
|
10496
|
+
if (!valid) {
|
|
10497
|
+
return key + ' must start with any of these values: ' + testValues; // return undefined if no match is found
|
|
10498
|
+
}
|
|
10499
|
+
} else {
|
|
10500
|
+
return 'Value must be a string or an array';
|
|
10520
10501
|
}
|
|
10521
10502
|
};
|
|
10503
|
+
|
|
10504
|
+
/**
|
|
10505
|
+
* @example
|
|
10506
|
+
* value = 'Attenuation Corrected'
|
|
10507
|
+
* testValue = ‘TED’ (Fail)
|
|
10508
|
+
* = ‘ted’ (Valid)
|
|
10509
|
+
* = ['cat', 'dog', 'ted'] (Valid)
|
|
10510
|
+
* = [‘cat’, ‘dog’] (Fail)
|
|
10511
|
+
*
|
|
10512
|
+
* value = ['abc', 'def', 'GHI']
|
|
10513
|
+
* testValue = 'deg' (Valid)
|
|
10514
|
+
* = ['cat', 'HI'] (Valid)
|
|
10515
|
+
* = ['cat', 'hi'] (Fail)
|
|
10516
|
+
* = ['cat', 'dog'] (Fail)
|
|
10517
|
+
*
|
|
10518
|
+
* */
|
|
10522
10519
|
(validate_default()).validators.endsWith = function (value, options, key) {
|
|
10523
|
-
|
|
10524
|
-
|
|
10520
|
+
let testValues = getTestValue(options);
|
|
10521
|
+
if (typeof testValues === 'string') {
|
|
10522
|
+
testValues = [testValues];
|
|
10523
|
+
}
|
|
10524
|
+
if (typeof value === 'string') {
|
|
10525
|
+
if (!testValues.some(testValue => value.endsWith(testValue))) {
|
|
10526
|
+
return key + ' must end with any of these values: ' + testValues;
|
|
10527
|
+
}
|
|
10528
|
+
} else if (Array.isArray(value)) {
|
|
10529
|
+
let valid = false;
|
|
10530
|
+
for (let i = 0; i < value.length; i++) {
|
|
10531
|
+
for (let j = 0; j < testValues.length; j++) {
|
|
10532
|
+
if (value[i].endsWith(testValues[j])) {
|
|
10533
|
+
valid = true; // set valid flag to true if a match is found
|
|
10534
|
+
break;
|
|
10535
|
+
}
|
|
10536
|
+
}
|
|
10537
|
+
if (valid) {
|
|
10538
|
+
return undefined; // break out of loop if a match is found
|
|
10539
|
+
}
|
|
10540
|
+
}
|
|
10541
|
+
|
|
10542
|
+
if (!valid) {
|
|
10543
|
+
return key + ' must end with any of these values: ' + testValues; // return undefined if no match is found
|
|
10544
|
+
}
|
|
10545
|
+
} else {
|
|
10546
|
+
return key + ' must be a string or an array';
|
|
10525
10547
|
}
|
|
10526
10548
|
};
|
|
10527
|
-
|
|
10549
|
+
/**
|
|
10550
|
+
* @example
|
|
10551
|
+
* value = 30
|
|
10552
|
+
* testValue = 20 (Valid)
|
|
10553
|
+
* = 40 (Fail)
|
|
10554
|
+
*
|
|
10555
|
+
* */
|
|
10528
10556
|
(validate_default()).validators.greaterThan = function (value, options, key) {
|
|
10529
10557
|
const testValue = getTestValue(options);
|
|
10530
|
-
if (value
|
|
10531
|
-
return key
|
|
10558
|
+
if (Array.isArray(value) || typeof value === 'string') {
|
|
10559
|
+
return `${key} is not allowed as an array or string`;
|
|
10560
|
+
}
|
|
10561
|
+
if (Array.isArray(testValue)) {
|
|
10562
|
+
if (testValue.length === 1) {
|
|
10563
|
+
if (!(value >= testValue[0])) {
|
|
10564
|
+
return `${key} must be greater than or equal to ${testValue[0]}, but was ${value}`;
|
|
10565
|
+
}
|
|
10566
|
+
} else if (testValue.length > 1) {
|
|
10567
|
+
return key + ' must be an array of length 1';
|
|
10568
|
+
}
|
|
10569
|
+
} else {
|
|
10570
|
+
if (!(value >= testValue)) {
|
|
10571
|
+
return key + ' must be greater than ' + testValue;
|
|
10572
|
+
}
|
|
10532
10573
|
}
|
|
10533
10574
|
};
|
|
10534
|
-
|
|
10575
|
+
/**
|
|
10576
|
+
* @example
|
|
10577
|
+
* value = 30
|
|
10578
|
+
* testValue = 40 (Valid)
|
|
10579
|
+
* = 20 (Fail)
|
|
10580
|
+
*
|
|
10581
|
+
* */
|
|
10582
|
+
(validate_default()).validators.lessThan = function (value, options, key) {
|
|
10535
10583
|
const testValue = getTestValue(options);
|
|
10536
|
-
if (
|
|
10537
|
-
|
|
10584
|
+
if (Array.isArray(testValue)) {
|
|
10585
|
+
if (testValue.length === 1) {
|
|
10586
|
+
if (!(value <= testValue[0])) {
|
|
10587
|
+
return `${key} must be less than or equal to ${testValue[0]}, but was ${value}`;
|
|
10588
|
+
}
|
|
10589
|
+
} else if (testValue.length > 1) {
|
|
10590
|
+
return key + ' must be an array of length 1';
|
|
10591
|
+
}
|
|
10592
|
+
} else {
|
|
10593
|
+
if (!(value <= testValue)) {
|
|
10594
|
+
return key + ' must be less than ' + testValue;
|
|
10595
|
+
}
|
|
10538
10596
|
}
|
|
10539
10597
|
};
|
|
10598
|
+
/**
|
|
10599
|
+
* @example
|
|
10600
|
+
|
|
10601
|
+
*
|
|
10602
|
+
* value = 50
|
|
10603
|
+
* testValue = [10,60] (Valid)
|
|
10604
|
+
* = [60, 10] (Valid)
|
|
10605
|
+
* = [0, 10] (Fail)
|
|
10606
|
+
* = [70, 80] (Fail)
|
|
10607
|
+
* = 45 (Fail)
|
|
10608
|
+
* = [45] (Fail)
|
|
10609
|
+
*
|
|
10610
|
+
* */
|
|
10611
|
+
(validate_default()).validators.range = function (value, options, key) {
|
|
10612
|
+
const testValue = getTestValue(options);
|
|
10613
|
+
if (Array.isArray(testValue) && testValue.length === 2) {
|
|
10614
|
+
const min = Math.min(testValue[0], testValue[1]);
|
|
10615
|
+
const max = Math.max(testValue[0], testValue[1]);
|
|
10616
|
+
if (value === undefined || value < min || value > max) {
|
|
10617
|
+
return `${key} with value ${value} must be between ${min} and ${max}`;
|
|
10618
|
+
}
|
|
10619
|
+
} else return `${key} must be an array of length 2`;
|
|
10620
|
+
};
|
|
10540
10621
|
(validate_default()).validators.notNull = value => value === null || value === undefined ? 'Value is null' : undefined;
|
|
10622
|
+
const getTestValue = options => {
|
|
10623
|
+
if (Array.isArray(options)) {
|
|
10624
|
+
return options.map(option => option?.value ?? option);
|
|
10625
|
+
} else {
|
|
10626
|
+
return options?.value ?? options;
|
|
10627
|
+
}
|
|
10628
|
+
};
|
|
10629
|
+
const dicomTagToArray = value => {
|
|
10630
|
+
let dicomArrayValue;
|
|
10631
|
+
if (!Array.isArray(value)) {
|
|
10632
|
+
dicomArrayValue = [value];
|
|
10633
|
+
} else {
|
|
10634
|
+
dicomArrayValue = [...value];
|
|
10635
|
+
}
|
|
10636
|
+
return dicomArrayValue;
|
|
10637
|
+
};
|
|
10541
10638
|
/* harmony default export */ const validator = ((validate_default()));
|
|
10542
10639
|
;// CONCATENATED MODULE: ../../core/src/services/HangingProtocolService/HPMatcher.js
|
|
10543
10640
|
|
|
@@ -11404,7 +11501,8 @@ var moment_default = /*#__PURE__*/__webpack_require__.n(moment);
|
|
|
11404
11501
|
*/
|
|
11405
11502
|
/* harmony default export */ const formatDate = (function (date) {
|
|
11406
11503
|
let format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'DD-MMM-YYYY';
|
|
11407
|
-
|
|
11504
|
+
// moment(undefined) returns the current date, so return the empty string instead
|
|
11505
|
+
return date ? moment_default()(date).format(format) : '';
|
|
11408
11506
|
});
|
|
11409
11507
|
;// CONCATENATED MODULE: ../../core/src/utils/formatPN.js
|
|
11410
11508
|
/**
|
|
@@ -11426,6 +11524,58 @@ function formatPN(name) {
|
|
|
11426
11524
|
// Trim any extraneous whitespace
|
|
11427
11525
|
return cleaned.trim();
|
|
11428
11526
|
}
|
|
11527
|
+
;// CONCATENATED MODULE: ../../core/src/utils/generateAcceptHeader.ts
|
|
11528
|
+
const generateAcceptHeader = function () {
|
|
11529
|
+
let configAcceptHeader = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
11530
|
+
let requestTransferSyntaxUID = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
11531
|
+
let omitQuotationForMultipartRequest = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
11532
|
+
//if acceptedHeader is passed by config use it as it.
|
|
11533
|
+
if (configAcceptHeader.length > 0) {
|
|
11534
|
+
return configAcceptHeader;
|
|
11535
|
+
}
|
|
11536
|
+
let acceptHeader = ['multipart/related'];
|
|
11537
|
+
if (requestTransferSyntaxUID && typeForTS[requestTransferSyntaxUID]) {
|
|
11538
|
+
const type = typeForTS[requestTransferSyntaxUID];
|
|
11539
|
+
acceptHeader.push('type=' + type);
|
|
11540
|
+
acceptHeader.push('transfer-syntax=' + requestTransferSyntaxUID);
|
|
11541
|
+
} else {
|
|
11542
|
+
acceptHeader.push('type=application/octet-stream');
|
|
11543
|
+
}
|
|
11544
|
+
if (!omitQuotationForMultipartRequest) {
|
|
11545
|
+
//need to add quotation for each mime type of each accept entry
|
|
11546
|
+
acceptHeader = acceptHeader.map(mime => {
|
|
11547
|
+
if (mime.startsWith('type=')) {
|
|
11548
|
+
const quotedParam = 'type="' + mime.substring(5, mime.length) + '"';
|
|
11549
|
+
return quotedParam;
|
|
11550
|
+
}
|
|
11551
|
+
if (mime.startsWith('transfer-syntax=')) {
|
|
11552
|
+
const quotedParam = 'transfer-syntax="' + mime.substring(16, mime.length) + '"';
|
|
11553
|
+
return quotedParam;
|
|
11554
|
+
} else {
|
|
11555
|
+
return mime;
|
|
11556
|
+
}
|
|
11557
|
+
});
|
|
11558
|
+
}
|
|
11559
|
+
return [acceptHeader.join('; ')];
|
|
11560
|
+
};
|
|
11561
|
+
const typeForTS = {
|
|
11562
|
+
'*': 'application/octet-stream',
|
|
11563
|
+
'1.2.840.10008.1.2.1': 'application/octet-stream',
|
|
11564
|
+
'1.2.840.10008.1.2': 'application/octet-stream',
|
|
11565
|
+
'1.2.840.10008.1.2.2': 'application/octet-stream',
|
|
11566
|
+
'1.2.840.10008.1.2.4.70': 'image/jpeg',
|
|
11567
|
+
'1.2.840.10008.1.2.4.50': 'image/jpeg',
|
|
11568
|
+
'1.2.840.10008.1.2.4.51': 'image/dicom+jpeg',
|
|
11569
|
+
'1.2.840.10008.1.2.4.57': 'image/jpeg',
|
|
11570
|
+
'1.2.840.10008.1.2.5': 'image/dicom-rle',
|
|
11571
|
+
'1.2.840.10008.1.2.4.80': 'image/jls',
|
|
11572
|
+
'1.2.840.10008.1.2.4.81': 'image/jls',
|
|
11573
|
+
'1.2.840.10008.1.2.4.90': 'image/jp2',
|
|
11574
|
+
'1.2.840.10008.1.2.4.91': 'image/jp2',
|
|
11575
|
+
'1.2.840.10008.1.2.4.92': 'image/jpx',
|
|
11576
|
+
'1.2.840.10008.1.2.4.93': 'image/jpx'
|
|
11577
|
+
};
|
|
11578
|
+
/* harmony default export */ const utils_generateAcceptHeader = (generateAcceptHeader);
|
|
11429
11579
|
;// CONCATENATED MODULE: ../../core/src/utils/resolveObjectPath.js
|
|
11430
11580
|
function resolveObjectPath(root, path, defaultValue) {
|
|
11431
11581
|
if (root !== null && typeof root === 'object' && typeof path === 'string') {
|
|
@@ -12194,6 +12344,7 @@ const getSplitParam = function (lowerCaseKey) {
|
|
|
12194
12344
|
|
|
12195
12345
|
|
|
12196
12346
|
|
|
12347
|
+
|
|
12197
12348
|
|
|
12198
12349
|
|
|
12199
12350
|
// Commented out unused functionality.
|
|
@@ -12234,7 +12385,8 @@ const utils = {
|
|
|
12234
12385
|
downloadCSVReport: downloadCSVReport,
|
|
12235
12386
|
subscribeToNextViewportGridChange: subscribeToNextViewportGridChange,
|
|
12236
12387
|
splitComma: splitComma,
|
|
12237
|
-
getSplitParam: getSplitParam
|
|
12388
|
+
getSplitParam: getSplitParam,
|
|
12389
|
+
generateAcceptHeader: utils_generateAcceptHeader
|
|
12238
12390
|
};
|
|
12239
12391
|
|
|
12240
12392
|
/* harmony default export */ const src_utils = (utils);
|
|
@@ -12842,10 +12994,13 @@ class HangingProtocolService extends PubSubService {
|
|
|
12842
12994
|
const {
|
|
12843
12995
|
id
|
|
12844
12996
|
} = displaySet;
|
|
12997
|
+
const displaySetMatchDetail = displaySetMatchDetails.get(id);
|
|
12845
12998
|
const {
|
|
12846
12999
|
displaySetInstanceUID: oldDisplaySetInstanceUID
|
|
12847
|
-
} =
|
|
12848
|
-
|
|
13000
|
+
} = displaySetMatchDetail;
|
|
13001
|
+
const displaySetInstanceUID = displaySet.id === displaySetSelectorId ? newDisplaySetInstanceUID : oldDisplaySetInstanceUID;
|
|
13002
|
+
displaySetMatchDetail.displaySetInstanceUID = displaySetInstanceUID;
|
|
13003
|
+
displaySetInstanceUIDs.push(displaySetInstanceUID);
|
|
12849
13004
|
displaySetOptions.push(displaySet);
|
|
12850
13005
|
});
|
|
12851
13006
|
}
|
|
@@ -13405,6 +13560,7 @@ class HangingProtocolService extends PubSubService {
|
|
|
13405
13560
|
const studyMatchDetails = this.protocolEngine.findMatch(study, studyMatchingRules, {
|
|
13406
13561
|
studies: this.studies,
|
|
13407
13562
|
displaySets: studyDisplaySets,
|
|
13563
|
+
allDisplaySets: this.displaySets,
|
|
13408
13564
|
displaySetMatchDetails: this.displaySetMatchDetails
|
|
13409
13565
|
});
|
|
13410
13566
|
|
|
@@ -14085,6 +14241,450 @@ PanelService.REGISTRATION = {
|
|
|
14085
14241
|
|
|
14086
14242
|
|
|
14087
14243
|
|
|
14244
|
+
;// CONCATENATED MODULE: ../../core/src/extensions/ExtensionManager.ts
|
|
14245
|
+
|
|
14246
|
+
|
|
14247
|
+
|
|
14248
|
+
|
|
14249
|
+
/**
|
|
14250
|
+
* This is the arguments given to create the extension.
|
|
14251
|
+
*/
|
|
14252
|
+
|
|
14253
|
+
/**
|
|
14254
|
+
* The configuration of an extension.
|
|
14255
|
+
* This uses type as the extension manager only knows that the configuration
|
|
14256
|
+
* is an object of some sort, and doesn't know anything else about it.
|
|
14257
|
+
*/
|
|
14258
|
+
|
|
14259
|
+
/**
|
|
14260
|
+
* The parameters passed to the extension.
|
|
14261
|
+
*/
|
|
14262
|
+
|
|
14263
|
+
/**
|
|
14264
|
+
* The type of an actual extension instance.
|
|
14265
|
+
* This is an interface as it declares possible calls, but extensions can
|
|
14266
|
+
* have more values than this.
|
|
14267
|
+
*/
|
|
14268
|
+
|
|
14269
|
+
class ExtensionManager extends PubSubService {
|
|
14270
|
+
constructor(_ref) {
|
|
14271
|
+
var _this;
|
|
14272
|
+
let {
|
|
14273
|
+
commandsManager,
|
|
14274
|
+
servicesManager,
|
|
14275
|
+
hotkeysManager,
|
|
14276
|
+
appConfig = {}
|
|
14277
|
+
} = _ref;
|
|
14278
|
+
super(ExtensionManager.EVENTS);
|
|
14279
|
+
_this = this;
|
|
14280
|
+
this._commandsManager = void 0;
|
|
14281
|
+
this._servicesManager = void 0;
|
|
14282
|
+
this._hotkeysManager = void 0;
|
|
14283
|
+
/**
|
|
14284
|
+
* An array of extensions, or an array of arrays that contains extension
|
|
14285
|
+
* configuration pairs.
|
|
14286
|
+
*
|
|
14287
|
+
* @param {Object[]} extensions - Array of extensions
|
|
14288
|
+
*/
|
|
14289
|
+
this.registerExtensions = async function (extensions) {
|
|
14290
|
+
let dataSources = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
14291
|
+
// Todo: we ideally should be able to run registrations in parallel
|
|
14292
|
+
// but currently since some extensions need to be registered before
|
|
14293
|
+
// others, we need to run them sequentially. We need a postInit hook
|
|
14294
|
+
// to avoid this sequential async registration
|
|
14295
|
+
for (let i = 0; i < extensions.length; i++) {
|
|
14296
|
+
const extension = extensions[i];
|
|
14297
|
+
const hasConfiguration = Array.isArray(extension);
|
|
14298
|
+
try {
|
|
14299
|
+
if (hasConfiguration) {
|
|
14300
|
+
// Important: for some reason in the line below the type
|
|
14301
|
+
// of extension is not recognized as [ExtensionRegister,
|
|
14302
|
+
// ExtensionConfiguration] by babel DON"T CHANGE IT
|
|
14303
|
+
// Same for the for loop above don't use
|
|
14304
|
+
// for (const extension of extensions)
|
|
14305
|
+
const ohifExtension = extension[0];
|
|
14306
|
+
const configuration = extension[1];
|
|
14307
|
+
await _this.registerExtension(ohifExtension, configuration, dataSources);
|
|
14308
|
+
} else {
|
|
14309
|
+
await _this.registerExtension(extension, {}, dataSources);
|
|
14310
|
+
}
|
|
14311
|
+
} catch (error) {
|
|
14312
|
+
console.error(error);
|
|
14313
|
+
}
|
|
14314
|
+
}
|
|
14315
|
+
};
|
|
14316
|
+
/**
|
|
14317
|
+
*
|
|
14318
|
+
* TODO: Id Management: SopClassHandlers currently refer to viewport module by id; setting the extension id as viewport module id is a workaround for now
|
|
14319
|
+
* @param {Object} extension
|
|
14320
|
+
* @param {Object} configuration
|
|
14321
|
+
*/
|
|
14322
|
+
this.registerExtension = async function (extension) {
|
|
14323
|
+
let configuration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
14324
|
+
let dataSources = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
14325
|
+
if (!extension) {
|
|
14326
|
+
throw new Error('Attempting to register a null/undefined extension.');
|
|
14327
|
+
}
|
|
14328
|
+
const extensionId = extension.id;
|
|
14329
|
+
if (!extensionId) {
|
|
14330
|
+
// Note: Mode framework cannot function without IDs.
|
|
14331
|
+
src_log.warn(extension);
|
|
14332
|
+
throw new Error(`Extension ID not set`);
|
|
14333
|
+
}
|
|
14334
|
+
if (_this.registeredExtensionIds.includes(extensionId)) {
|
|
14335
|
+
src_log.warn(`Extension ID ${extensionId} has already been registered. Exiting before duplicating modules.`);
|
|
14336
|
+
return;
|
|
14337
|
+
}
|
|
14338
|
+
|
|
14339
|
+
// preRegistrationHook
|
|
14340
|
+
if (extension.preRegistration) {
|
|
14341
|
+
await extension.preRegistration({
|
|
14342
|
+
servicesManager: _this._servicesManager,
|
|
14343
|
+
commandsManager: _this._commandsManager,
|
|
14344
|
+
hotkeysManager: _this._hotkeysManager,
|
|
14345
|
+
extensionManager: _this,
|
|
14346
|
+
appConfig: _this._appConfig,
|
|
14347
|
+
configuration
|
|
14348
|
+
});
|
|
14349
|
+
}
|
|
14350
|
+
if (extension.onModeEnter) {
|
|
14351
|
+
_this._extensionLifeCycleHooks.onModeEnter[extensionId] = extension.onModeEnter;
|
|
14352
|
+
}
|
|
14353
|
+
if (extension.onModeExit) {
|
|
14354
|
+
_this._extensionLifeCycleHooks.onModeExit[extensionId] = extension.onModeExit;
|
|
14355
|
+
}
|
|
14356
|
+
|
|
14357
|
+
// Register Modules
|
|
14358
|
+
_this.moduleTypeNames.forEach(moduleType => {
|
|
14359
|
+
const extensionModule = _this._getExtensionModule(moduleType, extension, extensionId, configuration);
|
|
14360
|
+
if (extensionModule) {
|
|
14361
|
+
switch (moduleType) {
|
|
14362
|
+
case MODULE_TYPES.COMMANDS:
|
|
14363
|
+
_this._initCommandsModule(extensionModule);
|
|
14364
|
+
break;
|
|
14365
|
+
case MODULE_TYPES.DATA_SOURCE:
|
|
14366
|
+
_this._initDataSourcesModule(extensionModule, extensionId, dataSources);
|
|
14367
|
+
break;
|
|
14368
|
+
case MODULE_TYPES.HANGING_PROTOCOL:
|
|
14369
|
+
_this._initHangingProtocolsModule(extensionModule, extensionId);
|
|
14370
|
+
case MODULE_TYPES.TOOLBAR:
|
|
14371
|
+
case MODULE_TYPES.VIEWPORT:
|
|
14372
|
+
case MODULE_TYPES.PANEL:
|
|
14373
|
+
case MODULE_TYPES.SOP_CLASS_HANDLER:
|
|
14374
|
+
case MODULE_TYPES.CONTEXT:
|
|
14375
|
+
case MODULE_TYPES.LAYOUT_TEMPLATE:
|
|
14376
|
+
case MODULE_TYPES.CUSTOMIZATION:
|
|
14377
|
+
case MODULE_TYPES.STATE_SYNC:
|
|
14378
|
+
case MODULE_TYPES.UTILITY:
|
|
14379
|
+
// Default for most extension points,
|
|
14380
|
+
// Just adds each entry ready for consumption by mode.
|
|
14381
|
+
extensionModule.forEach(element => {
|
|
14382
|
+
if (!element.name) {
|
|
14383
|
+
throw new Error(`Extension ID ${extensionId} module ${moduleType} element has no name`);
|
|
14384
|
+
}
|
|
14385
|
+
const id = `${extensionId}.${moduleType}.${element.name}`;
|
|
14386
|
+
element.id = id;
|
|
14387
|
+
_this.modulesMap[id] = element;
|
|
14388
|
+
});
|
|
14389
|
+
break;
|
|
14390
|
+
default:
|
|
14391
|
+
throw new Error(`Module type invalid: ${moduleType}`);
|
|
14392
|
+
}
|
|
14393
|
+
_this.modules[moduleType].push({
|
|
14394
|
+
extensionId,
|
|
14395
|
+
module: extensionModule
|
|
14396
|
+
});
|
|
14397
|
+
}
|
|
14398
|
+
});
|
|
14399
|
+
|
|
14400
|
+
// Track extension registration
|
|
14401
|
+
_this.registeredExtensionIds.push(extensionId);
|
|
14402
|
+
};
|
|
14403
|
+
this.getModuleEntry = stringEntry => {
|
|
14404
|
+
return this.modulesMap[stringEntry];
|
|
14405
|
+
};
|
|
14406
|
+
this.getDataSources = dataSourceName => {
|
|
14407
|
+
if (dataSourceName === undefined) {
|
|
14408
|
+
// Default to the activeDataSource
|
|
14409
|
+
dataSourceName = this.activeDataSource;
|
|
14410
|
+
}
|
|
14411
|
+
|
|
14412
|
+
// Note: this currently uses the data source name, which feels weird...
|
|
14413
|
+
return this.dataSourceMap[dataSourceName];
|
|
14414
|
+
};
|
|
14415
|
+
this.getActiveDataSource = () => {
|
|
14416
|
+
return this.dataSourceMap[this.activeDataSource];
|
|
14417
|
+
};
|
|
14418
|
+
/**
|
|
14419
|
+
* Gets the data source definition for the given data source name.
|
|
14420
|
+
* If no data source name is provided, the active data source definition is
|
|
14421
|
+
* returned.
|
|
14422
|
+
* @param dataSourceName the data source name
|
|
14423
|
+
* @returns the data source definition
|
|
14424
|
+
*/
|
|
14425
|
+
this.getDataSourceDef = dataSourceName => {
|
|
14426
|
+
if (dataSourceName === undefined) {
|
|
14427
|
+
// Default to the activeDataSource
|
|
14428
|
+
dataSourceName = this.activeDataSource;
|
|
14429
|
+
}
|
|
14430
|
+
return this.dataSourceDefs[dataSourceName];
|
|
14431
|
+
};
|
|
14432
|
+
/**
|
|
14433
|
+
* @private
|
|
14434
|
+
* @param {string} moduleType
|
|
14435
|
+
* @param {Object} extension
|
|
14436
|
+
* @param {string} extensionId - Used for logging warnings
|
|
14437
|
+
*/
|
|
14438
|
+
this._getExtensionModule = (moduleType, extension, extensionId, configuration) => {
|
|
14439
|
+
const getModuleFnName = 'get' + _capitalizeFirstCharacter(moduleType);
|
|
14440
|
+
const getModuleFn = extension[getModuleFnName];
|
|
14441
|
+
if (!getModuleFn) {
|
|
14442
|
+
return;
|
|
14443
|
+
}
|
|
14444
|
+
try {
|
|
14445
|
+
const extensionModule = extension[getModuleFnName]({
|
|
14446
|
+
appConfig: this._appConfig,
|
|
14447
|
+
commandsManager: this._commandsManager,
|
|
14448
|
+
servicesManager: this._servicesManager,
|
|
14449
|
+
hotkeysManager: this._hotkeysManager,
|
|
14450
|
+
extensionManager: this,
|
|
14451
|
+
configuration
|
|
14452
|
+
});
|
|
14453
|
+
if (!extensionModule) {
|
|
14454
|
+
src_log.warn(`Null or undefined returned when registering the ${getModuleFnName} module for the ${extensionId} extension`);
|
|
14455
|
+
}
|
|
14456
|
+
return extensionModule;
|
|
14457
|
+
} catch (ex) {
|
|
14458
|
+
console.log(ex);
|
|
14459
|
+
throw new Error(`Exception thrown while trying to call ${getModuleFnName} for the ${extensionId} extension`);
|
|
14460
|
+
}
|
|
14461
|
+
};
|
|
14462
|
+
this._initHangingProtocolsModule = (extensionModule, extensionId) => {
|
|
14463
|
+
const {
|
|
14464
|
+
hangingProtocolService
|
|
14465
|
+
} = this._servicesManager.services;
|
|
14466
|
+
extensionModule.forEach(_ref2 => {
|
|
14467
|
+
let {
|
|
14468
|
+
name,
|
|
14469
|
+
protocol
|
|
14470
|
+
} = _ref2;
|
|
14471
|
+
if (protocol) {
|
|
14472
|
+
// Only auto-register if protocol specified, otherwise let mode register
|
|
14473
|
+
hangingProtocolService.addProtocol(name, protocol);
|
|
14474
|
+
}
|
|
14475
|
+
});
|
|
14476
|
+
};
|
|
14477
|
+
/**
|
|
14478
|
+
*
|
|
14479
|
+
* @private
|
|
14480
|
+
* @param {Object[]} commandDefinitions
|
|
14481
|
+
*/
|
|
14482
|
+
this._initCommandsModule = extensionModule => {
|
|
14483
|
+
let {
|
|
14484
|
+
definitions,
|
|
14485
|
+
defaultContext
|
|
14486
|
+
} = extensionModule;
|
|
14487
|
+
if (!definitions || Object.keys(definitions).length === 0) {
|
|
14488
|
+
src_log.warn('Commands Module contains no command definitions');
|
|
14489
|
+
return;
|
|
14490
|
+
}
|
|
14491
|
+
defaultContext = defaultContext || 'VIEWER';
|
|
14492
|
+
if (!this._commandsManager.getContext(defaultContext)) {
|
|
14493
|
+
this._commandsManager.createContext(defaultContext);
|
|
14494
|
+
}
|
|
14495
|
+
Object.keys(definitions).forEach(commandName => {
|
|
14496
|
+
const commandDefinition = definitions[commandName];
|
|
14497
|
+
const commandHasContextThatDoesNotExist = commandDefinition.context && !this._commandsManager.getContext(commandDefinition.context);
|
|
14498
|
+
if (commandHasContextThatDoesNotExist) {
|
|
14499
|
+
this._commandsManager.createContext(commandDefinition.context);
|
|
14500
|
+
}
|
|
14501
|
+
this._commandsManager.registerCommand(commandDefinition.context || defaultContext, commandName, commandDefinition);
|
|
14502
|
+
});
|
|
14503
|
+
};
|
|
14504
|
+
this.modules = {};
|
|
14505
|
+
this.registeredExtensionIds = [];
|
|
14506
|
+
this.moduleTypeNames = Object.values(MODULE_TYPES);
|
|
14507
|
+
//
|
|
14508
|
+
this._commandsManager = commandsManager;
|
|
14509
|
+
this._servicesManager = servicesManager;
|
|
14510
|
+
this._hotkeysManager = hotkeysManager;
|
|
14511
|
+
this._appConfig = appConfig;
|
|
14512
|
+
this.modulesMap = {};
|
|
14513
|
+
this.moduleTypeNames.forEach(moduleType => {
|
|
14514
|
+
this.modules[moduleType] = [];
|
|
14515
|
+
});
|
|
14516
|
+
this._extensionLifeCycleHooks = {
|
|
14517
|
+
onModeEnter: {},
|
|
14518
|
+
onModeExit: {}
|
|
14519
|
+
};
|
|
14520
|
+
this.dataSourceMap = {};
|
|
14521
|
+
this.dataSourceDefs = {};
|
|
14522
|
+
this.defaultDataSourceName = appConfig.defaultDataSourceName;
|
|
14523
|
+
this.activeDataSource = appConfig.defaultDataSourceName;
|
|
14524
|
+
}
|
|
14525
|
+
setActiveDataSource(dataSource) {
|
|
14526
|
+
if (this.activeDataSource === dataSource) {
|
|
14527
|
+
return;
|
|
14528
|
+
}
|
|
14529
|
+
this.activeDataSource = dataSource;
|
|
14530
|
+
this._broadcastEvent(ExtensionManager.EVENTS.ACTIVE_DATA_SOURCE_CHANGED, this.dataSourceDefs[this.activeDataSource]);
|
|
14531
|
+
}
|
|
14532
|
+
|
|
14533
|
+
/**
|
|
14534
|
+
* Calls all the services and extension on mode enters.
|
|
14535
|
+
* The service onModeEnter is called first
|
|
14536
|
+
* Then registered extensions onModeEnter is called
|
|
14537
|
+
* This is supposed to setup the extension for a standard entry.
|
|
14538
|
+
*/
|
|
14539
|
+
onModeEnter() {
|
|
14540
|
+
const {
|
|
14541
|
+
registeredExtensionIds,
|
|
14542
|
+
_servicesManager,
|
|
14543
|
+
_commandsManager,
|
|
14544
|
+
_hotkeysManager,
|
|
14545
|
+
_extensionLifeCycleHooks
|
|
14546
|
+
} = this;
|
|
14547
|
+
|
|
14548
|
+
// The onModeEnter of the service must occur BEFORE the extension
|
|
14549
|
+
// onModeEnter in order to reset the state to a standard state
|
|
14550
|
+
// before the extension restores and cached data.
|
|
14551
|
+
for (const service of Object.values(_servicesManager.services)) {
|
|
14552
|
+
service?.onModeEnter?.();
|
|
14553
|
+
}
|
|
14554
|
+
registeredExtensionIds.forEach(extensionId => {
|
|
14555
|
+
const onModeEnter = _extensionLifeCycleHooks.onModeEnter[extensionId];
|
|
14556
|
+
if (typeof onModeEnter === 'function') {
|
|
14557
|
+
onModeEnter({
|
|
14558
|
+
servicesManager: _servicesManager,
|
|
14559
|
+
commandsManager: _commandsManager,
|
|
14560
|
+
hotkeysManager: _hotkeysManager
|
|
14561
|
+
});
|
|
14562
|
+
}
|
|
14563
|
+
});
|
|
14564
|
+
}
|
|
14565
|
+
onModeExit() {
|
|
14566
|
+
const {
|
|
14567
|
+
registeredExtensionIds,
|
|
14568
|
+
_servicesManager,
|
|
14569
|
+
_commandsManager,
|
|
14570
|
+
_extensionLifeCycleHooks
|
|
14571
|
+
} = this;
|
|
14572
|
+
registeredExtensionIds.forEach(extensionId => {
|
|
14573
|
+
const onModeExit = _extensionLifeCycleHooks.onModeExit[extensionId];
|
|
14574
|
+
if (typeof onModeExit === 'function') {
|
|
14575
|
+
onModeExit({
|
|
14576
|
+
servicesManager: _servicesManager,
|
|
14577
|
+
commandsManager: _commandsManager
|
|
14578
|
+
});
|
|
14579
|
+
}
|
|
14580
|
+
});
|
|
14581
|
+
|
|
14582
|
+
// The service onModeExit calls must occur after the extension ones
|
|
14583
|
+
// so that extension ones can store/restore data.
|
|
14584
|
+
for (const service of Object.values(_servicesManager.services)) {
|
|
14585
|
+
try {
|
|
14586
|
+
service?.onModeExit?.();
|
|
14587
|
+
} catch (e) {
|
|
14588
|
+
console.warn('onModeExit caught', e);
|
|
14589
|
+
}
|
|
14590
|
+
}
|
|
14591
|
+
}
|
|
14592
|
+
/**
|
|
14593
|
+
* Adds the given data source and optionally sets it as the active data source.
|
|
14594
|
+
* The method does this by first creating the data source.
|
|
14595
|
+
* @param dataSourceDef the data source definition to be added
|
|
14596
|
+
* @param activate flag to indicate if the added data source should be set to the active data source
|
|
14597
|
+
*/
|
|
14598
|
+
addDataSource(dataSourceDef) {
|
|
14599
|
+
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
14600
|
+
activate: false
|
|
14601
|
+
};
|
|
14602
|
+
const existingDataSource = this.getDataSources(dataSourceDef.sourceName);
|
|
14603
|
+
if (existingDataSource?.[0]) {
|
|
14604
|
+
// The data source already exists and cannot be added.
|
|
14605
|
+
return;
|
|
14606
|
+
}
|
|
14607
|
+
this._createDataSourceInstance(dataSourceDef);
|
|
14608
|
+
if (options.activate) {
|
|
14609
|
+
this.setActiveDataSource(dataSourceDef.sourceName);
|
|
14610
|
+
}
|
|
14611
|
+
}
|
|
14612
|
+
|
|
14613
|
+
/**
|
|
14614
|
+
* Updates the configuration of the given data source name. It first creates a new data source with
|
|
14615
|
+
* the existing definition and the new configuration passed in.
|
|
14616
|
+
* @param dataSourceName the name of the data source to update
|
|
14617
|
+
* @param dataSourceConfiguration the new configuration to update the data source with
|
|
14618
|
+
*/
|
|
14619
|
+
updateDataSourceConfiguration(dataSourceName, dataSourceConfiguration) {
|
|
14620
|
+
const existingDataSource = this.getDataSources(dataSourceName);
|
|
14621
|
+
if (!existingDataSource?.[0]) {
|
|
14622
|
+
// Cannot update a non existent data source.
|
|
14623
|
+
return;
|
|
14624
|
+
}
|
|
14625
|
+
const dataSourceDef = this.dataSourceDefs[dataSourceName];
|
|
14626
|
+
// Update the configuration.
|
|
14627
|
+
dataSourceDef.configuration = dataSourceConfiguration;
|
|
14628
|
+
this._createDataSourceInstance(dataSourceDef);
|
|
14629
|
+
if (this.activeDataSource === dataSourceName) {
|
|
14630
|
+
// When the active data source is changed/set, fire an event to indicate that its configuration has changed.
|
|
14631
|
+
this._broadcastEvent(ExtensionManager.EVENTS.ACTIVE_DATA_SOURCE_CHANGED, dataSourceDef);
|
|
14632
|
+
}
|
|
14633
|
+
}
|
|
14634
|
+
|
|
14635
|
+
/**
|
|
14636
|
+
* Creates a data source instance from the given definition. The definition is
|
|
14637
|
+
* added to dataSourceDefs and the created instance is added to dataSourceMap.
|
|
14638
|
+
* @param dataSourceDef
|
|
14639
|
+
* @returns
|
|
14640
|
+
*/
|
|
14641
|
+
_createDataSourceInstance(dataSourceDef) {
|
|
14642
|
+
const module = this.getModuleEntry(dataSourceDef.namespace);
|
|
14643
|
+
if (!module) {
|
|
14644
|
+
return;
|
|
14645
|
+
}
|
|
14646
|
+
this.dataSourceDefs[dataSourceDef.sourceName] = dataSourceDef;
|
|
14647
|
+
const {
|
|
14648
|
+
userAuthenticationService
|
|
14649
|
+
} = this._servicesManager.services;
|
|
14650
|
+
const dataSourceInstance = module.createDataSource(dataSourceDef.configuration, userAuthenticationService);
|
|
14651
|
+
this.dataSourceMap[dataSourceDef.sourceName] = [dataSourceInstance];
|
|
14652
|
+
}
|
|
14653
|
+
_initDataSourcesModule(extensionModule, extensionId) {
|
|
14654
|
+
let dataSources = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
14655
|
+
extensionModule.forEach(element => {
|
|
14656
|
+
this.modulesMap[`${extensionId}.${MODULE_TYPES.DATA_SOURCE}.${element.name}`] = element;
|
|
14657
|
+
});
|
|
14658
|
+
extensionModule.forEach(element => {
|
|
14659
|
+
const namespace = `${extensionId}.${MODULE_TYPES.DATA_SOURCE}.${element.name}`;
|
|
14660
|
+
dataSources.forEach(dataSource => {
|
|
14661
|
+
if (dataSource.namespace === namespace) {
|
|
14662
|
+
this.addDataSource(dataSource);
|
|
14663
|
+
}
|
|
14664
|
+
});
|
|
14665
|
+
});
|
|
14666
|
+
}
|
|
14667
|
+
}
|
|
14668
|
+
|
|
14669
|
+
/**
|
|
14670
|
+
* @private
|
|
14671
|
+
* @param {string} lower
|
|
14672
|
+
*/
|
|
14673
|
+
ExtensionManager.EVENTS = {
|
|
14674
|
+
ACTIVE_DATA_SOURCE_CHANGED: 'event::activedatasourcechanged'
|
|
14675
|
+
};
|
|
14676
|
+
function _capitalizeFirstCharacter(lower) {
|
|
14677
|
+
return lower.charAt(0).toUpperCase() + lower.substring(1);
|
|
14678
|
+
}
|
|
14679
|
+
;// CONCATENATED MODULE: ../../core/src/extensions/index.js
|
|
14680
|
+
|
|
14681
|
+
|
|
14682
|
+
const DEFAULT_EXPORTS = {
|
|
14683
|
+
ExtensionManager: ExtensionManager,
|
|
14684
|
+
MODULE_TYPES: MODULE_TYPES
|
|
14685
|
+
};
|
|
14686
|
+
/* harmony default export */ const extensions = ((/* unused pure expression or super */ null && (DEFAULT_EXPORTS)));
|
|
14687
|
+
|
|
14088
14688
|
;// CONCATENATED MODULE: ../../core/src/classes/CommandsManager.ts
|
|
14089
14689
|
|
|
14090
14690
|
/**
|
|
@@ -14771,8 +15371,8 @@ const combineFrameInstance = (frame, instance) => {
|
|
|
14771
15371
|
} = instance;
|
|
14772
15372
|
if (PerFrameFunctionalGroupsSequence || NumberOfFrames > 1) {
|
|
14773
15373
|
const frameNumber = Number.parseInt(frame || 1);
|
|
14774
|
-
const shared = (SharedFunctionalGroupsSequence ? Object.values(SharedFunctionalGroupsSequence[0]) : []).map(it => it[0]).filter(it => it !== undefined && typeof it === 'object');
|
|
14775
|
-
const perFrame = (PerFrameFunctionalGroupsSequence ? Object.values(PerFrameFunctionalGroupsSequence[frameNumber - 1]) : []).map(it => it[0]).filter(it => it !== undefined && typeof it === 'object');
|
|
15374
|
+
const shared = (SharedFunctionalGroupsSequence ? Object.values(SharedFunctionalGroupsSequence[0]) : []).filter(it => !!it).map(it => it[0]).filter(it => it !== undefined && typeof it === 'object');
|
|
15375
|
+
const perFrame = (PerFrameFunctionalGroupsSequence ? Object.values(PerFrameFunctionalGroupsSequence[frameNumber - 1]) : []).filter(it => !!it).map(it => it[0]).filter(it => it !== undefined && typeof it === 'object');
|
|
14776
15376
|
|
|
14777
15377
|
// this is to fix NM multiframe datasets with position and orientation
|
|
14778
15378
|
// information inside DetectorInformationSequence
|
|
@@ -15137,6 +15737,13 @@ class MetadataProvider {
|
|
|
15137
15737
|
frameTime: instance.FrameTime
|
|
15138
15738
|
};
|
|
15139
15739
|
break;
|
|
15740
|
+
case WADO_IMAGE_LOADER_TAGS.PER_SERIES_MODULE:
|
|
15741
|
+
metadata = {
|
|
15742
|
+
correctedImage: instance.CorrectedImage,
|
|
15743
|
+
units: instance.Units,
|
|
15744
|
+
decayCorrection: instance.DecayCorrection
|
|
15745
|
+
};
|
|
15746
|
+
break;
|
|
15140
15747
|
default:
|
|
15141
15748
|
return;
|
|
15142
15749
|
}
|
|
@@ -15235,6 +15842,7 @@ const WADO_IMAGE_LOADER_TAGS = {
|
|
|
15235
15842
|
MODALITY_LUT_MODULE: 'modalityLutModule',
|
|
15236
15843
|
SOP_COMMON_MODULE: 'sopCommonModule',
|
|
15237
15844
|
PET_ISOTOPE_MODULE: 'petIsotopeModule',
|
|
15845
|
+
PER_SERIES_MODULE: 'petSeriesModule',
|
|
15238
15846
|
OVERLAY_PLANE_MODULE: 'overlayPlaneModule',
|
|
15239
15847
|
PATIENT_DEMOGRAPHIC_MODULE: 'patientDemographicModule',
|
|
15240
15848
|
// react-cornerstone-viewport specifc
|
|
@@ -15783,27 +16391,34 @@ const bindings = [{
|
|
|
15783
16391
|
commandOptions: windowLevelPresets[5],
|
|
15784
16392
|
label: 'W/L Preset 5',
|
|
15785
16393
|
keys: ['5']
|
|
15786
|
-
}
|
|
15787
|
-
|
|
15788
|
-
|
|
15789
|
-
|
|
15790
|
-
|
|
15791
|
-
|
|
15792
|
-
|
|
15793
|
-
|
|
15794
|
-
|
|
15795
|
-
|
|
15796
|
-
|
|
15797
|
-
|
|
15798
|
-
|
|
15799
|
-
|
|
15800
|
-
|
|
15801
|
-
|
|
15802
|
-
|
|
15803
|
-
|
|
15804
|
-
|
|
15805
|
-
|
|
15806
|
-
|
|
16394
|
+
}
|
|
16395
|
+
// These don't exist, so don't try applying them....
|
|
16396
|
+
// {
|
|
16397
|
+
// commandName: 'setWindowLevel',
|
|
16398
|
+
// commandOptions: windowLevelPresets[6],
|
|
16399
|
+
// label: 'W/L Preset 6',
|
|
16400
|
+
// keys: ['6'],
|
|
16401
|
+
// },
|
|
16402
|
+
// {
|
|
16403
|
+
// commandName: 'setWindowLevel',
|
|
16404
|
+
// commandOptions: windowLevelPresets[7],
|
|
16405
|
+
// label: 'W/L Preset 7',
|
|
16406
|
+
// keys: ['7'],
|
|
16407
|
+
// },
|
|
16408
|
+
// {
|
|
16409
|
+
// commandName: 'setWindowLevel',
|
|
16410
|
+
// commandOptions: windowLevelPresets[8],
|
|
16411
|
+
// label: 'W/L Preset 8',
|
|
16412
|
+
// keys: ['8'],
|
|
16413
|
+
// },
|
|
16414
|
+
// {
|
|
16415
|
+
// commandName: 'setWindowLevel',
|
|
16416
|
+
// commandOptions: windowLevelPresets[9],
|
|
16417
|
+
// label: 'W/L Preset 9',
|
|
16418
|
+
// keys: ['9'],
|
|
16419
|
+
// },
|
|
16420
|
+
];
|
|
16421
|
+
|
|
15807
16422
|
/* harmony default export */ const hotkeyBindings = (bindings);
|
|
15808
16423
|
;// CONCATENATED MODULE: ../../core/src/defaults/index.js
|
|
15809
16424
|
|
|
@@ -15818,6 +16433,9 @@ const bindings = [{
|
|
|
15818
16433
|
|
|
15819
16434
|
// EXTERNAL MODULE: ../../core/src/classes/Hotkey.ts
|
|
15820
16435
|
var Hotkey = __webpack_require__(57374);
|
|
16436
|
+
;// CONCATENATED MODULE: ../../core/src/types/DataSource.ts
|
|
16437
|
+
|
|
16438
|
+
|
|
15821
16439
|
;// CONCATENATED MODULE: ../../core/src/services/CustomizationService/types.ts
|
|
15822
16440
|
|
|
15823
16441
|
|
|
@@ -15848,6 +16466,7 @@ var IPubSub = __webpack_require__(98844);
|
|
|
15848
16466
|
|
|
15849
16467
|
|
|
15850
16468
|
|
|
16469
|
+
|
|
15851
16470
|
// Separate out some generic types
|
|
15852
16471
|
|
|
15853
16472
|
|
|
@@ -15885,7 +16504,8 @@ function create(_ref) {
|
|
|
15885
16504
|
deleteStudyMetadataPromise,
|
|
15886
16505
|
getImageIdsForDisplaySet,
|
|
15887
16506
|
getImageIdsForInstance,
|
|
15888
|
-
getConfig
|
|
16507
|
+
getConfig,
|
|
16508
|
+
getStudyInstanceUIDs
|
|
15889
16509
|
} = _ref;
|
|
15890
16510
|
const defaultQuery = {
|
|
15891
16511
|
studies: {
|
|
@@ -15931,7 +16551,8 @@ function create(_ref) {
|
|
|
15931
16551
|
deleteStudyMetadataPromise,
|
|
15932
16552
|
getImageIdsForDisplaySet,
|
|
15933
16553
|
getImageIdsForInstance,
|
|
15934
|
-
getConfig: getConfig || defaultGetConfig
|
|
16554
|
+
getConfig: getConfig || defaultGetConfig,
|
|
16555
|
+
getStudyInstanceUIDs: getStudyInstanceUIDs
|
|
15935
16556
|
};
|
|
15936
16557
|
}
|
|
15937
16558
|
const IWebApiDataSource = {
|
|
@@ -19929,7 +20550,7 @@ const detectionOptions = {
|
|
|
19929
20550
|
}
|
|
19930
20551
|
});
|
|
19931
20552
|
;// CONCATENATED MODULE: ../../i18n/package.json
|
|
19932
|
-
const package_namespaceObject = JSON.parse('{"i8":"3.7.0-beta.
|
|
20553
|
+
const package_namespaceObject = JSON.parse('{"i8":"3.7.0-beta.39"}');
|
|
19933
20554
|
;// CONCATENATED MODULE: ../../i18n/src/utils.js
|
|
19934
20555
|
const languagesMap = {
|
|
19935
20556
|
ar: 'Arabic',
|
|
@@ -20015,11 +20636,11 @@ const UserPreferencesModal_namespaceObject = JSON.parse('{"No hotkeys found":"Ne
|
|
|
20015
20636
|
;// CONCATENATED MODULE: ../../i18n/src/locales/en-US/AboutModal.json
|
|
20016
20637
|
const AboutModal_namespaceObject = JSON.parse('{"Browser":"Browser","Build Number":"Build Number","Latest Master Commits":"Latest Master Commits","More details":"More details","Name":"Name","OHIF Viewer - About":"OHIF Viewer - About","OS":"OS","Report an issue":"Report an issue","Repository URL":"Repository URL","Value":"Value","Version Information":"Version Information","Visit the forum":"Visit the forum"}');
|
|
20017
20638
|
;// CONCATENATED MODULE: ../../i18n/src/locales/en-US/Buttons.json
|
|
20018
|
-
const Buttons_namespaceObject = JSON.parse('{"Acquired":"Acquired","Angle":"Angle","Axial":"Axial","Bidirectional":"Bidirectional","Brush":"Brush","CINE":"CINE","Cancel":"Cancel","Circle":"Circle","Clear":"Clear","Coronal":"Coronal","Crosshairs":"Crosshairs","Download":"Download","Ellipse":"Ellipse","Elliptical":"Elliptical","Flip H":"Flip H","Flip V":"Flip V","Freehand":"Freehand","Invert":"Invert","Layout":"$t(Common:Layout)","Length":"Length","Levels":"Levels","Magnify":"Magnify","Manual":"Manual","Measurements":"Measurements","More":"$t(Common:More)","Next":"$t(Common:Next)","Pan":"Pan","Play":"$t(Common:Play)","Previous":"$t(Common:Previous)","Probe":"Probe","ROI Window":"ROI Window","Rectangle":"Rectangle","Reset":"$t(Common:Reset)","Reset to Defaults":"$t(Common:Reset) to Defaults","Rotate Right":"Rotate Right","Sagittal":"Sagittal","Save":"Save","Stack Scroll":"Stack Scroll","Stop":"$t(Common:Stop)","Themes":"Themes","Zoom":"Zoom"}');
|
|
20639
|
+
const Buttons_namespaceObject = JSON.parse('{"Acquired":"Acquired","Angle":"Angle","Annotation":"Annotation","Axial":"Axial","Bidirectional":"Bidirectional","Brush":"Brush","Cine":"Cine","CINE":"CINE","Cancel":"Cancel","Capture":"Capture","Circle":"Circle","Clear":"Clear","Coronal":"Coronal","Crosshairs":"Crosshairs","Download":"Download","Ellipse":"Ellipse","Elliptical":"Elliptical","Flip H":"Flip H","Flip Horizontally":"Flip Horizontally","Flip V":"Flip V","Freehand":"Freehand","Grid Layout":"Grid Layout","Invert":"Invert","Layout":"$t(Common:Layout)","Length":"Length","Levels":"Levels","Magnify":"Magnify","Manual":"Manual","Measurements":"Measurements","More":"$t(Common:More)","More Tools":"More Tools","Next":"$t(Common:Next)","Pan":"Pan","Play":"$t(Common:Play)","Previous":"$t(Common:Previous)","Probe":"Probe","ROI Window":"ROI Window","Rectangle":"Rectangle","Reference Lines":"Reference Lines","Reset":"$t(Common:Reset)","Reset to Defaults":"$t(Common:Reset) to Defaults","Rotate Right":"Rotate Right","Sagittal":"Sagittal","Save":"Save","Stack Scroll":"Stack Scroll","Stack Image Sync":"Stack Image Sync","Stop":"$t(Common:Stop)","Themes":"Themes","Zoom":"Zoom"}');
|
|
20019
20640
|
;// CONCATENATED MODULE: ../../i18n/src/locales/en-US/CineDialog.json
|
|
20020
20641
|
const CineDialog_namespaceObject = JSON.parse('{"Next image":"$t(Common:Next) $t(Common:Image)","Play / Stop":"$t(Common:Play) / $t(Common:Stop)","Previous image":"$t(Common:Previous) $t(Common:Image)","Skip to first image":"Skip to first $t(Common:Image)","Skip to last image":"Skip to last $t(Common:Image)","fps":"fps"}');
|
|
20021
20642
|
;// CONCATENATED MODULE: ../../i18n/src/locales/en-US/Common.json
|
|
20022
|
-
const Common_namespaceObject = JSON.parse('{"Close":"Close","Image":"Image","Layout":"Layout","LOAD":"LOAD","Measurements":"Measurements","More":"More","Next":"Next","Play":"Play","Previous":"Previous","Reset":"Reset","RowsPerPage":"rows per page","Series":"Series","Show":"Show","Stop":"Stop","StudyDate":"Study Date"}');
|
|
20643
|
+
const Common_namespaceObject = JSON.parse('{"Close":"Close","Image":"Image","Layout":"Layout","LOAD":"LOAD","Measurements":"Measurements","More":"More","Next":"Next","NoStudyDate":"No Study Date","Play":"Play","Previous":"Previous","Reset":"Reset","RowsPerPage":"rows per page","Series":"Series","Show":"Show","Stop":"Stop","StudyDate":"Study Date"}');
|
|
20023
20644
|
;// CONCATENATED MODULE: ../../i18n/src/locales/en-US/DatePicker.json
|
|
20024
20645
|
const DatePicker_namespaceObject = JSON.parse('{"Clear dates":"Clear dates","End Date":"End Date","Start Date":"Start Date"}');
|
|
20025
20646
|
;// CONCATENATED MODULE: ../../i18n/src/locales/en-US/Header.json
|
|
@@ -20252,7 +20873,7 @@ const vi_UserPreferencesModal_namespaceObject = JSON.parse('{"Cancel":"$t(Button
|
|
|
20252
20873
|
}
|
|
20253
20874
|
});
|
|
20254
20875
|
;// CONCATENATED MODULE: ../../i18n/src/locales/zh/Buttons.json
|
|
20255
|
-
const zh_Buttons_namespaceObject = JSON.parse('{"Acquired":"已获取","Angle":"角度","Axial":"轴状面","Bidirectional":"双向","Brush":"橡皮擦","CINE":"播放动画","Cancel":"取消","Circle":"圆","Clear":"清除","Coronal":"冠状面","Crosshairs":"十字线","Ellipse":"椭圆","Elliptical":"椭圆的","Flip H":"左右翻转","Flip V":"上下翻转","Freehand":"自由画线","Invert":"灰度反转","Layout":"显示窗口","Length":"长度","Levels":"层级","Magnify":"放大镜","Manual":"手动","Measurements":"测量","More":"更多","Next":"下一个","Pan":"移动","Play":"播放","Previous":"上一个","Probe":"探针","ROI Window":"选择对比度","Rectangle":"矩形","Reset":"复原","Reset to Defaults":"返回默认","Rotate Right":"顺时针旋转","Sagittal":"矢状面","Save":"保存","Stack Scroll":"滑动切换图层","Stop":"停止","Themes":"主题","Zoom":"放大"}');
|
|
20876
|
+
const zh_Buttons_namespaceObject = JSON.parse('{"Acquired":"已获取","Angle":"角度","Annotation":"注释","Axial":"轴状面","Bidirectional":"双向","Brush":"橡皮擦","Cine":"播放动画","CINE":"播放动画","Cancel":"取消","Capture":"下载","Circle":"圆","Clear":"清除","Coronal":"冠状面","Crosshairs":"十字线","Ellipse":"椭圆","Elliptical":"椭圆的","Flip H":"左右翻转","Flip Horizontally":"左右翻转","Flip V":"上下翻转","Freehand":"自由画线","Grid Layout":"窗口布局","Invert":"灰度反转","Layout":"显示窗口","Length":"长度","Levels":"层级","Magnify":"放大镜","Manual":"手动","Measurements":"测量","More":"更多","More Tools":"更多工具","More Measure Tools":"更多测量工具","Next":"下一个","Pan":"移动","Play":"播放","Previous":"上一个","Probe":"探针","ROI Window":"选择对比度","Rectangle":"矩形","Reference Lines":"参考线","Reset":"复原","Reset to Defaults":"返回默认","Rotate Right":"顺时针旋转","Sagittal":"矢状面","Save":"保存","Stack Scroll":"滑动切换图层","Stack Image Sync":"影像联动","Stop":"停止","Themes":"主题","Zoom":"放大"}');
|
|
20256
20877
|
;// CONCATENATED MODULE: ../../i18n/src/locales/zh/CineDialog.json
|
|
20257
20878
|
const zh_CineDialog_namespaceObject = JSON.parse('{"Next image":"下一个图像","Play / Stop":"播放/停止","Previous image":"上一个图像","Skip to first image":"跳转到第一个图像","Skip to last image":"跳转到最后一个图像","fps":"帧率"}');
|
|
20258
20879
|
;// CONCATENATED MODULE: ../../i18n/src/locales/zh/Common.json
|
|
@@ -20573,7 +21194,7 @@ ContextMenu.propTypes = {
|
|
|
20573
21194
|
items: prop_types__WEBPACK_IMPORTED_MODULE_1___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default().shape({
|
|
20574
21195
|
label: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string).isRequired,
|
|
20575
21196
|
action: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func).isRequired
|
|
20576
|
-
}))
|
|
21197
|
+
}))
|
|
20577
21198
|
};
|
|
20578
21199
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ContextMenu);
|
|
20579
21200
|
|
|
@@ -23363,7 +23984,7 @@ Typography.propTypes = {
|
|
|
23363
23984
|
|
|
23364
23985
|
/***/ }),
|
|
23365
23986
|
|
|
23366
|
-
/***/
|
|
23987
|
+
/***/ 28619:
|
|
23367
23988
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
23368
23989
|
|
|
23369
23990
|
"use strict";
|
|
@@ -23372,6 +23993,7 @@ Typography.propTypes = {
|
|
|
23372
23993
|
__webpack_require__.d(__webpack_exports__, {
|
|
23373
23994
|
tk: () => (/* reexport */ components_AboutModal),
|
|
23374
23995
|
zx: () => (/* reexport */ components_Button),
|
|
23996
|
+
LZ: () => (/* reexport */ ButtonEnums_namespaceObject),
|
|
23375
23997
|
hE: () => (/* reexport */ components_ButtonGroup),
|
|
23376
23998
|
H6: () => (/* reexport */ components_CinePlayer),
|
|
23377
23999
|
bC: () => (/* reexport */ CineProvider),
|
|
@@ -23388,6 +24010,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
23388
24010
|
OX: () => (/* reexport */ components_InputRange),
|
|
23389
24011
|
__: () => (/* reexport */ components_Label),
|
|
23390
24012
|
OF: () => (/* reexport */ components_LayoutSelector),
|
|
24013
|
+
mN: () => (/* reexport */ components_LegacyButton),
|
|
23391
24014
|
LE: () => (/* reexport */ components_LoadingIndicatorProgress),
|
|
23392
24015
|
bk: () => (/* reexport */ components_LoadingIndicatorTotalPercent),
|
|
23393
24016
|
wt: () => (/* reexport */ components_MeasurementTable),
|
|
@@ -23415,7 +24038,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
23415
24038
|
ux: () => (/* reexport */ UserAuthenticationProvider),
|
|
23416
24039
|
i1: () => (/* reexport */ components_UserPreferences),
|
|
23417
24040
|
uY: () => (/* reexport */ components_ViewportActionBar),
|
|
23418
|
-
|
|
24041
|
+
DF: () => (/* reexport */ contextProviders_ViewportDialogProvider),
|
|
23419
24042
|
mQ: () => (/* reexport */ ViewportDownloadForm_ViewportDownloadForm),
|
|
23420
24043
|
_e: () => (/* reexport */ components_ViewportGrid),
|
|
23421
24044
|
CW: () => (/* reexport */ ViewportGridProvider),
|
|
@@ -23430,7 +24053,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
23430
24053
|
O_: () => (/* reexport */ useViewportGrid)
|
|
23431
24054
|
});
|
|
23432
24055
|
|
|
23433
|
-
// UNUSED EXPORTS: BackgroundColor, ContextMenu, DateRange, Dropdown, ExpandableToolbarButton, HotkeyField, HotkeysPreferences, ICONS, IconButton, ImageViewerContext, InputDateRange, InputGroup, InputLabelWrapper, InputMultiSelect, InputText, LegacyCinePlayer, LegacyViewportActionBar, ListMenu, ModalComponent, ModalConsumer, NavBar, StudyItem, StudyListTableRow, Svg, Table, TableBody, TableCell, TableHead, TableRow, Thumbnail, ThumbnailList, ThumbnailNoImage, ThumbnailTracked, Types, UserAuthenticationContext, Viewport, ViewportGridContext, addIcon, getIcon, useDialog, useSnackbar, withDialog, withModal, withSnackbar
|
|
24056
|
+
// UNUSED EXPORTS: BackgroundColor, ContextMenu, DateRange, Dropdown, ExpandableToolbarButton, HotkeyField, HotkeysPreferences, ICONS, IconButton, ImageViewerContext, InputDateRange, InputGroup, InputLabelWrapper, InputMultiSelect, InputNumber, InputText, LegacyCinePlayer, LegacyViewportActionBar, ListMenu, ModalComponent, ModalConsumer, NavBar, StudyItem, StudyListTableRow, Svg, Table, TableBody, TableCell, TableHead, TableRow, Thumbnail, ThumbnailList, ThumbnailNoImage, ThumbnailTracked, Types, UserAuthenticationContext, Viewport, ViewportGridContext, addIcon, getIcon, useDialog, useSnackbar, withDialog, withModal, withSnackbar
|
|
23434
24057
|
|
|
23435
24058
|
// NAMESPACE OBJECT: ../../../node_modules/react-dnd-html5-backend/dist/esm/NativeTypes.js
|
|
23436
24059
|
var NativeTypes_namespaceObject = {};
|
|
@@ -23442,6 +24065,14 @@ __webpack_require__.d(NativeTypes_namespaceObject, {
|
|
|
23442
24065
|
URL: () => (NativeTypes_URL)
|
|
23443
24066
|
});
|
|
23444
24067
|
|
|
24068
|
+
// NAMESPACE OBJECT: ../../ui/src/components/Button/ButtonEnums.ts
|
|
24069
|
+
var ButtonEnums_namespaceObject = {};
|
|
24070
|
+
__webpack_require__.r(ButtonEnums_namespaceObject);
|
|
24071
|
+
__webpack_require__.d(ButtonEnums_namespaceObject, {
|
|
24072
|
+
d: () => (size),
|
|
24073
|
+
U: () => (type)
|
|
24074
|
+
});
|
|
24075
|
+
|
|
23445
24076
|
// EXTERNAL MODULE: ../../../node_modules/prop-types/index.js
|
|
23446
24077
|
var prop_types = __webpack_require__(60216);
|
|
23447
24078
|
var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
|
|
@@ -30810,8 +31441,8 @@ ViewportDialogProvider.propTypes = {
|
|
|
30810
31441
|
// EXTERNAL MODULE: ../../../node_modules/lodash.isequal/index.js
|
|
30811
31442
|
var lodash_isequal = __webpack_require__(68652);
|
|
30812
31443
|
var lodash_isequal_default = /*#__PURE__*/__webpack_require__.n(lodash_isequal);
|
|
30813
|
-
// EXTERNAL MODULE: ../../core/src/index.ts +
|
|
30814
|
-
var src = __webpack_require__(
|
|
31444
|
+
// EXTERNAL MODULE: ../../core/src/index.ts + 103 modules
|
|
31445
|
+
var src = __webpack_require__(87754);
|
|
30815
31446
|
;// CONCATENATED MODULE: ../../ui/src/utils/viewportLabels.ts
|
|
30816
31447
|
const viewportLabels = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];
|
|
30817
31448
|
/* harmony default export */ const utils_viewportLabels = (viewportLabels);
|
|
@@ -32072,153 +32703,67 @@ AboutModal.propTypes = {
|
|
|
32072
32703
|
;// CONCATENATED MODULE: ../../ui/src/components/AboutModal/index.js
|
|
32073
32704
|
|
|
32074
32705
|
/* harmony default export */ const components_AboutModal = (AboutModal_AboutModal);
|
|
32706
|
+
;// CONCATENATED MODULE: ../../ui/src/components/Button/ButtonEnums.ts
|
|
32707
|
+
var type = /*#__PURE__*/function (type) {
|
|
32708
|
+
type["primary"] = "primary";
|
|
32709
|
+
type["secondary"] = "secondary";
|
|
32710
|
+
return type;
|
|
32711
|
+
}(type || {});
|
|
32712
|
+
var size = /*#__PURE__*/function (size) {
|
|
32713
|
+
size["medium"] = "medium";
|
|
32714
|
+
size["small"] = "small";
|
|
32715
|
+
return size;
|
|
32716
|
+
}(size || {});
|
|
32717
|
+
|
|
32075
32718
|
;// CONCATENATED MODULE: ../../ui/src/components/Button/Button.tsx
|
|
32076
|
-
function Button_extends() { Button_extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return Button_extends.apply(this, arguments); }
|
|
32077
32719
|
|
|
32078
32720
|
|
|
32079
32721
|
|
|
32080
|
-
|
|
32722
|
+
|
|
32723
|
+
const sizeClasses = {
|
|
32724
|
+
[size.small]: 'h-[26px] text-[13px]',
|
|
32725
|
+
[size.medium]: 'h-[32px] text-[14px]'
|
|
32726
|
+
};
|
|
32727
|
+
const layoutClasses = 'box-content inline-flex flex-row items-center justify-center gap-[5px] justify center px-[10px] outline-none rounded';
|
|
32728
|
+
const baseFontTextClasses = 'leading-[1.2] font-sans text-center whitespace-nowrap';
|
|
32729
|
+
const fontTextClasses = {
|
|
32730
|
+
[type.primary]: classnames_default()(baseFontTextClasses, 'font-semibold'),
|
|
32731
|
+
[type.secondary]: classnames_default()(baseFontTextClasses, 'font-400')
|
|
32732
|
+
};
|
|
32733
|
+
const baseEnabledEffectClasses = 'transition duration-300 ease-in-out focus:outline-none';
|
|
32734
|
+
const enabledEffectClasses = {
|
|
32735
|
+
[type.primary]: classnames_default()(baseEnabledEffectClasses, 'hover:bg-customblue-80 active:bg-customblue-40'),
|
|
32736
|
+
[type.secondary]: classnames_default()(baseEnabledEffectClasses, 'hover:bg-customblue-50 active:bg-customblue-20')
|
|
32737
|
+
};
|
|
32738
|
+
const baseEnabledClasses = 'text-white';
|
|
32739
|
+
const enabledClasses = {
|
|
32740
|
+
[type.primary]: classnames_default()('bg-primary-main', baseEnabledClasses, enabledEffectClasses[type.primary]),
|
|
32741
|
+
[type.secondary]: classnames_default()('bg-customblue-30', baseEnabledClasses, enabledEffectClasses[type.secondary])
|
|
32742
|
+
};
|
|
32743
|
+
const disabledClasses = 'bg-inputfield-placeholder text-common-light cursor-default';
|
|
32081
32744
|
const defaults = {
|
|
32082
32745
|
color: 'default',
|
|
32083
32746
|
disabled: false,
|
|
32084
|
-
|
|
32085
|
-
|
|
32086
|
-
|
|
32087
|
-
size: 'medium',
|
|
32088
|
-
type: 'button',
|
|
32089
|
-
variant: 'contained'
|
|
32090
|
-
};
|
|
32091
|
-
const roundedClasses = {
|
|
32092
|
-
none: '',
|
|
32093
|
-
small: 'rounded',
|
|
32094
|
-
medium: 'rounded-md',
|
|
32095
|
-
large: 'rounded-lg',
|
|
32096
|
-
full: 'rounded-full'
|
|
32097
|
-
};
|
|
32098
|
-
const variants = {
|
|
32099
|
-
text: {
|
|
32100
|
-
default: 'text-primary-light hover:bg-primary-light hover:text-white active:opacity-80 focus:bg-primary-light focus:text-white',
|
|
32101
|
-
primary: 'text-primary-main hover:bg-primary-main hover:text-white active:opacity-80 focus:bg-primary-main focus:text-white',
|
|
32102
|
-
secondary: 'text-secondary-light hover:bg-secondary-light hover:text-white active:opacity-80 focus:bg-secondary-light focus:text-white',
|
|
32103
|
-
white: 'text-white hover:bg-white hover:text-black active:opacity-80 focus:bg-white focus:text-black',
|
|
32104
|
-
black: 'text-black hover:bg-black hover:text-white focus:bg-black focus:text-white active:opacity-80'
|
|
32105
|
-
},
|
|
32106
|
-
outlined: {
|
|
32107
|
-
default: 'text-primary-light hover:bg-primary-light hover:text-black focus:text-black focus:bg-primary-light active:opacity-80',
|
|
32108
|
-
primary: 'text-primary-main hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
32109
|
-
secondary: 'text-secondary-light hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
32110
|
-
translucent: 'text-white hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
32111
|
-
white: 'text-black hover:bg-primary-main focus:bg-primary-main hover:border-black focus:border-black',
|
|
32112
|
-
black: 'text-white hover:bg-primary-main focus:bg-primary-main hover:border-black focus:border-black',
|
|
32113
|
-
primaryActive: 'text-primary-active hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
32114
|
-
primaryLight: 'border bg-transparent border-primary-main text-white hover:opacity-80 active:opacity-100 focus:opacity-80'
|
|
32115
|
-
},
|
|
32116
|
-
contained: {
|
|
32117
|
-
default: 'text-black hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
32118
|
-
primary: 'text-white hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
32119
|
-
primaryDark: 'text-primary-active hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
32120
|
-
secondary: 'text-white hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
32121
|
-
white: 'text-black hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
32122
|
-
black: 'text-white hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
32123
|
-
light: 'border text-black hover:opacity-80 active:opacity-100 focus:opacity-80'
|
|
32124
|
-
},
|
|
32125
|
-
disabled: {
|
|
32126
|
-
default: 'cursor-not-allowed opacity-50 text-black',
|
|
32127
|
-
primary: 'cursor-not-allowed opacity-50 text-white',
|
|
32128
|
-
secondary: 'cursor-not-allowed opacity-50 text-white',
|
|
32129
|
-
white: 'cursor-not-allowed opacity-50 text-black',
|
|
32130
|
-
black: 'cursor-not-allowed opacity-50 text-white',
|
|
32131
|
-
light: 'cursor-not-allowed opacity-50 border text-black'
|
|
32132
|
-
}
|
|
32133
|
-
};
|
|
32134
|
-
const defaultVariantBackGroundColor = {
|
|
32135
|
-
text: {
|
|
32136
|
-
default: '',
|
|
32137
|
-
primary: '',
|
|
32138
|
-
secondary: '',
|
|
32139
|
-
white: '',
|
|
32140
|
-
black: ''
|
|
32141
|
-
},
|
|
32142
|
-
outlined: {
|
|
32143
|
-
default: 'bg-transparent',
|
|
32144
|
-
primary: 'bg-transparent',
|
|
32145
|
-
secondary: 'bg-transparent',
|
|
32146
|
-
black: 'bg-black',
|
|
32147
|
-
white: ''
|
|
32148
|
-
},
|
|
32149
|
-
contained: {
|
|
32150
|
-
default: 'bg-primary-light',
|
|
32151
|
-
primary: 'bg-primary-main',
|
|
32152
|
-
primaryDark: 'bg-primary-dark',
|
|
32153
|
-
secondary: 'bg-secondary-light',
|
|
32154
|
-
white: 'bg-white',
|
|
32155
|
-
black: 'bg-black',
|
|
32156
|
-
light: 'bg-primary-light'
|
|
32157
|
-
},
|
|
32158
|
-
disabled: {
|
|
32159
|
-
default: 'bg-primary-light',
|
|
32160
|
-
primary: 'bg-primary-main',
|
|
32161
|
-
secondary: 'bg-secondary-light',
|
|
32162
|
-
white: 'bg-white',
|
|
32163
|
-
black: 'bg-black',
|
|
32164
|
-
light: 'bg-primary-light'
|
|
32165
|
-
}
|
|
32166
|
-
};
|
|
32167
|
-
const _getVariantClass = function (variant, color) {
|
|
32168
|
-
let bgColor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
32169
|
-
const defaultBackgroundColor = defaultVariantBackGroundColor[variant][color];
|
|
32170
|
-
if (!bgColor) {
|
|
32171
|
-
bgColor = defaultBackgroundColor;
|
|
32172
|
-
}
|
|
32173
|
-
return `${variants[variant][color]} ${bgColor}`;
|
|
32174
|
-
};
|
|
32175
|
-
const borderClasses = {
|
|
32176
|
-
none: '',
|
|
32177
|
-
light: 'border border-primary-light',
|
|
32178
|
-
primary: 'border border-primary-main',
|
|
32179
|
-
primaryActive: 'border border-primary-active',
|
|
32180
|
-
secondary: 'border border-secondary-light',
|
|
32181
|
-
white: 'border border-white',
|
|
32182
|
-
black: 'border border-black'
|
|
32183
|
-
};
|
|
32184
|
-
const sizeClasses = {
|
|
32185
|
-
small: 'py-2 px-2 text-sm min-w-md',
|
|
32186
|
-
medium: 'py-2 px-2 text-lg min-w-md',
|
|
32187
|
-
large: 'py-2 px-6 text-xl min-w-md',
|
|
32188
|
-
initial: ''
|
|
32189
|
-
};
|
|
32190
|
-
const fullWidthClasses = {
|
|
32191
|
-
true: 'flex w-full',
|
|
32192
|
-
false: 'inline-flex'
|
|
32747
|
+
rounded: 'small',
|
|
32748
|
+
size: size.medium,
|
|
32749
|
+
type: type.primary
|
|
32193
32750
|
};
|
|
32194
32751
|
const Button = _ref => {
|
|
32195
32752
|
let {
|
|
32196
32753
|
children,
|
|
32197
|
-
variant = defaults.variant,
|
|
32198
|
-
color = defaults.color,
|
|
32199
|
-
border = defaults.border,
|
|
32200
32754
|
size = defaults.size,
|
|
32201
|
-
rounded = defaults.rounded,
|
|
32202
32755
|
disabled = defaults.disabled,
|
|
32203
32756
|
type = defaults.type,
|
|
32204
|
-
fullWidth = defaults.fullWidth,
|
|
32205
|
-
bgColor = null,
|
|
32206
32757
|
startIcon: startIconProp,
|
|
32207
32758
|
endIcon: endIconProp,
|
|
32208
32759
|
name,
|
|
32209
32760
|
className,
|
|
32210
|
-
onClick
|
|
32211
|
-
/** TODO: All possible props should be explicitly defined -- avoid spreading props */
|
|
32212
|
-
...rest
|
|
32761
|
+
onClick
|
|
32213
32762
|
} = _ref;
|
|
32214
|
-
const startIcon = startIconProp && /*#__PURE__*/react.createElement(
|
|
32215
|
-
className: "mr-2"
|
|
32216
|
-
}, /*#__PURE__*/react.cloneElement(startIconProp, {
|
|
32763
|
+
const startIcon = startIconProp && /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.cloneElement(startIconProp, {
|
|
32217
32764
|
className: classnames_default()('w-4 h-4 fill-current')
|
|
32218
32765
|
}));
|
|
32219
|
-
const endIcon = endIconProp && /*#__PURE__*/react.createElement(
|
|
32220
|
-
className: "ml-2"
|
|
32221
|
-
}, /*#__PURE__*/react.cloneElement(endIconProp, {
|
|
32766
|
+
const endIcon = endIconProp && /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.cloneElement(endIconProp, {
|
|
32222
32767
|
className: classnames_default()('w-4 h-4 fill-current')
|
|
32223
32768
|
}));
|
|
32224
32769
|
const buttonElement = (0,react.useRef)(null);
|
|
@@ -32228,21 +32773,23 @@ const Button = _ref => {
|
|
|
32228
32773
|
onClick(e);
|
|
32229
32774
|
}
|
|
32230
32775
|
};
|
|
32231
|
-
const finalClassName = classnames_default()(
|
|
32232
|
-
|
|
32776
|
+
const finalClassName = classnames_default()(layoutClasses, fontTextClasses[type], disabled ? disabledClasses : enabledClasses[type], sizeClasses[size], children ? 'min-w-[32px]' : '',
|
|
32777
|
+
// minimum width for buttons with text; icon only button does NOT get a minimum width
|
|
32778
|
+
className);
|
|
32779
|
+
return /*#__PURE__*/react.createElement("button", {
|
|
32233
32780
|
className: finalClassName,
|
|
32234
32781
|
disabled: disabled,
|
|
32235
32782
|
ref: buttonElement,
|
|
32236
32783
|
onClick: handleOnClick,
|
|
32237
|
-
type: type,
|
|
32238
32784
|
"data-cy": `${name}-btn`
|
|
32239
|
-
},
|
|
32785
|
+
}, startIcon, children, endIcon);
|
|
32240
32786
|
};
|
|
32241
32787
|
Button.defaultProps = {
|
|
32242
|
-
color: defaults.color,
|
|
32243
32788
|
disabled: false,
|
|
32244
32789
|
children: '',
|
|
32245
|
-
onClick: () => {}
|
|
32790
|
+
onClick: () => {},
|
|
32791
|
+
type: defaults.type,
|
|
32792
|
+
size: defaults.size
|
|
32246
32793
|
};
|
|
32247
32794
|
Button.propTypes = {
|
|
32248
32795
|
/** What is inside the button, can be text or react component */
|
|
@@ -32250,32 +32797,24 @@ Button.propTypes = {
|
|
|
32250
32797
|
/** Callback to be called when the button is clicked */
|
|
32251
32798
|
onClick: (prop_types_default()).func.isRequired,
|
|
32252
32799
|
/** Button size */
|
|
32253
|
-
size: prop_types_default().oneOf([
|
|
32254
|
-
/** Button corner roundness */
|
|
32255
|
-
rounded: prop_types_default().oneOf(['none', 'small', 'medium', 'large', 'full']),
|
|
32256
|
-
variant: prop_types_default().oneOf(['text', 'outlined', 'contained', 'disabled']),
|
|
32257
|
-
/* color prop must have all the possible keys of variants defined above */
|
|
32258
|
-
color: prop_types_default().oneOf(['default', 'primary', 'primaryDark', 'primaryActive', 'secondary', 'white', 'black', 'inherit', 'light', 'translucent']),
|
|
32259
|
-
border: prop_types_default().oneOf(['none', 'light', 'default', 'primary', 'primaryActive', 'secondary', 'white', 'black']),
|
|
32260
|
-
/** Whether the button should have full width */
|
|
32261
|
-
fullWidth: (prop_types_default()).bool,
|
|
32800
|
+
size: prop_types_default().oneOf([size.medium, size.small]),
|
|
32262
32801
|
/** Whether the button should be disabled */
|
|
32263
32802
|
disabled: (prop_types_default()).bool,
|
|
32264
32803
|
/** Button type */
|
|
32265
|
-
type:
|
|
32804
|
+
type: prop_types_default().oneOf([type.primary, type.secondary]),
|
|
32266
32805
|
name: (prop_types_default()).string,
|
|
32267
32806
|
/** Button start icon name - if any icon is specified */
|
|
32268
32807
|
startIcon: (prop_types_default()).node,
|
|
32269
32808
|
/** Button end icon name - if any icon is specified */
|
|
32270
32809
|
endIcon: (prop_types_default()).node,
|
|
32271
32810
|
/** Additional TailwindCSS classnames */
|
|
32272
|
-
className: (prop_types_default()).string
|
|
32273
|
-
/** Background color for the button to override*/
|
|
32274
|
-
bgColor: (prop_types_default()).string
|
|
32811
|
+
className: (prop_types_default()).string
|
|
32275
32812
|
};
|
|
32276
32813
|
/* harmony default export */ const Button_Button = (Button);
|
|
32277
32814
|
;// CONCATENATED MODULE: ../../ui/src/components/Button/index.js
|
|
32278
32815
|
|
|
32816
|
+
|
|
32817
|
+
|
|
32279
32818
|
/* harmony default export */ const components_Button = (Button_Button);
|
|
32280
32819
|
;// CONCATENATED MODULE: ../../ui/src/components/ButtonGroup/ButtonGroup.tsx
|
|
32281
32820
|
function ButtonGroup_extends() { ButtonGroup_extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return ButtonGroup_extends.apply(this, arguments); }
|
|
@@ -32283,7 +32822,7 @@ function ButtonGroup_extends() { ButtonGroup_extends = Object.assign ? Object.as
|
|
|
32283
32822
|
|
|
32284
32823
|
|
|
32285
32824
|
const baseButtonClass = 'border outline-none';
|
|
32286
|
-
const
|
|
32825
|
+
const roundedClasses = {
|
|
32287
32826
|
vertical: {
|
|
32288
32827
|
none: '',
|
|
32289
32828
|
small: 'first:rounded-t last:rounded-b',
|
|
@@ -32299,7 +32838,7 @@ const ButtonGroup_roundedClasses = {
|
|
|
32299
32838
|
full: 'first:rounded-l-full last:rounded-r-full'
|
|
32300
32839
|
}
|
|
32301
32840
|
};
|
|
32302
|
-
const
|
|
32841
|
+
const borderClasses = {
|
|
32303
32842
|
text: {
|
|
32304
32843
|
vertical: 'border-t-0 border-l-0 border-r-0 last:border-b-0',
|
|
32305
32844
|
horizontal: 'border-l-0 border-t-0 border-b-0 last:border-r-0'
|
|
@@ -32363,7 +32902,7 @@ const ButtonGroup = _ref => {
|
|
|
32363
32902
|
...other
|
|
32364
32903
|
} = _ref;
|
|
32365
32904
|
const ref = (0,react.useRef)(null);
|
|
32366
|
-
const buttonClasses = classnames_default()(baseButtonClass,
|
|
32905
|
+
const buttonClasses = classnames_default()(baseButtonClass, borderClasses[variant] && borderClasses[variant][orientation], variantClasses[variant] && variantClasses[variant][color], roundedClasses[orientation] && roundedClasses[orientation][rounded]);
|
|
32367
32906
|
return /*#__PURE__*/react.createElement("div", ButtonGroup_extends({
|
|
32368
32907
|
role: "group",
|
|
32369
32908
|
className: classnames_default()('group', className, orientationClasses[orientation], fullWidth ? fullWidthDisplayClass : baseDisplayClass),
|
|
@@ -32889,7 +33428,6 @@ const Footer = _ref => {
|
|
|
32889
33428
|
className: classnames_default()(flex, padding, className)
|
|
32890
33429
|
}, actions.map((action, index) => {
|
|
32891
33430
|
const isFirst = index === 0;
|
|
32892
|
-
const isPrimary = action.type === 'primary';
|
|
32893
33431
|
const onClickHandler = event => onSubmit({
|
|
32894
33432
|
action,
|
|
32895
33433
|
value,
|
|
@@ -32897,15 +33435,12 @@ const Footer = _ref => {
|
|
|
32897
33435
|
});
|
|
32898
33436
|
return /*#__PURE__*/react.createElement(components_Button, {
|
|
32899
33437
|
key: index,
|
|
33438
|
+
name: action.text,
|
|
32900
33439
|
className: classnames_default()({
|
|
32901
33440
|
'ml-2': !isFirst
|
|
32902
33441
|
}, action.classes),
|
|
32903
|
-
|
|
32904
|
-
onClick: onClickHandler
|
|
32905
|
-
style: {
|
|
32906
|
-
transition: 'all .15s ease',
|
|
32907
|
-
height: 34
|
|
32908
|
-
}
|
|
33442
|
+
type: action.type,
|
|
33443
|
+
onClick: onClickHandler
|
|
32909
33444
|
}, action.text);
|
|
32910
33445
|
}));
|
|
32911
33446
|
};
|
|
@@ -32917,7 +33452,7 @@ Footer.propTypes = {
|
|
|
32917
33452
|
id: (prop_types_default()).string.isRequired,
|
|
32918
33453
|
text: (prop_types_default()).string.isRequired,
|
|
32919
33454
|
value: (prop_types_default()).any,
|
|
32920
|
-
type: prop_types_default().oneOf([
|
|
33455
|
+
type: prop_types_default().oneOf([type.primary, type.secondary]).isRequired,
|
|
32921
33456
|
classes: prop_types_default().arrayOf((prop_types_default()).string)
|
|
32922
33457
|
})).isRequired
|
|
32923
33458
|
};
|
|
@@ -33450,7 +33985,7 @@ Modal.propTypes = {
|
|
|
33450
33985
|
|
|
33451
33986
|
|
|
33452
33987
|
|
|
33453
|
-
const
|
|
33988
|
+
const baseClasses = 'text-center items-center justify-center transition duration-300 ease-in-out outline-none font-bold focus:outline-none';
|
|
33454
33989
|
const IconButton_roundedClasses = {
|
|
33455
33990
|
none: '',
|
|
33456
33991
|
small: 'rounded',
|
|
@@ -33458,7 +33993,7 @@ const IconButton_roundedClasses = {
|
|
|
33458
33993
|
large: 'rounded-lg',
|
|
33459
33994
|
full: 'rounded-full'
|
|
33460
33995
|
};
|
|
33461
|
-
const
|
|
33996
|
+
const IconButton_disabledClasses = {
|
|
33462
33997
|
true: 'cursor-not-allowed',
|
|
33463
33998
|
false: ''
|
|
33464
33999
|
};
|
|
@@ -33521,7 +34056,7 @@ const iconSizeClasses = {
|
|
|
33521
34056
|
large: 'w-6 h-6',
|
|
33522
34057
|
toolbar: 'w-5 h-5'
|
|
33523
34058
|
};
|
|
33524
|
-
const
|
|
34059
|
+
const fullWidthClasses = {
|
|
33525
34060
|
true: 'flex w-full',
|
|
33526
34061
|
false: 'inline-flex'
|
|
33527
34062
|
};
|
|
@@ -33549,7 +34084,7 @@ const IconButton = _ref => {
|
|
|
33549
34084
|
};
|
|
33550
34085
|
const bgColorToUse = bgColor ? bgColor : backgroundClasses[variant][color];
|
|
33551
34086
|
return /*#__PURE__*/react.createElement("button", {
|
|
33552
|
-
className: classnames_default()(
|
|
34087
|
+
className: classnames_default()(baseClasses, IconButton_variantClasses[variant][color], IconButton_roundedClasses[rounded], IconButton_sizeClasses[size], fullWidthClasses[fullWidth], IconButton_disabledClasses[disabled], bgColorToUse, className),
|
|
33553
34088
|
style: {
|
|
33554
34089
|
padding: size === 'toolbar' ? '10px' : null
|
|
33555
34090
|
},
|
|
@@ -40761,6 +41296,211 @@ LayoutSelector.propTypes = {
|
|
|
40761
41296
|
;// CONCATENATED MODULE: ../../ui/src/components/LayoutSelector/index.js
|
|
40762
41297
|
|
|
40763
41298
|
/* harmony default export */ const components_LayoutSelector = (LayoutSelector_LayoutSelector);
|
|
41299
|
+
;// CONCATENATED MODULE: ../../ui/src/components/LegacyButton/LegacyButton.tsx
|
|
41300
|
+
function LegacyButton_extends() { LegacyButton_extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return LegacyButton_extends.apply(this, arguments); }
|
|
41301
|
+
|
|
41302
|
+
|
|
41303
|
+
|
|
41304
|
+
const LegacyButton_baseClasses = 'leading-none font-sans text-center justify-center items-center outline-none transition duration-300 ease-in-out focus:outline-none';
|
|
41305
|
+
const LegacyButton_defaults = {
|
|
41306
|
+
color: 'default',
|
|
41307
|
+
disabled: false,
|
|
41308
|
+
fullWidth: false,
|
|
41309
|
+
rounded: 'medium',
|
|
41310
|
+
border: 'none',
|
|
41311
|
+
size: 'medium',
|
|
41312
|
+
type: 'button',
|
|
41313
|
+
variant: 'contained'
|
|
41314
|
+
};
|
|
41315
|
+
const LegacyButton_roundedClasses = {
|
|
41316
|
+
none: '',
|
|
41317
|
+
small: 'rounded',
|
|
41318
|
+
medium: 'rounded-md',
|
|
41319
|
+
large: 'rounded-lg',
|
|
41320
|
+
full: 'rounded-full'
|
|
41321
|
+
};
|
|
41322
|
+
const variants = {
|
|
41323
|
+
text: {
|
|
41324
|
+
default: 'text-primary-light hover:bg-primary-light hover:text-white active:opacity-80 focus:bg-primary-light focus:text-white',
|
|
41325
|
+
primary: 'text-primary-main hover:bg-primary-main hover:text-white active:opacity-80 focus:bg-primary-main focus:text-white',
|
|
41326
|
+
secondary: 'text-secondary-light hover:bg-secondary-light hover:text-white active:opacity-80 focus:bg-secondary-light focus:text-white',
|
|
41327
|
+
white: 'text-white hover:bg-white hover:text-black active:opacity-80 focus:bg-white focus:text-black',
|
|
41328
|
+
black: 'text-black hover:bg-black hover:text-white focus:bg-black focus:text-white active:opacity-80'
|
|
41329
|
+
},
|
|
41330
|
+
outlined: {
|
|
41331
|
+
default: 'text-primary-light hover:bg-primary-light hover:text-black focus:text-black focus:bg-primary-light active:opacity-80',
|
|
41332
|
+
primary: 'text-primary-main hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
41333
|
+
secondary: 'text-secondary-light hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
41334
|
+
translucent: 'text-white hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
41335
|
+
white: 'text-black hover:bg-primary-main focus:bg-primary-main hover:border-black focus:border-black',
|
|
41336
|
+
black: 'text-white hover:bg-primary-main focus:bg-primary-main hover:border-black focus:border-black',
|
|
41337
|
+
primaryActive: 'text-primary-active hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
41338
|
+
primaryLight: 'border bg-transparent border-primary-main text-white hover:opacity-80 active:opacity-100 focus:opacity-80'
|
|
41339
|
+
},
|
|
41340
|
+
contained: {
|
|
41341
|
+
default: 'text-black hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
41342
|
+
primary: 'text-white hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
41343
|
+
primaryDark: 'text-primary-active hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
41344
|
+
secondary: 'text-white hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
41345
|
+
white: 'text-black hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
41346
|
+
black: 'text-white hover:opacity-80 active:opacity-100 focus:opacity-80',
|
|
41347
|
+
light: 'border text-black hover:opacity-80 active:opacity-100 focus:opacity-80'
|
|
41348
|
+
},
|
|
41349
|
+
disabled: {
|
|
41350
|
+
default: 'cursor-not-allowed opacity-50 text-black',
|
|
41351
|
+
primary: 'cursor-not-allowed opacity-50 text-white',
|
|
41352
|
+
secondary: 'cursor-not-allowed opacity-50 text-white',
|
|
41353
|
+
white: 'cursor-not-allowed opacity-50 text-black',
|
|
41354
|
+
black: 'cursor-not-allowed opacity-50 text-white',
|
|
41355
|
+
light: 'cursor-not-allowed opacity-50 border text-black'
|
|
41356
|
+
}
|
|
41357
|
+
};
|
|
41358
|
+
const defaultVariantBackGroundColor = {
|
|
41359
|
+
text: {
|
|
41360
|
+
default: '',
|
|
41361
|
+
primary: '',
|
|
41362
|
+
secondary: '',
|
|
41363
|
+
white: '',
|
|
41364
|
+
black: ''
|
|
41365
|
+
},
|
|
41366
|
+
outlined: {
|
|
41367
|
+
default: 'bg-transparent',
|
|
41368
|
+
primary: 'bg-transparent',
|
|
41369
|
+
secondary: 'bg-transparent',
|
|
41370
|
+
black: 'bg-black',
|
|
41371
|
+
white: ''
|
|
41372
|
+
},
|
|
41373
|
+
contained: {
|
|
41374
|
+
default: 'bg-primary-light',
|
|
41375
|
+
primary: 'bg-primary-main',
|
|
41376
|
+
primaryDark: 'bg-primary-dark',
|
|
41377
|
+
secondary: 'bg-secondary-light',
|
|
41378
|
+
white: 'bg-white',
|
|
41379
|
+
black: 'bg-black',
|
|
41380
|
+
light: 'bg-primary-light'
|
|
41381
|
+
},
|
|
41382
|
+
disabled: {
|
|
41383
|
+
default: 'bg-primary-light',
|
|
41384
|
+
primary: 'bg-primary-main',
|
|
41385
|
+
secondary: 'bg-secondary-light',
|
|
41386
|
+
white: 'bg-white',
|
|
41387
|
+
black: 'bg-black',
|
|
41388
|
+
light: 'bg-primary-light'
|
|
41389
|
+
}
|
|
41390
|
+
};
|
|
41391
|
+
const _getVariantClass = function (variant, color) {
|
|
41392
|
+
let bgColor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
41393
|
+
const defaultBackgroundColor = defaultVariantBackGroundColor[variant][color];
|
|
41394
|
+
if (!bgColor) {
|
|
41395
|
+
bgColor = defaultBackgroundColor;
|
|
41396
|
+
}
|
|
41397
|
+
return `${variants[variant][color]} ${bgColor}`;
|
|
41398
|
+
};
|
|
41399
|
+
const LegacyButton_borderClasses = {
|
|
41400
|
+
none: '',
|
|
41401
|
+
light: 'border border-primary-light',
|
|
41402
|
+
primary: 'border border-primary-main',
|
|
41403
|
+
primaryActive: 'border border-primary-active',
|
|
41404
|
+
secondary: 'border border-secondary-light',
|
|
41405
|
+
white: 'border border-white',
|
|
41406
|
+
black: 'border border-black'
|
|
41407
|
+
};
|
|
41408
|
+
const LegacyButton_sizeClasses = {
|
|
41409
|
+
small: 'py-2 px-2 text-sm min-w-md',
|
|
41410
|
+
medium: 'py-2 px-2 text-lg min-w-md',
|
|
41411
|
+
large: 'py-2 px-6 text-xl min-w-md',
|
|
41412
|
+
initial: ''
|
|
41413
|
+
};
|
|
41414
|
+
const LegacyButton_fullWidthClasses = {
|
|
41415
|
+
true: 'flex w-full',
|
|
41416
|
+
false: 'inline-flex'
|
|
41417
|
+
};
|
|
41418
|
+
const LegacyButton = _ref => {
|
|
41419
|
+
let {
|
|
41420
|
+
children,
|
|
41421
|
+
variant = LegacyButton_defaults.variant,
|
|
41422
|
+
color = LegacyButton_defaults.color,
|
|
41423
|
+
border = LegacyButton_defaults.border,
|
|
41424
|
+
size = LegacyButton_defaults.size,
|
|
41425
|
+
rounded = LegacyButton_defaults.rounded,
|
|
41426
|
+
disabled = LegacyButton_defaults.disabled,
|
|
41427
|
+
type = LegacyButton_defaults.type,
|
|
41428
|
+
fullWidth = LegacyButton_defaults.fullWidth,
|
|
41429
|
+
bgColor = null,
|
|
41430
|
+
startIcon: startIconProp,
|
|
41431
|
+
endIcon: endIconProp,
|
|
41432
|
+
name,
|
|
41433
|
+
className,
|
|
41434
|
+
onClick,
|
|
41435
|
+
/** TODO: All possible props should be explicitly defined -- avoid spreading props */
|
|
41436
|
+
...rest
|
|
41437
|
+
} = _ref;
|
|
41438
|
+
const startIcon = startIconProp && /*#__PURE__*/react.createElement("div", {
|
|
41439
|
+
className: "mr-2"
|
|
41440
|
+
}, /*#__PURE__*/react.cloneElement(startIconProp, {
|
|
41441
|
+
className: classnames_default()('w-4 h-4 fill-current')
|
|
41442
|
+
}));
|
|
41443
|
+
const endIcon = endIconProp && /*#__PURE__*/react.createElement("div", {
|
|
41444
|
+
className: "ml-2"
|
|
41445
|
+
}, /*#__PURE__*/react.cloneElement(endIconProp, {
|
|
41446
|
+
className: classnames_default()('w-4 h-4 fill-current')
|
|
41447
|
+
}));
|
|
41448
|
+
const buttonElement = (0,react.useRef)(null);
|
|
41449
|
+
const handleOnClick = e => {
|
|
41450
|
+
buttonElement.current.blur();
|
|
41451
|
+
if (!disabled) {
|
|
41452
|
+
onClick(e);
|
|
41453
|
+
}
|
|
41454
|
+
};
|
|
41455
|
+
const finalClassName = classnames_default()(LegacyButton_baseClasses, _getVariantClass(variant, color, bgColor), LegacyButton_borderClasses[border], LegacyButton_roundedClasses[rounded], LegacyButton_sizeClasses[size], LegacyButton_fullWidthClasses[fullWidth], className);
|
|
41456
|
+
return /*#__PURE__*/react.createElement("button", LegacyButton_extends({
|
|
41457
|
+
className: finalClassName,
|
|
41458
|
+
disabled: disabled,
|
|
41459
|
+
ref: buttonElement,
|
|
41460
|
+
onClick: handleOnClick,
|
|
41461
|
+
type: type,
|
|
41462
|
+
"data-cy": `${name}-btn`
|
|
41463
|
+
}, rest), startIcon, children, endIcon);
|
|
41464
|
+
};
|
|
41465
|
+
LegacyButton.defaultProps = {
|
|
41466
|
+
color: LegacyButton_defaults.color,
|
|
41467
|
+
disabled: false,
|
|
41468
|
+
children: '',
|
|
41469
|
+
onClick: () => {}
|
|
41470
|
+
};
|
|
41471
|
+
LegacyButton.propTypes = {
|
|
41472
|
+
/** What is inside the button, can be text or react component */
|
|
41473
|
+
children: (prop_types_default()).node,
|
|
41474
|
+
/** Callback to be called when the button is clicked */
|
|
41475
|
+
onClick: (prop_types_default()).func.isRequired,
|
|
41476
|
+
/** Button size */
|
|
41477
|
+
size: prop_types_default().oneOf(['small', 'medium', 'large', 'initial', 'inherit']),
|
|
41478
|
+
/** Button corner roundness */
|
|
41479
|
+
rounded: prop_types_default().oneOf(['none', 'small', 'medium', 'large', 'full']),
|
|
41480
|
+
variant: prop_types_default().oneOf(['text', 'outlined', 'contained', 'disabled']),
|
|
41481
|
+
/* color prop must have all the possible keys of variants defined above */
|
|
41482
|
+
color: prop_types_default().oneOf(['default', 'primary', 'primaryDark', 'primaryActive', 'secondary', 'white', 'black', 'inherit', 'light', 'translucent']),
|
|
41483
|
+
border: prop_types_default().oneOf(['none', 'light', 'default', 'primary', 'primaryActive', 'secondary', 'white', 'black']),
|
|
41484
|
+
/** Whether the button should have full width */
|
|
41485
|
+
fullWidth: (prop_types_default()).bool,
|
|
41486
|
+
/** Whether the button should be disabled */
|
|
41487
|
+
disabled: (prop_types_default()).bool,
|
|
41488
|
+
/** Button type */
|
|
41489
|
+
type: (prop_types_default()).string,
|
|
41490
|
+
name: (prop_types_default()).string,
|
|
41491
|
+
/** Button start icon name - if any icon is specified */
|
|
41492
|
+
startIcon: (prop_types_default()).node,
|
|
41493
|
+
/** Button end icon name - if any icon is specified */
|
|
41494
|
+
endIcon: (prop_types_default()).node,
|
|
41495
|
+
/** Additional TailwindCSS classnames */
|
|
41496
|
+
className: (prop_types_default()).string,
|
|
41497
|
+
/** Background color for the button to override*/
|
|
41498
|
+
bgColor: (prop_types_default()).string
|
|
41499
|
+
};
|
|
41500
|
+
/* harmony default export */ const LegacyButton_LegacyButton = (LegacyButton);
|
|
41501
|
+
;// CONCATENATED MODULE: ../../ui/src/components/LegacyButton/index.js
|
|
41502
|
+
|
|
41503
|
+
/* harmony default export */ const components_LegacyButton = (LegacyButton_LegacyButton);
|
|
40764
41504
|
;// CONCATENATED MODULE: ../../ui/src/components/LegacyCinePlayer/LegacyCinePlayerCustomInputRange.css
|
|
40765
41505
|
// extracted by mini-css-extract-plugin
|
|
40766
41506
|
|
|
@@ -41103,7 +41843,7 @@ const LegacyViewportActionBar = _ref => {
|
|
|
41103
41843
|
style: {
|
|
41104
41844
|
pointerEvents: 'all'
|
|
41105
41845
|
}
|
|
41106
|
-
}, /*#__PURE__*/react.createElement(components_ButtonGroup, null, /*#__PURE__*/react.createElement(
|
|
41846
|
+
}, /*#__PURE__*/react.createElement(components_ButtonGroup, null, /*#__PURE__*/react.createElement(components_LegacyButton, {
|
|
41107
41847
|
size: "initial",
|
|
41108
41848
|
className: "px-2 py-1 bg-black",
|
|
41109
41849
|
border: "light",
|
|
@@ -41111,7 +41851,7 @@ const LegacyViewportActionBar = _ref => {
|
|
|
41111
41851
|
}, /*#__PURE__*/react.createElement(Icon/* default */.Z, {
|
|
41112
41852
|
name: "chevron-left",
|
|
41113
41853
|
className: "w-4 text-white"
|
|
41114
|
-
})), /*#__PURE__*/react.createElement(
|
|
41854
|
+
})), /*#__PURE__*/react.createElement(components_LegacyButton, {
|
|
41115
41855
|
size: "initial",
|
|
41116
41856
|
border: "light",
|
|
41117
41857
|
className: "px-2 py-1 bg-black",
|
|
@@ -41401,7 +42141,7 @@ const Notification = _ref => {
|
|
|
41401
42141
|
color: 'text-yellow-500'
|
|
41402
42142
|
},
|
|
41403
42143
|
info: {
|
|
41404
|
-
icon: 'info',
|
|
42144
|
+
icon: 'notifications-info',
|
|
41405
42145
|
color: 'text-primary-main'
|
|
41406
42146
|
},
|
|
41407
42147
|
success: {
|
|
@@ -41421,27 +42161,24 @@ const Notification = _ref => {
|
|
|
41421
42161
|
} = getIconData();
|
|
41422
42162
|
return /*#__PURE__*/react.createElement("div", {
|
|
41423
42163
|
ref: notificationRef,
|
|
41424
|
-
className: "flex flex-col p-2 mx-2 mt-2 rounded bg-
|
|
42164
|
+
className: "flex flex-col p-2 mx-2 mt-2 border-2 rounded-md border-customblue-10 bg-customblue-400",
|
|
41425
42165
|
"data-cy": id
|
|
41426
42166
|
}, /*#__PURE__*/react.createElement("div", {
|
|
41427
|
-
className: "flex grow"
|
|
42167
|
+
className: "flex items-center grow"
|
|
41428
42168
|
}, /*#__PURE__*/react.createElement(Icon/* default */.Z, {
|
|
41429
42169
|
name: icon,
|
|
41430
|
-
className: classnames_default()('w-
|
|
42170
|
+
className: classnames_default()('w-6 h-6', color)
|
|
41431
42171
|
}), /*#__PURE__*/react.createElement("span", {
|
|
41432
|
-
className: "ml-2 text-
|
|
42172
|
+
className: "ml-2 text-[13px] text-black"
|
|
41433
42173
|
}, message)), /*#__PURE__*/react.createElement("div", {
|
|
41434
|
-
className: "flex justify-end mt-2"
|
|
42174
|
+
className: "flex flex-wrap gap-2 justify-end mt-2"
|
|
41435
42175
|
}, actions.map((action, index) => {
|
|
41436
42176
|
const isFirst = index === 0;
|
|
41437
|
-
const isPrimary = action.type === 'primary';
|
|
41438
42177
|
return /*#__PURE__*/react.createElement(components_Button, {
|
|
41439
|
-
|
|
42178
|
+
name: action.id,
|
|
41440
42179
|
key: index,
|
|
41441
|
-
|
|
41442
|
-
|
|
41443
|
-
}),
|
|
41444
|
-
color: isPrimary ? 'primary' : undefined,
|
|
42180
|
+
type: action.type,
|
|
42181
|
+
size: action.size || size.small,
|
|
41445
42182
|
onClick: () => {
|
|
41446
42183
|
onSubmit(action.value);
|
|
41447
42184
|
}
|
|
@@ -41458,7 +42195,8 @@ Notification.propTypes = {
|
|
|
41458
42195
|
actions: prop_types_default().arrayOf(prop_types_default().shape({
|
|
41459
42196
|
text: (prop_types_default()).string.isRequired,
|
|
41460
42197
|
value: (prop_types_default()).any.isRequired,
|
|
41461
|
-
type: prop_types_default().oneOf([
|
|
42198
|
+
type: prop_types_default().oneOf([type.primary, type.secondary]).isRequired,
|
|
42199
|
+
size: prop_types_default().oneOf([size.small, size.medium])
|
|
41462
42200
|
})).isRequired,
|
|
41463
42201
|
onSubmit: (prop_types_default()).func.isRequired,
|
|
41464
42202
|
/** Can be used as a callback to dismiss the notification for clicks that occur outside of it */
|
|
@@ -41916,7 +42654,7 @@ const SegmentGroupHeader = _ref2 => {
|
|
|
41916
42654
|
'transform rotate-90': !isMinimized
|
|
41917
42655
|
})
|
|
41918
42656
|
}), /*#__PURE__*/react.createElement("span", {
|
|
41919
|
-
className: "text-white "
|
|
42657
|
+
className: "text-white w-full whitespace-nowrap text-ellipsis overflow-hidden"
|
|
41920
42658
|
}, label.toUpperCase()), /*#__PURE__*/react.createElement("div", {
|
|
41921
42659
|
className: "flex-grow"
|
|
41922
42660
|
}), /*#__PURE__*/react.createElement("span", {
|
|
@@ -42145,8 +42883,9 @@ CheckBox.propTypes = {
|
|
|
42145
42883
|
|
|
42146
42884
|
|
|
42147
42885
|
|
|
42886
|
+
|
|
42148
42887
|
/**
|
|
42149
|
-
*
|
|
42888
|
+
* React Number Input component'
|
|
42150
42889
|
* it has two props, value and onChange
|
|
42151
42890
|
* value is a number value
|
|
42152
42891
|
* onChange is a function that will be called when the number input is changed
|
|
@@ -42155,7 +42894,8 @@ CheckBox.propTypes = {
|
|
|
42155
42894
|
*/
|
|
42156
42895
|
|
|
42157
42896
|
const sizesClasses = {
|
|
42158
|
-
sm: 'w-[45px] h-[28px]'
|
|
42897
|
+
sm: 'w-[45px] h-[28px]',
|
|
42898
|
+
lg: 'w-[206px] h-[35px]'
|
|
42159
42899
|
};
|
|
42160
42900
|
const InputNumber = _ref => {
|
|
42161
42901
|
let {
|
|
@@ -42165,7 +42905,9 @@ const InputNumber = _ref => {
|
|
|
42165
42905
|
className,
|
|
42166
42906
|
size = 'sm',
|
|
42167
42907
|
minValue = 0,
|
|
42168
|
-
maxValue = 100
|
|
42908
|
+
maxValue = 100,
|
|
42909
|
+
labelClassName,
|
|
42910
|
+
label
|
|
42169
42911
|
} = _ref;
|
|
42170
42912
|
const [numberValue, setNumberValue] = (0,react.useState)(value);
|
|
42171
42913
|
const handleMinMax = (0,react.useCallback)(value => {
|
|
@@ -42193,6 +42935,11 @@ const InputNumber = _ref => {
|
|
|
42193
42935
|
onChange(newNum);
|
|
42194
42936
|
}, [onChange, setNumberValue, step, numberValue, handleMinMax]);
|
|
42195
42937
|
return /*#__PURE__*/react.createElement("div", {
|
|
42938
|
+
className: 'flex flex-col flex-1'
|
|
42939
|
+
}, label && /*#__PURE__*/react.createElement(components_Label, {
|
|
42940
|
+
className: labelClassName,
|
|
42941
|
+
text: label
|
|
42942
|
+
}), /*#__PURE__*/react.createElement("div", {
|
|
42196
42943
|
className: `flex items-center bg-black border-2 px-1 overflow-hidden justify-center border-secondary-light rounded-md ${sizesClasses[size]} ${className ? className : ''}`
|
|
42197
42944
|
}, /*#__PURE__*/react.createElement("div", {
|
|
42198
42945
|
className: "flex"
|
|
@@ -42221,7 +42968,7 @@ const InputNumber = _ref => {
|
|
|
42221
42968
|
onClick: handleDecrement
|
|
42222
42969
|
}, /*#__PURE__*/react.createElement(Icon/* default */.Z, {
|
|
42223
42970
|
name: "ui-arrow-down"
|
|
42224
|
-
})))));
|
|
42971
|
+
}))))));
|
|
42225
42972
|
};
|
|
42226
42973
|
/* harmony default export */ const InputNumber_InputNumber = (InputNumber);
|
|
42227
42974
|
;// CONCATENATED MODULE: ../../ui/src/components/InputNumber/index.js
|
|
@@ -54848,7 +55595,7 @@ const SidePanel = _ref => {
|
|
|
54848
55595
|
},
|
|
54849
55596
|
|
|
54850
55597
|
"data-cy": `side-panel-header-${side}`
|
|
54851
|
-
}, /*#__PURE__*/react.createElement(
|
|
55598
|
+
}, /*#__PURE__*/react.createElement(components_LegacyButton, {
|
|
54852
55599
|
variant: "text",
|
|
54853
55600
|
color: "inherit",
|
|
54854
55601
|
border: "none",
|
|
@@ -55266,7 +56013,8 @@ const SplitButton = _ref7 => {
|
|
|
55266
56013
|
};
|
|
55267
56014
|
const listItemRenderer = renderer || DefaultListItemRenderer;
|
|
55268
56015
|
return /*#__PURE__*/react.createElement(react_outside_click_handler["default"], {
|
|
55269
|
-
onOutsideClick: outsideClickHandler
|
|
56016
|
+
onOutsideClick: outsideClickHandler,
|
|
56017
|
+
disabled: !state.isExpanded
|
|
55270
56018
|
}, /*#__PURE__*/react.createElement("div", {
|
|
55271
56019
|
name: "SplitButton",
|
|
55272
56020
|
className: "relative"
|
|
@@ -56006,7 +56754,7 @@ const StudyBrowser = _ref => {
|
|
|
56006
56754
|
false: 'default'
|
|
56007
56755
|
};
|
|
56008
56756
|
const color = classStudyBrowser[`${isActive}`];
|
|
56009
|
-
return /*#__PURE__*/react.createElement(
|
|
56757
|
+
return /*#__PURE__*/react.createElement(components_LegacyButton, {
|
|
56010
56758
|
key: name,
|
|
56011
56759
|
className: 'text-white text-base p-2 min-w-18',
|
|
56012
56760
|
size: "initial",
|
|
@@ -56396,7 +57144,7 @@ const StudyListFilter = _ref => {
|
|
|
56396
57144
|
name: "icon-upload"
|
|
56397
57145
|
}), /*#__PURE__*/react.createElement("span", null, "Upload"))), /*#__PURE__*/react.createElement("div", {
|
|
56398
57146
|
className: "flex flex-row"
|
|
56399
|
-
}, isFiltering && /*#__PURE__*/react.createElement(
|
|
57147
|
+
}, isFiltering && /*#__PURE__*/react.createElement(components_LegacyButton, {
|
|
56400
57148
|
rounded: "full",
|
|
56401
57149
|
variant: "outlined",
|
|
56402
57150
|
color: "primaryActive",
|
|
@@ -56523,21 +57271,21 @@ const StudyListPagination = _ref => {
|
|
|
56523
57271
|
className: "flex items-center"
|
|
56524
57272
|
}, /*#__PURE__*/react.createElement(Typography/* default */.Z, {
|
|
56525
57273
|
className: "opacity-60 mr-4 text-base"
|
|
56526
|
-
}, t('Page'), " ", currentPage), /*#__PURE__*/react.createElement(components_ButtonGroup, null, /*#__PURE__*/react.createElement(
|
|
57274
|
+
}, t('Page'), " ", currentPage), /*#__PURE__*/react.createElement(components_ButtonGroup, null, /*#__PURE__*/react.createElement(components_LegacyButton, {
|
|
56527
57275
|
size: "initial",
|
|
56528
57276
|
className: "px-4 py-2 text-base",
|
|
56529
57277
|
color: "translucent",
|
|
56530
57278
|
border: "primary",
|
|
56531
57279
|
variant: "outlined",
|
|
56532
57280
|
onClick: () => navigateToPage(1)
|
|
56533
|
-
}, `<<`), /*#__PURE__*/react.createElement(
|
|
57281
|
+
}, `<<`), /*#__PURE__*/react.createElement(components_LegacyButton, {
|
|
56534
57282
|
size: "initial",
|
|
56535
57283
|
className: "py-2 px-2 text-base",
|
|
56536
57284
|
color: "translucent",
|
|
56537
57285
|
border: "primary",
|
|
56538
57286
|
variant: "outlined",
|
|
56539
57287
|
onClick: () => navigateToPage(currentPage - 1)
|
|
56540
|
-
}, t('Previous')), /*#__PURE__*/react.createElement(
|
|
57288
|
+
}, t('Previous')), /*#__PURE__*/react.createElement(components_LegacyButton, {
|
|
56541
57289
|
size: "initial",
|
|
56542
57290
|
className: "py-2 px-4 text-base",
|
|
56543
57291
|
color: "translucent",
|
|
@@ -56649,7 +57397,8 @@ StudyListTableRow.propTypes = {
|
|
|
56649
57397
|
|
|
56650
57398
|
const StudyListTable_StudyListTable = _ref => {
|
|
56651
57399
|
let {
|
|
56652
|
-
tableDataSource
|
|
57400
|
+
tableDataSource,
|
|
57401
|
+
querying
|
|
56653
57402
|
} = _ref;
|
|
56654
57403
|
return /*#__PURE__*/react.createElement("div", {
|
|
56655
57404
|
className: "bg-black"
|
|
@@ -56658,7 +57407,8 @@ const StudyListTable_StudyListTable = _ref => {
|
|
|
56658
57407
|
}, /*#__PURE__*/react.createElement("table", {
|
|
56659
57408
|
className: "w-full text-white"
|
|
56660
57409
|
}, /*#__PURE__*/react.createElement("tbody", {
|
|
56661
|
-
"data-cy": "study-list-results"
|
|
57410
|
+
"data-cy": "study-list-results",
|
|
57411
|
+
"data-querying": querying
|
|
56662
57412
|
}, tableDataSource.map((tableData, i) => {
|
|
56663
57413
|
return /*#__PURE__*/react.createElement(StudyListTable_StudyListTableRow, {
|
|
56664
57414
|
tableData: tableData,
|
|
@@ -56670,6 +57420,7 @@ StudyListTable_StudyListTable.propTypes = {
|
|
|
56670
57420
|
tableDataSource: prop_types_default().arrayOf(prop_types_default().shape({
|
|
56671
57421
|
row: (prop_types_default()).array.isRequired,
|
|
56672
57422
|
expandedContent: (prop_types_default()).node.isRequired,
|
|
57423
|
+
querying: (prop_types_default()).bool,
|
|
56673
57424
|
onClickRow: (prop_types_default()).func.isRequired,
|
|
56674
57425
|
isExpanded: (prop_types_default()).bool.isRequired
|
|
56675
57426
|
}))
|
|
@@ -57368,19 +58119,15 @@ const ViewportDownloadForm = _ref => {
|
|
|
57368
58119
|
}, t('Active viewport has no displayed image')))), /*#__PURE__*/react.createElement("div", {
|
|
57369
58120
|
className: "flex justify-end mt-4"
|
|
57370
58121
|
}, /*#__PURE__*/react.createElement(components_Button, {
|
|
57371
|
-
|
|
57372
|
-
|
|
57373
|
-
|
|
57374
|
-
color: "black",
|
|
57375
|
-
border: "secondary",
|
|
57376
|
-
onClick: onClose,
|
|
57377
|
-
className: "p-2"
|
|
58122
|
+
name: "cancel",
|
|
58123
|
+
type: type.secondary,
|
|
58124
|
+
onClick: onClose
|
|
57378
58125
|
}, t('Cancel')), /*#__PURE__*/react.createElement(components_Button, {
|
|
57379
58126
|
className: "ml-2",
|
|
57380
58127
|
disabled: hasError,
|
|
57381
58128
|
onClick: downloadImage,
|
|
57382
|
-
|
|
57383
|
-
|
|
58129
|
+
type: type.primary,
|
|
58130
|
+
name: 'download'
|
|
57384
58131
|
}, t('Download'))));
|
|
57385
58132
|
};
|
|
57386
58133
|
/* harmony default export */ const ViewportDownloadForm_ViewportDownloadForm = (ViewportDownloadForm);
|
|
@@ -57974,6 +58721,7 @@ HotkeysPreferences.defaultProps = {
|
|
|
57974
58721
|
|
|
57975
58722
|
|
|
57976
58723
|
|
|
58724
|
+
|
|
57977
58725
|
const UserPreferences = _ref => {
|
|
57978
58726
|
let {
|
|
57979
58727
|
availableLanguages,
|
|
@@ -58070,21 +58818,16 @@ const UserPreferences = _ref => {
|
|
|
58070
58818
|
})), /*#__PURE__*/react.createElement("div", {
|
|
58071
58819
|
className: "flex flex-row justify-between"
|
|
58072
58820
|
}, /*#__PURE__*/react.createElement(components_Button, {
|
|
58073
|
-
|
|
58074
|
-
border: "light",
|
|
58821
|
+
type: type.secondary,
|
|
58075
58822
|
onClick: onResetHandler,
|
|
58076
58823
|
disabled: disabled
|
|
58077
58824
|
}, t('Reset to Defaults')), /*#__PURE__*/react.createElement("div", {
|
|
58078
58825
|
className: "flex flex-row"
|
|
58079
58826
|
}, /*#__PURE__*/react.createElement(components_Button, {
|
|
58080
|
-
|
|
58081
|
-
border: "light",
|
|
58827
|
+
type: type.secondary,
|
|
58082
58828
|
onClick: onCancelHandler
|
|
58083
58829
|
}, t('Cancel')), /*#__PURE__*/react.createElement(components_Button, {
|
|
58084
|
-
variant: "contained",
|
|
58085
58830
|
disabled: state.isDisabled,
|
|
58086
|
-
color: "light",
|
|
58087
|
-
border: "light",
|
|
58088
58831
|
className: "ml-2",
|
|
58089
58832
|
onClick: onSubmitHandler
|
|
58090
58833
|
}, t('Save')))));
|
|
@@ -58807,6 +59550,8 @@ ViewportActionBar.propTypes = {
|
|
|
58807
59550
|
|
|
58808
59551
|
|
|
58809
59552
|
|
|
59553
|
+
|
|
59554
|
+
|
|
58810
59555
|
|
|
58811
59556
|
|
|
58812
59557
|
|
|
@@ -148004,7 +148749,6 @@ module.exports = warning;
|
|
|
148004
148749
|
"use strict";
|
|
148005
148750
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
148006
148751
|
/* harmony export */ AW: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_1__.AW),
|
|
148007
|
-
/* harmony export */ TH: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_1__.TH),
|
|
148008
148752
|
/* harmony export */ VK: () => (/* binding */ BrowserRouter),
|
|
148009
148753
|
/* harmony export */ Z5: () => (/* reexport safe */ react_router__WEBPACK_IMPORTED_MODULE_1__.Z5),
|
|
148010
148754
|
/* harmony export */ rU: () => (/* binding */ Link),
|
|
@@ -153878,7 +154622,7 @@ var selectOrdinal = function selectOrdinal() {
|
|
|
153878
154622
|
/******/ // This function allow to reference async chunks
|
|
153879
154623
|
/******/ __webpack_require__.u = (chunkId) => {
|
|
153880
154624
|
/******/ // return url for filenames based on template
|
|
153881
|
-
/******/ return "" + (chunkId === 18 ? "dicom-microscopy-viewer" : chunkId) + ".bundle." + {"18":"aa60bdf008c32c39cfd7","50":"
|
|
154625
|
+
/******/ return "" + (chunkId === 18 ? "dicom-microscopy-viewer" : chunkId) + ".bundle." + {"18":"aa60bdf008c32c39cfd7","50":"7def59ad0bc69d63790b","55":"fe53f3784bfe7db4a5a5","82":"9affd6d9fbce4d32e826","151":"31ea35044218837bf73f","192":"b2863bbbf41f16203af7","199":"af3f8b331f3b030fe4b1","205":"b5a473c200dcf2bbcdb4","208":"a27d931468daecfff934","270":"2d215f8720350f03e171","283":"76f6d48710f450ccd0f3","295":"957b1159fec14b9199a1","381":"0905e683605fcbc0895f","389":"38df7e54d2f632cfa7a0","404":"02cea2f3b08cdbe8ceee","468":"84576e0c0e8a7bdcfb90","531":"2a82fb1d69e5b57cc72b","569":"e77c17d37a65e5dedfed","581":"15078e71fe52b53f48b3","606":"5d876f5f3dd8287f0a28","616":"b159e7f111ada286d862","625":"7e4bece1b4ef5dc300a8","642":"ac0c06c27fc4366de343","664":"09abae984223969d1bde","728":"5bef7c8643b42d70a79f","744":"0be683bc1498cc0d89ef","780":"fd0f13dc92e9caa0581e","790":"18db48c8d89ce04e57bc","799":"d8e50f1fd6bf4fa3a5e1","806":"2e7934d0833c4315c292","917":"cba9223eb2a6dfea6066","926":"dbc9d0e591cb9217fda2","935":"deeffff0e4f7b528e3c3","953":"95b0621f1da8dfeaed8a","973":"fa8a13ecc41ff54fb82b","976":"19dac9a84b453d2c4dbb","984":"3623bc3bc26748a21d00"}[chunkId] + ".js";
|
|
153882
154626
|
/******/ };
|
|
153883
154627
|
/******/ })();
|
|
153884
154628
|
/******/
|
|
@@ -154040,7 +154784,7 @@ var selectOrdinal = function selectOrdinal() {
|
|
|
154040
154784
|
/******/ };
|
|
154041
154785
|
/******/
|
|
154042
154786
|
/******/ __webpack_require__.f.miniCss = (chunkId, promises) => {
|
|
154043
|
-
/******/ var cssChunks = {"55":1,"
|
|
154787
|
+
/******/ var cssChunks = {"55":1,"468":1,"625":1,"806":1};
|
|
154044
154788
|
/******/ if(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);
|
|
154045
154789
|
/******/ else if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {
|
|
154046
154790
|
/******/ promises.push(installedCssChunks[chunkId] = loadStylesheet(chunkId).then(() => {
|
|
@@ -154167,13 +154911,13 @@ var selectOrdinal = function selectOrdinal() {
|
|
|
154167
154911
|
/******/ "616": [
|
|
154168
154912
|
/******/ 569
|
|
154169
154913
|
/******/ ],
|
|
154914
|
+
/******/ "625": [
|
|
154915
|
+
/******/ 664,
|
|
154916
|
+
/******/ 468
|
|
154917
|
+
/******/ ],
|
|
154170
154918
|
/******/ "642": [
|
|
154171
154919
|
/******/ 295
|
|
154172
154920
|
/******/ ],
|
|
154173
|
-
/******/ "707": [
|
|
154174
|
-
/******/ 664,
|
|
154175
|
-
/******/ 351
|
|
154176
|
-
/******/ ],
|
|
154177
154921
|
/******/ "744": [
|
|
154178
154922
|
/******/ 953,
|
|
154179
154923
|
/******/ 799
|