@adelant/ipp-browser
Version:
ipp-browser is a powerful library that brings the power of Internet Printing Protocol (IPP) directly into the browser. With this library, you can easily integrate printing to IPP-compatible network devices directly from your web applications without havin
6 lines • 109 kB
JavaScript
(function(ae,re){typeof exports=="object"&&typeof module<"u"?re(exports):typeof define=="function"&&define.amd?define(["exports"],re):(ae=typeof globalThis<"u"?globalThis:ae||self,re(ae["@adelant/ipp-browser"]={}))})(this,function(ae){"use strict";var Ct=Object.defineProperty;var Rt=(ae,re,le)=>re in ae?Ct(ae,re,{enumerable:!0,configurable:!0,writable:!0,value:le}):ae[re]=le;var je=(ae,re,le)=>Rt(ae,typeof re!="symbol"?re+"":re,le);var re={},le={},Oe;function nt(){if(Oe)return le;Oe=1,le.byteLength=u,le.toByteArray=Q,le.fromByteArray=ie;for(var l=[],f=[],g=typeof Uint8Array<"u"?Uint8Array:Array,_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",v=0,F=_.length;v<F;++v)l[v]=_[v],f[_.charCodeAt(v)]=v;f[45]=62,f[95]=63;function E(k){var C=k.length;if(C%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var D=k.indexOf("=");D===-1&&(D=C);var O=D===C?0:4-D%4;return[D,O]}function u(k){var C=E(k),D=C[0],O=C[1];return(D+O)*3/4-O}function V(k,C,D){return(C+D)*3/4-D}function Q(k){var C,D=E(k),O=D[0],B=D[1],h=new g(V(k,O,B)),x=0,T=B>0?O-4:O,S;for(S=0;S<T;S+=4)C=f[k.charCodeAt(S)]<<18|f[k.charCodeAt(S+1)]<<12|f[k.charCodeAt(S+2)]<<6|f[k.charCodeAt(S+3)],h[x++]=C>>16&255,h[x++]=C>>8&255,h[x++]=C&255;return B===2&&(C=f[k.charCodeAt(S)]<<2|f[k.charCodeAt(S+1)]>>4,h[x++]=C&255),B===1&&(C=f[k.charCodeAt(S)]<<10|f[k.charCodeAt(S+1)]<<4|f[k.charCodeAt(S+2)]>>2,h[x++]=C>>8&255,h[x++]=C&255),h}function W(k){return l[k>>18&63]+l[k>>12&63]+l[k>>6&63]+l[k&63]}function N(k,C,D){for(var O,B=[],h=C;h<D;h+=3)O=(k[h]<<16&16711680)+(k[h+1]<<8&65280)+(k[h+2]&255),B.push(W(O));return B.join("")}function ie(k){for(var C,D=k.length,O=D%3,B=[],h=16383,x=0,T=D-O;x<T;x+=h)B.push(N(k,x,x+h>T?T:x+h));return O===1?(C=k[D-1],B.push(l[C>>2]+l[C<<4&63]+"==")):O===2&&(C=(k[D-2]<<8)+k[D-1],B.push(l[C>>10]+l[C>>4&63]+l[C<<2&63]+"=")),B.join("")}return le}var Ie={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var ze;function at(){return ze||(ze=1,Ie.read=function(l,f,g,_,v){var F,E,u=v*8-_-1,V=(1<<u)-1,Q=V>>1,W=-7,N=g?v-1:0,ie=g?-1:1,k=l[f+N];for(N+=ie,F=k&(1<<-W)-1,k>>=-W,W+=u;W>0;F=F*256+l[f+N],N+=ie,W-=8);for(E=F&(1<<-W)-1,F>>=-W,W+=_;W>0;E=E*256+l[f+N],N+=ie,W-=8);if(F===0)F=1-Q;else{if(F===V)return E?NaN:(k?-1:1)*(1/0);E=E+Math.pow(2,_),F=F-Q}return(k?-1:1)*E*Math.pow(2,F-_)},Ie.write=function(l,f,g,_,v,F){var E,u,V,Q=F*8-v-1,W=(1<<Q)-1,N=W>>1,ie=v===23?Math.pow(2,-24)-Math.pow(2,-77):0,k=_?0:F-1,C=_?1:-1,D=f<0||f===0&&1/f<0?1:0;for(f=Math.abs(f),isNaN(f)||f===1/0?(u=isNaN(f)?1:0,E=W):(E=Math.floor(Math.log(f)/Math.LN2),f*(V=Math.pow(2,-E))<1&&(E--,V*=2),E+N>=1?f+=ie/V:f+=ie*Math.pow(2,1-N),f*V>=2&&(E++,V/=2),E+N>=W?(u=0,E=W):E+N>=1?(u=(f*V-1)*Math.pow(2,v),E=E+N):(u=f*Math.pow(2,N-1)*Math.pow(2,v),E=0));v>=8;l[g+k]=u&255,k+=C,u/=256,v-=8);for(E=E<<v|u,Q+=v;Q>0;l[g+k]=E&255,k+=C,E/=256,Q-=8);l[g+k-C]|=D*128}),Ie}/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/var $e;function st(){return $e||($e=1,function(l){const f=nt(),g=at(),_=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;l.Buffer=u,l.SlowBuffer=h,l.INSPECT_MAX_BYTES=50;const v=2147483647;l.kMaxLength=v,u.TYPED_ARRAY_SUPPORT=F(),!u.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function F(){try{const r=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(r,e),r.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function E(r){if(r>v)throw new RangeError('The value "'+r+'" is invalid for option "size"');const e=new Uint8Array(r);return Object.setPrototypeOf(e,u.prototype),e}function u(r,e,t){if(typeof r=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return N(r)}return V(r,e,t)}u.poolSize=8192;function V(r,e,t){if(typeof r=="string")return ie(r,e);if(ArrayBuffer.isView(r))return C(r);if(r==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if(fe(r,ArrayBuffer)||r&&fe(r.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(fe(r,SharedArrayBuffer)||r&&fe(r.buffer,SharedArrayBuffer)))return D(r,e,t);if(typeof r=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const i=r.valueOf&&r.valueOf();if(i!=null&&i!==r)return u.from(i,e,t);const s=O(r);if(s)return s;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof r[Symbol.toPrimitive]=="function")return u.from(r[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}u.from=function(r,e,t){return V(r,e,t)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array);function Q(r){if(typeof r!="number")throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function W(r,e,t){return Q(r),r<=0?E(r):e!==void 0?typeof t=="string"?E(r).fill(e,t):E(r).fill(e):E(r)}u.alloc=function(r,e,t){return W(r,e,t)};function N(r){return Q(r),E(r<0?0:B(r)|0)}u.allocUnsafe=function(r){return N(r)},u.allocUnsafeSlow=function(r){return N(r)};function ie(r,e){if((typeof e!="string"||e==="")&&(e="utf8"),!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const t=x(r,e)|0;let i=E(t);const s=i.write(r,e);return s!==t&&(i=i.slice(0,s)),i}function k(r){const e=r.length<0?0:B(r.length)|0,t=E(e);for(let i=0;i<e;i+=1)t[i]=r[i]&255;return t}function C(r){if(fe(r,Uint8Array)){const e=new Uint8Array(r);return D(e.buffer,e.byteOffset,e.byteLength)}return k(r)}function D(r,e,t){if(e<0||r.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(r.byteLength<e+(t||0))throw new RangeError('"length" is outside of buffer bounds');let i;return e===void 0&&t===void 0?i=new Uint8Array(r):t===void 0?i=new Uint8Array(r,e):i=new Uint8Array(r,e,t),Object.setPrototypeOf(i,u.prototype),i}function O(r){if(u.isBuffer(r)){const e=B(r.length)|0,t=E(e);return t.length===0||r.copy(t,0,0,e),t}if(r.length!==void 0)return typeof r.length!="number"||Pe(r.length)?E(0):k(r);if(r.type==="Buffer"&&Array.isArray(r.data))return k(r.data)}function B(r){if(r>=v)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+v.toString(16)+" bytes");return r|0}function h(r){return+r!=r&&(r=0),u.alloc(+r)}u.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==u.prototype},u.compare=function(e,t){if(fe(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),fe(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let i=e.length,s=t.length;for(let p=0,m=Math.min(i,s);p<m;++p)if(e[p]!==t[p]){i=e[p],s=t[p];break}return i<s?-1:s<i?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return u.alloc(0);let i;if(t===void 0)for(t=0,i=0;i<e.length;++i)t+=e[i].length;const s=u.allocUnsafe(t);let p=0;for(i=0;i<e.length;++i){let m=e[i];if(fe(m,Uint8Array))p+m.length>s.length?(u.isBuffer(m)||(m=u.from(m)),m.copy(s,p)):Uint8Array.prototype.set.call(s,m,p);else if(u.isBuffer(m))m.copy(s,p);else throw new TypeError('"list" argument must be an Array of Buffers');p+=m.length}return s};function x(r,e){if(u.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||fe(r,ArrayBuffer))return r.byteLength;if(typeof r!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);const t=r.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&t===0)return 0;let s=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return Ne(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return ot(r).length;default:if(s)return i?-1:Ne(r).length;e=(""+e).toLowerCase(),s=!0}}u.byteLength=x;function T(r,e,t){let i=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(r||(r="utf8");;)switch(r){case"hex":return Bt(this,e,t);case"utf8":case"utf-8":return Ye(this,e,t);case"ascii":return jt(this,e,t);case"latin1":case"binary":return kt(this,e,t);case"base64":return vt(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Et(this,e,t);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),i=!0}}u.prototype._isBuffer=!0;function S(r,e,t){const i=r[e];r[e]=r[t],r[t]=i}u.prototype.swap16=function(){const e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)S(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)S(this,t,t+3),S(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)S(this,t,t+7),S(this,t+1,t+6),S(this,t+2,t+5),S(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return e===0?"":arguments.length===0?Ye(this,0,e):T.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:u.compare(this,e)===0},u.prototype.inspect=function(){let e="";const t=l.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},_&&(u.prototype[_]=u.prototype.inspect),u.prototype.compare=function(e,t,i,s,p){if(fe(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),i===void 0&&(i=e?e.length:0),s===void 0&&(s=0),p===void 0&&(p=this.length),t<0||i>e.length||s<0||p>this.length)throw new RangeError("out of range index");if(s>=p&&t>=i)return 0;if(s>=p)return-1;if(t>=i)return 1;if(t>>>=0,i>>>=0,s>>>=0,p>>>=0,this===e)return 0;let m=p-s,q=i-t;const H=Math.min(m,q),z=this.slice(s,p),Y=e.slice(t,i);for(let P=0;P<H;++P)if(z[P]!==Y[P]){m=z[P],q=Y[P];break}return m<q?-1:q<m?1:0};function X(r,e,t,i,s){if(r.length===0)return-1;if(typeof t=="string"?(i=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,Pe(t)&&(t=s?0:r.length-1),t<0&&(t=r.length+t),t>=r.length){if(s)return-1;t=r.length-1}else if(t<0)if(s)t=0;else return-1;if(typeof e=="string"&&(e=u.from(e,i)),u.isBuffer(e))return e.length===0?-1:oe(r,e,t,i,s);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?s?Uint8Array.prototype.indexOf.call(r,e,t):Uint8Array.prototype.lastIndexOf.call(r,e,t):oe(r,[e],t,i,s);throw new TypeError("val must be string, number or Buffer")}function oe(r,e,t,i,s){let p=1,m=r.length,q=e.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(r.length<2||e.length<2)return-1;p=2,m/=2,q/=2,t/=2}function H(Y,P){return p===1?Y[P]:Y.readUInt16BE(P*p)}let z;if(s){let Y=-1;for(z=t;z<m;z++)if(H(r,z)===H(e,Y===-1?0:z-Y)){if(Y===-1&&(Y=z),z-Y+1===q)return Y*p}else Y!==-1&&(z-=z-Y),Y=-1}else for(t+q>m&&(t=m-q),z=t;z>=0;z--){let Y=!0;for(let P=0;P<q;P++)if(H(r,z+P)!==H(e,P)){Y=!1;break}if(Y)return z}return-1}u.prototype.includes=function(e,t,i){return this.indexOf(e,t,i)!==-1},u.prototype.indexOf=function(e,t,i){return X(this,e,t,i,!0)},u.prototype.lastIndexOf=function(e,t,i){return X(this,e,t,i,!1)};function he(r,e,t,i){t=Number(t)||0;const s=r.length-t;i?(i=Number(i),i>s&&(i=s)):i=s;const p=e.length;i>p/2&&(i=p/2);let m;for(m=0;m<i;++m){const q=parseInt(e.substr(m*2,2),16);if(Pe(q))return m;r[t+m]=q}return m}function Le(r,e,t,i){return Se(Ne(e,r.length-t),r,t,i)}function Ue(r,e,t,i){return Se(Ft(e),r,t,i)}function Be(r,e,t,i){return Se(ot(e),r,t,i)}function wt(r,e,t,i){return Se(Ut(e,r.length-t),r,t,i)}u.prototype.write=function(e,t,i,s){if(t===void 0)s="utf8",i=this.length,t=0;else if(i===void 0&&typeof t=="string")s=t,i=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(i)?(i=i>>>0,s===void 0&&(s="utf8")):(s=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const p=this.length-t;if((i===void 0||i>p)&&(i=p),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");s||(s="utf8");let m=!1;for(;;)switch(s){case"hex":return he(this,e,t,i);case"utf8":case"utf-8":return Le(this,e,t,i);case"ascii":case"latin1":case"binary":return Ue(this,e,t,i);case"base64":return Be(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return wt(this,e,t,i);default:if(m)throw new TypeError("Unknown encoding: "+s);s=(""+s).toLowerCase(),m=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function vt(r,e,t){return e===0&&t===r.length?f.fromByteArray(r):f.fromByteArray(r.slice(e,t))}function Ye(r,e,t){t=Math.min(r.length,t);const i=[];let s=e;for(;s<t;){const p=r[s];let m=null,q=p>239?4:p>223?3:p>191?2:1;if(s+q<=t){let H,z,Y,P;switch(q){case 1:p<128&&(m=p);break;case 2:H=r[s+1],(H&192)===128&&(P=(p&31)<<6|H&63,P>127&&(m=P));break;case 3:H=r[s+1],z=r[s+2],(H&192)===128&&(z&192)===128&&(P=(p&15)<<12|(H&63)<<6|z&63,P>2047&&(P<55296||P>57343)&&(m=P));break;case 4:H=r[s+1],z=r[s+2],Y=r[s+3],(H&192)===128&&(z&192)===128&&(Y&192)===128&&(P=(p&15)<<18|(H&63)<<12|(z&63)<<6|Y&63,P>65535&&P<1114112&&(m=P))}}m===null?(m=65533,q=1):m>65535&&(m-=65536,i.push(m>>>10&1023|55296),m=56320|m&1023),i.push(m),s+=q}return _t(i)}const Xe=4096;function _t(r){const e=r.length;if(e<=Xe)return String.fromCharCode.apply(String,r);let t="",i=0;for(;i<e;)t+=String.fromCharCode.apply(String,r.slice(i,i+=Xe));return t}function jt(r,e,t){let i="";t=Math.min(r.length,t);for(let s=e;s<t;++s)i+=String.fromCharCode(r[s]&127);return i}function kt(r,e,t){let i="";t=Math.min(r.length,t);for(let s=e;s<t;++s)i+=String.fromCharCode(r[s]);return i}function Bt(r,e,t){const i=r.length;(!e||e<0)&&(e=0),(!t||t<0||t>i)&&(t=i);let s="";for(let p=e;p<t;++p)s+=St[r[p]];return s}function Et(r,e,t){const i=r.slice(e,t);let s="";for(let p=0;p<i.length-1;p+=2)s+=String.fromCharCode(i[p]+i[p+1]*256);return s}u.prototype.slice=function(e,t){const i=this.length;e=~~e,t=t===void 0?i:~~t,e<0?(e+=i,e<0&&(e=0)):e>i&&(e=i),t<0?(t+=i,t<0&&(t=0)):t>i&&(t=i),t<e&&(t=e);const s=this.subarray(e,t);return Object.setPrototypeOf(s,u.prototype),s};function Z(r,e,t){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+e>t)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,i){e=e>>>0,t=t>>>0,i||Z(e,t,this.length);let s=this[e],p=1,m=0;for(;++m<t&&(p*=256);)s+=this[e+m]*p;return s},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,i){e=e>>>0,t=t>>>0,i||Z(e,t,this.length);let s=this[e+--t],p=1;for(;t>0&&(p*=256);)s+=this[e+--t]*p;return s},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e=e>>>0,t||Z(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||Z(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||Z(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||Z(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||Z(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=ge(function(e){e=e>>>0,_e(e,"offset");const t=this[e],i=this[e+7];(t===void 0||i===void 0)&&Ee(e,this.length-8);const s=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,p=this[++e]+this[++e]*2**8+this[++e]*2**16+i*2**24;return BigInt(s)+(BigInt(p)<<BigInt(32))}),u.prototype.readBigUInt64BE=ge(function(e){e=e>>>0,_e(e,"offset");const t=this[e],i=this[e+7];(t===void 0||i===void 0)&&Ee(e,this.length-8);const s=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],p=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+i;return(BigInt(s)<<BigInt(32))+BigInt(p)}),u.prototype.readIntLE=function(e,t,i){e=e>>>0,t=t>>>0,i||Z(e,t,this.length);let s=this[e],p=1,m=0;for(;++m<t&&(p*=256);)s+=this[e+m]*p;return p*=128,s>=p&&(s-=Math.pow(2,8*t)),s},u.prototype.readIntBE=function(e,t,i){e=e>>>0,t=t>>>0,i||Z(e,t,this.length);let s=t,p=1,m=this[e+--s];for(;s>0&&(p*=256);)m+=this[e+--s]*p;return p*=128,m>=p&&(m-=Math.pow(2,8*t)),m},u.prototype.readInt8=function(e,t){return e=e>>>0,t||Z(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},u.prototype.readInt16LE=function(e,t){e=e>>>0,t||Z(e,2,this.length);const i=this[e]|this[e+1]<<8;return i&32768?i|4294901760:i},u.prototype.readInt16BE=function(e,t){e=e>>>0,t||Z(e,2,this.length);const i=this[e+1]|this[e]<<8;return i&32768?i|4294901760:i},u.prototype.readInt32LE=function(e,t){return e=e>>>0,t||Z(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e=e>>>0,t||Z(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=ge(function(e){e=e>>>0,_e(e,"offset");const t=this[e],i=this[e+7];(t===void 0||i===void 0)&&Ee(e,this.length-8);const s=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(i<<24);return(BigInt(s)<<BigInt(32))+BigInt(t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)}),u.prototype.readBigInt64BE=ge(function(e){e=e>>>0,_e(e,"offset");const t=this[e],i=this[e+7];(t===void 0||i===void 0)&&Ee(e,this.length-8);const s=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(s)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+i)}),u.prototype.readFloatLE=function(e,t){return e=e>>>0,t||Z(e,4,this.length),g.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e=e>>>0,t||Z(e,4,this.length),g.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||Z(e,8,this.length),g.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||Z(e,8,this.length),g.read(this,e,!1,52,8)};function ne(r,e,t,i,s,p){if(!u.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>s||e<p)throw new RangeError('"value" argument is out of bounds');if(t+i>r.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,i,s){if(e=+e,t=t>>>0,i=i>>>0,!s){const q=Math.pow(2,8*i)-1;ne(this,e,t,i,q,0)}let p=1,m=0;for(this[t]=e&255;++m<i&&(p*=256);)this[t+m]=e/p&255;return t+i},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,i,s){if(e=+e,t=t>>>0,i=i>>>0,!s){const q=Math.pow(2,8*i)-1;ne(this,e,t,i,q,0)}let p=i-1,m=1;for(this[t+p]=e&255;--p>=0&&(m*=256);)this[t+p]=e/m&255;return t+i},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,i){return e=+e,t=t>>>0,i||ne(this,e,t,1,255,0),this[t]=e&255,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,i){return e=+e,t=t>>>0,i||ne(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,i){return e=+e,t=t>>>0,i||ne(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,i){return e=+e,t=t>>>0,i||ne(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,i){return e=+e,t=t>>>0,i||ne(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function Ke(r,e,t,i,s){it(e,i,s,r,t,7);let p=Number(e&BigInt(4294967295));r[t++]=p,p=p>>8,r[t++]=p,p=p>>8,r[t++]=p,p=p>>8,r[t++]=p;let m=Number(e>>BigInt(32)&BigInt(4294967295));return r[t++]=m,m=m>>8,r[t++]=m,m=m>>8,r[t++]=m,m=m>>8,r[t++]=m,t}function Ze(r,e,t,i,s){it(e,i,s,r,t,7);let p=Number(e&BigInt(4294967295));r[t+7]=p,p=p>>8,r[t+6]=p,p=p>>8,r[t+5]=p,p=p>>8,r[t+4]=p;let m=Number(e>>BigInt(32)&BigInt(4294967295));return r[t+3]=m,m=m>>8,r[t+2]=m,m=m>>8,r[t+1]=m,m=m>>8,r[t]=m,t+8}u.prototype.writeBigUInt64LE=ge(function(e,t=0){return Ke(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=ge(function(e,t=0){return Ze(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(e,t,i,s){if(e=+e,t=t>>>0,!s){const H=Math.pow(2,8*i-1);ne(this,e,t,i,H-1,-H)}let p=0,m=1,q=0;for(this[t]=e&255;++p<i&&(m*=256);)e<0&&q===0&&this[t+p-1]!==0&&(q=1),this[t+p]=(e/m>>0)-q&255;return t+i},u.prototype.writeIntBE=function(e,t,i,s){if(e=+e,t=t>>>0,!s){const H=Math.pow(2,8*i-1);ne(this,e,t,i,H-1,-H)}let p=i-1,m=1,q=0;for(this[t+p]=e&255;--p>=0&&(m*=256);)e<0&&q===0&&this[t+p+1]!==0&&(q=1),this[t+p]=(e/m>>0)-q&255;return t+i},u.prototype.writeInt8=function(e,t,i){return e=+e,t=t>>>0,i||ne(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},u.prototype.writeInt16LE=function(e,t,i){return e=+e,t=t>>>0,i||ne(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,i){return e=+e,t=t>>>0,i||ne(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},u.prototype.writeInt32LE=function(e,t,i){return e=+e,t=t>>>0,i||ne(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,i){return e=+e,t=t>>>0,i||ne(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},u.prototype.writeBigInt64LE=ge(function(e,t=0){return Ke(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=ge(function(e,t=0){return Ze(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Qe(r,e,t,i,s,p){if(t+i>r.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function et(r,e,t,i,s){return e=+e,t=t>>>0,s||Qe(r,e,t,4),g.write(r,e,t,i,23,4),t+4}u.prototype.writeFloatLE=function(e,t,i){return et(this,e,t,!0,i)},u.prototype.writeFloatBE=function(e,t,i){return et(this,e,t,!1,i)};function tt(r,e,t,i,s){return e=+e,t=t>>>0,s||Qe(r,e,t,8),g.write(r,e,t,i,52,8),t+8}u.prototype.writeDoubleLE=function(e,t,i){return tt(this,e,t,!0,i)},u.prototype.writeDoubleBE=function(e,t,i){return tt(this,e,t,!1,i)},u.prototype.copy=function(e,t,i,s){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),!s&&s!==0&&(s=this.length),t>=e.length&&(t=e.length),t||(t=0),s>0&&s<i&&(s=i),s===i||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(s<0)throw new RangeError("sourceEnd out of bounds");s>this.length&&(s=this.length),e.length-t<s-i&&(s=e.length-t+i);const p=s-i;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,i,s):Uint8Array.prototype.set.call(e,this.subarray(i,s),t),p},u.prototype.fill=function(e,t,i,s){if(typeof e=="string"){if(typeof t=="string"?(s=t,t=0,i=this.length):typeof i=="string"&&(s=i,i=this.length),s!==void 0&&typeof s!="string")throw new TypeError("encoding must be a string");if(typeof s=="string"&&!u.isEncoding(s))throw new TypeError("Unknown encoding: "+s);if(e.length===1){const m=e.charCodeAt(0);(s==="utf8"&&m<128||s==="latin1")&&(e=m)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;t=t>>>0,i=i===void 0?this.length:i>>>0,e||(e=0);let p;if(typeof e=="number")for(p=t;p<i;++p)this[p]=e;else{const m=u.isBuffer(e)?e:u.from(e,s),q=m.length;if(q===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(p=0;p<i-t;++p)this[p+t]=m[p%q]}return this};const ve={};function Me(r,e,t){ve[r]=class extends t{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${r}]`,this.stack,delete this.name}get code(){return r}set code(s){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:s,writable:!0})}toString(){return`${this.name} [${r}]: ${this.message}`}}}Me("ERR_BUFFER_OUT_OF_BOUNDS",function(r){return r?`${r} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Me("ERR_INVALID_ARG_TYPE",function(r,e){return`The "${r}" argument must be of type number. Received type ${typeof e}`},TypeError),Me("ERR_OUT_OF_RANGE",function(r,e,t){let i=`The value of "${r}" is out of range.`,s=t;return Number.isInteger(t)&&Math.abs(t)>2**32?s=rt(String(t)):typeof t=="bigint"&&(s=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(s=rt(s)),s+="n"),i+=` It must be ${e}. Received ${s}`,i},RangeError);function rt(r){let e="",t=r.length;const i=r[0]==="-"?1:0;for(;t>=i+4;t-=3)e=`_${r.slice(t-3,t)}${e}`;return`${r.slice(0,t)}${e}`}function It(r,e,t){_e(e,"offset"),(r[e]===void 0||r[e+t]===void 0)&&Ee(e,r.length-(t+1))}function it(r,e,t,i,s,p){if(r>t||r<e){const m=typeof e=="bigint"?"n":"";let q;throw e===0||e===BigInt(0)?q=`>= 0${m} and < 2${m} ** ${(p+1)*8}${m}`:q=`>= -(2${m} ** ${(p+1)*8-1}${m}) and < 2 ** ${(p+1)*8-1}${m}`,new ve.ERR_OUT_OF_RANGE("value",q,r)}It(i,s,p)}function _e(r,e){if(typeof r!="number")throw new ve.ERR_INVALID_ARG_TYPE(e,"number",r)}function Ee(r,e,t){throw Math.floor(r)!==r?(_e(r,t),new ve.ERR_OUT_OF_RANGE("offset","an integer",r)):e<0?new ve.ERR_BUFFER_OUT_OF_BOUNDS:new ve.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${e}`,r)}const Tt=/[^+/0-9A-Za-z-_]/g;function At(r){if(r=r.split("=")[0],r=r.trim().replace(Tt,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function Ne(r,e){e=e||1/0;let t;const i=r.length;let s=null;const p=[];for(let m=0;m<i;++m){if(t=r.charCodeAt(m),t>55295&&t<57344){if(!s){if(t>56319){(e-=3)>-1&&p.push(239,191,189);continue}else if(m+1===i){(e-=3)>-1&&p.push(239,191,189);continue}s=t;continue}if(t<56320){(e-=3)>-1&&p.push(239,191,189),s=t;continue}t=(s-55296<<10|t-56320)+65536}else s&&(e-=3)>-1&&p.push(239,191,189);if(s=null,t<128){if((e-=1)<0)break;p.push(t)}else if(t<2048){if((e-=2)<0)break;p.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;p.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;p.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return p}function Ft(r){const e=[];for(let t=0;t<r.length;++t)e.push(r.charCodeAt(t)&255);return e}function Ut(r,e){let t,i,s;const p=[];for(let m=0;m<r.length&&!((e-=2)<0);++m)t=r.charCodeAt(m),i=t>>8,s=t%256,p.push(s),p.push(i);return p}function ot(r){return f.toByteArray(At(r))}function Se(r,e,t,i){let s;for(s=0;s<i&&!(s+t>=e.length||s>=r.length);++s)e[s+t]=r[s];return s}function fe(r,e){return r instanceof e||r!=null&&r.constructor!=null&&r.constructor.name!=null&&r.constructor.name===e.name}function Pe(r){return r!==r}const St=function(){const r="0123456789abcdef",e=new Array(256);for(let t=0;t<16;++t){const i=t*16;for(let s=0;s<16;++s)e[i+s]=r[t]+r[s]}return e}();function ge(r){return typeof BigInt>"u"?Jt:r}function Jt(){throw new Error("BigInt not supported")}}(re)),re}var ye=st();function ue(l){let f={};return l.forEach(function(g,_){f[g]=_}),f.lookup=l,f}function Ge(l,f){for(let g in f)f[g]&&f[g].constructor===Object?(l[g]=l[g]||{},Ge(l[g],f[g])):l[g]=f[g];return l}let $={"document-state":ue([,,,"pending",,"processing",,"canceled","aborted","completed"]),finishings:ue([,,,"none","staple","punch","cover","bind","saddle-stitch","edge-stitch","fold","trim","bale","booklet-maker","jog-offset",,,,,,"staple-top-left","staple-bottom-left","staple-top-right","staple-bottom-right","edge-stitch-left","edge-stitch-top","edge-stitch-right","edge-stitch-bottom","staple-dual-left","staple-dual-top","staple-dual-right","staple-dual-bottom",,,,,,,,,,,,,,,,,,,"bind-left","bind-top","bind-right","bind-bottom",,,,,,,"trim-after-pages","trim-after-documents","trim-after-copies","trim-after-job"]),"operations-supported":ue([,,"Print-Job","Print-URI","Validate-Job","Create-Job","Send-Document","Send-URI","Cancel-Job","Get-Job-Attributes","Get-Jobs","Get-Printer-Attributes","Hold-Job","Release-Job","Restart-Job",,"Pause-Printer","Resume-Printer","Purge-Jobs","Set-Printer-Attributes","Set-Job-Attributes","Get-Printer-Supported-Values","Create-Printer-Subscriptions","Create-Job-Subscription","Get-Subscription-Attributes","Get-Subscriptions","Renew-Subscription","Cancel-Subscription","Get-Notifications","ipp-indp-method","Get-Resource-Attributes","Get-Resource-Data","Get-Resources","ipp-install","Enable-Printer","Disable-Printer","Pause-Printer-After-Current-Job","Hold-New-Jobs","Release-Held-New-Jobs","Deactivate-Printer","Activate-Printer","Restart-Printer","Shutdown-Printer","Startup-Printer","Reprocess-Job","Cancel-Current-Job","Suspend-Current-Job","Resume-Job","Promote-Job","Schedule-Job-After",,"Cancel-Document","Get-Document-Attributes","Get-Documents","Delete-Document","Set-Document-Attributes","Cancel-Jobs","Cancel-My-Jobs","Resubmit-Job","Close-Job","Identify-Printer","Validate-Document"]),"job-collation-type":ue(["other","unknown","uncollated-documents","collated-documents","uncollated-documents"]),"job-state":ue([,,,"pending","pending-held","processing","processing-stopped","canceled","aborted","completed"]),"orientation-requested":ue([,,,"portrait","landscape","reverse-landscape","reverse-portrait","none"]),"print-quality":ue([,,,"draft","normal","high"]),"printer-state":ue([,,,"idle","processing","stopped"])};$["finishings-default"]=$.finishings,$["finishings-ready"]=$.finishings,$["finishings-supported"]=$.finishings,$["media-source-feed-orientation"]=$["orientation-requested"],$["orientation-requested-default"]=$["orientation-requested"],$["orientation-requested-supported"]=$["orientation-requested"],$["print-quality-default"]=$["print-quality"],$["print-quality-supported"]=$["print-quality"];let I=[];I[0]="successful-ok",I[1]="successful-ok-ignored-or-substituted-attributes",I[2]="successful-ok-conflicting-attributes",I[3]="successful-ok-ignored-subscriptions",I[4]="successful-ok-ignored-notifications",I[5]="successful-ok-too-many-events",I[6]="successful-ok-but-cancel-subscription",I[7]="successful-ok-events-complete",I[1024]="client-error-bad-request",I[1025]="client-error-forbidden",I[1026]="client-error-not-authenticated",I[1027]="client-error-not-authorized",I[1028]="client-error-not-possible",I[1029]="client-error-timeout",I[1030]="client-error-not-found",I[1031]="client-error-gone",I[1032]="client-error-request-entity-too-large",I[1033]="client-error-request-value-too-long",I[1034]="client-error-document-format-not-supported",I[1035]="client-error-attributes-or-values-not-supported",I[1036]="client-error-uri-scheme-not-supported",I[1037]="client-error-charset-not-supported",I[1038]="client-error-conflicting-attributes",I[1039]="client-error-compression-not-supported",I[1040]="client-error-compression-error",I[1041]="client-error-document-format-error",I[1042]="client-error-document-access-error",I[1043]="client-error-attributes-not-settable",I[1044]="client-error-ignored-all-subscriptions",I[1045]="client-error-too-many-subscriptions",I[1046]="client-error-ignored-all-notifications",I[1047]="client-error-client-print-support-file-not-found",I[1048]="client-error-document-password-error",I[1049]="client-error-document-permission-error",I[1050]="client-error-document-security-error",I[1051]="client-error-document-unprintable-error",I[1280]="server-error-internal-error",I[1281]="server-error-operation-not-supported",I[1282]="server-error-service-unavailable",I[1283]="server-error-version-not-supported",I[1284]="server-error-device-error",I[1285]="server-error-temporary-error",I[1286]="server-error-not-accepting-jobs",I[1287]="server-error-busy",I[1288]="server-error-job-canceled",I[1289]="server-error-multiple-document-jobs-not-supported",I[1290]="server-error-printer-is-deactivated",I[1291]="server-error-too-many-jobs",I[1292]="server-error-too-many-documents";const We=ue(I);let Ve=[,"operation-attributes-tag","job-attributes-tag","end-of-attributes-tag","printer-attributes-tag","unsupported-attributes-tag","subscription-attributes-tag","event-notification-attributes-tag","resource-attributes-tag","document-attributes-tag",,,,,,,"unsupported","default","unknown","no-value",,"not-settable","delete-attribute","admin-define",,,,,,,,,,"integer","boolean","enum",,,,,,,,,,,,,"octetString","dateTime","resolution","rangeOfInteger","begCollection","textWithLanguage","nameWithLanguage","endCollection",,,,,,,,,,"textWithoutLanguage","nameWithoutLanguage",,"keyword","uri","uriScheme","charset","naturalLanguage","mimeMediaType","memberAttrName"];Ve[127]="extension";const w=ue(Ve);let ut=$["operations-supported"],ct="";function pt(l){let f={},g=0,_="utf8";function v(){return l[g++]}function F(){let B=l.readInt16BE(g,!0);return g+=2,B}function E(){let B=l.readInt32BE(g,!0);return g+=4,B}function u(B,h){return B==0?"":l.toString(h||_,g,g+=B)}function V(){let B;for(;g<l.length&&(B=v())!==3;)Q(B)}function Q(B){let h=w.lookup[B];for(B={},f[h]?(Array.isArray(f[h])||(f[h]=[f[h]]),f[h].push(B)):f[h]=B;l[g]>=15;)W(B)}function W(B){let h=v();h===127&&(h=E());let x=u(F());B[x]=ie(h,x)}function N(){let B=l[g];return B!==74&&B!==55&&B!==3&&l[g+1]===0&&l[g+2]===0}function ie(B,h){let x=k(B,h);if(N()){x=[x];do B=v(),F(),x.push(k(B,h));while(N())}return x}function k(B,h){let x=F();switch(B){case w.enum:let T=E();return $[h]&&$[h].lookup[T]||T;case w.integer:return E();case w.boolean:return!!v();case w.rangeOfInteger:return[E(),E()];case w.resolution:return[E(),E(),v()===3?"dpi":"dpcm"];case w.dateTime:let S=new Date(F(),v(),v(),v(),v(),v(),v());return new Date(S.toISOString().substr(0,23).replace("T",",")+","+String.fromCharCode(u(1))+u(1)+":"+u(1));case w.textWithLanguage:case w.nameWithLanguage:let X=u(F()),oe=u(F());return X+ct+oe;case w.nameWithoutLanguage:case w.textWithoutLanguage:case w.octetString:case w.memberAttrName:return u(x);case w.keyword:case w.uri:case w.uriScheme:case w.charset:case w.naturalLanguage:case w.mimeMediaType:return u(x,"ascii");case w.begCollection:return u(x),C();case w["no-value"]:}}function C(){let B,h={};for(;(B=v())!==55;){if(B!==74){console.log("unexpected:",w.lookup[B]);return}u(F());let x=k(74),T=D();h[x]=T}return u(F()),u(F()),h}function D(B){let h=v();return h===127&&(h=E()),u(F()),ie(h,B)}f.version=v()+"."+v();let O=F();return(O>=2||O<=61)&&(f.operation=ut.lookup[O]),(O<=7||O>=1024)&&(f.statusCode=We.lookup[O]),f.id=E(),V(),g<l.length&&(f.data=l.toString(_,g)),f}function lt(l){const f=pt(ye.Buffer.from(l.data));return delete f.operation,f}function A(l){return l||(l=1023),{type:"text",max:l}}function c(l,f){return(f==d||f===void 0)&&(f=2147483647),l===void 0&&(l=-2147483648),{type:"integer",tag:w.integer,min:l,max:f}}function R(l,f){return(f==d||f===void 0)&&(f=2147483647),l===void 0&&(l=-2147483648),{type:"rangeOfInteger",tag:w.rangeOfInteger,min:l,max:f}}function G(){return{type:"boolean",tag:w.boolean}}function ce(){return{type:"charset",tag:w.charset,max:63}}function n(){return{type:"keyword",tag:w.keyword,min:1,max:1023}}function se(){return{type:"naturalLanguage",tag:w.naturalLanguage,max:63}}function pe(){return{type:"dateTime",tag:w.dateTime}}function de(){return{type:"mimeMediaType",tag:w.mimeMediaType,max:255}}function J(l){return{type:"uri",tag:w.uri,max:l||1023}}function Je(){return{type:"uriScheme",tag:w.uriScheme,max:63}}function L(){return{type:"enumeration",tag:w.enum}}function xe(){return{type:"resolution",tag:w.resolution}}function dt(){return{type:"unknown",tag:w.unknown}}function we(l){return{type:"name",max:l||1023}}function K(){return{type:"novalue",tag:w["no-value"]}}function be(l){return{type:"octetString",tag:w.octetString,max:l||1023}}function b(l,f,g){let _=Array.prototype.slice.call(arguments);_.lookup={};const v=Te(function(){return _.forEach(function(F,E){var u;typeof F=="function"&&(_[E]=F()),_.lookup[(u=_[E])==null?void 0:u.type]=_[E]}),_.alts=Object.keys(_.lookup).sort().join(),_});return _.some(function(F){return Ae(F)})?v:v()}const Te=function(l){return l.isDeferred=!0,l},Ae=function(l){return typeof l=="function"&&l.isDeferred};function o(l){return Ae(l)?Te(function(){return l=l(),l.setof=!0,l}):(typeof l=="function"&&!Ae(l)&&(l=l()),l)}function y(l,f){if(!arguments.length)return{type:"collection",tag:w.begCollection};if(typeof l=="string")return Te(function(){return{type:"collection",tag:w.begCollection,members:ee[l][f].members}});let g=Object.keys(l).some(function(v){return Ae(l[v])});const _=Te(function(){return{type:"collection",tag:w.begCollection,members:Ce(l)}});return g?_:_()}let d={},ee={};ee["Document Description"]={"attributes-charset":ce,"attributes-natural-language":se,compression:n,"copies-actual":o(c(1,d)),"cover-back-actual":o(y("Job Template","cover-back")),"cover-front-actual":o(y("Job Template","cover-front")),"current-page-order":n,"date-time-at-completed":b(pe,K,null),"date-time-at-creation":pe,"date-time-at-processing":b(pe,K,null),"detailed-status-messages":o(A),"document-access-errors":o(A),"document-charset":ce,"document-digital-signature":n,"document-format":de,"document-format-details":o(y("Operation","document-format-details")),"document-format-details-detected":o(y("Operation","document-format-details")),"document-format-detected":de,"document-format-version":A(127),"document-format-version-detected":A(127),"document-job-id":c(1,d),"document-job-uri":J,"document-message":A,"document-metadata":o(be),"document-name":name,"document-natural-language":se,"document-number":c(1,d),"document-printer-uri":J,"document-state":L,"document-state-message":A,"document-state-reasons":o(n),"document-uri":J,"document-uuid":J(45),"errors-count":c(0,d),"finishings-actual":o(L),"finishings-col-actual":o(y("Job Template","finishings-col")),"force-front-side-actual":o(c(1,d)),"imposition-template-actual":o(b(n,name,null)),impressions:c(0,d),"impressions-completed":c(0,d),"impressions-completed-current-copy":c(0,d),"insert-sheet-actual":o(y("Job Template","insert-sheet")),"k-octets":c(0,d),"k-octets-processed":c(0,d),"last-document":G,"media-actual":o(b(n,name,null)),"media-col-actual":o(y("Job Template","media-col")),"media-input-tray-check-actual":o(b(n,name,null)),"media-sheets":c(0,d),"media-sheets-completed":c(0,d),"more-info":J,"number-up-actual":o(c),"orientation-requested-actual":o(L),"output-bin-actual":o(name),"output-device-assigned":we(127),"overrides-actual":o(y("Document Template","overrides")),"page-delivery-actual":o(n),"page-order-received-actual":o(n),"page-ranges-actual":o(R(1,d)),pages:c(0,d),"pages-completed":c(0,d),"pages-completed-current-copy":c(0,d),"presentation-direction-number-up-actual":o(n),"print-content-optimize-actual":o(n),"print-quality-actual":o(L),"printer-resolution-actual":o(xe),"printer-up-time":c(1,d),"separator-sheets-actual":o(y("Job Template","separator-sheets")),"sheet-completed-copy-number":c(0,d),"sides-actual":o(n),"time-at-completed":b(c,K,null),"time-at-creation":c,"time-at-processing":b(c,K,null),"x-image-position-actual":o(n),"x-image-shift-actual":o(c),"x-side1-image-shift-actual":o(c),"x-side2-image-shift-actual":o(c),"y-image-position-actual":o(n),"y-image-shift-actual":o(c),"y-side1-image-shift-actual":o(c),"y-side2-image-shift-actual":o(c)},ee["Document Template"]={copies:c(1,d),"cover-back":y("Job Template","cover-back"),"cover-front":y("Job Template","cover-front"),"feed-orientation":n,finishings:o(L),"finishings-col":y("Job Template","finishings-col"),"font-name-requested":name,"font-size-requested":c(1,d),"force-front-side":o(c(1,d)),"imposition-template":b(n,name,null),"insert-sheet":o(y("Job Template","insert-sheet")),media:b(n,name,null),"media-col":y("Job Template","media-col"),"media-input-tray-check":b(n,name,null),"number-up":c(1,d),"orientation-requested":L,overrides:o(y({"document-copies":o(R),"document-numbers":o(R),pages:o(R)},null)),"page-delivery":n,"page-order-received":n,"page-ranges":o(R(1,d)),"pdl-init-file":o(y("Job Template","pdl-init-file")),"presentation-direction-number-up":n,"print-color-mode":n,"print-content-optimize":n,"print-quality":L,"print-rendering-intent":n,"printer-resolution":xe,"separator-sheets":y("Job Template","separator-sheets"),"sheet-collate":n,sides:n,"x-image-position":n,"x-image-shift":c,"x-side1-image-shift":c,"x-side2-image-shift":c,"y-image-position":n,"y-image-shift":c,"y-side1-image-shift":c,"y-side2-image-shift":c},ee["Event Notifications"]={"notify-subscribed-event":n,"notify-text":A},ee["Job Description"]={"attributes-charset":ce,"attributes-natural-language":se,"compression-supplied":n,"copies-actual":o(c(1,d)),"cover-back-actual":o(y("Job Template","cover-back")),"cover-front-actual":o(y("Job Template","cover-front")),"current-page-order":n,"date-time-at-completed":b(pe,K),"date-time-at-creation":pe,"date-time-at-processing":b(pe,K),"document-charset-supplied":ce,"document-digital-signature-supplied":n,"document-format-details-supplied":o(y("Operation","document-format-details")),"document-format-supplied":de,"document-format-version-supplied":A(127),"document-message-supplied":A,"document-metadata":o(be),"document-name-supplied":name,"document-natural-language-supplied":se,"document-overrides-actual":o(y),"errors-count":c(0,d),"finishings-actual":o(L),"finishings-col-actual":o(y("Job Template","finishings-col")),"force-front-side-actual":o(o(c(1,d))),"imposition-template-actual":o(b(n,name)),"impressions-completed-current-copy":c(0,d),"insert-sheet-actual":o(y("Job Template","insert-sheet")),"job-account-id-actual":o(name),"job-accounting-sheets-actual":o(y("Job Template","job-accounting-sheets")),"job-accounting-user-id-actual":o(name),"job-attribute-fidelity":G,"job-collation-type":L,"job-collation-type-actual":o(n),"job-copies-actual":o(c(1,d)),"job-cover-back-actual":o(y("Job Template","cover-back")),"job-cover-front-actual":o(y("Job Template","cover-front")),"job-detailed-status-messages":o(A),"job-document-access-errors":o(A),"job-error-sheet-actual":o(y("Job Template","job-error-sheet")),"job-finishings-actual":o(L),"job-finishings-col-actual":o(y("Job Template","media-col")),"job-hold-until-actual":o(b(n,name)),"job-id":c(1,d),"job-impressions":c(0,d),"job-impressions-completed":c(0,d),"job-k-octets":c(0,d),"job-k-octets-processed":c(0,d),"job-mandatory-attributes":o(n),"job-media-sheets":c(0,d),"job-media-sheets-completed":c(0,d),"job-message-from-operator":A(127),"job-message-to-operator-actual":o(A),"job-more-info":J,"job-name":name,"job-originating-user-name":name,"job-originating-user-uri":J,"job-pages":c(0,d),"job-pages-completed":c(0,d),"job-pages-completed-current-copy":c(0,d),"job-printer-up-time":c(1,d),"job-printer-uri":J,"job-priority-actual":o(c(1,100)),"job-save-printer-make-and-model":A(127),"job-sheet-message-actual":o(A),"job-sheets-actual":o(b(n,name)),"job-sheets-col-actual":o(y("Job Template","job-sheets-col")),"job-state":b(L,dt),"job-state-message":A,"job-state-reasons":o(n),"job-uri":J,"job-uuid":J(45),"media-actual":o(b(n,name)),"media-col-actual":o(y("Job Template","media-col")),"media-input-tray-check-actual":o(b(n,name)),"multiple-document-handling-actual":o(n),"number-of-documents":c(0,d),"number-of-intervening-jobs":c(0,d),"number-up-actual":o(c(1,d)),"orientation-requested-actual":o(L),"original-requesting-user-name":name,"output-bin-actual":o(b(n,name)),"output-device-actual":o(we(127)),"output-device-assigned":we(127),"overrides-actual":o(y("Job Template","overrides")),"page-delivery-actual":o(n),"page-order-received-actual":o(n),"page-ranges-actual":o(R(1,d)),"presentation-direction-number-up-actual":o(n),"print-content-optimize-actual":o(n),"print-quality-actual":o(L),"printer-resolution-actual":o(xe),"separator-sheets-actual":o(y("Job Template","separator-sheets")),"sheet-collate-actual":o(n),"sheet-completed-copy-number":c(0,d),"sheet-completed-document-number":c(0,d),"sides-actual":o(n),"time-at-completed":b(c,K),"time-at-creation":c,"time-at-processing":b(c,K),"warnings-count":c(0,d),"x-image-position-actual":o(n),"x-image-shift-actual":o(c),"x-side1-image-shift-actual":o(c),"x-side2-image-shift-actual":o(c),"y-image-position-actual":o(n),"y-image-shift-actual":o(c),"y-side1-image-shift-actual":o(c),"y-side2-image-shift-actual":o(c)},ee["Job Template"]={copies:c(1,d),"cover-back":y({"cover-type":n,media:b(n,name),"media-col":y("Job Template","media-col")}),"cover-front":y({"cover-type":n,media:b(n,name),"media-col":y("Job Template","media-col")}),"feed-orientation":n,finishings:o(L),"finishings-col":y({"finishing-template":name,stitching:y({"stitching-locations":o(c(0,d)),"stitching-offset":c(0,d),"stitching-reference-edge":n})}),"font-name-requested":name,"font-size-requested":c(1,d),"force-front-side":o(c(1,d)),"imposition-template":b(n,name),"insert-sheet":o(y({"insert-after-page-number":c(0,d),"insert-count":c(0,d),media:b(n,name),"media-col":y("Job Template","media-col")})),"job-account-id":name,"job-accounting-sheets":y({"job-accounting-output-bin":b(n,name),"job-accounting-sheets-type":b(n,name),media:b(n,name),"media-col":y("Job Template","media-col")}),"job-accounting-user-id":name,"job-copies":c(1,d),"job-cover-back":y("Job Template","cover-back"),"job-cover-front":y("Job Template","cover-front"),"job-delay-output-until":b(n,name),"job-delay-output-until-time":pe,"job-error-action":n,"job-error-sheet":y({"job-error-sheet-type":b(n,name),"job-error-sheet-when":n,media:b(n,name),"media-col":y("Job Template","media-col")}),"job-finishings":o(L),"job-finishings-col":y("Job Template","finishings-col"),"job-hold-until":b(n,name),"job-hold-until-time":pe,"job-message-to-operator":A,"job-phone-number":J,"job-priority":c(1,100),"job-recipient-name":name,"job-save-disposition":y({"save-disposition":n,"save-info":o(y({"save-document-format":de,"save-location":J,"save-name":name}))}),"job-sheet-message":A,"job-sheets":b(n,name),"job-sheets-col":y({"job-sheets":b(n,name),media:b(n,name),"media-col":y("Job Template","media-col")}),media:b(n,name),"media-col":y({"media-back-coating":b(n,name),"media-bottom-margin":c(0,d),"media-color":b(n,name),"media-front-coating":b(n,name),"media-grain":b(n,name),"media-hole-count":c(0,d),"media-info":A(255),"media-key":b(n,name),"media-left-margin":c(0,d),"media-order-count":c(1,d),"media-pre-printed":b(n,name),"media-recycled":b(n,name),"media-right-margin":c(0,d),"media-size":y({"x-dimension":c(0,d),"y-dimension":c(0,d)}),"media-size-name":b(n,name),"media-source":b(n,name),"media-thickness":c(1,d),"media-tooth":b(n,name),"media-top-margin":c(0,d),"media-type":b(n,name),"media-weight-metric":c(0,d)}),"media-input-tray-check":b(n,name),"multiple-document-handling":n,"number-up":c(1,d),"orientation-requested":L,"output-bin":b(n,name),"output-device":we(127),overrides:o(y({"document-copies":o(R),"document-numbers":o(R),pages:o(R)})),"page-delivery":n,"page-order-received":n,"page-ranges":o(R(1,d)),"pages-per-subset":o(c(1,d)),"pdl-init-file":y({"pdl-init-file-entry":name,"pdl-init-file-location":J,"pdl-init-file-name":name}),"presentation-direction-number-up":n,"print-color-mode":n,"print-content-optimize":n,"print-quality":L,"print-rendering-intent":n,"printer-resolution":xe,"print-scaling":n,"proof-print":y({media:b(n,name),"media-col":y("Job Template","media-col"),"proof-print-copies":c(0,d)}),"separator-sheets":y({media:b(n,name),"media-col":y("Job Template","media-col"),"separator-sheets-type":o(n)}),"sheet-collate":n,sides:n,"x-image-position":n,"x-image-shift":c,"x-side1-image-shift":c,"x-side2-image-shift":c,"y-image-position":n,"y-image-shift":c,"y-side1-image-shift":c,"y-side2-image-shift":c},ee.Operation={"attributes-charset":ce,"attributes-natural-language":se,compression:n,"detailed-status-message":A,"document-access-error":A,"document-charset":ce,"document-digital-signature":n,"document-format":de,"document-format-details":o(y({"document-format":de,"document-format-device-id":A(127),"document-format-version":A(127),"document-natural-language":o(se),"document-source-application-name":name,"document-source-application-version":A(127),"document-source-os-name":we(40),"document-source-os-version":A(40)})),"document-message":A,"document-metadata":o(be),"document-name":name,"document-natural-language":se,"document-password":be,"document-uri":J,"first-index":c(1,d),"identify-actions":o(n),"ipp-attribute-fidelity":G,"job-hold-until":b(n,name),"job-id":c(1,d),"job-ids":o(c(1,d)),"job-impressions":c(0,d),"job-k-octets":c(0,d),"job-mandatory-attributes":o(n),"job-media-sheets":c(0,d),"job-message-from-operator":A(127),"job-name":name,"job-password":be(255),"job-password-encryption":b(n,name),"job-state":L,"job-state-message":A,"job-state-reasons":o(n),"job-uri":J,"last-document":G,limit:c(1,d),message